This commit is contained in:
dickelbeck 2010-01-10 06:40:22 +00:00
parent 6c737bc146
commit 816c1596f3
1 changed files with 20 additions and 6 deletions

View File

@ -76,7 +76,7 @@ static const char * rightarrow_xpm[] = {
"X c #8080ff", "X c #8080ff",
"o c BLUE", "o c BLUE",
"O c gray56", "O c gray56",
" . .. ", " .X ",
" .XX ", " .XX ",
" .XXX ", " .XXX ",
" .XXXX ", " .XXXX ",
@ -317,6 +317,9 @@ public:
SelectLayerRow( 1 ); SelectLayerRow( 1 );
m_LayerScrolledWindow->FitInside();
m_LayerScrolledWindow->SetMinSize( m_LayerScrolledWindow->GetSize() );
Fit(); Fit();
SetMinSize( GetSize() ); SetMinSize( GetSize() );
@ -418,6 +421,9 @@ class MYFRAME : public wxFrame
MYFRAME* frame; MYFRAME* frame;
public: public:
// your constructor could take a BOARD argument. here I leave it
// out because this source module wants to know nothing of BOARDs
// to maximize re-use.
MYLAYERS( wxWindow* aParent, MYFRAME* aFrame ) : MYLAYERS( wxWindow* aParent, MYFRAME* aFrame ) :
LAYER_WIDGET( aParent ), LAYER_WIDGET( aParent ),
frame( aFrame ) frame( aFrame )
@ -438,14 +444,13 @@ class MYFRAME : public wxFrame
public: public:
MYFRAME( wxWindow * parent ) : wxFrame( parent, -1, _( "wxAUI Test" ), MYFRAME( wxWindow * parent ) :
wxDefaultPosition, wxSize( 800, 600 ), wxFrame( parent, -1, _( "wxAUI Test" ), wxDefaultPosition,
wxDEFAULT_FRAME_STYLE ) wxSize( 800, 600 ), wxDEFAULT_FRAME_STYLE )
{ {
// notify wxAUI which frame to use // notify wxAUI which frame to use
m_mgr.SetManagedWindow( this ); m_mgr.SetManagedWindow( this );
// create several text controls
wxPanel* layerWidget = new MYLAYERS( this, this ); wxPanel* layerWidget = new MYLAYERS( this, this );
wxTextCtrl* text2 = new wxTextCtrl( this, -1, _( "Pane 2 - sample text" ), wxTextCtrl* text2 = new wxTextCtrl( this, -1, _( "Pane 2 - sample text" ),
@ -457,7 +462,16 @@ public:
wxNO_BORDER | wxTE_MULTILINE ); wxNO_BORDER | wxTE_MULTILINE );
// add the panes to the manager // add the panes to the manager
m_mgr.AddPane( layerWidget, wxLEFT, wxT( "Layer Visibility" ) ); wxAuiPaneInfo li;
li.MinSize( ayerWidget->GetSize() ); // ignored on linux
li.BestSize( layerWidget->GetSize() );
li.Left();
li.MaximizeButton( false );
li.MinimizeButton( false );
li.CloseButton( false );
li.Caption( wxT( "Layers" ) );
m_mgr.AddPane( layerWidget, li );
m_mgr.AddPane( text2, wxBOTTOM, wxT( "Pane Number Two" ) ); m_mgr.AddPane( text2, wxBOTTOM, wxT( "Pane Number Two" ) );
m_mgr.AddPane( text3, wxCENTER ); m_mgr.AddPane( text3, wxCENTER );