Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

MenuBar.h

Go to the documentation of this file.
00001 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00002 // MenuBar.h
00003 //
00004 // Author: Richard van Balen
00005 #ifndef OglGui_MenuBar_h
00006 #define OglGui_MenuBar_h
00007 
00008 #ifndef OglGui_Menu_h
00009 #include "OglGui/Menu.h"
00010 #endif
00011 
00012 #include "OglGui/MenuOnButton.h"
00013 
00014 namespace OglGui {
00015 
00016 class MenuBar : public Window
00017 {
00018 public:
00019     MenuBar(Window* parent) :
00020         Window(parent, 0, parent->H()-24, parent->W(), 24)
00021     {
00022         ConnectTo(this, TOTOP | TOLEFTRIGHT);
00023         Init();
00024     }
00025 
00026     MenuBar(Window* parent, int w, int h) :
00027         Window(parent, w, h)
00028     {
00029         Init();
00030     }
00031 
00032     MenuBar(Window* parent,int x, int y, int w, int h) :
00033         Window(parent, x, y, w, h)
00034     {
00035         Init();
00036     }
00037 
00038     MenuOnButton* AddMenu(Menu* menu, strconst name, int w=80)
00039     {
00040         MenuOnButton* btn = new MenuOnButton(this,mPosX,0,w,24,name,menu);
00041         btn->SetBorderType(-1);
00042         btn->SetBorderFillShaded(0);
00043         btn->ActiveBorderType(1);
00044         btn->ShowTriangle(false);
00045         mPosX += w;
00046         return btn;
00047     }
00048 
00049 protected:
00050     int     mPosX;
00051 
00052 private:
00053     void Init()
00054     {
00055         mPosX = 0;
00056     }
00057 };
00058 
00059 } // Namespace OglGui
00060 #endif
00061 

Generated on Fri Mar 19 09:31:36 2010 for ImpalaSrc by  doxygen 1.5.1