00001 class MenuButton : public Label {
00002 public:
00003 void Draw();
00004 void MouseOver(int, int, int);
00005 };
00006
00007 struct MenuBarItem {
00008 MenuButton item;
00009 PopupMenu *menu;
00010 uint32 xl;
00011 };
00012
00013 class MenuBar : public Element {
00014 _PROTECTED_:
00015 List<MenuBarItem*> list;
00016 uint32 xl;
00017 Font *fnt;
00018 public:
00019 MenuBar() {
00020 xl = 0;
00021 }
00022 ~MenuBar();
00023 void Init(Font *fnt);
00024 BOOL Create(int _xpos, int _ypos, int _x, int _y, int _Style, Element *_Parent);
00025 BOOL Add(char *label, PopupMenu *);
00026
00027 void Draw();
00028 void Click(int, int, int);
00029
00030 };
00031
00032
00033 class PopupMenuCheck : public Bitmap {
00034 public:
00035 PopupMenuCheck();
00036 };
00037
00038 extern PopupMenuCheck PopupMenuCheckImage;
00039
00040
00041 class PopupMenuArrow : public Bitmap {
00042 public:
00043 PopupMenuArrow();
00044 };
00045
00046 extern PopupMenuArrow PopupMenuArrowImage;
00047
00048 struct PopupMenuItem {
00049 uint32 ID;
00050 Bitmap icon1;
00051 BOOL icon1show;
00052 MenuButton label;
00053 Bitmap icon2;
00054 PopupMenu *submenu;
00055 };
00056
00057 class PopupMenu : public Window {
00058 _PROTECTED_:
00059 Thread *This;
00060 SpreadSheetCombo ss;
00061 List<PopupMenuItem*> list;
00062 PopupMenu *Parent;
00063 PopupMenu *ActiveChild;
00064 Font *fnt;
00065 public:
00066 void Init(Font *fnt);
00067 BOOL Create(int _xpos, int _ypos, int _x, int _y, int _Style, Element *_Parent);
00068 BOOL Add(char *label, uint32 ID, Bitmap *icon = (Bitmap*)NULL, PopupMenu *_submenu = (PopupMenu *)NULL);
00069
00070
00071 void ShowIcon(uint32 idx);
00072 void HideIcon(uint32 idx);
00073 void ToggleIcon(uint32 idx);
00074 void Show();
00075 void Hide();
00076 void HideAll();
00077 void Popup(int x, int y);
00078
00079
00080 void Click(int, int, int);
00081 void MouseDown(int, int, int);
00082 void MouseDown2(int, int, int);
00083 };
00084