1. wxEuhporia - AUI rocks!
Matt,
Just checked out the AUI demo for wxEuphoria and may I say it is super slick!
I was playing around trying to add a few extra "bells" and added a tool bar and
status bar. These work but the tool bar initially shows on the left side of the
window, not the top. Of course I can move it there but would like to know what I
did wrong.
Here's the expanded example:
include wxeud.e
include tbar_xpm.e
without warning
object void
constant
main = create( wxFrame, {0, -1, "Aui Demo"}),
tb = create( wxToolBar, {main, -1, 0, 0, 450, 45, wxTB_FLAT+wxTB_TEXT})
set_tool_bitmap_size( tb, 24, 24 )
constant
sb = create( wxStatusBar, {main, 1 }),
Bitmap1 = create( wxBitmap, {BM_XPM, copy_xpm}),
t1id = new_id(),
t1 = add_tool( tb, t1id, Bitmap1, Bitmap1, "Tool 1", "Tool 1", "Copy text to
the clipboard", wxITEM_NORMAL ),
text1 = create( wxTextCtrl, main ),
info1 = create( wxAuiPaneInfo, {} ),
text2 = create( wxTextCtrl, main ),
text3 = create( wxTextCtrl, main ),
aui_nb1 = create( wxAuiNotebook, {main, -1, -1,-1,100, 50} ),
aui_nb2 = create( wxAuiNotebook, main ),
aui_page1 = create( wxPanel, aui_nb1 ),
aui_page2 = create( wxPanel, aui_nb1 ),
aui_page3 = create( wxPanel, aui_nb2 ),
aui_page4 = create( wxPanel, aui_nb2 ),
aui_mgr = create( wxAuiManager, {})
procedure setup()
atom info, info_tb
show_toolbar( tb )
set_managed_window( aui_mgr, main )
info_tb = create( wxAuiPaneInfo, {})
aui_toolbar_pane(info_tb)
aui_top_dockable(info_tb, 1)
add_pane_with_info( aui_mgr, tb, info_tb)
aui_caption( info1, "Text 1" )
aui_pane_border( info1, 0 )
aui_maximize_button( info1, 1 )
add_pane_with_info( aui_mgr, text1, info1 )
add_pane_simple( aui_mgr, text2, wxTOP, "Text 2" )
add_pane_simple( aui_mgr, text3, wxBOTTOM, "Text 3" )
info = create( wxAuiPaneInfo, {} )
aui_maximize_button( info, 1 )
add_pane_with_info( aui_mgr, aui_nb1,info )
add_pane_simple( aui_mgr, aui_nb2, 0, "NB 2" )
void = aui_notebook_add_page( aui_nb1, aui_page1, "Page 1", 1, 0 )
void = aui_notebook_add_page( aui_nb1, aui_page2, "Page 2", 0, 0 )
void = aui_notebook_add_page( aui_nb2, aui_page3, "Page 3", 1, 0 )
void = aui_notebook_add_page( aui_nb2, aui_page4, "Page 4", 1, 0 )
aui_min_size( get_pane( aui_mgr, aui_nb2 ), 150, 75 )
aui_min_size( get_pane( aui_mgr, text3 ), 90, 20 )
aui_maximize_button( get_pane( aui_mgr, aui_nb1 ), 1 )
aui_maximize_button( get_pane( aui_mgr, text3 ), 0 )
aui_caption( get_pane( aui_mgr, aui_nb1 ), "Notebook 1" )
aui_center( get_pane( aui_mgr, aui_nb1 ) )
update_aui( aui_mgr )
end procedure
setup()
wxMain( main )
Jonas Temple
http://www.innovativesys.net
2. Re: wxEuhporia - AUI rocks!
- Posted by Matt Lewis <matthewwalkerlewis at gmai??com>
Dec 12, 2007
-
Last edited Dec 13, 2007
Jonas Temple wrote:
>
> Matt,
>
> Just checked out the AUI demo for wxEuphoria and may I say it is super slick!
Yeah, it's pretty cool. I've played around with it a little, and it has
a lot of potential.
> I was playing around trying to add a few extra "bells" and added a tool bar
> and status bar. These work but the tool bar initially shows on the left side
> of the window, not the top. Of course I can move it there but would like to
> know what I did wrong.
You used
aui_top_dockable(info_tb, 1)
which allows the toolbar to be docked up top, but never told it to
go up top. You do that by using:
aui_top(info_tb)
It kinda shows the gaping holes in my documentation. I'm now able to add
wrappers really quickly, but the documentation is still lagging. Since
they're mostly thin wrappers for wxWidgets functions, I recommend either
using their on-line docs, or downloading the docs locally (you can get
html or chm, which is convenient):
http://www.wxwidgets.org/manuals/stable/wx_contents.html
http://sourceforge.net/project/showfiles.php?group_id=9863&package_id=19629
Matt