Form Designer 5.10

You need some new stunning features ? Tell us here.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Form Designer 5.10

Post by Polo »

A free Form Designer for Purebasic Mac, Windows and Linux.
The Form Designer is now integrated in the Purebasic IDE, please use this forum section to request features or ask questions regarding the designer, and report bugs in the appropriate OS sub forum.

Latest version available in the Purebasic package:

Make a donation to support the development:

http://www.gdpcomputing.co.uk/formdesigner.html
Last edited by Polo on Wed Nov 07, 2012 12:53 pm, edited 20 times in total.
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: Form Designer for Mac - Coming soon!

Post by J. Baker »

Looks great so far! ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Lost
User
User
Posts: 63
Joined: Fri Dec 19, 2008 12:24 am
Location: Tasmania

Re: Form Designer for Mac - Coming soon!

Post by Lost »

Nice!
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: Form Designer for Mac - Coming soon!

Post by Bisonte »

Do you thinkin about convert it to Linux and Windows as well ?

The screenshots looks very good...
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Form Designer for Mac - Coming soon!

Post by Fangbeast »

Looks good.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Form Designer for Mac - Coming soon!

Post by jesperbrannmark »

Oh. I give my right arm for that.
Wishlist:
* Separate list with all gadgets so I can drag-and-drop to change Z-order.
* Ability to link in custom gadgets (like your spreadsheetgadget (wrong name, but you know what i mean), texteditorgadget, my calendargadget etc).
* As in Gfa32 (or vb) ability to have a list of possible triggers (like button.lbuttondown) and a doubleclick brings that up in the code editor (I would also give my left arm for this). (so a direct connection with code editor and visual/form designer, could have them on separate screens and work so efficient)
* Inline / include images for both things like buttons, imagegadgets but also for the window background itself.
* Ability to edit text on the buttons/gadgets in multiple languages in the same editor.

I also see some special things like the scaling and stuff at the bottom of the windows, this is cocoa specific code? Looks very very nice!

I dont mean to give you a :evil: feeling with the wishlist, love your work so far and if you are looking for betas... you know where to find me.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac - Coming soon!

Post by Polo »

Thanks for the comments!

Thanks for the suggestions Jesper, for ImageGadget and Button Image there's already an image selector, not for background window as it requires 2DDrawing I think, and I'm not sure WindowOutput is supported on OSX.
I'll have a look at what can be done for the other suggestions :)
jesperbrannmark wrote:I also see some special things like the scaling and stuff at the bottom of the windows, this is cocoa specific code? Looks very very nice!
No, all the windows/menu/etc editing is actually just a Canvas :oops:
Bisonte wrote:Do you thinkin about convert it to Linux and Windows as well ?
It should work on Windows straight out the box as I do not use any API, but would have the OSX look on the editing part.

I use my grid gadget and textedit gadget for the code viewer, which is Windows/Mac compatible too.
Might work on Linux too, no idea ;)
jamirokwai
Enthusiast
Enthusiast
Posts: 796
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: Form Designer for Mac - Coming soon!

Post by jamirokwai »

Wow, Looks great!
Regards,
JamiroKwai
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac - Coming soon!

Post by Polo »

jesperbrannmark wrote:* Separate list with all gadgets so I can drag-and-drop to change Z-order.
Added (not drag and drop though). The program checks for consistency with parent gadgets as well, and move the the children items with the parent.

Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac - Coming soon!

Post by Polo »

jesperbrannmark wrote: * Ability to link in custom gadgets (like your spreadsheetgadget (wrong name, but you know what i mean), texteditorgadget, my calendargadget etc).
Added that as well. You basically create a template with init code and creation code in the preference panel, then use it as a custom gadget in the editor.

I'm not sure I'll add multi language ability as there's too many ways to do handle multiple languages in an app.

For event handling the code viewer doesn't generate anything but WaitWindowEvent().
What exactly would you like to have? Just a mean to set the procedure to be called when an event is fired?
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Form Designer for Mac - Coming soon!

Post by jesperbrannmark »

Oh, this month seem like x-mas. New cocoa version and now this.
Added that as well. You basically create a template with init code and creation code in the preference panel, then use it as a custom gadget in the editor.
Super duper, love to hear that.
I'm not sure I'll add multi language ability as there's too many ways to do handle multiple languages in an app.
When I handle this myself, I use a csv file. Fist column is name, then comes all the languages. I load everything in to a map and then use it like:

