library: libGui
#include "TGColorDialog.h"

TGColorPalette


class description - header file - source file - inheritance tree (.pdf)

class TGColorPalette : public TGFrame, public TGWidget

Inheritance Chart:
TObject
<-
TGObject
<-
TGWindow
TQObject
<-
TGFrame
TGWidget
<-
TGColorPalette

    protected:
virtual void DoRedraw() void DrawFocusHilite(Int_t onoff) virtual void GotFocus() virtual void LostFocus() public:
TGColorPalette(const TGWindow* p = 0, Int_t cols = 8, Int_t rows = 8, Int_t id = -1) TGColorPalette(const TGColorPalette&) virtual ~TGColorPalette() static TClass* Class() virtual void ColorSelected(Pixel_t col = 0) Pixel_t GetColorByIndex(Int_t ix) const Pixel_t GetCurrentColor() const virtual TGDimension GetDefaultSize() const virtual Bool_t HandleButton(Event_t* event) virtual Bool_t HandleKey(Event_t* event) virtual Bool_t HandleMotion(Event_t* event) virtual TClass* IsA() const void SetCellSize(Int_t w = 20, Int_t h = 17) void SetColor(Int_t ix, Pixel_t color) void SetColors(Pixel_t* colors) void SetCurrentCellColor(Pixel_t color) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Int_t fCx x coordinate of currently selected color cell Int_t fCy y coordinate of currently selected color cell UInt_t fCw color cell width UInt_t fCh color cell height Int_t fRows number of color cell rows Int_t fCols number of color cell columns Pixel_t* fPixels pixel value of colors TGGC fDrawGC graphics context used for drawing

Class Description

                                                                      
 TGColorPalette, TGColorPick and TGColorDialog.                       
                                                                      
 The TGColorPalette is a widget showing an matrix of color cells. The 
 colors can be set and selected.                                      
                                                                      
 The TGColorPick is a widget which allows a color to be picked from   
 HLS space. It consists of two elements: a color map window from      
 where the user can select the hue and saturation level of a color,   
 and a slider to select color's lightness.                            
                                                                      
 Selecting a color in these two widgets will generate the event:      
 kC_COLORSEL, kCOL_CLICK, widget id, 0.                               
 and the signal:                                                      
 ColorSelected(Pixel_t color)                                         
                                                                      
 The TGColorDialog presents a full featured color selection dialog.   
 It uses 2 TGColorPalette's and the TGColorPick widgets.              
                                                                      

TGColorPalette(const TGWindow *p, Int_t cols, Int_t rows, Int_t id)
 TGColorPalette widget: this is just a grid of color cells of the
 specified size. Colors can be selected by clicking on them or by
 using the arrow keys.
~TGColorPalette()
 Destructor.
Bool_t HandleButton(Event_t *event)
 Handle button events in color palette
Bool_t HandleMotion(Event_t *event)
 Handle mouse motion events in color palette.
Bool_t HandleKey(Event_t *event)
 Handle keyboard events in color palette.
void SetColors(ULong_t colors[])
 Set color entries in color samples.
void SetColor(Int_t ix, ULong_t color)
 Set color at index ix of color entries.
void SetCurrentCellColor(ULong_t color)
 Set current cell color.
void SetCellSize(Int_t w, Int_t h)
 Set color cell size.
ULong_t GetCurrentColor()
 Return currently selected color value.
void DoRedraw()
 Redraw color palette.
void GotFocus()
 Add keyboard input.
void LostFocus()
 Remove keyboard input.
void DrawFocusHilite(Int_t onoff)
 Draw a highlight rectangle around cell obtaining focus.
TGColorPalette(const TGWindow *p = 0, Int_t cols = 8, Int_t rows = 8, Int_t id = -1)
TGDimension GetDefaultSize()
Pixel_t GetColorByIndex(Int_t ix)
void ColorSelected(Pixel_t col = 0)

Author: Bertrand Bellenot + Fons Rademakers 22/08/02
Last update: root/gui:$Name: $:$Id: TGColorDialog.cxx,v 1.23 2006/07/11 09:05:01 rdm Exp $
Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.