diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7b86017e1..6474cb0df 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -478,13 +478,6 @@ IF(BUILD_QtDialog) SUBDIRS(QtDialog) ENDIF(BUILD_QtDialog) -# WX Widgets GUI -OPTION(BUILD_WXDialog "Build wxWidgets dialog for CMake" FALSE) -MARK_AS_ADVANCED(BUILD_WXDialog) -IF(BUILD_WXDialog) - SUBDIRS(WXDialog) -ENDIF(BUILD_WXDialog) - INCLUDE (${CMAKE_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) INCLUDE (${CMAKE_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) diff --git a/Source/WXDialog/CMakeIcon.xpm b/Source/WXDialog/CMakeIcon.xpm deleted file mode 100644 index 4c694c3a6..000000000 --- a/Source/WXDialog/CMakeIcon.xpm +++ /dev/null @@ -1,276 +0,0 @@ -/* XPM */ -static char *CMakeIcon_xpm[] = { -"16 16 256 3", -"000 c black", -"001 c #003F00", -"002 c #003F3F", -"003 c #3F0000", -"004 c #3F003F", -"005 c #3F3F00", -"006 c gray19", -"007 c #00007F", -"008 c #007F00", -"009 c #306F30", -"010 c #7F0000", -"011 c #606060", -"012 c #0000BF", -"013 c blue", -"014 c #00BF00", -"015 c green", -"016 c #BF0000", -"017 c red", -"018 c #909090", -"019 c #C0C0C0", -"020 c none", -"021 c black", -"022 c black", -"023 c black", -"024 c black", -"025 c black", -"026 c black", -"027 c black", -"028 c black", -"029 c black", -"030 c black", -"031 c black", -"032 c black", -"033 c black", -"034 c black", -"035 c black", -"036 c black", -"037 c black", -"038 c black", -"039 c black", -"040 c black", -"041 c black", -"042 c black", -"043 c black", -"044 c black", -"045 c black", -"046 c black", -"047 c black", -"048 c black", -"049 c black", -"050 c black", -"051 c black", -"052 c black", -"053 c black", -"054 c black", -"055 c black", -"056 c black", -"057 c black", -"058 c black", -"059 c black", -"060 c black", -"061 c black", -"062 c black", -"063 c black", -"064 c black", -"065 c black", -"066 c black", -"067 c black", -"068 c black", -"069 c black", -"070 c black", -"071 c black", -"072 c black", -"073 c black", -"074 c black", -"075 c black", -"076 c black", -"077 c black", -"078 c black", -"079 c black", -"080 c black", -"081 c black", -"082 c black", -"083 c black", -"084 c black", -"085 c black", -"086 c black", -"087 c black", -"088 c black", -"089 c black", -"090 c black", -"091 c black", -"092 c black", -"093 c black", -"094 c black", -"095 c black", -"096 c black", -"097 c black", -"098 c black", -"099 c black", -"100 c black", -"101 c black", -"102 c black", -"103 c black", -"104 c black", -"105 c black", -"106 c black", -"107 c black", -"108 c black", -"109 c black", -"110 c black", -"111 c black", -"112 c black", -"113 c black", -"114 c black", -"115 c black", -"116 c black", -"117 c black", -"118 c black", -"119 c black", -"120 c black", -"121 c black", -"122 c black", -"123 c black", -"124 c black", -"125 c black", -"126 c black", -"127 c black", -"128 c black", -"129 c black", -"130 c black", -"131 c black", -"132 c black", -"133 c black", -"134 c black", -"135 c black", -"136 c black", -"137 c black", -"138 c black", -"139 c black", -"140 c black", -"141 c black", -"142 c black", -"143 c black", -"144 c black", -"145 c black", -"146 c black", -"147 c black", -"148 c black", -"149 c black", -"150 c black", -"151 c black", -"152 c black", -"153 c black", -"154 c black", -"155 c black", -"156 c black", -"157 c black", -"158 c black", -"159 c black", -"160 c black", -"161 c black", -"162 c black", -"163 c black", -"164 c black", -"165 c black", -"166 c black", -"167 c black", -"168 c black", -"169 c black", -"170 c black", -"171 c black", -"172 c black", -"173 c black", -"174 c black", -"175 c black", -"176 c black", -"177 c black", -"178 c black", -"179 c black", -"180 c black", -"181 c black", -"182 c black", -"183 c black", -"184 c black", -"185 c black", -"186 c black", -"187 c black", -"188 c black", -"189 c black", -"190 c black", -"191 c black", -"192 c black", -"193 c black", -"194 c black", -"195 c black", -"196 c black", -"197 c black", -"198 c black", -"199 c black", -"200 c black", -"201 c black", -"202 c black", -"203 c black", -"204 c black", -"205 c black", -"206 c black", -"207 c black", -"208 c black", -"209 c black", -"210 c black", -"211 c black", -"212 c black", -"213 c black", -"214 c black", -"215 c black", -"216 c black", -"217 c black", -"218 c black", -"219 c black", -"220 c black", -"221 c black", -"222 c black", -"223 c black", -"224 c black", -"225 c black", -"226 c black", -"227 c black", -"228 c black", -"229 c black", -"230 c black", -"231 c black", -"232 c black", -"233 c black", -"234 c black", -"235 c black", -"236 c black", -"237 c black", -"238 c black", -"239 c black", -"240 c black", -"241 c black", -"242 c black", -"243 c black", -"244 c black", -"245 c black", -"246 c black", -"247 c black", -"248 c black", -"249 c black", -"250 c black", -"251 c black", -"252 c black", -"253 c black", -"254 c black", -"255 c black", -"020020020020020020020020020020020020020020020020", -"020020020020020020020000000020020020020020020020", -"020020020020020020020000003020020020020020020020", -"020020020020020020000012010000020020020020020020", -"020020020020020020007013010003020020020020020020", -"020020020020020000013013010016000020020020020020", -"020020020020020007013013004017003020020020020020", -"020020020020000013013013007017016000020020020020", -"020020020020007013013012006017017003020020020020", -"020020020000012013012018011017017016000020020020", -"020020020007013012009018019010017017003020020020", -"020020000013012014015014009010017017016000020020", -"020020007007014015015015015008005016017003020020", -"020000002015015015015015015015015014005010000020", -"020000008008008008008008008008008008008001000020", -"020020020020020020020020020020020020020020020020" -}; diff --git a/Source/WXDialog/CMakeLists.txt b/Source/WXDialog/CMakeLists.txt deleted file mode 100644 index 9ee8b9153..000000000 --- a/Source/WXDialog/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -##--------------------------------------------------------------------------- -## $RCSfile$ -## $Source$ -## $Revision$ -## $Date$ -##--------------------------------------------------------------------------- -## Author: Jorgen Bodde -## Copyright: (c) Jorgen Bodde -## License: wxWidgets License -##--------------------------------------------------------------------------- - -# wxWindows -> wxWidgets Jan Woetzel 07/2006 -# tested with wx 2.6.3 with "multilib" build on Windows XP - -# CMake Options -SET(CMAKE_VERBOSE_MAKEFILE TRUE) - -# suppress wx header warnings? -#SET(HAVE_ISYSTEM 1) - -# in addition to wx std libs we need -SET( wxWidgets_USE_LIBS - std - html adv xml xrc ) -FIND_PACKAGE(wxWidgets REQUIRED) -#INCLUDE(${CMAKE_ROOT}/Modules/FindwxWidgets.cmake) - -# Start using wx stuff when it is fully found and set -IF(wxWidgets_FOUND) - INCLUDE( ${wxWidgets_USE_FILE} ) - - SET (CMAKE_SRCS - CMakeSetupFrame.cpp - CMakeSetup.cpp - CMakeSetupFrame.h - CMakeSetup.h - PropertyList.cpp - PropertyList.h - app_resources.cpp - app_resources.h - progressdlg.cpp - progressdlg.h - aboutdlg.cpp - aboutdlg.h - optionsdlg.cpp - optionsdlg.h - config.h - CommandLineInfo.cpp - CommandLineInfo.h ) - - # include .rc when windows - IF(WIN32) - SET ( CMAKE_SRCS ${CMAKE_SRCS} CMakeSetup.rc ) - ENDIF(WIN32) - - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/Source/WXDialog - ${wxWidgets_INCLUDE_DIR} ) - LINK_DIRECTORIES( ${wxWidgets_LINK_DIRECTORIES} - ${CMake_BINARY_DIR}/Source - ${CMake_BINARY_DIR}/Source/kwsys ) - - IF(APPLE) - ADD_EXECUTABLE(WXDialog MACOSX_BUNDLE ${CMAKE_SRCS}) - ELSE(APPLE) - ADD_EXECUTABLE(WXDialog WIN32 ${CMAKE_SRCS}) - ENDIF(APPLE) - INSTALL_TARGETS(/bin WXDialog) - - # not required on MSVS beause bound to _DEBUG, - # but other compiler may need it. - # However, the define prevents multiple build configurations - # in one build tree, - # e.g. MSVS supports Debug;Release - # TODO: shall we add the define or not - - # favor multi config or all compilers? (JW) - SET(CMAKE_CXX_FLAGS_DEBUG - "${CMAKE_CXX_FLAGS_DEBUG} -D__WXDEBUG__ -DWXDEBUG=1") - - IF(LINUX) - ADD_DEFINITIONS( -DLINUX=1 ) - ENDIF(LINUX) - - # if the checkbox view functionality is not desired, - # exclude this part from the smple - TARGET_LINK_LIBRARIES(WXDialog ${wxWidgets_LIBRARIES} cmsys CMakeLib) - INSTALL_TARGETS(/bin WXDialog) -ENDIF(wxWidgets_FOUND) diff --git a/Source/WXDialog/CMakeSetup.cpp b/Source/WXDialog/CMakeSetup.cpp deleted file mode 100644 index 32bb3e176..000000000 --- a/Source/WXDialog/CMakeSetup.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "CMakeSetup.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes - -#include - -#include "cmSystemTools.h" -#include "CommandLineInfo.h" - -#include "CMakeSetup.h" -#include "CMakeSetupFrame.h" - -////@begin XPM images -////@end XPM images - -/*! - * Application instance implementation - */ - -////@begin implement app -IMPLEMENT_APP( CMakeSetupApp ) -////@end implement app - -/*! - * CMakeSetupApp type definition - */ - -IMPLEMENT_CLASS( CMakeSetupApp, wxApp ) - -/*! - * CMakeSetupApp event table definition - */ - -BEGIN_EVENT_TABLE( CMakeSetupApp, wxApp ) - -////@begin CMakeSetupApp event table entries -////@end CMakeSetupApp event table entries - -END_EVENT_TABLE() - -/*! - * Constructor for CMakeSetupApp - */ - -CMakeSetupApp::CMakeSetupApp() -{ -////@begin CMakeSetupApp member initialisation -////@end CMakeSetupApp member initialisation -} - -/*! - * Initialisation for CMakeSetupApp - */ - -bool CMakeSetupApp::OnInit() -{ - cmSystemTools::DisableRunCommandOutput(); - - // parse command line params - cmCommandLineInfo cm; - if(!cm.ParseCommandLine(wxApp::argc, wxApp::argv)) - { - printf("Error while parsing the command line\n"); - return false; - } - - // set vendor name and app for config - SetVendorName("Kitware"); - SetAppName("CMakeSetup"); - - CMakeSetupFrm *MyFrame = new CMakeSetupFrm(NULL); - - // alternative app path way, somehow otherwise it does not work - wxFileName fname(argv[0]); - MyFrame->DoInitFrame(cm, fname.GetPath(wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME)); - MyFrame->Show(TRUE); - - return true; -} - -/*! - * Cleanup for CMakeSetupApp - */ -int CMakeSetupApp::OnExit() -{ -////@begin CMakeSetupApp cleanup - return wxApp::OnExit(); -////@end CMakeSetupApp cleanup -} - diff --git a/Source/WXDialog/CMakeSetup.h b/Source/WXDialog/CMakeSetup.h deleted file mode 100644 index df1cc7761..000000000 --- a/Source/WXDialog/CMakeSetup.h +++ /dev/null @@ -1,92 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 _CMAKESETUP_H_ -#define _CMAKESETUP_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "CMakeSetup.cpp" -#endif - -/*! - * Includes - */ - -////@begin includes -#include "wx/image.h" -////@end includes - -/*! - * Forward declarations - */ - -////@begin forward declarations -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -////@end control identifiers - -/*! - * CMakeSetupApp class declaration - */ - -class CMakeSetupApp: public wxApp -{ - DECLARE_CLASS( CMakeSetupApp ) - DECLARE_EVENT_TABLE() - -public: - /// Constructor - CMakeSetupApp(); - - /// Initialises the application - virtual bool OnInit(); - - /// Called on exit - virtual int OnExit(); - -////@begin CMakeSetupApp event handler declarations - -////@end CMakeSetupApp event handler declarations - -////@begin CMakeSetupApp member function declarations - -////@end CMakeSetupApp member function declarations - -////@begin CMakeSetupApp member variables -////@end CMakeSetupApp member variables - -private: - wxString m_AppPath; -}; - -/*! - * Application instance declaration - */ - -////@begin declare app -DECLARE_APP(CMakeSetupApp) -////@end declare app - -#endif - // _CMAKESETUP_H_ diff --git a/Source/WXDialog/CMakeSetup.pjd b/Source/WXDialog/CMakeSetup.pjd deleted file mode 100644 index fec0a4f63..000000000 --- a/Source/WXDialog/CMakeSetup.pjd +++ /dev/null @@ -1,3514 +0,0 @@ - - - - 1.0 - dialogblocks - - Project File - - - 0 - - - - - 87 - - FALSE - FALSE - FALSE - TRUE - TRUE - FALSE - Jorgen Bodde - - - FALSE - <All platforms> - <Any> - ///////////////////////////////////////////////////////////////////////////// -// Name: %HEADER-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - - - ///////////////////////////////////////////////////////////////////////////// -// Name: %SOURCE-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - - - /*! - * %BODY% - */ - - - ///////////////////////////////////////////////////////////////////////////// -// Name: %SYMBOLS-FILENAME% -// Purpose: Symbols file -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - - - app_resources.h - app_resources.cpp - AppResources - app.h - app.cpp - Application - FALSE - - <None> - - - 15088528 - data-document - - - 0 - 1 - 0 - 0 - 0 - - Configurations - 15310432 - config-data-document - - - 0 - 1 - 0 - 15088528 - 0 - - TRUE - - Debug - ANSI - Static - Modular - GUI - wxMSW - Dynamic - Yes - No - No - %WXVERSION% - %EXECUTABLE% - - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - %AUTO% - - - - Projects - 15057456 - root-document - - project - 1 - 1 - 0 - 0 - 0 - - Windows - 15140496 - html-document - - dialogsfolder - 1 - 1 - 0 - 15057456 - 1 - - CMakeSetupApp - 14833712 - dialog-document - - app - 0 - 1 - 0 - 15140496 - 0 - 7/4/2005 - wbAppProxy - 10000 - FALSE - - CMakeSetupApp - wxApp - CMakeSetup.cpp - CMakeSetup.h - - - - - CMake Setup - 15139352 - dialog-document - - frame - 0 - 1 - 0 - 15140496 - 0 - 7/4/2005 - wbFrameProxy - 10100 - FALSE - - wxEVT_CLOSE_WINDOW|OnCloseWindow - ID_FRAME - 10100 - CMakeSetupFrm - wxFrame - CMakeSetupFrame.cpp - CMakeSetupFrame.h - - CMake Setup v2.0.x - TRUE - cmake_icon.xpm - FALSE - - - - - - FALSE - <Any platform> - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - FALSE - - FALSE - FALSE - -1 - -1 - 600 - 550 - - - wxSplitterWindow: ID_SPLITTERWINDOW - 15327264 - dialog-control-document - - splitter - 0 - 1 - 0 - 15139352 - 0 - 7/4/2005 - wbSplitterWindowProxy - wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING|OnSplitterPosChanging - wxEVT_COMMAND_SPLITTER_DOUBLECLICKED|OnSplitterwindowSashDClick - ID_SPLITTERWINDOW - 10101 - wxSplitterWindow - wxSplitterWindow - m_splitter - TRUE - Horizontal - 300 - - - - - - FALSE - <Any platform> - TRUE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - 100 - 100 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - wxPanel: ID_MAINPANEL - 15222232 - dialog-control-document - - panel - 0 - 1 - 0 - 15327264 - 0 - 7/4/2005 - wbPanelProxy - ID_MAINPANEL - 10102 - wxPanel - wxPanel - - FALSE - - - - - - FALSE - <Any platform> - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - TRUE - FALSE - - TRUE - -1 - -1 - 600 - 400 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - TRUE - - - - - wxBoxSizer V - 15211392 - dialog-control-document - - sizer - 0 - 1 - 0 - 15222232 - 0 - 7/4/2005 - wbBoxSizerProxy - Vertical - - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxBoxSizer H - 15336232 - dialog-control-document - - sizer - 0 - 1 - 0 - 15211392 - 0 - 7/4/2005 - wbBoxSizerProxy - Horizontal - - Expand - Centre - 0 - 5 - FALSE - FALSE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxFlexGridSizer - 15345208 - dialog-control-document - - sizer - 0 - 1 - 0 - 15336232 - 0 - 7/4/2005 - wbFlexGridSizerProxy - 1 - 1 - 3 - 2 - 0 - 0 - - <Any platform> - Centre - Top - 1 - 5 - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - wxStaticText: wxID_STATIC - 15174904 - dialog-control-document - - statictext - 0 - 1 - 0 - 15345208 - 0 - 7/4/2005 - wbStaticTextProxy - wxID_STATIC - 5105 - wxStaticText - - CMake project path - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Left - Centre - 0 - 5 - TRUE - TRUE - FALSE - FALSE - FALSE - TRUE - FALSE - - - - - wxTextCtrl: ID_PROJECT_PATH - 15369448 - dialog-control-document - - textctrl - 0 - 1 - 0 - 15345208 - 0 - 7/4/2005 - wbTextCtrlProxy - ID_PROJECT_PATH - 10103 - wxTextCtrl - m_cmProjectPath - - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - 50 - -1 - Expand - Centre - 1 - 5 - FALSE - FALSE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxButton: ID_BROWSE_PROJECT - 15341600 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 15345208 - 0 - 7/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnButtonBrowseProject - ID_BROWSE_PROJECT - 10104 - wxButton - m_BrowseProjectPathButton - Browse - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - 55 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxStaticText: wxID_STATIC - 15095456 - dialog-control-document - - statictext - 0 - 1 - 0 - 15345208 - 0 - 7/4/2005 - wbStaticTextProxy - wxID_STATIC - 5105 - wxStaticText - - Project build path - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Left - Centre - 0 - 5 - TRUE - TRUE - FALSE - FALSE - FALSE - TRUE - FALSE - - - - - wxTextCtrl: ID_SOURCE_BUILD_PATH - 15114544 - dialog-control-document - - textctrl - 0 - 1 - 0 - 15345208 - 0 - 7/4/2005 - wbTextCtrlProxy - wxEVT_COMMAND_TEXT_UPDATED|OnSourceBuildPathUpdated - wxEVT_COMMAND_TEXT_ENTER|OnSourceBuildPathEnter - ID_SOURCE_BUILD_PATH - 10105 - wxTextCtrl - m_cmBuildPath - - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - 50 - -1 - Expand - Top - 1 - 5 - FALSE - FALSE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxButton: ID_BROWSE_BUILD - 15258912 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 15345208 - 0 - 7/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnButtonBrowseBuild - ID_BROWSE_BUILD - 10106 - wxButton - m_BrowseSourcePathButton - Browse - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - 55 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - wxBoxSizer V - 15234376 - dialog-control-document - - sizer - 0 - 1 - 0 - 15336232 - 0 - 7/4/2005 - wbBoxSizerProxy - Vertical - - Centre - Expand - 0 - 5 - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - <Any platform> - - wxFlexGridSizer - 15190200 - dialog-control-document - - sizer - 0 - 1 - 0 - 15234376 - 0 - 21/4/2005 - wbFlexGridSizerProxy - - - 2 - 2 - 0 - 0 - - <Any platform> - Centre - Centre - 0 - 5 - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - - wxStaticText: wxID_STATIC - 15184416 - dialog-control-document - - statictext - 0 - 1 - 0 - 15190200 - 0 - 28/4/2005 - wbStaticTextProxy - wxID_STATIC - 5105 - wxStaticText - - Generate - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Left - Centre - 0 - 5 - FALSE - TRUE - FALSE - FALSE - FALSE - TRUE - FALSE - - - - - wxComboBox: ID_CHOOSE_GENERATOR - 15380104 - dialog-control-document - - combobox - 0 - 1 - 0 - 15190200 - 0 - 28/4/2005 - wbComboBoxProxy - ID_CHOOSE_GENERATOR - 10107 - wxComboBox - m_cmGeneratorChoice - - - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - TRUE - FALSE - FALSE - - -1 - -1 - 170 - -1 - Centre - Expand - 1 - 5 - FALSE - FALSE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxStaticText: wxID_STATIC - 15143832 - dialog-control-document - - statictext - 0 - 1 - 0 - 15190200 - 0 - 21/4/2005 - wbStaticTextProxy - wxID_STATIC - 5105 - wxStaticText - - Search - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Left - Centre - 0 - 5 - FALSE - TRUE - FALSE - FALSE - FALSE - TRUE - FALSE - - - - - wxComboBox: ID_SEARCHQUERY - 15164688 - dialog-control-document - - combobox - 0 - 1 - 0 - 15190200 - 0 - 21/4/2005 - wbComboBoxProxy - wxEVT_COMMAND_COMBOBOX_SELECTED|OnSearchquerySelected - wxEVT_COMMAND_TEXT_UPDATED|OnSearchqueryUpdated - ID_SEARCHQUERY - 10109 - wxComboBox - m_cmSearchQuery - - - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - TRUE - - -1 - -1 - 170 - -1 - Centre - Expand - 1 - 5 - FALSE - FALSE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - wxCheckBox: ID_SHOW_ADVANCED - 15248616 - dialog-control-document - - checkbox - 0 - 1 - 0 - 15234376 - 0 - 7/4/2005 - wbCheckBoxProxy - wxEVT_COMMAND_CHECKBOX_CLICKED|OnShowAdvancedValues - ID_SHOW_ADVANCED - 10108 - wxCheckBox - m_cmShowAdvanced - Show advanced values - FALSE - - - - - - - - FALSE - <Any platform> - FALSE - TRUE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Right - Centre - 0 - 5 - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - - - - - - - wxGrid: ID_OPTIONS - 15335040 - dialog-control-document - - grid - 0 - 1 - 0 - 15211392 - 0 - 7/4/2005 - wbGridProxy - wxEVT_GRID_CELL_CHANGE|OnCellChange - wxEVT_GRID_SELECT_CELL|OnGridSelectCell - wxEVT_MOTION|OnPropertyMotion - ID_OPTIONS - 10110 - wxPropertyList - wxGrid - m_cmOptions - TRUE - 10 - 2 - 250 - 25 - 20 - 0 - Rows - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - TRUE - FALSE - FALSE - TRUE - FALSE - - -1 - -1 - 200 - 150 - Expand - Centre - 1 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - - wxPanel: ID_LOGPANEL - 15443800 - dialog-control-document - - panel - 0 - 1 - 0 - 15327264 - 0 - 7/4/2005 - wbPanelProxy - ID_LOGPANEL - 10111 - wxPanel - wxPanel - - FALSE - - - - - - FALSE - <Any platform> - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - FALSE - - TRUE - -1 - -1 - -1 - 100 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - TRUE - - - - - wxBoxSizer V - 15414728 - dialog-control-document - - sizer - 0 - 1 - 0 - 15443800 - 0 - 7/4/2005 - wbBoxSizerProxy - Vertical - - Centre - Centre - 1 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxBoxSizer H - 15422736 - dialog-control-document - - sizer - 0 - 1 - 0 - 15414728 - 0 - 8/4/2005 - wbBoxSizerProxy - Horizontal - - Expand - Centre - 1 - 5 - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - <Any platform> - - wxTextCtrl: ID_LOG_AREA - 15432752 - dialog-control-document - - textctrl - 0 - 1 - 0 - 15422736 - 0 - 8/4/2005 - wbTextCtrlProxy - ID_LOG_AREA - 10112 - wxTextCtrl - m_cmLog - Select your project path (where CMakeLists.txt is) and then select the build path (where the projects should be saved), or select a previous build path. - -Right click on a cache value for additional options (delete and ignore). Press configure to update and display new values in red, press OK to generate the projects and exit. - - - - - - FALSE - <Any platform> - - - TRUE - FALSE - FALSE - FALSE - TRUE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - - -1 - -1 - -1 - -1 - Expand - Expand - 1 - 5 - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - - - - - wxTextCtrl: ID_DESCRIPTION - 35749000 - dialog-control-document - - textctrl - 0 - 1 - 0 - 15422736 - 0 - 8/4/2005 - wbTextCtrlProxy - ID_DESCRIPTION - 10113 - wxTextCtrl - m_cmDescription - - - - - - - FALSE - <Any platform> - - - TRUE - FALSE - FALSE - FALSE - TRUE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - - -1 - -1 - 200 - -1 - Centre - Expand - 0 - 5 - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - - - - - wxBoxSizer H - 35769328 - dialog-control-document - - sizer - 0 - 1 - 0 - 15414728 - 0 - 7/4/2005 - wbBoxSizerProxy - Horizontal - - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxButton: ID_DO_CONFIGURE - 35775496 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 35769328 - 0 - 7/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnButtonConfigure - ID_DO_CONFIGURE - 10114 - wxButton - m_ConfigureButton - Co&nfigure - TRUE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxButton: ID_DO_OK - 35789784 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 35769328 - 0 - 7/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnButtonOk - ID_DO_OK - 10115 - wxButton - m_OkButton - &Generate! - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxButton: ID_DO_CANCEL - 35804120 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 35769328 - 0 - 23/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnButtonCancel - ID_DO_CANCEL - 10116 - wxButton - m_CancelButton - C&ancel - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxStaticLine: wxID_STATIC - 35818312 - dialog-control-document - - staticline - 0 - 1 - 0 - 35769328 - 0 - 23/4/2005 - wbStaticLineProxy - wxID_STATIC - 5105 - wxStaticLine - - - - - FALSE - __WXMSW__ - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Expand - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - wxButton: ID_DO_DELETE_CACHE - 35831264 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 35769328 - 0 - 8/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnButtonDeleteCache - ID_DO_DELETE_CACHE - 10117 - wxButton - m_DeleteCacheButton - &Delete Cache - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxButton: ID_CLEAR_LOG - 35845416 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 35769328 - 0 - 23/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnClearLogClick - ID_CLEAR_LOG - 10118 - wxButton - m_ClearLogButton - Clear &Log - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxStaticLine: wxID_STATIC - 35859640 - dialog-control-document - - staticline - 0 - 1 - 0 - 35769328 - 0 - 23/4/2005 - wbStaticLineProxy - wxID_STATIC - 5105 - wxStaticLine - - - - - FALSE - __WXMSW__ - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Expand - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - wxButton: ID_BROWSE_GRID - 35872520 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 35769328 - 0 - 23/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnBrowseGridClick - ID_BROWSE_GRID - 10119 - wxButton - m_cmBrowseCell - &Browse - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - - - - wxStatusBar: ID_STATUSBAR - 15182152 - dialog-control-document - - statusbar - 0 - 1 - 0 - 15139352 - 0 - 7/4/2005 - wbStatusBarProxy - ID_STATUSBAR - 10120 - wxStatusBar - - - - - - - FALSE - <Any platform> - 2 - - - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxMenuBar: ID_CMAKE_MENUBAR - 35895160 - dialog-control-document - - menubar - 0 - 1 - 0 - 15139352 - 0 - 19/4/2005 - wbMenuBarProxy - ID_CMAKE_MENUBAR - <Any platform> - - File - 35897080 - dialog-control-document - - menu - 0 - 1 - 0 - 35895160 - 0 - 19/4/2005 - wbMenuProxy - &File - <Any platform> - - &Reload Cache\tCtrl+R: ID_MENU_RELOAD_CACHE - 35899080 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35897080 - 0 - 19/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnMenuReloadCacheClick - ID_MENU_RELOAD_CACHE - 10122 - &Reload Cache\tCtrl+R - Normal - FALSE - Reload the cache from disk - - <Any platform> - - - &Delete Cache\tCtrl+D: ID_MENU_DELETE_CACHE - 35902816 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35897080 - 0 - 19/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnMenuDeleteCacheClick - ID_MENU_DELETE_CACHE - 10123 - &Delete Cache\tCtrl+D - Normal - FALSE - Delete the cache on disk of the current path - - <Any platform> - - - ------------ - 35906472 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35897080 - 0 - 19/4/2005 - wbMenuSeparatorProxy - <Any platform> - - - E&xit\tAlt+F4: ID_MENU_QUIT - 35908352 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35897080 - 0 - 19/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnMenuQuitClick - ID_MENU_QUIT - 10125 - E&xit\tAlt+F4 - Normal - FALSE - Quit CMake Setup - - <Any platform> - - - - Tools - 35912048 - dialog-control-document - - menu - 0 - 1 - 0 - 35895160 - 0 - 29/4/2005 - wbMenuProxy - &Tools - <Any platform> - - &Configure\tCtrl+N: ID_MENU_CONFIGURE - 35913904 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35912048 - 0 - 31/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnMenuConfigureClick - ID_MENU_CONFIGURE - 10126 - &Configure\tCtrl+N - Normal - FALSE - - - <Any platform> - - - &Generate and Exit\tCtrl+G: ID_MENU_EXITGENERATE - 35917648 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35912048 - 0 - 31/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnMenuGenerateClick - ID_MENU_EXITGENERATE - 10127 - &Generate and Exit\tCtrl+G - Normal - FALSE - - - <Any platform> - - - Toggle &Advanced\tCtrl+A: ID_MENU_TOGGLE_ADVANCED - 35921344 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35912048 - 0 - 31/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnMenuToggleAdvancedClick - ID_MENU_TOGGLE_ADVANCED - 10128 - Toggle &Advanced\tCtrl+A - Normal - FALSE - - - <Any platform> - - - ------------ - 35925000 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35912048 - 0 - 31/4/2005 - wbMenuSeparatorProxy - <Any platform> - - - &Options\tCtrl+O: ID_CMAKE_OPTIONS - 35926880 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35912048 - 0 - 31/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnOptionsClick - ID_CMAKE_OPTIONS - 10124 - &Options\tCtrl+O - Normal - FALSE - - - <Any platform> - - - - Help - 35930576 - dialog-control-document - - menu - 0 - 1 - 0 - 35895160 - 0 - 29/4/2005 - wbMenuProxy - &Help - <Any platform> - - &About ...: ID_ABOUTDLG - 35932424 - dialog-control-document - - menuitem - 0 - 1 - 0 - 35930576 - 0 - 29/4/2005 - wbMenuItemProxy - wxEVT_COMMAND_MENU_SELECTED|OnAboutClick - ID_ABOUTDLG - 10121 - &About ... - Normal - FALSE - Shows the about dialog ... - - <Any platform> - - - - - - CachePopupMenu - 15138824 - dialog-document - - menu - 0 - 1 - 0 - 15140496 - 0 - wbStandaloneMenuProxy - 10050 - FALSE - - ID_MENU - CreatePopupMenu - <Any platform> - - &Ignore cache entry: ID_CACHE_IGNORE - 35936824 - dialog-control-document - - menuitem - 0 - 1 - 0 - 15138824 - 0 - 16/4/2005 - wbMenuItemProxy - ID_CACHE_IGNORE - 10051 - &Ignore cache entry - Normal - FALSE - Ignores the value of the current cache entry - - <Any platform> - - - &Delete cache entry: ID_CACHE_DELETE - 35940576 - dialog-control-document - - menuitem - 0 - 1 - 0 - 15138824 - 0 - 16/4/2005 - wbMenuItemProxy - ID_CACHE_DELETE - 10052 - &Delete cache entry - Normal - FALSE - Deletes the current cache entry (reverts on next configure) - - <Any platform> - - - ------------ - 35944192 - dialog-control-document - - menuitem - 0 - 1 - 0 - 15138824 - 0 - 23/4/2005 - wbMenuSeparatorProxy - <Any platform> - - - &Browse ...: ID_CACHE_BROWSE - 35945856 - dialog-control-document - - menuitem - 0 - 1 - 0 - 15138824 - 0 - 23/4/2005 - wbMenuItemProxy - ID_CACHE_BROWSE - 10053 - &Browse ... - Normal - FALSE - - - <Any platform> - - - - Progress Dialog - 35949536 - dialog-document - - dialog - 0 - 1 - 0 - 15140496 - 0 - 27/4/2005 - wbDialogProxy - 10000 - FALSE - - ID_PROGRESSDLG - 10000 - CMProgressDialog - wxDialog - wxDialog - progressdlg.cpp - progressdlg.h - - Progress Dialog - TRUE - - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - - FALSE - TRUE - -1 - -1 - 400 - 300 - - - wxBoxSizer V - 35967376 - dialog-control-document - - sizer - 0 - 1 - 0 - 35949536 - 0 - wbBoxSizerProxy - Vertical - - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - Spacer - 35975296 - dialog-control-document - - spacer - 0 - 1 - 0 - 35967376 - 0 - 27/4/2005 - wbSpacerProxy - 5 - 5 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - - wxStaticText: wxID_STATIC - 35982864 - dialog-control-document - - statictext - 0 - 1 - 0 - 35967376 - 0 - 27/4/2005 - wbStaticTextProxy - wxID_STATIC - 5105 - wxStaticText - m_textMessage - Please wait while CMake configures ... - - - - - - FALSE - <Any platform> - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - TRUE - FALSE - - - - - wxBoxSizer H - 35998688 - dialog-control-document - - sizer - 0 - 1 - 0 - 35967376 - 0 - 27/4/2005 - wbBoxSizerProxy - Horizontal - - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxGauge: ID_CMAKE_PROGRESS - 36006648 - dialog-control-document - - gauge - 0 - 1 - 0 - 35998688 - 0 - 27/4/2005 - wbGaugeProxy - ID_CMAKE_PROGRESS - 10001 - wxGauge - m_progress - 0 - 100 - - - - - - FALSE - <Any platform> - - - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - 250 - 20 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - wxButton: ID_CMAKE_BUTTON - 36022448 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 35967376 - 0 - 27/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnCmakeCancelClick - ID_CMAKE_BUTTON - 10002 - wxButton - - &Cancel - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - Spacer - 36035776 - dialog-control-document - - spacer - 0 - 1 - 0 - 35967376 - 0 - 27/4/2005 - wbSpacerProxy - 5 - 5 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - <Any platform> - - - - - About ... - 15317784 - dialog-document - - dialog - 0 - 1 - 0 - 15140496 - 0 - 27/4/2005 - wbDialogProxy - 10000 - FALSE - - ID_SOME_ABOUTDLG - 10003 - CMAboutDlg - wxDialog - wxDialog - aboutdlg.cpp - aboutdlg.h - - About ... - TRUE - - FALSE - - - - - - FALSE - <Any platform> - FALSE - TRUE - TRUE - FALSE - TRUE - FALSE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - - FALSE - TRUE - -1 - -1 - 400 - 300 - - - wxBoxSizer V - 36057296 - dialog-control-document - - sizer - 0 - 1 - 0 - 15317784 - 0 - wbBoxSizerProxy - Vertical - - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxFlexGridSizer - 36065536 - dialog-control-document - - sizer - 0 - 1 - 0 - 36057296 - 0 - 28/4/2005 - wbFlexGridSizerProxy - 1 - 0 - 2 - 1 - 0 - 0 - - <Any platform> - Expand - Centre - 1 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - wxStaticBitmap: wxID_STATIC - 36075864 - dialog-control-document - - staticbitmap - 0 - 1 - 0 - 36065536 - 0 - 28/4/2005 - wbStaticBitmapProxy - wxID_STATIC - 5105 - wxStaticBitmap - m_cmIcon - - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - 32 - 32 - Centre - Top - 0 - 5 - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - FALSE - - - - - wxHtmlWindow: ID_HTMLWINDOW - 36090408 - dialog-control-document - - htmlwindow - 0 - 1 - 0 - 36065536 - 0 - 28/4/2005 - wbHtmlWindowProxy - ID_HTMLWINDOW - 10000 - wxHtmlWindow - m_html - - - - - - - - FALSE - <Any platform> - - - FALSE - TRUE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - TRUE - FALSE - - -1 - -1 - 500 - 300 - Expand - Expand - 1 - 5 - FALSE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - wxButton: ID_ABOUT_DLG_OK - 36107664 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 36057296 - 0 - 28/4/2005 - wbButtonProxy - wxEVT_COMMAND_BUTTON_CLICKED|OnAboutDlgClick - ID_ABOUT_DLG_OK - 10005 - wxButton - - &Ok - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - - CMakeSetup Options ... - 35982000 - dialog-document - - dialog - 0 - 1 - 0 - 15140496 - 0 - 29/4/2005 - wbDialogProxy - 10000 - FALSE - - ID_DIALOG - 10004 - CMOptionsDlg - wxDialog - wxDialog - optionsdlg.cpp - optionsdlg.h - - CMakeSetup Options ... - TRUE - - FALSE - - - - - - FALSE - <Any platform> - FALSE - TRUE - TRUE - FALSE - TRUE - FALSE - FALSE - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - - FALSE - FALSE - -1 - -1 - 400 - 300 - - - wxBoxSizer V - 36135880 - dialog-control-document - - sizer - 0 - 1 - 0 - 35982000 - 0 - wbBoxSizerProxy - Vertical - - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxNotebook: ID_NOTEBOOK - 36145472 - dialog-control-document - - notebook - 0 - 1 - 0 - 36135880 - 0 - 29/4/2005 - wbNotebookProxy - ID_NOTEBOOK - 10006 - wxNotebook - - FALSE - - - - - - FALSE - <Any platform> - - - TRUE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Expand - Centre - 1 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - TRUE - - - - wxPanel: ID_PANEL - 36166888 - dialog-control-document - - panel - 0 - 1 - 0 - 36145472 - 0 - 29/4/2005 - wbPanelProxy - ID_PANEL - 10007 - wxPanel - wxPanel - - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - FALSE - - TRUE - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - General - - - wxBoxSizer V - 36317128 - dialog-control-document - - sizer - 0 - 1 - 0 - 36166888 - 0 - 29/4/2005 - wbBoxSizerProxy - Vertical - - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - Spacer - 36325216 - dialog-control-document - - spacer - 0 - 1 - 0 - 36317128 - 0 - 29/4/2005 - wbSpacerProxy - 5 - 5 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - - wxCheckBox: ID_CHECKBOX_CLOSECMAKE - 36332952 - dialog-control-document - - checkbox - 0 - 1 - 0 - 36317128 - 0 - 29/4/2005 - wbCheckBoxProxy - wxEVT_COMMAND_CHECKBOX_CLICKED|OnButtonOK - ID_CHECKBOX_CLOSECMAKE - 10008 - wxCheckBox - m_closeAfterGenerate - Close down CMakeSetup after generation of project - FALSE - - - - - - - - FALSE - <Any platform> - FALSE - TRUE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Left - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - - - wxBoxSizer H - 36164088 - dialog-control-document - - sizer - 0 - 1 - 0 - 36135880 - 0 - 29/4/2005 - wbBoxSizerProxy - Horizontal - - Centre - Centre - 0 - 5 - TRUE - TRUE - FALSE - TRUE - FALSE - FALSE - FALSE - <Any platform> - - wxButton: wxID_OK - 36348448 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 36164088 - 0 - 29/4/2005 - wbButtonProxy - wxID_OK - 5100 - wxButton - - &OK - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - wxButton: wxID_CANCEL - 36362168 - dialog-control-document - - dialogcontrol - 0 - 1 - 0 - 36164088 - 0 - 29/4/2005 - wbButtonProxy - wxID_CANCEL - 5101 - wxButton - - &Cancel - FALSE - - - - - - FALSE - <Any platform> - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - - -1 - -1 - -1 - -1 - Centre - Centre - 0 - 5 - TRUE - TRUE - TRUE - TRUE - FALSE - FALSE - FALSE - - - - - - - - - Sources - 15191936 - html-document - - sourcesfolder - 1 - 1 - 0 - 15057456 - 1 - - CMakeSetup.rc - 15091464 - source-editor-document - CMakeSetup.rc - source-editor - 0 - 0 - 1 - 15191936 - 0 - 7/4/2005 - - - - - Images - 36089928 - html-document - - bitmapsfolder - 1 - 1 - 0 - 15057456 - 1 - - NGDialog.ico - 36090080 - image-document - NGDialog.ico - image - 0 - 0 - 0 - 36089928 - 0 - 25/4/2005 - 100 - - - - diff --git a/Source/WXDialog/CMakeSetup.rc b/Source/WXDialog/CMakeSetup.rc deleted file mode 100644 index 1cd7ef290..000000000 --- a/Source/WXDialog/CMakeSetup.rc +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef APSTUDIO_INVOKED -#include "wx/msw/wx.rc" -#endif - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -DID_AAAAAAA ICON "NGDialog.ico" diff --git a/Source/WXDialog/CMakeSetupFrame.cpp b/Source/WXDialog/CMakeSetupFrame.cpp deleted file mode 100644 index f42ef42df..000000000 --- a/Source/WXDialog/CMakeSetupFrame.cpp +++ /dev/null @@ -1,1775 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "CMakeSetupFrame.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes - -#include -#include -#include - -#include "CMakeSetupFrame.h" -#include "PropertyList.h" -#include "app_resources.h" -#include "CMakeIcon.xpm" -#include "aboutdlg.h" - -// cmake includes -#include "../cmVersion.h" -#include "../cmListFileCache.h" -#include "../cmCacheManager.h" -#include "../cmGlobalGenerator.h" -#include "../cmDynamicLoader.h" - -////@begin XPM images -////@end XPM images - -/*! - * CMakeSetupFrm type definition - */ - -IMPLEMENT_CLASS( CMakeSetupFrm, wxFrame ) - -/*! - * CMakeSetupFrm event table definition - */ - -BEGIN_EVENT_TABLE( CMakeSetupFrm, wxFrame ) - -////@begin CMakeSetupFrm event table entries - EVT_CLOSE( CMakeSetupFrm::OnCloseWindow ) - - EVT_SPLITTER_SASH_POS_CHANGING( ID_SPLITTERWINDOW, CMakeSetupFrm::OnSplitterPosChanging ) - EVT_SPLITTER_DCLICK( ID_SPLITTERWINDOW, CMakeSetupFrm::OnSplitterwindowSashDClick ) - - EVT_BUTTON( ID_BROWSE_PROJECT, CMakeSetupFrm::OnButtonBrowseProject ) - - EVT_TEXT( ID_SOURCE_BUILD_PATH, CMakeSetupFrm::OnSourceBuildPathUpdated ) - EVT_TEXT_ENTER( ID_SOURCE_BUILD_PATH, CMakeSetupFrm::OnSourceBuildPathEnter ) - - EVT_BUTTON( ID_BROWSE_BUILD, CMakeSetupFrm::OnButtonBrowseBuild ) - - EVT_COMBOBOX( ID_SEARCHQUERY, CMakeSetupFrm::OnSearchquerySelected ) - EVT_TEXT( ID_SEARCHQUERY, CMakeSetupFrm::OnSearchqueryUpdated ) - - EVT_CHECKBOX( ID_SHOW_ADVANCED, CMakeSetupFrm::OnShowAdvancedValues ) - - EVT_GRID_CELL_CHANGE( CMakeSetupFrm::OnCellChange ) - EVT_GRID_SELECT_CELL( CMakeSetupFrm::OnGridSelectCell ) - EVT_MOTION( CMakeSetupFrm::OnPropertyMotion ) - - EVT_BUTTON( ID_DO_CONFIGURE, CMakeSetupFrm::OnButtonConfigure ) - - EVT_BUTTON( ID_DO_OK, CMakeSetupFrm::OnButtonOk ) - - EVT_BUTTON( ID_DO_CANCEL, CMakeSetupFrm::OnButtonCancel ) - - EVT_BUTTON( ID_DO_DELETE_CACHE, CMakeSetupFrm::OnButtonDeleteCache ) - - EVT_BUTTON( ID_CLEAR_LOG, CMakeSetupFrm::OnClearLogClick ) - - EVT_BUTTON( ID_BROWSE_GRID, CMakeSetupFrm::OnBrowseGridClick ) - - EVT_MENU( ID_MENU_RELOAD_CACHE, CMakeSetupFrm::OnMenuReloadCacheClick ) - - EVT_MENU( ID_MENU_DELETE_CACHE, CMakeSetupFrm::OnMenuDeleteCacheClick ) - - EVT_MENU( ID_MENU_QUIT, CMakeSetupFrm::OnMenuQuitClick ) - - EVT_MENU( ID_MENU_CONFIGURE, CMakeSetupFrm::OnMenuConfigureClick ) - - EVT_MENU( ID_MENU_EXITGENERATE, CMakeSetupFrm::OnMenuGenerateClick ) - - EVT_MENU( ID_MENU_TOGGLE_ADVANCED, CMakeSetupFrm::OnMenuToggleAdvancedClick ) - - EVT_MENU( ID_CMAKE_OPTIONS, CMakeSetupFrm::OnOptionsClick ) - - EVT_MENU( ID_ABOUTDLG, CMakeSetupFrm::OnAboutClick ) - -////@end CMakeSetupFrm event table entries - - EVT_MENU_RANGE(CM_RECENT_BUILD_ITEM, CM_RECENT_BUILD_ITEM + CM_MAX_RECENT_PATHS, CMakeSetupFrm::OnRecentFileMenu) - - EVT_TEXT_ENTER(ID_SEARCHQUERY, CMakeSetupFrm::OnAddQuery ) - -END_EVENT_TABLE() - -/** Callback function for CMake generator, to tell user how - far the generation actually is */ -void updateProgress(const char *msg, float prog, void *cd) -{ - // TODO: Make some kind of progress counter - - CMakeSetupFrm *fm = (CMakeSetupFrm *)cd; - - if(fm) - { - if(prog < 0) - fm->LogMessage(0, msg); - else - { - fm->UpdateProgress(prog); - fm->IssueUpdate(); - } - } -} - -/** Callback function for CMake generator, to tell user about stuff. This should be - logged in the m_log window */ -void MFCMessageCallback(const char* m, const char* title, bool& nomore, void *clientdata) -{ - CMakeSetupFrm *fm = (CMakeSetupFrm *)clientdata; - - if(fm) - { - wxString what = m, msg; - if(what.StartsWith("CMake Error: ")) - fm->LogMessage(-1, m); - else - fm->LogMessage(1, m); - } -} - -// Convert to Win32 path (slashes). This calls the system tools one and then -// removes the spaces. It is not in system tools because we don't want any -// generators accidentally use it -std::string ConvertToWindowsPath(const char* path) -{ - // Convert to output path. - // Remove the "" around it (if any) since it's an output path for - // the shell. If another shell-oriented feature is not designed - // for a GUI use, then we are in trouble. - // save the value of the force to unix path option - bool saveForce = cmSystemTools::GetForceUnixPaths(); - // make sure we get windows paths no matter what for the GUI - cmSystemTools::SetForceUnixPaths(false); - std::string s = cmSystemTools::ConvertToOutputPath(path); - // now restore the force unix path to its previous value - cmSystemTools::SetForceUnixPaths(saveForce); - if (s.size()) - { - std::string::iterator i = s.begin(); - if (*i == '\"') - { - s.erase(i, i + 1); - } - i = s.begin() + s.length() - 1; - if (*i == '\"') - { - s.erase(i, i + 1); - } - } - return s; -} - - -bool DnDFile::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames) -{ - size_t nFiles = filenames.GetCount(); - - // only one item allowed - if(nFiles > 1) - return false; - - if(nFiles == 1) - { - // only one dir allowed - if(!wxDirExists(filenames[0])) - return false; - - // strip the seperator - wxFileName name; - name.AssignDir(filenames[0]); - - // issue a 'drop' by changing text ctrl - m_pOwner->SetValue(name.GetFullPath()); - - return true; - } - - return false; -} - -/*! - * CMakeSetupFrm constructors - */ - -CMakeSetupFrm::CMakeSetupFrm( ) - : m_cmake(0) -{ -} - -CMakeSetupFrm::CMakeSetupFrm( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) - : m_cmake(0) -{ - Create( parent, id, caption, pos, size, style ); -} - -/*! - * CMakeSetupFrm creator - */ - -bool CMakeSetupFrm::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ -////@begin CMakeSetupFrm member initialisation - m_splitter = NULL; - m_cmProjectPath = NULL; - m_BrowseProjectPathButton = NULL; - m_cmBuildPath = NULL; - m_BrowseSourcePathButton = NULL; - m_cmGeneratorChoice = NULL; - m_cmSearchQuery = NULL; - m_cmShowAdvanced = NULL; - m_cmOptions = NULL; - m_cmLog = NULL; - m_cmDescription = NULL; - m_ConfigureButton = NULL; - m_OkButton = NULL; - m_CancelButton = NULL; - m_DeleteCacheButton = NULL; - m_ClearLogButton = NULL; - m_cmBrowseCell = NULL; -////@end CMakeSetupFrm member initialisation - - wxFrame::Create( parent, id, caption, pos, size, style ); - - // make sure the developer does not assign more then 100 - // would be rediculous but also overlap other id's - wxASSERT(CM_MAX_RECENT_PATHS < 100); - - m_ExitTimer = 0; - - m_progressDlg = 0; - m_noRefresh = false; - m_quitAfterGenerating = false; - - m_config = new wxConfig("CMakeSetup"); - - wxIcon icon(CMakeIcon_xpm); - SetIcon(icon); - - CreateControls(); - - //SetIcon(GetIconResource(wxT("cmake_icon.xpm"))); - //SetIcon(wxIcon("NGDialog.ico", wxBITMAP_TYPE_ICO_RESOURCE)); - Centre(); - - // is it needed to hide console? - m_RunningConfigure = false; - cmSystemTools::SetRunCommandHideConsole(true); - cmSystemTools::SetErrorCallback(MFCMessageCallback, (void *)this); - - // create our cmake instance - m_cmake = new cmake; - m_cmake->SetProgressCallback(updateProgress, (void *)this); - - return TRUE; -} - -CMakeSetupFrm::~CMakeSetupFrm() -{ - wxString str; - - // write configs back to disk - m_config->Write(CM_LASTPROJECT_PATH, m_cmProjectPath->GetValue()); - m_config->Write(CM_LASTBUILD_PATH, m_cmBuildPath->GetValue()); - - // clear the config first - for(size_t i = 0 ; i < CM_MAX_RECENT_PATHS; i++) - { - str.Printf("%s%i", _(CM_RECENT_BUILD_PATH), i); - m_config->Write(str, _("")); - } - - // write the last CM_MAX_RECENT_PATHS items back to config - int i = (m_recentPaths.Count() >= CM_MAX_RECENT_PATHS ? CM_MAX_RECENT_PATHS : m_recentPaths.Count()); - while(i > 0) - { - str.Printf("%s%i", _(CM_RECENT_BUILD_PATH), i); - m_config->Write(str, m_recentPaths[i - 1]); - i--; - } - - // write recent query list to config - for(int j = 0; j < m_cmSearchQuery->GetCount(); j++) - { - // allow max to be written - if(j < CM_MAX_SEARCH_QUERIES) - { - str.Printf("%s%i", _(CM_SEARCH_QUERY), j); - m_config->Write(str, m_cmSearchQuery->GetString(j)); - } - else - break; - } - - // set window pos + size in settings - if(!IsIconized() && !IsMaximized()) - { - int xsize, ysize; - GetSize(&xsize, &ysize); - if(xsize > 0 && ysize > 0) - { - m_config->Write(CM_XSIZE, (long)xsize); - m_config->Write(CM_YSIZE, (long)ysize); - } - - if(m_splitter->GetSashPosition() > 0) - m_config->Write(CM_SPLITTERPOS, (long)m_splitter->GetSashPosition()); - - GetPosition(&xsize, &ysize); - if(xsize != 0 && ysize != 0) - { - m_config->Write(CM_XPOS, (long)xsize); - m_config->Write(CM_YPOS, (long)ysize); - } - } - - // write changes (will be done before deletion) - delete m_config; - - // delete timer - if(m_ExitTimer) - delete m_ExitTimer; - - // delete our cmake instance again - if(m_cmake) - delete m_cmake; -} - -void CMakeSetupFrm::UpdateWindowState() -{ - bool dogenerate = !m_RunningConfigure && !m_cmOptions->IsCacheDirty() && - (m_cmOptions->GetCount() != 0); - - // when configure is running, disable a lot of stuff - m_cmProjectPath->Enable(!m_RunningConfigure); - m_BrowseProjectPathButton->Enable(!m_RunningConfigure); - m_cmBuildPath->Enable(!m_RunningConfigure); - m_BrowseSourcePathButton->Enable(!m_RunningConfigure); - m_cmGeneratorChoice->Enable(!m_RunningConfigure); - m_cmShowAdvanced->Enable(!m_RunningConfigure); - m_cmOptions->Enable(!m_RunningConfigure); - m_ConfigureButton->Enable(!m_RunningConfigure); - m_OkButton->Enable(dogenerate); - m_CancelButton->Enable(m_RunningConfigure); - m_DeleteCacheButton->Enable(!m_RunningConfigure); - m_ClearLogButton->Enable(!m_RunningConfigure); - if(m_RunningConfigure) - m_cmBrowseCell->Enable(false); - - // when cache loaded (items available show other control) - m_cmGeneratorChoice->Enable(m_cmOptions->GetCount() == 0 && !m_RunningConfigure); - m_cmSearchQuery->Enable(!m_RunningConfigure); - m_cmBrowseCell->Enable(!m_RunningConfigure && m_cmOptions->IsSelectedItemBrowsable()); - - // disable the menus when configuring - if(GetMenuBar()) - { - // disable configure button when there is nothing, and generate and exit - // only when it is allowed to generate - GetMenuBar()->Enable(ID_MENU_EXITGENERATE, dogenerate); - GetMenuBar()->Enable(ID_MENU_CONFIGURE, !m_RunningConfigure); - - for(size_t i = 0; i < GetMenuBar()->GetMenuCount(); i++) - GetMenuBar()->EnableTop(i, !m_RunningConfigure); - } -} - -void CMakeSetupFrm::LogMessage(int logkind, const char *msg) -{ - // put CR first but prevent a CR at the end -#ifndef __LINUX__ - if(m_cmLog->IsModified()) - (*m_cmLog) << wxT("\n"); -#else - // Linux requires a different approach - if(!m_cmLog->GetValue().IsEmpty()) - (*m_cmLog) << wxT("\n"); -#endif - - // log error, warning, or message - wxTextAttr defattr = m_cmLog->GetDefaultStyle(); - - switch(logkind) - { - // user message - case 1: - { - wxTextAttr colattr(*wxBLUE); - m_cmLog->SetDefaultStyle(colattr); - (*m_cmLog) << msg; - m_cmLog->SetDefaultStyle(defattr); - } - break; - - // progress - case 0: - (*m_cmLog) << msg; - break; - - // error - case -1: - { - wxTextAttr colattr(*wxRED); - m_cmLog->SetDefaultStyle(colattr); - (*m_cmLog) << msg; - m_cmLog->SetDefaultStyle(defattr); - } - break; - } - - IssueUpdate(); -} - -void CMakeSetupFrm::IssueUpdate() -{ - //::wxSafeYield(m_CancelButton, true); - ::wxYield(); - - // when we pressed cancel on the progress dialog - // stop all activities - if(m_progressDlg) - { - if(m_progressDlg->CancelPressed() && !m_progressDlg->IsCancelling()) - { - m_progressDlg->CancelAcknowledged(); - - // send a button event to cancel the progress - wxCommandEvent event( wxEVT_COMMAND_BUTTON_CLICKED, ID_DO_CANCEL); - wxPostEvent(this, event); - } - } -} - -/*! - * Control creation for CMakeSetupFrm - */ - -void CMakeSetupFrm::CreateControls() -{ -////@begin CMakeSetupFrm content construction - CMakeSetupFrm* itemFrame1 = this; - - wxMenuBar* menuBar = new wxMenuBar; - wxMenu* itemMenu37 = new wxMenu; - itemMenu37->Append(ID_MENU_RELOAD_CACHE, _("&Reload Cache\tCtrl+R"), _("Reload the cache from disk"), wxITEM_NORMAL); - itemMenu37->Append(ID_MENU_DELETE_CACHE, _("&Delete Cache\tCtrl+D"), _("Delete the cache on disk of the current path"), wxITEM_NORMAL); - itemMenu37->AppendSeparator(); - itemMenu37->Append(ID_MENU_QUIT, _("E&xit\tAlt+F4"), _("Quit CMake Setup"), wxITEM_NORMAL); - menuBar->Append(itemMenu37, _("&File")); - wxMenu* itemMenu42 = new wxMenu; - itemMenu42->Append(ID_MENU_CONFIGURE, _("&Configure\tCtrl+N"), _T(""), wxITEM_NORMAL); - itemMenu42->Append(ID_MENU_EXITGENERATE, _("&Generate and Exit\tCtrl+G"), _T(""), wxITEM_NORMAL); - itemMenu42->Append(ID_MENU_TOGGLE_ADVANCED, _("Toggle &Advanced\tCtrl+A"), _T(""), wxITEM_NORMAL); - itemMenu42->AppendSeparator(); - itemMenu42->Append(ID_CMAKE_OPTIONS, _("&Options\tCtrl+O"), _T(""), wxITEM_NORMAL); - menuBar->Append(itemMenu42, _("&Tools")); - wxMenu* itemMenu48 = new wxMenu; - itemMenu48->Append(ID_ABOUTDLG, _("&About ..."), _("Shows the about dialog ..."), wxITEM_NORMAL); - menuBar->Append(itemMenu48, _("&Help")); - itemFrame1->SetMenuBar(menuBar); - - m_splitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER ); - - wxPanel* itemPanel3 = new wxPanel( m_splitter, ID_MAINPANEL, wxDefaultPosition, wxSize(600, 400), wxNO_BORDER|wxTAB_TRAVERSAL ); - itemPanel3->SetExtraStyle(itemPanel3->GetExtraStyle()|wxWS_EX_VALIDATE_RECURSIVELY); - wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL); - itemPanel3->SetSizer(itemBoxSizer4); - - wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer4->Add(itemBoxSizer5, 0, wxGROW|wxTOP|wxBOTTOM, 5); - wxFlexGridSizer* itemFlexGridSizer6 = new wxFlexGridSizer(2, 3, 0, 0); - itemFlexGridSizer6->AddGrowableRow(1); - itemFlexGridSizer6->AddGrowableCol(1); - itemBoxSizer5->Add(itemFlexGridSizer6, 1, wxALIGN_TOP|wxLEFT, 5); - wxStaticText* itemStaticText7 = new wxStaticText( itemPanel3, wxID_STATIC, _("CMake project path"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer6->Add(itemStaticText7, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); - - m_cmProjectPath = new wxTextCtrl( itemPanel3, ID_PROJECT_PATH, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); - itemFlexGridSizer6->Add(m_cmProjectPath, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - - m_BrowseProjectPathButton = new wxButton( itemPanel3, ID_BROWSE_PROJECT, _("Browse"), wxDefaultPosition, wxSize(55, -1), 0 ); - itemFlexGridSizer6->Add(m_BrowseProjectPathButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxStaticText* itemStaticText10 = new wxStaticText( itemPanel3, wxID_STATIC, _("Project build path"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer6->Add(itemStaticText10, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); - - m_cmBuildPath = new wxTextCtrl( itemPanel3, ID_SOURCE_BUILD_PATH, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); - itemFlexGridSizer6->Add(m_cmBuildPath, 1, wxGROW|wxALIGN_TOP|wxTOP|wxBOTTOM, 5); - - m_BrowseSourcePathButton = new wxButton( itemPanel3, ID_BROWSE_BUILD, _("Browse"), wxDefaultPosition, wxSize(55, -1), 0 ); - itemFlexGridSizer6->Add(m_BrowseSourcePathButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer5->Add(itemBoxSizer13, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxFlexGridSizer* itemFlexGridSizer14 = new wxFlexGridSizer(2, 2, 0, 0); - itemBoxSizer13->Add(itemFlexGridSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - wxStaticText* itemStaticText15 = new wxStaticText( itemPanel3, wxID_STATIC, _("Generate"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxADJUST_MINSIZE, 5); - - wxString* m_cmGeneratorChoiceStrings = NULL; - m_cmGeneratorChoice = new wxComboBox( itemPanel3, ID_CHOOSE_GENERATOR, _T(""), wxDefaultPosition, wxSize(170, -1), 0, m_cmGeneratorChoiceStrings, wxCB_READONLY ); - itemFlexGridSizer14->Add(m_cmGeneratorChoice, 1, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxTOP|wxBOTTOM, 5); - - wxStaticText* itemStaticText17 = new wxStaticText( itemPanel3, wxID_STATIC, _("Search"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer14->Add(itemStaticText17, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxADJUST_MINSIZE, 5); - - wxString* m_cmSearchQueryStrings = NULL; - m_cmSearchQuery = new wxComboBox( itemPanel3, ID_SEARCHQUERY, _T(""), wxDefaultPosition, wxSize(170, -1), 0, m_cmSearchQueryStrings, wxWANTS_CHARS ); - itemFlexGridSizer14->Add(m_cmSearchQuery, 1, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxTOP|wxBOTTOM, 5); - - m_cmShowAdvanced = new wxCheckBox( itemPanel3, ID_SHOW_ADVANCED, _("Show advanced values"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - m_cmShowAdvanced->SetValue(FALSE); - itemBoxSizer13->Add(m_cmShowAdvanced, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5); - - m_cmOptions = new wxPropertyList( itemPanel3, ID_OPTIONS, wxDefaultPosition, wxSize(200, 150), wxSTATIC_BORDER|wxWANTS_CHARS|wxVSCROLL ); - m_cmOptions->SetDefaultColSize(250); - m_cmOptions->SetDefaultRowSize(25); - m_cmOptions->SetColLabelSize(20); - m_cmOptions->SetRowLabelSize(0); - m_cmOptions->CreateGrid(10, 2, wxGrid::wxGridSelectRows); - itemBoxSizer4->Add(m_cmOptions, 1, wxGROW|wxALL, 5); - - wxPanel* itemPanel21 = new wxPanel( m_splitter, ID_LOGPANEL, wxDefaultPosition, wxSize(-1, 100), wxNO_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* itemBoxSizer22 = new wxBoxSizer(wxVERTICAL); - itemPanel21->SetSizer(itemBoxSizer22); - - wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer22->Add(itemBoxSizer23, 1, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); - m_cmLog = new wxTextCtrl( itemPanel21, ID_LOG_AREA, _("Select your project path (where CMakeLists.txt is) and then select the build path (where the projects should be saved), or select a previous build path.\n\nRight click on a cache value for additional options (delete and ignore). Press configure to update and display new values in red, press OK to generate the projects and exit."), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2|wxSTATIC_BORDER ); - itemBoxSizer23->Add(m_cmLog, 1, wxGROW|wxRIGHT, 5); - - m_cmDescription = new wxTextCtrl( itemPanel21, ID_DESCRIPTION, _T(""), wxDefaultPosition, wxSize(200, -1), wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2|wxSTATIC_BORDER ); - itemBoxSizer23->Add(m_cmDescription, 0, wxGROW|wxLEFT, 5); - - wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer22->Add(itemBoxSizer26, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - m_ConfigureButton = new wxButton( itemPanel21, ID_DO_CONFIGURE, _("Co&nfigure"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ConfigureButton->SetDefault(); - itemBoxSizer26->Add(m_ConfigureButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - m_OkButton = new wxButton( itemPanel21, ID_DO_OK, _("&Generate!"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer26->Add(m_OkButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - m_CancelButton = new wxButton( itemPanel21, ID_DO_CANCEL, _("C&ancel"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer26->Add(m_CancelButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - -#if defined(__WXMSW__) - wxStaticLine* itemStaticLine30 = new wxStaticLine( itemPanel21, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - itemBoxSizer26->Add(itemStaticLine30, 0, wxGROW|wxALL, 5); -#endif - - m_DeleteCacheButton = new wxButton( itemPanel21, ID_DO_DELETE_CACHE, _("&Delete Cache"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer26->Add(m_DeleteCacheButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - m_ClearLogButton = new wxButton( itemPanel21, ID_CLEAR_LOG, _("Clear &Log"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer26->Add(m_ClearLogButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - -#if defined(__WXMSW__) - wxStaticLine* itemStaticLine33 = new wxStaticLine( itemPanel21, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - itemBoxSizer26->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); -#endif - - m_cmBrowseCell = new wxButton( itemPanel21, ID_BROWSE_GRID, _("&Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer26->Add(m_cmBrowseCell, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - m_splitter->SplitHorizontally(itemPanel3, itemPanel21, 300); - - wxStatusBar* itemStatusBar35 = new wxStatusBar( itemFrame1, ID_STATUSBAR, wxST_SIZEGRIP|wxNO_BORDER ); - itemStatusBar35->SetFieldsCount(2); - itemFrame1->SetStatusBar(itemStatusBar35); - -////@end CMakeSetupFrm content construction -} - -void CMakeSetupFrm::DoInitFrame(cmCommandLineInfo &cm, const wxString &fn) -{ - // path to where cmake.exe is - // m_PathToExecutable = cm.GetPathToExecutable().c_str(); - m_PathToExecutable = fn; - - // adjust size of last bar, to display % progress - wxStatusBar *bar = GetStatusBar(); - if(bar) - { - wxASSERT(bar->GetFieldsCount() > 1); - - // fill all with -1. Why this way? because the count of the status bars - // can change. All of the widths must be accounted for and initialised - int *widths = new int[bar->GetFieldsCount()]; - for(int i = 0; i < bar->GetFieldsCount(); i++) - widths[i] = -1; - - // the % field - widths[1] = 75; - bar->SetStatusWidths(bar->GetFieldsCount(), widths); - delete widths; - } - - wxString name, generator; - std::vector names; - - m_RunningConfigure = false; - - // set grid labels - m_cmOptions->SetColLabelValue(0, wxT("Cache Name")); - m_cmOptions->SetColLabelValue(1, wxT("Cache Value")); - m_cmOptions->SetProjectGenerated(false); - - // set drop target - m_cmOptions->SetDropTarget(new DnDFile(m_cmBuildPath)); - - m_cmake->GetRegisteredGenerators(names); - for(std::vector::iterator i = names.begin(); i != names.end(); ++i) - { - name = i->c_str(); - m_cmGeneratorChoice->Append(name); - } - - // sync advanced option with grid - m_cmOptions->SetShowAdvanced(m_cmShowAdvanced->GetValue()); - - // if we have a command line query that a generator - // needs to be chosen instead of the default, take it - bool foundGivenGenerator = false; - if(!cm.m_GeneratorChoiceString.IsEmpty()) - { - // set proper discovered generator - foundGivenGenerator = m_cmGeneratorChoice->SetStringSelection(cm.m_GeneratorChoiceString); - } - - // if none selected, we will see if VS8, VS7 or VS6 is present - if(!foundGivenGenerator || m_cmGeneratorChoice->GetValue().IsEmpty()) - { - std::string mp; - mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup;Dbghelp_path]"; - cmSystemTools::ExpandRegistryValues(mp); - if(mp != "/registry") - generator = wxT("Visual Studio 8 2005"); - else - { - mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1;InstallDir]"; - cmSystemTools::ExpandRegistryValues(mp); - if (mp != "/registry") - generator = wxT("Visual Studio 7 .NET 2003"); - else - { - mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0;InstallDir]"; - cmSystemTools::ExpandRegistryValues(mp); - if (mp != "/registry") - generator = wxT("Visual Studio 7"); - else - generator = wxT("Visual Studio 6"); - } - } - } - - // set proper discovered generator - m_cmGeneratorChoice->SetStringSelection(generator); - - wxString str; - str.Printf("CMake %s", cmVersion::GetCMakeVersion()); - str.Printf("CMakeSetup v%i.%i%s", CMAKEGUI_MAJORVER, CMAKEGUI_MINORVER, CMAKEGUI_ADDVER); - - SetTitle(str); - wxString path; - - // get last 5 used projects - for(size_t i = 0; i < CM_MAX_RECENT_PATHS; i++) - { - path.Printf("%s%i", _(CM_RECENT_BUILD_PATH), i); - if(m_config->Read(path, &str)) - AppendPathToRecentList(str); - } - - // get query items - for(size_t i = 0; i < CM_MAX_SEARCH_QUERIES; i++) - { - path.Printf("%s%i", _(CM_SEARCH_QUERY), i); - if(m_config->Read(path, &str)) - m_cmSearchQuery->Append(str); - } - - - // make sure the call to update grid is not executed - m_noRefresh = true; - m_cmSearchQuery->SetValue(_("")); - m_noRefresh = false; - - // 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 :) - bool sourceDirLoaded = false, - buildDirLoaded = false; - - if(cm.m_LastUnknownParameter.empty()) - { - if(cm.m_WhereSource.size() > 0 ) - { - m_cmProjectPath->SetValue(cm.m_WhereSource.c_str()); - sourceDirLoaded = true; - } - - if (cm.m_WhereBuild.size() > 0 ) - { - m_cmBuildPath->SetValue(cm.m_WhereBuild.c_str()); - buildDirLoaded = true; - } - - m_cmShowAdvanced->SetValue(cm.m_AdvancedValues); - } - else - { - m_cmShowAdvanced->SetValue(false); - - // TODO: Interpret directory from dropped shortcut - //this->ChangeDirectoriesFromFile(cmdInfo->m_LastUnknownParameter.c_str()); - } - - if (cm.m_ExitAfterLoad) - { - int id = GetId(); - m_ExitTimer = new wxTimer(this, id); - m_ExitTimer->Start(3000); - - Connect( id, wxEVT_TIMER,(wxObjectEventFunction) &CMakeSetupFrm::OnExitTimer ); - - } - - // retrieve settings, this needs to be done here - // because writing to the m_cmBuildPath triggers a cache reload - if(!sourceDirLoaded && m_config->Read(CM_LASTPROJECT_PATH, &str)) - m_cmProjectPath->SetValue(str); - - if(!buildDirLoaded) - { - m_cmOptions->RemoveAll(); - if(m_config->Read(CM_LASTBUILD_PATH, &str)) - m_cmBuildPath->SetValue(str); - } - - // set window size from settings - long xsize, ysize, splitpos; - if(m_config->Read(CM_XSIZE, &xsize) && m_config->Read(CM_YSIZE, &ysize) && - m_config->Read(CM_SPLITTERPOS, &splitpos)) - { - SetSize(xsize, ysize); - m_splitter->SetSashPosition(splitpos); - } - - if(m_config->Read(CM_XPOS, &xsize) && m_config->Read(CM_YPOS, &ysize)) - SetSize(xsize, ysize, -1, -1, wxSIZE_USE_EXISTING); - - UpdateWindowState(); -} - -void CMakeSetupFrm::LoadCacheFromDiskToGUI() -{ - wxString builddir = m_cmBuildPath->GetValue(); - - cmCacheManager *cachem = m_cmake->GetCacheManager(); - if(cachem && !builddir.Trim().IsEmpty()) - { - if(cachem->LoadCache(builddir.c_str())) - AppendPathToRecentList(builddir); - - // represent this cache in the grid, but not before we - // wiped all of the old items - FillCacheGUIFromCacheManager(); - - // set the generator string to the one used in the cache - cmCacheManager::CacheIterator it = cachem->GetCacheIterator("CMAKE_GENERATOR"); - if(!it.IsAtEnd()) - { - wxString curGen = it.GetValue(); - m_cmGeneratorChoice->SetStringSelection(curGen); - } - } -} - -void CMakeSetupFrm::AppendPathToRecentList(const wxString &p) -{ - wxFileName path; - wxString str; - - if(p.IsEmpty()) - return; - - // cheap way to get rid of trailing seperators - path.AssignDir(p); - str = path.GetPath(); - - // append the item, or add it to end to make sure - // it is remembered between sessions - for(size_t i = 0; i < m_recentPaths.Count(); i++) - { - if(m_recentPaths[i].IsSameAs(str, false)) - { - m_recentPaths.RemoveAt(i); - - // only re-add when item is still valid - if(::wxDirExists(str)) - m_recentPaths.Add(str); - else - return; // no add when the item is not existing - - return; - } - } - - if(GetMenuBar()) - { - // get file menu - int lastUsedID = 0; - wxMenu *mnu = GetMenuBar()->GetMenu(0); - wxASSERT(mnu != 0); - - if(::wxDirExists(str)) - { - // add to array - if(m_recentPaths.Count() == 0) - mnu->AppendSeparator(); - - lastUsedID = CM_RECENT_BUILD_ITEM + m_recentPaths.Count(); - m_recentPaths.Add(str); - - // when we have more in list then we can display, prune and - // remove some menu items until we have room (and available ID's again) - if(m_recentPaths.Count() > CM_MAX_RECENT_PATHS) - { - // prune the list - while(m_recentPaths.Count() > CM_MAX_RECENT_PATHS) - m_recentPaths.RemoveAt(0); - - // now determine count, and remove until we have room - int index = mnu->GetMenuItemCount() - 1; - int count = 0; - wxASSERT(index > 0); - - wxMenuItem *item; - do - { - item = mnu->FindItemByPosition(index); - if(item) - { - if(item->IsSeparator()) - { - // next index is valid item - index ++; - break; - } - else - count ++; - } - - index --; - } - while(index >= 0 && item); - - // ok, if count > CM_MAX_RECENT_PATHS then we are going to - // delete some items on the index position - if(count >= CM_MAX_RECENT_PATHS) - { - // delete items that are exceeding - while(count >= CM_MAX_RECENT_PATHS) - { - lastUsedID = mnu->FindItemByPosition(index)->GetId(); - mnu->Delete(lastUsedID); - count --; - } - } - } - - // append item - mnu->Append(lastUsedID, str); - } - } -} - -bool CMakeSetupFrm::PerformCacheRun() -{ - bool enable = false; - cmCacheManager *cachem = m_cmake->GetCacheManager(); - cmCacheManager::CacheIterator it = cachem->NewIterator(); - - // remove all items that are no longer present - size_t j = 0; - while(j < m_cmOptions->GetCount()) - { - // check to see if it is still in the CMake cache - // if it is still in the cache then it is no longer new - wxPropertyItem *item = m_cmOptions->GetItem(j); - if ( !it.Find((const char*)item->GetPropName().c_str()) ) - m_cmOptions->RemoveProperty(item); - else - { - // ok we found it, mark as old - item->SetNewValue(false); - int row = m_cmOptions->FindProperty(item); - if(row != -1) - m_cmOptions->UpdatePropertyItem(item, row); - j++; - } - } - - if(cachem->GetSize() > 0 && !cmSystemTools::GetErrorOccuredFlag()) - { - bool enable = true; - for(size_t i = 0; i < m_cmOptions->GetCount(); i++) - { - wxPropertyItem* item = m_cmOptions->GetItem(i); - if(item->GetAdvanced()) - { - if(item->GetNewValue() && m_cmOptions->GetShowAdvanced()) - { - // if one new value then disable to OK button - enable = false; - break; - } - } - else - { - if(item->GetNewValue()) - { - // if one new value then disable to OK button - enable = false; - break; - } - } - } - } - - return enable; -} - -void CMakeSetupFrm::FillCacheGUIFromCacheManager() -{ - cmCacheManager *cachem = m_cmake->GetCacheManager(); - cmCacheManager::CacheIterator it = cachem->NewIterator(); - - // remove all items that are no longer present - size_t j = 0; - while(j < m_cmOptions->GetCount()) - { - // check to see if it is still in the CMake cache - // if it is still in the cache then it is no longer new - wxPropertyItem *item = m_cmOptions->GetItem(j); - if ( !it.Find((const char*)item->GetPropName().c_str()) ) - m_cmOptions->RemoveProperty(item); - else - j++; - } - - // if there are already entries in the cache, then - // put the new ones in the top, so they show up first - bool reverseOrder = false; - for(cmCacheManager::CacheIterator i = cachem->NewIterator(); !i.IsAtEnd(); i.Next()) - { - const char* key = i.GetName(); - - // if value has trailing space or tab, enclose it in single quotes - // to enforce the fact that it has 'invisible' trailing stuff - std::string value = i.GetValue(); - if (value.size() && (value[value.size() - 1] == ' ' || value[value.size() - 1] == '\t')) - value = '\'' + value + '\''; - - bool advanced = i.GetPropertyAsBool("ADVANCED"); - switch(i.GetType() ) - { - case cmCacheManager::BOOL: - { - wxString OnOff; - - if(cmSystemTools::IsOn(value.c_str())) - OnOff = wxT("ON"); - else - OnOff = wxT("OFF"); - - m_cmOptions->AddProperty(key, - OnOff.c_str(), - i.GetProperty("HELPSTRING"), - wxPropertyList::CHECKBOX, "ON|OFF", - reverseOrder, - advanced ); - } - break; - - case cmCacheManager::PATH: - m_cmOptions->AddProperty(key, - value.c_str(), - i.GetProperty("HELPSTRING"), - wxPropertyList::PATH,"", - reverseOrder, advanced); - break; - - case cmCacheManager::FILEPATH: - m_cmOptions->AddProperty(key, - value.c_str(), - i.GetProperty("HELPSTRING"), - wxPropertyList::FILE,"", - reverseOrder, advanced); - break; - - case cmCacheManager::STRING: - m_cmOptions->AddProperty(key, - value.c_str(), - i.GetProperty("HELPSTRING"), - wxPropertyList::EDIT,"", - reverseOrder, advanced); - break; - - case cmCacheManager::INTERNAL: - { - wxPropertyItem *pItem = m_cmOptions->FindPropertyByName(key); - if(pItem) - m_cmOptions->RemoveProperty(pItem); - } - break; - } - } -} - -void CMakeSetupFrm::OnExitTimer(wxTimerEvent &event) -{ - Close(); -} - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_PROJECT - */ - -void CMakeSetupFrm::OnButtonBrowseProject( wxCommandEvent& event ) -{ - const wxString& dir = wxDirSelector("Select project directory", m_cmProjectPath->GetValue()); - if(!dir.IsEmpty()) - m_cmProjectPath->SetValue(dir); -} - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_BUILD - */ - -void CMakeSetupFrm::OnButtonBrowseBuild( wxCommandEvent& event ) -{ - const wxString& dir = wxDirSelector("Select build directory", m_cmBuildPath->GetValue()); - if(!dir.IsEmpty()) - m_cmBuildPath->SetValue(dir); -} - -/*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_SHOW_ADVANCED - */ - -void CMakeSetupFrm::OnShowAdvancedValues( wxCommandEvent& event ) -{ - if(m_cmShowAdvanced->GetValue()) - m_cmOptions->ShowAdvanced(); - else - m_cmOptions->HideAdvanced(); -} - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CONFIGURE - */ - -void CMakeSetupFrm::OnButtonConfigure( wxCommandEvent& event ) -{ - DoConfigure(); -} - -void CMakeSetupFrm::DoConfigure() -{ - // enable error messages each time configure is pressed - cmSystemTools::EnableMessages(); - m_cmOptions->HideControls(); - - cmSystemTools::ResetErrorOccuredFlag(); - - // instantiate a dialog for the progress meter - - PerformCacheRun(); - RunCMake(false); -} - -int CMakeSetupFrm::RunCMake(bool generateProjectFiles) -{ - int value = -1; - - // clear log - m_cmLog->Clear(); - m_cmLog->DiscardEdits(); - - wxString builddir = m_cmBuildPath->GetValue(), - sourcedir = m_cmProjectPath->GetValue(), - err = wxT("Error in configuration process, project files may be invalid"); - - - // sanity check for people pressing OK on empty dirs - if(builddir.Trim().IsEmpty() || sourcedir.Trim().IsEmpty()) - { - wxMessageBox(wxT("Please enter a valid source directory and build directory"), wxT("Error"), wxOK | wxICON_ERROR, this); - return -1; - } - - // check if the directory exists, if not, create it - if(!cmSystemTools::FileExists(builddir.c_str())) - { - wxString str; - str << wxT("Build directory does not exist, should I create it?\n\nDirectory: ") << builddir; - - int answer = wxMessageBox(str, wxT("Create directory"), wxYES_NO, this); - if (answer == wxYES) - { - if(!cmSystemTools::MakeDirectory(builddir.c_str())) - { - // could not create, tell and abort - wxMessageBox(wxT("Could not create directory"), wxT("Error"), wxOK | wxICON_ERROR, this); - return -1; - } - } - else - { - // we abort because the user did not want to make the directory - wxMessageBox(wxT("Build Project aborted, nothing done."), wxT("Aborted"), - wxOK | wxICON_EXCLAMATION, this); - return -1; - } - } - - /** show progress dialog that informs the user with a progress bar */ - if(m_progressDlg) - m_progressDlg->Destroy(); - - m_progressDlg = new CMProgressDialog(this); - m_progressDlg->Show(); - - // set the wait cursor - m_RunningConfigure = true; - UpdateWindowState(); - - // always save the current gui values to disk - SaveCacheFromGUI(); - - // Make sure we are working from the cache on disk - LoadCacheFromDiskToGUI(); - - // setup the cmake instance - if (generateProjectFiles) - { - if(m_cmake->Generate() != 0) - { - wxMessageBox(err, wxT("Error"), wxOK | wxICON_ERROR, this); - cmSystemTools::Error(err.c_str()); - value = -1; - } - else - { - value = 0; - m_cmOptions->SetProjectGenerated(true); // clear cache dirty when generated - } - } - else - { - // set paths - m_cmake->SetHomeDirectory(m_cmProjectPath->GetValue().c_str()); - m_cmake->SetStartDirectory(m_cmProjectPath->GetValue().c_str()); - m_cmake->SetHomeOutputDirectory(m_cmBuildPath->GetValue().c_str()); - m_cmake->SetStartOutputDirectory(m_cmBuildPath->GetValue().c_str()); - - m_cmake->SetGlobalGenerator(m_cmake->CreateGlobalGenerator(m_cmGeneratorChoice->GetValue().c_str())); - m_cmake->SetCMakeCommand(m_PathToExecutable.c_str()); - m_cmake->LoadCache(); - if(m_cmake->Configure() != 0) - { - wxMessageBox(err, wxT("Error"), wxOK | wxICON_ERROR, this); - cmSystemTools::Error(err.c_str()); - } - - // update the GUI with any new values in the caused by the - // generation process - LoadCacheFromDiskToGUI(); - } - - m_RunningConfigure = false; - - if(!value) - cmSystemTools::ResetErrorOccuredFlag(); - - m_progressDlg->Destroy(); - m_progressDlg = 0; - - // reset the statusbar progress - wxStatusBar *bar = GetStatusBar(); - if(bar) - bar->SetStatusText(wxEmptyString, 1); - - UpdateWindowState(); - return value; -} - -//! Save GUI values to cmCacheManager and then save to disk. -void CMakeSetupFrm::SaveCacheFromGUI() -{ - cmCacheManager *cachem = m_cmake->GetCacheManager(); - FillCacheManagerFromCacheGUI(); - - // write the cache to disk - if(!m_cmBuildPath->GetValue().Trim().IsEmpty()) - cachem->SaveCache(m_cmBuildPath->GetValue().c_str()); -} - -void CMakeSetupFrm::FillCacheManagerFromCacheGUI() -{ - cmCacheManager *cachem = m_cmake->GetCacheManager(); - - cmCacheManager::CacheIterator it = cachem->NewIterator(); - for(size_t i = 0; i < m_cmOptions->GetCount(); i++) - { - wxPropertyItem* item = m_cmOptions->GetItem(i); - if ( it.Find((const char*)item->GetPropName().c_str()) ) - { - // if value is enclosed in single quotes ('foo') then remove them - // they were used to enforce the fact that it had 'invisible' - // trailing stuff - if (item->GetCurValue().Len() >= 2 && - item->GetCurValue().GetChar(0) == '\'' && - item->GetCurValue().GetChar(item->GetCurValue().Len() - 1) == '\'') - { - it.SetValue(item->GetCurValue().Mid(1, item->GetCurValue().Len() - 2).c_str()); - } - else - it.SetValue(item->GetCurValue().c_str()); - } - } -} - - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_OK - */ - -void CMakeSetupFrm::OnButtonOk( wxCommandEvent& event ) -{ - DoGenerate(); -} - -void CMakeSetupFrm::DoGenerate() -{ - cmSystemTools::EnableMessages(); - - cmSystemTools::ResetErrorOccuredFlag(); - - m_cmOptions->HideControls(); - PerformCacheRun(); - - if(!RunCMake(true)) - { - // issue a close when this is done (this is issued by menu "Generate and Exit" - if(m_quitAfterGenerating) - Close(); - else if(!wxGetKeyState(WXK_SHIFT)) - { - bool close; - m_config->Read(CM_CLOSEAFTERGEN, &close, CM_CLOSEAFTERGEN_DEF); - - if(!close) - wxMessageBox(wxT("Building of project files succesful!"), wxT("Success!"), wxOK|wxICON_INFORMATION); - else - Close(); - } - } -} - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CANCEL - */ - -void CMakeSetupFrm::OnButtonCancel( wxCommandEvent& event ) -{ - DoCancelButton(); -} - -void CMakeSetupFrm::DoCancelButton() -{ - if(m_RunningConfigure) - { - int result = wxMessageBox(wxT("You are in the middle of a Configure.\n" - "If you Cancel now the configure information will be lost.\n" - "Are you sure you want to Cancel?"), wxT("Warning"), wxYES_NO|wxICON_WARNING); - if(result == wxYES) - cmSystemTools::SetFatalErrorOccured(); - else - if(m_progressDlg) - m_progressDlg->ResetCancel(); - } -} - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_DELETE_CACHE - */ - -void CMakeSetupFrm::OnButtonDeleteCache( wxCommandEvent& event ) -{ - DoDeleteCache(); -} - -void CMakeSetupFrm::DoDeleteCache() -{ - bool deletecache = true; - if(m_cmOptions->IsCacheDirty() || (m_cmOptions->GetCount() > 0 && !m_cmOptions->IsGenerated())) - { - int result = ::wxMessageBox(_("You have changed options, are you sure you want to delete all items?\n"), - _("Warning"), wxYES_NO|wxICON_QUESTION); - - // when user wants to wait, wait.. else quit - if(result == wxNO) - deletecache = false; - - } - - if(deletecache) - { - // indicate that we haven't generated a project yet - m_cmOptions->SetProjectGenerated(false); - - if(!m_cmBuildPath->GetValue().Trim().IsEmpty() && m_cmake != 0) - m_cmake->GetCacheManager()->DeleteCache(m_cmBuildPath->GetValue().Trim()); - - LoadCacheFromDiskToGUI(); - UpdateWindowState(); - } -} - -/*! - * Should we show tooltips? - */ - -bool CMakeSetupFrm::ShowToolTips() -{ - return TRUE; -} - -/*! - * Get bitmap resources - */ - -wxBitmap CMakeSetupFrm::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin CMakeSetupFrm bitmap retrieval - return wxNullBitmap; -////@end CMakeSetupFrm bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon CMakeSetupFrm::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin CMakeSetupFrm icon retrieval - if (name == wxT("cmake_icon.xpm")) - { - wxIcon icon(_T("cmake_icon.xpm"), wxBITMAP_TYPE_XPM); - return icon; - } - return wxNullIcon; -////@end CMakeSetupFrm icon retrieval -} - -/*! - * wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event handler for ID_SPLITTERWINDOW - */ - -void CMakeSetupFrm::OnSplitterPosChanging( wxSplitterEvent& event ) -{ - int width, height; - - GetSize(&width, &height); - - if((height > 100)) - { - if(event.GetSashPosition() < 170) - event.SetSashPosition(170); - else - { - if(event.GetSashPosition() > (height - 180)) - event.SetSashPosition(height - 180); - } - } - else - event.Veto(); - -} - - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_LOG - */ - -void CMakeSetupFrm::OnClearLogClick( wxCommandEvent& event ) -{ - // delete the log text - m_cmLog->Clear(); - m_cmLog->DiscardEdits(); -} - - -/*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SOURCE_BUILD_PATH - */ - -void CMakeSetupFrm::OnSourceBuildPathUpdated( wxCommandEvent& event ) -{ - DoReloadCache(); -} - -void CMakeSetupFrm::DoReloadCache() -{ - wxString buildpath = m_cmBuildPath->GetValue(); - // The build dir has changed, check if there is a cache, and - // grab the source dir from it - - // make sure the call to update grid is not executed - m_noRefresh = true; - m_cmSearchQuery->SetValue(_("")); - m_noRefresh = false; - - std::string path = buildpath.c_str(); - cmSystemTools::ConvertToUnixSlashes(path); - - // adjust the cmake instance - m_cmake->SetHomeOutputDirectory(buildpath.c_str()); - m_cmake->SetStartOutputDirectory(buildpath.c_str()); - - std::string cache_file = path; - cache_file += "/CMakeCache.txt"; - - // fill in the project path where the source is located, this is - // read from the CMake cache - cmCacheManager *cachem = m_cmake->GetCacheManager(); - cmCacheManager::CacheIterator it = cachem->NewIterator(); - if (cmSystemTools::FileExists(cache_file.c_str()) && cachem->LoadCache(path.c_str()) && - it.Find("CMAKE_HOME_DIRECTORY")) - { - path = ConvertToWindowsPath(it.GetValue()); - m_cmProjectPath->SetValue(path.c_str()); - } - - m_cmOptions->RemoveAll(); - LoadCacheFromDiskToGUI(); - UpdateWindowState(); -} - - -/*! - * wxEVT_COMMAND_TEXT_ENTER event handler for ID_SOURCE_BUILD_PATH - */ - -void CMakeSetupFrm::OnSourceBuildPathEnter( wxCommandEvent& event ) -{ - OnSourceBuildPathUpdated(event); -} - -/*! - * wxEVT_MOTION event handler for ID_OPTIONS - */ - -void CMakeSetupFrm::OnPropertyMotion( wxMouseEvent& event ) -{ - ShowPropertyDescription(m_cmOptions->YToRow(event.GetY())); - event.Skip(); -} - - -/*! - * wxEVT_GRID_SELECT_CELL event handler for ID_OPTIONS - */ - -void CMakeSetupFrm::OnGridSelectCell( wxGridEvent& event ) -{ - // show description - ShowPropertyDescription(event.GetRow()); - - // enable or disable the browse button - m_cmBrowseCell->Enable(m_cmOptions->IsSelectedItemBrowsable(event.GetRow())); - event.Skip(); -} - -void CMakeSetupFrm::ShowPropertyDescription(int row) -{ - if(row == wxNOT_FOUND || row < 0) - m_cmDescription->SetValue(wxEmptyString); - else - { - wxPropertyItem *pItem = m_cmOptions->GetPropertyItemFromRow(row); - if(pItem) - m_cmDescription->SetValue(pItem->GetHelpString()); - else - m_cmDescription->SetValue(wxEmptyString); - } -} - -/*! - * wxEVT_GRID_CELL_CHANGE event handler for ID_OPTIONS - */ - -void CMakeSetupFrm::OnCellChange( wxGridEvent& event ) -{ - // update the button state when the cache is invalidated - UpdateWindowState(); -} - -void CMakeSetupFrm::OnRecentFileMenu( wxCommandEvent &event ) -{ - if(GetMenuBar()) - { - // get file menu - wxMenu *mnu = GetMenuBar()->GetMenu(0); - wxASSERT(mnu != 0); - - wxMenuItem *item = mnu->FindItem(event.GetId()); - if(item) - m_cmBuildPath->SetValue(item->GetLabel()); - } -} -/*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_COMBOBOX - */ - -void CMakeSetupFrm::OnSearchquerySelected( wxCommandEvent& event ) -{ - m_cmOptions->SetQuery(m_cmSearchQuery->GetValue()); -} - -void CMakeSetupFrm::OnAddQuery ( wxCommandEvent &event ) -{ - // add current text if not yet present - if(m_cmSearchQuery->FindString(m_cmSearchQuery->GetValue()) == wxNOT_FOUND) - { - m_cmSearchQuery->Append(m_cmSearchQuery->GetValue()); - - // if too many items are present, prune - while(m_cmSearchQuery->GetCount() > CM_MAX_SEARCH_QUERIES) - m_cmSearchQuery->Delete(0); - } -} - -/*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SEARCHQUERY - */ - -void CMakeSetupFrm::OnSearchqueryUpdated( wxCommandEvent& event ) -{ - // only refresh when this event was caused by user - if(!m_noRefresh) - m_cmOptions->SetQuery(m_cmSearchQuery->GetValue()); -} - - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_GRID - */ - -void CMakeSetupFrm::OnBrowseGridClick( wxCommandEvent& event ) -{ - m_cmOptions->BrowseSelectedItem(); -} - - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_RELOAD_CACHE - */ - -void CMakeSetupFrm::OnMenuReloadCacheClick( wxCommandEvent& event ) -{ - bool reload = true; - if(m_cmOptions->IsCacheDirty() || (m_cmOptions->GetCount() > 0 && !m_cmOptions->IsGenerated())) - { - int result = ::wxMessageBox(_("You have changed options, are you sure you want to reload?\n"), - _("Warning"), wxYES_NO|wxICON_QUESTION); - - // when user wants to wait, wait.. else quit - if(result == wxNO) - reload = false; - - } - - if(reload) - DoReloadCache(); -} - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_DELETE_CACHE - */ - -void CMakeSetupFrm::OnMenuDeleteCacheClick( wxCommandEvent& event ) -{ - DoDeleteCache(); -} - - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_QUIT - */ - -void CMakeSetupFrm::OnMenuQuitClick( wxCommandEvent& event ) -{ - // the close event will veto if the user - // did not want to quit due to unsaved changes - Close(); -} - - -/*! - * wxEVT_CLOSE_WINDOW event handler for ID_FRAME - */ - -void CMakeSetupFrm::OnCloseWindow( wxCloseEvent& event ) -{ - // ask quit if: - // - The cache is dirty - // - Or the cache is OK and has some items, and no project was generated recently (configure -> generate) - if(m_cmOptions->IsCacheDirty() || (m_cmOptions->GetCount() > 0 && !m_cmOptions->IsGenerated())) - { - int result = ::wxMessageBox(_("You have changed options, but not yet generated the projects\n" - "are you sure you want to quit?"), _("Warning"), wxYES_NO|wxICON_QUESTION); - - // when user wants to wait, wait.. else quit - if(result == wxNO) - event.Veto(); - else - event.Skip(); - } - else - event.Skip(); -} - - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_ABOUTDLG - */ - -void CMakeSetupFrm::OnAboutClick( wxCommandEvent& event ) -{ - CMAboutDlg *dlg = new CMAboutDlg(this); - - wxArrayString generators; - std::vector names; - m_cmake->GetRegisteredGenerators(names); - for(std::vector::iterator i = names.begin(); i != names.end(); ++i) - generators.Add(i->c_str()); - - wxString cmversion, cmsversion; - cmsversion.Printf("v%i.%i%s", CMAKEGUI_MAJORVER, CMAKEGUI_MINORVER, CMAKEGUI_ADDVER); - - dlg->SetAboutText(cmversion, cmsversion, generators); - - dlg->ShowModal(); - dlg->Destroy(); -} - - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_CMAKE_OPTIONS - */ - -void CMakeSetupFrm::OnOptionsClick( wxCommandEvent& event ) -{ - CMOptionsDlg *dlg = new CMOptionsDlg(this); - - dlg->SetConfig(m_config); - if(dlg->ShowModal() == wxID_OK) - { - // store volatile settings - dlg->GetConfig(m_config); - - // apply non volatile setting such as clear search query, recent menu, etc. - SyncFormOptions(dlg); - } - - dlg->Destroy(); -} - -void CMakeSetupFrm::SyncFormOptions(CMOptionsDlg *dlg) -{ - // TODO: Clear search query etc. -} -/*! - * wxEVT_COMMAND_SPLITTER_DOUBLECLICKED event handler for ID_SPLITTERWINDOW - */ - -void CMakeSetupFrm::OnSplitterwindowSashDClick( wxSplitterEvent& event ) -{ - event.Veto(); -} - - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_CONFIGURE - */ - -void CMakeSetupFrm::OnMenuConfigureClick( wxCommandEvent& event ) -{ - DoConfigure(); -} - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_EXITGENERATE - */ - -void CMakeSetupFrm::OnMenuGenerateClick( wxCommandEvent& event ) -{ - // set flag so that a close command is issued - // after generating the cmake cache to projects - m_quitAfterGenerating = true; - DoGenerate(); - m_quitAfterGenerating = false; -} - - -/*! - * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_TOGGLE_ADVANCED - */ - -void CMakeSetupFrm::OnMenuToggleAdvancedClick( wxCommandEvent& event ) -{ - // toggle the check box - m_cmShowAdvanced->SetValue(!m_cmShowAdvanced->GetValue()); - OnShowAdvancedValues(event); -} - - diff --git a/Source/WXDialog/CMakeSetupFrame.h b/Source/WXDialog/CMakeSetupFrame.h deleted file mode 100644 index accadae4a..000000000 --- a/Source/WXDialog/CMakeSetupFrame.h +++ /dev/null @@ -1,360 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 _CMAKESETUPFRAME_H_ -#define _CMAKESETUPFRAME_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "CMakeSetupFrame.cpp" -#endif - -/*! - * Includes - */ - -////@begin includes -#include "wx/frame.h" -#include "wx/splitter.h" -#include "wx/grid.h" -#include "wx/statline.h" -#include "wx/statusbr.h" -////@end includes - -#include -#include -#include - - -#include "../cmake.h" -#include "progressdlg.h" -#include "optionsdlg.h" -#include "CommandLineInfo.h" -#include "config.h" - -// this ID should be taken as base to make sure they are unique -// NOTE: DialogBlocks starts at 10100 so 10000 to 10099 are free -#define CM_NEXT_USABLEID CM_RECENT_BUILD_ITEM + CM_MAX_RECENT_PATHS - -/*! - * Forward declarations - */ - -////@begin forward declarations -class wxSplitterWindow; -class wxPropertyList; -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_FRAME 10100 -#define SYMBOL_CMAKESETUPFRM_STYLE wxDEFAULT_FRAME_STYLE|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wxSUNKEN_BORDER -#define SYMBOL_CMAKESETUPFRM_TITLE _("CMake Setup v2.0.x") -#define SYMBOL_CMAKESETUPFRM_IDNAME ID_FRAME -#define SYMBOL_CMAKESETUPFRM_SIZE wxSize(600, 550) -#define SYMBOL_CMAKESETUPFRM_POSITION wxDefaultPosition -#define ID_SPLITTERWINDOW 10101 -#define ID_MAINPANEL 10102 -#define ID_PROJECT_PATH 10103 -#define ID_BROWSE_PROJECT 10104 -#define ID_SOURCE_BUILD_PATH 10105 -#define ID_BROWSE_BUILD 10106 -#define ID_CHOOSE_GENERATOR 10107 -#define ID_SEARCHQUERY 10109 -#define ID_SHOW_ADVANCED 10108 -#define ID_OPTIONS 10110 -#define ID_LOGPANEL 10111 -#define ID_LOG_AREA 10112 -#define ID_DESCRIPTION 10113 -#define ID_DO_CONFIGURE 10114 -#define ID_DO_OK 10115 -#define ID_DO_CANCEL 10116 -#define ID_DO_DELETE_CACHE 10117 -#define ID_CLEAR_LOG 10118 -#define ID_BROWSE_GRID 10119 -#define ID_STATUSBAR 10120 -#define ID_MENU_RELOAD_CACHE 10122 -#define ID_MENU_DELETE_CACHE 10123 -#define ID_MENU_QUIT 10125 -#define ID_MENU_CONFIGURE 10126 -#define ID_MENU_EXITGENERATE 10127 -#define ID_MENU_TOGGLE_ADVANCED 10128 -#define ID_CMAKE_OPTIONS 10124 -#define ID_ABOUTDLG 10121 -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif -#ifndef wxFIXED_MINSIZE -#define wxFIXED_MINSIZE 0 -#endif - -class DnDFile : public wxFileDropTarget -{ -public: - DnDFile(wxTextCtrl *pOwner) - : m_pOwner(pOwner) - { - }; - - virtual bool OnDropFiles(wxCoord x, wxCoord y, - const wxArrayString& filenames); - -private: - wxTextCtrl *m_pOwner; -}; - - -/*! - * CMakeSetupFrm class declaration - */ - -class CMakeSetupFrm: public wxFrame -{ - DECLARE_CLASS( CMakeSetupFrm ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - CMakeSetupFrm( ); - CMakeSetupFrm( wxWindow* parent, wxWindowID id = SYMBOL_CMAKESETUPFRM_IDNAME, const wxString& caption = SYMBOL_CMAKESETUPFRM_TITLE, const wxPoint& pos = SYMBOL_CMAKESETUPFRM_POSITION, const wxSize& size = SYMBOL_CMAKESETUPFRM_SIZE, long style = SYMBOL_CMAKESETUPFRM_STYLE ); - - // Destructor - virtual ~CMakeSetupFrm(); - - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMAKESETUPFRM_IDNAME, const wxString& caption = SYMBOL_CMAKESETUPFRM_TITLE, const wxPoint& pos = SYMBOL_CMAKESETUPFRM_POSITION, const wxSize& size = SYMBOL_CMAKESETUPFRM_SIZE, long style = SYMBOL_CMAKESETUPFRM_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - - /** Logs a message. For the kind parameter use; - 1 - neutral message - 0 - warning message (blue text) - -1 - error message (red text) - */ - void LogMessage(int logkind, const char *msg); - - void UpdateProgress(float progress) { - if(m_progressDlg) - m_progressDlg->SetProgress(progress); - - // also show in the tiny field - wxStatusBar *bar = GetStatusBar(); - if(bar) - { - wxString str; - str.Printf("%2.1f %%", (progress * 100)); - bar->SetStatusText(str, 1); - } - }; - - void IssueUpdate(); - - /** Initialise all crap in the frame, like listing the make generators, - selecting the best one to use, and loading the cache for the first time - when the build paths were set */ - void DoInitFrame(cmCommandLineInfo &cm, const wxString &fn); - -////@begin CMakeSetupFrm event handler declarations - - /// wxEVT_CLOSE_WINDOW event handler for ID_FRAME - void OnCloseWindow( wxCloseEvent& event ); - - /// wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event handler for ID_SPLITTERWINDOW - void OnSplitterPosChanging( wxSplitterEvent& event ); - - /// wxEVT_COMMAND_SPLITTER_DOUBLECLICKED event handler for ID_SPLITTERWINDOW - void OnSplitterwindowSashDClick( wxSplitterEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_PROJECT - void OnButtonBrowseProject( wxCommandEvent& event ); - - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SOURCE_BUILD_PATH - void OnSourceBuildPathUpdated( wxCommandEvent& event ); - - /// wxEVT_COMMAND_TEXT_ENTER event handler for ID_SOURCE_BUILD_PATH - void OnSourceBuildPathEnter( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_BUILD - void OnButtonBrowseBuild( wxCommandEvent& event ); - - /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_SEARCHQUERY - void OnSearchquerySelected( wxCommandEvent& event ); - - /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SEARCHQUERY - void OnSearchqueryUpdated( wxCommandEvent& event ); - - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_SHOW_ADVANCED - void OnShowAdvancedValues( wxCommandEvent& event ); - - /// wxEVT_GRID_CELL_CHANGE event handler for ID_OPTIONS - void OnCellChange( wxGridEvent& event ); - - /// wxEVT_GRID_SELECT_CELL event handler for ID_OPTIONS - void OnGridSelectCell( wxGridEvent& event ); - - /// wxEVT_MOTION event handler for ID_OPTIONS - void OnPropertyMotion( wxMouseEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CONFIGURE - void OnButtonConfigure( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_OK - void OnButtonOk( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CANCEL - void OnButtonCancel( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_DELETE_CACHE - void OnButtonDeleteCache( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_LOG - void OnClearLogClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_GRID - void OnBrowseGridClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_RELOAD_CACHE - void OnMenuReloadCacheClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_DELETE_CACHE - void OnMenuDeleteCacheClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_QUIT - void OnMenuQuitClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_CONFIGURE - void OnMenuConfigureClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_EXITGENERATE - void OnMenuGenerateClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_TOGGLE_ADVANCED - void OnMenuToggleAdvancedClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_CMAKE_OPTIONS - void OnOptionsClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_ABOUTDLG - void OnAboutClick( wxCommandEvent& event ); - -////@end CMakeSetupFrm event handler declarations - - void OnRecentFileMenu( wxCommandEvent &event ); - - void OnAddQuery ( wxCommandEvent &event ); - -////@begin CMakeSetupFrm member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end CMakeSetupFrm member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - - /** Load cache for the CMakeLists to the GUI */ - void LoadCacheFromDiskToGUI(); - - /** Display the grid with the loaded cache. */ - void FillCacheGUIFromCacheManager(); - - int RunCMake(bool generateProjectFiles); - - /** Save cache to disk from the GUI */ - void SaveCacheFromGUI(); - - void FillCacheManagerFromCacheGUI(); - - /** Update the cache and mark all the new items as old */ - bool PerformCacheRun(); - - /** Shows the property matched by the row in the description area - or nothing when the row is not correct */ - void ShowPropertyDescription(int row); - - /** Disable or enable controls based upon the internal state of the - program */ - void UpdateWindowState(); - - void AppendPathToRecentList(const wxString &p); - - /** Used to synchonise any options that have immediate effect on the GUI - form, like clearing a search list, resetting a spitter perhaps, etc */ - void SyncFormOptions(CMOptionsDlg *dlg); - - void DoCancelButton(); - - void DoReloadCache(); - - void DoDeleteCache(); - - void DoConfigure(); - - void DoGenerate(); - - void OnExitTimer(wxTimerEvent &event); - -////@begin CMakeSetupFrm member variables - wxSplitterWindow* m_splitter; - wxTextCtrl* m_cmProjectPath; - wxButton* m_BrowseProjectPathButton; - wxTextCtrl* m_cmBuildPath; - wxButton* m_BrowseSourcePathButton; - wxComboBox* m_cmGeneratorChoice; - wxComboBox* m_cmSearchQuery; - wxCheckBox* m_cmShowAdvanced; - wxPropertyList* m_cmOptions; - wxTextCtrl* m_cmLog; - wxTextCtrl* m_cmDescription; - wxButton* m_ConfigureButton; - wxButton* m_OkButton; - wxButton* m_CancelButton; - wxButton* m_DeleteCacheButton; - wxButton* m_ClearLogButton; - wxButton* m_cmBrowseCell; -////@end CMakeSetupFrm member variables - - // this is the cmake instance with which we will communicate - // to generate our stuff, and get the info from. - cmake *m_cmake; - - // the config class for project build dir and source path - wxTimer *m_ExitTimer; - wxConfig *m_config; - wxString m_PathToExecutable; - wxArrayString m_recentPaths; - CMProgressDialog *m_progressDlg; - bool m_RunningConfigure; - bool m_noRefresh; - bool m_quitAfterGenerating; -}; - -#endif - // _CMAKESETUPFRAME_H_ diff --git a/Source/WXDialog/CommandLineInfo.cpp b/Source/WXDialog/CommandLineInfo.cpp deleted file mode 100644 index d5db9835a..000000000 --- a/Source/WXDialog/CommandLineInfo.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -#include "CommandLineInfo.h" - -#include "cmSystemTools.h" - -/////////////////////////////////////////////////////////////// -// cmCommandLineInfo - -cmCommandLineInfo::cmCommandLineInfo() -{ - m_WhereSource = _(""); - m_WhereBuild = _(""); - m_AdvancedValues = false; - m_GeneratorChoiceString.Empty(); - m_LastUnknownParameter = ""; - m_ValidArguments = ""; - m_ExitAfterLoad = false; -} - -/////////////////////////////////////////////////////////////// -cmCommandLineInfo::~cmCommandLineInfo() -{ -} - -/////////////////////////////////////////////////////////////// -bool cmCommandLineInfo::ParseCommandLine(int argc, char* argv[]) -{ - bool result = true; - wxString cachePath; - - // parse all commands - int cc = 1; - if(argc < cc) - return true; // no command line options - - while(cc < argc) - { - wxString arg = argv[cc]; - - // if we have a switch - if(arg.Len() > 1 && arg.GetChar(0) == '-') - { - int next_argc = ParseSwitch(argv, cc, argc); - if(next_argc > 0) - cc += next_argc; - else - return false; // sorry error while parsing - } - else - { - // gather all what is left - for(int leftcc = cc; leftcc < argc; leftcc++) - { - if(cc != leftcc) - m_WhereBuild << _(" "); - m_WhereBuild << argv[leftcc]; - } - break; - } - } - - m_ExecutablePath = cmSystemTools::GetFilenamePath(argv[0]).c_str(); - - return true; -} - -/////////////////////////////////////////////////////////////// -int cmCommandLineInfo::GetBoolValue(const wxString& v) { - - wxString value = v.Lower(); - - if (!value.Cmp("1") || - !value.Cmp("on") || - !value.Cmp("true") || - !value.Cmp("yes")) - { - // true - return 1; - } - else if (!value.Cmp("0") || - !value.Cmp("off") || - !value.Cmp("false") || - !value.Cmp("no")) - { - // false - return -1; - } - - // not recognised - return 0; -} - -/////////////////////////////////////////////////////////////// -// Parse param - -size_t cmCommandLineInfo::ParseSwitch(char **argv, int arg_index, int argc) -{ - wxString param = argv[arg_index]; - - // we need this for a switch, at least 2 - if(param.Len() > 1) - { - // determine switch type - switch (param.GetChar(1)) - { - case 'G': - // when it's G<.....> we split else we take the - // other argc - if(param.Len() > 2) - { - m_GeneratorChoiceString = GetStringParam(param.Mid(2)); - return 1; // one arg is passed - } - else - { - if((arg_index+1) < argc) - { - m_GeneratorChoiceString = GetStringParam(wxString(argv[arg_index+1])); - return 2; // two args are passed - } - } - // no luck - return 0; - - case 'Q': - m_ExitAfterLoad = true; - return 1; - - // unknown param - default: - break; - } - } - - // error, unrecognised or too small arg - return 0; -} - -// When the string param given has string quotes around it -// we remove them and we pass back the string. If not, we -// simply pass back the string as-is -wxString cmCommandLineInfo::GetStringParam(const wxString &str) -{ - wxString mystr = str.Strip(wxString::both); - - // if we have only one (or no chars return the current string) - if(mystr.Len() < 2) - return str; - - // if we have quotes - if(mystr.GetChar(0) == '\"' && mystr.Last() == '\"') - { - // when we only have 2 in size, return empty string - if(mystr.Len() == 2) - return wxEmptyString; - - // now remove the outer and inner, and return - return mystr.Mid(1, mystr.Len()-1); - } - - return str; -} diff --git a/Source/WXDialog/CommandLineInfo.h b/Source/WXDialog/CommandLineInfo.h deleted file mode 100644 index 42b79a27d..000000000 --- a/Source/WXDialog/CommandLineInfo.h +++ /dev/null @@ -1,67 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -#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 - bool ParseCommandLine(int argc, char* argv[]); - - // Retrieve the path of executable - wxString GetPathToExecutable() { return this->m_ExecutablePath; } - - // Attributes -public: - wxString m_WhereSource; - wxString m_WhereBuild; - bool m_AdvancedValues; - wxString m_GeneratorChoiceString; - wxString m_LastUnknownParameter; - wxString m_ExecutablePath; - bool m_ExitAfterLoad; - -private: - // Parse one argument - size_t ParseSwitch(char **argv, int arg_index, int argc); - - // Return boolean value of the string - static int GetBoolValue(const wxString&); - - // on windows the argument with spaces SUCKS! So we need to - // incorporate it with quotes. - wxString GetStringParam(const wxString &str); - - wxString m_ValidArguments; -}; - -#endif // !defined(CMAKECOMMANDLINEINFO_H) diff --git a/Source/WXDialog/NGDialog.exe.manifest b/Source/WXDialog/NGDialog.exe.manifest deleted file mode 100644 index 6cdabd031..000000000 --- a/Source/WXDialog/NGDialog.exe.manifest +++ /dev/null @@ -1,22 +0,0 @@ - - - - CMake Next Generation Dialog - - - - - - \ No newline at end of file diff --git a/Source/WXDialog/NGDialog.ico b/Source/WXDialog/NGDialog.ico deleted file mode 100644 index e13bb156f..000000000 Binary files a/Source/WXDialog/NGDialog.ico and /dev/null differ diff --git a/Source/WXDialog/PropertyList.cpp b/Source/WXDialog/PropertyList.cpp deleted file mode 100644 index ef7c89730..000000000 --- a/Source/WXDialog/PropertyList.cpp +++ /dev/null @@ -1,856 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -/* for compilers that support precompilation - includes "wx/wx.h" */ - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#include "PropertyList.h" -#include "app_resources.h" - -#include "../cmCacheManager.h" -#include "../cmSystemTools.h" -#include "../cmake.h" - -BEGIN_EVENT_TABLE( wxPropertyList, wxGrid ) - EVT_GRID_CELL_LEFT_CLICK( wxPropertyList::OnSelectCell ) - EVT_GRID_CELL_CHANGE( wxPropertyList::OnCellChange ) - EVT_GRID_CMD_CELL_RIGHT_CLICK( wxID_ANY, wxPropertyList::OnCellPopup ) - EVT_MENU ( ID_CACHE_DELETE, wxPropertyList::OnDeleteCache ) - EVT_MENU ( ID_CACHE_IGNORE, wxPropertyList::OnIgnoreCache ) - EVT_MENU ( ID_CACHE_BROWSE, wxPropertyList::OnBrowseItem ) - EVT_SIZE ( wxPropertyList::OnSizeGrid ) - EVT_CHAR ( wxPropertyList::OnKeyPressed ) -END_EVENT_TABLE() - -#if 0 - -// ---------------------------------------------------------------------------- -// wxGridCellPathEditor -// ---------------------------------------------------------------------------- - -wxGridCellPathEditor::wxGridCellPathEditor() -{ - m_maxChars = 0; -} - -void wxGridCellPathEditor::Create(wxWindow* parent, - wxWindowID id, - wxEvtHandler* evtHandler) -{ - m_control = new wxTextCtrl(parent, id, wxEmptyString, - wxDefaultPosition, wxDefaultSize -#if defined(__WXMSW__) - , wxTE_PROCESS_TAB | wxTE_AUTO_SCROLL -#endif - ); -// -// m_button = new wxButton(parent, id+1, _("..."), -// wxDefaultPosition, wxDefaultSize); -// - - // set max length allowed in the textctrl, if the parameter was set - if (m_maxChars != 0) - { - ((wxTextCtrl*)m_control)->SetMaxLength(m_maxChars); - } - - wxGridCellEditor::Create(parent, id, evtHandler); -} - -void wxGridCellPathEditor::PaintBackground(const wxRect& WXUNUSED(rectCell), - wxGridCellAttr * WXUNUSED(attr)) -{ - // as we fill the entire client area, don't do anything here to minimize - // flicker -} - -void wxGridCellPathEditor::SetSize(const wxRect& rectOrig) -{ - wxRect rect(rectOrig); - - // Make the edit control large enough to allow for internal - // margins - // - // TODO: remove this if the text ctrl sizing is improved esp. for - // unix - // -#if defined(__WXGTK__) - if (rect.x != 0) - { - rect.x += 1; - rect.y += 1; - rect.width -= 1; - rect.height -= 1; - } -#else // !GTK - int extra_x = ( rect.x > 2 )? 2 : 1; - -// MB: treat MSW separately here otherwise the caret doesn't show -// when the editor is in the first row. -#if defined(__WXMSW__) - int extra_y = 2; -#else - int extra_y = ( rect.y > 2 )? 2 : 1; -#endif // MSW - -#if defined(__WXMOTIF__) - extra_x *= 2; - extra_y *= 2; -#endif - rect.SetLeft( wxMax(0, rect.x - extra_x) ); - rect.SetTop( wxMax(0, rect.y - extra_y) ); - rect.SetRight( rect.GetRight() + 2*extra_x ); - rect.SetBottom( rect.GetBottom() + 2*extra_y ); -#endif // GTK/!GTK - - wxGridCellEditor::SetSize(rect); -} - -void wxGridCellPathEditor::BeginEdit(int row, int col, wxGrid* grid) -{ - wxASSERT_MSG(m_control, - wxT("The wxGridCellEditor must be Created first!")); - - m_startValue = grid->GetTable()->GetValue(row, col); - - DoBeginEdit(m_startValue); -} - -void wxGridCellPathEditor::DoBeginEdit(const wxString& startValue) -{ - Text()->SetValue(startValue); - Text()->SetInsertionPointEnd(); - Text()->SetSelection(-1,-1); - Text()->SetFocus(); -} - -bool wxGridCellPathEditor::EndEdit(int row, int col, - wxGrid* grid) -{ - wxASSERT_MSG(m_control, - wxT("The wxGridCellEditor must be Created first!")); - - bool changed = false; - wxString value = Text()->GetValue(); - if (value != m_startValue) - changed = true; - - if (changed) - grid->GetTable()->SetValue(row, col, value); - - m_startValue = wxEmptyString; - // No point in setting the text of the hidden control - //Text()->SetValue(m_startValue); - - return changed; -} - - -void wxGridCellPathEditor::Reset() -{ - wxASSERT_MSG(m_control, - wxT("The wxGridCellEditor must be Created first!")); - - DoReset(m_startValue); -} - -void wxGridCellPathEditor::DoReset(const wxString& startValue) -{ - Text()->SetValue(startValue); - Text()->SetInsertionPointEnd(); -} - -bool wxGridCellPathEditor::IsAcceptedKey(wxKeyEvent& event) -{ - return wxGridCellEditor::IsAcceptedKey(event); -} - -void wxGridCellPathEditor::StartingKey(wxKeyEvent& event) -{ - // Since this is now happening in the EVT_CHAR event EmulateKeyPress is no - // longer an appropriate way to get the character into the text control. - // Do it ourselves instead. We know that if we get this far that we have - // a valid character, so not a whole lot of testing needs to be done. - - wxTextCtrl* tc = Text(); - wxChar ch; - long pos; - -#if wxUSE_UNICODE - ch = event.GetUnicodeKey(); - if (ch <= 127) - ch = (wxChar)event.GetKeyCode(); -#else - ch = (wxChar)event.GetKeyCode(); -#endif - switch (ch) - { - case WXK_DELETE: - // delete the character at the cursor - pos = tc->GetInsertionPoint(); - if (pos < tc->GetLastPosition()) - tc->Remove(pos, pos+1); - break; - - case WXK_BACK: - // delete the character before the cursor - pos = tc->GetInsertionPoint(); - if (pos > 0) - tc->Remove(pos-1, pos); - break; - - default: - tc->WriteText(ch); - break; - } -} - -void wxGridCellPathEditor::HandleReturn( wxKeyEvent &event ) -{ -#if defined(__WXMOTIF__) || defined(__WXGTK__) - // wxMotif needs a little extra help... - size_t pos = (size_t)( Text()->GetInsertionPoint() ); - wxString s( Text()->GetValue() ); - s = s.Left(pos) + wxT("\n") + s.Mid(pos); - Text()->SetValue(s); - Text()->SetInsertionPoint( pos ); -#else - // the other ports can handle a Return key press - // - event.Skip(); -#endif -} - -void wxGridCellPathEditor::SetParameters(const wxString& params) -{ - if ( !params ) - { - // reset to default - m_maxChars = 0; - } - else - { - long tmp; - if ( !params.ToLong(&tmp) ) - { - wxLogDebug(_T("Invalid wxGridCellPathEditor parameter string '%s' ignored"), params.c_str()); - } - else - { - m_maxChars = (size_t)tmp; - } - } -} - -// return the value in the text control -wxString wxGridCellPathEditor::GetValue() const -{ - return Text()->GetValue(); -} - -#endif - -///////////////////////////////////////////////////////////////////////////// -// wxPropertyItem - -// returns true when this property item is a filepath -bool wxPropertyItem::IsFilePath() -{ - return m_nItemType == wxPropertyList::FILE; -} - -// returns true when this property item is a dir path -bool wxPropertyItem::IsDirPath() -{ - return m_nItemType == wxPropertyList::PATH; -} - -///////////////////////////////////////////////////////////////////////////// -// wxPropertyList - -wxPropertyList::~wxPropertyList() -{ - WX_CLEAR_ARRAY(m_PropertyItems); -} - -int wxPropertyList::AddItem(const wxString &txt) -{ - // TODO: Add the item to the grid! - - //int nIndex = AddString(txt); - //return nIndex; - - return 0; -} - -// order = 0 sorted (not supported yet) -// order = 1 add to top -// order = 2 add to bottom -int wxPropertyList::AddPropItem(wxPropertyItem* pItem, int order) -{ - m_PropertyItems.Add(pItem); - if(pItem->GetAdvanced() && ! m_ShowAdvanced) - return 0; - - // disable in progress editing - HideControls(); - - return AddPropertyToGrid(pItem, order); -} - -int wxPropertyList::AddPropertyToGrid(wxPropertyItem *pItem, int order) -{ - int row = 0; - if(order == 1) - InsertRows(0,1); - else - { - AppendRows(1); - row = GetNumberRows() - 1; - } - - // initialise the type of renderer - if(pItem->GetItemType() == wxPropertyList::CHECKBOX) - { - SetCellRenderer(row, 1, new wxGridCellBoolRenderer); - SetCellEditor(row, 1, new wxGridCellBoolEditor); - } - -#ifdef __LINUX__ - // fix to make sure scrollbars are drawn properly - wxGrid::AdjustScrollbars(); -#endif - - // the property display is read only - UpdatePropertyItem(pItem, row); - return row; -} - -void wxPropertyList::AddProperty(const char* name, const char* value, const char* helpString, - int type, const char* comboItems, bool reverseOrder, bool advanced) -{ - wxPropertyItem* pItem = 0; - - // add or update the property item - for(size_t i = 0; i < m_PropertyItems.Count(); i++) - { - if(m_PropertyItems[i]->GetPropName().IsSameAs(name)) - { - pItem = m_PropertyItems[i]; - if(!pItem->GetCurValue().IsSameAs(value)) - { - pItem->SetCurValue(value); - pItem->SetHelpString(helpString); - pItem->SetAdvanced(advanced); - - // update the property item - int row = FindProperty(pItem); - if(row != -1) - UpdatePropertyItem(pItem, row); - } - return; - } - } - - // if it is not found, then create a new one - if(!pItem) - { - pItem = new wxPropertyItem(name, value, helpString, type, comboItems); - pItem->SetAdvanced(advanced); - - AddPropItem(pItem, 1); - } -} - -void wxPropertyList::UpdateGridView() -{ - // make sure all items are shown, remove items that should not be shown - bool keepItem; - int row; - for(size_t i = 0; i < m_PropertyItems.Count(); i++) - { - // to begin with, does this item fit the query? - keepItem = m_strQuery.IsEmpty() || (m_PropertyItems[i]->GetPropName().Find(m_strQuery) != -1); - if(keepItem) - { - // when advanced items are allowed to be shown, keep when ok - if(!m_ShowAdvanced) - keepItem = !m_PropertyItems[i]->GetAdvanced(); - } - - // find the item, if not present but keep is true, add, if - // present but keep is false, remove - row = -1; - for(size_t j = 0; j < (size_t)GetNumberRows(); j++) - { - if(m_PropertyItems[i]->GetPropName().IsSameAs(GetCellValue(j, 0))) - { - row = j; - break; - } - } - - if(row == -1 && keepItem) - AddPropertyToGrid(m_PropertyItems[i], (m_ShowAdvanced ? 2 : 0)); - else if(row != -1 && !keepItem) - DeleteRows(row, 1); - } - -#ifdef __LINUX__ - // fix to make sure scrollbars are drawn properly - wxGrid::AdjustScrollbars(); -#endif -} - -void wxPropertyList::HideControls() -{ - DisableCellEditControl(); -} - -void wxPropertyList::RemoveProperty(wxPropertyItem *pItem) -{ - HideControls(); - - // look for property in grid, delete it when present - for(size_t j = 0; j < (size_t)GetNumberRows(); j++) - { - if(pItem->GetPropName().IsSameAs(GetCellValue(j, 0), false)) - { - DeleteRows(j, 1); - -#ifdef __LINUX__ - // fix to make sure scrollbars are drawn properly - wxGrid::AdjustScrollbars(); -#endif - break; - } - } - - // delete the item from the list - m_PropertyItems.Remove(pItem); - delete pItem; -} - -wxPropertyItem *wxPropertyList::FindPropertyByName(const wxString &name) -{ - for(size_t i = 0; i < m_PropertyItems.Count(); i++) - { - // we have an advanced item, go through table and if not present, show it - if(m_PropertyItems[i]->GetPropName().IsSameAs(name, true)) - return m_PropertyItems[i]; - } - - return 0; -} - -/** -void wxPropertyList::OnIgnore() -{ - if(m_curSel == -1 || this->GetCount() <= 0) - { - return; - } - wxPropertyItem* pItem = (wxPropertyItem*) GetItemDataPtr(m_curSel); - pItem->m_curValue = "IGNORE"; - InvalidateList(); -} -*/ - -/** -void wxPropertyList::OnDelete() -{ - if(m_curSel == -1 || this->GetCount() <= 0) - { - return; - } - wxPropertyItem* pItem = (wxPropertyItem*) GetItemDataPtr(m_curSel); - m_CMakeSetupDialog->GetCMakeInstance()->GetCacheManager()->RemoveCacheEntry(pItem->m_propName); - m_PropertyItems.erase(pItem); - delete pItem; - this->DeleteString(m_curSel); - this->HideControls(); - this->SetTopIndex(0); - InvalidateList(); -} -*/ - -/** -void wxPropertyList::OnHelp() -{ - if(m_curSel == -1 || this->GetCount() <= 0) - { - return; - } - wxPropertyItem* pItem = (wxPropertyItem*) GetItemDataPtr(m_curSel); - MessageBox(pItem->m_HelpString, pItem->m_propName, MB_OK|MB_ICONINFORMATION); -} -*/ - -void wxPropertyList::RemoveAll() -{ - WX_CLEAR_ARRAY(m_PropertyItems); - m_generatedProjects = false; - - if(GetNumberRows() > 0) - DeleteRows(0, GetNumberRows()); - - m_strQuery.Empty(); - -#ifdef __LINUX__ - // fix to make sure scrollbars are drawn properly - wxGrid::AdjustScrollbars(); -#endif -} - -void wxPropertyList::ShowAdvanced() -{ - // set flag in the control - m_ShowAdvanced = true; - UpdateGridView(); -} - - -void wxPropertyList::HideAdvanced() -{ - // set flag in the control - m_ShowAdvanced = false; - UpdateGridView(); -} - -int wxPropertyList::FindProperty(wxPropertyItem *pItem) -{ - if(GetNumberRows() > 0 && pItem != 0) - { - // find the property the traditional way - for(size_t j = 0; j < (size_t)GetNumberRows(); j++) - { - if(pItem->GetPropName().IsSameAs(GetCellValue(j, 0))) - return j; - } - } - - return -1; -} - -wxPropertyItem *wxPropertyList::GetPropertyItemFromRow(int row) -{ - if(row < GetNumberRows() && row >= 0) - { - wxString str = GetCellValue(row, 0); - // find the property the traditional way - for(size_t i = 0; i < (size_t)m_PropertyItems.Count(); i++) - { - if(m_PropertyItems[i]->GetPropName().IsSameAs(str)) - return m_PropertyItems[i]; - } - } - - return 0; -} - -bool wxPropertyList::UpdatePropertyItem(wxPropertyItem *pItem, int row) -{ - wxCHECK(row < GetNumberRows(), false); - - // reflect the property's state to match the grid row - - SetReadOnly(row, 0); - // TODO: Make this a UpdatePropItem where ADVANCED, and new edit values are reflected - SetCellValue(row,0, pItem->GetPropName()); - - // boolean renderer - if(pItem->GetItemType() == wxPropertyList::CHECKBOX) - { - // translate ON or TRUE (case insensitive to a checkbox) - if(pItem->GetCurValue().IsSameAs(wxT("ON"), false) || - pItem->GetCurValue().IsSameAs(wxT("TRUE"), false)) - SetCellValue(row, 1, wxT("1")); - else - SetCellValue(row, 1, wxT("0")); - } - else - { - // for normal path values, give bold in cell when - // the NOTFOUND is present, for emphasis - wxString str = pItem->GetPropName() + wxT("-NOTFOUND"); - if(pItem->GetCurValue().IsSameAs(str)) - { - wxFont fnt = GetCellFont(row, 0); - fnt.SetWeight(wxFONTWEIGHT_BOLD); - SetCellFont(row, 1, fnt); - } - else - SetCellFont(row, 1, GetCellFont(row, 0)); - - SetCellValue(row,1, pItem->GetCurValue()); - } - - if(pItem->GetCurValue().IsSameAs("IGNORE")) - { - // ignored cell is completely dimmed - wxColour col(192,192,192); - SetCellTextColour(row, 1, col); - } - else - { - // we colour paths blue, filenames green, all else black - wxColour col; - if(pItem->IsDirPath()) - col.Set(0,0,255); - else if(pItem->IsFilePath()) - col.Set(0,128,0); - else - col = GetCellTextColour(row, 0); - - SetCellTextColour(row, 1, col); - } - - if(pItem->GetNewValue()) - { - // new cell is red - wxColour col(255,100,100); - SetCellBackgroundColour(row, 0, col); - } - else - { - // old cell is grey - wxColour col(192, 192, 192); - SetCellBackgroundColour(row, 0, col); - } - - return true; -} - -void wxPropertyList::OnSelectCell( wxGridEvent& event ) -{ - this->SetFocus(); - event.Skip(); -} - -void wxPropertyList::OnCellChange( wxGridEvent& event ) -{ - int row = event.GetRow(); - - wxPropertyItem *pItem = GetPropertyItemFromRow(row); - if(pItem && row != wxNOT_FOUND) - { - // write propery back, and set as new - pItem->SetNewValue(true); - - // write back bool - if(pItem->GetItemType() == CHECKBOX) - { - if(GetCellValue(row, 1).IsSameAs("1")) - pItem->SetCurValue("ON"); - else - pItem->SetCurValue("OFF"); - } - else - pItem->SetCurValue(GetCellValue(row, 1)); - - UpdatePropertyItem(pItem, row); - event.Skip(); - } -} - -void wxPropertyList::OnCellPopup( wxGridEvent& event ) -{ - wxPoint pt; - int row = event.GetRow(); - - //pt = ::wxGetMousePosition(); - //ScreenToClient(pt); - - //row = YToRow(pt.y); - if(row != wxNOT_FOUND) - { - wxPropertyItem *pItem = GetPropertyItemFromRow(row); - - if(pItem) - { - // select the row first if already in selection, don't - // this will clear the previous selection - if(!IsInSelection(row, 0)) - SelectRow(row); - - // show popup menu - wxMenu *menu = AppResources::CreatePopupMenu(); - - // enable when it is browsable, and selected one only - wxMenuItem *item = menu->FindItem(ID_CACHE_BROWSE); - if(item) - item->Enable(IsSelectedItemBrowsable()); - - PopupMenu(menu); - - delete menu; - } - } -} - -void wxPropertyList::OnIgnoreCache( wxCommandEvent& event ) -{ - HideControls(); - - // ignore all selected items - for(size_t i = 0; i < (size_t)GetNumberRows(); i++) - { - if(IsInSelection(i, 0)) - { - wxPropertyItem *pItem = GetPropertyItemFromRow(i); - if(pItem) - { - pItem->SetCurValue("IGNORE"); - UpdatePropertyItem(pItem, i); - } - } - } -} - -void wxPropertyList::OnDeleteCache( wxCommandEvent& event ) -{ - HideControls(); - - // convert selections to prop items - wxArrayPtrVoid items; - for(size_t i = 0; i < (size_t)GetNumberRows(); i++) - { - // if selected, query for removal - if(IsInSelection(i, 0)) - { - wxPropertyItem *pItem = GetPropertyItemFromRow(i); - if(pItem) - items.Add((void *)pItem); - } - } - - // now delete all prop items in cells - for(size_t i = 0; i < items.Count(); i++) - RemoveProperty((wxPropertyItem *)items[i]); -} - -void wxPropertyList::OnBrowseItem( wxCommandEvent& event ) -{ - BrowseSelectedItem(); -} - -bool wxPropertyList::IsSelectedItemBrowsable(int row) -{ - // when there is only one selection, and our current item - // is browsable, make sure it can be selected. - wxPropertyItem *pItem = 0; - - size_t count = 0; - for(size_t i = 0; i < (size_t)GetNumberRows() && (count < 2); i++) - { - if(IsInSelection(i, 0)) - { - if(!pItem) - pItem = GetPropertyItemFromRow(i); - count ++; - } - } - - // if we found nothing, take row (because the event EVT_GRID_CELL_SELECTED - // deselects the cells first before selecting the new one again - if(row != -1 && !pItem) - { - pItem = GetPropertyItemFromRow(row); - count ++; // needed because of next loop - } - - // only one item allowed to select - if(pItem && count == 1) - { - if(pItem) - return pItem->IsDirPath() || pItem->IsFilePath(); - } - - return false; -} - - -void wxPropertyList::BrowseSelectedItem() -{ - HideControls(); - - for(size_t i = 0; i < (size_t)GetNumberRows(); i++) - { - if(IsInSelection(i, 0)) - { - // browse for file or directory - wxPropertyItem *pItem = GetPropertyItemFromRow(i); - if(pItem) - { - wxString title; - wxString str = pItem->GetPropName() + _("-NOTFOUND"); - if(pItem->GetCurValue().IsSameAs(str, true)) - str.Empty(); - else - str = pItem->GetCurValue(); - - // browse the directory path - - if(pItem->IsDirPath()) - { - title = _("Select path for ") + pItem->GetPropName(); - str = ::wxDirSelector(title, str, 0, wxDefaultPosition, this); - } - else if(pItem->IsFilePath()) - { - title = _("Select file for ") + pItem->GetPropName(); - str = ::wxFileSelector(title, str, _(""), _(""), _(MC_DEFAULT_WILDCARD), wxFILE_MUST_EXIST, this); - } - else - str.Empty(); - - if(!str.IsEmpty()) - { - pItem->SetCurValue(str.c_str()); - UpdatePropertyItem(pItem, i); - } - } - - // only allow one item to browse - break; - } - } -} - -void wxPropertyList::OnSizeGrid( wxSizeEvent &event ) -{ - int width, height; - - // make sure the grid's cells are equally adjusted - GetClientSize(&width, &height); - SetDefaultColSize(width / 2, true); - - wxGrid::AdjustScrollbars(); -} - -void wxPropertyList::OnKeyPressed( wxKeyEvent &event ) -{ - event.Skip(); -} diff --git a/Source/WXDialog/PropertyList.h b/Source/WXDialog/PropertyList.h deleted file mode 100644 index 8dbf4da37..000000000 --- a/Source/WXDialog/PropertyList.h +++ /dev/null @@ -1,339 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 __WXPROPERTYLIST_H -#define __WXPROPERTYLIST_H - - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include -#include - -#include "../cmStandardIncludes.h" - -#ifdef __LINUX__ - #define MC_DEFAULT_WILDCARD "*" -#else - #define MC_DEFAULT_WILDCARD "*.*" -#endif - -#if 0 - -// the editor for string/text data -class wxGridCellPathEditor : public wxGridCellEditor -{ -public: - wxGridCellPathEditor(); - - virtual void Create(wxWindow* parent, - wxWindowID id, - wxEvtHandler* evtHandler); - virtual void SetSize(const wxRect& rect); - - virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); - - virtual bool IsAcceptedKey(wxKeyEvent& event); - virtual void BeginEdit(int row, int col, wxGrid* grid); - virtual bool EndEdit(int row, int col, wxGrid* grid); - - virtual void Reset(); - virtual void StartingKey(wxKeyEvent& event); - virtual void HandleReturn(wxKeyEvent& event); - - // parameters string format is "max_width" - virtual void SetParameters(const wxString& params); - - virtual wxGridCellEditor *Clone() const - { return new wxGridCellPathEditor; } - - // DJC MAPTEK - // added GetValue so we can get the value which is in the control - virtual wxString GetValue() const; -protected: - wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; } - - // parts of our virtual functions reused by the derived classes - void DoBeginEdit(const wxString& startValue); - void DoReset(const wxString& startValue); - -private: - size_t m_maxChars; // max number of chars allowed - wxString m_startValue; - - DECLARE_NO_COPY_CLASS(wxGridCellPathEditor) -}; - -#endif - -///////////////////////////////////////////////////////////////////////////// -//wxPropertyItem Items -class wxPropertyItem -{ -public: - wxPropertyItem(const wxString &propName, const wxString &curValue, - const wxString &helpString, int nItemType, const wxString &cmbItems) - : m_NewValue(true) - , m_HelpString(helpString) - , m_Removed(false) - , m_propName(propName) - , m_curValue(curValue) - , m_nItemType(nItemType) - , m_cmbItems(cmbItems) - , m_Advanced(false) - { - //m_NewValue = true; - //m_HelpString = helpString; - //m_Removed = false; - //m_propName = propName; - //m_curValue = curValue; - //m_nItemType = nItemType; - //m_cmbItems = cmbItems; - //m_Advanced = false; - } - - const wxString &GetCurValue() const { - return m_curValue; - }; - - const wxString &GetPropName() const { - return m_propName; - }; - - void SetCurValue(const char *str) { - m_curValue = str; - }; - - void SetPropName(const char *str) { - m_propName = str; - }; - - void SetAdvanced(bool value) { - m_Advanced = value; - }; - - void SetHelpString(const char *str) { - m_HelpString = str; - }; - - bool GetAdvanced() const { - return m_Advanced; - }; - - void SetNewValue(bool value) { - m_NewValue = value; - }; - - bool GetNewValue() const { - return m_NewValue; - }; - - int GetItemType() const { - return m_nItemType; - }; - - const wxString &GetHelpString() const { - return m_HelpString; - }; - - // returns true when this property item is a filepath - bool IsFilePath(); - - // returns true when this property item is a dir path - bool IsDirPath(); - -private: - wxString m_HelpString; - wxString m_propName; - wxString m_curValue; - int m_nItemType; - wxString m_cmbItems; - bool m_NewValue; - bool m_Removed; - bool m_Advanced; -}; - -WX_DEFINE_ARRAY(wxPropertyItem *, wxPropertyItems); - -///////////////////////////////////////////////////////////////////////////// -// wxPropertyList Grid -class wxPropertyList : public wxGrid -{ -// Construction -public: - wxPropertyList(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, - const wxString& name = wxPanelNameStr) - : wxGrid(parent, id, pos, size, style, name) - { - }; - - enum ItemType - { - COMBO = 0, - EDIT, - COLOR, - FONT, - FILE, - CHECKBOX, - PATH - }; - - virtual ~wxPropertyList(); - -public: - bool GetShowAdvanced() const { - return m_ShowAdvanced; - }; - - void SetProjectGenerated(bool value) { - m_generatedProjects = value; - }; - - bool IsGenerated() { - return m_generatedProjects; - }; - - int AddItem(const wxString &txt); - - void AddProperty(const char* name, const char* value, const char* helpString, int type, - const char* comboItems, bool reverseOrder, bool advanced); - - void RemoveProperty(wxPropertyItem *pItem); - - void HideControls(); - void ShowAdvanced(); - void HideAdvanced(); - - void RemoveAll(); - - wxPropertyItem* GetItem(size_t index) { - wxCHECK(index < GetCount(), 0); - return m_PropertyItems[index]; - }; - - size_t GetCount() const { - return m_PropertyItems.Count(); - }; - - const wxPropertyItems &GetItems() { - return m_PropertyItems; - }; - - void SetShowAdvanced(bool value) { - m_ShowAdvanced = value; - }; - - bool UpdatePropertyItem(wxPropertyItem *pItem, int row); - - /** Returns the row of the grid on which the item is found. -1 is returned when not found */ - int FindProperty(wxPropertyItem *pItem); - - /** Returns true when the cache is still dirty, which means - after a configuration run, there are still new items */ - bool IsCacheDirty() { - // check if we have items that are new - for(size_t i = 0; i < m_PropertyItems.Count(); i++) - { - //if((m_PropertyItems[i]->GetNewValue() && m_ShowAdvanced && m_PropertyItems[i]->GetAdvanced()) || - // (m_PropertyItems[i]->GetNewValue() && !m_ShowAdvanced)) - if(m_PropertyItems[i]->GetNewValue()) - return true; - } - - // return flag if generated cache or not - return false; - }; - - /** Returns the property item from the current row. 0 if no property item found */ - wxPropertyItem *GetPropertyItemFromRow(int row); - - /** Finds the property by name and returns the property item */ - wxPropertyItem *FindPropertyByName(const wxString &name); - - /** Sets the search filter. Making sure that the items currently displayed - match this substring query */ - void SetQuery(const wxString &query) { - m_strQuery = query; - UpdateGridView(); - }; - - /** Returns the last used query. */ - const wxString &GetQuery() { - return m_strQuery; - }; - - /** Function that tries to browse for the item that is selected */ - void BrowseSelectedItem(); - - /** Returns true when the item is browsable (file or path) and only one item is - selected */ - bool IsSelectedItemBrowsable(int row = -1); - -private: - // order = 0 sorted - // order = 1 add to top - // order = 2 add to bottom - int AddPropItem(wxPropertyItem* pItem, int order); - - /** Adds the property item to the grid. */ - int AddPropertyToGrid(wxPropertyItem *pItem, int order) ; - - /** Adds / removes all the items that are currently (not) matching the - query filter */ - void UpdateGridView(); - - void OnSelectCell( wxGridEvent& event ); - - void OnCellChange( wxGridEvent& event ); - - void OnCellPopup( wxGridEvent& event ); - - void OnIgnoreCache( wxCommandEvent& event ); - - void OnDeleteCache( wxCommandEvent& event ); - - void OnSizeGrid( wxSizeEvent &event ); - - void OnBrowseItem( wxCommandEvent& event ); - - void OnKeyPressed( wxKeyEvent &event ); - - int m_curSel; - int m_prevSel; - int m_nDivider; - int m_nDivTop; - int m_nDivBtm; - int m_nOldDivX; - int m_nLastBox; - bool m_bTracking; - bool m_bDivIsSet; - bool m_ShowAdvanced; - // flag to indicate the last cache load has resulted - // in generating a valid project - bool m_generatedProjects; - wxString m_strQuery; - wxPropertyItems m_PropertyItems; - - DECLARE_EVENT_TABLE() -}; - -#endif diff --git a/Source/WXDialog/about.html b/Source/WXDialog/about.html deleted file mode 100644 index 52187ed91..000000000 --- a/Source/WXDialog/about.html +++ /dev/null @@ -1,21 +0,0 @@ - - -CMake - CMakeSetup GUI Build System - - - -CMake - CMakeSetup GUI Build System -

