CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ViewerParameterGUI Class Reference

#include <CmsShowViewPopup.h>

Inheritance diagram for ViewerParameterGUI:
FWParameterSetterEditorBase

Public Member Functions

void addFrameToContainer (TGCompositeFrame *)
 
ViewerParameterGUIaddParam (const FWParameterBase *)
 
TGCompositeFrame * getTabContainer ()
 
void populateComplete ()
 
ViewerParameterGUIrequestTab (const char *)
 
void reset ()
 
ViewerParameterGUIseparator ()
 
 ViewerParameterGUI (const TGFrame *)
 
virtual ~ViewerParameterGUI ()
 
- Public Member Functions inherited from FWParameterSetterEditorBase
 FWParameterSetterEditorBase ()
 
virtual void updateEditor ()
 
virtual ~FWParameterSetterEditorBase ()
 

Private Attributes

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

Detailed Description

Definition at line 50 of file CmsShowViewPopup.h.

Constructor & Destructor Documentation

ViewerParameterGUI::ViewerParameterGUI ( const TGFrame *  p)

Definition at line 195 of file CmsShowViewPopup.cc.

195  :
196  TGCompositeFrame(p),
197  m_tab(0),
198  m_selectedTabName("Style")
199 {
200  SetCleanup(kDeepCleanup);
201 }
std::string m_selectedTabName
virtual ViewerParameterGUI::~ViewerParameterGUI ( )
inlinevirtual

Definition at line 55 of file CmsShowViewPopup.h.

55 {}

Member Function Documentation

void ViewerParameterGUI::addFrameToContainer ( TGCompositeFrame *  x)

Definition at line 288 of file CmsShowViewPopup.cc.

References m_tab, and dbtoconf::parent.

Referenced by FWEveView::populateController().

289 {
290  assert (m_tab);
291  TGCompositeFrame* parent = m_tab->GetCurrentContainer();
292  parent->AddFrame(x,new TGLayoutHints(kLHintsExpandX,4 ,4, 2, 2) );
293 
294  parent->MapSubwindows();
295  parent->Layout();
296  m_tab->Layout();
297  parent->Resize(parent->GetDefaultSize());
298 }
list parent
Definition: dbtoconf.py:74
Definition: DDAxes.h:10
ViewerParameterGUI & ViewerParameterGUI::addParam ( const FWParameterBase param)

Definition at line 247 of file CmsShowViewPopup.cc.

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

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

248 {
249  boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor((FWParameterBase*)param) );
250  ptr->attach((FWParameterBase*)param, this);
251  TGCompositeFrame* parent = m_tab->GetCurrentContainer();
252 
253  TGFrame* pframe = ptr->build(parent);
254  parent->AddFrame(pframe, new TGLayoutHints(kLHintsExpandX));
255  m_setters.push_back(ptr);
256 
257  pframe->MapWindow();
258  pframe->MapSubwindows();
259  pframe->Layout();
260  parent->MapSubwindows();
261  parent->Layout();
262  m_tab->Layout();
263  parent->Resize(parent->GetDefaultSize());
264  return *this;
265 }
list parent
Definition: dbtoconf.py:74
std::vector< boost::shared_ptr< FWParameterSetterBase > > m_setters
static boost::shared_ptr< FWParameterSetterBase > makeSetterFor(FWParameterBase *)
TGCompositeFrame * ViewerParameterGUI::getTabContainer ( )
void ViewerParameterGUI::populateComplete ( )

Definition at line 301 of file CmsShowViewPopup.cc.

References m_selectedTabName, m_tab, and x.

Referenced by CmsShowViewPopup::reset().

302 {
303  // Set tab - same as it was before, if not exisiting select first time.
304  if (m_tab)
305  {
306  bool x = m_tab->SetTab(m_selectedTabName.c_str(), false);
307  if (!x) m_tab->SetTab("Style");
308  }
309 }
std::string m_selectedTabName
Definition: DDAxes.h:10
ViewerParameterGUI & ViewerParameterGUI::requestTab ( const char *  name)

Definition at line 229 of file CmsShowViewPopup.cc.

References m_tab.

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

230 {
231  if (!m_tab)
232  {
233  m_tab = new TGTab(this);
234  AddFrame(m_tab, new TGLayoutHints(kLHintsExpandX |kLHintsExpandY ));
235  }
236 
237  if (!m_tab->GetTabContainer(name))
238  m_tab->AddTab(name);
239 
240  m_tab->SetTab(name);
241 
242  return *this;
243 }
void ViewerParameterGUI::reset ( void  )

Definition at line 204 of file CmsShowViewPopup.cc.

References f, m_selectedTabName, m_setters, and m_tab.

Referenced by CmsShowViewPopup::reset().

205 {
206  // remember selected tab
207  if (m_tab)
208  m_selectedTabName = m_tab->GetCurrentTab()->GetString();
209  else
210  m_selectedTabName = "Style";
211 
212  // remove TGTab as the only child
213  m_setters.clear();
214  if (m_tab)
215  {
216  assert(GetList()->GetSize() == 1);
217  TGFrameElement *el = (TGFrameElement*) GetList()->First();
218  TGFrame* f = el->fFrame;
219 
220  assert (f == m_tab);
221  f->UnmapWindow();
222  RemoveFrame(f);
223  f->DeleteWindow();
224  m_tab = 0;
225  }
226 }
std::string m_selectedTabName
std::vector< boost::shared_ptr< FWParameterSetterBase > > m_setters
double f[11][100]
ViewerParameterGUI & ViewerParameterGUI::separator ( )

Definition at line 271 of file CmsShowViewPopup.cc.

References m_tab, and alignCSCRings::s.

Referenced by FWGeometryTableView::populateController(), and FW3DViewBase::populateController().

272 {
273  assert(m_tab);
274  TGHorizontal3DLine* s = new TGHorizontal3DLine(m_tab->GetCurrentContainer());
275  m_tab->GetCurrentContainer()->AddFrame(s, new TGLayoutHints(kLHintsExpandX,4 ,4, 2, 2));
276 
277  return *this;
278 }

Member Data Documentation

std::string ViewerParameterGUI::m_selectedTabName
private

Definition at line 68 of file CmsShowViewPopup.h.

Referenced by populateComplete(), and reset().

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

Definition at line 70 of file CmsShowViewPopup.h.

Referenced by addParam(), and reset().

TGTab* ViewerParameterGUI::m_tab
private