Config::Config(wxWindow* parent) { #if defined __WXMAC__ #if wxCHECK_VERSION(2,9,1) SetSheetStyle(wxPROPSHEET_BUTTONTOOLBOOK | wxPROPSHEET_SHRINKTOFIT); #else SetSheetStyle(wxPROPSHEET_LISTBOOK | wxPROPSHEET_SHRINKTOFIT); #endif #else SetSheetStyle(wxPROPSHEET_LISTBOOK); #endif SetSheetInnerBorder(3); SetSheetOuterBorder(3); #if defined __WXMAC__ #define IMAGE(img) wxImage(wxT("wxMaxima.app/Contents/Resources/config/") wxT(img)) #elif defined __WXMSW__ #define IMAGE(img) wxImage(wxT("art/config/") wxT(img)) #else wxString prefix = wxT(PREFIX); #define IMAGE(img) wxImage(prefix + wxT("/share/wxMaxima/") + wxT(img)) #endif wxSize imageSize(32, 32); m_imageList = new wxImageList(32, 32); m_imageList->Add(IMAGE("options.png")); m_imageList->Add(IMAGE("maxima.png")); m_imageList->Add(IMAGE("styles.png")); Create(parent, wxID_ANY, _("wxMaxima configuration"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE); m_notebook = GetBookCtrl(); m_notebook->SetImageList(m_imageList); m_notebook->AddPage(CreateOptionsPanel(), _("Options"), true, 0); m_notebook->AddPage(CreateMaximaPanel(), _("Maxima"), false, 1); m_notebook->AddPage(CreateStylePanel(), _("Style"), false, 2); #ifndef __WXMAC__ CreateButtons(wxOK | wxCANCEL); #endif LayoutDialog(); SetProperties(); UpdateExample(); }
void CompareDlg::CreateControls() { wxBoxSizer* dlgSizer = new wxBoxSizer(wxVERTICAL); dlgSizer->AddSpacer(TopMargin); //add a margin at the top m_dbSelectionPane = CreateDBSelectionPanel(dlgSizer); dlgSizer->AddSpacer(RowSeparation); m_optionsPane = CreateOptionsPanel(dlgSizer); dlgSizer->AddSpacer(RowSeparation); CreateDataPanel(dlgSizer, _("Conflicting items"), m_conflicts, true)->Hide(); m_conflicts->sizerBelow = dlgSizer->AddSpacer(RowSeparation); m_conflicts->sizerBelow->Show(false); CreateDataPanel(dlgSizer, wxString() << _("Only in current database: ") << m_currentCore->GetCurFile(), m_current)->Hide(); m_current->sizerBelow = dlgSizer->AddSpacer(RowSeparation); m_current->sizerBelow->Show(false); CreateDataPanel(dlgSizer, wxString() << _("Only in comparison database: ") << m_otherCore->GetCurFile(), m_comparison)->Hide(); m_comparison->sizerBelow = dlgSizer->AddSpacer(RowSeparation); m_comparison->sizerBelow->Show(false); CreateDataPanel(dlgSizer, _("Identical items"), m_identical)->Hide(); dlgSizer->AddSpacer(RowSeparation); m_dbSelectionPane->Expand(); dlgSizer->Add(new wxStaticLine(this), wxSizerFlags().Center().Expand().Border(wxLEFT|wxRIGHT, SideMargin).Proportion(0)); dlgSizer->AddSpacer(RowSeparation); wxStdDialogButtonSizer* buttons = new wxStdDialogButtonSizer; buttons->Add(new wxButton(this, wxID_CANCEL)); wxButton* compareButton = new wxButton(this, ID_BTN_COMPARE, _("&Compare")); compareButton->SetDefault(); buttons->SetAffirmativeButton(compareButton); buttons->Realize(); dlgSizer->Add(buttons, wxSizerFlags().Center().Expand().Border(wxLEFT|wxRIGHT, SideMargin).Proportion(0)); dlgSizer->AddSpacer(BottomMargin); SetSizerAndFit(dlgSizer); }