include/ax/ax_shortcutinputdialog.h

Go to the documentation of this file.
00001 
00002 // Name:        ax_shortcutinputdialog.h
00003 // Purpose:     
00004 // Author:      Julian Smart
00005 // Modified by: 
00006 // Created:     13/04/2009 22:29:50
00007 // RCS-ID:      
00008 // Copyright:   
00009 // Licence:     
00011 
00012 #ifndef _AX_SHORTCUTINPUTDIALOG_H_
00013 #define _AX_SHORTCUTINPUTDIALOG_H_
00014 
00015 
00020 
00021 
00022 
00023 #include "wx/timer.h"
00024 
00025 #include "shortcutcust/shortcutcust.h"
00026 
00031 
00032 class wxShortcutCtrl;
00034 
00035 class AxSpeech;
00036 
00041 
00042 #define SYMBOL_AXSHORTCUTINPUTDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
00043 #define SYMBOL_AXSHORTCUTINPUTDIALOG_TITLE _("Text Input")
00044 #define SYMBOL_AXSHORTCUTINPUTDIALOG_IDNAME wxID_ANY
00045 #define SYMBOL_AXSHORTCUTINPUTDIALOG_SIZE wxSize(400, 300)
00046 #define SYMBOL_AXSHORTCUTINPUTDIALOG_POSITION wxDefaultPosition
00048 
00049 
00054 class AxShortcutInputDialog: public wxDialog
00055 {    
00056     DECLARE_DYNAMIC_CLASS( AxShortcutInputDialog )
00057     DECLARE_EVENT_TABLE()
00058 
00059 public:
00061     AxShortcutInputDialog();
00062     AxShortcutInputDialog( wxWindow* parent,
00063         const wxString& message, const wxString& caption, const wxShortcutItem& defaultValue,
00064         const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = SYMBOL_AXSHORTCUTINPUTDIALOG_STYLE );
00065 
00067     bool Create( wxWindow* parent,
00068         const wxString& message, const wxString& caption, const wxShortcutItem& defaultValue,
00069         const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = SYMBOL_AXSHORTCUTINPUTDIALOG_STYLE );
00070 
00072     ~AxShortcutInputDialog();
00073 
00075     void Init();
00076 
00078     void CreateControls(const wxShortcutItem& defaultValue, const wxString& message);
00079 
00080     void SetShortcut(const wxShortcutItem& shortcut) { m_shortcut = shortcut; }
00081     const wxShortcutItem& GetShortcut() const { return m_shortcut; }
00082 
00083     void SetShortcutManager(wxShortcutManager* manager) { m_shortcutManager = manager; }
00084     wxShortcutManager* GetShortcutManager() const { return m_shortcutManager; }
00085 
00086     void SetSpeech(AxSpeech* speech) { m_speech = speech; }
00087     AxSpeech* GetSpeech() const { return m_speech; }
00088 
00089     void SpeakCurrentShortcut(bool initialView = false);
00090     
00091     void OnTimer(wxTimerEvent& event);
00092 
00094 
00096     void OnInitDialog( wxInitDialogEvent& event );
00097 
00099     void OnAnyTextUpdated( wxCommandEvent& event );
00100 
00102     void OnOkClick( wxCommandEvent& event );
00103 
00105 
00107 
00109     wxBitmap GetBitmapResource( const wxString& name );
00110 
00112     wxIcon GetIconResource( const wxString& name );
00114 
00116     static bool ShowToolTips();
00117 
00119     wxStaticText* m_descriptionCtrl;
00120     wxShortcutCtrl* m_valueCtrl;
00121     wxTextCtrl* m_detailsCtrl;
00123 
00124     wxShortcutItem      m_shortcut;
00125     wxShortcutManager*  m_shortcutManager;
00126     AxSpeech*           m_speech;
00127     bool                m_disableEvents;
00128     wxTimer             m_timer;
00129     long                m_lastSpoke;
00130 };
00131 
00132 #endif
00133     // _AX_SHORTCUTINPUTDIALOG_H_

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