GuiToggledMenuItem Class Reference

#include <GuiMenuThings.h>

List of all members.

Public Member Functions

 GuiToggledMenuItem (Bool_t state=false)
GuiMenuItr AddToMenu (GuiMenu *menu, const char *name)
void CallBack (GuiMenu *menu, GuiMenu::GuiMenuList::iterator mit)
void Connect (SigC::Slot0< void > s)
Bool_t GetState ()
void SetState (Bool_t set)
Bool_t operator() (void)

Private Attributes

Bool_t fState
SigC::Signal0< void > fSig

Detailed Description

Definition at line 10 of file GuiMenuThings.h.


Constructor & Destructor Documentation

GuiToggledMenuItem::GuiToggledMenuItem ( Bool_t  state = false  ) 

Definition at line 8 of file GuiMenuThings.cxx.

00008                                                      :
00009  fState(state)
00010 {
00011 }


Member Function Documentation

GuiMenu::GuiMenuList::iterator GuiToggledMenuItem::AddToMenu ( GuiMenu menu,
const char *  name 
)

Definition at line 14 of file GuiMenuThings.cxx.

References GuiMenu::Add(), CallBack(), GuiMenu::CheckEntry(), and fState.

Referenced by TridPageDetector::Init(), and TridUVPage::Init().

00015 {
00016   GuiMenuItr mit = menu->Add(name);
00017   (*mit)->Connect(bind(bind(slot_class(*this,&GuiToggledMenuItem::CallBack),
00018                             mit) , menu));
00019   menu->CheckEntry(mit, (fState));
00020   return mit;
00021 }

void GuiToggledMenuItem::CallBack ( GuiMenu menu,
GuiMenu::GuiMenuList::iterator  mit 
)

Definition at line 23 of file GuiMenuThings.cxx.

References GuiMenu::CheckEntry(), fSig, and fState.

Referenced by AddToMenu().

00024 {
00025   fState = !(fState);
00026   menu->CheckEntry(mit, (fState));
00027   fSig.emit();
00028 }

void GuiToggledMenuItem::Connect ( SigC::Slot0< void >  s  )  [inline]

Definition at line 19 of file GuiMenuThings.h.

References fSig.

Referenced by TridPageDetector::Init(), and TridUVPage::Init().

00019 { fSig.connect(s); }

Bool_t GuiToggledMenuItem::GetState ( void   )  [inline]

Definition at line 21 of file GuiMenuThings.h.

References fState.

00021 { return fState; };

Bool_t GuiToggledMenuItem::operator() ( void   )  [inline]

Definition at line 23 of file GuiMenuThings.h.

References fState.

00023 { return fState; };

void GuiToggledMenuItem::SetState ( Bool_t  set  ) 

Definition at line 30 of file GuiMenuThings.cxx.

References fSig, and fState.

00031 {
00032   fState = set;
00033   fSig.emit();
00034 }


Member Data Documentation

SigC::Signal0<void> GuiToggledMenuItem::fSig [private]

Definition at line 13 of file GuiMenuThings.h.

Referenced by CallBack(), Connect(), and SetState().

Bool_t GuiToggledMenuItem::fState [private]

Definition at line 12 of file GuiMenuThings.h.

Referenced by AddToMenu(), CallBack(), GetState(), operator()(), and SetState().


The documentation for this class was generated from the following files:

Generated on 19 Jan 2018 for loon by  doxygen 1.6.1