EditorFactory - Module for object management in a Canvas

Share your advanced PureBasic knowledge/code with the community.
User avatar
ChrisR
Addict
Addict
Posts: 1124
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: EditorFactory - Module for object management in a Canvas

Post by ChrisR »

STARGÅTE wrote:Now I can hear ShadowStorm laughing, because he had also suggested it during a discussion with me.
:lol:
Pins, magnets... we can go far, very far...
I guess, Stargate should be paid, compensated, if he goes so far, in that way, a professional job
Currently, the license is, or can be, an obstacle for those who would like to use the module.
STARGÅTE wrote:I will go forward and finalize the frame stuff first.
Yep, good point :D
User avatar
STARGÅTE
Addict
Addict
Posts: 2063
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: EditorFactory - Module for object management in a Canvas

Post by STARGÅTE »

New Version 1.16.04
  • Added: IsObjectFrame(), AddObjectFrame(), RemoveObjectFrame(), MoveObjectFrame() to handle the frames inside of objects, but also between different objects.
  • Added: ReleaseCanvasObjects() to clean up the object manager before the canvas is freed with FreeGadget.
  • Added: #EventType_LeftMouseButtonHold, #EventType_RightMouseButtonHold, #EventType_MiddleMouseButtonHold to give continuously an event when a mouse button is held.
    These events only available in thread safe mode!
    This could be useful for the scroll bar arrows to perform a continuous scrolling.
  • Changed: CreateObject() - handling of the frame index is changed, see documentation!
  • Changed: AddObjectFrame() now handles also the frame properties like view box and inner area size.
  • Changed: SetObjectFrameClipping() --> SetObjectFrameViewBox() - changed behavior
  • Changed: SetObjectFrameOffset() --> SetObjectFrameInnerOffset() - changed behavior
Download:
EditorFactory.pbi (Version 1.16.04, 2021-03-20)
EditorFactory-1-16-04.zip (Archive with include and examples)
The include is shared under the CC BY-NC 4.0 licence.

The frame management is now compatible with pure basic (index sorting). Further you can define the important properties of a frame (the view box and the inner size) during adding the frame. All childs are respect these properties. To simplifier the scrolling of scroll bars we added #EventType_*MouseButtonHold event types, which were fired every 50ms to allow a continoues scrolling behavior. (This feature needs thread safe mode! Without thread safe mode, these events are not available).

I updated again the Example05_Attachment-and-containers.pb example, to show you the new/changed interactions with frames.

Do not hesitate to give us feedback, we are looking forward to it.

Edit: Quick bug-fix.
Last edited by STARGÅTE on Sat Mar 20, 2021 5:24 pm, edited 2 times in total.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Amitris_de
User
User
Posts: 31
Joined: Wed Jan 06, 2021 2:53 pm

Re: EditorFactory - Module for object management in a Canvas

Post by Amitris_de »

I appreciate your efforts. :) so far this module has been really unique .
I do not know if this is a bug or not, in the fifth example the MouseButtonHold ability for scrollbar, random works properly. usually the first time the scrolling is done well but it does not work properly by changing the object size. i think this needs to be tested by other users as well.
User avatar
STARGÅTE
Addict
Addict
Posts: 2063
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: EditorFactory - Module for object management in a Canvas

Post by STARGÅTE »

In the 5th example, the object ("scroll area gadget") has an inner size of 500 x 500 px. If you now enlarge your object over this inner size, the inner area is fully visible, and no scrolling is possible. I think this was also meant by you in this post.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Amitris_de
User
User
Posts: 31
Joined: Wed Jan 06, 2021 2:53 pm

Re: EditorFactory - Module for object management in a Canvas

Post by Amitris_de »

@STARGÅTE : Thanks, i know exactly how the scrollarea control works, but i mean completely different. at the first opportunity, I will express my meaning with a image.
User avatar
ChrisR
Addict
Addict
Posts: 1124
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: EditorFactory - Module for object management in a Canvas

Post by ChrisR »

Thanks a lot for the update :)
Especially for the frames management, it should be very useful.

Also MouseButtonHold to manage the continuous scrolling is also at Top.
A good solution to avoid having to manage the scroll bar

However, in example 5, I noticed the same concern as Amitris
it works very well the first time, but not always after:
The scrolling seems to be done correctly but the display is no longer linear or in real time.
Probably a little trouble when redrawing the internal objects.

Thanks to you and ShadowStorm for sharing this great module, with attachments, containers,...
It's very useful to avoid a big headache to code
infratec
Always Here
Always Here
Posts: 6810
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: EditorFactory - Module for object management in a Canvas

Post by infratec »

Hi,

I just tested the Example05.
When I select 'Panel number1' and grab the middle point at the bottom line,
then move it completely to the top, I see only thre points at the top line, but the title is still displayed.
I expected that the bottom line is only movable to the borrom of the title, or the title should also shrink.

