1 /*=========================================================================
3 Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake
4 Module: $RCSfile: optionsdlg.h,v $
6 Date: $Date: 2005/06/30 19:54:14 $
7 Version: $Revision: 1.1 $
11 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
12 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
14 This software is distributed WITHOUT ANY WARRANTY; without even
15 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 PURPOSE. See the above copyright notices for more information.
18 =========================================================================*/
20 #ifndef _OPTIONSDLG_H_
21 #define _OPTIONSDLG_H_
23 #if defined(__GNUG__) && !defined(__APPLE__)
24 #pragma interface "optionsdlg.cpp"
32 #include "wx/notebook.h"
35 #include <wx/config.h>
39 * Forward declarations
42 ////@begin forward declarations
43 ////@end forward declarations
49 ////@begin control identifiers
50 #define ID_DIALOG 10004
51 #define SYMBOL_CMOPTIONSDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
52 #define SYMBOL_CMOPTIONSDLG_TITLE _("CMakeSetup Options ...")
53 #define SYMBOL_CMOPTIONSDLG_IDNAME ID_DIALOG
54 #define SYMBOL_CMOPTIONSDLG_SIZE wxSize(400, 300)
55 #define SYMBOL_CMOPTIONSDLG_POSITION wxDefaultPosition
56 #define ID_NOTEBOOK 10006
57 #define ID_PANEL 10007
58 #define ID_CHECKBOX_CLOSECMAKE 10008
59 ////@end control identifiers
66 #define wxCLOSE_BOX 0x1000
68 #ifndef wxFIXED_MINSIZE
69 #define wxFIXED_MINSIZE 0
73 * CMOptionsDlg class declaration
76 class CMOptionsDlg
: public wxDialog
78 DECLARE_DYNAMIC_CLASS( CMOptionsDlg
)
84 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
);
87 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
);
89 /// Creates the controls and sizers
90 void CreateControls();
92 ////@begin CMOptionsDlg event handler declarations
94 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE
95 void OnButtonOK( wxCommandEvent
& event
);
97 ////@end CMOptionsDlg event handler declarations
99 ////@begin CMOptionsDlg member function declarations
101 /// Retrieves bitmap resources
102 wxBitmap
GetBitmapResource( const wxString
& name
);
104 /// Retrieves icon resources
105 wxIcon
GetIconResource( const wxString
& name
);
106 ////@end CMOptionsDlg member function declarations
108 /// Should we show tooltips?
109 static bool ShowToolTips();
111 // write values from config to GUI controls
112 void SetConfig(wxConfig
*cfg
);
114 // write GUI controls back to config
115 void GetConfig(wxConfig
*cfg
);
119 ////@begin CMOptionsDlg member variables
120 wxCheckBox
* m_closeAfterGenerate
;
121 ////@end CMOptionsDlg member variables