Welcome to CMake! The cross-platform, open-source make system. - -CMake is used to control the software compilation process using simple platform and compiler independent configuration files. -CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. -Please go to http://www.cmake.org to learn more about CMake.

-CMakeSetup.exe is enhanced and ported to wxWidgets 2.6.0 by Jorgen Bodde (jorgb@xs4all.nl).
-Current CMakeSetup version is: @V@
-Current CMake build system is: @B@

-Current generators are supported:
-@G@ -
-

- - diff --git a/Source/WXDialog/aboutdlg.cpp b/Source/WXDialog/aboutdlg.cpp deleted file mode 100644 index e87b96e3a..000000000 --- a/Source/WXDialog/aboutdlg.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "aboutdlg.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes - -#include "cmake_logo.xpm" -#include "aboutdlg.h" - -////@begin XPM images -////@end XPM images - -/*! - * CMAboutDlg type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( CMAboutDlg, wxDialog ) - -/*! - * CMAboutDlg event table definition - */ - -BEGIN_EVENT_TABLE( CMAboutDlg, wxDialog ) - -////@begin CMAboutDlg event table entries - EVT_BUTTON( ID_ABOUT_DLG_OK, CMAboutDlg::OnAboutDlgClick ) - -////@end CMAboutDlg event table entries - -END_EVENT_TABLE() - -/*! - * CMAboutDlg constructors - */ - -CMAboutDlg::CMAboutDlg( ) -{ -} - -CMAboutDlg::CMAboutDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ - Create(parent, id, caption, pos, size, style); -} - -/*! - * CMAboutDlg creator - */ - -bool CMAboutDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ -////@begin CMAboutDlg member initialisation - m_cmIcon = NULL; - m_html = NULL; -////@end CMAboutDlg member initialisation - -////@begin CMAboutDlg creation - SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - GetSizer()->Fit(this); - GetSizer()->SetSizeHints(this); - Centre(); -////@end CMAboutDlg creation - - // set logo on the dialog - wxBitmap bmp(cmake_logo); - m_cmIcon->SetBitmap(bmp); - - return TRUE; -} - -/*! - * Control creation for CMAboutDlg - */ - -void CMAboutDlg::CreateControls() -{ -////@begin CMAboutDlg content construction - CMAboutDlg* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); - itemDialog1->SetSizer(itemBoxSizer2); - - wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(1, 2, 0, 0); - itemFlexGridSizer3->AddGrowableRow(0); - itemFlexGridSizer3->AddGrowableCol(1); - itemBoxSizer2->Add(itemFlexGridSizer3, 1, wxGROW|wxALL, 5); - - wxBitmap m_cmIconBitmap(wxNullBitmap); - m_cmIcon = new wxStaticBitmap( itemDialog1, wxID_STATIC, m_cmIconBitmap, wxDefaultPosition, wxSize(32, 32), 0 ); - itemFlexGridSizer3->Add(m_cmIcon, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_TOP|wxLEFT|wxRIGHT|wxTOP, 5); - - m_html = new wxHtmlWindow( itemDialog1, ID_HTMLWINDOW, wxDefaultPosition, wxSize(500, 300), wxHW_SCROLLBAR_AUTO|wxNO_BORDER|wxHSCROLL|wxVSCROLL ); - itemFlexGridSizer3->Add(m_html, 1, wxGROW|wxGROW|wxRIGHT|wxTOP|wxBOTTOM, 5); - - wxButton* itemButton6 = new wxButton( itemDialog1, ID_ABOUT_DLG_OK, _("&Ok"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer2->Add(itemButton6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - -////@end CMAboutDlg content construction -} - -/*! - * Should we show tooltips? - */ - -bool CMAboutDlg::ShowToolTips() -{ - return TRUE; -} - -void CMAboutDlg::SetAboutText(const wxString &cmversion, const wxString &cmsversion, const wxArrayString &generators) -{ - // set HTML text in window - - wxString text = _("CMakeSetup - GUI Build System for CMake" - "CMakeSetup - GUI Build System for CMake" - "