Code: Select all

TextGadget(#gadget,0,0,100,24,language("Please_click_here"))
I found it to be a good way because you are not reffering to a number (like a array), which means you in that case need to look in several different places + if you accidently move stuff down a line in the array it becomes XXX'ed up.

Code: Select all

For event handling the code viewer doesn't generate anything but WaitWindowEvent().
What exactly would you like to have? Just a mean to set the procedure to be called when an event is fired?
I basicly use the same code for my main loop all the time:

Code: Select all

IncludeFile "define.pb" ;All enumurations, inits etc
IncludeFile "eventhandler.pb" ;-all handle_XXX()
Global EventID, EventGadget, EventWindow,EventType,EventMenu
;Main loop
Repeat
  EventID = WaitWindowEvent(50)
  EventGadget=EventGadget()
  EventWindow=EventWindow()
  EventType=EventType()
  EventMenu=EventMenu()
  Select EventWindow
    Case #login_window
      handle_login_window()
    Case #logout_window
      handle_logout_window()
    Case #main_window
      handle_main_window()
  EndSelect
  CompilerIf #PB_Compiler_OS=#PB_OS_MacOS
    If EventMenu=#PB_Menu_Quit
      CloseWindow(#main_window)
    EndIf
  CompilerEndIf
Until Not IsWindow(#main_window)
So in my define.pb I have all my enumurations on windows, gadgets etc. On my eventhandler.pb *try* to use something like this

Code: Select all

;Part of eventhandler.pb
Procedure handle_login_window()
  If EventGadget=#login_button1 And EventType=#PB_EventType_LeftClick And EventID=#PB_Event_Gadget
    login_button1_leftclick()
  ElseIf EventGadget=#login_button1 And EventType=#PB_EventType_RightClick And EventID=#PB_Event_Gadget
    login_button1_rightclick()
  ElseIf EventMenu=#login_timer And EventID=#PB_Event_Menu
    login_timer()
  EndIf
EndProcedure
Something like in Gfa32, where if you draw a button and then clicked on the event button1.click this automatically found the "sub button1.click()" in the code editor so you could just straight away start editing what action would happen when doing this.
The Visual Editor of PB I found good to design stuff, but stopped using it and started doing it all by hand, just because it doesnt make me faster when trying to find the actions/events linked to the gadgets.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac - Coming soon!

Post by Polo »

Yes, this is one of the way of handling the languages but as there is many it's always easier to add it afterwards I guess.

I see what you mean with the event handler now. I'll se how I can add that without getting it messy :)
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Form Designer for Mac - Coming soon!

Post by jesperbrannmark »

Oh. One more thing to wishlist:
* When making a button, or optiongadget, or checkboxgadget - be able to in the caption of that have like "E&xit" (which will make ALT-X or CTRL-X or CMD-X via AddKeyboardShortcut() command a keyboardshortcut for that gadget).
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac - Coming soon!

Post by Polo »

jesperbrannmark wrote:Oh. One more thing to wishlist:
* When making a button, or optiongadget, or checkboxgadget - be able to in the caption of that have like "E&xit" (which will make ALT-X or CTRL-X or CMD-X via AddKeyboardShortcut() command a keyboardshortcut for that gadget).
Any PB code example on how this would work out? :)

For multi language I think the easiest I could do is to add an option so that the caption is a variable instead of a string. You would put whatever in the caption ie language("my caption") and you handle the language before hand in your code :)
Haven't done it but it sounds like the best solution!

I need to look at the event handling but it seems a lot of work for a project like this, I'll see once it runs on Cocoa :)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Form Designer for Mac - Coming soon!

Post by wilbert »

On OS X multi language is usually done by putting different .strings files into the application bundle.
There's a special function for NSBundle named localizedStringForKey:value:table: to handle localization.
It's a key -> value approach like

"gold" = "goud"
"silver" = "zilver"

The first one is the key, the second one the value. By creating a different file for each language you can support multiple languages.
The thing that comes closest when using PureBasic code only is the Map .

Great work by the way !!! :D
A form designer for Mac 8)
Post Reply