JG ROOT Tools libraries  version 5.0 - august 2014
RGLineAttrSelect Class Reference

#include <RGLineAttrSelect.hh>

Inheritance diagram for RGLineAttrSelect:

Public Member Functions

 RGLineAttrSelect (TGWindow *p, TAttLine att=TAttLine(1, 1, 1), UInt_t opt=rgLASVerticalLayout, Int_t w=3, Int_t sep=4)
 
virtual ~RGLineAttrSelect ()
 
virtual void MapSubwindows ()
 
virtual void SetState (const Bool_t b=kTRUE)
 
Color_t GetLineColor () const
 
Pixel_t GetLineColorPixel () const
 
Width_t GetLineWidth () const
 
Style_t GetLineStyle () const
 
TAttLine GetLineAttr () const
 
void SetLineColor (const Color_t c, const Bool_t emit=kTRUE)
 
void SetLineColorPixel (const Pixel_t c, const Bool_t emit=kTRUE)
 
void SetLineWidth (const Width_t w, const Bool_t emit=kTRUE)
 
void SetLineStyle (const Style_t s, const Bool_t emit=kTRUE)
 
RGColorNumberSelectGetColorWidget () const
 
TGLineWidthComboBox * GetWidthWidget () const
 
TGLineStyleComboBox * GetStyleWidget () const
 
virtual void LineColorChanged (Color_t c)
 
virtual void LineWidthChanged (Width_t w)
 
virtual void LineStyleChanged (Style_t s)
 
 ClassDef (RGLineAttrSelect, 0)
 

Protected Attributes

Int_t min_width
 Minimum width.
 
RGColorNumberSelectw_color
 Line color widget pointer.
 
TGLineWidthComboBox * w_width
 Line width widget pointer.
 
TGLineStyleComboBox * w_style
 Line style widget pointer.
 

Private Member Functions

 GObject (RGLineAttrSelect)
 
 RGLineAttrSelect (const RGLineAttrSelect &original)
 

Detailed Description

class RGLineAttrSelect

Widget for line attributes selection: color, width and style.

RGLineAttrSelect_h.gif
RGLineAttrSelect_v.gif

Options:

  • rgLASVerticalLayout: vertical layout
  • rgLASHorizontalLayout: horizontal layout
  • rgLASExpandColorNumber: for horizontal layout the color number expands (default is style)

Constructor & Destructor Documentation

RGLineAttrSelect::RGLineAttrSelect ( TGWindow *  p,
TAttLine  att = TAttLine(1,1,1),
UInt_t  opt = rgLASVerticalLayout,
Int_t  w = 3,
Int_t  sep = 4 
)

Constructor.

Parameters
pparent widget
attinitial attributes
optoptions
wcolor numerical field width (number of digits)
sepsub-widgets separation width

References w_color, w_style, and w_width.

RGLineAttrSelect::RGLineAttrSelect ( const RGLineAttrSelect original)
private

Copy constructor, not implemented.

Parameters
originalobject to copy
RGLineAttrSelect::~RGLineAttrSelect ( )
virtual

Destructor.

Member Function Documentation

RGLineAttrSelect::GObject ( RGLineAttrSelect  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
void RGLineAttrSelect::MapSubwindows ( )
virtual

Overload of TGFrame function to set a minimum size to widget elements.

References w_color, w_style, and w_width.

void RGLineAttrSelect::SetState ( const Bool_t  b = kTRUE)
virtual

Set the widget state (active/inactive)

Parameters
bstate

References RGColorNumberSelect::SetState(), w_color, w_style, and w_width.

Referenced by RGHistoPlotAttrSelect::SetState().

Color_t RGLineAttrSelect::GetLineColor ( ) const
inline

Get selected line color number.

References RGColorNumberSelect::GetColorNumber(), and w_color.

Referenced by GetLineAttr(), and GetLineColorPixel().

Pixel_t RGLineAttrSelect::GetLineColorPixel ( ) const
inline

Get selected line color code.

References GetLineColor().

Width_t RGLineAttrSelect::GetLineWidth ( ) const
inline

Get selected line width.

References w_width.

Referenced by GetLineAttr().

Style_t RGLineAttrSelect::GetLineStyle ( ) const
inline

Get selected line style.

References w_style.

Referenced by GetLineAttr().

TAttLine RGLineAttrSelect::GetLineAttr ( ) const
inline

Get selected line attributes.

References GetLineColor(), GetLineStyle(), and GetLineWidth().

Referenced by RGHistoPlotAttrSelect::GetLineAttr().

void RGLineAttrSelect::SetLineColor ( const Color_t  c,
const Bool_t  emit = kTRUE 
)

Select a new line color from its color number.

Parameters
ccolor number
emitflag if signal must be emitted

References RGColorNumberSelect::SetColorNumber(), and w_color.

Referenced by RGHistoPlotAttrSelect::SetLineAttr().

void RGLineAttrSelect::SetLineColorPixel ( const Pixel_t  c,
const Bool_t  emit = kTRUE 
)

Select a new line color from its color code.

Parameters
ccolor code
emitflag if signal must be emitted

References RGColorNumberSelect::SetColorPixel(), and w_color.

void RGLineAttrSelect::SetLineWidth ( const Width_t  w,
const Bool_t  emit = kTRUE 
)

Select a new line width.

Parameters
wline width
emitflag if signal must be emitted

References w_width.

Referenced by RGHistoPlotAttrSelect::SetLineAttr().

void RGLineAttrSelect::SetLineStyle ( const Style_t  s,
const Bool_t  emit = kTRUE 
)

Select a new line style from its number.

Parameters
sline number
emitflag if signal must be emitted

References w_style.

Referenced by RGHistoPlotAttrSelect::SetLineAttr().

RGColorNumberSelect * RGLineAttrSelect::GetColorWidget ( ) const
inline

Get line color selection widget pointer.

References w_color.

TGLineWidthComboBox * RGLineAttrSelect::GetWidthWidget ( ) const
inline

Get line width selection widget pointer.

References w_width.

TGLineStyleComboBox * RGLineAttrSelect::GetStyleWidget ( ) const
inline

Get line style selection widget pointer.

References w_style.

void RGLineAttrSelect::LineColorChanged ( Color_t  c)
inlinevirtual

Signal sent when line color is changed.

Parameters
ccolor number
void RGLineAttrSelect::LineWidthChanged ( Width_t  w)
inlinevirtual

Signal sent when line width is changed.

Parameters
wline width
void RGLineAttrSelect::LineStyleChanged ( Style_t  s)
inlinevirtual

Signal sent when line style is changed.

Parameters
sstyle number
RGLineAttrSelect::ClassDef ( RGLineAttrSelect  ,
 
)

For ROOT dictionary.


The documentation for this class was generated from the following files: