00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013 #ifndef SWCRMENUSELECTIONEVENT_H
00014 #define SWCRMENUSELECTIONEVENT_H
00015
00016 #ifdef __GNUG__
00017 #pragma interface "CRMenuSelectionEvent.h"
00018 #endif
00019
00020 #include <wxGuiTest/Common.h>
00021 #include <wx/frame.h>
00022
00023 #include "CRCapturedEvent.h"
00024
00025 namespace wxTst {
00026
00027
00034 class CRMenuSelectionEvent : public CRCapturedEvent
00035 {
00036 public:
00042 CRMenuSelectionEvent (wxEvent *event);
00043
00044
00048 virtual ~CRMenuSelectionEvent ();
00049
00050
00057 virtual void Process (CRCapturedEvent **pendingEvt);
00058
00059
00063 virtual void EmitCpp ();
00064
00065 protected:
00066
00067 private:
00068 bool m_isTool;
00069
00070 bool m_isFromTopWindow;
00071 bool m_eventObjectIsMenu;
00072 bool m_isFromPopupMenu;
00073 bool m_isChecked;
00074
00075 wxString m_menuLabel;
00076 wxString m_menuItemLabel;
00077 wxString m_popupMenuKey;
00078 wxString m_parentContainerName;
00079
00080 wxString m_toolbarName;
00081 bool m_isControl;
00082 wxString m_controlName;
00083
00084 private:
00085
00086 CRMenuSelectionEvent (const CRMenuSelectionEvent &rhs);
00087 CRMenuSelectionEvent & operator= (const CRMenuSelectionEvent &rhs);
00088 void processCheckable();
00089 void processMainMenu(wxMenuBar* menuBar);
00090 bool processPopUp (wxMenu* menu);
00091 bool processToolBar(wxToolBar *toolBar);
00092 bool processTopMenu(wxMenu* menu);
00093 bool processTopFrame(wxFrame* topFrame);
00094 };
00095
00096 }
00097
00098 #endif // SWCRMENUSELECTIONEVENT_H
00099