CMS 3D CMS Logo

Public Member Functions | Private Attributes

ViewerParameterGUI Class Reference

#include <CmsShowViewPopup.h>

Inheritance diagram for ViewerParameterGUI:
FWParameterSetterEditorBase

List of all members.

Public Member Functions

void addFrameToContainer (TGCompositeFrame *)
ViewerParameterGUIaddParam (const FWParameterBase *)
TGCompositeFrame * getTabContainer ()
void populateComplete ()
ViewerParameterGUIrequestTab (const char *)
void reset ()
ViewerParameterGUIseparator ()
 ViewerParameterGUI (const TGFrame *)
virtual ~ViewerParameterGUI ()

Private Attributes

std::string m_selectedTabName
std::vector< boost::shared_ptr
< FWParameterSetterBase > > 
m_setters
TGTab * m_tab

Detailed Description

Definition at line 49 of file CmsShowViewPopup.h.


Constructor & Destructor Documentation

ViewerParameterGUI::ViewerParameterGUI ( const TGFrame *  p)

Definition at line 184 of file CmsShowViewPopup.cc.

                                                      :
   TGCompositeFrame(p),
   m_tab(0),
   m_selectedTabName("Style")
{
   SetCleanup(kDeepCleanup);
}
virtual ViewerParameterGUI::~ViewerParameterGUI ( ) [inline, virtual]

Definition at line 53 of file CmsShowViewPopup.h.

{}

Member Function Documentation

void ViewerParameterGUI::addFrameToContainer ( TGCompositeFrame *  x)

Definition at line 267 of file CmsShowViewPopup.cc.

References m_tab, and dbtoconf::parent.

Referenced by FWEveView::populateController().

{
   assert (m_tab);
   TGCompositeFrame* parent =  m_tab->GetCurrentContainer();
   parent->AddFrame(x,new TGLayoutHints(kLHintsExpandX,4 ,4, 2, 2) );

   parent->MapSubwindows();
   parent->Layout();
   m_tab->Layout();
   parent->Resize(parent->GetDefaultSize());
}
ViewerParameterGUI & ViewerParameterGUI::addParam ( const FWParameterBase param)

Definition at line 226 of file CmsShowViewPopup.cc.

References m_setters, m_tab, FWParameterSetterBase::makeSetterFor(), and dbtoconf::parent.

Referenced by FWTriggerTableView::populateController(), and FWRPZView::populateController().

{
   boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor((FWParameterBase*)param) );
   ptr->attach((FWParameterBase*)param, this);
   TGCompositeFrame* parent = m_tab->GetCurrentContainer();

   TGFrame* pframe = ptr->build(parent);
   parent->AddFrame(pframe, new TGLayoutHints(kLHintsExpandX));
   m_setters.push_back(ptr);

   pframe->MapWindow();
   pframe->MapSubwindows();
   pframe->Layout();
   parent->MapSubwindows();
   parent->Layout();
   m_tab->Layout();
   parent->Resize(parent->GetDefaultSize());
   return *this;
}
TGCompositeFrame * ViewerParameterGUI::getTabContainer ( )

Definition at line 260 of file CmsShowViewPopup.cc.

References m_tab.

Referenced by FW3DViewBase::populateController(), FWEveView::populateController(), FWTriggerTableView::populateController(), and FWRPZView::populateController().

{
   assert (m_tab);
   return m_tab->GetCurrentContainer();
}
void ViewerParameterGUI::populateComplete ( )

Definition at line 281 of file CmsShowViewPopup.cc.

References m_selectedTabName, m_tab, and x.

Referenced by CmsShowViewPopup::reset().

{
   if (m_tab) 
   {
      bool x = m_tab->SetTab(m_selectedTabName.c_str(), false);
      if (!x) m_tab->SetTab("Style");
   }
}
ViewerParameterGUI & ViewerParameterGUI::requestTab ( const char *  name)

Definition at line 208 of file CmsShowViewPopup.cc.

References m_tab.

Referenced by FWLegoViewBase::populateController(), FW3DViewBase::populateController(), FWEveView::populateController(), FWTriggerTableView::populateController(), and FWRPZView::populateController().

{
   if (!m_tab)
   {
      m_tab = new TGTab(this);
      AddFrame(m_tab,  new TGLayoutHints(kLHintsExpandX));
   }

   if (!m_tab->GetTabContainer(name))
      m_tab->AddTab(name);

   m_tab->SetTab(name);

   return *this;
}
void ViewerParameterGUI::reset ( void  )

Definition at line 193 of file CmsShowViewPopup.cc.

References m_selectedTabName, m_setters, and m_tab.

Referenced by CmsShowViewPopup::reset().

{  
   // remember selected tab
   if (m_tab) 
      m_selectedTabName =  m_tab->GetCurrentTab()->GetString();
   else
      m_selectedTabName = "Style";

   m_setters.clear();
   if (m_tab) RemoveFrame(m_tab);
   m_tab = 0;
}
ViewerParameterGUI & ViewerParameterGUI::separator ( )

Definition at line 250 of file CmsShowViewPopup.cc.

References m_tab, and asciidump::s.

Referenced by FW3DViewBase::populateController().

{
   assert(m_tab);
   TGHorizontal3DLine* s = new TGHorizontal3DLine(m_tab->GetCurrentContainer());
   m_tab->GetCurrentContainer()->AddFrame(s, new TGLayoutHints(kLHintsExpandX,4 ,4, 2, 2));

   return *this;
}

Member Data Documentation

Definition at line 67 of file CmsShowViewPopup.h.

Referenced by populateComplete(), and reset().

std::vector<boost::shared_ptr<FWParameterSetterBase> > ViewerParameterGUI::m_setters [private]

Definition at line 69 of file CmsShowViewPopup.h.

Referenced by addParam(), and reset().

TGTab* ViewerParameterGUI::m_tab [private]