00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SkOSMenu_DEFINED
00018 #define SkOSMenu_DEFINED
00019
00020 #include "SkEvent.h"
00021 #include "SkTDArray.h"
00022
00023 class SkOSMenu {
00024 public:
00025 explicit SkOSMenu(const char title[]);
00026 ~SkOSMenu();
00027
00028 const char* getTitle() const { return fTitle; }
00029
00030 void appendItem(const char title[], const char eventType[], int32_t eventData);
00031
00032
00033 int countItems() const;
00034 const char* getItem(int index, uint32_t* cmdID) const;
00035
00036 SkEvent* createEvent(uint32_t os_cmd);
00037
00038 private:
00039 const char* fTitle;
00040
00041 struct Item {
00042 const char* fTitle;
00043 const char* fEventType;
00044 uint32_t fEventData;
00045 uint32_t fOSCmd;
00046 };
00047 SkTDArray<Item> fItems;
00048
00049
00050 SkOSMenu(const SkOSMenu&);
00051 SkOSMenu& operator=(const SkOSMenu&);
00052 };
00053
00054 #endif
00055