unfortunately I have not the amount of time at present to do all things I want to do... this is mainly caused due to my longtime illness... and that's the reason for my longer absence here too..
I'd stopped this project since november 2006.. but will continue as soon as possible... I decided to release it the current state because it's maybe usefull for someone...
(the old version can be fond here ...
http://www.purebasic.fr/english/viewtop ... t=glade2pb
... just a reminder)
The new version is able to create PB4 compatible code which can be used on Linux, Windows and (I hope so) on MacOs (PB v4 released of course) without a change...
A new preview function is added so you can see how the generated code looks like with GTK Widgets or PB Gadgets
Some screenies:



Supported PB-Gadgets so far (PB-Gadget is in the first column):
Code: Select all
Window Window -> gtk_window_new_
ButtonGadget Button -> gtk_button_new_from_stock_, gtk_button_new_
ButtonGadget ToggleButton -> gtk_toggle_button_new_, gtk_toggle_button_new_with_mnemonic_, gtk_toggle_button_new_with_label_
ImageGadget Image -> gtk_image_new_from_stock_
TextGadget Label -> gtk_label_new_with_mnemonic_, gtk_label_new_
EditorGadget TextView -> gtk_text_view_new_
StringGadget Entry -> gtk_entry_new_
CheckBoxGadget Checkbutton -> gtk_check_button_new_with_mnemonic_, gtk_check_button_new_
OptionGadget RadioButton -> gtk_radio_button_new_with_mnemonic_, gtk_radio_button_new_
TreeGadget Treeview -> gtk_tree_view_new_
ComboBoxGadget Combobox -> gtk_combo_box_new_text_, gtk_combo_box_new_
ComboBoxGadget Comboboxentry ->gtk_combo_box_entry_new_text, gtk_combo_box_entry_new_
StatusBar Statusbar -> gtk_statusbar_new_
If you choose to generate the PB v4 compatible source, you cannot decide (yet) which of the files you want to generate... AND you MUST have useed a fixed Widget in Glade.... else you'll get an error message... This is essential for the code generation as else NO x and y coordinates are used by glade.. (yes, you can design a gtk based application without any x and y parms... great isn't it?) but PB do need them!
Simply have a look at the src folder in the Glade Project folder to locate the generated source... the prefix is pb_ for the V4-source code
The files declare.pb and callbacs.pb are identical for both versions of the source... the different files are main.pb and pb_main.pb , interface.pb and pb_interface.pb
A word to the event loop: I'd taken this from a source ... I guess it's generated by Berico's VD , but not sure...
At least here the link: http://home.arcor.de/x-linux/pure/g2pb
suggestions and comments are welcome
Edit 15.08.2007
updated to v 0.62
added - source can be load into the IDE by one click
some bug fixes
some missing constants added