LAUNCHER_PANEL::LAUNCHER_PANEL( wxWindow* parent ) : wxPanel( parent, wxID_ANY ) { m_bitmapButtons_maxHeigth = 0; m_buttonSeparation = 10; // control of command buttons position m_buttonsListPosition.x = m_buttonSeparation; m_buttonsListPosition.y = m_buttonSeparation; m_buttonLastPosition = m_buttonsListPosition; // Add bitmap buttons to launch KiCad utilities: CreateCommandToolbar(); }
WinEDA_MainFrame::WinEDA_MainFrame(WinEDA_App * eda_app, wxWindow *parent, const wxString & title, const wxPoint& pos, const wxSize& size): WinEDA_BasicFrame(parent, KICAD_MAIN_FRAME, eda_app, title, pos, size ) { wxString msg; wxSize clientsize; m_FrameName = wxT("KicadFrame"); m_VToolBar = NULL; m_LeftWin = NULL; m_BottomWin = NULL; m_CommandWin = NULL; m_LeftWin_Width = 200; m_CommandWin_Height = 82; GetSettings(); if( m_Parent->m_EDA_Config ) { m_Parent->m_EDA_Config->Read(wxT("LeftWinWidth"), &m_LeftWin_Width); m_Parent->m_EDA_Config->Read(wxT("CommandWinWidth"), &m_CommandWin_Height); } SetSize(m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y); // ajuste la ligne de status int dims[3] = { -1, -1, 100}; CreateStatusBar(3); SetStatusWidths(3,dims); // Give an icon SetIcon(wxICON(kicad_icon)); clientsize = GetClientSize(); // Left window: is the box which display tree project m_LeftWin = new WinEDA_PrjFrame(this, wxDefaultPosition, wxDefaultSize); m_LeftWin->SetDefaultSize(wxSize(m_LeftWin_Width, clientsize.y)); m_LeftWin->SetOrientation(wxLAYOUT_VERTICAL); m_LeftWin->SetAlignment(wxLAYOUT_LEFT); m_LeftWin->SetSashVisible(wxSASH_RIGHT, TRUE); m_LeftWin->SetExtraBorderSize(2); // Bottom Window: box to display messages m_BottomWin = new wxSashLayoutWindow(this, ID_BOTTOM_FRAME, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxSW_3D); m_BottomWin->SetDefaultSize(wxSize(clientsize.x, 150)); m_BottomWin->SetOrientation(wxLAYOUT_HORIZONTAL); m_BottomWin->SetAlignment(wxLAYOUT_BOTTOM); m_BottomWin->SetSashVisible(wxSASH_TOP, TRUE); m_BottomWin->SetSashVisible(wxSASH_LEFT, TRUE); m_BottomWin->SetExtraBorderSize(2); m_DialogWin = new wxTextCtrl(m_BottomWin, ID_MAIN_DIALOG, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE| wxNO_BORDER| wxTE_READONLY); m_DialogWin->SetFont(* g_StdFont); // m_CommandWin is the box with buttons which launch eechema, pcbnew ... m_CommandWin = new WinEDA_CommandFrame(this, ID_MAIN_COMMAND, wxPoint(m_LeftWin_Width, 0), wxSize(clientsize.x, m_CommandWin_Height), wxNO_BORDER|wxSW_3D); m_CommandWin->SetDefaultSize(wxSize(clientsize.x, 100)); m_CommandWin->SetOrientation(wxLAYOUT_HORIZONTAL); m_CommandWin->SetAlignment(wxLAYOUT_TOP); m_CommandWin->SetSashVisible(wxSASH_BOTTOM, TRUE); m_CommandWin->SetSashVisible(wxSASH_LEFT, TRUE); m_CommandWin->SetExtraBorderSize(2); m_CommandWin->SetFont(* g_StdFont); CreateCommandToolbar(); wxString line; msg = wxGetCwd(); line.Printf( _("Ready\nWorking dir: %s\n"), msg.GetData()); PrintMsg(line); }