00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AEDMENU_H
00022 #define AEDMENU_H
00023
00024 #include "aedWidget.h"
00025
00026 struct DLLEXPORT aedMenuItem
00027 {
00028 std::string caption;
00029 class aedMenu *child;
00030 };
00031
00033 class DLLEXPORT aedMenu:public aedWidget
00034 {
00035 public:
00036 aedMenu();
00037 ~aedMenu();
00038
00044 unsigned int addItem(const std::string & caption, aedMenu * child = NULL);
00045
00048 void removeItem(unsigned int index);
00049
00050 int wm_lbuttondown(Uint16 x, Uint16 y);
00051 int wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy);
00052 int wm_mouseleave();
00053 int wm_mouseenter();
00054 void render();
00055
00056 private:
00057 int getIndexFromPixel(Uint16 x, Uint16 y);
00058
00059 private:
00060 int m_Highlight;
00061 std::vector < aedMenuItem > m_Items;
00062 };
00063
00064 #if defined(_MSC_VER)
00065 DLLEXTERN template DLLEXPORT aedFunctor1Arg < stub, aedMenu >;
00066 #endif
00067
00068 #endif