ANN: wxGuiBuilder is released!

Do you like to promote your wxWidgets based application or component!? Post it here and let's see what the critics have to say. Also, if you found that ONE wx component the world needs to know about, put it here for future reference.
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

ABX wrote:Sadly this is known issue and I'm trying to understand it too since months. I feel this is related to tabbing not working between panels but I cannot find it. IIRC current workaround is to force focus movement to first control after page change or something like that.
Yes, this does the trick. I can navigate the controls on the page now. Still, I can't change the pages except when adding a menu for that.

BTW: I read that radiobuttons are not supported. Maybe this means "not natively" supported. wxWidgets handles them quite correct :)

So the choicebook problem remains... The only hint I found was a pretty crappy example that implements tabs as "kindofa" wizard. Not suitable in any way... Apart from having menu entries for this I think there is no other solution. And this rises yet more problems as I can't add these entries and give them functionality from within gui builder, as I can't control wether a user creates a menu after building the GUI. I'll test some more :)
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

ABX wrote:(ps. the pocketpc bottom/flat was discussed in wx-dev but not commited yet)
Done: http://lists.wxwidgets.org/cgi-bin/ezml ... :mss:43070

BTW. the thread about known tabbing problem which on WinCE could be related to broken wxChoicebook behaviour under WinCE : http://lists.wxwidgets.org/cgi-bin/ezml ... :sss:74635

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Sounds cool :-)
I'm home being ill so I will be off and on a couple ot times here. I already thought about how to implement the wxStdDialogButtonSizer which in my opinion can be done like

[OK,CANCEL] or [YES,NO]

It looks like an "auto button" this way, but under the hood a sizer will be created, with the buttons that are given. I am not really sure how i can set the affirmative button. I think that will be the first button added to the list which makes the most sense. The cancel button will be the last I am not sure if that is an ok way to do it.

It would indeed be cool if wxGuiBuilder can solve a lot of embedded / native problems like how things are created and what is created for what platform like the wxBookCtrl v.c. wxNotebook issue. If I can add menu support as well, it might also be used to set up the whole interface without much change between platform compiles ..

Thanks for helping upCASE and ABX!
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Ok, I'm up to something ;)

I just created a fully controlable GUI for Smartphone using a wxBookCtrl...
It's not a realy nice solution, but at least it works.
wxGUIBuilder will create a menu on smartphones for special controls. If it finds a tabbed control, it creates two menu entries in a submenu (next page/previouse page). The tabbed control is a wxBookCtrl derived class that handles command events for the menu entries. When finishing the gui building, the menu gets assigned to the top level windows right menu button.

For buttons I do something similar. The buttons are not shown, but mapped to the menu. The user can still assign own wxGbButton stuff to the buttons, but control is done via the menu.

The only thing I haven't done yet is only showing the button on the current page in the menu when using a tabbed control. Shouldn't be hard to do, but I won't find the time for that today.

Again, it's not a perfect solution, but it would be good for making the GUI look better on a smartphone. Other platforms are not "harmed" by these hacks.

I'll see if I can mail you the changes I made tomorrow. I'm pretty sure you won't like them as they are, but maybe you can turn them into something "more standard compliant" :)
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Thanks upCASE!

I am also looking into another nifty command line tool called GuiBuilderGen. It will take a GUI text markup, and scans your C++ source for certain blocks it needs to dump generated code in.

This has a few benefits:

- Generate ID's that are automatically created by GUIbuilder so they are accessible by the user
- Generate translation strings can be dumped to a file (for po-edit)
- Generate the GuiBuilder char array automarically after alteration of the file

And this will be my favourite, in the future it should theoretically create events for you including handlers. I am thinking along the lines of:

Code: Select all

H{
      ['OK']:but_ok
  }

events:
  but_ok = EVT_BUTTON(OnButtonClick)
All that needs to be done in the code for example is:

Code: Select all

BEGIN_EVENT_TABLE( ParserFm, wxFrame )
  EVT_MENU( ... )
  //@@begin gb_static_events(ParserFm)
  EVT_BUTTON(ID_BUT_OK, ParserFm::OnButtonClick)
  //@@end gb_static_events

END_EVENT_TABLE()
And somewhere in the code the following skeleton is generated:

Code: Select all

//@@event id=but_ok EVT_BUTTON OnButtonClick
void ParserFm::OnButtonClick(wxCommandEvent &event)
{
    wxUnusedVar(event);
 
    // TODO: Add event code
}
This way every new added event to the event section in the grammar will result in a piece of generated code.

This generator tool is ofcourse still in my head, but it will be a nice aid for the users. Both the flexibility of using it in C++, but it will also help generating some code if needed. If the class becomes popular enough I might think about adding it ;-)