Maybe I'm wrong, but it seems not 'normal'.
User avatar
STARGÅTE
Addict
Addict
Posts: 2063
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: EditorFactory - Module for object management in a Canvas

Post by STARGÅTE »

@infratec: You are right, but this is a bug in the exmaple not in the EditorFactory module. The drawing callback in this example is not well written :wink: .

@ChrisR and Amitris_de: I will take a look in your described behavior. However it is not easy when I do not have such issues during the scrolling.
In case of troubleshooting, can you try to increase the delay time in procedure MouseButtonHold_Thread() and check what happens?
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
STARGÅTE
Addict
Addict
Posts: 2063
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: EditorFactory - Module for object management in a Canvas

Post by STARGÅTE »

Can you quickly check, if this include works better?
EditorFactory2.pbi (Version 1.16.04, 2021-03-20)
Just rename it to use it in example 5
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Amitris_de
User
User
Posts: 31
Joined: Wed Jan 06, 2021 2:53 pm

Re: EditorFactory - Module for object management in a Canvas

Post by Amitris_de »

@STARGÅTE : thanks, yes it now worked for me properly and the previous problem was fixed.
User avatar
ChrisR
Addict
Addict
Posts: 1124
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: EditorFactory - Module for object management in a Canvas

Post by ChrisR »

Amitris_de wrote:@STARGÅTE : thanks, yes it now worked for me properly and the previous problem was fixed.
Same here, thanks :)
User avatar
ChrisR
Addict
Addict
Posts: 1124
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: EditorFactory - Module for object management in a Canvas

Post by ChrisR »

infratec wrote:When I select 'Panel number1' and grab the middle point at the bottom line,
then move it completely to the top, I see only thre points at the top line, but the title is still displayed.
I expected that the bottom line is only movable to the borrom of the title, or the title should also shrink.
STARGÅTE wrote:@infratec: You are right, but this is a bug in the exmaple not in the EditorFactory module. The drawing callback in this example is not well written :wink: .
To avoid, maybe the size should not be reduced beyond the visible frame (iViewBoxX, iViewBoxY) in EditorFactory.
The frame, in this case, should keep a width, height > 0
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

Hello to all,

Editors Factory not having the expected success, with a very big surprise I confess, and not understanding this, I decide to bring this message.

Please number your answers :)

- First question, did you test the module?
--- If yes, what was your first impression in detail?
--- If not, why didn't you want to test it?

- Second question, what did the name of the module mean to you and what did you think you could do with it without even testing it?

- Third question, were you disappointed by the module, and if so, why in detail?

- Fourth question, do you think the name of the module is appropriate for what it does?
--- If not, what name would you have given it, for those who have tested it.

- Fifth question, for those who have tested it:
--- What did you think you would do with it?
--- What would you like to do with it?

- Sixth question, do you have any ideas for improvement, things to review?

Sometimes I think about the name of the module, and I think: "Maybe the name is not good, maybe they imagined it was something that it wasn't, maybe they are disappointed?"

Since no one is interested in the project, it is in "Pause", Stargate is not motivated to continue, which I understand!

Note also that personally I don't understand why this module doesn't please, it has a very big potential, but certainly, not exploited as it should !

I would have to make a complete demonstration video on the possibilities of the module, but it's very long to do, I don't know how to do it either.... but I think about it!

Of course with a good video demonstration, the module will please, I don't doubt it!

Note also that it would be quite possible to create an interface that would use this module, basically it would be like a visual editor to create windows and gadgets, except that here it would be to create your own object editor (The interface would then allow you to generate the code that will use the module), However this would require a very very big work, and as the module is not yet finished, this would complicate this task and as I would be the creator 100% of the software and well it would be longer, even paying, but it would be the best, I confess.

Thanks a lot.
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Joubarbe
Enthusiast
Enthusiast
Posts: 552
Joined: Wed Sep 18, 2013 11:54 am
Location: France

Re: EditorFactory - Module for object management in a Canvas

Post by Joubarbe »

To me it’s not perfectly clear on what your module does. I could download and find out by myself, but then the license is too restricted. No commercial use for me is a no go, as I’m a freelancer and every piece of code I use is potentially for commercial purpose. Your module has probably a lot of potential, but when you make money from your code, the potential also comes from what I’m allowed to do with it. I understand that you’re disappointed, and a ton of libraries are underestimated out there; I just give facts about I generally browse new modules / libraries, and a few little things can make me just skip them, like license and absence of clarity / demo. Still, PB is a small community, don’t give up! :)
Bitblazer
Enthusiast
Enthusiast
Posts: 730
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: EditorFactory - Module for object management in a Canvas

Post by Bitblazer »

The initial description left me a bit puzzled about the use /value of the module, so i just stored it to "give it a look when i have some free time". I never had "free time" so far, thats my main reason why i never even tested your module.

The license would have probably been the next problem. Just do a license like epic offers with their unreal engine.
webpage - discord chat links -> purebasic GPT4All
Post Reply