KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ) : EDA_BASE_FRAME( parent, KICAD_MAIN_FRAME_T, title, pos, size, KICAD_DEFAULT_DRAWFRAME_STYLE, KICAD_MANAGER_FRAME_NAME ), KIWAY_HOLDER( &::Kiway ) { m_active_project = false; m_leftWinWidth = 60; m_manager_Hotkeys_Descr = NULL; // Create the status line (bottom of the frame) static const int dims[3] = { -1, -1, 100 }; CreateStatusBar( 3 ); SetStatusWidths( 3, dims ); // Give an icon wxIcon icon; icon.CopyFromBitmap( KiBitmap( icon_kicad_xpm ) ); SetIcon( icon ); // Give the last size and pos to main window LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); // Left window: is the box which display tree project m_LeftWin = new TREE_PROJECT_FRAME( this ); // Right top Window: buttons to launch applications m_Launcher = new LAUNCHER_PANEL( this ); // Add the wxTextCtrl showing all messages from KiCad: m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxBORDER_NONE ); RecreateBaseHToolbar(); ReCreateMenuBar(); m_auimgr.SetManagedWindow( this ); m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) ); m_auimgr.AddPane( m_LeftWin, EDA_PANE().Palette().Name( "ProjectTree" ).Left().Layer(3) .CaptionVisible( false ).PaneBorder( false ) .MinSize( 150, -1 ).BestSize( m_leftWinWidth, -1 ) ); m_auimgr.AddPane( m_Launcher, EDA_PANE().HToolbar().Name( "Launcher" ).Top().Layer(1) .MinSize( m_Launcher->GetPanelWidth(), m_Launcher->GetPanelHeight() ) ); m_auimgr.AddPane( m_MessagesBox, EDA_PANE().Messages().Name( "MsgPanel" ).Center() ); m_auimgr.Update(); SetTitle( wxString( "KiCad " ) + GetBuildVersion() ); }
KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ) : EDA_BASE_FRAME( parent, KICAD_MAIN_FRAME_T, title, pos, size, KICAD_DEFAULT_DRAWFRAME_STYLE, wxT( "KicadFrame" ) ) { m_leftWinWidth = 60; // Create the status line (bottom of the frame static const int dims[3] = { -1, -1, 100 }; CreateStatusBar( 3 ); SetStatusWidths( 3, dims ); // Give an icon wxIcon icon; icon.CopyFromBitmap( KiBitmap( icon_kicad_xpm ) ); SetIcon( icon ); // Give the last sise and pos to main window LoadSettings( config() ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); // Left window: is the box which display tree project m_LeftWin = new TREE_PROJECT_FRAME( this ); // Right top Window: buttons to launch applications m_Launcher = new LAUNCHER_PANEL( this ); // Add the wxTextCtrl showing all messages from KiCad: m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_READONLY ); RecreateBaseHToolbar(); ReCreateMenuBar(); m_auimgr.SetManagedWindow( this ); EDA_PANEINFO horiztb; horiztb.HorizontalToolbarPane(); EDA_PANEINFO info; info.InfoToolbarPane(); m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiztb ).Name( wxT( "m_mainToolBar" ) ).Top() ); m_auimgr.AddPane( m_LeftWin, wxAuiPaneInfo(info).Name( wxT( "m_LeftWin" ) ).Left(). BestSize( m_leftWinWidth, -1 ). Layer( 1 ) ); m_auimgr.AddPane( m_Launcher, wxTOP ); m_auimgr.GetPane( m_Launcher).CaptionVisible( false ).Row(1) .BestSize( -1, m_Launcher->GetPanelHeight() ).PaneBorder( false ).Resizable( false ); m_auimgr.AddPane( m_MessagesBox, wxAuiPaneInfo().Name( wxT( "m_MessagesBox" ) ).CentrePane().Layer( 2 ) ); m_auimgr.GetPane( m_LeftWin ).MinSize( wxSize( 80, -1) ); m_auimgr.GetPane( m_LeftWin ).BestSize(wxSize(m_leftWinWidth, -1) ); m_auimgr.Update(); }