Remove WXDialog source code

The QtDialog is our supported cross-platform GUI, so the WXDialog source
is no longer needed.
This commit is contained in:
Brad King 2009-08-05 10:15:30 -04:00
parent 32869ea381
commit 87442aefb0
39 changed files with 0 additions and 10464 deletions

View File

@ -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)

View File

@ -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"
};

View File

@ -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)

View File

@ -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 <wx/filename.h>
#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
}

View File

@ -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_

File diff suppressed because it is too large Load Diff

View File

@ -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"

File diff suppressed because it is too large Load Diff

View File

@ -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 <wx/config.h>
#include <wx/dataobj.h>
#include <wx/dnd.h>
#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_

View File

@ -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;
}

View File

@ -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)

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="x86"
version="5.1.0.0"
type="win32"
name="NGDialog.exe"/>
<description>CMake Next Generation Dialog</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="x86"/>
</dependentAssembly>
</dependency>
</assembly>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -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();
}

View File

@ -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 <wx/dynarray.h>
#include <wx/grid.h>
#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

View File

@ -1,21 +0,0 @@
<html>
<head>
<title>CMake - CMakeSetup GUI Build System</title>
</head>
<body>
<font color="#000080" size="+2"><em><strong>CMake - CMakeSetup GUI Build System</strong></em></font>
<p><font size="+1" face="Arial, Helvetica, sans-serif">Welcome to CMake! The cross-platform, open-source make system.
<b>CMake</b> is used to control the software compilation process using simple platform and compiler independent configuration files.
<b>CMake</b> generates native makefiles and workspaces that can be used in the compiler environment of your choice.
Please go to <i><b>http://www.cmake.org</b></i> to learn more about CMake.<br><br>
CMakeSetup.exe is enhanced and ported to wxWidgets 2.6.0 by Jorgen Bodde (jorgb@xs4all.nl).<br>
Current CMakeSetup version is: @V@<br>
Current CMake build system is: @B@<br><br>
Current generators are supported:<br>
@G@
</font>
</p>
</body>
</html>

View File

@ -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 = _("<html><head><title>CMakeSetup - GUI Build System for CMake</title></head>"
"<body><font color=\"#000080\" size=\"+1\"><em><strong>CMakeSetup - GUI Build System for CMake</strong></em></font>"
"<p><font face=\"Arial, Helvetica, sans-serif\">Welcome to <b>CMake</b>! The cross-platform, open-source make system."
"<b>CMake</b> is used to control the software compilation process using simple platform and compiler independent configuration files. "
"<b>CMake</b> generates native makefiles and workspaces that can be used in the compiler environment of your choice. "
"Please go to <i><b>http://www.cmake.org</b></i> to learn more about CMake.<br><br>"
"CMakeSetup.exe is enhanced and ported by Jorgen Bodde using <i>@WXV@</i>. The original CMakeSetup.exe is "
"written by Bill Hoffman, Ken Martin, Brad King and Andy Cedilnik.<br><br>"
"Current CMakeSetup version is: <b>@B@</b><br>"
"Current CMake build system is: <b>@V@</b><br><br>"
"Current generators are supported:<br>"
"@G@</font></p></body></html>");
// compile list of generators in a bulleted list
wxString gens = _("<ul>");
for(size_t i = 0; i < generators.Count(); i++)
gens << "<li><u>" << generators[i] << "</u></li>";
gens << _("</ul>");
// 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();
}

View File

@ -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_

View File

@ -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
}

View File

@ -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_

View File

@ -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)

View File

@ -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*<endchar>"
# with <endchar> 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*<endchar>"
# with <endchar> 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" )

View File

@ -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*<endchar>"
## with <endchar> 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}" )

View File

@ -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" )

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 892 B

View File

@ -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"
};

View File

