Visual Designer : placeholder for 3rd party & custom gad

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Visual Designer : placeholder for 3rd party & custom gad

Post 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.
Last edited by USCode on Wed Jun 01, 2005 8:11 pm, edited 1 time in total.
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Berikco?

Post 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
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

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

Post by PB »

> how about just a generic placeholder gadget

Just use a Frame3DGadget with no title. ;)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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...
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

User-defined gadgets

Post 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)
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Post by USCode »

Bump.

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

Thanks!
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

I dont think so, Freak is coding the new IDE
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

...how to drop a brick... ;)
Good programmers don't comment their code. It was hard to write, should be hard to read.
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Post by USCode »

Ah, my misunderstanding. I didnt realize you were working on a new VD but just saw your post. Thanks!
Post Reply