From 099587c4ee40f05e99666eeab92a0357cd932a38 Mon Sep 17 00:00:00 2001 From: Jorgen Bodde Date: Thu, 30 Jun 2005 15:52:04 -0400 Subject: [PATCH] deleted old wx-dialog --- Source/WXDialog/CMakeIcon.gif | Bin 3428 -> 0 bytes Source/WXDialog/CMakeIcon.icns | Bin 37714 -> 0 bytes Source/WXDialog/CMakeIcon.xpm | 45 - Source/WXDialog/CMakeLists.txt | 79 -- Source/WXDialog/ReadMe.Mac.txt | 71 -- Source/WXDialog/cmWXCacheProperty.cxx | 358 ------ Source/WXDialog/cmWXCacheProperty.h | 130 -- Source/WXDialog/cmWXCommandLineInfo.cxx | 137 --- Source/WXDialog/cmWXCommandLineInfo.h | 66 - Source/WXDialog/cmWXMainFrame.cxx | 1489 ----------------------- Source/WXDialog/cmWXMainFrame.h | 243 ---- Source/WXDialog/wxCMakeSetup.cxx | 175 --- Source/WXDialog/wxincludes.h | 77 -- 13 files changed, 2870 deletions(-) delete mode 100644 Source/WXDialog/CMakeIcon.gif delete mode 100644 Source/WXDialog/CMakeIcon.icns delete mode 100644 Source/WXDialog/CMakeIcon.xpm delete mode 100644 Source/WXDialog/CMakeLists.txt delete mode 100644 Source/WXDialog/ReadMe.Mac.txt delete mode 100644 Source/WXDialog/cmWXCacheProperty.cxx delete mode 100644 Source/WXDialog/cmWXCacheProperty.h delete mode 100644 Source/WXDialog/cmWXCommandLineInfo.cxx delete mode 100644 Source/WXDialog/cmWXCommandLineInfo.h delete mode 100644 Source/WXDialog/cmWXMainFrame.cxx delete mode 100644 Source/WXDialog/cmWXMainFrame.h delete mode 100644 Source/WXDialog/wxCMakeSetup.cxx delete mode 100644 Source/WXDialog/wxincludes.h diff --git a/Source/WXDialog/CMakeIcon.gif b/Source/WXDialog/CMakeIcon.gif deleted file mode 100644 index 2f31d94244d5ffba22cd835b8d87492dee023edc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3428 zcmV-q4V&^uNk%w1VSoUD0OtSzGBVBr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faW%L1F&d?XJ08=8AcV4*qvn`5RqE*0O+r}0Re2mVF2egHx3)9?QJ_i zg3k(*w`1)oExY^OF{uauu+4*c%WK{MYybk0kj5G&DB1!K)3n;TG}tB@COMyH^wdw0D3XZ1~#mh1fn>@Zr!N}WODO@`LKtNWyP%f zP5~BiIC7F-JmDn&H^4TgZvH5$5KliY7@-(ZC_^hC0W;)b17WT(e~~=qC1-*Sw*3Tq zc>s)Mq+t?PxbplSmlVlmD8EVOv!2UL=?b5D0@e@(C|ocJ6LT($8EIYv2e(`b?|Hvs zCbNtA9EUhySQ(GFg&}HSgAZ(T!F1b*ZbW((NLPByz?Sr{p9>2VR00XupurI2U}88= zglakrYy*rO=~NHf+QL@y8*s6M6u1Ei31C32Z+%rpOU2O$^EIlo4eT+W+QmDl1Obx0 z?6qQ0BBK6_w2jPeQ>Plq>`pQiy8Z10GZY!d|E@Nw+pX$JS9st+SO7i7+ZD!4r61InrCMb&S6|;O0fZ0^G3i z1fap@A5ge5iFMS8jLr;NkGsWPzICKy+`Qcu!yXRdbg26+s|-nzc>a$MsNAt zxqkP!2LR>^U`E-|@Bj*=UFXJv$b-h4_=&T8@%;sT-7~)Nrfa~>0yETQ0vp@I(>?T^ zKf32B?RtUlAm)GkfPqOb8E4PVLcO z9P!Bq`?azD-(M&oz}ra3z`+x~a1Y%Z_@d!F?6IBr;u~J>DR({bw;u0}cl_glT8L0U zKz-0_U-ph?eV>PTk_LHVunE|JcKEj(zb6zd#$4Oibz&xZU^joU7lE&LfqA!g5AXpV z(qrh?2}D+X7r1p4w|?%%e#&QoqX&7pcL=;k3W8821|bwew*jv=d??6u0a$_h=VAIfXIlBNQj9DiG&!5j!21(NQi}~hm7cle5ec)00YP}ilkVIrf4An G0RTIoO&>b| diff --git a/Source/WXDialog/CMakeIcon.icns b/Source/WXDialog/CMakeIcon.icns deleted file mode 100644 index a34f542efbcdc1792721d979d5e46837e5e4c186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal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C%-HOtOEHPPJcNJtcLu{@PO4Jzhnih68R-7 z;18Dm(k!rQ;xEkrt4MxH^8X>zUy1@&Q~n!H|Jn?!s`x;Djs5A>CVveER-gP;6|e^6 zZ#ey{F|Zc$U&RB~hWw%mSR?W`oc>}Atd;zWc);3`Ur+&SNdAV?UxCFBundleIconFile - MyAppIcon.icns - -This will tell it which icon to use. - -The ./Package_Root/usr/share/somedata and -./Package_Root/usr/bin/some_utility are some extra data that your -application is using. For example they can be a command line version -of the application and some common files. - -The ./Resources directory contains resources used during -installation. The names of files describe what should go in. They can -be rtf, txt... - -3. Create package using PackageMaker. - -Fire up PackageMaker from /Developmer/Applications. Fill all the -entries. Most of them are straight forward. Package root is -./Package_Root. Resources directory is ./Resources. If your -application needs to write to /usr (or to some other place beside -/Applications, then make sure to enable authentication. After you fill -all the entries, create package. This will create a directory on your -disk containing a whole lot of junk. Now you need to package this -directory. - -4. Create a disk image. - -Run Disk Copy from /Applications/Utilities. The easiest way of -creating disk image is to first create empty folder, copy all the -files in and then tell Disk Copy to create disk image from folder. So, -create folder MyApp, copy in MyApp.pkg and create package. - -Now you are done. This will create one file, which you can copy around. - -So, what is missing is how to make application icon show in the -finder. I can make it show when running application, but not when I am -looking at application. Even if I ask for preview. - -I guess somebody else will have to answer this. - -Good luck. - - Andy - diff --git a/Source/WXDialog/cmWXCacheProperty.cxx b/Source/WXDialog/cmWXCacheProperty.cxx deleted file mode 100644 index 34aa81989..000000000 --- a/Source/WXDialog/cmWXCacheProperty.cxx +++ /dev/null @@ -1,358 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - -// cmCacheProperty.cxx : implementation file -// - -#include "cmWXCacheProperty.h" - -#include "cmSystemTools.h" -#include "cmWXMainFrame.h" - -static int GetClientHeight(wxWindow* w) -{ - wxSize size = w->GetSize(); - return size.GetHeight(); -} - -#define cmMAX(x, y) (((x)>(y))?(x):(y)) - -cmCacheProperty::cmCacheProperty(cmMainFrame* mf, const std::string& name) : m_Name(name) -{ - this->m_HelpString = ""; - this->m_Value = ""; - this->m_NewValue = true; - this->m_Removed = false; - this->m_ItemType = cmCacheProperty::NOTHING; - this->m_MainFrame = mf; - this->m_Advanced = false; - - this->m_KeyWindow = 0; - this->m_ValueWindow = 0; - - this->m_TextControl = 0; -} - -cmCacheProperty::~cmCacheProperty() -{ -} - -int cmCacheProperty::Display(wxSizer* s, wxPanel* win) -{ - int maxheight = 0; - this->m_TextControl = 0; - wxPanel* panel = new wxPanel(win, -1); - wxPanel* panel1 = new wxPanel(panel, -1); - wxBoxSizer* sizer = 0; - wxColor bgcolor = panel->GetBackgroundColour(); - sizer = new wxBoxSizer(wxHORIZONTAL); - wxBoxSizer* sizer1 = new wxBoxSizer(wxHORIZONTAL); - wxStaticText* name = new wxStaticText(panel1, -1, this->m_Name.c_str()); - this->SetupMenu(name); - this->SetupMenu(panel1); - sizer1->Add(name, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - maxheight = cmMAX(maxheight, ::GetClientHeight(panel1)); - sizer->Add(5, 5, 0); - sizer->Add(panel1, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - - panel1->SetAutoLayout( TRUE ); - panel1->SetSizer(sizer1); - sizer1->Fit(panel1); - sizer1->SetSizeHints(panel1); - sizer1->Layout(); - - panel->SetAutoLayout( TRUE ); - panel->SetSizer(sizer); - sizer->Fit(panel); - sizer->SetSizeHints(panel); - sizer->Layout(); - wxControl* value = 0; - if ( this->m_NewValue ) - { - wxColor brightred = wxColor(252, 102, 100); - panel->SetBackgroundColour(brightred); - panel1->SetBackgroundColour(brightred); - name->SetBackgroundColour(brightred); - } - else - { - panel->SetBackgroundColour(*wxWHITE); - panel1->SetBackgroundColour(*wxWHITE); - name->SetBackgroundColour(*wxWHITE); - } - - this->m_KeyWindow = panel; - - panel = new wxPanel(win, -1); - sizer = new wxBoxSizer(wxHORIZONTAL); - panel->SetBackgroundColour(*wxWHITE); - //panel->SetBackgroundColour(*wxGREEN) - -#ifdef __APPLE__ - wxColor buttoncolor = *wxWHITE; -#else // __APPLE__ - wxColor buttoncolor = bgcolor; -#endif // __APPLE__ - - switch ( this->m_ItemType ) - { - case cmCacheProperty::CHECKBOX: - sizer->Add(5, 5, 0); - value = new wxCheckBox(panel, -1, ""); - this->ConnectEvent(value, wxEVT_COMMAND_CHECKBOX_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnPropertyChanged); - this->SetupMenu(value); - if ( strcmp(this->GetValue().c_str(), "ON") == 0 ) - { - static_cast(value)->SetValue(true); - } - break; - case cmCacheProperty::EDIT: - value = new wxTextCtrl(panel, -1, this->m_Value.c_str()); - maxheight = cmMAX(maxheight, ::GetClientHeight(value)); - this->ConnectEvent(value, wxEVT_COMMAND_TEXT_UPDATED, - (wxObjectEventFunction) &cmMainFrame::OnPropertyChanged); - this->SetupMenu(value); - break; - case cmCacheProperty::FILE: - sizer->Add(5, 5, 0); - value = new wxStaticText(panel, -1, this->m_Value.c_str()); - maxheight = cmMAX(maxheight, ::GetClientHeight(value)); - sizer->Add(value, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL ); - this->m_TextControl = value; - this->SetupMenu(value); - value = new wxButton(panel, -1, "...", wxDefaultPosition, - wxSize(20, maxheight - 4)); - maxheight = cmMAX(maxheight, ::GetClientHeight(value)); - value->SetBackgroundColour(buttoncolor); - sizer->Add(value, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL ); - this->ConnectEvent(value, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnPropertyChanged); - this->SetupMenu(value); - value = 0; - break; - case cmCacheProperty::PATH: - sizer->Add(5, 5, 0); - value = new wxStaticText(panel, -1, this->m_Value.c_str()); - maxheight = cmMAX(maxheight, ::GetClientHeight(value)); - sizer->Add(value, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL ); - this->m_TextControl = value; - this->SetupMenu(value); - value = new wxButton(panel, -1, "...", wxDefaultPosition, - wxSize(20, maxheight - 4)); - maxheight = cmMAX(maxheight, ::GetClientHeight(value)); - value->SetBackgroundColour(buttoncolor); - sizer->Add(value, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL ); - this->ConnectEvent(value, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnPropertyChanged); - this->SetupMenu(value); - value = 0; - break; - default: - value = new wxStaticText(panel, -1, this->m_Value.c_str()); - maxheight = cmMAX(maxheight, ::GetClientHeight(value)); - this->m_TextControl = value; - break; - } - //panel->Fit(); - this->m_ValueWindow = panel; - //panel->Fit(); - //win->Fit(); - if ( value ) - { - sizer->Add(value, 1, wxALIGN_LEFT | wxGROW | wxALL | wxALIGN_CENTER_VERTICAL); - } - - //s->Layout(); - - panel->SetAutoLayout( TRUE ); - panel->SetSizer(sizer); - sizer->Fit(panel); - sizer->SetSizeHints(panel); - sizer->Layout(); - - - if ( this->m_NewValue ) - { - s->Prepend(this->m_ValueWindow, 1, wxGROW | wxLEFT | wxRIGHT ); - s->Prepend(this->m_KeyWindow, 1, wxGROW | wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL ); - } - else - { - s->Add(this->m_KeyWindow, 1, wxGROW | wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL ); - s->Add(this->m_ValueWindow, 1, wxGROW | wxLEFT | wxRIGHT ); - } - - this->SetupMenu(this->m_KeyWindow); - this->SetupMenu(this->m_ValueWindow); - - int x1, x2, xm, s1, s2, sm; - win->GetSize(&xm, &sm); - this->m_KeyWindow->GetSize(&x1, &s1); - this->m_ValueWindow->GetSize(&x2, &s2); - int m = s1; - if ( s2 > m ) - { - m = s2; - } - this->m_KeyWindow->SetSize(x1, m); - this->m_ValueWindow->SetSize(x2, m); - //std::cout << "Size of panels: " << sm << "," << s1 << ", " << s2 << " max: " << maxheight<< std::endl; - return maxheight; -} - -void cmCacheProperty::Remove(wxSizer* sizer, wxPanel*) -{ - if ( this->m_KeyWindow ) - { - sizer->Remove(this->m_KeyWindow); - this->m_KeyWindow->Destroy(); - } - if ( this->m_ValueWindow ) - { - sizer->Remove(this->m_ValueWindow); - this->m_ValueWindow->Destroy(); - } - this->m_KeyWindow = 0; - this->m_ValueWindow = 0; - //sizer->Layout(); - //win->Fit(); -} - -void cmCacheProperty::ConnectEvent(wxWindow* win, wxEventType et, wxObjectEventFunction func) -{ - if ( !this->m_MainFrame ) - { - return; - } - win->SetClientData(this); - this->m_MainFrame->Connect(win->GetId(), et, func); -} - -void cmCacheProperty::ConnectEventTo(wxWindow* win, wxEventType et, - wxObjectEventFunction func) -{ - if ( !this->m_MainFrame ) - { - return; - } - win->SetClientData(this); - this->m_MainFrame->ConnectEventTo(win, et, func); -} - -void cmCacheProperty::OnPropertyChanged(wxEvent& event) -{ - if ( event.GetEventType() == wxEVT_RIGHT_DOWN ) - { - } - else - { - switch ( this->m_ItemType ) - { - case cmCacheProperty::EDIT: this->OnEntryChanged(event); break; - case cmCacheProperty::FILE: this->OnFileBrowseButton(event); break; - case cmCacheProperty::CHECKBOX: this->OnCheckboxButton(event); break; - case cmCacheProperty::PATH: this->OnPathBrowseButton(event); break; - } - } -} - -void cmCacheProperty::OnFileBrowseButton(wxEvent&) -{ - std::string path = cmSystemTools::GetFilenamePath(this->m_Value); - std::string file = cmSystemTools::GetFilenameName(this->m_Value); - - if ( path == "NOTFOUND" ) - { - path = this->m_MainFrame->GetBuildDir(); - } - - wxFileDialog dialog ( - this->m_MainFrame, - _T("Select file"), - path.c_str(), - file.c_str(), - _T("All files|*.*") - ); - - if (dialog.ShowModal() == wxID_OK) - { - std::string str = ""; - if ( this->m_TextControl ) - { - str += dialog.GetPath().c_str(); - static_cast(this->m_TextControl)->SetLabel(str.c_str()); - } - this->SetValue(str.c_str()); - } -} - -void cmCacheProperty::OnPathBrowseButton(wxEvent&) -{ - std::string path = this->m_Value; - if ( path == "NOTFOUND" ) - { - path = this->m_MainFrame->GetBuildDir(); - } - - wxDirDialog dialog ( this->m_MainFrame, _T("Select directory"), path.c_str() ); - - if (dialog.ShowModal() == wxID_OK) - { - if ( this->m_TextControl ) - { - static_cast(this->m_TextControl)->SetLabel(dialog.GetPath()); - } - this->SetValue(dialog.GetPath().c_str()); - } -} - -void cmCacheProperty::OnCheckboxButton(wxEvent& event) -{ - wxCheckBox* widget = static_cast( event.GetEventObject() ); - if ( !widget ) - { - return; - } - int val = widget->GetValue(); - if ( val ) - { - this->SetValue("ON"); - } - else - { - this->SetValue("OFF"); - } -} - -void cmCacheProperty::OnEntryChanged(wxEvent& event) -{ - wxTextCtrl* widget = static_cast( event.GetEventObject() ); - if ( !widget ) - { - return; - } - this->SetValue(static_cast(widget->GetValue())); -} - -void cmCacheProperty::SetupMenu(wxWindow* win) -{ - this->ConnectEventTo(win, wxEVT_RIGHT_DOWN, - (wxObjectEventFunction) &cmMainFrame::OnPopupMenu); - this->ConnectEventTo(win, wxEVT_MOTION, - (wxObjectEventFunction) &cmMainFrame::OnCacheStatusBar); -} diff --git a/Source/WXDialog/cmWXCacheProperty.h b/Source/WXDialog/cmWXCacheProperty.h deleted file mode 100644 index e1e297abb..000000000 --- a/Source/WXDialog/cmWXCacheProperty.h +++ /dev/null @@ -1,130 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef CMCACHEPROPERTY_H -#define CMCACHEPROPERTY_H - -#include "cmStandardIncludes.h" - -#include "wxincludes.h" - -class cmMainFrame; -class wxControl; -class wxPanel; -class wxSizer; -class wxWindow; - -/** \class cmCacheProperty - * \brief GUI Control class for cmake's cache property - * - * Stores cache property as displayed on GUI, caches its value, colors - * red when new. - * - */ -class cmCacheProperty -{ -public: - cmCacheProperty(cmMainFrame*, const std::string& name); - ~cmCacheProperty(); - const std::string& GetName() { return this->m_Name; } - - //! Get and set the value - const std::string& GetValue() { return this->m_Value; } - void SetValue(const std::string& s) { this->m_Value = s; } - - //! Get and set the help value - void SetHelp(const std::string& s) { this->m_HelpString = s; } - const std::string& GetHelp() { return this->m_HelpString; } - - //! Display the property in the window. Return the maximum height. - int Display(wxSizer*, wxPanel*); - - //! Remove the property from the window - void Remove(wxSizer*, wxPanel*); - - //! This method is called when property is changed - void OnPropertyChanged(wxEvent& event); - - //! Mark cache entry as being removed. - void MarkRemoved() { this->m_Removed = true; } - - //! Check if the entry was removed - bool IsRemoved() { return this->m_Removed; } - - //! Get and set the new flag. - void SetNewFlag(bool f) { this->m_NewValue = f; } - bool GetNewFlag() { return this->m_NewValue; } - - //! Mark cache entry as being removed. - void MarkAdvanced() { this->m_Advanced = true; } - - //! Check if the entry was removed - bool IsAdvanced() { return this->m_Advanced; } - - //! Set item type - void SetItemType(int t) { this->m_ItemType = t; } - - //! Get the main frame asociated with the cache property - cmMainFrame* GetMainFrame() { return this->m_MainFrame; } - - enum ItemType - { - NOTHING = 0, - EDIT, - FILE, - CHECKBOX, - PATH - }; - - enum - { - Menu_Popup_Ignore = 200, - Menu_Popup_Delete, - Menu_Popup_Help - }; - -protected: - bool m_NewValue; - bool m_Advanced; - int m_ItemType; - - wxWindow* m_KeyWindow; - wxWindow* m_ValueWindow; - - std::string m_Name; - std::string m_Value; - std::string m_HelpString; - bool m_Removed; - - //! The following methods set the events handling of widgets for the - // cache property. - void ConnectEvent(wxWindow* win, wxEventType et, wxObjectEventFunction func); - void ConnectEventTo(wxWindow* win, wxEventType et, wxObjectEventFunction func); - void SetupMenu(wxWindow* win); - - //! This are event callbacks for different events. - void OnFileBrowseButton(wxEvent& event); - void OnPathBrowseButton(wxEvent& event); - void OnCheckboxButton(wxEvent& event); - void OnEntryChanged(wxEvent& event); - -private: - cmMainFrame* m_MainFrame; - wxControl* m_TextControl; -}; - - -#endif diff --git a/Source/WXDialog/cmWXCommandLineInfo.cxx b/Source/WXDialog/cmWXCommandLineInfo.cxx deleted file mode 100644 index 88caeb5d1..000000000 --- a/Source/WXDialog/cmWXCommandLineInfo.cxx +++ /dev/null @@ -1,137 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - -// cmCommandLineInfo.cpp : command line arguments -// - -#include "cmWXCommandLineInfo.h" - -#include "cmSystemTools.h" - -/////////////////////////////////////////////////////////////// -// cmCommandLineInfo - -cmCommandLineInfo::cmCommandLineInfo() -{ - this->m_WhereSource = ""; - this->m_WhereBuild = ""; - this->m_AdvancedValues = false; - this->m_GeneratorChoiceString = ""; - this->m_LastUnknownParameter = ""; - this->m_ValidArguments = ""; - this->m_ExitAfterLoad = false; -} - -/////////////////////////////////////////////////////////////// -cmCommandLineInfo::~cmCommandLineInfo() -{ -} - -/////////////////////////////////////////////////////////////// -void cmCommandLineInfo::ParseCommandLine(int argc, char* argv[]) -{ - int cc; - for ( cc = 1; cc < argc; cc ++ ) - { - if ( strlen(argv[cc]) < 1 ) - { - continue; - } - bool valid = true; - std::string argument = argv[cc]; - if ( argument.size() > 1 && - this->m_ValidArguments.find(argument[1]) == std::string::npos ) - { - valid = false; - } - this->ParseParam(argument, valid, (cc + 1 == argc)); - } - this->m_ExecutablePath = cmSystemTools::GetFilenamePath(argv[0]); -} - -/////////////////////////////////////////////////////////////// -int cmCommandLineInfo::GetBoolValue(const std::string& v) { - std::string value = cmSystemTools::LowerCase(v); - if (value == "1" || - value == "on" || - value == "true" || - value == "yes") - { - return 1; - } - else if (value == "0" || - value == "off" || - value == "false" || - value == "no") - { - return -1; - } - return 0; -} - -/////////////////////////////////////////////////////////////// -// Parse param - -void cmCommandLineInfo::ParseParam(const std::string& parameter, - bool know_about, bool /*last*/) -{ - if(!know_about) - { - this->m_LastUnknownParameter = parameter; - } - else - { - std::string sParam(parameter.c_str(), 1, parameter.npos); - // Single letter valued flag like /B=value or /B:value - std::string value; - if (sParam[1] == '=' || sParam[1] == ':') - { - value = std::string(parameter.c_str()+3); - } - else - { - value = std::string(parameter.c_str()+2); - } - int res; - switch (sParam[0]) - { - case 'A': - res = cmCommandLineInfo::GetBoolValue(value); - if (res == 1) - { - this->m_AdvancedValues = true; - } - else if (res == -1) - { - this->m_AdvancedValues = false; - } - break; - case 'B': - this->m_WhereBuild = value; - break; - case 'G': - this->m_GeneratorChoiceString = value; - break; - case 'Q': - this->m_ExitAfterLoad = true; - break; - case 'H': - this->m_WhereSource = value; - break; - } - } -} diff --git a/Source/WXDialog/cmWXCommandLineInfo.h b/Source/WXDialog/cmWXCommandLineInfo.h deleted file mode 100644 index 01b33d457..000000000 --- a/Source/WXDialog/cmWXCommandLineInfo.h +++ /dev/null @@ -1,66 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -// cmCommandLineInfo.h : main header file for the command line arguments -// - -#if !defined(CMAKECOMMANDLINEINFO_H) -#define CMAKECOMMANDLINEINFO_H - -#include "cmStandardIncludes.h" - -/////////////////////////////////////////////////////////////// -// cmCommandLineInfo: -// See cmCommandLineInfo.cxx for the implementation of this class -// - -class cmCommandLineInfo -{ - // Construction -public: - cmCommandLineInfo(); - virtual ~cmCommandLineInfo(); - - // Parse the command line - void ParseCommandLine(int argc, char* argv[]); - - // Set the valid arguments - void SetValidArguments(const std::string& va) { this->m_ValidArguments = va; } - - // Retrieve the path of executable - std::string GetPathToExecutable() { return this->m_ExecutablePath; } - - // Attributes -public: - std::string m_WhereSource; - std::string m_WhereBuild; - bool m_AdvancedValues; - std::string m_GeneratorChoiceString; - std::string m_LastUnknownParameter; - std::string m_ExecutablePath; - bool m_ExitAfterLoad; - -protected: - // Parse one argument - void ParseParam(const std::string& parameter, bool know_about, bool last); - - // Return boolean value of the string - static int GetBoolValue(const std::string&); - - std::string m_ValidArguments; -}; - -#endif // !defined(CMAKECOMMANDLINEINFO_H) diff --git a/Source/WXDialog/cmWXMainFrame.cxx b/Source/WXDialog/cmWXMainFrame.cxx deleted file mode 100644 index e93400d75..000000000 --- a/Source/WXDialog/cmWXMainFrame.cxx +++ /dev/null @@ -1,1489 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - -#include "cmWXMainFrame.h" - -#include "cmCacheManager.h" -#include "cmWXCacheProperty.h" -#include "cmWXCommandLineInfo.h" -#include "cmake.h" - -#ifdef __linux__ -#include "CMakeIcon.xpm" -#endif - -cmMainFrame::cmMainFrame(const wxString& title, const wxSize& size) - : wxFrame((wxFrame*)NULL, cmMainFrame::ID_MainFrame, title, wxDefaultPosition, size) -{ -#ifdef __linux__ - this->SetIcon( wxICON(CMakeIcon) ); -#endif - - cmSystemTools::SetErrorCallback(cmMainFrame::MessageCallback, this); - this->m_Clean = true; - this->m_BuildPathChanged = false; - this->m_WhereSource = ""; - this->m_WhereBuild = ""; - - this->m_CMakeInstance = new cmake; // force a register of generators - this->m_Update = false; - this->m_Valid = false; - this->m_EntryRemoved = false; - this->m_CursorChanged = false; - - this->m_CacheEntries = new cmMainFrame::CacheMapType; - - this->CreateStatusBar(1); - this->SetStatusText("Welcome to CMakeSetup"); - - - this->m_MainPanel = new wxPanel(this, -1); - - this->SetBackgroundColour(this->m_MainPanel->GetBackgroundColour()); - - this->m_TopMostSizer = new wxBoxSizer(wxVERTICAL); - - this->m_TopMostSizer->Add( this->m_MainPanel, 1, wxGROW | wxALL, 5 ); - - wxFlexGridSizer* msizer = new wxFlexGridSizer(1, 5, 5); - msizer->AddGrowableRow(2); - msizer->AddGrowableCol(0); - this->m_MainSizer = msizer; - - wxFlexGridSizer* tgrid = new wxFlexGridSizer(7, 2, 2); - tgrid->AddGrowableCol(2); - tgrid->AddGrowableCol(6); - this->m_TopGrid = tgrid; - - - this->m_TextSource = new wxStaticText(this->m_MainPanel, -1, "Where is the source code:"); - this->m_PathSource = new wxComboBox(this->m_MainPanel, -1, "PathSource"); - this->m_BrowseSource = new wxButton(this->m_MainPanel, -1, "Browse..."); - - tgrid = new wxFlexGridSizer(3, 2, 2); - tgrid->AddGrowableCol(2); - this->m_GeneratorFrame = tgrid; - this->m_BuildFor = new wxStaticText(this->m_MainPanel, -1, "Build For:"); - this->m_GeneratorMenu = new wxComboBox(this->m_MainPanel, -1, "", - wxDefaultPosition, wxDefaultSize, - 0, 0, wxCB_READONLY); - - this->m_GeneratorFrame->Add(this->m_BuildFor, 0, wxALIGN_LEFT); - this->m_GeneratorFrame->Add(5,5,0); - this->m_GeneratorFrame->Add(this->m_GeneratorMenu, 1, wxGROW | wxLEFT | wxRIGHT ); - - this->m_TextBinary = new wxStaticText(this->m_MainPanel, -1, - "Where to build the binaries:"); - this->m_PathBinary = new wxComboBox(this->m_MainPanel, -1, "PathBinary"); - this->m_BrowseBinary = new wxButton(this->m_MainPanel, -1, "Browse..."); - this->m_ShowAdvancedValues = new wxCheckBox(this->m_MainPanel, -1, - "Show Advanced Values"); - - this->m_TopGrid->Add(this->m_TextSource, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - this->m_TopGrid->Add(5, 5, 0); - this->m_TopGrid->Add(this->m_PathSource, 1, wxGROW | wxLEFT | wxRIGHT ); - this->m_TopGrid->Add(5, 5, 0); - this->m_TopGrid->Add(this->m_BrowseSource, 1, 0); - this->m_TopGrid->Add(5, 5, 0); - this->m_TopGrid->Add(this->m_GeneratorFrame, 1, wxGROW | wxLEFT | wxRIGHT); - this->m_TopGrid->Add(this->m_TextBinary, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - this->m_TopGrid->Add(5, 5, 0); - this->m_TopGrid->Add(this->m_PathBinary, 1, wxGROW | wxLEFT | wxRIGHT ); - this->m_TopGrid->Add(5, 5, 0); - this->m_TopGrid->Add(this->m_BrowseBinary, 1, 0); - this->m_TopGrid->Add(5, 5, 0); - this->m_TopGrid->Add(this->m_ShowAdvancedValues, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - - this->m_MainSizer->Add(5, 5, 0); - this->m_MainSizer->Add(this->m_TopGrid, 1, wxGROW | wxLEFT | wxRIGHT, 10 ); - - this->m_CacheValuesBox = new wxStaticBox(this->m_MainPanel, -1, "Cache Values"); - //this->m_CacheValuesBox->SetBackgroundColour(*wxWHITE); - this->m_CacheValuesFrame = new wxStaticBoxSizer(this->m_CacheValuesBox, - wxVERTICAL); - this->m_CacheValuesScroll = new wxScrolledWindow(this->m_MainPanel, -1, - wxDefaultPosition, wxDefaultSize, - wxVSCROLL); - this->m_CacheValuesScroll->SetBackgroundColour(*wxWHITE); - this->m_CacheValuesFrame->Add(this->m_CacheValuesScroll, 1, wxEXPAND | wxALL, 0 ); - this->m_CacheValuesPanel = new wxPanel(this->m_CacheValuesScroll, -1); - this->m_CacheValuesPanel->SetBackgroundColour(wxColor(150, 150, 150)); - wxFlexGridSizer* csizer = new wxFlexGridSizer(2, 1, 1); - csizer->AddGrowableCol(0); - csizer->AddGrowableCol(1); - this->m_CacheValuesSizer = csizer; - this->m_CacheValuesPanel->SetAutoLayout( TRUE ); - this->m_CacheValuesPanel->SetSizer(this->m_CacheValuesSizer); - //this->m_CacheValuesPanel->SetBackgroundColour(wxColour(10,10,10)); - this->m_CacheValuesSizer->Fit(this->m_CacheValuesPanel); - this->m_CacheValuesSizer->SetSizeHints(this->m_CacheValuesPanel); - - //this->m_CacheValuesScroll->SetScrollbars(0, 20, 0, 50); - //wxSize framesize = this->m_CacheValuesBox->GetSize(); - //this->m_CacheValuesBox->SetSize(framesize.GetWidth(), 100); - this->SetSizeHints(580, 340); - this->m_MainSizer->Add(this->m_CacheValuesFrame, 1, wxGROW | wxALL ); - wxString helpTextData = ""; - helpTextData.append - ("Right click on a cache value for additional options " - "(delete, ignore, and help).\n" - "Press Configure to update and display new values in red.\n" - "Press OK to generate selected build files and exit."); - this->m_HelpText = new wxStaticText(this->m_MainPanel, -1, helpTextData, - wxDefaultPosition, - wxDefaultSize, - wxTE_MULTILINE); - - this->m_MainSizer->Add(5, 5, 0); - this->m_MainSizer->Add(this->m_HelpText, 0, wxALIGN_CENTER_HORIZONTAL, 10); - - this->m_BottomButtonsFrame = new wxBoxSizer(wxHORIZONTAL); - - //this->m_VersionText = new wxStaticText(this->m_MainPanel, -1, - //"Version 1.5 - development"); - this->m_ConfigureButton = new wxButton(this->m_MainPanel, -1, "Configure"); - this->m_OKButton = new wxButton(this->m_MainPanel, -1, "OK"); - this->m_CancelButton = new wxButton(this->m_MainPanel, -1, "Cancel"); - this->m_HelpButton = new wxButton(this->m_MainPanel, -1, "Help"); - - - this->m_BottomButtonsFrame->Add(m_ConfigureButton, 0, wxALIGN_LEFT, 10); - this->m_BottomButtonsFrame->Add(5, 5, 0); - this->m_BottomButtonsFrame->Add(m_OKButton, 0, wxALIGN_LEFT, 10); - this->m_BottomButtonsFrame->Add(5, 5, 0); - this->m_BottomButtonsFrame->Add(m_CancelButton, 0, wxALIGN_LEFT, 10); - this->m_BottomButtonsFrame->Add(5, 5, 0); - this->m_BottomButtonsFrame->Add(m_HelpButton, 0, wxALIGN_LEFT, 10); - - this->m_MainSizer->Add(5, 5, 0); - this->m_MainSizer->Add(m_BottomButtonsFrame, 0, wxALIGN_CENTER_HORIZONTAL, 10); - this->m_MainSizer->Add(5, 5, 0); - - this->m_MainPanel->SetAutoLayout( TRUE ); - this->m_MainPanel->SetSizer(this->m_MainSizer); - this->m_MainSizer->Fit(this->m_MainPanel); - this->m_MainSizer->SetSizeHints(this->m_MainPanel); - - this->SetAutoLayout( TRUE ); - this->SetSizer(this->m_TopMostSizer); - this->m_TopMostSizer->Fit(this); - this->m_TopMostSizer->SetSizeHints(this); - - // Setup statusbar callbacks - - this->SetupStatusBarBinding(this->m_ConfigureButton); - this->SetupStatusBarBinding(this->m_OKButton); - this->SetupStatusBarBinding(this->m_CancelButton); - this->SetupStatusBarBinding(this->m_HelpButton); - this->SetupStatusBarBinding(this->m_PathSource); - this->SetupStatusBarBinding(this->m_BrowseSource); - this->SetupStatusBarBinding(this->m_PathBinary); - this->SetupStatusBarBinding(this->m_BrowseBinary); - this->SetupStatusBarBinding(this->m_GeneratorMenu); - this->SetupStatusBarBinding(this->m_ShowAdvancedValues); - - // Setup other callbacks - this->ConnectEvent( this->m_CancelButton, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnCancel ); - this->ConnectEvent( this->m_OKButton, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnOk ); - this->ConnectEvent( this->m_HelpButton, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnHelp ); - this->ConnectEvent( this->m_ConfigureButton, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnConfigure ); - this->ConnectEvent( this, wxEVT_SIZE, - (wxObjectEventFunction) &cmMainFrame::OnResize ); - this->ConnectEvent( this->m_ShowAdvancedValues, wxEVT_COMMAND_CHECKBOX_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnShowAdvancedValues ); - this->ConnectEvent( this->m_BrowseSource, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnBrowseSource ); - this->ConnectEvent( this->m_BrowseBinary, wxEVT_COMMAND_BUTTON_CLICKED, - (wxObjectEventFunction) &cmMainFrame::OnBrowseBinary ); - this->ConnectEvent( this->m_PathSource, wxEVT_COMMAND_COMBOBOX_SELECTED, - (wxObjectEventFunction) &cmMainFrame::OnSourceSelected ); - this->ConnectEvent( this->m_PathSource, wxEVT_COMMAND_TEXT_UPDATED, - (wxObjectEventFunction) &cmMainFrame::OnSourceUpdated ); - this->ConnectEvent( this->m_PathBinary, wxEVT_COMMAND_COMBOBOX_SELECTED, - (wxObjectEventFunction) &cmMainFrame::OnBinarySelected ); - this->ConnectEvent( this->m_PathBinary, wxEVT_COMMAND_TEXT_UPDATED, - (wxObjectEventFunction) &cmMainFrame::OnBinaryUpdated ); - this->ConnectEvent( this->m_PathBinary, wxEVT_COMMAND_TEXT_ENTER, - (wxObjectEventFunction) &cmMainFrame::OnBinaryAccepted ); - this->ConnectEvent( this->m_GeneratorMenu, wxEVT_COMMAND_COMBOBOX_SELECTED, - (wxObjectEventFunction) &cmMainFrame::OnGeneratorSelected ); - this->ConnectEvent( this->m_GeneratorMenu, wxEVT_COMMAND_TEXT_UPDATED, - (wxObjectEventFunction) &cmMainFrame::OnGeneratorSelected ); - - - this->ConnectEvent( this, wxEVT_TIMER, - (wxObjectEventFunction) &cmMainFrame::OnExitTimer ); - - this->Connect(cmCacheProperty::Menu_Popup_Ignore, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) &cmMainFrame::OnPopupMenuIgnore); - this->Connect(cmCacheProperty::Menu_Popup_Delete, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) &cmMainFrame::OnPopupMenuDelete); - this->Connect(cmCacheProperty::Menu_Popup_Help, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) &cmMainFrame::OnPopupMenuHelp); - - this->m_CMakeInstance->SetProgressCallback(&cmMainFrame::ProgressCallback, this); -} - -cmMainFrame::~cmMainFrame() -{ - cmMainFrame::CacheMapType* items = this->m_CacheEntries; - for(cmMainFrame::CacheMapType::iterator i = items->begin(); - i != items->end(); ++i) - { - cmCacheProperty* item = i->second; - delete item; - } - delete this->m_CacheEntries; - - delete this->m_CMakeInstance; - -} - -void cmMainFrame::MessageCallback(const char* m, const char* title, bool& nomore, - void* clientData) -{ - - if ( clientData ) - { - cmMainFrame* self = static_cast( clientData ); - self->DisplayMessage(m, title, nomore); - } - else - { - std::string message = "The following error happen without frame being set:\n\n"; - message += m; - message += "\n\n(Press Cancel to suppress any further messages.)"; - if(::wxMessageBox(message.c_str(), title, - wxICON_WARNING | wxOK | wxCANCEL ) == wxCANCEL) - { - nomore = true; - } - } - -} - -void cmMainFrame::ProgressCallback(const char* m, float prog, - void* clientData) -{ - - if ( clientData ) - { - cmMainFrame* self = static_cast( clientData ); - char tmp[1024]; - if (prog >= 0) - { - sprintf(tmp,"%s %i%%",m,(int)(100*prog)); - } - else - { - sprintf(tmp,"%s",m); - } - self->SetStatusText(tmp); - wxYield(); - } -} - -void cmMainFrame::DisplayMessage(const char* m, const char* title, bool& nomore) -{ - this->CursorNormal(false); - std::string message = m; - message += "\n\n(Press Cancel to suppress any further messages.)"; - if(::wxMessageBox(message.c_str(), title, - wxICON_WARNING | wxOK | wxCANCEL ) == wxCANCEL) - { - nomore = true; - } - if ( this->m_CursorChanged ) - { - this->CursorBusy(false); - } -} - -void cmMainFrame::ConnectEvent(wxWindow* win, wxEventType et, wxObjectEventFunction func) -{ -// - this->Connect((win?win->GetId():-1), et, func); -// -} - -void cmMainFrame::ConnectEventTo(wxWindow* win, wxEventType et, wxObjectEventFunction func) -{ -// - win->Connect(-1, et, func); -// -} - -void cmMainFrame::OnStatusBar(wxEvent& event) -{ - wxControl* eobject = static_cast(event.GetEventObject()); - if ( eobject && eobject->GetClientData() ) - { - cmMainFrame* self = static_cast(eobject->GetClientData()); - if ( eobject == self->m_OKButton ) - { - self->SetStatusText("Press OK to generate selected build files and exit."); - } - else if ( eobject == self->m_CancelButton ) - { - self->SetStatusText("Press Cancel to lose the changes and exit."); - } - else if ( eobject == self->m_ConfigureButton ) - { - self->SetStatusText("Press Configure to update and display new values in red."); - } - else if ( eobject == self->m_HelpButton ) - { - self->SetStatusText("Press Help to display help."); - } - else if ( eobject == self->m_ShowAdvancedValues ) - { - self->SetStatusText("Toggle between regular and advanced cache values."); - } - else if ( eobject == self->m_GeneratorMenu ) - { - self->SetStatusText("Set the generator to generate the build files."); - } - else if ( eobject == self->m_PathSource ) - { - self->SetStatusText("Enter the path to the source files."); - } - else if ( eobject == self->m_BrowseSource ) - { - self->SetStatusText("Browse the path to the source files."); - } - else if ( eobject == self->m_PathBinary ) - { - self->SetStatusText("Enter the path to the build files."); - } - else if ( eobject == self->m_BrowseBinary ) - { - self->SetStatusText("Browse the path to the build files."); - } - else - { - self->SetStatusText("CMakeSetup"); - } - } -} - -void cmMainFrame::OnCacheStatusBar(wxEvent& event) -{ - wxControl* eobject = static_cast(event.GetEventObject()); - if ( eobject && eobject->GetClientData() ) - { - cmCacheProperty* cprop = static_cast(eobject->GetClientData()); - cprop->GetMainFrame()->SetStatusText(cprop->GetHelp().c_str(), 0); - } -} - -void cmMainFrame::OnPopupMenu(wxMouseEvent& event) -{ - - // - wxControl* eobject = static_cast(event.GetEventObject()); - if ( eobject && eobject->GetClientData() ) - { - wxMenu menu; - menu.Append(cmCacheProperty::Menu_Popup_Ignore, "Ignore Cache Entry"); - menu.Append(cmCacheProperty::Menu_Popup_Delete, "Delete Cache Entry"); - menu.Append(cmCacheProperty::Menu_Popup_Help, "Help for Cache Entry"); - cmCacheProperty* cprop = static_cast(eobject->GetClientData()); - cmMainFrame* self = cprop->GetMainFrame(); - menu.SetClientData(eobject->GetClientData()); - this->PopupMenu(&menu, event.GetPosition()); - if ( self->m_EntryRemoved ) - { - self->UpdateCacheValuesDisplay(); - self->m_EntryRemoved = false; - } - } -} - -void cmMainFrame::OnPopupMenuIgnore(wxEvent& event) -{ -// - this->OnPopupMenuEntry(event, 0); -// -} - -void cmMainFrame::OnPopupMenuDelete(wxEvent& event) -{ -// - this->OnPopupMenuEntry(event, 1); -// -} - -void cmMainFrame::OnPopupMenuHelp(wxEvent& event) -{ -// - this->OnPopupMenuEntry(event, 2); -// -} - -void cmMainFrame::OnPopupMenuEntry(wxEvent& event, int idx) -{ - - wxMenu* eobject = static_cast(event.GetEventObject()); - if ( eobject && eobject->GetClientData() ) - { - cmCacheProperty* cprop = static_cast(eobject->GetClientData()); - switch ( idx ) - { - case 0: this->IgnoreCacheEntry(cprop->GetName().c_str()); - break; - case 1: this->RemoveCacheEntry(cprop); - break; - case 2: this->HelpCacheEntry(cprop->GetName().c_str(), cprop->GetHelp().c_str()); - break; - } - } -} - -void cmMainFrame::OnOk(wxCommandEvent&) -{ - - // enable error messages each time configure is pressed - cmSystemTools::EnableMessages(); - this->ClearDirty(); - this->RunCMake(true); - cmMainFrame::Close(TRUE); - -} - -void cmMainFrame::OnCancel(wxCommandEvent&) -{ - if ( this->IsDirty() ) - { - // Display dialog - if ( wxMessageBox( "You have changed options but not rebuild, " - "are you sure you want to exit?", - "Confirm Exit", wxICON_WARNING | wxYES_NO ) != wxYES ) - { - return; - } - } - cmMainFrame::Close(TRUE); - -} - -void cmMainFrame::OnConfigure(wxCommandEvent&) -{ - // enable error messages each time configure is pressed - cmSystemTools::EnableMessages(); - this->m_Update = true; - this->RunCMake(false); -} - -void cmMainFrame::OnHelp(wxCommandEvent&) -{ - - std::string message = - "CMake is used to configure and generate build files for software projects. The basic steps for configuring a\n" - "project are as follows:\n\n" - "1. Select the source directory for the project. This should contain the CMakeLists.txt files for the project.\n\n" - "2. Select the build directory for the project. This is the directory where the project will be built. It can\n" - "be the same or a different directory than the source directory. For easy clean up, a separate build directory\n" - "is recommended. CMake will create the directory if it does not exist.\n\n" - "3. Once the source and binary directories are selected, it is time to press the Configure button. This will cause\n" - "CMake to read all of the input files and discover all the variables used by the project. The first time a\n" - "variable is displayed it will be in Red. Users should inspect red variables making sure the values are correct.\n" - "For some projects the Configure process can be iterative, so continue to press the Configure button until there\n" - " are no longer red entries.\n\n" - "4. Once there are no longer red entries, you should click the OK button. This will write the build files to the\n" - "build directory and exit CMake."; - ::wxMessageBox(message.c_str(), "CMake Help", - wxICON_INFORMATION | wxOK ); - -} - -void cmMainFrame::OnPropertyChanged(wxEvent& event) -{ - this->SetDirty(); - wxControl* eobject = static_cast(event.GetEventObject()); - if ( eobject && eobject->GetClientData() ) - { - cmCacheProperty* property = static_cast( - eobject->GetClientData() ); - property->OnPropertyChanged(event); - } -} - -void cmMainFrame::OnResize(wxSizeEvent& event) -{ - this->wxFrame::OnSize(event); - // Expand inner pannel when window resizes - this->ResizeInternal(); -} - -void cmMainFrame::OnExitTimer(wxEvent&) -{ - this->Close(); - this->Refresh(); -} - -void cmMainFrame::ResizeInternal() -{ - // Expand inner pannel when window resizes - int x, y; - this->m_CacheValuesScroll->GetClientSize(&x, &y); - wxSize size1 = this->m_CacheValuesPanel->GetSize(); - this->m_CacheValuesPanel->SetSize(wxSize(x, size1.GetHeight())); - //this->m_CacheValuesSizer->SetDimension(0,0,x,size1.GetHeight()); -} - -void cmMainFrame::OnBrowseSource(wxCommandEvent&) -{ - std::string path = this->m_PathSource->GetValue().c_str(); - if ( path == "PathSource" ) - { - path = cmSystemTools::CollapseFullPath(this->m_PathToExecutable.c_str()); - } - wxDirDialog dialog ( this, _T("Select path"), path.c_str() ); - - if (dialog.ShowModal() == wxID_OK) - { - this->SetSourceDir(dialog.GetPath()); - } -} - -void cmMainFrame::OnBrowseBinary(wxCommandEvent&) -{ - std::string path = this->m_PathBinary->GetValue().c_str(); - if ( path == "PathBinary" ) - { - path = this->m_PathSource->GetValue().c_str(); - if ( path == "PathSource" ) - { - path = cmSystemTools::CollapseFullPath(this->m_PathToExecutable.c_str()); - } - } - wxDirDialog dialog ( this, _T("Select path"), path.c_str() ); - - if (dialog.ShowModal() == wxID_OK) - { - if ( this->SetBinaryDir(dialog.GetPath()) ) - { - this->m_Update = true; - this->ChangeWhereBuild(); - } - } -} - -void cmMainFrame::Initialize(cmCommandLineInfo* cmdInfo) -{ - - this->m_PathToExecutable = cmdInfo->GetPathToExecutable(); - this->LoadFromRegistry(); - std::vector names; - this->m_CMakeInstance->GetRegisteredGenerators(names); - int cc = 0; - for(std::vector::iterator i = names.begin(); - i != names.end(); ++i) - { - this->m_GeneratorMenu->Append(i->c_str()); - if ( *i == "Unix Makefiles" ) - { - this->m_GeneratorMenu->SetSelection(cc); - } - cc ++; - } - - //{{AFX_DATA_INIT(CMakeSetupDialog) - // Get the parameters from the command line info - // If an unknown parameter is found, try to interpret it too, since it - // is likely to be a file dropped on the shortcut :) - if (cmdInfo->m_LastUnknownParameter.empty()) - { - if ( cmdInfo->m_WhereSource.size() > 0 ) - { - this->SetSourceDir( cmdInfo->m_WhereSource.c_str() ); - } - if ( cmdInfo->m_WhereBuild.size() > 0 ) - { - this->SetBinaryDir( cmdInfo->m_WhereBuild.c_str() ); - } - if ( this->m_GeneratorMenu->GetSelection() >= 0 && - this->m_GeneratorMenu->GetValue().size() > 0 ) - { - this->SetGenerator(this->m_GeneratorMenu->GetValue().c_str()); - } - this->m_ShowAdvancedValues->SetValue(cmdInfo->m_AdvancedValues); - } - else - { - this->m_ShowAdvancedValues->SetValue(FALSE); - this->ChangeDirectoriesFromFile(cmdInfo->m_LastUnknownParameter.c_str()); - } - /* - this->UpdateSourceBuildMenus(); - */ - this->LoadCacheFromDiskToGUI(); - - if ( cmdInfo->m_ExitAfterLoad ) - { - this->m_ExitTimer = new wxTimer(this, this->GetId()); - this->m_ExitTimer->Start(3000); - } -} - -//! Set the current generator -void cmMainFrame::SetGenerator(const char* generator) -{ - if ( strlen(generator) > 0 ) - { - int pos = this->m_GeneratorMenu->FindString(generator); - if ( pos >= 0 ) - { - this->m_GeneratorMenu->SetSelection(pos); - } - } - -} - -//! Load cache file from m_WhereBuild and display in GUI editor -void cmMainFrame::LoadCacheFromDiskToGUI() -{ - cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); - if(this->GetBinaryDir().size() > 0 ) - { - cachem->LoadCache(this->m_WhereBuild.c_str()); - this->UpdateCacheValuesDisplay(); - cmCacheManager::CacheIterator it = cachem->NewIterator(); - if(it.Find("CMAKE_GENERATOR")) - { - std::string curGen = it.GetValue(); - if(this->m_GeneratorMenu->GetSelection() < 0 || - std::string(this->m_GeneratorMenu->GetValue().c_str()) != curGen) - { - this->SetGenerator(curGen.c_str()); - } - } - } - -} - - -// copy from the cache manager to the cache edit list box -void cmMainFrame::FillCacheGUIFromCacheManager() -{ - - //size_t size = 0; - //size_t size = this->m_CacheEntriesList.GetItems().size(); - //bool reverseOrder = false; - // if there are already entries in the cache, then - // put the new ones in the top, so they show up first - /* - if(size) - { - reverseOrder = true; - } - */ - - this->UpdateCacheValuesDisplay(); - -} - -void cmMainFrame::OnGeneratorSelected(wxEvent&) -{ - - -} - -void cmMainFrame::OnShowAdvancedValues(wxCommandEvent&) -{ - this->m_Update = false; - this->UpdateCacheValuesDisplay(); -} - -// Handle param or single dropped file. -// If the dropped file is a build directory or any file in a -// build directory, set the source dir from the cache file, -// otherwise set the source and build dirs to this file (or dir). - -void cmMainFrame::ChangeDirectoriesFromFile(const char* buffer) -{ - // Get the path to this file - - std::string path = buffer; - if (!cmSystemTools::FileIsDirectory(path.c_str())) - { - path = cmSystemTools::GetFilenamePath(path); - } - else - { - cmSystemTools::ConvertToUnixSlashes(path); - } - - // Check if it's a build dir and grab the cache - - std::string cache_file = path; - cache_file += "/CMakeCache.txt"; - - cmCacheManager *cache = this->m_CMakeInstance->GetCacheManager(); - cmCacheManager::CacheIterator it = cache->GetCacheIterator("CMAKE_HOME_DIRECTORY"); - if (cmSystemTools::FileExists(cache_file.c_str()) && - cache->LoadCache(path.c_str()) && - !it.IsAtEnd()) - { - path = cmSystemTools::ConvertToOutputPath(path.c_str()); - this->SetBinaryDir(path.c_str()); - - path = cmSystemTools::ConvertToOutputPath(it.GetValue()); - this->SetSourceDir(path.c_str()); - } - else - { - path = cmSystemTools::ConvertToOutputPath(path.c_str()); - this->SetSourceDir(path.c_str()); - this->SetBinaryDir(path.c_str()); - } - -} - -void cmMainFrame::UpdateSourceBuildMenus() -{ - - -} - -void cmMainFrame::RunCMake(bool generateProjectFiles) -{ - if(this->m_GeneratorMenu->GetSelection() < 0 || - std::string(this->m_GeneratorMenu->GetValue().c_str()) == "") - { - std::string bindir = this->GetBinaryDir(); - if ( bindir.find("-") != bindir.npos ) - { - std::string message = - "Generator not specified. Please specify the generator for\n" - "building the project."; - wxMessageBox(message.c_str(), "CMake Error", wxICON_ERROR | wxOK ); - return; - } - } - if(std::string(this->m_GeneratorMenu->GetValue().c_str()) == "Borland Makefiles") - { - std::string bindir = this->GetBinaryDir(); - if ( bindir.find("-") != bindir.npos ) - { - std::string message = - "The Borland command line tools do not support path names\n" - "that have - in them. Please re-name your output directory\n" - "and use _ instead of -."; - wxMessageBox(message.c_str(), "CMake Error", wxICON_ERROR | wxOK ); - return; - } - } - if(!cmSystemTools::FileExists(this->GetBinaryDir().c_str())) - { - std::string message = - "Build directory does not exist, should I create it?\n\n" - "Directory: "; - message += this->GetBinaryDir(); - if(wxMessageBox(message.c_str(), "Create Directory", wxICON_WARNING | wxOK | wxCANCEL) == wxOK) - { - cmSystemTools::MakeDirectory(this->GetBinaryDir().c_str()); - } - else - { - (void)wxMessageBox("Build Project aborted, nothing done.", "CMake Aborted", - wxICON_INFORMATION | wxOK); - - return; - } - } - // set the wait cursor - this->CursorBusy(true); - - - // get all the info from the dialog - //this->UpdateData(); - // always save the current gui values to disk - this->SaveCacheFromGUI(); - // Make sure we are working from the cache on disk - this->LoadCacheFromDiskToGUI(); - - - // - this->m_Valid = true; - this->m_OKButton->Enable(false); - - // setup the cmake instance - if (generateProjectFiles) - { - if(this->m_CMakeInstance->Generate() != 0) - { - cmSystemTools::Error( - "Error in generation process, project files may be invalid"); - } - } - else - { - this->m_CMakeInstance->SetHomeDirectory(this->GetSourceDir().c_str()); - this->m_CMakeInstance->SetStartDirectory(this->GetSourceDir().c_str()); - this->m_CMakeInstance->SetHomeOutputDirectory(this->GetBinaryDir().c_str()); - this->m_CMakeInstance->SetStartOutputDirectory(this->GetBinaryDir().c_str()); - this->m_CMakeInstance->SetGlobalGenerator( - this-> m_CMakeInstance->CreateGlobalGenerator( - this->m_GeneratorMenu->GetValue().c_str())); - this->m_CMakeInstance->SetCMakeCommand(this->m_PathToExecutable.c_str()); - this->m_CMakeInstance->LoadCache(); - if(this->m_CMakeInstance->Configure() != 0) - { - cmSystemTools::Error( - "Error in configuration process, project files may be invalid"); - } - - // update the GUI with any new values in the caused by the - // generation process - this->LoadCacheFromDiskToGUI(); - } - - // save source and build paths to registry - this->SaveToRegistry(); - // path is up-to-date now - this->m_BuildPathChanged = false; - // put the cursor back - this->CursorNormal(true); - cmSystemTools::ResetErrorOccuredFlag(); - -} - -//! Save GUI values to cmCacheManager and then save to disk. -void cmMainFrame::SaveCacheFromGUI() -{ - cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); - this->FillCacheManagerFromCacheGUI(); - if(this->GetBinaryDir() != "") - { - cachem->SaveCache(this->GetBinaryDir().c_str()); - } - -} - -// copy from the list box to the cache manager -void cmMainFrame::FillCacheManagerFromCacheGUI() -{ - - cmMainFrame::CacheMapType *items = this->m_CacheEntries; - for(cmMainFrame::CacheMapType::iterator i = items->begin(); - i != items->end(); ++i) - { - cmCacheProperty* item = i->second; - - cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); - cmCacheManager::CacheIterator it = cachem->GetCacheIterator(item->GetName().c_str()); - if (!it.IsAtEnd()) - { - // if value is enclosed in single quotes ('foo') then remove them - // they were used to enforce the fact that it had 'invisible' - // trailing stuff - std::string str = item->GetValue(); - if (str.size() >= 2 && - str[0] == '\'' && - str[str.size() - 1] == '\'') - { - it.SetValue(str.substr(1,str.size() - 2).c_str()); - } - else - { - it.SetValue(str.c_str()); - } - } - } - -} - -void cmMainFrame::UpdateCacheValuesDisplay() -{ - - cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); - - this->m_CacheValuesScroll->Scroll(0,0); - - if ( this->m_Update ) - { - // all the current values are not new any more - cmMainFrame::CacheMapType* uitems = this->m_CacheEntries; - for(cmMainFrame::CacheMapType::iterator i = uitems->begin(); - i != uitems->end(); ++i) - { - cmCacheProperty* item = i->second; - item->SetNewFlag( false ); - } - } - - // redraw the list - this->m_CacheValuesPanel->SetBackgroundColour(*wxWHITE); - cmMainFrame::CacheMapType* nitems = this->m_CacheEntries; - for(cmMainFrame::CacheMapType::iterator i = nitems->begin(); - i != nitems->end(); ++i) - { - cmCacheProperty* item = i->second; - item->Remove(this->m_CacheValuesSizer, this->m_CacheValuesPanel); - } - - //this->m_CacheValuesPanel->SetSize(5,5); - //this->m_CacheValuesPanel->Fit(); - - bool showadvancedvalues = this->m_ShowAdvancedValues->GetValue(); - - int x, y; - this->m_CacheValuesPanel->GetSize(&x, &y); - - for(cmCacheManager::CacheIterator i = cachem->NewIterator(); - !i.IsAtEnd(); i.Next()) - { - const char* key = i.GetName(); - cmMainFrame::CacheMapType::iterator cprop = this->m_CacheEntries->find(key); - cmCacheProperty *property = 0; - if ( cprop != this->m_CacheEntries->end() ) - { - property = cprop->second; - } - - std::string value = i.GetValue(); - - // if value has trailing space or tab, enclose it in single quotes - // to enforce the fact that it has 'invisible' trailing stuff - if (value.size() && - (value[value.size() - 1] == ' ' || - value[value.size() - 1] == '\t')) - { - value = '\'' + value + '\''; - } - - if ( i.GetType() != cmCacheManager::BOOL && - i.GetType() != cmCacheManager::FILEPATH && - i.GetType() != cmCacheManager::PATH && - i.GetType() != cmCacheManager::STRING || - !showadvancedvalues && i.GetPropertyAsBool("ADVANCED") ) - { - continue; - } - - if ( !property ) - { - property = new cmCacheProperty(this, key); - property->SetHelp( i.GetProperty("HELPSTRING") ); - (*this->m_CacheEntries)[key] = property; - } - - if(i.GetPropertyAsBool("ADVANCED")) - { - property->MarkAdvanced(); - } - if ( !property->IsRemoved() ) - { - property->SetValue(value); - switch(i.GetType() ) - { - case cmCacheManager::BOOL: - if(cmSystemTools::IsOn(value.c_str())) - { - property->SetValue("ON"); - } - else - { - property->SetValue("OFF"); - } - property->SetItemType( cmCacheProperty::CHECKBOX ); - break; - case cmCacheManager::PATH: - property->SetItemType( cmCacheProperty::PATH ); - break; - case cmCacheManager::FILEPATH: - property->SetItemType( cmCacheProperty::FILE ); - break; - case cmCacheManager::STRING: - property->SetItemType( cmCacheProperty::EDIT ); - break; - default: - property->MarkRemoved(); - } - } - } - - if(this->m_CacheEntries->size() > 0 && !cmSystemTools::GetErrorOccuredFlag()) - { - bool enable = true; - cmMainFrame::CacheMapType* eitems = this->m_CacheEntries; - for(cmMainFrame::CacheMapType::iterator i = eitems->begin(); - i != eitems->end(); i++) - { - cmCacheProperty* item = i->second; - if(item && item->GetNewFlag() && !item->IsRemoved()) - { - // if one new value then disable to OK button - enable = false; - this->m_Valid = false; - break; - } - } - this->m_OKButton->Enable(this->m_Valid); - this->m_CacheValuesPanel->SetBackgroundColour(wxColor(150, 150, 150)); - } - else - { - this->m_CacheValuesPanel->SetBackgroundColour(*wxWHITE); - } - - if ( this->m_Valid ) - { - this->ClearDirty(); - } - else - { - this->SetDirty(); - } - int max = 0; - int count = 0; - wxSize size1 = this->m_CacheValuesPanel->GetSize(); - size1.SetHeight(1); - this->m_CacheValuesPanel->SetSize(size1); - int height = 0; - // redraw the list - cmMainFrame::CacheMapType::iterator nexti; - for(cmMainFrame::CacheMapType::iterator i = nitems->begin(); - i != nitems->end(); i = nexti) - { - cmCacheProperty* item = i->second; - nexti = i; - nexti++; - if ( item->IsRemoved() ) - { - delete item; - nitems->erase(i); - } - } - - for(cmMainFrame::CacheMapType::iterator i = nitems->begin(); - i != nitems->end(); i++) - { - cmCacheProperty* item = i->second; - if((showadvancedvalues || !item->IsAdvanced()) && !item->GetNewFlag() ) - { - int nm = item->Display(this->m_CacheValuesSizer, this->m_CacheValuesPanel); - height += nm + 1; - count ++; - if ( nm > max ) - { - max = nm; - } - } - } - for(cmMainFrame::CacheMapType::reverse_iterator i = nitems->rbegin(); - i != nitems->rend(); i++) - { - cmCacheProperty* item = i->second; - if((showadvancedvalues || !item->IsAdvanced()) && item->GetNewFlag()) - { - int nm = item->Display(this->m_CacheValuesSizer, this->m_CacheValuesPanel); - height += nm + 1; - count ++; - if ( nm > max ) - { - max = nm; - } - } - } - if ( count > 0 ) - { - this->m_CacheValuesPanel->SetBackgroundColour(wxColor(150, 150, 150)); - } - else - { - this->m_CacheValuesPanel->SetBackgroundColour(*wxWHITE); - this->ClearDirty(); - } - this->m_CacheValuesSizer->Layout(); - - //max += 1; - - // Fix size - int sx, sy; - this->m_CacheValuesScroll->GetClientSize(&sx, &sy); - wxSize size2 = this->m_CacheValuesPanel->GetSize(); - sy = size2.GetHeight(); - this->m_CacheValuesPanel->SetSize(wxSize(sx, height)); - this->m_CacheValuesSizer->Layout(); - this->m_CacheValuesScroll->SetScrollbars(0, 2, 0, height/2); - - this->ResizeInternal(); - -} - -void cmMainFrame::RemoveAdvancedValues() -{ - - cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); - cmMainFrame::CacheMapType* items = this->m_CacheEntries; - - for(cmCacheManager::CacheIterator i = cachem->NewIterator(); - !i.IsAtEnd(); i.Next()) - { - const char* key = i.GetName(); - //const cmCacheManager::CacheEntry& value = i.GetEntry(); - if(i.GetPropertyAsBool("ADVANCED")) - { - cmCacheProperty* property = (*items)[key]; - property->Remove(this->m_CacheValuesSizer, this->m_CacheValuesPanel); - } - } - -} - -void cmMainFrame::ChangeWhereBuild() -{ - - std::string path(this->m_PathBinary->GetValue().c_str()); - cmSystemTools::ConvertToUnixSlashes(path); - std::string cache_file = path; - cache_file += "/CMakeCache.txt"; - - if ( !this->m_CMakeInstance ) - { - - return; - } - - cmCacheManager *cache = this->m_CMakeInstance->GetCacheManager(); - cmCacheManager::CacheIterator it = cache->NewIterator(); - - if (cmSystemTools::FileExists(cache_file.c_str()) && - cache->LoadCache(path.c_str()) && - it.Find("CMAKE_HOME_DIRECTORY")) - { - path = cmSystemTools::ConvertToOutputPath(it.GetValue()); - - if ( this->SetSourceDir(path.c_str()) ) - { - this->ChangeWhereSource(); - } - } - - this->ClearCache(); - this->LoadCacheFromDiskToGUI(); - this->m_BuildPathChanged = true; - -} - -void cmMainFrame::ChangeWhereSource() -{ - - - -} - -bool cmMainFrame::SetSourceDir(const char* dir) -{ - if ( this->m_WhereSource == dir || strlen(dir) == 0 ) - { - return false; - } - if ( this->m_PathSource->FindString(dir) < 0 ) - { - this->m_PathSource->Append(dir); - } - this->m_PathSource->SetValue(dir); - this->m_WhereSource = dir; - this->m_Valid = false; - - return true; -} - -bool cmMainFrame::SetBinaryDir(const char* dir) -{ - if ( this->m_WhereBuild == dir || strlen(dir) == 0 ) - { - - return false; - } - if ( this->m_PathBinary->FindString(dir) < 0 ) - { - this->m_PathBinary->Append(dir); - } - this->m_PathBinary->SetValue(dir); - this->m_WhereBuild = dir; - this->m_Valid = false; - - return true; -} - -void cmMainFrame::ClearCache() -{ - cmMainFrame::CacheMapType* items = this->m_CacheEntries; - for(cmMainFrame::CacheMapType::iterator i = items->begin(); - i != items->end(); ++i) - { - cmCacheProperty* item = i->second; - item->Remove(this->m_CacheValuesSizer, this->m_CacheValuesPanel); - } - - items->erase(items->begin(), items->end()); - -} - -void cmMainFrame::OnBinaryAccepted(wxCommandEvent&) -{ - std::cout << "Pressed enter in binary field" << std::endl; -} - -void cmMainFrame::OnBinarySelected(wxCommandEvent&) -{ - if ( this->BuildDirectoryChanged() ) - { - this->m_WhereBuild = this->GetBinaryDir(); - this->ChangeWhereBuild(); - } - //this->OnConfigure(e); -} - -void cmMainFrame::OnSourceSelected(wxCommandEvent&) -{ - if ( this->SourceDirectoryChanged() ) - { - this->m_WhereSource = this->GetSourceDir(); - } - -} - -std::string cmMainFrame::GetBinaryDir() -{ - return std::string(this->m_PathBinary->GetValue().c_str()); -} - -std::string cmMainFrame::GetSourceDir() -{ - return std::string(this->m_PathSource->GetValue().c_str()); -} - -bool cmMainFrame::SourceDirectoryChanged() -{ - return (this->m_WhereSource != this->GetSourceDir()); -} - -bool cmMainFrame::BuildDirectoryChanged() -{ - return (this->m_WhereBuild != this->GetBinaryDir()); -} - -void cmMainFrame::OnRandomEvent(wxEvent& event) -{ - - if ( event.GetEventType() == wxEVT_UPDATE_UI ) - { - } - else - { - std::cout << "Random event: " << event.GetEventType() << std::endl; - } - -} - -void cmMainFrame::IgnoreCacheEntry(const char* key) -{ - std::cout << "IgnoreCacheEntry " << key << std::endl; -} - -void cmMainFrame::RemoveCacheEntry(cmCacheProperty* cprop) -{ - this->m_Valid = false; - this->m_CMakeInstance->GetCacheManager()->RemoveCacheEntry(cprop->GetName().c_str()); - cprop->MarkRemoved(); - this->m_EntryRemoved = true; -} - -void cmMainFrame::HelpCacheEntry(const char* key, const char* help) -{ - wxMessageBox( help, key, wxICON_INFORMATION | wxOK ); -} - -void cmMainFrame::LoadFromRegistry() -{ -//wxConfigBase *conf = (wxConfigBase*) wxConfigBase::Get();//new wxConfig("CMakeSetup"); - wxConfig *conf = new wxConfig("CMakeSetup"); - conf->SetPath("Settings/StartPath"); - - int cc; - char keyName[1024]; - wxString regvalue; - for ( cc = 1; cc <= 10; cc ++ ) - { - sprintf(keyName, "WhereSource%i", cc); - regvalue = ""; - conf->Read(keyName, ®value); - if ( regvalue.size() > 0 ) - { - if ( cc == 1 ) - { - this->SetSourceDir(regvalue.c_str()); - } - else - { - this->m_PathSource->Append(regvalue); - } - } - sprintf(keyName, "WhereBuild%i", cc); - regvalue = ""; - conf->Read(keyName, ®value); - if ( regvalue.size() > 0 ) - { - if ( cc == 1 ) - { - this->SetBinaryDir(regvalue.c_str()); - } - else - { - this->m_PathBinary->Append(regvalue); - } - } - } - delete conf; -} - -void cmMainFrame::SaveToRegistry() -{ - //wxConfigBase *conf = (wxConfigBase*) wxConfigBase::Get();//new wxConfig("CMakeSetup"); - wxConfig *conf = new wxConfig("CMakeSetup"); - conf->SetPath("Settings/StartPath"); - - wxString regvalue; - if ( !conf->Read("WhereSource1", ®value) ) - { - regvalue = ""; - } - int shiftEnd = 9; - if(this->m_WhereSource != regvalue.c_str()) - { - char keyName[1024]; - char keyName2[1024]; - int i; - for (i = 2; i < 10; ++i) - { - regvalue = ""; - sprintf(keyName,"WhereSource%i",i); - conf->Read(keyName, ®value); - // check for short circuit, if the new value is already in - // the list then we stop - if (this->m_WhereSource == regvalue.c_str()) - { - shiftEnd = i - 1; - } - } - - for (i = shiftEnd; i; --i) - { - regvalue = ""; - sprintf(keyName,"WhereSource%i",i); - sprintf(keyName2,"WhereSource%i",i+1); - - conf->Read(keyName, ®value); - if (strlen(regvalue.c_str())) - { - conf->Write(keyName2, wxString(regvalue.c_str())); - } - } - conf->Write("WhereSource1", wxString(this->m_WhereSource.c_str())); - } - - conf->Read("WhereBuild1", ®value); - if(m_WhereBuild != regvalue.c_str()) - { - int i; - char keyName[1024]; - char keyName2[1024]; - for (i = 2; i < 10; ++i) - { - regvalue = ""; - sprintf(keyName,"WhereBuild%i",i); - conf->Read(keyName, ®value); - // check for short circuit, if the new value is already in - // the list then we stop - if (m_WhereBuild == regvalue.c_str()) - { - shiftEnd = i - 1; - } - } - for (i = shiftEnd; i; --i) - { - regvalue = ""; - sprintf(keyName,"WhereBuild%i",i); - sprintf(keyName2,"WhereBuild%i",i+1); - - conf->Read(keyName, ®value); - if (strlen(regvalue.c_str())) - { - conf->Write(keyName2, wxString(regvalue.c_str())); - } - } - conf->Write("WhereBuild1", wxString(this->m_WhereBuild.c_str())); - } - delete conf; - -} - -void cmMainFrame::SetupStatusBarBinding(wxWindow* win) -{ - win->SetClientData(this); - this->ConnectEventTo(win, wxEVT_MOTION, - (wxObjectEventFunction) &cmMainFrame::OnStatusBar); -} - -void cmMainFrame::SetStatusText(const wxString& text, int number) -{ - this->wxFrame::SetStatusText("________________________________________________"); - this->wxFrame::SetStatusText(text, number); -} - -void cmMainFrame::CursorBusy(bool s) -{ - wxSetCursor(*wxHOURGLASS_CURSOR); - if ( s ) - { - this->m_CursorChanged = true; - } - wxYield(); -} - -void cmMainFrame::CursorNormal(bool s) -{ - wxSetCursor(*wxSTANDARD_CURSOR); - if ( s ) - { - this->m_CursorChanged = false; - } - wxYield(); -} - -void cmMainFrame::OnSourceUpdated(wxCommandEvent& event) -{ - this->OnSourceSelected(event); -} - -void cmMainFrame::OnBinaryUpdated(wxCommandEvent&) -{ - if ( this->BuildDirectoryChanged() ) - { - this->m_WhereBuild = this->GetBinaryDir(); - this->ChangeWhereBuild(); - } -} diff --git a/Source/WXDialog/cmWXMainFrame.h b/Source/WXDialog/cmWXMainFrame.h deleted file mode 100644 index 8f97fd057..000000000 --- a/Source/WXDialog/cmWXMainFrame.h +++ /dev/null @@ -1,243 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __cmMainFrame__h__ -#define __cmMainFrame__h__ - -#include "cmStandardIncludes.h" - -#include "wxincludes.h" - -class cmCacheProperty; -class cmCommandLineInfo; -class cmake; -class wxButton; -class wxCheckBox; -class wxComboBox; -class wxMenu; -class wxPanel; -class wxScrolledWindow; -class wxSizer; -class wxStaticBox; -class wxStaticText; -class wxApp; - -/** \class cmMainFrame - * \brief GUI for CMake with wxWindows toolkit - * - * The main dialog for the CMake - * - */ -class cmMainFrame : public wxFrame -{ -public: - cmMainFrame(const wxString& title, const wxSize& size); - ~cmMainFrame(); - - //! Initialize the paths and read the cache. - void Initialize(cmCommandLineInfo*); - - //! Different callbacks for events - void OnOk(wxCommandEvent& event); - void OnConfigure(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - void OnHelp(wxCommandEvent& event); - void OnBrowseSource(wxCommandEvent& event); - void OnSourceSelected(wxCommandEvent& event); - void OnSourceUpdated(wxCommandEvent& event); - void OnBrowseBinary(wxCommandEvent& event); - void OnBinarySelected(wxCommandEvent& event); - void OnBinaryUpdated(wxCommandEvent& event); - void OnBinaryAccepted(wxCommandEvent& event); - void OnShowAdvancedValues(wxCommandEvent& event); - void OnResize(wxSizeEvent& event); - void OnPropertyChanged(wxEvent& event); - void OnRandomEvent(wxEvent& event); - void OnGeneratorSelected(wxEvent& event); - void OnPopupMenu(wxMouseEvent& event); - void OnCacheStatusBar(wxEvent& event); - void OnStatusBar(wxEvent& event); - void OnExitTimer(wxEvent& event); - - //! Callbacks for menu events - void OnPopupMenuIgnore(wxEvent& event); - void OnPopupMenuDelete(wxEvent& event); - void OnPopupMenuHelp(wxEvent& event); - void OnPopupMenuEntry(wxEvent& event, int idx); - - // Connect widget and event with method. - void ConnectEvent(wxWindow*, wxEventType, wxObjectEventFunction); - void ConnectEventTo(wxWindow*, wxEventType, wxObjectEventFunction); - - //! Callback for the error message. - static void MessageCallback(const char* m, const char* title, - bool& nomore, void* cd); - static void ProgressCallback(const char* m, float prog, void* clientData); - void DisplayMessage(const char* m, const char* title, bool& nomore); - - //! Retrieve the current build directory. - const std::string& GetBuildDir() { return this->m_WhereBuild; } - - //! Set the application for progress - void SetApplication(wxApp* app) { m_Application = app; } - -private: - //! Load cache file from m_WhereBuild and display in GUI editor - void LoadCacheFromDiskToGUI(); - - //! Save GUI values to cmCacheManager and then save to disk. - void SaveCacheFromGUI(); - - // copy from the cache manager to the cache edit list box - void FillCacheGUIFromCacheManager(); - - // copy from the list box to the cache manager - void FillCacheManagerFromCacheGUI(); - - // set the current generator - void SetGenerator(const char* generator); - - // Set the status bar binding. - void SetupStatusBarBinding(wxWindow*); - - // set the current source and binary dir - bool SetSourceDir(const char* dir); - std::string GetSourceDir(); - bool SetBinaryDir(const char* dir); - std::string GetBinaryDir(); - - void ChangeDirectoriesFromFile(const char* buffer); - - // update source and binary menus. - void UpdateSourceBuildMenus(); - - // Check wether cache is dirty. - bool IsDirty() { return !this->m_Clean; } - void SetDirty() { this->m_Clean = false; } - void ClearDirty() { this->m_Clean = true; } - - // Run the CMake - void RunCMake(bool generateProjectFiles); - - void RemoveAdvancedValues(); - void UpdateCacheValuesDisplay(); - - // Change the build directory. - void ChangeWhereSource(); - void ChangeWhereBuild(); - bool SourceDirectoryChanged(); - bool BuildDirectoryChanged(); - - // Clear the Cache - void ClearCache(); - - void RemoveCacheEntry(cmCacheProperty*); - void IgnoreCacheEntry(const char* key); - void HelpCacheEntry(const char* key, const char* help); - - void LoadFromRegistry(); - void SaveToRegistry(); - virtual void SetStatusText(const wxString& text, int number = 0); - void ResizeInternal(); - - //! Change the type of mouse cursor. Set argument to true to store - // the type. - void CursorBusy(bool s=false); - void CursorNormal(bool s=false); - - // Main panel - wxPanel* m_MainPanel; - wxSizer* m_TopMostSizer; - - // Main sizer - wxSizer* m_MainSizer; - - // Top row of main sizer - wxSizer* m_TopGrid; - - // Top line: - wxStaticText* m_TextSource; - wxComboBox* m_PathSource; - wxButton* m_BrowseSource; - - // Top line end frame: - wxSizer* m_GeneratorFrame; - wxStaticText* m_BuildFor; - wxComboBox* m_GeneratorMenu; - - // Bottom line: - wxStaticText* m_TextBinary; - wxComboBox* m_PathBinary; - wxButton* m_BrowseBinary; - wxCheckBox* m_ShowAdvancedValues; - - // Cache values: - wxStaticBox* m_CacheValuesBox; - wxSizer* m_CacheValuesFrame; - wxScrolledWindow* m_CacheValuesScroll; - wxPanel* m_CacheValuesPanel; - wxSizer* m_CacheValuesSizer; - - // Help text: - wxStaticText* m_HelpText; - - // Buttons: - wxSizer* m_BottomButtonsFrame; - wxStaticText* m_VersionText; - wxButton* m_ConfigureButton; - wxButton* m_OKButton; - wxButton* m_CancelButton; - wxButton* m_HelpButton; - - // This is set when the cache has to be updated. - bool m_Update; - - // This is to detect when cache is not valid such as when cache - // entry is removed or when some new entries are present. You have - // to rerun cmake to set valid to true. - bool m_Valid; - - // This is needed for mac, because on mac dialog has to be redrawn - // after the menu is removed. - bool m_EntryRemoved; - - std::string m_WhereSource; - std::string m_WhereBuild; - std::string m_PathToExecutable; - bool m_Clean; - bool m_BuildPathChanged; - bool m_CursorChanged; - - typedef std::map CacheMapType; - - CacheMapType* m_CacheEntries; - cmake* m_CMakeInstance; - wxTimer* m_ExitTimer; - - wxApp* m_Application; - - enum Events { - ID_MainFrame, - ID_Resize, - ID_OKButton, - ID_ConfigureButton, - ID_CancelButton, - ID_HelpButton, - ID_AdvancedValues - }; -}; - -#endif // __cmMainFrame__h__ diff --git a/Source/WXDialog/wxCMakeSetup.cxx b/Source/WXDialog/wxCMakeSetup.cxx deleted file mode 100644 index 2db6f9e36..000000000 --- a/Source/WXDialog/wxCMakeSetup.cxx +++ /dev/null @@ -1,175 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ - -// wxCMakeSetup.cxx : implementation file -// -#include "cmSystemTools.h" -#include "cmWXCommandLineInfo.h" -#include "cmWXMainFrame.h" - -class wxCMakeSetup : public wxApp -{ -public: - virtual bool OnInit(); - virtual int OnExit(); -}; - -class testFrame : public wxFrame -{ -public: - testFrame(const wxString& title, const wxSize& size) - : wxFrame((wxFrame*)NULL, 0, title, wxDefaultPosition, size) - { - wxPanel *panel = new wxPanel(this, -1); - wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); - wxWindow *value = new wxStaticText(panel, -1, "Some label"); - sizer->Add(value, 1, wxALIGN_CENTER_VERTICAL ); - value = new wxButton(panel, -1, "Button", wxDefaultPosition, wxSize(25, 0)); - sizer->Add(value, 0, wxALIGN_RIGHT); - - panel->SetAutoLayout( TRUE ); - panel->SetSizer(sizer); - sizer->Fit(panel); - sizer->SetSizeHints(panel); - sizer->Layout(); - } -}; - -class testFrame1 : public wxFrame -{ -public: - testFrame1(const wxString& title, const wxSize& size) - : wxFrame((wxFrame*)NULL, 0, title, wxDefaultPosition, size) - { - wxPanel *panel = new wxPanel(this, -1); - panel->SetBackgroundColour(*wxRED); - wxSizer *sizer = new wxFlexGridSizer(2, 5, 5); - wxWindow *value = 0; - int cc; - for ( cc = 0; cc < 4; cc ++ ) - { - char buffer[200]; - sprintf(buffer, "Long, Long Label; this label should be " - "bigger than button %d",cc); - value = new wxStaticText(panel, -1, buffer); - sizer->Add(value, 1, wxGROW | wxALL ); - sprintf(buffer, "Button %d", cc); - value = new wxButton(panel, -1, buffer); - sizer->Add(value, 1, wxGROW | wxALL ); - } - panel->SetAutoLayout( TRUE ); - panel->SetSizer(sizer); - sizer->Fit(panel); - sizer->SetSizeHints(panel); - sizer->Layout(); - } -}; - -class testFrame2 : public wxFrame -{ -public: - testFrame2(const wxString& title, const wxSize& size) - : wxFrame((wxFrame*)NULL, 0, title, wxDefaultPosition, size) - { - wxPanel *panel = new wxPanel(this, -1); - panel->SetBackgroundColour(*wxRED); - new wxTextCtrl(panel, -1, "Test", wxPoint(40, 5)); - new wxButton(panel, -1, "Test", wxPoint(-1, 5)); - } -}; - -class testFrame3 : public wxFrame -{ -public: - testFrame3(const wxString& title, const wxSize& size) - : wxFrame((wxFrame*)NULL, 0, title, wxDefaultPosition, size) - { - this->CreateStatusBar(); - this->SetSizeHints(300, 300); - wxPanel *panel = new wxPanel(this, -1); - wxSizer *sizer = new wxFlexGridSizer(2, 5, 5); - wxWindow *value = 0; - int cc; - for ( cc = 0; cc < 10; cc ++ ) - { - char buffer[200]; - sprintf(buffer, "Label %d",cc); - value = new wxStaticText(panel, -1, buffer); - sizer->Add(value, 1, wxGROW | wxALL ); - sprintf(buffer, "Button %d", cc); - value = new wxButton(panel, -1, buffer); - sizer->Add(value, 1, wxGROW | wxALL ); - value->SetClientData(this); - value->Connect(-1, wxEVT_MOTION, - (wxObjectEventFunction) &testFrame3::OnStatusBar); - } - panel->SetAutoLayout( TRUE ); - panel->SetSizer(sizer); - sizer->Fit(panel); - sizer->SetSizeHints(panel); - sizer->Layout(); - } - void OnStatusBar(wxEvent& event) - { - wxControl* eobject = static_cast(event.GetEventObject()); - testFrame3* self = static_cast(eobject->GetClientData()); - wxString str; - const char* chars = "|-\\/jg@_^"; - char ch = chars[((int)eobject)/1024 % strlen(chars)]; - int cc; - for ( cc = 0; cc < 10; cc ++ ) - { - str += ch; - } - self->SetStatusText(str); - } -}; - -bool wxCMakeSetup::OnInit() -{ - cmSystemTools::DisableRunCommandOutput(); - cmCommandLineInfo cm; - cm.SetValidArguments("ABGHQ"); - cm.ParseCommandLine(wxApp::argc, wxApp::argv); - - this->SetVendorName("Kitware"); - this->SetAppName("CMakeSetup"); - - cmMainFrame *frame = new cmMainFrame("CMake", wxSize(200, 100)); - frame->SetApplication(this); - frame->Initialize(&cm); - //wxFrame *frame = new testFrame("CMake", wxSize(200, 100)); - //wxFrame *frame = new testFrame1("Frame", wxSize(200, 100)); - //wxFrame *frame = new testFrame2("Frame", wxSize(200, 100)); - //wxFrame *frame = new testFrame3("Frame", wxSize(200, 100)); - frame->Show(TRUE); - this->SetTopWindow(frame); - - return TRUE; -} - -int wxCMakeSetup::OnExit() -{ - // clean up: Set() returns the active config object as Get() does, but unlike - // Get() it doesn't try to create one if there is none (definitely not what - // we want here!) - //delete wxConfigBase::Set((wxConfigBase *) NULL); - - return 0; -} - -IMPLEMENT_APP(wxCMakeSetup) diff --git a/Source/WXDialog/wxincludes.h b/Source/WXDialog/wxincludes.h deleted file mode 100644 index 690d48d3e..000000000 --- a/Source/WXDialog/wxincludes.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifdef WIN32 - -#ifndef __WIN32 -# define __WIN32 -#endif - -#ifndef _WINDOWS -# define _WINDOWS -#endif - -#ifndef __WINDOWS__ -# define __WINDOWS__ -#endif - -#ifndef __WXMSW__ -# define __WXMSW__ -#endif - -#ifndef __WIN32__ -# define __WIN32__ -#endif - -#ifndef WINVER -# define WINVER 0x0400 -#endif - -#ifndef STRICT -# define STRICT -#endif - - -#include "wx/defs.h" - -#include "wx/app.h" -#include "wx/button.h" -#include "wx/checkbox.h" -#include "wx/combobox.h" -#include "wx/config.h" -#include "wx/control.h" -#include "wx/dirdlg.h" -#include "wx/filedlg.h" -#include "wx/menu.h" -#include "wx/msgdlg.h" -#include "wx/scrolwin.h" -#include "wx/sizer.h" -#include "wx/statbox.h" -#include "wx/stattext.h" -#include "wx/textctrl.h" -#include "wx/timer.h" - -#pragma hdrstop("wxincludes.pch") - -#else - - -#include "wx/defs.h" - -#include "wx/app.h" -#include "wx/button.h" -#include "wx/checkbox.h" -#include "wx/combobox.h" -#include "wx/config.h" -#include "wx/control.h" -#include "wx/dirdlg.h" -#include "wx/filedlg.h" -#include "wx/menu.h" -#include "wx/msgdlg.h" -#include "wx/scrolwin.h" -#include "wx/sizer.h" -#include "wx/statbox.h" -#include "wx/stattext.h" -#include "wx/textctrl.h" -#include "wx/timer.h" - -#endif - -#undef FileExists