Anyway, thanks again for your help! It's much appreciated.
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Ok, changes complete :)
Jorg: I'll mail you the updated sources and new screenshots in a minute. I hope you can make something out of this. Hopefully the changes are usefull. Again, they only apply to Smartphone devices, execpt the wxBookCtrl fix ABX mentioned, which also affects PocketPC platforms.
Although Smartphones are limited I somewhat started to like them while makeing these changes :)
I guess the Smartphone port might be one of the least used, but maybe they're usefull to those who use it.

The mail will contain more screens, but here are some previews of the new tabbed control and button handling on Smartphones. Let's see what Jorg says and then maybe discuss them if there is need.

Image Image Image Image
I guess you get the impression. Tab navigation is done via a special menu, buttons are not shown but mapped to menu entries.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Nice!!!!

Since i do not have too much experience with embedded platforms I cannot really judge what is the best solution is. I assume the < and > buttons next to the 'options 1' text should be the next and previous buttons for the wxNotebook?

The testbutton menu in this case, are these the buttons that are not shown or something? I am really curious how the GuiBuilder markup looks like...

In any case what feels the best is ok for me.

Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Jorg wrote:Since i do not have too much experience with embedded platforms I cannot really judge what is the best solution is.
Me neither :)
I guess from a designers point of view, or looking at the guidelines, this solution might be flawed. But still, it is way better in handling the GUI that way. With no pointing device, navigating a Smartphone is a real pain...
Jorg wrote:I assume the < and > buttons next to the 'options 1' text should be the next and previous buttons for the wxNotebook?
Correct. I didn't do that, that's what wxChoiceBook looks like :)
Jorg wrote:The testbutton menu in this case, are these the buttons that are not shown or something? I am really curious how the GuiBuilder markup looks like...
Correct. Read my email, I explained it more thoroughly there.
Anyway, the markup is the notebook example with three buttons added to the first page.

Code: Select all

wxGuiBuilder gb1(wxT("H{ %w<                                                          	")
			wxT("       T{                                                       		")
			wxT("           /* tabsheet 1 */                                     		")
			wxT("           #'Options 1'=V{                                     		 ")
			wxT("                           ( ) 'Select this one':test          		 ")
			wxT("                           ( ) 'Or select this one'             		")
			wxT("                           (.) 'This one is default'           		 ")
			wxT("                           ['Testbutton']:btn                   		")
			wxT("                           ['Testbutton1']:btn2                  	 ")
			wxT("                           ['Testbutton2']:btn3                  	 ")
			wxT("                         }                                      		")
			wxT("           /* tabsheet 2 */                                     		")
			wxT("           #'Page two'=V{                                       		")
			wxT("                           [ ] 'Option 1'                      		 ")
			wxT("                           [X] 'Option 2'                       		")
			wxT("                           [ ] 'This one is default'            		")
			wxT("                        }                                       		")
			wxT("           /* nameless tabsheet, auto generated caption */      ")
			wxT("           #=V{                                                		 ")
			wxT("                           V{ 'Name'.b                         		 ")
			wxT("                              [----------].b+ }+               		 ")
			wxT("                           V{ 'Age'.b                           		")
			wxT("                              [-----------].b+ }+              		 ")
			wxT("              }                                                		 	")
			wxT("         }+,1:nbook                                            		 ")
			wxT("     }                                                          		"));
Oh, yes, that reminds me: eVC doesn't handle multiline strings well.
For example

Code: Select all

wxT("Something..."
"something else")
wouldn't compile. I had to enclose every single line.

Code: Select all

wxT("Something...")
wxT("something else")
Would be nice if you could include that in the "code" generation.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

Jorg wrote:I assume the < and > buttons next to the 'options 1' text should be the next and previous buttons for the wxNotebook?
Close to it. It's equivalent of the drop down arrow in MSW wxChoice which shows that using left/right hardware button you will change selection (and the pages in this case) if wxChoice has focus. And pressing Action (aka Go) hardware button on this control opens new full screen window where you can jump to any selection using up/down hardware arrows. I believe you have some mobile phone and every mobile has such functionality regardless OS used.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

upCASE wrote:Although Smartphones are limited I somewhat started to like them while makeing these changes :)
I guess the Smartphone port might be one of the least used, but maybe they're usefull to those who use it.
Just for the reference - some smartphones in action with lots of real life screenshots:

http://www.geek.com/hwswrev/pda/Q/index.htm
http://www.mobinaute.com/mobinaute/arti ... 0527112211

Catalog: http://www.microsoft.com/windowsmobile/smartphone/

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

I got a Motorola MPx 220 (http://www.motorola.com/motoinfo/produc ... bjectId=53) here, in case anybody wanted to know.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Post Reply