presetspanel.h

00001 
00002 // Name:        presetspanel.h
00003 // Purpose:     wxPackagePresetsPanel definition
00004 // Author:      Francesco Montorsi
00005 // Modified by:
00006 // Created:     10/07/2006 19:02:39
00007 // RCS-ID:      $Id: presetspanel.h,v 1.2 2007/01/01 20:06:20 frm Exp $
00008 // Copyright:   (c) 2006 Francesco Montorsi
00009 // Licence:     wxWidgets license
00011 
00012 #ifndef _PMPRESETSPANEL_H_
00013 #define _PMPRESETSPANEL_H_
00014 
00015 
00020 #include "wxp/wxp.h"
00021 
00022 
00027 class wxOptionEditorCtrl;
00028 
00029 
00034 
00035 #define SYMBOL_WXPACKAGEPRESETSPANEL_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
00036 #define SYMBOL_WXPACKAGEPRESETSPANEL_TITLE _("Dialog")
00037 #define SYMBOL_WXPACKAGEPRESETSPANEL_IDNAME wxID_ANY
00038 #define SYMBOL_WXPACKAGEPRESETSPANEL_SIZE wxSize(400, 300)
00039 #define SYMBOL_WXPACKAGEPRESETSPANEL_POSITION wxDefaultPosition
00040 #define ID_PRESETS_PRESETCHOICE 10002
00041 #define ID_PRESETS_RESET 10003
00042 #define ID_PRESETS_OPTIONS 10004
00044 
00045 
00046 
00047 // ----------------------------------------------------------------------------
00048 // wxPackagePresetsPanel
00049 // ----------------------------------------------------------------------------
00050 
00051 class wxPackagePresetsPanel: public wxPanel
00052 {
00053     DECLARE_DYNAMIC_CLASS( wxPackagePresetsPanel )
00054     DECLARE_EVENT_TABLE()
00055 
00056 public:
00058     wxPackagePresetsPanel( );
00059     wxPackagePresetsPanel( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEPRESETSPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXPACKAGEPRESETSPANEL_POSITION, const wxSize& size = SYMBOL_WXPACKAGEPRESETSPANEL_SIZE, long style = SYMBOL_WXPACKAGEPRESETSPANEL_STYLE );
00060 
00062     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEPRESETSPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXPACKAGEPRESETSPANEL_POSITION, const wxSize& size = SYMBOL_WXPACKAGEPRESETSPANEL_SIZE, long style = SYMBOL_WXPACKAGEPRESETSPANEL_STYLE );
00063 
00065     void CreateControls();
00066 
00068     static bool ShowToolTips();
00069 
00070 public:         // event handlers
00071 
00072     void OnResetToDefaults(wxCommandEvent &);
00073     void OnPresetChanged(wxCommandEvent &);
00074     void OnOptionChanged(wxCommandEvent &);
00075 
00076 public:         // misc
00077 
00079     bool TransferDataFromWindow();
00080 
00082     wxString GetPresetName(unsigned int n) const;
00083 
00085     void UpdatePresetChoiceStrings();
00086 
00088     void ApplySettings();
00089 
00090 protected:
00091 
00092     wxOptionEditorCtrl *m_pOptionsList;
00093     wxChoice *m_pPresetChoice;
00094 
00096     wxString m_strCurPresetSelection;
00097 
00101     wxPackageCommandOptionArrayHashMap m_optHashmap;
00102 };
00103 
00104 #endif
00105     // _PMPRESETSPANEL_H_

Generated on Thu Feb 1 22:14:31 2007 for wxWidgets Package Manager by  doxygen 1.5.1-p1