@ -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"
};

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="windows-1252"?><TODOLIST FILEFORMAT="6" PROJECTNAME="CMakeSetup GUI project (archive)" NEXTUNIQUEID="103" FILEVERSION="4" ARCHIVE="1" LASTMODIFIED="2005-05-31"><TASK PRIORITYCOLOR="15732480" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38479.90427083" TEXTCOLOR="0" TITLE="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="1" HIGHESTPRIORITY="8" PERCENTDONE="0" POS="1"><TASK PRIORITYCOLOR="15732480" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38479.90503472" TEXTCOLOR="0" TITLE="Window position X, Y and size is remembered between sessions" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="4" PERCENTDONE="0" POS="16"/><TASK PRIORITYCOLOR="15388928" TEXTWEBCOLOR="#000000" PRIORITY="3" LASTMOD="38480.57586806" TEXTCOLOR="0" TITLE="Drop target on grid (a folder) will load this in the build path and load up the cache" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#00D1EA" ID="10" PERCENTDONE="0" POS="1"/><TASK PRIORITYCOLOR="13435129" TEXTWEBCOLOR="#000000" PRIORITY="8" LASTMOD="38480.57606481" TEXTCOLOR="0" TITLE="Added most recent used list, with 5 last used build directories for easy lookup" CATEGORY="v0.9b" COMMENTS="When typing or browsing, update cache" PRIORITYWEBCOLOR="#F900CD" ID="11" PERCENTDONE="0" POS="19"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/10/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38482.89157407" TEXTCOLOR="0" TITLE="Cancel button on progress dialog now cancels the process" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="35" PERCENTDONE="0" STARTDATE="38482.00000000" POS="2"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/12/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38484.89186343" TEXTCOLOR="0" TITLE="Closing of dialog can be postponed by SHIFT (when option &quot;close after generation is done&quot; is selected)" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="37" PERCENTDONE="0" STARTDATE="38484.00000000" POS="15"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/15/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38487.50008102" TEXTCOLOR="0" TITLE="Added progress dialog that shows configuration progress" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="42" PERCENTDONE="0" STARTDATE="38487.00000000" POS="14"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/16/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38488.55358796" TEXTCOLOR="0" TITLE="Added XP look to window (XP manifest)" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="47" PERCENTDONE="0" STARTDATE="38488.00000000" POS="13"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/22/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38494.84318287" TEXTCOLOR="0" TITLE="The selected item is described in a seperate text box for easy reading instead of in the statusbar" CATEGORY="v0.9b" COMMENTS="The queries should be shown in the dropdown when the user presses enter, and saved to disk (last 5 or so)" PRIORITYWEBCOLOR="#000FF0" ID="59" PERCENTDONE="0" STARTDATE="38494.00000000" POS="17"/><TASK PRIORITYCOLOR="13435129" STARTDATESTRING="5/23/2005" TEXTWEBCOLOR="#000000" PRIORITY="8" LASTMOD="38495.92488426" TEXTCOLOR="0" TITLE="NOTFOUND entries are made bold for easy recognition" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#F900CD" ID="61" PERCENTDONE="0" STARTDATE="38495.00000000" POS="20"/><TASK PRIORITYCOLOR="16122042" STARTDATESTRING="5/23/2005" TEXTWEBCOLOR="#000000" PRIORITY="7" LASTMOD="38495.93262731" TEXTCOLOR="0" TITLE="Cache options for paths are colored blue, cache options for files are green, and the rest is black" CATEGORY="v0.9b" COMMENTS="Make a path property text blue, and maybe a file property dark green or some other colour" PRIORITYWEBCOLOR="#BA00F6" ID="68" PERCENTDONE="0" STARTDATE="38495.00000000" POS="18"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/25/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38498.88041667" TEXTCOLOR="0" TITLE="Added menu bar with most common options (reload cache, delete cache, options, about etc)" CATEGORY="v0.9b" COMMENTS="User needs to confirm that dirty cache can be reloaded (items can get lost)
Cache is reloaded again (handy for mis-deleted items)" PRIORITYWEBCOLOR="#000FF0" ID="71" PERCENTDONE="0" STARTDATE="38497.00000000" POS="9"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/27/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38499.87121528" TEXTCOLOR="0" TITLE="Added browse option in context menu on grid. Blue and green items are browsable (paths and files)" CATEGORY="v0.9b" COMMENTS="When no cache, browse is clickable" PRIORITYWEBCOLOR="#000FF0" ID="73" PERCENTDONE="0" STARTDATE="38499.00000000" POS="10"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/27/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38499.96678241" TEXTCOLOR="0" TITLE="A status percentage is shown in the task bar (when configuring, next to the configure window)" CATEGORY="v0.9b" COMMENTS="In case the users want to get rid of the status dialog" PRIORITYWEBCOLOR="#000FF0" ID="76" PERCENTDONE="0" STARTDATE="38499.00000000" POS="8"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/27/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38499.98921296" TEXTCOLOR="0" TITLE="Added about dialog" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="78" PERCENTDONE="0" STARTDATE="38499.00000000" POS="11"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/28/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38500.39842593" TEXTCOLOR="0" TITLE="Added a message display window, that will show all messages for easy copy-pasting and reference. This also obsoleted the &quot;stop reporting errors&quot; option" CATEGORY="v0.9b" COMMENTS="Bold messages, red errors etc" PRIORITYWEBCOLOR="#000FF0" ID="88" PERCENTDONE="0" STARTDATE="38500.00000000" POS="7"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/28/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38500.51690972" TEXTCOLOR="0" TITLE="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" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="89" PERCENTDONE="0" STARTDATE="38500.00000000" POS="6"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/30/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38502.85292824" TEXTCOLOR="0" TITLE="Generator cannot be chosen anymore after there are cache items (this is pointless anyway)" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="96" PERCENTDONE="0" STARTDATE="38502.00000000" POS="3"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/30/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38502.85346065" TEXTCOLOR="0" TITLE="Deletion of cache before something is generated, will ask the user if this is what he/she wants" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="97" PERCENTDONE="0" STARTDATE="38502.00000000" POS="4"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/30/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38502.85377315" TEXTCOLOR="0" TITLE="Reloading of cache added, after deleting cache items (and it was a mistake, a reload can bring it back to previous state)" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="99" PERCENTDONE="0" STARTDATE="38502.00000000" POS="5"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/30/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38502.85420139" TEXTCOLOR="0" TITLE="Added options dialog (for future options)" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="100" PERCENTDONE="0" STARTDATE="38502.00000000" POS="12"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/30/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38503.53450231" TEXTCOLOR="0" TITLE="Added menu items and keyboard shortcuts to the GUI (Ctrl+N - configure and Ctrl+G is generate)" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="101" PERCENTDONE="0" STARTDATE="38502.00000000" POS="21"/><TASK PRIORITYCOLOR="15732480" STARTDATESTRING="5/30/2005" TEXTWEBCOLOR="#000000" PRIORITY="5" LASTMOD="38503.60827546" TEXTCOLOR="0" TITLE="Added toggle advanced menu item (Ctrl+A)" CATEGORY="v0.9b" PRIORITYWEBCOLOR="#000FF0" ID="102" PERCENTDONE="0" STARTDATE="38502.00000000" POS="22"/></TASK></TODOLIST>

File diff suppressed because one or more lines are too long

View File

@ -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

View File

@ -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.
}

View File

@ -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 <wx/config.h>
#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_

View File

@ -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
}

View File

@ -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_

View File

@ -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)

View File

@ -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} )

View File

@ -1,82 +0,0 @@
//For wx
#include <wx/app.h>
#include <wx/dir.h>
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;
}

View File

@ -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" \