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 49 of file CmsShowViewPopup.h.

Constructor & Destructor Documentation

ViewerParameterGUI::ViewerParameterGUI ( const TGFrame *  p)

Definition at line 194 of file CmsShowViewPopup.cc.

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

Definition at line 54 of file CmsShowViewPopup.h.

54 {}

Member Function Documentation

void ViewerParameterGUI::addFrameToContainer ( TGCompositeFrame *  x)

Definition at line 287 of file CmsShowViewPopup.cc.

References assert(), m_tab, and dbtoconf::parent.

Referenced by FWEveView::populateController().

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

Definition at line 246 of file CmsShowViewPopup.cc.

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

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

247 {
248  boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor((FWParameterBase*)param) );
249  ptr->attach((FWParameterBase*)param, this);
250  TGCompositeFrame* parent = m_tab->GetCurrentContainer();
251 
252  TGFrame* pframe = ptr->build(parent);
253  parent->AddFrame(pframe, new TGLayoutHints(kLHintsExpandX));
254  m_setters.push_back(ptr);
255 
256  pframe->MapWindow();
257  pframe->MapSubwindows();
258  pframe->Layout();
259  parent->MapSubwindows();
260  parent->Layout();
261  m_tab->Layout();
262  parent->Resize(parent->GetDefaultSize());
263  return *this;
264 }
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 300 of file CmsShowViewPopup.cc.

References m_selectedTabName, m_tab, and x.

Referenced by CmsShowViewPopup::reset().

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

Definition at line 228 of file CmsShowViewPopup.cc.

References m_tab.

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

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

Definition at line 203 of file CmsShowViewPopup.cc.

References assert(), f, m_selectedTabName, m_setters, and m_tab.

Referenced by CmsShowViewPopup::reset().

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

Definition at line 270 of file CmsShowViewPopup.cc.

References assert(), m_tab, and alignCSCRings::s.

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

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

Member Data Documentation

std::string ViewerParameterGUI::m_selectedTabName
private

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