JG ROOT Tools libraries  version 5.0 - august 2014
RGMarkerAttrSelect.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file RGMarkerAttrSelect.hh
3  *
4  * Include file for class RGMarkerAttrSelect
5  */
6 //======================================================================
7 
8 #ifndef RG_MARKER_ATTR_SELECT_HH
9 #define RG_MARKER_ATTR_SELECT_HH
10 
11 #include "RBaseFunctions.hh"
12 
13 // widgets include file
14 #include "RGColorNumberSelect.hh"
15 
16 // ROOT include files
17 #include <TAttMarker.h>
18 #include <TGedMarkerSelect.h>
19 
20 ///! RGMarkerAttrSelect widget options
22 {
23  rgMASVerticalLayout = 0x00000000,
24  rgMASHorizontalLayout = 0x00000001
25 };
26 
27 //======================================================================
28 /*! class RGMarkerAttrSelect
29  *
30  * Widget for marker attributes selection: color style (marker type)
31  * and size.
32  *
33  * \image html RGMarkerAttrSelect_h.gif
34  * \image html RGMarkerAttrSelect_v.gif
35  *
36  * Options:
37  * - \b rgLASVerticalLayout: vertical layout
38  * - \b rgLASHorizontalLayout: horizontal layout
39  */
40 
41 class RGMarkerAttrSelect : public TGCompositeFrame
42 {
43  //------------------------------------------------------------
44  /*! \object_doc{RGMarkerAttrSelect} */
46  //------------------------------------------------------------
47 
48  protected:
49 
50  RGColorNumberSelect *w_color; ///< Marker color widget pointer
51  TGedMarkerSelect *w_style; ///< Marker style widget pointer
52  TGNumberEntry *w_size; ///< Marker size widget pointer
53 
54  //------------------------------------------------------------
55  // Constructors / affectation / destructor
56  public:
57  RGMarkerAttrSelect ( TGWindow *p,
58  TAttMarker att = TAttMarker(1,20,1.),
59  UInt_t opt = rgMASVerticalLayout,
60  Int_t wc = 3,
61  Int_t ws = 4,
62  Int_t sep = 4 );
63 
64  private:
65  RGMarkerAttrSelect ( const RGMarkerAttrSelect &original );
66 
67  public:
68  virtual ~RGMarkerAttrSelect ( );
69 
70  //------------------------------------------------------------
71  virtual void MapSubwindows ( );
72  virtual void SetState ( const Bool_t b = kTRUE );
73 
74  // Fonctions
75  Color_t GetMarkerColor ( ) const; // inline
76  Pixel_t GetMarkerColorPixel ( ) const; // inline
77  Style_t GetMarkerStyle ( ) const; // inline
78  Size_t GetMarkerSize ( ) const; // inline
79  TAttMarker GetMarkerAttr ( ) const; // inline
80 
81  void SetMarkerColor ( const Color_t c, const Bool_t emit = kTRUE );
82  void SetMarkerColorPixel ( const Pixel_t c, const Bool_t emit = kTRUE );
83  void SetMarkerStyle ( const Style_t s, const Bool_t emit = kTRUE );
84  void SetMarkerSize ( const Size_t s, const Bool_t emit = kTRUE );
85 
86  RGColorNumberSelect * GetColorWidget () const; // inline
87  TGedMarkerSelect * GetStyleWidget () const; // inline
88  TGNumberEntry * GetSizeWidget () const; // inline
89 
90  //------------------------------------------------------------
91  // Signals
92 
93  virtual void MarkerColorChanged ( Color_t c ); // *SIGNAL*
94  virtual void MarkerStyleChanged ( Style_t s ); // *SIGNAL*
95  virtual void MarkerSizeChanged ( Size_t s ); // *SIGNAL*
96 
97  //------------------------------------------------------------
98  // Slots
99  virtual void MarkerSizeEntryChanged ( const char * str );
100 
101  //------------------------------------------------------------
102  /*! For ROOT dictionary.*/
104 };
105 
106 //----------------------------------------------------------------------
107 // Inline functions
109 
110 //======================================================================
111 #endif
112 
Pixel_t GetMarkerColorPixel() const
Definition: RGMarkerAttrSelect.icc:29
Size_t GetMarkerSize() const
Definition: RGMarkerAttrSelect.icc:37
ClassDef(RGMarkerAttrSelect, 0)
virtual ~RGMarkerAttrSelect()
Definition: RGMarkerAttrSelect.cpp:110
virtual void MarkerStyleChanged(Style_t s)
Definition: RGMarkerAttrSelect.icc:56
virtual void MapSubwindows()
Definition: RGMarkerAttrSelect.cpp:116
RGMarkerAttrSelectOptions
! RGMarkerAttrSelect widget options
Definition: RGMarkerAttrSelect.hh:21
TGNumberEntry * GetSizeWidget() const
Definition: RGMarkerAttrSelect.icc:19
Definition: RGMarkerAttrSelect.hh:41
TGedMarkerSelect * w_style
Marker style widget pointer.
Definition: RGMarkerAttrSelect.hh:51
Definition: RGColorNumberSelect.hh:27
TAttMarker GetMarkerAttr() const
Definition: RGMarkerAttrSelect.icc:41
RGColorNumberSelect * GetColorWidget() const
Definition: RGMarkerAttrSelect.icc:11
void SetMarkerColor(const Color_t c, const Bool_t emit=kTRUE)
Definition: RGMarkerAttrSelect.cpp:149
virtual void SetState(const Bool_t b=kTRUE)
Definition: RGMarkerAttrSelect.cpp:131
Color_t GetMarkerColor() const
Definition: RGMarkerAttrSelect.icc:25
TGNumberEntry * w_size
Marker size widget pointer.
Definition: RGMarkerAttrSelect.hh:52
RGColorNumberSelect * w_color
Marker color widget pointer.
Definition: RGMarkerAttrSelect.hh:50
RGMarkerAttrSelect(TGWindow *p, TAttMarker att=TAttMarker(1, 20, 1.), UInt_t opt=rgMASVerticalLayout, Int_t wc=3, Int_t ws=4, Int_t sep=4)
Definition: RGMarkerAttrSelect.cpp:23
virtual void MarkerSizeEntryChanged(const char *str)
Definition: RGMarkerAttrSelect.cpp:194
Style_t GetMarkerStyle() const
Definition: RGMarkerAttrSelect.icc:33
void SetMarkerStyle(const Style_t s, const Bool_t emit=kTRUE)
Definition: RGMarkerAttrSelect.cpp:169
TGedMarkerSelect * GetStyleWidget() const
Definition: RGMarkerAttrSelect.icc:15
void SetMarkerColorPixel(const Pixel_t c, const Bool_t emit=kTRUE)
Definition: RGMarkerAttrSelect.cpp:159
GObject(RGMarkerAttrSelect)
void SetMarkerSize(const Size_t s, const Bool_t emit=kTRUE)
Definition: RGMarkerAttrSelect.cpp:181
virtual void MarkerSizeChanged(Size_t s)
Definition: RGMarkerAttrSelect.icc:62
virtual void MarkerColorChanged(Color_t c)
Definition: RGMarkerAttrSelect.icc:50