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