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

#include <RGColorNumberSelect.hh>

Inheritance diagram for RGColorNumberSelect:

Public Member Functions

 RGColorNumberSelect (TGWindow *p, Color_t c=1, Int_t w=3, Int_t sep=4)
 
virtual ~RGColorNumberSelect ()
 
virtual void SetState (const Bool_t b=kTRUE)
 
Color_t GetColorNumber () const
 
Pixel_t GetColorPixel () const
 
void SetColorNumber (const Color_t c, const Bool_t emit=kTRUE)
 
void SetColorPixel (const Pixel_t c, const Bool_t emit=kTRUE)
 
TGNumberEntry * GetColorNumberWidget () const
 
TGColorSelect * GetColorSelectWidget () const
 
virtual void ColorChanged (Color_t c)
 
void ColorNumberEntryChanged (const char *str)
 
void ColorPixelSelected (ULong_t pixel)
 
 ClassDef (RGColorNumberSelect, 0)
 

Protected Attributes

Color_t color
 Color number.
 
TGNumberEntry * w_number_entry
 Pointer to color number entry field.
 
TGColorSelect * w_color_select
 Pointer to color selection widget.
 

Private Member Functions

 GObject (RGColorNumberSelect)
 
 RGColorNumberSelect (const RGColorNumberSelect &original)
 

Detailed Description

Widget for color selection, from color number or from a selection widget (TGColorSelect).

RGColorNumberSelect.gif

Constructor & Destructor Documentation

RGColorNumberSelect::RGColorNumberSelect ( TGWindow *  p,
Color_t  c = 1,
Int_t  w = 3,
Int_t  sep = 4 
)

Constructor.

Parameters
pparent widget
cinitial color number
wnumerical field width (number of digits)
sepseparation between numerical field and selector

References color, w_color_select, and w_number_entry.

RGColorNumberSelect::RGColorNumberSelect ( const RGColorNumberSelect original)
private

Copy constructor, not implemented.

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

Destructor.

Member Function Documentation

RGColorNumberSelect::GObject ( RGColorNumberSelect  )
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 RGColorNumberSelect::SetState ( const Bool_t  b = kTRUE)
virtual

Set the widget state (active/inactive)

Parameters
bstate

References w_color_select, and w_number_entry.

Referenced by RGFillAttrSelect::SetState(), RGMarkerAttrSelect::SetState(), and RGLineAttrSelect::SetState().

Color_t RGColorNumberSelect::GetColorNumber ( ) const
inline
Pixel_t RGColorNumberSelect::GetColorPixel ( ) const
inline

Return selected color code.

References color.

void RGColorNumberSelect::SetColorNumber ( const Color_t  c,
const Bool_t  emit = kTRUE 
)

Select a new color from its color number.

Parameters
ccolor number
emitflag if signal must be emitted

References color, ColorChanged(), w_color_select, and w_number_entry.

Referenced by RGFillAttrSelect::SetFillColor(), RGLineAttrSelect::SetLineColor(), and RGMarkerAttrSelect::SetMarkerColor().

void RGColorNumberSelect::SetColorPixel ( const Pixel_t  c,
const Bool_t  emit = kTRUE 
)

Select a new color from its color code.

Parameters
ccolor code
emitflag if signal must be emitted

References color, ColorChanged(), w_color_select, and w_number_entry.

Referenced by RGFillAttrSelect::SetFillColorPixel(), RGLineAttrSelect::SetLineColorPixel(), and RGMarkerAttrSelect::SetMarkerColorPixel().

TGNumberEntry * RGColorNumberSelect::GetColorNumberWidget ( ) const
inline

Get the pointer to number entry field widget.

References w_number_entry.

TGColorSelect * RGColorNumberSelect::GetColorSelectWidget ( ) const
inline

Get the pointer to color selection widget.

References w_color_select.

void RGColorNumberSelect::ColorChanged ( Color_t  c)
inlinevirtual

Signal sent when a color is selected.

Parameters
cselected color

Referenced by ColorNumberEntryChanged(), ColorPixelSelected(), SetColorNumber(), and SetColorPixel().

void RGColorNumberSelect::ColorNumberEntryChanged ( const char *  str)

Slot called when color number is changed.

References color, ColorChanged(), w_color_select, and w_number_entry.

void RGColorNumberSelect::ColorPixelSelected ( ULong_t  pixel)

Slot called when color selection is changed.

References color, ColorChanged(), and w_number_entry.

RGColorNumberSelect::ClassDef ( RGColorNumberSelect  ,
 
)

For ROOT dictionary.


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