13 #ifndef ROOT_TGColorDialog
14 #define ROOT_TGColorDialog
89 {
return TGDimension((fCw + 5) * fCols, (fCh + 5) * fRows); }
TColorWheel * fColorWheel
TGColorPalette * GetCustomPalette() const
void SetSliderColor()
Set slider colors.
Pixel_t GetCurrentColor() const
Return currently selected color value.
void SetColor(Pixel_t color)
Position the slider cursor on right color position.
virtual void ColorSelected(Pixel_t col=0)
virtual Bool_t HandleButton(Event_t *event)
Handle button events in color palette.
TGColorPalette * fCpalette
void SetLcursor(Int_t z)
Set lightness slider cursor position.
TRootEmbeddedCanvas * fEcanvas
void CreateDitheredImage(Pixmap_t image, Int_t which)
Create a dithered version of the color map and lightness images for display modes with reduced number...
void UpdateHLSentries(Pixel_t *c)
Update HLS text entries with HLS values of color c.
virtual ~TGColorDialog()
TGColorDialog destructor.
virtual ~TGColorPalette()
Destructor.
TGColorPalette * GetPalette() const
void UpdateCurrentColor()
Assign the current cursor position as currently selected color.
TGColorDialog(const TGColorDialog &)
virtual void ColorSelected(Pixel_t col=0)
virtual void LostFocus()
Remove keyboard input.
#define ClassDef(name, id)
TGColorPalette * fPalette
virtual void SetCurrentColor(Pixel_t col)
Change current color.
void AllocColors()
Try to allocate first a palette of 64 colors.
void UpdateRGBentries(Pixel_t *c)
Update RGB text entries with RGB values of color c.
void DrawFocusHilite(Int_t onoff)
Draw a highlight rectangle around cell obtaining focus.
void Emit(const char *signal)
Acitvate signal without args.
void InitImages()
Initialize color palette and slider images.
void SetHScursor(Int_t x, Int_t y)
Set hue / saturation cursor position.
virtual void CloseWindow()
Called when window is closed via window manager.
void SetColor(Int_t ix, Pixel_t color)
Set color at index ix of color entries.
void FreeColors()
Free allocated colors.
TGColorPalette(const TGColorPalette &)
void DrawLcursor(Int_t onoff)
Draw lightness slider cursor.
void CreateImages()
Create colormap and color slider images.
void DrawHScursor(Int_t onoff)
Draw hue / saturation cursor.
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events in color palette.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in color pick widget.
virtual void GotFocus()
Add keyboard input.
void SetColors(Pixel_t colors[])
Set color entries in color samples.
The color creation and management class.
virtual void DoRedraw()
Redraw color palette.
Rectangle_t fColormapRect
Pixel_t GetCurrentColor() const
Mother of all ROOT objects.
virtual void AlphaColorSelected(ULong_t)
Emit signal about selected alpha and color.
void DoPreview()
Slot method called when Preview button is clicked.
TGColorPick(const TGWindow *p=0, Int_t w=1, Int_t h=1, Int_t id=-1)
TGColorPick constructor.
Pixel_t GetColorByIndex(Int_t ix) const
void SetCurrentCellColor(Pixel_t color)
Set current cell color.
TGColorDialog & operator=(const TGColorDialog &)
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
void SetCellSize(Int_t w=20, Int_t h=17)
Set color cell size.
virtual void DoRedraw()
Redraw the color pick widget.
void SetColorInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
Set the color info in RGB and HLS parts.
TGColorPalette & operator=(const TGColorPalette &)
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events in color pick widget.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events in color palette.
virtual ~TGColorPick()
TGColorPick destructor.
Draw the ROOT Color Wheel.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for the color selection dialog.
virtual void ColorSelected(Pixel_t)
Emit signal about selected color.
void UpdateAlpha(Pixel_t *c)
Upadate Opacity text entry with alpha value of color c.
const char Int_t const char * image