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

ScreenTabs.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  *
00003  * Application: Investigator's Dashboard (MultimediaN project 6)
00004  * 
00005  * Screen: Tabbed screen control
00006  *
00007  * Primary author(s): Ork
00008  *                  : 
00009  *                  : 
00010  ******************************************************************************/
00011 
00012 #ifndef Impala_Application_IDash_ScreenTabs_h
00013 #define Impala_Application_IDash_ScreenTabs_h
00014 
00015 #include "ScreenBase.h"
00016 #include "OglGui/Tabs.h"
00017 
00018 namespace Impala {
00019 namespace Application {
00020 namespace IDash {
00021 
00022 class ScreenTabs : public ScreenBase, public OglGui::TabsListener
00023 {
00024 public:
00025     typedef Visualization::AppController    AppController;
00026 
00027     ScreenTabs(int width, int height) :
00028         ScreenBase(width, height) 
00029     {
00030         InitScreen();
00031     }
00032 
00033     ScreenTabs(OglGui::Window *parent, int width, int height) :
00034         ScreenBase(parent, width, height)
00035     {
00036         InitScreen();
00037     }
00038 
00039     ScreenTabs(OglGui::Window *parent, int x, int y, int width, int height) :
00040         ScreenBase(parent, x, y, width, height)
00041     {
00042         InitScreen();
00043     }
00044 
00045     ScreenTabs(OglGui::Window *parent) :
00046         ScreenBase(parent)
00047     {
00048         InitScreen();
00049     }
00050 
00051     OglGui::Tabs* GetTabs()
00052     {
00053         return mTabs;
00054     }
00055 
00056     OglGui::Window *
00057     MakeTab( std::string title, int identifier)
00058     {
00059         return mTabs->CreateTab(title, 200, identifier);
00060     }
00061 
00062     void
00063     GotoTab(int tabID)
00064     {
00065         ILOG_DEBUG("GotoTab(" << tabID << ")");
00066         mTabs->SetActiveTab(tabID, false);
00067     }
00068 
00069     virtual void
00070     TabSelectionEvent(OglGui::Tabs* src, int tabNr, void* listenerData,
00071                       int tabControlData)
00072     {
00073         ILOG_USER("Current tab set to " << tabControlData); 
00074         AppController::Instance().SetCurrentControl(tabControlData);
00075     }
00076 
00077 private:
00078     void
00079     InitScreen()
00080     {
00081         ILOG_DEBUG("Constructing screen Tabs");
00082         mTabs = new OglGui::Tabs(this,0,0,W(),H(),120);
00083         mTabs->ConnectTo(this, OglGui::ALLSIDES);
00084         mTabs->SetTabsListener(this);
00085     }
00086 
00087     OglGui::Tabs *mTabs;
00088     ILOG_VAR_DEC;
00089 
00090 };
00091 ILOG_VAR_INIT(ScreenTabs, IDash);
00092 
00093 }
00094 }
00095 }
00096 
00097 #endif

Generated on Fri Mar 19 09:30:27 2010 for ImpalaSrc by  doxygen 1.5.1