optionsdlg.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*=========================================================================
  2. Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Author: Jorgen Bodde
  8. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  9. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  10. This software is distributed WITHOUT ANY WARRANTY; without even
  11. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  12. PURPOSE. See the above copyright notices for more information.
  13. =========================================================================*/
  14. #ifndef _OPTIONSDLG_H_
  15. #define _OPTIONSDLG_H_
  16. #if defined(__GNUG__) && !defined(__APPLE__)
  17. #pragma interface "optionsdlg.cpp"
  18. #endif
  19. /*!
  20. * Includes
  21. */
  22. ////@begin includes
  23. #include "wx/notebook.h"
  24. ////@end includes
  25. #include <wx/config.h>
  26. #include "config.h"
  27. /*!
  28. * Forward declarations
  29. */
  30. ////@begin forward declarations
  31. ////@end forward declarations
  32. /*!
  33. * Control identifiers
  34. */
  35. ////@begin control identifiers
  36. #define ID_DIALOG 10004
  37. #define SYMBOL_CMOPTIONSDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
  38. #define SYMBOL_CMOPTIONSDLG_TITLE _("CMakeSetup Options ...")
  39. #define SYMBOL_CMOPTIONSDLG_IDNAME ID_DIALOG
  40. #define SYMBOL_CMOPTIONSDLG_SIZE wxSize(400, 300)
  41. #define SYMBOL_CMOPTIONSDLG_POSITION wxDefaultPosition
  42. #define ID_NOTEBOOK 10006
  43. #define ID_PANEL 10007
  44. #define ID_CHECKBOX_CLOSECMAKE 10008
  45. ////@end control identifiers
  46. /*!
  47. * Compatibility
  48. */
  49. #ifndef wxCLOSE_BOX
  50. #define wxCLOSE_BOX 0x1000
  51. #endif
  52. #ifndef wxFIXED_MINSIZE
  53. #define wxFIXED_MINSIZE 0
  54. #endif
  55. /*!
  56. * CMOptionsDlg class declaration
  57. */
  58. class CMOptionsDlg: public wxDialog
  59. {
  60. DECLARE_DYNAMIC_CLASS( CMOptionsDlg )
  61. DECLARE_EVENT_TABLE()
  62. public:
  63. /// Constructors
  64. CMOptionsDlg( );
  65. 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 );
  66. /// Creation
  67. 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 );
  68. /// Creates the controls and sizers
  69. void CreateControls();
  70. ////@begin CMOptionsDlg event handler declarations
  71. /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE
  72. void OnButtonOK( wxCommandEvent& event );
  73. ////@end CMOptionsDlg event handler declarations
  74. ////@begin CMOptionsDlg member function declarations
  75. /// Retrieves bitmap resources
  76. wxBitmap GetBitmapResource( const wxString& name );
  77. /// Retrieves icon resources
  78. wxIcon GetIconResource( const wxString& name );
  79. ////@end CMOptionsDlg member function declarations
  80. /// Should we show tooltips?
  81. static bool ShowToolTips();
  82. // write values from config to GUI controls
  83. void SetConfig(wxConfig *cfg);
  84. // write GUI controls back to config
  85. void GetConfig(wxConfig *cfg);
  86. private:
  87. ////@begin CMOptionsDlg member variables
  88. wxCheckBox* m_closeAfterGenerate;
  89. ////@end CMOptionsDlg member variables
  90. };
  91. #endif
  92. // _OPTIONSDLG_H_