DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FrameControl.h
Go to the documentation of this file.
1 // $Id: $
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 #ifndef DD4HEP_DDEVE_FRAMECONTROL_H
15 #define DD4HEP_DDEVE_FRAMECONTROL_H
16 
17 // ROOT include files
18 #include "TGFrame.h"
19 
20 // C/C++ include files
21 #include <string>
22 
23 // Forward declarations
24 class TGClient;
25 class TGPicture;
26 class TGCompositeFrame;
27 
29 namespace DD4hep {
30 
32  /*
33  * \author M.Frank
34  * \version 1.0
35  * \ingroup DD4HEP_EVE
36  */
37  class FrameControl : public TGMainFrame {
38 
39  protected:
41  TGClient* m_client;
43  TGCompositeFrame* m_frame;
44 
45  public:
47  FrameControl(TGClient* client, const std::string& name, unsigned int width, unsigned int height);
49  virtual ~FrameControl();
51  TGClient& client() const { return *m_client; }
53  TGCompositeFrame* frame() const { return m_frame; }
55  virtual void Build();
57  virtual void OnBuild();
58 
60  virtual TGCompositeFrame* CreateFrame();
61 
64  virtual const TGPicture* LoadPicture(const std::string& path);
66 
67  ClassDef(FrameControl,0) // Top level window frame
68  };
69 
70 
71 } /* End namespace DD4hep */
72 
73 
74 #endif /* DD4HEP_DDEVE_FRAMECONTROL_H */
75 
TGClient & client() const
Access to the windows client.
Definition: FrameControl.h:51
virtual void Build()
Build the control.
virtual ~FrameControl()
Default destructor.
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Definition: ROOTClasses.h:30
virtual void OnBuild()
User callback to add elements to the control.
TGCompositeFrame * m_frame
Reference to control's frame.
Definition: FrameControl.h:43
FrameControl(TGClient *client, const std::string &name, unsigned int width, unsigned int height)
Standard constructor.
class FrameControl FrameControl.h DDEve/FrameControl.h
Definition: FrameControl.h:37
TGClient * m_client
Reference to TEve manager.
Definition: FrameControl.h:41
TGCompositeFrame * frame() const
Access to the top level frame.
Definition: FrameControl.h:53
virtual TGCompositeFrame * CreateFrame()
Create the frame for this control structure. Default: create horizontal frame.
virtual const TGPicture * LoadPicture(const std::string &path)
Helper: Load picture using path name.