]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/mainframe.cpp
Fixed compile error (seen on OS/2).
[wxWidgets.git] / utils / configtool / src / mainframe.cpp
index 591e2a0026526abc2d78752960233e7282ee9b14..917ad0b8b4fc42c171e7e581ca91625ffde3cabf 100644 (file)
@@ -33,6 +33,7 @@
 #include "propeditor.h"
 #include "configtooldoc.h"
 #include "configtoolview.h"
+#include "configbrowser.h"
 
 #include "bitmaps/wxconfigtool.xpm"
 
@@ -46,6 +47,7 @@
 #include "bitmaps/undo.xpm"
 #include "bitmaps/redo.xpm"
 #include "bitmaps/helpcs.xpm"
+#include "bitmaps/go.xpm"
 
 IMPLEMENT_CLASS(ctMainFrame, wxDocParentFrame)
 
@@ -82,6 +84,8 @@ BEGIN_EVENT_TABLE(ctMainFrame, wxDocParentFrame)
     EVT_UPDATE_UI(ctID_SAVE_CONFIGURE_COMMAND, ctMainFrame::OnUpdateDisable)
 
     EVT_UPDATE_UI(wxID_FIND, ctMainFrame::OnUpdateDisable)
+
+    EVT_UPDATE_UI(ctID_GO, ctMainFrame::OnUpdateDisable)
 END_EVENT_TABLE()
 
 // Define my frame constructor
@@ -93,24 +97,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"));
 
@@ -128,7 +143,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)
@@ -222,7 +237,7 @@ void ctMainFrame::InitToolBar(wxToolBar* toolBar)
     toolBarBitmaps[3] = wxBitmap(copy_xpm);
     toolBarBitmaps[4] = wxBitmap(cut_xpm);
     toolBarBitmaps[5] = wxBitmap(paste_xpm);
-//    toolBarBitmaps[6] = wxBitmap(print_xpm);
+    toolBarBitmaps[6] = wxBitmap(go_xpm);
     toolBarBitmaps[7] = wxBitmap(help_xpm);
     toolBarBitmaps[10] = wxBitmap(undo_xpm);
     toolBarBitmaps[11] = wxBitmap(redo_xpm);
@@ -241,6 +256,8 @@ void ctMainFrame::InitToolBar(wxToolBar* toolBar)
     toolBar->AddTool(wxID_UNDO, toolBarBitmaps[10], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Undo"));
     toolBar->AddTool(wxID_REDO, toolBarBitmaps[11], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Redo"));
     toolBar->AddSeparator();
+    toolBar->AddTool(ctID_GO, toolBarBitmaps[6], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Save setup.h or configurewx.sh"));
+    toolBar->AddSeparator();
     toolBar->AddTool(ctID_ITEM_HELP, toolBarBitmaps[12], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Show help for this option"));
     toolBar->AddTool(wxID_HELP_CONTEXT, toolBarBitmaps[13], wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, wxT("Show help on the clicked item"));
 
@@ -266,6 +283,8 @@ wxMenuBar* ctMainFrame::CreateMenuBar()
     fileMenu->Append(ctID_SAVE_SETUP_FILE, wxT("Save Setup.&h...\tCtrl+H"), wxT("Save the setup.h file"));
     fileMenu->Append(ctID_SAVE_CONFIGURE_COMMAND, wxT("Save Configure Script...\tCtrl+G"), wxT("Save the configure script file"));
     fileMenu->AppendSeparator();
+    fileMenu->Append(ctID_GO, wxT("&Go\tF5"), wxT("Quick-save the setup.h or configure.sh file"));
+    fileMenu->AppendSeparator();
     fileMenu->Append(wxID_EXIT, wxT("E&xit\tAlt+F4"), wxT("Exit the application"));
 
     wxGetApp().GetDocManager()->FileHistoryUseMenu(fileMenu);