include/commandeditor/commandeditordialog.h

Go to the documentation of this file.
00001 
00002 // Name:        commandeditordialog.h
00003 // Purpose:     
00004 // Author:      Julian Smart
00005 // Modified by: 
00006 // Created:     22/11/2008 13:43:50
00007 // RCS-ID:      
00008 // Copyright:   (c) Anthemion Software Limited
00009 // Licence:     New BSD License
00011 
00012 #ifndef _COMMANDEDITORDIALOG_H_
00013 #define _COMMANDEDITORDIALOG_H_
00014 
00015 
00020 
00021 
00022 
00023 #include "uiutils/scrollingdialog.h"
00024 #include "commandeditor/commandeditor.h"
00025 
00026 class wxUICustomization;
00027 
00032 
00033 
00034 
00039 
00040 #define ID_COMMANDEDITORDIALOG 21500
00041 #define ID_COMMANDEDITORDIALOG_COMMANDS 21501
00042 #define ID_COMMANDEDITORDIALOG_ADD 21502
00043 #define ID_COMMANDEDITORDIALOG_DELETE 21503
00044 #define ID_COMMANDEDITORDIALOG_RENAME 21504
00045 #define ID_COMMANDEDITORDIALOG_NAME 21505
00046 #define ID_COMMANDEDITORDIALOG_COMMAND 21506
00047 #define ID_COMMANDEDITORDIALOG_BROWSE 21507
00048 #define ID_COMMANDEDITORDIALOG_SHOWTHIS 21508
00049 #define SYMBOL_WXCOMMANDEDITORDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
00050 #define SYMBOL_WXCOMMANDEDITORDIALOG_TITLE _("Command Editor")
00051 #define SYMBOL_WXCOMMANDEDITORDIALOG_IDNAME ID_COMMANDEDITORDIALOG
00052 #define SYMBOL_WXCOMMANDEDITORDIALOG_SIZE wxSize(400, 300)
00053 #define SYMBOL_WXCOMMANDEDITORDIALOG_POSITION wxDefaultPosition
00055 
00056 
00061 class wxCommandEditorDialog: public wxScrollingDialog
00062 {    
00063     DECLARE_DYNAMIC_CLASS( wxCommandEditorDialog )
00064     DECLARE_EVENT_TABLE()
00065 
00066 public:
00068     wxCommandEditorDialog();
00069     wxCommandEditorDialog( const wxEditorCommandArray& cmds, const wxString& msg, wxWindow* parent, wxWindowID id = SYMBOL_WXCOMMANDEDITORDIALOG_IDNAME, const wxString& caption = SYMBOL_WXCOMMANDEDITORDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXCOMMANDEDITORDIALOG_POSITION, const wxSize& size = SYMBOL_WXCOMMANDEDITORDIALOG_SIZE, long style = SYMBOL_WXCOMMANDEDITORDIALOG_STYLE );
00070 
00072     bool Create( const wxEditorCommandArray& cmds, const wxString& msg, wxWindow* parent, wxWindowID id = SYMBOL_WXCOMMANDEDITORDIALOG_IDNAME, const wxString& caption = SYMBOL_WXCOMMANDEDITORDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXCOMMANDEDITORDIALOG_POSITION, const wxSize& size = SYMBOL_WXCOMMANDEDITORDIALOG_SIZE, long style = SYMBOL_WXCOMMANDEDITORDIALOG_STYLE );
00073 
00075     ~wxCommandEditorDialog();
00076 
00078     void Init();
00079 
00081     void CreateControls();
00082     
00083     const wxEditorCommandArray& GetCommands() const { return m_commands; }
00084     wxEditorCommandArray& GetCommands() { return m_commands; }
00085 
00086     const wxEditorCommand& GetCommand(int i) const { return m_commands[i]; }
00087     
00089     void PopulateCommands();
00090     
00092     void ShowCommand(int i);
00093 
00095     static void SetUseTooltips(bool useTooltips) { sm_useTooltips = useTooltips; }
00096 
00098     static void SetHelpId(int helpId) { sm_helpId = helpId; }
00099 
00101     static void SetUICustomization(wxUICustomization* uiCustomization) { sm_uiCustomization = uiCustomization; }
00102 
00104 
00106     void OnCommandeditordialogCommandsSelected( wxCommandEvent& event );
00107 
00109     void OnCommandeditordialogAddClick( wxCommandEvent& event );
00110 
00112     void OnCommandeditordialogDeleteClick( wxCommandEvent& event );
00113 
00115     void OnCommandeditordialogDeleteUpdate( wxUpdateUIEvent& event );
00116 
00118     void OnCommandeditordialogRenameClick( wxCommandEvent& event );
00119 
00121     void OnCommandeditordialogRenameUpdate( wxUpdateUIEvent& event );
00122 
00124     void OnCommandeditordialogNameUpdate( wxUpdateUIEvent& event );
00125 
00127     void OnCommandeditordialogCommandUpdate( wxUpdateUIEvent& event );
00128 
00130     void OnCommandeditordialogBrowseClick( wxCommandEvent& event );
00131 
00133     void OnCommandeditordialogBrowseUpdate( wxUpdateUIEvent& event );
00134 
00136     void OnCommandeditordialogShowthisUpdate( wxUpdateUIEvent& event );
00137 
00139     void OnHelpClick( wxCommandEvent& event );
00140 
00142     void OnHelpUpdate( wxUpdateUIEvent& event );
00143 
00145 
00147 
00149     wxBitmap GetBitmapResource( const wxString& name );
00150 
00152     wxIcon GetIconResource( const wxString& name );
00154 
00156     static bool ShowToolTips();
00157 
00159     wxStaticText* m_captionCtrl;
00160     wxListBox* m_commandsCtrl;
00161     wxTextCtrl* m_nameCtrl;
00162     wxTextCtrl* m_commandCtrl;
00163     wxCheckBox* m_showThisCommandCtrl;
00165 
00166     wxEditorCommandArray        m_commands;
00167     wxString                    m_caption;
00168     static int                  sm_helpId;
00169     static bool                 sm_useTooltips;
00170     static wxUICustomization*   sm_uiCustomization;
00171 };
00172 
00173 #endif
00174     // _COMMANDEDITORDIALOG_H_

Generated on Wed May 6 19:20:18 2009 for AxTk by  doxygen 1.5.1