Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXColorRing Class Reference

A Color Ring widget provides an intuitive way to specify a color. More...

#include <FXColorRing.h>

Inheritance diagram for FX::FXColorRing:
FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject

List of all members.

Public Member Functions

long onPaint (FXObject *, FXSelector, void *)
long onLeftBtnPress (FXObject *, FXSelector, void *)
long onLeftBtnRelease (FXObject *, FXSelector, void *)
long onMotion (FXObject *, FXSelector, void *)
long onMouseWheel (FXObject *, FXSelector, void *)
long onCmdSetHelp (FXObject *, FXSelector, void *)
long onCmdGetHelp (FXObject *, FXSelector, void *)
long onCmdSetTip (FXObject *, FXSelector, void *)
long onCmdGetTip (FXObject *, FXSelector, void *)
long onQueryHelp (FXObject *, FXSelector, void *)
long onQueryTip (FXObject *, FXSelector, void *)
 FXColorRing (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=FRAME_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
 Construct color ring with initial color clr.
virtual void create ()
 Create server-side resources.
virtual void detach ()
 Detach server-side resources.
virtual void layout ()
 Perform layout.
virtual FXint getDefaultWidth ()
 Return default width.
virtual FXint getDefaultHeight ()
 Return default height.
void setHue (FXfloat h)
 Change hue.
FXfloat getHue () const
 Return hue.
void setSat (FXfloat s)
 Change saturation.
FXfloat getSat () const
 Return saturation.
void setVal (FXfloat v)
 Change value.
FXfloat getVal () const
 Return value.
void setHueSatVal (FXfloat h, FXfloat s, FXfloat v)
 Set hue, saturation, value.
void setRingWidth (FXint rw)
 Change width of hue ring.
FXint getRingWidth () const
 Return width of hue ring.
void setHelpText (const FXString &text)
 Set status line help text for this color well.
const FXStringgetHelpText () const
 Get status line help text for this color well.
void setTipText (const FXString &text)
 Set tool tip message for this color well.
const FXStringgetTipText () const
 Get tool tip message for this color well.
virtual void save (FXStream &store) const
 Save color well to a stream.
virtual void load (FXStream &store)
 Load color well from a stream.
virtual ~FXColorRing ()
 Destructor.

Protected Types

enum  { MOUSE_NONE, MOUSE_HUE, MOUSE_SATVAL }

Protected Member Functions

void updatering ()
FXfloat hueFromXY (FXint x, FXint y) const
void hueToXY (FXint &x, FXint &y, FXfloat hue) const
void satValToXY (FXint &x, FXint &y, FXfloat s, FXfloat v) const
void satValFromXY (FXfloat &s, FXfloat &v, FXint x, FXint y) const
FXbool inCorner (FXint x, FXint y) const
FXbool inHueRing (FXint x, FXint y) const
FXbool inTriangle (FXint x, FXint y) const

Protected Attributes

FXImagedial
FXfloat hsv [3]
FXint ringwidth
FXint ringouter
FXint ringinner
FXint dialx
FXint dialy
FXint satvalx
FXint satvaly
FXint huex
FXint huey
FXint clrx
FXint clry
FXint blkx
FXint blky
FXint whtx
FXint whty
FXString tip
FXString help
FXuchar mode

Detailed Description

A Color Ring widget provides an intuitive way to specify a color.

The outer ring of the widget is rotated to control the hue of the color being specified, while the inner triangle varies the color saturation and the brightness of the color. The color saturation axis of the triangle goes from a fully saturated "pure" color to "pastel" color; the brightness goes from black to a bright color.


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

Copyright © 1997-2011 Jeroen van der Zijp