X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/afc515904461bec3733682252de9eb1b01af1fe4..70fb935a6a52fd27b288f4885c55cddf038b89f1:/utils/configtool/src/mainframe.cpp diff --git a/utils/configtool/src/mainframe.cpp b/utils/configtool/src/mainframe.cpp index bfd09b31e7..8bf876bf69 100644 --- a/utils/configtool/src/mainframe.cpp +++ b/utils/configtool/src/mainframe.cpp @@ -23,6 +23,7 @@ #include "wx/notebook.h" #include "wx/splitter.h" #include "wx/clipbrd.h" +#include "wx/dataobj.h" #include "wx/cshelp.h" #include "wxconfigtool.h" @@ -33,6 +34,7 @@ #include "propeditor.h" #include "configtooldoc.h" #include "configtoolview.h" +#include "configbrowser.h" #include "bitmaps/wxconfigtool.xpm" @@ -96,24 +98,35 @@ ctMainFrame::ctMainFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id, m_editMenu = NULL; m_configurePage = NULL; m_setupPage = NULL; + m_configBrowserPage = NULL; m_mainNotebook = NULL; m_findDialog = NULL; m_treeSplitterWindow = new wxSplitterWindow(this, -1, wxDefaultPosition, wxSize(400, 300), - wxSP_3DSASH|wxSP_3DBORDER); + wxSP_3DSASH|wxSP_3DBORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); m_configTreeCtrl = new ctConfigTreeCtrl(m_treeSplitterWindow, -1, wxDefaultPosition, wxDefaultSize, - wxTR_HAS_BUTTONS|wxNO_BORDER); + wxTR_HAS_BUTTONS|wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); - m_mainNotebook = new wxNotebook(m_treeSplitterWindow, -1, wxDefaultPosition, wxSize(300, 300)); + m_mainNotebook = new wxNotebook(m_treeSplitterWindow, -1, wxDefaultPosition, wxSize(300, 300), + wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); m_propertyEditor = new ctPropertyEditor(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200), - wxNO_BORDER); + wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); m_setupPage = new ctOutputWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200), - wxNO_BORDER); + wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); m_configurePage = new ctOutputWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200), - wxNO_BORDER); + wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); + +#if 0 + m_configBrowserPage = new ctConfigurationBrowserWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200), + wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); +#endif + m_mainNotebook->AddPage(m_propertyEditor, _T("Properties")); +#if 0 + m_mainNotebook->AddPage(m_configBrowserPage, _T("Configuration Browser")); +#endif m_mainNotebook->AddPage(m_setupPage, _T("setup.h")); m_mainNotebook->AddPage(m_configurePage, _T("configure")); @@ -131,7 +144,7 @@ ctMainFrame::ctMainFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id, wxMenuBar* menuBar = CreateMenuBar(); SetMenuBar(menuBar); - CreateToolBar(wxNO_BORDER|wxTB_FLAT|wxTB_HORIZONTAL); + CreateToolBar(wxNO_BORDER|wxTB_FLAT|wxTB_HORIZONTAL|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN); InitToolBar(GetToolBar()); if (wxGetApp().GetSettings().m_showToolBar) @@ -185,7 +198,7 @@ void ctMainFrame::OnCloseWindow(wxCloseEvent& event) Destroy(); } -void ctMainFrame::OnAbout(wxCommandEvent& event) +void ctMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxString msg = wxGetApp().GetSettings().GetAppName() + wxT(" (c) Julian Smart"); wxString caption = wxT("About ") + wxGetApp().GetSettings().GetAppName(); @@ -202,12 +215,12 @@ void ctMainFrame::OnNew(wxCommandEvent& event) wxGetApp().GetDocManager()->OnFileNew(event); } -void ctMainFrame::OnExit(wxCommandEvent& event) +void ctMainFrame::OnExit(wxCommandEvent& WXUNUSED(event)) { Close(); } -void ctMainFrame::OnSettings(wxCommandEvent& event) +void ctMainFrame::OnSettings(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetSettings().ShowSettingsDialog(); } @@ -346,7 +359,7 @@ wxMenuBar* ctMainFrame::CreateMenuBar() } /// Handles the Show Toolbar menu event. -void ctMainFrame::OnShowToolbar(wxCommandEvent& event) +void ctMainFrame::OnShowToolbar(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetSettings().m_showToolBar = !wxGetApp().GetSettings().m_showToolBar; GetToolBar()->Show(wxGetApp().GetSettings().m_showToolBar); @@ -354,19 +367,19 @@ void ctMainFrame::OnShowToolbar(wxCommandEvent& event) } /// Handles the Help Contents menu event. -void ctMainFrame::OnHelp(wxCommandEvent& event) +void ctMainFrame::OnHelp(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetHelpController().DisplayContents(); } /// Handles context help -void ctMainFrame::OnContextHelp(wxCommandEvent& event) +void ctMainFrame::OnContextHelp(wxCommandEvent& WXUNUSED(event)) { wxContextHelp contextHelp; } /// Handles the Help Contents menu event for the reference manual. -void ctMainFrame::OnReferenceHelp(wxCommandEvent& event) +void ctMainFrame::OnReferenceHelp(wxCommandEvent& WXUNUSED(event)) { wxGetApp().GetReferenceHelpController().DisplayContents(); } @@ -454,7 +467,7 @@ void ctOutputWindow::CreateWindows() } /// Copies the text to the clipboard. -void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& event) +void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& WXUNUSED(event)) { // Try to copy the selection first long int selFrom, selTo; @@ -504,7 +517,7 @@ void ctOutputWindow::SetFilename(const wxString& filename) } /// Saves the file. -void ctOutputWindow::OnSaveText(wxCommandEvent& event) +void ctOutputWindow::OnSaveText(wxCommandEvent& WXUNUSED(event)) { if (m_codeCtrl->IsModified()) { @@ -522,7 +535,7 @@ void ctOutputWindow::OnUpdateSaveText(wxUpdateUIEvent& event) event.Enable(m_doc && m_codeCtrl && m_codeCtrl->IsModified()); } -void ctOutputWindow::OnRegenerate(wxCommandEvent& event) +void ctOutputWindow::OnRegenerate(wxCommandEvent& WXUNUSED(event)) { if (m_doc) {