53 #include "RConfigure.h" 132 for (
Int_t i = 0; i < 16; i++)
309 if (f && f !=
this) {
546 y = fBorderWidth + 1;
547 h =
fHeight - fBorderWidth - 1;
557 x =
fWidth - 6 - fBorderWidth - 2;
578 y = fBorderWidth + 1;
579 h =
fHeight - fBorderWidth - 1;
587 x =
fWidth - 6 - fBorderWidth - 2;
608 points[1].
fX = x + 6;
610 points[2].
fX = x + 3;
611 points[2].
fY = y + 3;
615 points[1].
fX = x + 5;
617 points[2].
fX = x + 2;
618 points[2].
fY = y + 3;
658 gClient->GetColorByName(colorname, color);
660 out << std::endl <<
" // color select widget" << std::endl;
661 out <<
" ULong_t " << cvar.
Data() <<
";" << std::endl;
662 out <<
" gClient->GetColorByName(" << quote << colorname << quote
663 <<
", " << cvar.
Data() <<
");" << std::endl;
665 out <<
" TGColorSelect *";
667 <<
", " << cvar.
Data() <<
", " <<
WidgetId() <<
");" << std::endl;
670 if (option && strstr(option,
"keep_names"))
671 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
674 out <<
" " <<
GetName() <<
"->Disable();" << std::endl;
void SetAlphaColor(ULong_t color, Bool_t emit=kTRUE)
Set color.
void SetActive(Int_t newat)
Set active color frame.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Cursor_t GetGrabCursor() const
void SetActive(Bool_t in)
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual Bool_t HandleButton(Event_t *event)
Handle button events in TGColorFrame.
void SetForeground(Pixel_t v)
Set foreground color.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
void SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
const TGResourcePool * GetResourcePool() const
virtual void AlphaColorSelected(ULong_t colptr=0)
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual UInt_t GetDefaultHeight() const
TGColorPopup * fColorPopup
void Disable()
Set state of widget as disabled.
virtual void Layout()
Layout the elements of the composite frame.
const TGGC * GetFrameGC() const
virtual void DrawBorder()
Draw TGColorFrame border.
static const char * PixelAsHexString(ULong_t pixel)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
const Mask_t kPointerMotionMask
virtual void DoRedraw()
Redraw the frame.
virtual ~TG16ColorSelector()
TG16ColorSelector destructor.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a color select widget as a C++ statement(s) on output stream out.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
TGColorSelect(const TGColorSelect &)
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual Bool_t HandleButton(Event_t *event)
Handle button events for TGColorSelect.
TG16ColorSelector(const TG16ColorSelector &)
const Mask_t kButtonPressMask
const TGWindow * fMsgWindow
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
virtual UInt_t GetDefaultWidth() const
Bool_t IsEditable() const
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
ULong_t GetPixel() const
Return pixel value corresponding to this color.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for TGColorSelect.
static const TGGC & GetBlackGC()
Get black graphics context.
TGColorFrame(const TGColorFrame &)
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
virtual UInt_t GetDefaultHeight() const
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
const Mask_t kWAOverrideRedirect
virtual Bool_t HandleButton(Event_t *)
The color creation and management class.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void UnmapWindow()
void DrawTriangle(GContext_t gc, Int_t x, Int_t y)
Draw triangle (arrow) on which user can click to open TGColorPopup.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for TG16ColorSelector.
virtual void ColorSelected(Pixel_t color=0)
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual ~TGColorSelect()
TGColorSelect destructor.
void Enable(Bool_t on=kTRUE)
Set state of widget as enabled.
virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw 3D rectangle on the frame border.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void DeleteWindow()
Delete window.
virtual void DoRedraw()
Redraw TGColorSelect widget.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
static const TGGC & GetBckgndGC()
Get background color graphics context.
const TGWindow * fMsgWindow
const char * Data() const