X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d96cdd4a885886d1c76c6f4cb1a7eefba34b3d10..254a21292b0ccf234ed1dbc6acd37708672ffcc0:/utils/configtool/src/mainframe.cpp diff --git a/utils/configtool/src/mainframe.cpp b/utils/configtool/src/mainframe.cpp index d214233eb0..838e331775 100644 --- a/utils/configtool/src/mainframe.cpp +++ b/utils/configtool/src/mainframe.cpp @@ -13,19 +13,24 @@ #pragma implementation "mainframe.h" #endif -#include "wx/wx.h" +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif +#ifndef WX_PRECOMP + +#include "wx/splitter.h" + +#endif + +#include "wx/cshelp.h" #include "wx/html/htmlwin.h" #include "wx/notebook.h" -#include "wx/splitter.h" -#include "wx/clipbrd.h" #include "wx/dataobj.h" -#include "wx/cshelp.h" - +#include "wx/clipbrd.h" #include "wxconfigtool.h" #include "mainframe.h" #include "appsettings.h" @@ -187,11 +192,11 @@ void ctMainFrame::OnCloseWindow(wxCloseEvent& event) wxGetApp().GetSettings().m_frameStatus = ctSHOW_STATUS_MINIMIZED ; else wxGetApp().GetSettings().m_frameStatus = ctSHOW_STATUS_NORMAL ; - + // Must delete this now since the DLL loading library will be // uninitialised by the time the app object is deleted wxGetApp().ClearHelpControllers(); - + if (!IsMaximized() && !IsIconized()) { wxGetApp().GetSettings().m_frameSize = GetRect(); @@ -248,22 +253,22 @@ void ctMainFrame::InitToolBar(wxToolBar* toolBar) toolBarBitmaps[12] = wxBitmap(help_xpm); toolBarBitmaps[13] = wxBitmap(helpcs_xpm); - toolBar->AddTool(wxID_NEW, toolBarBitmaps[0], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("New project")); - toolBar->AddTool(wxID_OPEN, toolBarBitmaps[1], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Open project")); - toolBar->AddTool(wxID_SAVE, toolBarBitmaps[2], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Save project")); + toolBar->AddTool(wxID_NEW, toolBarBitmaps[0], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("New project")); + toolBar->AddTool(wxID_OPEN, toolBarBitmaps[1], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Open project")); + toolBar->AddTool(wxID_SAVE, toolBarBitmaps[2], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Save project")); toolBar->AddSeparator(); - toolBar->AddTool(wxID_CUT, toolBarBitmaps[4], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Cut")); - toolBar->AddTool(wxID_COPY, toolBarBitmaps[3], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Copy")); - toolBar->AddTool(wxID_PASTE, toolBarBitmaps[5], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Paste")); + toolBar->AddTool(wxID_CUT, toolBarBitmaps[4], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Cut")); + toolBar->AddTool(wxID_COPY, toolBarBitmaps[3], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Copy")); + toolBar->AddTool(wxID_PASTE, toolBarBitmaps[5], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Paste")); toolBar->AddSeparator(); - toolBar->AddTool(wxID_UNDO, toolBarBitmaps[10], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Undo")); - toolBar->AddTool(wxID_REDO, toolBarBitmaps[11], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Redo")); + toolBar->AddTool(wxID_UNDO, toolBarBitmaps[10], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Undo")); + toolBar->AddTool(wxID_REDO, toolBarBitmaps[11], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Redo")); toolBar->AddSeparator(); - toolBar->AddTool(ctID_GO, toolBarBitmaps[6], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Save setup.h or configurewx.sh")); + toolBar->AddTool(ctID_GO, toolBarBitmaps[6], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Save setup.h or configurewx.sh")); toolBar->AddSeparator(); - toolBar->AddTool(ctID_ITEM_HELP, toolBarBitmaps[12], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Show help for this option")); - toolBar->AddTool(wxID_HELP_CONTEXT, toolBarBitmaps[13], wxNullBitmap, false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL, wxT("Show help on the clicked item")); + toolBar->AddTool(ctID_ITEM_HELP, toolBarBitmaps[12], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Show help for this option")); + toolBar->AddTool(wxID_HELP_CONTEXT, toolBarBitmaps[13], wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL, wxT("Show help on the clicked item")); // after adding the buttons to the toolbar, must call Realize() to reflect // the changes @@ -274,9 +279,9 @@ wxMenuBar* ctMainFrame::CreateMenuBar() { // Make a menubar wxMenu *fileMenu = new wxMenu; - + wxGetApp().GetFileHistory().UseMenu(fileMenu); - + fileMenu->Append(wxID_NEW, wxT("&New...\tCtrl+N"), wxT("Create a new settings document")); fileMenu->Append(wxID_OPEN, wxT("&Open...\tCtrl+O"), wxT("Open a settings document")); fileMenu->Append(wxID_CLOSE, wxT("&Close\tCtrl+W"), wxT("Close the current settings document")); @@ -292,7 +297,7 @@ wxMenuBar* ctMainFrame::CreateMenuBar() fileMenu->Append(wxID_EXIT, wxT("E&xit\tAlt+F4"), wxT("Exit the application")); wxGetApp().GetDocManager()->FileHistoryUseMenu(fileMenu); - + wxMenu *editMenu = new wxMenu; editMenu->Append(wxID_UNDO, _("&Undo\tCtrl+Z")); @@ -344,9 +349,9 @@ wxMenuBar* ctMainFrame::CreateMenuBar() helpMenu->Append(wxID_HELP_CONTEXT, wxT("&What's this?"), wxT("Show help on the clicked item")); helpMenu->AppendSeparator(); helpMenu->Append(wxID_ABOUT, wxT("&About..."), wxT("Show details about this application")); - + wxMenuBar *menuBar = new wxMenuBar; - + menuBar->Append(fileMenu, wxT("&File")); menuBar->Append(editMenu, wxT("&Edit")); menuBar->Append(viewMenu, wxT("&View")); @@ -356,7 +361,7 @@ wxMenuBar* ctMainFrame::CreateMenuBar() wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("wxWidgets")); config.SetPath(wxT("FileHistory/")); wxGetApp().GetDocManager()->FileHistoryLoad(config); - } + } return menuBar; } @@ -433,10 +438,6 @@ ctOutputWindow::ctOutputWindow(wxWindow* parent, wxWindowID id, CreateWindows(); } -ctOutputWindow::~ctOutputWindow() -{ -} - /// Initialise the windows. void ctOutputWindow::CreateWindows() { @@ -487,13 +488,13 @@ void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& WXUNUSED(event)) wxMessageBox(_("Sorry, could not open the clipboard."), _("Clipboard problem"), wxICON_EXCLAMATION|wxOK); return; } - + wxString value(m_codeCtrl->GetValue()); #ifdef __WXMSW__ value.Replace(_T("\n"), _T("\r\n")); #endif wxTextDataObject *data = new wxTextDataObject( value ); - + if (!wxTheClipboard->SetData( data )) { wxTheClipboard->Close();