Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GfxShowerListMenu Class Reference

Create a menu which modifies all existing GfxDigitListCfgs. More...

#include <GfxShowerListMenu.h>

Inheritance diagram for GfxShowerListMenu:

GfxMenu List of all members.

Public Member Functions

 GfxShowerListMenu ()
virtual ~GfxShowerListMenu ()
GuiMenuMakeMenu (EVD *)

Private Member Functions

void HideAll (GuiMenu *menu, GuiMenu::GuiMenuList::iterator mit)

Detailed Description

Create a menu which modifies all existing GfxDigitListCfgs.

Id
GfxShowerListMenu.h,v 1.2 2003/08/22 16:47:10 musser Exp

EVD

Contact: bv@bnl.gov

Created on: Thu Oct 17 15:45:47 2002

Definition at line 23 of file GfxShowerListMenu.h.


Constructor & Destructor Documentation

GfxShowerListMenu::GfxShowerListMenu  )  [inline]
 

Definition at line 25 of file GfxShowerListMenu.h.

00025 {}

virtual GfxShowerListMenu::~GfxShowerListMenu  )  [inline, virtual]
 

Definition at line 26 of file GfxShowerListMenu.h.

00026 {}


Member Function Documentation

void GfxShowerListMenu::HideAll GuiMenu menu,
GuiMenu::GuiMenuList::iterator  mit
[private]
 

Definition at line 31 of file GfxShowerListMenu.cxx.

References GuiMenu::CheckEntry(), done(), GfxProxy< T >::GetInstances(), NamedFactory::GetProxy(), NamedFactory::Instance(), and GuiMenu::IsEntryChecked().

Referenced by MakeMenu().

00032 {
00033     NamedFactory& nf = NamedFactory::Instance("Gfx");
00034     NamedProxy* np = nf.GetProxy("ShowerList");
00035 
00036     GfxProxy<GfxShowerList>* gp = dynamic_cast<GfxProxy<GfxShowerList>*>(np);
00037     if (!gp) {
00038         cerr << "Can't get GfxShowerList proxy\n";
00039         return;
00040     }
00041 
00042     list<GfxShowerList*> dls = gp->GetInstances();
00043     list<GfxShowerList*>::iterator lit, done = dls.end();
00044 
00045     bool tf = ! menu->IsEntryChecked(mit);
00046 
00047     menu->CheckEntry(mit,tf);
00048     for (lit = dls.begin(); lit != done; ++lit)
00049         (*lit)->HideShowers(tf);
00050 }

GuiMenu * GfxShowerListMenu::MakeMenu EVD  )  [virtual]
 

GfxShowerListMenu

Implements GfxMenu.

Definition at line 20 of file GfxShowerListMenu.cxx.

References GuiMenu::Add(), and HideAll().

00021 {
00022     GuiMenu::GuiMenuList::iterator mit;
00023 
00024     GuiMenu* gfx_menu = new GuiMenu;
00025     mit = gfx_menu->Add("Hide all");
00026     (*mit)->Connect(bind(slot_class(*this,&GfxShowerListMenu::HideAll),gfx_menu,mit));
00027 
00028     return gfx_menu;
00029 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 11:58:24 2007 for loon by  doxygen 1.3.9.1