Page 1 of 1

Visual Designer : placeholder for 3rd party & custom gad

Posted: Mon Apr 19, 2004 9:36 pm
by USCode
:idea: Presently, the Visual Designer supports only native PB gadgets. As there's no formal plugin specification for 3rd party or custom gadgets so they could be fit automatically into the Visual Designer ... how about just a generic placeholder gadget? Then you could still design your windows in VD, evolve them over time, and it would all be seamless in VD with no re-coding.

This placeholder gadget would just be represented by a simple square in the VD. It's only properties would be X, Y, width, height (and lock left,top,right,bottom). There would then need to be a spot in the VD object properties box to enter the syntax needed to create the object. When entering the syntax, meta-variables could be specified that are then translated to actual parameters when VD generates the code using this generic placeholder gadget syntax.

For example, syntax as entered in VD:
MyCustomGadget(#MyGadgetID, #PB_VD_x, #PB_VD_y, #PB_VD_width, #PB_VD_height, other-parameters)

Actual VD generated code:
MyCustomGadget(#MyGadgetID, 100, 50, 300, 200, other-parameters)

All the #PB_VD_... variables represent the position and size of their generic placeholder gadget as placed on the window and then are translated to actual numbers WHEN the gadget code is generated by VD.

Then you could make changes down the road to your window with custom gadgets using VD and not result in any rework as VD regenerates the new window code.

:?: Thoughts?

P.S. VD could even have a facility to enter a list of 3rd party gadgets with their syntax, then this list could be re-used from project to project.

Berikco?

Posted: Wed Apr 21, 2004 5:33 am
by USCode
:?: What do you think Berikco? From what I've read here, you probably already have something like this or better in the works?!? :D

Re: Visual Designer : placeholder for 3rd party & custom

Posted: Wed Apr 21, 2004 8:57 am
by PB
> how about just a generic placeholder gadget

Just use a Frame3DGadget with no title. ;)

Posted: Wed Apr 21, 2004 9:26 am
by Fred
I think it's really a good idea. Basically, gadgets are square, so it should be easy to do a .prefs file with new gadgets format, something like this (as USCode suggested)

GadgetIcon = "mynewicon.ico" ; Icon in the VD toolbar
GadgetTooltip = "It's my own gadget" ; Tooltip for this new icon
GadgetPreviewImage = "MyImage.png" ; will be the image displayed on the window, when the gadget is created
etc...

User-defined gadgets

Posted: Thu Apr 22, 2004 4:34 am
by USCode
I think it's really a good idea.
Thanks Fred! I think it would make PB and VD even more flexible and powerful than they already are.

Like you said, the prefs file could even contain the gadget syntax:
GadgetSyntax = MyCustomGadget(#MyGadgetID, #PB_VD_x, #PB_VD_y, #PB_VD_width, #PB_VD_height, other-parameters)

Posted: Wed Jun 01, 2005 8:12 pm
by USCode
Bump.

Fr34k, do you have anything like this in the works with your new VD?

Thanks!

Posted: Thu Jun 02, 2005 9:15 pm
by Berikco
I dont think so, Freak is coding the new IDE

Posted: Thu Jun 02, 2005 9:27 pm
by traumatic
...how to drop a brick... ;)

Posted: Fri Jun 03, 2005 4:59 am
by USCode
Ah, my misunderstanding. I didnt realize you were working on a new VD but just saw your post. Thanks!