GfxMCVecListMenu Class Reference

#include <GfxMCVecListMenu.h>

Inheritance diagram for GfxMCVecListMenu:
GfxMenu

List of all members.

Public Member Functions

 GfxMCVecListMenu ()
virtual ~GfxMCVecListMenu ()
GuiMenuMakeMenu (EVD *)

Private Member Functions

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

Detailed Description

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

Definition at line 23 of file GfxMCVecListMenu.h.


Constructor & Destructor Documentation

GfxMCVecListMenu::GfxMCVecListMenu (  )  [inline]

Definition at line 25 of file GfxMCVecListMenu.h.

00025 {}

virtual GfxMCVecListMenu::~GfxMCVecListMenu (  )  [inline, virtual]

Definition at line 26 of file GfxMCVecListMenu.h.

00026 {}


Member Function Documentation

void GfxMCVecListMenu::HideAll ( GuiMenu menu,
GuiMenu::GuiMenuList::iterator  mit 
) [private]

Definition at line 35 of file GfxMCVecListMenu.cxx.

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

Referenced by MakeMenu().

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

GuiMenu * GfxMCVecListMenu::MakeMenu ( EVD  )  [virtual]

GfxMCVecListMenu

Implements GfxMenu.

Definition at line 20 of file GfxMCVecListMenu.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,&GfxMCVecListMenu::HideAll),gfx_menu,mit));
00027 
00028     //hide at program start
00029 
00030     //    HideAll(gfx_menu,mit);
00031 
00032     return gfx_menu;
00033 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1