Welcome to CMake! The cross-platform, open-source make system." - "CMake is used to control the software compilation process using simple platform and compiler independent configuration files. " - "CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. " - "Please go to http://www.cmake.org to learn more about CMake.

" - "CMakeSetup.exe is enhanced and ported by Jorgen Bodde using @WXV@. The original CMakeSetup.exe is " - "written by Bill Hoffman, Ken Martin, Brad King and Andy Cedilnik.

" - "Current CMakeSetup version is: @B@
" - "Current CMake build system is: @V@

" - "Current generators are supported:
" - "@G@

"); - - // compile list of generators in a bulleted list - wxString gens = _("
    "); - for(size_t i = 0; i < generators.Count(); i++) - gens << "
  • " << generators[i] << "
  • "; - gens << _("
"); - - // replace stuff - text.Replace(_("@V@"), cmversion, true); - text.Replace(_("@B@"), cmsversion, true); - text.Replace(_("@G@"), gens, true); - text.Replace(_("@WXV@"), wxVERSION_STRING, true); - - m_html->SetPage(text); - - // set color of HTML window to bg window - m_html->SetBackgroundColour(GetBackgroundColour()); -} - -/*! - * Get bitmap resources - */ - -wxBitmap CMAboutDlg::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin CMAboutDlg bitmap retrieval - return wxNullBitmap; -////@end CMAboutDlg bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon CMAboutDlg::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin CMAboutDlg icon retrieval - return wxNullIcon; -////@end CMAboutDlg icon retrieval -} -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ABOUT_DLG_OK - */ - -void CMAboutDlg::OnAboutDlgClick( wxCommandEvent& event ) -{ - Close(); -} - - diff --git a/Source/WXDialog/aboutdlg.h b/Source/WXDialog/aboutdlg.h deleted file mode 100644 index 712f986da..000000000 --- a/Source/WXDialog/aboutdlg.h +++ /dev/null @@ -1,117 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 _ABOUTDLG_H_ -#define _ABOUTDLG_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "aboutdlg.cpp" -#endif - -/*! - * Includes - */ - -////@begin includes -#include "wx/html/htmlwin.h" -////@end includes - -/*! - * Forward declarations - */ - -////@begin forward declarations -class wxHtmlWindow; -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_SOME_ABOUTDLG 10003 -#define SYMBOL_CMABOUTDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX -#define SYMBOL_CMABOUTDLG_TITLE _("About ...") -#define SYMBOL_CMABOUTDLG_IDNAME ID_SOME_ABOUTDLG -#define SYMBOL_CMABOUTDLG_SIZE wxSize(400, 300) -#define SYMBOL_CMABOUTDLG_POSITION wxDefaultPosition -#define ID_HTMLWINDOW 10000 -#define ID_ABOUT_DLG_OK 10005 -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif -#ifndef wxFIXED_MINSIZE -#define wxFIXED_MINSIZE 0 -#endif - -/*! - * CMAboutDlg class declaration - */ - -class CMAboutDlg: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( CMAboutDlg ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - CMAboutDlg( ); - CMAboutDlg( wxWindow* parent, wxWindowID id = SYMBOL_CMABOUTDLG_IDNAME, const wxString& caption = SYMBOL_CMABOUTDLG_TITLE, const wxPoint& pos = SYMBOL_CMABOUTDLG_POSITION, const wxSize& size = SYMBOL_CMABOUTDLG_SIZE, long style = SYMBOL_CMABOUTDLG_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMABOUTDLG_IDNAME, const wxString& caption = SYMBOL_CMABOUTDLG_TITLE, const wxPoint& pos = SYMBOL_CMABOUTDLG_POSITION, const wxSize& size = SYMBOL_CMABOUTDLG_SIZE, long style = SYMBOL_CMABOUTDLG_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - - void SetAboutText(const wxString &cmversion, const wxString &cmsversion, const wxArrayString &generators); - -////@begin CMAboutDlg event handler declarations - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ABOUT_DLG_OK - void OnAboutDlgClick( wxCommandEvent& event ); - -////@end CMAboutDlg event handler declarations - -////@begin CMAboutDlg member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end CMAboutDlg member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - -////@begin CMAboutDlg member variables - wxStaticBitmap* m_cmIcon; - wxHtmlWindow* m_html; -////@end CMAboutDlg member variables -}; - -#endif - // _ABOUTDLG_H_ diff --git a/Source/WXDialog/app_resources.cpp b/Source/WXDialog/app_resources.cpp deleted file mode 100644 index 430e56877..000000000 --- a/Source/WXDialog/app_resources.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "app_resources.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes - -#include "app_resources.h" - -////@begin XPM images -////@end XPM images - -/*! - * Resource functions - */ - -////@begin AppResources resource functions -/*! - * Menu creation function for ID_MENU - */ - -wxMenu* AppResources::CreatePopupMenu() -{ - wxMenu* itemMenu1 = new wxMenu; - itemMenu1->Append(ID_CACHE_IGNORE, _("&Ignore cache entry"), _("Ignores the value of the current cache entry"), wxITEM_NORMAL); - itemMenu1->Append(ID_CACHE_DELETE, _("&Delete cache entry"), _("Deletes the current cache entry (reverts on next configure)"), wxITEM_NORMAL); - itemMenu1->AppendSeparator(); - itemMenu1->Append(ID_CACHE_BROWSE, _("&Browse ..."), _T(""), wxITEM_NORMAL); - return itemMenu1; -} - -////@end AppResources resource functions - -/*! - * Get bitmap resources - */ - -wxBitmap AppResources::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin AppResources bitmap retrieval - return wxNullBitmap; -////@end AppResources bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon AppResources::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin AppResources icon retrieval - return wxNullIcon; -////@end AppResources icon retrieval -} diff --git a/Source/WXDialog/app_resources.h b/Source/WXDialog/app_resources.h deleted file mode 100644 index 75175b202..000000000 --- a/Source/WXDialog/app_resources.h +++ /dev/null @@ -1,60 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 _APP_RESOURCES_H_ -#define _APP_RESOURCES_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "app_resources.cpp" -#endif - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_CACHE_IGNORE 10051 -#define ID_CACHE_DELETE 10052 -#define ID_CACHE_BROWSE 10053 -////@end control identifiers - -class AppResources -{ -public: - AppResources() {} - -/*! - * Resource functions - */ - -////@begin AppResources resource functions - /// Menu creation function for ID_MENU - static wxMenu* CreatePopupMenu(); - - /// Retrieves bitmap resources - static wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - static wxIcon GetIconResource( const wxString& name ); -////@end AppResources resource functions - -}; - -#endif - // _APP_RESOURCES_H_ diff --git a/Source/WXDialog/bin/FindUPX.cmake b/Source/WXDialog/bin/FindUPX.cmake deleted file mode 100644 index fc9113dc5..000000000 --- a/Source/WXDialog/bin/FindUPX.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# -# Find the UPX packer program -# -# UPX_PROGRAM_PATH The full path to the UPX command (or UPX_PROGRAM_PATH-NOTFOUND when not found) -# UPX_FOUND Is set to 1 when upx is found - -FIND_PATH(UPX_PROGRAM_PATH upx.exe - ${UPX_DIR} - $ENV{UPX_DIR} - "$ENV{ProgramFiles}/upx" - ) - -# when found, note this as target -IF(UPX_PROGRAM_PATH) - SET(UPX_FOUND 1) -ELSE(UPX_PROGRAM_PATH) - SET(UPX_FOUND 0) -ENDIF(UPX_PROGRAM_PATH) diff --git a/Source/WXDialog/bin/FindwxW.cmake b/Source/WXDialog/bin/FindwxW.cmake deleted file mode 100644 index f88eb0e3f..000000000 --- a/Source/WXDialog/bin/FindwxW.cmake +++ /dev/null @@ -1,438 +0,0 @@ - -MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.") - -# -# FindwxW.cmake -# v1.01 2005-05-27 -# Jerry Fath 2005 -# Based on work by Jorgen Bodde -# -# This module finds if wxWindows is installed and determines where the -# include files and libraries are. It also determines what the name of -# the library is. This code sets the following variables: -# -# WXWIDGETS_LINK_DIRECTORIES = link directories, useful for rpath on Unix -# WXWIDGETS_LIBRARIES = all the wxWindows libraries ( and linker flags on unix ) -# WXWIDGETS_CXX_FLAGS = compiler flags for building wxWindows -# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows -# WXWIDGETS_DEFINITIONS = all flags of wxWindows - - -# NOTE: This module REQUIRES that an environment variable named WXWIN -# be set to the base wxWidgets installation directory. -# Under Unix, you must also set and environment variable named WXWINCFG -# to the name of the active build subdirectory (eg buildgtk). -# - -# These variable should be set before including this module -# -# WXWIDGETS_FILE_VERSION (26) -# WXWIDGETS_VERSION (2.6) -# - -# -# Set WX_USE vars in CMakeLists if you don't want to default to all off -# -SET(WXWIDGETS_USE_DEBUG ${WXW_USE_DEBUG} CACHE BOOL "Use Debug versions of wxWindows libraries") -SET(WXWIDGETS_USE_UNICODE ${WXW_USE_UNICODE} CACHE BOOL "Use Unicode versions of wxWindows libraries") -SET(WXWIDGETS_USE_SHARED ${WXW_USE_SHARED} CACHE BOOL "Use shared versions of wxWindows libraries") -SET(WXWIDGETS_USE_UNIV ${WXW_USE_UNIV} CACHE BOOL "Use Universal versions of wxWindows libraries") -SET(WXWIDGETS_USE_MONO ${WXW_USE_MONO} CACHE BOOL "Use monolithic versions of wxWindows libraries") - -# -# Style can be non-Win32 even under Windows when using MinGW -# -IF(WIN32) - SET(WIN32_STYLE_FIND 1) -ENDIF(WIN32) -IF(MINGW) - SET(WIN32_STYLE_FIND 0) - SET(UNIX_STYLE_FIND 1) -ENDIF(MINGW) -IF(UNIX) - SET(UNIX_STYLE_FIND 1) -ENDIF(UNIX) - -# -# Versions should be set before this file is included. If not, -# default to 2.6 -# -IF(WXW_FILE_VERSION) - SET( WXVERSIONSUFFIX ${WXW_FILE_VERSION}) -ELSE(WXW_FILE_VERSION) - SET( WXVERSIONSUFFIX "26") -ENDIF(WXW_FILE_VERSION) - -IF(WXW_VERSION) - SET( WXVERSION ${WXW_VERSION}) -ELSE(WXW_VERSION) - SET( WXVERSION "2.6") -ENDIF(WXW_VERSION) - -# -# Find the base wxWidgets install path -# NOTE: WXWIN must be set -# -FIND_PATH( WXWIDGETS_INSTALL_PATH - wx-config.in - $ENV{WXWIN} -) -IF(WXWIDGETS_INSTALL_PATH STREQUAL "WXWIDGETS_INSTALL_PATH-NOTFOUND") - MESSAGE( FATAL_ERROR "FATAL_ERROR: wx-config.in NOT found. Set WXWIN") -ENDIF(WXWIDGETS_INSTALL_PATH STREQUAL "WXWIDGETS_INSTALL_PATH-NOTFOUND") -SET(WXWIDGETS_CONFIG_PATH ${WXWIDGETS_INSTALL_PATH}) - -# -# Find library path (platform specific) -# -IF( WIN32_STYLE_FIND ) - - IF( WXWIDGETS_USE_SHARED ) - SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_INSTALL_PATH}/lib/vc_dll" ) - ELSE( WXWIDGETS_USE_SHARED ) - SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_INSTALL_PATH}/lib/vc_lib" ) - ENDIF( WXWIDGETS_USE_SHARED ) - SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} ) - -ELSE( WIN32_STYLE_FIND ) - IF (UNIX_STYLE_FIND) - - # - # Unix uses a config specific directory under the install path - # specified in the WXWINCFG environment variable. - # - SET(WXWIDGETS_CONFIG_PATH "${WXWIDGETS_INSTALL_PATH}/$ENV{WXWINCFG}") - - # - # Check wether wx-config can be found - # - SET(WX_WXCONFIG_EXECUTABLE "${WXWIDGETS_CONFIG_PATH}/wx-config" ) - IF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE}) - # we really need wx-config... - MESSAGE(FATAL_ERROR "FATAL_ERROR: Cannot find wx-config. Set WXWIN and WXWINCFG environment variables.") - ENDIF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE}) - - SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_CONFIG_PATH}/lib" ) - SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} ) - - ELSE(UNIX_STYLE_FIND) - MESSAGE(FATAL_ERROR "FATAL_ERROR: FindwxWindows.cmake: Platform unsupported by FindwxW.cmake. It's neither WIN32 nor UNIX") - ENDIF(UNIX_STYLE_FIND) -ENDIF( WIN32_STYLE_FIND ) - -# -# Check options against installed libraries -# -SET(WX_CONFIG_ARGS "") -SET( LIBRARYWANT "${WXWIDGETS_LIB_PATH}/msw" ) - -IF( WXWIDGETS_USE_UNIV ) - SET( LIBRARYWANT "${LIBRARYWANT}univ") - SET( PFUNIV "univ" ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=yes") -ELSE( WXWIDGETS_USE_UNIV ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=no") -ENDIF( WXWIDGETS_USE_UNIV ) - -IF( WXWIDGETS_USE_UNICODE ) - SET( LIBRARYWANT "${LIBRARYWANT}u" ) - SET( PFUNICODE "u" ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=yes") -ELSE( WXWIDGETS_USE_UNICODE ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=no") -ENDIF( WXWIDGETS_USE_UNICODE ) - -IF( WXWIDGETS_USE_DEBUG ) - SET( LIBRARYWANT "${LIBRARYWANT}d" ) - SET( PFDEBUG "d" ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=yes") -ELSE( WXWIDGETS_USE_DEBUG ) - SET( PFDEBUG "" ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=no") -ENDIF( WXWIDGETS_USE_DEBUG ) - -IF( WXWIDGETS_USE_SHARED ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=no") -ELSE( WXWIDGETS_USE_SHARED ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=yes") -ENDIF( WXWIDGETS_USE_SHARED ) - -# Not sure how to check this yet!!!!! -IF( WXWIDGETS_USE_MONO ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}") -ELSE( WXWIDGETS_USE_MONO ) - SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}") -ENDIF( WXWIDGETS_USE_MONO ) - -SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS} --libs") - -# -# Platform specific method for testing installed wx Builds -# -IF( WIN32_STYLE_FIND ) - - IF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" ) - MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}") - ENDIF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" ) - -ELSE( WIN32_STYLE_FIND ) - - EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} - ARGS ${WX_CONFIG_ARGS_LIBS} - OUTPUT_VARIABLE WXWIDGETS_LIBRARIES - RETURN_VALUE BAD_WXCONFIG ) - IF(BAD_WXCONFIG) - MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}") - ENDIF(BAD_WXCONFIG) - -ENDIF( WIN32_STYLE_FIND ) - -# -# Get compiler flags -# -IF( WIN32_STYLE_FIND ) - # Not used for Windows - SET( WXWIDGETS_CXX_FLAGS "" ) -ELSE( WIN32_STYLE_FIND ) - # - # Get CXXFLAGS from wx-config - # - EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} - ARGS "--cxxflags" - OUTPUT_VARIABLE WXWIDGETS_CXX_FLAGS - RETURN_VALUE BAD_WXCONFIG ) - IF (BAD_WXCONFIG) - MESSAGE( SEND_ERROR "ERROR: wx-config --cxxflags returned an error") - ENDIF (BAD_WXCONFIG) -ENDIF( WIN32_STYLE_FIND ) - -# -# Find include directories (platform specific) -# -IF( WIN32_STYLE_FIND ) - # - # Set non-build specific include directories - # - SET ( WX_INCLUDE_PATH ${WXWIDGETS_INSTALL_PATH}/include ) - SET ( WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_PATH} ) - SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${WXWIDGETS_INCLUDE_DIR}/../contrib/include ) - # - # Append the build specific include dir for wx/setup.h: - # - IF ( EXISTS ${LIBRARYWANT}/wx/setup.h ) - SET( WX_INCLUDE_LIB_PATH ${LIBRARYWANT}) - SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${LIBRARYWANT} ) - ELSE ( EXISTS ${LIBRARYWANT}/wx/setup.h ) - SET( WX_INCLUDE_LIB_PATH, "") - MESSAGE(SEND_ERROR "ERROR: Can't find ${LIBRARYWANT}/wx/setup.h") - ENDIF ( EXISTS ${LIBRARYWANT}/wx/setup.h ) -ELSE( WIN32_STYLE_FIND ) - - # Pull out -I options - # evaluate wx-config output to separate include dirs - SET(WX_INCLUDE_DIR ${WXWIDGETS_CXX_FLAGS}) - # extract include dirs (-I) - # use regular expression to match wildcard equivalent "-I*" - # with is a space or a semicolon - STRING(REGEX MATCHALL "[-][I]([^ ;])+" WX_INCLUDE_DIRS_WITH_PREFIX "${WX_INCLUDE_DIR}" ) - # remove prefix -I because we need the pure directory - IF(WX_INCLUDE_DIRS_WITH_PREFIX) - STRING(REGEX REPLACE "[-][I]" ";" WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_DIRS_WITH_PREFIX} ) - ENDIF(WX_INCLUDE_DIRS_WITH_PREFIX) - # replace space separated string by semicolon separated vector - SEPARATE_ARGUMENTS(WXWIDGETS_INCLUDE_DIR) - # Remove the -I options from the CXX_FLAGS no need to duplicate - STRING(REGEX REPLACE "[-][I]([^ ;])+" "" WXWIDGETS_CXX_FLAGS ${WXWIDGETS_CXX_FLAGS} ) - - # - # Find XWindows - # - IF( NOT CYGWIN OR MINGW ) - INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake ) - SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${X11_INCLUDE_DIR} ) - ENDIF( NOT CYGWIN OR MINGW ) -ENDIF( WIN32_STYLE_FIND ) - -# -# Find library list (platform specific) -# -IF( WIN32_STYLE_FIND ) - # - #Misc vars used to build lib names - # - SET( PFLIBEXT ${CMAKE_STATIC_LIBRARY_SUFFIX} ) - SET( WXPF "${WXPF}${WXVERSIONSUFFIX}" ) - SET( PFVERSION ${WXVERSIONSUFFIX} ) - SET( PFCOMPILER "" ) - - # - # Build the libraries list - # - SET( WXWIDGETS_LIBRARIES "" ) - SET( WXWIDGETS_MULTI_LIBRARIES "" ) - SET( WXWIDGETS_MONO_LIBRARIES "" ) - - SET(WX_LIBRARIES ${WX_LIBRARIES} comctl32${PFLIBEXT} wsock32${PFLIBEXT} rpcrt4${PFLIBEXT}) - #MESSAGE( "WX_LIBRARIES: ${WX_LIBRARIES}") - - #start filling library string with needed libraries for the choosen configuration. - SET( WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ${WX_LIBRARIES} ) - - SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) - SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} - wxbase${WXPF}${PFCOMPILER}${PFLIBEXT} - wxbase${WXPF}_net${PFCOMPILER}${PFLIBEXT} wxbase${WXPF}_xml${PFCOMPILER}${PFLIBEXT} - ) - - SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) - SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} - wxmsw${WXPF}_adv${PFCOMPILER}${PFLIBEXT} - wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT} - wxmsw${WXPF}_html${PFCOMPILER}${PFLIBEXT} - wxmsw${WXPF}_xrc${PFCOMPILER}${PFLIBEXT} -# wxmsw${WXPF}_media${PFCOMPILER}${PFLIBEXT} - ) - - IF( NOT WXWIDGETS_USE_SHARED ) - SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) - # ODBC is not needed - #SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} wxbase${WXPF}_odbc${PFCOMPILER}${PFLIBEXT} ) - - SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) - #SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} - # wxmsw${WXPF}_dbgrid${PFLIBEXT} - # wxmsw${WXPF}_gl${PFCOMPILER}${PFLIBEXT} - #) - ENDIF( NOT WXWIDGETS_USE_SHARED ) - - IF ( WXWIDGETS_USE_UNIV ) - SET( WXPF "${PFUNIV}${PFVERSION}${PFUNICODE}${PFDEBUG}" ) - SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} - wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT} - ) - ENDIF ( WXWIDGETS_USE_UNIV ) - - SET(WXWIDGETS_MONO_LIBRARIES ${WXWIDGETS_MONO_LIBRARIES} - wxmsw${WXPF}${PFCOMPILER}${PFLIBEXT} - ) - - IF ( WXWIDGETS_USE_MONO ) - SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ${WXWIDGETS_MONO_LIBRARIES}) - ELSE ( WXWIDGETS_USE_MONO ) - SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ${WXWIDGETS_MULTI_LIBRARIES}) - ENDIF ( WXWIDGETS_USE_MONO ) - - SET( WXPF "${PFUNICODE}${PFDEBUG}" ) - SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} - wxregex${WXPF}.lib - ) - - SET( WXPF "${PFDEBUG}" ) - SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} - wxexpat${WXPF}.lib - wxpng${WXPF}.lib - wxtiff${WXPF}.lib - wxjpeg${WXPF}.lib - wxzlib${WXPF}.lib - ) - -ELSE( WIN32_STYLE_FIND ) - # - # Get Library list from wx-config - # - # do we need additionial wx GL stuff like GLCanvas ? - IF(WXWIDGETS_USE_GL) - SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" ) - ENDIF(WXWIDGETS_USE_GL) - - EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} - ARGS ${WX_CONFIG_ARGS_LIBS} - OUTPUT_VARIABLE WXWIDGETS_LIBRARIES - RETURN_VALUE BAD_WXCONFIG ) - IF (BAD_WXCONFIG) - MESSAGE( SEND_ERROR "ERROR: Specified WXWidgets config NOT found") - ENDIF (BAD_WXCONFIG) - - # Pull out the -L options - # evaluate wx-config output to separate linker flags and linkdirs for - # rpath: - SET(WX_CONFIG_LIBS ${WXWIDGETS_LIBRARIES}) - # extract linkdirs (-L) for rpath - # use regular expression to match wildcard equivalent "-L*" - # with is a space or a semicolon - STRING(REGEX MATCHALL "[-][L]([^ ;])+" WX_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" ) - #MESSAGE("DBG WX_LINK_DIRECTORIES_WITH_PREFIX=${WX_LINK_DIRECTORIES_WITH_PREFIX}") - # remove prefix -L because we need the pure directory for LINK_DIRECTORIES - # replace -L by ; because the separator seems to be lost otherwise (bug or - # feature?) - IF(WX_LINK_DIRECTORIES_WITH_PREFIX) - STRING(REGEX REPLACE "[-][L]" ";" WXWIDGETS_LINK_DIRECTORIES ${WX_LINK_DIRECTORIES_WITH_PREFIX} ) - #MESSAGE("DBG WXWIDGETS_LINK_DIRECTORIES=${WXWIDGETS_LINK_DIRECTORIES}") - ENDIF(WX_LINK_DIRECTORIES_WITH_PREFIX) - # replace space separated string by semicolon separated vector to make it - # work with LINK_DIRECTORIES - SEPARATE_ARGUMENTS(WXWIDGETS_LINK_DIRECTORIES) - # Remove -L options from lib list, no need to duplicate - STRING(REGEX REPLACE "[-][L]([^ ;])+" "" WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ) - - -ENDIF( WIN32_STYLE_FIND ) - - -# -# Find wx.rc -# -SET( WXWIDGETS_RC ${WXWIDGETS_INSTALL_PATH}/include/wx/msw/wx.rc ) -IF( NOT WIN32_STYLE_FIND ) - IF( NOT CYGWIN OR MINGW ) - SET( WXWIDGETS_RC "" ) - ENDIF( NOT CYGWIN OR MINGW ) -ENDIF( NOT WIN32_STYLE_FIND ) - -# -# Set preprocessor defs -# -STRING(TOUPPER ${CMAKE_SYSTEM_NAME} WX_SYSNAME) -SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} "-D${WX_SYSNAME}" ) - -IF(WIN32_STYLE_FIND) - SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWIN32 -D__WXMSW__ ) -ELSE(WIN32_STYLE_FIND) - IF( CYGWIN ) - SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D__GNUWIN32__ -O2 -D_WIN32_IE=0x400 -MMD -Wall ) - ENDIF( CYGWIN ) -ENDIF(WIN32_STYLE_FIND) - -IF( WXWIDGETS_USE_SHARED ) - SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWXUSINGDLL ) -ENDIF( WXWIDGETS_USE_SHARED ) - -IF( WXWIDGETS_USE_DEBUG ) - SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D_DEBUG_ -D__WXDEBUG__ -DWXDEBUG=1 ) -ENDIF( WXWIDGETS_USE_DEBUG ) - -IF ( WXWIDGETS_USE_UNICODE ) - SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DwxUSE_UNICODE ) -ENDIF ( WXWIDGETS_USE_UNICODE ) - -# -# Set the WXWIDGETS_FOUND var -# -IF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR) - SET(WXWIDGETS_FOUND 1) -ENDIF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR) - -# -# Mark advanced vars -# -MARK_AS_ADVANCED(WXWIDGETS_INSTALL_PATH) - -# -# Log results -# -FILE( WRITE "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_FOUND: ${WXWIDGETS_FOUND}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LINK_DIRECTORIES: ${WXWIDGETS_LINK_DIRECTORIES}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LIBRARIES: ${WXWIDGETS_LIBRARIES}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_CXX_FLAGS: ${WXWIDGETS_CXX_FLAGS}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_INCLUDE_DIR: ${WXWIDGETS_INCLUDE_DIR}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_DEFINITIONS: ${WXWIDGETS_DEFINITIONS}\n" ) diff --git a/Source/WXDialog/bin/FindwxWin.cmake b/Source/WXDialog/bin/FindwxWin.cmake deleted file mode 100644 index 7278dca11..000000000 --- a/Source/WXDialog/bin/FindwxWin.cmake +++ /dev/null @@ -1,469 +0,0 @@ - - -MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.") - - -##--------------------------------------------------------------------------- -## $RCSfile$ -## $Source$ -## $Revision$ -## $Date$ -##--------------------------------------------------------------------------- -## Author: Jorgen Bodde -## Copyright: (c) Jorgen Bodde -## License: wxWidgets License -##--------------------------------------------------------------------------- -## -## This module finds if wxWindows 2.5.x / 2.6.x is installed and determines -## where the include files and seperate libraries are. It also determines what -## the name of the library is. -## -## WARNING: Monolithic build support is not present here (it is not desired -## by wxWidgets anyway). Also the shared DLL option is not yet present. -## -## Current working combinations are; -## - Static debug and release libs -## - Static unicode debug and release libs -## - Static universal unicode debug and release libs -## - Static unicode universal unicode debug and release libs -## -## -## The linux part of this CMake file is unaltered and will always use because of -## 'wx-config'. The linux part will not use the WX_LIB_IGNORE vars because of -## the way wxWidgets is built and configured. -## -## This code sets the following variables: -## -## ------------------------------------------------------------------ -## -## WXWINDOWS_FOUND = system has WxWindows (in desired config. build) -## -## WXWINDOWS_LIBRARIES = full path to the wxWindows libraries -## on Unix/Linux with additional linker flags from -## "wx-config --libs" -## -## CMAKE_WXWINDOWS_CXX_FLAGS = Unix compiler flags for wxWindows, essentially -## "`wx-config --cxxflags`" -## -## WXWINDOWS_INCLUDE_DIR = where to find headers "wx/wx.h" "wx/setup.h" -## -## WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on Unix -## -## WXWINDOWS_DEFINITIONS = extra defines -## - -IF( WIN32 ) - - ## - ## Find root path of wxWidgets, either in the registry or as environment var - ## - - SET (WXWINDOWS_POSSIBLE_ROOT_PATHS - $ENV{WXWIN} - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]" ) - - FIND_PATH(WXWIDGETS_PATH_ROOT include/wx/wx.h - ${WXWINDOWS_POSSIBLE_ROOT_PATHS} ) - - SET(WXWINDOWS_FOUND 0) - IF(NOT WXWIDGETS_PATH_ROOT) - MESSAGE(SEND_ERROR "wxWidgets root is not found. Please point out the wxWidgets root using the WXWIN environment var") - ENDIF(NOT WXWIDGETS_PATH_ROOT) - - OPTION(WX_USE_DEBUG_ONLY "Only attempt to setup the debug libraries, ignore the release libraries." ON) - - ## Find a multi library path, this is the path where the seperate libs are located - SET(WXMSW_SETUPH "wx/setup.h") - - SET(WXDEBUG_POSTFIX "") - IF(WX_USE_DEBUG_ONLY) - SET(WXDEBUG_POSTFIX "d") - ENDIF(WX_USE_DEBUG_ONLY) - - ## Try the VS compilation path - SET(WXWINDOWS_POSSIBLE_SETUPH - "${WXWIDGETS_PATH_ROOT}/lib/vc_lib/msw${WXDEBUG_POSTFIX}/${WXMSW_SETUPH}") - - ## Try borland and VS7 path - IF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) - SET(WXWINDOWS_POSSIBLE_MULTILIB_PATHS - "${WXWIDGETS_PATH_ROOT}/lib/vc_lib") - ELSE(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) - ## Try the borland path - SET(WXWINDOWS_POSSIBLE_SETUPH - "${WXWIDGETS_PATH_ROOT}/lib/bcc_lib/msw${WXDEBUG_POSTFIX}/${WXMSW_SETUPH}") - IF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) - SET(WXWINDOWS_POSSIBLE_MULTILIB_PATHS - "${WXWIDGETS_PATH_ROOT}/lib/bcc_lib") - ELSE(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) - MESSAGE(SEND_ERROR "wxWidgets libraries are not found.") - ENDIF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) - ENDIF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) - - ## Ask user what config should be used, after asking, verify if it will work - OPTION(WX_LINK_AGAINST_UNIVERSAL "Use wxWidgets universal builds" OFF) - OPTION(WX_LINK_AGAINST_UNICODE "Use wxWidgets unicode builds" OFF) - - SET(WXMSW_SETUPH "wx/setup.h") - - SET(WX_RELEASE 0) - SET(WX_DEBUG 0) - - SET(WX_RELEASE_UNI 0) - SET(WX_DEBUG_UNI 0) - - SET(WX_RELEASE_UNIV 0) - SET(WX_DEBUG_UNIV 0) - - SET(WX_RELEASE_UNIV_UNI 0) - SET(WX_DEBUG_UNIV_UNI 0) - - SET(WX_FOUND_VALID_CONF 0) - - ## Scan for wxWidgets static multilib release - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/msw/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_RELEASE 1) - SET(WX_RELEASE_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/msw/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/msw/${WXMSW_SETUPH}") - - ## Scan for wxWidgets static multilib debug - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswd/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_DEBUG 1) - SET(WX_DEBUG_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswd/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswd/${WXMSW_SETUPH}") - - ## Scan for wxWidgets multilib unicode - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_RELEASE_UNI 1) - SET(WX_RELEASE_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH}") - - ## Scan for wxWidgets multilib unicode debug - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswud/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_DEBUG_UNI 1) - SET(WX_DEBUG_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswud/${WXMSW_SETUPH}") - - ## Scan for wxWidgets multilib universal - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswuniv/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_RELEASE_UNIV 1) - SET(WX_RELEASE_UNIV_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswuniv/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswuniv/${WXMSW_SETUPH}") - - ## Scan for wxWidgets multilib universal debug - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivd/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_DEBUG_UNIV 1) - SET(WX_DEBUG_UNIV_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivd/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivd/${WXMSW_SETUPH}") - - ## Scan for wxWidgets multilib universal unicode - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivu/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_RELEASE_UNIV_UNI 1) - SET(WX_RELEASE_UNIV_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivu/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivu/${WXMSW_SETUPH}") - - ## Scan for wxWidgets multilib universal unicode debug - IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivud/${WXMSW_SETUPH}") - SET(WX_FOUND_VALID_CONF 1) - SET(WX_DEBUG_UNIV_UNI 1) - SET(WX_DEBUG_UNIV_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivud/${WXMSW_SETUPH} ) - ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivud/${WXMSW_SETUPH}") - - ## If no valid config is found, mention this - IF(NOT WX_FOUND_VALID_CONF) - MESSAGE(SEND_ERROR "Did not found a valid setup.h for any library. Please compile your wxWidgets libraries first") - ENDIF(NOT WX_FOUND_VALID_CONF) - - ## Search for wx version automatically - SET (WXVERSION "") - - SET(WXLIBS - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25d.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25u.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25ud.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25_core.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25d_core.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25u_core.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25ud_core.lib" ) - - FOREACH(WXLIB ${WXLIBS}) - IF(EXISTS "${WXLIB}") - SET(WXVERSION "25") - ENDIF(EXISTS "${WXLIB}") - ENDFOREACH(WXLIB ${WXLIBS}) - - IF(NOT WXLIB) - SET(WXLIBS - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26d.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26u.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26ud.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26_core.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26d_core.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26u_core.lib" - "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26ud_core.lib") - - FOREACH(WXLIB ${WXLIBS}) - IF(EXISTS "${WXLIB}") - SET(WXVERSION "26") - ENDIF(EXISTS "${WXLIB}") - ENDFOREACH(WXLIB ${WXLIBS}) - ENDIF(NOT WXLIB) - - IF(NOT WXVERSION) - MESSAGE(SEND_ERROR "There are no suitable wxWidgets libraries found (monolithic builds are no longer supported") - ENDIF(NOT WXVERSION) - - ## - ## Verify unicode universal builds - ## - IF(WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) - IF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV AND NOT WX_RELEASE_UNIV_UNI AND NOT WX_DEBUG_UNIV_UNI) - MESSAGE(SEND_ERROR "Not all wx${WXVERSION} universal unicode libraries are found (check debug and release builds)") - ENDIF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV AND NOT WX_RELEASE_UNIV_UNI AND NOT WX_DEBUG_UNIV_UNI) - ELSE(WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) - ## - ## Verify unicode builds - ## - IF(NOT WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) - IF(NOT WX_RELEASE_UNI AND NOT WX_DEBUG_UNI) - MESSAGE(SEND_ERROR "Not all wx${WXVERSION} unicode libraries are found (check debug and release builds)") - ENDIF(NOT WX_RELEASE_UNI AND NOT WX_DEBUG_UNI) - ELSE(NOT WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) - ## - ## Verify universal builds - ## - IF(WX_LINK_AGAINST_UNIVERSAL AND NOT WX_LINK_AGAINST_UNICODE) - IF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV) - MESSAGE(SEND_ERROR "Not all wx${WXVERSION} universal libraries are found (check debug and release builds)") - ENDIF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV) - ELSE(WX_LINK_AGAINST_UNIVERSAL AND NOT WX_LINK_AGAINST_UNICODE) - ## - ## Must be normal build now - ## - IF(NOT WX_RELEASE AND NOT WX_DEBUG) - MESSAGE(SEND_ERROR "Not all wx${WXVERSION} libraries are found (check debug and release builds)") - ENDIF(NOT WX_RELEASE AND NOT WX_DEBUG) - ENDIF(WX_LINK_AGAINST_UNIVERSAL AND NOT WX_LINK_AGAINST_UNICODE) - ENDIF(NOT WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) - ENDIF(WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) - - ## Prepare the representation for the library - IF(WX_LINK_AGAINST_UNICODE) - SET(WXLIB_POST "u") - ELSE(WX_LINK_AGAINST_UNICODE) - SET(WXLIB_POST "") - ENDIF(WX_LINK_AGAINST_UNICODE) - - ## Prepare for universal presentation - IF(WX_LINK_AGAINST_UNIVERSAL) - SET(WXLIB_UNIV "univ") - ELSE(WX_LINK_AGAINST_UNIVERSAL) - SET(WXLIB_UNIV "") - ENDIF(WX_LINK_AGAINST_UNIVERSAL) - - FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h - ${WXWIDGETS_PATH_ROOT}/lib/vc_lib/msw${WXLIB_UNIV}${WXLIB_POST} - ${WXWIDGETS_PATH_ROOT}/lib/vc_lib/msw${WXLIB_UNIV}${WXLIB_POST}d ) - - ## Find setup.h belonging to multi libs - SET(WXWINDOWS_LINK_DIRECTORIES - ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS} ) - - ## Append all multi libs - SET (WXWINDOWS_STATIC_RELEASE_LIBS - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_gl.lib - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_xrc.lib - optimized wxbase${WXVERSION}${WXLIB_POST}_xml.lib - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_qa.lib - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_html.lib - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_dbgrid.lib - optimized wxbase${WXVERSION}${WXLIB_POST}_odbc.lib - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_media.lib - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_adv.lib - optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_core.lib - optimized wxbase${WXVERSION}${WXLIB_POST}_net.lib - optimized wxbase${WXVERSION}${WXLIB_POST}.lib - optimized wxexpat.lib - optimized wxtiff.lib - optimized wxjpeg.lib - optimized wxpng.lib - optimized wxzlib.lib - optimized wxregex${WXLIB_POST}.lib ) - - SET (WXWINDOWS_STATIC_DEBUG_LIBS - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_gl.lib - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_xrc.lib - debug wxbase${WXVERSION}${WXLIB_POST}d_xml.lib - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_qa.lib - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_html.lib - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_dbgrid.lib - debug wxbase${WXVERSION}${WXLIB_POST}d_odbc.lib - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_media.lib - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_adv.lib - debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_core.lib - debug wxbase${WXVERSION}${WXLIB_POST}d_net.lib - debug wxbase${WXVERSION}${WXLIB_POST}d.lib - debug wxexpatd.lib - debug wxtiffd.lib - debug wxjpegd.lib - debug wxpngd.lib - debug wxzlibd.lib - debug wxregex${WXLIB_POST}d.lib ) - - ## Add the common libraries to the big list - SET(CMAKE_WXWINDOWS_COMMON_LIBRARIES - winmm - comctl32 - rpcrt4 - wsock32 ) - - ## Set wxWidgets library in WXWINDOWS_LIBRARIES - SET(WXWINDOWS_LIBRARIES - ${CMAKE_WXWINDOWS_COMMON_LIBRARIES} - ${WXWINDOWS_STATIC_DEBUG_LIBS} - ${WXWINDOWS_STATIC_RELEASE_LIBS} ) - - ## Find include directory - SET (WXWINDOWS_POSSIBLE_INCLUDE_PATHS - "${WXWIDGETS_PATH_ROOT}/include" ) - - FIND_PATH(WXWIDGETS_INCLUDE_DIR wx/wx.h - ${WXWINDOWS_POSSIBLE_INCLUDE_PATHS} ) - - ## Blank the setup.h dir when this is not found - IF (NOT WXWINDOWS_INCLUDE_DIR_SETUPH) - SET(WXWINDOWS_INCLUDE_DIR_SETUPH "") - ENDIF (NOT WXWINDOWS_INCLUDE_DIR_SETUPH) - - ## Set include paths - SET(WXWINDOWS_INCLUDE_DIR - ${WXWIDGETS_INCLUDE_DIR} - ${WXWINDOWS_INCLUDE_DIR_SETUPH} ) - - IF(WX_LINK_AGAINST_UNICODE) - SET(WX_UNICODE_FLAGS " -DUNICODE=1" ) - ELSE(WX_LINK_AGAINST_UNICODE) - SET(WX_UNICODE_FLAGS "" ) - ENDIF(WX_LINK_AGAINST_UNICODE) - - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${WX_UNICODE_FLAGS} -D__WXDEBUG__ -D__WXMSW__ -DWINVER=0x0400 -DwxUSE_BASE=1") - - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${WX_UNICODE_FLAGS} -D__WXMSW__ -DWINVER=0x0400 -DwxUSE_BASE=1" ) - - ## TODO: Once these tags work, this is more efficient - ##ADD_DEFINITIONS(debug ) - ##ADD_DEFINITIONS(-D__WXMSW__ -DWINVER=0x0400 -DwxUSE_BASE=1 ) - - MARK_AS_ADVANCED( - WXWIDGETS_INCLUDE_DIR - WXWIDGETS_PATH_MONOLIB_DEBUG - WXWIDGETS_PATH_MONOLIB_RELEASE - WXWIDGETS_PATH_ROOT - WXWINDOWS_INCLUDE_DIR_SETUPH ) - - IF(WXWINDOWS_LINK_DIRECTORIES AND WXWINDOWS_LIBRARIES AND WXWINDOWS_INCLUDE_DIR) - SET(WXWINDOWS_FOUND 1) - ENDIF(WXWINDOWS_LINK_DIRECTORIES AND WXWINDOWS_LIBRARIES AND WXWINDOWS_INCLUDE_DIR) - -ELSE( WIN32 ) - - FIND_PROGRAM( CMAKE_WX_CONFIG wx-config ../wx/bin ../../wx/bin ) - IF(CMAKE_WX_CONFIG) - SET(WXWINDOWS_FOUND 1) - # run the config program to get cxxflags - EXEC_PROGRAM(${CMAKE_WX_CONFIG} ARGS --cxxflags OUTPUT_VARIABLE - CMAKE_WX_CXX_FLAGS RETURN_VALUE RET1) - # run the config program to get the libs - EXEC_PROGRAM(${CMAKE_WX_CONFIG} ARGS --libs OUTPUT_VARIABLE - WXWINDOWS_LIBRARIES_TMP RETURN_VALUE RET2) - # for libraries break things up into a ; separated variable - SEPARATE_ARGUMENTS(WXWINDOWS_LIBRARIES_TMP) - SET(LAST_FRAME 0) - # now put the stuff back into WXWINDOWS_LIBRARIES - # but combine all the -framework foo arguments back together - FOREACH(arg ${WXWINDOWS_LIBRARIES_TMP}) - IF(${arg} MATCHES "-framework") - SET(LAST_FRAME 1) - ELSE(${arg} MATCHES "-framework") - # not a -framework argument - IF(LAST_FRAME) - SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} "-framework ${arg}") - SET(LAST_FRAME 0) - ELSE(LAST_FRAME) - SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} ${arg}) - ENDIF(LAST_FRAME) - ENDIF(${arg} MATCHES "-framework") - ENDFOREACH(arg) - ENDIF(CMAKE_WX_CONFIG) - - - ## extract linkdirs (-L) for rpath - ## use regular expression to match wildcard equivalent "-L*" - ## with is a space or a semicolon - STRING(REGEX MATCHALL "[-][L]([^ ;])+" WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" ) - #MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX=${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX}") - - ## remove prefix -L because we need the pure directory for LINK_DIRECTORIES - ## replace -L by ; because the separator seems to be lost otherwise (bug or - ## feature?) - IF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX) - STRING(REGEX REPLACE "[-][L]" ";" WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX} ) - #MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES}") - ENDIF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX) - - ## replace space separated string by semicolon separated vector to make it - ## work with LINK_DIRECTORIES - SEPARATE_ARGUMENTS(WXWINDOWS_LINK_DIRECTORIES) - - IF( CYGWIN OR MINGW ) - GET_FILENAME_COMPONENT(WXWINDOWS_INSTALL_PATH ${CMAKE_WX_CONFIG} PATH) - SET( WXWINDOWS_INSTALL_PATH ${WXWINDOWS_INSTALL_PATH}/.. ) - SET( WXWINDOWS_RC ${WXWINDOWS_INSTALL_PATH}/include/wx/msw/wx.rc ) - ELSE( CYGWIN OR MINGW ) - SET( WXWINDOWS_RC "" ) - ENDIF( CYGWIN OR MINGW ) - SET( WIN32GUI "" ) - - #keep debug settings as indicated by wx-config - #SET( WXWINDOWS_DEFINITIONS ${WXWINDOWS_DEFINITIONS} "${CMAKE_WX_CXX_FLAGS}" ) - #IF( WXWINDOWS_USE_DEBUG ) - # SET( WXWINDOWS_DEFINITIONS ${WXWINDOWS_DEFINITIONS} -ggdb ) - #ENDIF( WXWINDOWS_USE_DEBUG ) - - IF( CYGWIN OR MINGW ) - IF( CYGWIN ) - SET( WXWINDOWS_DEFINITIONS ${WXWINDOWS_DEFINITIONS} -D__GNUWIN32__ -O2 -D_WIN32_IE=0x400 -MMD -Wall ) - ENDIF( CYGWIN ) - ELSE( CYGWIN OR MINGW ) - # just in case `gtk-config --cflags`does not work - # SET( WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} /usr/include/gtk-2.0 /usr/include/gtk-2.0/include /usr/lib/gtk-2.0/include /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/include/pango-1.0 /usr/include/atk-1.0 ) - # What about FindGTK.cmake? and what if somebody uses wxMotif? - IF(NOT APPLE) - SET( CMAKE_WX_CXX_FLAGS "${CMAKE_WX_CXX_FLAGS} `gtk-config --cflags`" ) - #find Xwindows - INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake ) - SET( WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} ${X11_INCLUDE_DIR} ) - ENDIF(NOT APPLE) - ENDIF( CYGWIN OR MINGW ) - -ENDIF( WIN32 ) - -MARK_AS_ADVANCED( - CMAKE_WX_CXX_FLAGS -) - -#MESSAGE( "${WXWINDOWS_LINK_DIRECTORIES}" ) -#MESSAGE( "${WXWINDOWS_LIBRARIES}" ) -#MESSAGE( "CMAKE_WX_CXX_FLAGS}" ) -#MESSAGE( "WXWINDOWS_INCLUDE_PATH}" ) -#MESSAGE( "WXWINDOWS_INCLUDE_DIR}" ) -#MESSAGE( "WXWINDOWS_DEFINITIONS}" ) diff --git a/Source/WXDialog/bin/UsewxW.cmake b/Source/WXDialog/bin/UsewxW.cmake deleted file mode 100644 index 702ab9d99..000000000 --- a/Source/WXDialog/bin/UsewxW.cmake +++ /dev/null @@ -1,80 +0,0 @@ - -MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.") - - -# -# UsewxW.cmake -# v1.0 2005-05-27 -# Jerry Fath 2005 -# Based on work by Jorgen Bodde -# - -# -# wxWidgets CMake helper -# - -# These project specific variables should be set before including this file -#PROJECT_NAME -#PROJECT_SOURCE_FILES -#PROJECT_SOURCE_DIR -#PROJECT_BINARY_DIR -# These variables can be set to add addition directories, libraries, and definitions -#PROJECT_DEFINITIONS -#PROJECT_INCLUDE_PATH -#PROJECT_LINK_DIRECTORIES -#PROJECT_LIBRARIES - -#These WX specific variable should be set by FindwxW.cmake before including this file -# WXWIDGETS_LINK_DIRECTORIES = link directories, useful for rpath on Unix -# WXWIDGETS_LIBRARIES = all the wxWindows libraries ( and linker flags on unix ) -# WXWIDGETS_CXX_FLAGS = compiler flags for building wxWindows -# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows -# WXWIDGETS_DEFINITIONS = all flags of wxWindows - - -# -# The flags for the compiler are stored in WXWIDGETS_CXX_FLAGS, we will set those so that -# we know we will always compile wxWidgets programs properly. In case of debugging, we -# will add the __WXDEBUG__ and WXDEBUG flags as well. For linux, you might want LINUX -# to be defined. -# -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}") - -ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} ${PROJECT_DEFINITIONS} ) - -# -# The include dirs -# -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR} - ${PROJECT_INCLUDE_PATH} - ${WXWIDGETS_INCLUDE_DIR}) - -# -# This is needed to tell CMake what directories contain the libraries we need. This will -# allow us to just specify the lib files without prepending them with a full path to that -# library -# -LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} ${PROJECT_LINK_DIRECTORIES}) - -# -# This is our target. As you can see, we specify WIN32 for windows makefiles. In Linux and -# other OS'es this flag is ignored. Under windows it will make sure we generate a Win32 file with GUI. -# -ADD_EXECUTABLE(${PROJECT_NAME} WIN32 ${PROJECT_SOURCE_FILES} ${PROJECT_RC_FILE}) - -# -# Here we specify what libraries are linked to our project -# -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${WXWIDGETS_LIBRARIES} ${PROJECT_LIBRARIES}) - -# -# Log results -# -FILE( WRITE "${PROJECT_BINARY_DIR}/usewxw.log" "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "Definitions: ${WXWIDGETS_DEFINITIONS} ${PROJECT_DEFINITIONS}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "INCLUDE_DIRECTORIES: ${PROJECT_SOURCE_DIR} ${PROJECT_INCLUDE_PATH} ${WXWIDGETS_INCLUDE_DIR}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "LINK_DIRECTORIES: ${WXWIDGETS_LINK_DIRECTORIES} ${PROJECT_LINK_DIRECTORIES}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "TARGET_LINK_LIBRARIES: ${PROJECT_NAME} ${WXWIDGETS_LIBRARIES} ${PROJECT_LIBRARIES}\n" ) -FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "Sources: ${PROJECT_SOURCE_FILES}\n" ) - - diff --git a/Source/WXDialog/changelog.txt b/Source/WXDialog/changelog.txt deleted file mode 100644 index 3f94d0e17..000000000 --- a/Source/WXDialog/changelog.txt +++ /dev/null @@ -1,22 +0,0 @@ -Changes for new CMakeSetup dialog (v0.9) -- Cancel button on progress dialog now cancels the process -- Generator cannot be chosen anymore after there are cache items (this is pointless anyway) -- Drop target on grid (a folder) will load this in the build path and load up the cache -- Deletion of cache before something is generated, will ask the user if this is what he/she wants -- Reloading of cache added, after deleting cache items (and it was a mistake, a reload can bring it back to previous state) -- Added a search query. Typing a substring will narrow the search. When ENTER is pressed the substring is stored in the search query history for easy lookup -- Added a message display window, that will show all messages for easy copy-pasting and reference. This also obsoleted the "stop reporting errors" option -- A status percentage is shown in the task bar (when configuring, next to the configure window) -- Added menu bar with most common options (reload cache, delete cache, options, about etc) -- Added browse option in context menu on grid. Blue and green items are browsable (paths and files) -- Added about dialog -- Added options dialog (for future options) -- OPTION cache items are now implemented as checkboxes instead of comboboxes. Easier to double click instead of figuring out if you want to go up or down for YES or NO -- Added XP look to window (XP manifest) -- Added progress dialog that shows configuration progress -- Closing of dialog can be postponed by SHIFT (when option "close after generation is done" is selected) -- Window position X, Y and size is remembered between sessions -- Added most recent used list, with 5 last used build directories for easy lookup -- Cache options for paths are colored blue, cache options for files are green, and the rest is black -- NOTFOUND entries are made bold for easy recognition -- The selected item is described in a seperate text box for easy reading instead of in the statusbar diff --git a/Source/WXDialog/cmake_icon.gif b/Source/WXDialog/cmake_icon.gif deleted file mode 100644 index ccf1f992e..000000000 Binary files a/Source/WXDialog/cmake_icon.gif and /dev/null differ diff --git a/Source/WXDialog/cmake_icon.xpm b/Source/WXDialog/cmake_icon.xpm deleted file mode 100644 index e26354c75..000000000 --- a/Source/WXDialog/cmake_icon.xpm +++ /dev/null @@ -1,276 +0,0 @@ -/* XPM */ -static char *Pixmap[] = { -"16 16 256 3", -"000 c black", -"001 c #003F00", -"002 c #003F3F", -"003 c #3F0000", -"004 c #3F003F", -"005 c #3F3F00", -"006 c gray19", -"007 c #00007F", -"008 c #007F00", -"009 c #306F30", -"010 c #7F0000", -"011 c #606060", -"012 c #0000BF", -"013 c blue", -"014 c #00BF00", -"015 c green", -"016 c #BF0000", -"017 c red", -"018 c #909090", -"019 c #C0C0C0", -"020 c none", -"021 c black", -"022 c black", -"023 c black", -"024 c black", -"025 c black", -"026 c black", -"027 c black", -"028 c black", -"029 c black", -"030 c black", -"031 c black", -"032 c black", -"033 c black", -"034 c black", -"035 c black", -"036 c black", -"037 c black", -"038 c black", -"039 c black", -"040 c black", -"041 c black", -"042 c black", -"043 c black", -"044 c black", -"045 c black", -"046 c black", -"047 c black", -"048 c black", -"049 c black", -"050 c black", -"051 c black", -"052 c black", -"053 c black", -"054 c black", -"055 c black", -"056 c black", -"057 c black", -"058 c black", -"059 c black", -"060 c black", -"061 c black", -"062 c black", -"063 c black", -"064 c black", -"065 c black", -"066 c black", -"067 c black", -"068 c black", -"069 c black", -"070 c black", -"071 c black", -"072 c black", -"073 c black", -"074 c black", -"075 c black", -"076 c black", -"077 c black", -"078 c black", -"079 c black", -"080 c black", -"081 c black", -"082 c black", -"083 c black", -"084 c black", -"085 c black", -"086 c black", -"087 c black", -"088 c black", -"089 c black", -"090 c black", -"091 c black", -"092 c black", -"093 c black", -"094 c black", -"095 c black", -"096 c black", -"097 c black", -"098 c black", -"099 c black", -"100 c black", -"101 c black", -"102 c black", -"103 c black", -"104 c black", -"105 c black", -"106 c black", -"107 c black", -"108 c black", -"109 c black", -"110 c black", -"111 c black", -"112 c black", -"113 c black", -"114 c black", -"115 c black", -"116 c black", -"117 c black", -"118 c black", -"119 c black", -"120 c black", -"121 c black", -"122 c black", -"123 c black", -"124 c black", -"125 c black", -"126 c black", -"127 c black", -"128 c black", -"129 c black", -"130 c black", -"131 c black", -"132 c black", -"133 c black", -"134 c black", -"135 c black", -"136 c black", -"137 c black", -"138 c black", -"139 c black", -"140 c black", -"141 c black", -"142 c black", -"143 c black", -"144 c black", -"145 c black", -"146 c black", -"147 c black", -"148 c black", -"149 c black", -"150 c black", -"151 c black", -"152 c black", -"153 c black", -"154 c black", -"155 c black", -"156 c black", -"157 c black", -"158 c black", -"159 c black", -"160 c black", -"161 c black", -"162 c black", -"163 c black", -"164 c black", -"165 c black", -"166 c black", -"167 c black", -"168 c black", -"169 c black", -"170 c black", -"171 c black", -"172 c black", -"173 c black", -"174 c black", -"175 c black", -"176 c black", -"177 c black", -"178 c black", -"179 c black", -"180 c black", -"181 c black", -"182 c black", -"183 c black", -"184 c black", -"185 c black", -"186 c black", -"187 c black", -"188 c black", -"189 c black", -"190 c black", -"191 c black", -"192 c black", -"193 c black", -"194 c black", -"195 c black", -"196 c black", -"197 c black", -"198 c black", -"199 c black", -"200 c black", -"201 c black", -"202 c black", -"203 c black", -"204 c black", -"205 c black", -"206 c black", -"207 c black", -"208 c black", -"209 c black", -"210 c black", -"211 c black", -"212 c black", -"213 c black", -"214 c black", -"215 c black", -"216 c black", -"217 c black", -"218 c black", -"219 c black", -"220 c black", -"221 c black", -"222 c black", -"223 c black", -"224 c black", -"225 c black", -"226 c black", -"227 c black", -"228 c black", -"229 c black", -"230 c black", -"231 c black", -"232 c black", -"233 c black", -"234 c black", -"235 c black", -"236 c black", -"237 c black", -"238 c black", -"239 c black", -"240 c black", -"241 c black", -"242 c black", -"243 c black", -"244 c black", -"245 c black", -"246 c black", -"247 c black", -"248 c black", -"249 c black", -"250 c black", -"251 c black", -"252 c black", -"253 c black", -"254 c black", -"255 c black", -"020020020020020020020020020020020020020020020020", -"020020020020020020020000000020020020020020020020", -"020020020020020020020000003020020020020020020020", -"020020020020020020000012010000020020020020020020", -"020020020020020020007013010003020020020020020020", -"020020020020020000013013010016000020020020020020", -"020020020020020007013013004017003020020020020020", -"020020020020000013013013007017016000020020020020", -"020020020020007013013012006017017003020020020020", -"020020020000012013012018011017017016000020020020", -"020020020007013012009018019010017017003020020020", -"020020000013012014015014009010017017016000020020", -"020020007007014015015015015008005016017003020020", -"020000002015015015015015015015015014005010000020", -"020000008008008008008008008008008008008001000020", -"020020020020020020020020020020020020020020020020" -}; diff --git a/Source/WXDialog/cmake_logo.xpm b/Source/WXDialog/cmake_logo.xpm deleted file mode 100644 index 91841250c..000000000 --- a/Source/WXDialog/cmake_logo.xpm +++ /dev/null @@ -1,50 +0,0 @@ -/* XPM */ -static char *cmake_logo[] = { -"32 30 16 2", -"00 c #00CC00", -"01 c #3333CC", -"02 c gray60", -"03 c #99CC99", -"04 c gray80", -"05 c red", -"06 c none", -"07 c black", -"08 c black", -"09 c black", -"10 c black", -"11 c black", -"12 c black", -"13 c black", -"14 c black", -"15 c black", -"0606060606060606060606060606060601060606060606060606060606060606", -"0606060606060606060606060606060601060606060606060606060606060606", -"0606060606060606060606060606060101050606060606060606060606060606", -"0606060606060606060606060606060101050606060606060606060606060606", -"0606060606060606060606060606010101050506060606060606060606060606", -"0606060606060606060606060606010101050506060606060606060606060606", -"0606060606060606060606060601010101050505060606060606060606060606", -"0606060606060606060606060601010101050505060606060606060606060606", -"0606060606060606060606060101010101050505050606060606060606060606", -"0606060606060606060606060101010101050505050606060606060606060606", -"0606060606060606060606010101010101050505050506060606060606060606", -"0606060606060606060606010101010101010505050506060606060606060606", -"0606060606060606060601010101010101010505050505060606060606060606", -"0606060606060606060601010101010101010505050505060606060606060606", -"0606060606060606060101010101010101010505050505050606060606060606", -"0606060606060606060101010101010101010505050505050606060606060606", -"0606060606060606010101010101010101040505050505050506060606060606", -"0606060606060606010101010101010104040505050505050506060606060606", -"0606060606060601010101010101010404040505050505050505060606060606", -"0606060606060601010101010101040404040505050505050505060606060606", -"0606060606060101010101010404040404040505050505050505050606060606", -"0606060606060101010101010404040404040505050505050505050606060606", -"0606060606010101010100000003040404040405050505050505050506060606", -"0606060606010101010000000000000004040405050505050505050506060606", -"0606060601010101000000000000000000000305050505050505050505060606", -"0606060601010100000000000000000000000000000505050505050505060606", -"0606060101000000000000000000000000000000000000050505050505050606", -"0606060100000000000000000000000000000000000000000000050505050606", -"0606010000000000000000000000000000000000000000000000000005050506", -"0606000000000000000000000000000000000000000000000000000000000006" -}; diff --git a/Source/WXDialog/cmakesetup.done.xml b/Source/WXDialog/cmakesetup.done.xml deleted file mode 100644 index 40a317a2f..000000000 --- a/Source/WXDialog/cmakesetup.done.xml +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/Source/WXDialog/cmakesetup.xml b/Source/WXDialog/cmakesetup.xml deleted file mode 100644 index e2dddf21e..000000000 --- a/Source/WXDialog/cmakesetup.xml +++ /dev/null @@ -1,104 +0,0 @@ - - diff --git a/Source/WXDialog/config.h b/Source/WXDialog/config.h deleted file mode 100644 index 33b75c670..000000000 --- a/Source/WXDialog/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 __CMAKE_CONFIG_H__ -#define __CMAKE_CONFIG_H__ - -#define CM_LASTPROJECT_PATH "LastProjectPath" // last project path for CMakeLists.txt in edit box -#define CM_LASTBUILD_PATH "LastBuildPath" // last build path for cache in edit box -#define CM_MAX_RECENT_PATHS 5 // max amount most recent used paths in menu -#define CM_MAX_SEARCH_QUERIES 10 // max amount of entries in search query window -#define CM_RECENT_BUILD_PATH "LastRecentPath" // will be enumerated like LastRecentPath0 LastRecentPath1 etc -#define CM_SEARCH_QUERY "SearchQuery" // will be enumerated like SearchQuery0 SearchQuery1 etc -#define CM_XSIZE "CMakeXSize" // x size of window -#define CM_YSIZE "CMakeYSize" // y size of window -#define CM_XPOS "CMakeXPos" // x pos of window -#define CM_YPOS "CMakeYPos" // y pos of window -#define CM_SPLITTERPOS "CMakeSplitterPos" // position of splitter window - -#define CM_CLOSEAFTERGEN "CMakeCloseAfterGenerate" // close CMake after succesful generation (old behaviour) -#define CM_CLOSEAFTERGEN_DEF false // inherit default false when not present - -#define CM_RECENT_BUILD_ITEM 10000 // ID of menu item for recent builds -#define CMAKEGUI_MAJORVER 0 // major build -#define CMAKEGUI_MINORVER 9 // minor build -#define CMAKEGUI_ADDVER "b" // postfix (beta, alpha, none) - -#endif diff --git a/Source/WXDialog/optionsdlg.cpp b/Source/WXDialog/optionsdlg.cpp deleted file mode 100644 index 55c62d971..000000000 --- a/Source/WXDialog/optionsdlg.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "optionsdlg.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes - -#include "optionsdlg.h" - -////@begin XPM images -////@end XPM images - -/*! - * CMOptionsDlg type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( CMOptionsDlg, wxDialog ) - -/*! - * CMOptionsDlg event table definition - */ - -BEGIN_EVENT_TABLE( CMOptionsDlg, wxDialog ) - -////@begin CMOptionsDlg event table entries - EVT_CHECKBOX( ID_CHECKBOX_CLOSECMAKE, CMOptionsDlg::OnButtonOK ) - -////@end CMOptionsDlg event table entries - -END_EVENT_TABLE() - -/*! - * CMOptionsDlg constructors - */ - -CMOptionsDlg::CMOptionsDlg( ) -{ -} - -CMOptionsDlg::CMOptionsDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ - Create(parent, id, caption, pos, size, style); -} - -/*! - * CMOptionsDlg creator - */ - -bool CMOptionsDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ -////@begin CMOptionsDlg member initialisation - m_closeAfterGenerate = NULL; -////@end CMOptionsDlg member initialisation - -////@begin CMOptionsDlg creation - SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - Centre(); -////@end CMOptionsDlg creation - return TRUE; -} - -/*! - * Control creation for CMOptionsDlg - */ - -void CMOptionsDlg::CreateControls() -{ -////@begin CMOptionsDlg content construction - CMOptionsDlg* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); - itemDialog1->SetSizer(itemBoxSizer2); - - wxNotebook* itemNotebook3 = new wxNotebook( itemDialog1, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxNB_TOP ); - - wxPanel* itemPanel4 = new wxPanel( itemNotebook3, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); - itemPanel4->SetSizer(itemBoxSizer5); - - itemBoxSizer5->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - m_closeAfterGenerate = new wxCheckBox( itemPanel4, ID_CHECKBOX_CLOSECMAKE, _("Close down CMakeSetup after generation of project"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - m_closeAfterGenerate->SetValue(FALSE); - itemBoxSizer5->Add(m_closeAfterGenerate, 0, wxALIGN_LEFT|wxALL, 5); - - itemNotebook3->AddPage(itemPanel4, _("General")); - - itemBoxSizer2->Add(itemNotebook3, 1, wxGROW|wxALL|wxFIXED_MINSIZE, 5); - - wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer2->Add(itemBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5); - - wxButton* itemButton9 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer8->Add(itemButton9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxButton* itemButton10 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer8->Add(itemButton10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - -////@end CMOptionsDlg content construction -} - -/*! - * Should we show tooltips? - */ - -bool CMOptionsDlg::ShowToolTips() -{ - return TRUE; -} - -/*! - * Get bitmap resources - */ - -wxBitmap CMOptionsDlg::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin CMOptionsDlg bitmap retrieval - return wxNullBitmap; -////@end CMOptionsDlg bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon CMOptionsDlg::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin CMOptionsDlg icon retrieval - return wxNullIcon; -////@end CMOptionsDlg icon retrieval -} - -void CMOptionsDlg::SetConfig(wxConfig *cfg) -{ - bool boolval; - - // close after generation - cfg->Read(CM_CLOSEAFTERGEN, &boolval, CM_CLOSEAFTERGEN_DEF); - m_closeAfterGenerate->SetValue(boolval); -} - -void CMOptionsDlg::GetConfig(wxConfig *cfg) -{ - // close after generation - cfg->Write(CM_CLOSEAFTERGEN, m_closeAfterGenerate->GetValue()); -} - -/*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE - */ - -void CMOptionsDlg::OnButtonOK( wxCommandEvent& event ) -{ -////@begin wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE in CMOptionsDlg. - // Before editing this code, remove the block markers. - event.Skip(); -////@end wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE in CMOptionsDlg. -} - - - - - - diff --git a/Source/WXDialog/optionsdlg.h b/Source/WXDialog/optionsdlg.h deleted file mode 100644 index 3fe336cd1..000000000 --- a/Source/WXDialog/optionsdlg.h +++ /dev/null @@ -1,125 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 _OPTIONSDLG_H_ -#define _OPTIONSDLG_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "optionsdlg.cpp" -#endif - -/*! - * Includes - */ - -////@begin includes -#include "wx/notebook.h" -////@end includes - -#include -#include "config.h" - -/*! - * Forward declarations - */ - -////@begin forward declarations -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_DIALOG 10004 -#define SYMBOL_CMOPTIONSDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX -#define SYMBOL_CMOPTIONSDLG_TITLE _("CMakeSetup Options ...") -#define SYMBOL_CMOPTIONSDLG_IDNAME ID_DIALOG -#define SYMBOL_CMOPTIONSDLG_SIZE wxSize(400, 300) -#define SYMBOL_CMOPTIONSDLG_POSITION wxDefaultPosition -#define ID_NOTEBOOK 10006 -#define ID_PANEL 10007 -#define ID_CHECKBOX_CLOSECMAKE 10008 -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif -#ifndef wxFIXED_MINSIZE -#define wxFIXED_MINSIZE 0 -#endif - -/*! - * CMOptionsDlg class declaration - */ - -class CMOptionsDlg: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( CMOptionsDlg ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - CMOptionsDlg( ); - CMOptionsDlg( wxWindow* parent, wxWindowID id = SYMBOL_CMOPTIONSDLG_IDNAME, const wxString& caption = SYMBOL_CMOPTIONSDLG_TITLE, const wxPoint& pos = SYMBOL_CMOPTIONSDLG_POSITION, const wxSize& size = SYMBOL_CMOPTIONSDLG_SIZE, long style = SYMBOL_CMOPTIONSDLG_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMOPTIONSDLG_IDNAME, const wxString& caption = SYMBOL_CMOPTIONSDLG_TITLE, const wxPoint& pos = SYMBOL_CMOPTIONSDLG_POSITION, const wxSize& size = SYMBOL_CMOPTIONSDLG_SIZE, long style = SYMBOL_CMOPTIONSDLG_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - -////@begin CMOptionsDlg event handler declarations - - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE - void OnButtonOK( wxCommandEvent& event ); - -////@end CMOptionsDlg event handler declarations - -////@begin CMOptionsDlg member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end CMOptionsDlg member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - - // write values from config to GUI controls - void SetConfig(wxConfig *cfg); - - // write GUI controls back to config - void GetConfig(wxConfig *cfg); - -private: - -////@begin CMOptionsDlg member variables - wxCheckBox* m_closeAfterGenerate; -////@end CMOptionsDlg member variables -}; - -#endif - // _OPTIONSDLG_H_ diff --git a/Source/WXDialog/progressdlg.cpp b/Source/WXDialog/progressdlg.cpp deleted file mode 100644 index 263d3e959..000000000 --- a/Source/WXDialog/progressdlg.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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. - -=========================================================================*/ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "progressdlg.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes - -#include "progressdlg.h" - -////@begin XPM images -////@end XPM images - -/*! - * CMProgressDialog type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( CMProgressDialog, wxDialog ) - -/*! - * CMProgressDialog event table definition - */ - -BEGIN_EVENT_TABLE( CMProgressDialog, wxDialog ) - -////@begin CMProgressDialog event table entries - EVT_BUTTON( ID_CMAKE_BUTTON, CMProgressDialog::OnCmakeCancelClick ) - -////@end CMProgressDialog event table entries - -END_EVENT_TABLE() - -/*! - * CMProgressDialog constructors - */ - -CMProgressDialog::CMProgressDialog( ) -{ -} - -CMProgressDialog::CMProgressDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ - Create(parent, id, caption, pos, size, style); -} - -/*! - * CMProgressDialog creator - */ - -bool CMProgressDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ -////@begin CMProgressDialog member initialisation - m_textMessage = NULL; - m_progress = NULL; -////@end CMProgressDialog member initialisation - -////@begin CMProgressDialog creation - SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - GetSizer()->Fit(this); - GetSizer()->SetSizeHints(this); - Centre(); -////@end CMProgressDialog creation - - m_cancelPressed = false; - m_cancelling = false; - - return TRUE; -} - -/*! - * Control creation for CMProgressDialog - */ - -void CMProgressDialog::CreateControls() -{ -////@begin CMProgressDialog content construction - CMProgressDialog* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); - itemDialog1->SetSizer(itemBoxSizer2); - - itemBoxSizer2->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - m_textMessage = new wxStaticText( itemDialog1, wxID_STATIC, _("Please wait while CMake configures ..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer2->Add(m_textMessage, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5); - - wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer2->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - m_progress = new wxGauge( itemDialog1, ID_CMAKE_PROGRESS, 100, wxDefaultPosition, wxSize(250, 20), wxGA_HORIZONTAL ); - m_progress->SetValue(0); - itemBoxSizer5->Add(m_progress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxButton* itemButton7 = new wxButton( itemDialog1, ID_CMAKE_BUTTON, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer2->Add(itemButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - itemBoxSizer2->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP, 5); - -////@end CMProgressDialog content construction -} - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CMAKE_BUTTON - */ - -void CMProgressDialog::OnCmakeCancelClick( wxCommandEvent& event ) -{ - m_cancelPressed = true; -} - -/*! - * Should we show tooltips? - */ - -bool CMProgressDialog::ShowToolTips() -{ - return TRUE; -} - -/*! - * Get bitmap resources - */ - -wxBitmap CMProgressDialog::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin CMProgressDialog bitmap retrieval - return wxNullBitmap; -////@end CMProgressDialog bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon CMProgressDialog::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin CMProgressDialog icon retrieval - return wxNullIcon; -////@end CMProgressDialog icon retrieval -} - - - diff --git a/Source/WXDialog/progressdlg.h b/Source/WXDialog/progressdlg.h deleted file mode 100644 index 346522031..000000000 --- a/Source/WXDialog/progressdlg.h +++ /dev/null @@ -1,139 +0,0 @@ -/*========================================================================= - - Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Author: Jorgen Bodde - - 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 _PROGRESSDLG_H_ -#define _PROGRESSDLG_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "progressdlg.cpp" -#endif - -/*! - * Includes - */ - -////@begin includes -////@end includes - -/*! - * Forward declarations - */ - -////@begin forward declarations -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_PROGRESSDLG 10000 -#define SYMBOL_CMPROGRESSDIALOG_STYLE wxRAISED_BORDER -#define SYMBOL_CMPROGRESSDIALOG_TITLE _("Progress Dialog") -#define SYMBOL_CMPROGRESSDIALOG_IDNAME ID_PROGRESSDLG -#define SYMBOL_CMPROGRESSDIALOG_SIZE wxSize(400, 300) -#define SYMBOL_CMPROGRESSDIALOG_POSITION wxDefaultPosition -#define ID_CMAKE_PROGRESS 10001 -#define ID_CMAKE_BUTTON 10002 -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif -#ifndef wxFIXED_MINSIZE -#define wxFIXED_MINSIZE 0 -#endif - -/*! - * CMProgressDialog class declaration - */ - -class CMProgressDialog: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( CMProgressDialog ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - CMProgressDialog( ); - CMProgressDialog( wxWindow* parent, wxWindowID id = SYMBOL_CMPROGRESSDIALOG_IDNAME, const wxString& caption = SYMBOL_CMPROGRESSDIALOG_TITLE, const wxPoint& pos = SYMBOL_CMPROGRESSDIALOG_POSITION, const wxSize& size = SYMBOL_CMPROGRESSDIALOG_SIZE, long style = SYMBOL_CMPROGRESSDIALOG_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMPROGRESSDIALOG_IDNAME, const wxString& caption = SYMBOL_CMPROGRESSDIALOG_TITLE, const wxPoint& pos = SYMBOL_CMPROGRESSDIALOG_POSITION, const wxSize& size = SYMBOL_CMPROGRESSDIALOG_SIZE, long style = SYMBOL_CMPROGRESSDIALOG_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - - void SetProgress(float progress) { - m_progress->SetValue((int)(progress * 100)); - }; - -////@begin CMProgressDialog event handler declarations - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CMAKE_BUTTON - void OnCmakeCancelClick( wxCommandEvent& event ); - -////@end CMProgressDialog event handler declarations - -////@begin CMProgressDialog member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end CMProgressDialog member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - - bool CancelPressed() const { - return m_cancelPressed; - }; - - void CancelAcknowledged() { - m_cancelling = true; - }; - - bool IsCancelling() const { - return m_cancelling; - }; - - void ResetCancel() { - m_cancelling = false; - m_cancelPressed = false; - }; - -////@begin CMProgressDialog member variables - wxStaticText* m_textMessage; - wxGauge* m_progress; -////@end CMProgressDialog member variables - -private: - bool m_cancelPressed; - bool m_cancelling; - -}; - -#endif - // _PROGRESSDLG_H_ diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index a2cfa20f8..c7e671506 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1198,22 +1198,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel ENDIF(CMAKE_TEST_GENERATOR MATCHES "Makefiles" OR CMAKE_TEST_GENERATOR MATCHES "KDevelop") - IF(BUILD_WXDialog AND wxWidgets_CONFIG_EXECUTABLE) - # Will be set if the WX gui is on - ADD_TEST(UseWX ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/UseWX" - "${CMake_BINARY_DIR}/Tests/UseWX" - --build-generator ${CMAKE_TEST_GENERATOR} - --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} - --build-exe-dir ${CMake_BINARY_DIR}/Tests/UseWX - --build-project UsewxWidgets - --build-options -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets_CONFIG_EXECUTABLE} - --test-command UseWX - ) - LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/UseWX") - ENDIF(BUILD_WXDialog AND wxWidgets_CONFIG_EXECUTABLE) - IF(UNIX) STRING(COMPARE EQUAL "${CMAKE_INSTALL_PREFIX}" "${CMake_BINARY_DIR}/Tests/TestShellInstall/Prefix" PREFIX_IS_FOR_TEST) diff --git a/Tests/UseWX/CMakeLists.txt b/Tests/UseWX/CMakeLists.txt deleted file mode 100644 index 8638a081a..000000000 --- a/Tests/UseWX/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required (VERSION 2.6) -PROJECT (UsewxWidgets) - -FIND_PACKAGE(wxWidgets REQUIRED) -INCLUDE( ${wxWidgets_USE_FILE} ) - -ADD_EXECUTABLE (UseWX WIN32 WX.cxx) -TARGET_LINK_LIBRARIES(UseWX ${wxWidgets_LIBRARIES} ) diff --git a/Tests/UseWX/WX.cxx b/Tests/UseWX/WX.cxx deleted file mode 100644 index d4631274c..000000000 --- a/Tests/UseWX/WX.cxx +++ /dev/null @@ -1,82 +0,0 @@ -//For wx -#include -#include - -static void TestDirEnumHelper(wxDir& dir, - int flags = wxDIR_DEFAULT, - const wxString& filespec = wxEmptyString) -{ - wxString filename; - - if ( !dir.IsOpened() ) - return; - - bool cont = dir.GetFirst(&filename, filespec, flags); - while ( cont ) - { - wxPrintf(_T("\t%s\n"), filename.c_str()); - - cont = dir.GetNext(&filename); - } - - wxPuts(_T("")); -} - - -//---------------------------------------------------------------------------- -// MyApp -//---------------------------------------------------------------------------- - -class MyApp: public wxApp -{ -public: - MyApp(); - - bool OnInit(); - int MainLoop(); -}; - - -IMPLEMENT_APP(MyApp) - -MyApp::MyApp() -{ -} - -bool MyApp::OnInit() -{ - //test a directory that exist: - wxDir dir(wxT(".")); //wxDir dir("/tmp"); - TestDirEnumHelper(dir, wxDIR_DEFAULT | wxDIR_DOTDOT); - - //Testing if link to wx debug library -#ifdef __WXDEBUG__ - printf("If you read this you're in __WXDEBUG__ debug mode.\n"); -#endif //__WXDEBUG__ - -#ifdef _DEBUG - printf("If you read this then _DEBUG is defined.\n"); -#endif //_DEBUG - - wxChar ch = wxT('*'); - wxString s = wxT("Hello, world!"); - int len = s.Len(); - printf("Length of string is: %d\n", len); - - //Force testing of Unicode mode -#ifdef __UNICODE__ - wprintf(L"Unicode: %s \n", s.c_str()); - wprintf(:"Char: %c\n", ch); -#else - printf("ANSI: %s \n", s.c_str()); - printf("Char: %c\n", ch); -#endif //__UNICODE__ - - //return immediately - return TRUE; -} - -int MyApp::MainLoop() -{ - return 0; -} diff --git a/Utilities/Doxygen/doxyfile.in b/Utilities/Doxygen/doxyfile.in index 141aff44b..ad5e3775f 100644 --- a/Utilities/Doxygen/doxyfile.in +++ b/Utilities/Doxygen/doxyfile.in @@ -41,7 +41,6 @@ INPUT = \ "@CMAKE_SOURCE_DIR@/Source/CTest" \ "@CMAKE_SOURCE_DIR@/Source/CursesDialog" \ "@CMAKE_SOURCE_DIR@/Source/MFCDialog" \ - "@CMAKE_SOURCE_DIR@/Source/WXDialog" \ "@CMAKE_BINARY_DIR@/Source/kwsys" \ "@CMAKE_BINARY_DIR@/Source/cmsys" \ "@CMAKE_BINARY_DIR@/Utilities/Doxygen/dox/doc_CMake_contributors.dox" \