DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
FrameControl.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DDEVE_FRAMECONTROL_H
14 #define DDEVE_FRAMECONTROL_H
15 
16 // ROOT include files
17 #include "TGFrame.h"
18 
19 // C/C++ include files
20 #include <string>
21 
22 // Forward declarations
23 class TGClient;
24 class TGPicture;
25 class TGCompositeFrame;
26 
28 namespace dd4hep {
29 
31  /*
32  * \author M.Frank
33  * \version 1.0
34  * \ingroup DD4HEP_EVE
35  */
36  class FrameControl : public TGMainFrame {
37 
38  protected:
40  TGClient* m_client;
42  TGCompositeFrame* m_frame;
43 
44  public:
46  FrameControl(TGClient* client, const std::string& name, unsigned int width, unsigned int height);
48  virtual ~FrameControl();
50  TGClient& client() const { return *m_client; }
52  TGCompositeFrame* frame() const { return m_frame; }
54  virtual void Build();
56  virtual void OnBuild();
57 
59  virtual TGCompositeFrame* CreateFrame();
60 
63  virtual const TGPicture* LoadPicture(const std::string& path);
65 
66  ClassDefOverride(FrameControl,0) // Top level window frame
67  };
68 } /* End namespace dd4hep */
69 #endif // DDEVE_FRAMECONTROL_H
70 
dd4hep::FrameControl::OnBuild
virtual void OnBuild()
User callback to add elements to the control.
Definition: FrameControl.cpp:56
TGMainFrame
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Definition: ROOTClasses.h:33
dd4hep::FrameControl::~FrameControl
virtual ~FrameControl()
Default destructor.
Definition: FrameControl.cpp:38
dd4hep::FrameControl::CreateFrame
virtual TGCompositeFrame * CreateFrame()
Create the frame for this control structure. Default: create horizontal frame.
Definition: FrameControl.cpp:60
dd4hep::FrameControl::m_client
TGClient * m_client
Reference to TEve manager.
Definition: FrameControl.h:40
dd4hep::FrameControl::client
TGClient & client() const
Access to the windows client.
Definition: FrameControl.h:50
dd4hep::FrameControl::frame
TGCompositeFrame * frame() const
Access to the top level frame.
Definition: FrameControl.h:52
dd4hep::FrameControl::m_frame
TGCompositeFrame * m_frame
Reference to control's frame.
Definition: FrameControl.h:42
dd4hep::FrameControl::FrameControl
FrameControl(TGClient *client, const std::string &name, unsigned int width, unsigned int height)
Standard constructor.
dd4hep::FrameControl::LoadPicture
virtual const TGPicture * LoadPicture(const std::string &path)
Helper: Load picture using path name.
Definition: FrameControl.cpp:65
dd4hep::FrameControl::Build
virtual void Build()
Build the control.
Definition: FrameControl.cpp:46
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::FrameControl
class FrameControl FrameControl.h DDEve/FrameControl.h
Definition: FrameControl.h:36