29 DIALOG_SHIM( aParent, wxID_ANY, aTitle, wxDefaultPosition, wxDefaultSize,
30 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
46 auto mainSizer =
new wxBoxSizer( wxVERTICAL );
47 SetSizer( mainSizer );
50 mainSizer->Add(
m_infoBar, 0, wxEXPAND, 0 );
52 mainSizer->Add(
m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 );
55 auto sdbSizer =
new wxStdDialogButtonSizer();
56 auto sdbSizerOK =
new wxButton(
this, wxID_OK );
57 sdbSizer->AddButton( sdbSizerOK );
58 auto sdbSizerCancel =
new wxButton(
this, wxID_CANCEL );
59 sdbSizer->AddButton( sdbSizerCancel );
62 mainSizer->Add( sdbSizer, 0, wxALL|wxEXPAND, 5 );
103 std::vector<LIB_TABLE_NOTEBOOK_PANEL*> pages;
106 for(
int ii = 0; ii < (int)
m_notebook->GetPageCount(); ++ii )
109 bool modified =
false;
113 page->GetGrid()->CommitPendingChanges();
114 modified |= page->TableModified();
123 retVal &= page->SaveTable();
void onCloseWindow(wxCloseEvent &aEvent)
bool m_ProjectTableChanged
void onCancelButton(wxCommandEvent &aEvent)
void InstallPanel(wxPanel *aPanel, wxAuiNotebook *aNotebook)
DIALOG_EDIT_LIBRARY_TABLES(wxWindow *aParent, const wxString &aTitle)
bool TransferDataToWindow() override
bool TransferDataFromWindow() override
wxAuiNotebook * m_notebook
bool m_GlobalTableChanged
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
A modified version of the wxInfoBar class that allows us to:
bool HandleUnsavedChanges(wxWindow *aParent, const wxString &aMessage, const std::function< bool()> &aSaveFunction)
Display a dialog with Save, Cancel and Discard Changes buttons.
This file is part of the common library.