00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef _AX_MENU_ALERT_H_
00013 #define _AX_MENU_ALERT_H_
00014
00015
00016
00017
00018
00019 #include "ax/ax_menu_modal.h"
00020 #include "ax/ax_activator.h"
00021
00042 #define axALERT_NO_BUTTONS 0x0000
00043 #define axALERT_YES_NO 0x0001
00044 #define axALERT_OK 0x0002
00045 #define axALERT_CANCEL 0x0004
00046
00047 #define AxIdentifierMainItem wxT("MAINITEM")
00048
00049 class AxModalAlertMenu: public AxModalMenu
00050 {
00051 DECLARE_CLASS( AxModalAlertMenu )
00052
00053 public:
00054
00055
00056 AxModalAlertMenu() { Init(); }
00057
00058 AxModalAlertMenu(AxMenuController* controller, AxMenuItem* item,
00059 const wxString& menuLabel,
00060 const wxString& description,
00061 const wxString& mainItemLabel,
00062 int style = axALERT_NO_BUTTONS,
00063 const wxString& okItemLabel = _("OK"),
00064 const wxString& cancelItemLabel = _("Cancel"),
00065 const wxString& yesItemLabel = _("Yes"),
00066 const wxString& noItemLabel = _("No"),
00067 const wxString defaultId = AxIdentifierOK);
00068
00069 ~AxModalAlertMenu() {}
00070
00071
00072
00073 void Init() {}
00074
00075 protected:
00076
00077 };
00078
00086 class AxAlertMenuActivator: public AxActivator
00087 {
00088 public:
00089
00090 DECLARE_DYNAMIC_CLASS( AxAlertMenuActivator )
00091
00092 public:
00093
00094
00095 AxAlertMenuActivator(AxModalAlertMenu* menu = NULL) { Init(); m_alertMenu = menu; }
00096 AxAlertMenuActivator(const AxAlertMenuActivator& activator) { Init(); Copy(activator); }
00097
00098
00099
00100 void Init() { m_alertMenu = NULL; }
00101
00102 void Copy(const AxAlertMenuActivator& activator);
00103
00104 virtual AxActivator* Clone() const { return new AxAlertMenuActivator(*this); }
00105
00106 virtual AxMenu* Activate(AxMenuController* controller, AxMenuItem* item);
00107
00108 AxModalAlertMenu* GetModalAlertMenu() const { return m_alertMenu; }
00109 void SetModalAlertMenu(AxModalAlertMenu* menu) { m_alertMenu = menu; }
00110
00111 protected:
00112 AxModalAlertMenu* m_alertMenu;
00113 };
00114
00115 #endif
00116