SCV  4.2.1
Simple Components for Visual
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MenuBar.h
Go to the documentation of this file.
1 #ifndef __SCV_MENU_BAR_H__
2 #define __SCV_MENU_BAR_H__
3 
4 #include "Panel.h"
5 
6 namespace scv {
7 
8 class MenuBar : public Panel {
9 public:
10  MenuBar(int width);
11 
12  void addMenu(ContextMenu *menu);
13 
14  bool hasActiveMenu(void) const;
15  void activeMenu(int id);
16 
17  void closeAllMenus(void);
18 
19  int getNumberOfMenus();
20 
21 protected:
22  virtual void processMouse(const scv::MouseEvent &evt);
23  virtual void processKey(const scv::KeyEvent &evt);
24 
25  virtual void createTexture(void);
26 
27  virtual void display(void);
28 
29 private:
30  static const int s_menuHeight;
31  static const int s_menuSpacing;
32  static const int s_borderWidth, s_borderHeight;
33 
34  int _currSelectedMenu, _currecOverMenu;
35  bool _active;
36 
37  std::vector<int> _index;
38  std::vector<ContextMenu*> _menus;
39 };
40 
41 } // namespace scv
42 
43 #endif // __SCV_MENU_BAR_H__