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

FXColorWell Class Reference

#include <FXColorWell.h>

Inheritance diagram for FXColorWell:

FXFrame FXWindow FXDrawable FXId FXObject List of all members.

Public Types

enum  {
  ID_COLORDIALOG = FXFrame::ID_LAST,
  ID_LAST
}

Public Methods

 FXColorWell (FXComposite *p, FXColor clr=0, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=COLORWELL_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 well with initial color clr.

virtual void create ()
 Create server-side resources.

virtual void detach ()
 Detach server-side resources.

virtual FXint getDefaultWidth ()
 Return default width.

virtual FXint getDefaultHeight ()
 Return default height.

virtual FXbool canFocus () const
 Returns true because a color well can receive focus.

virtual void setFocus ()
 Move the focus to this window.

virtual void killFocus ()
 Remove the focus from this window.

void setRGBA (FXColor clr)
 Set color.

FXColor getRGBA () const
 Get color.

void setHelpText (const FXString &text)
 Set status line help text for this color well.

void setTipText (const FXString &text)
 Set tool tip message for this color well.

FXbool isOpaqueOnly () const
 Return true if only opaque colors allowed.

void setOpaqueOnly (FXbool opaque)
 Change opaque only mode.

virtual void save (FXStream &store) const
 Save color well to a stream.

virtual void load (FXStream &store)
 Load color well from a stream.

virtual ~FXColorWell ()
 Destructor.


Public Attributes

FXString getHelpText () const
 Get status line help text for this color well.

FXString getTipText () const
 Get tool tip message for this color well.


Detailed Description

A color well is a widget which controls color settings. Colors may be dragged and dropped from one color well to another. A double-click inside a color well will bring up the standard color dialog panel to edit the color well's color. Colors may be also pasted by name using middle-mouse click into/out of color wells from/to other selection-capable applications; for example, you can highlight the word `red' and paste it into a color well. While the color value is being changed, the color well sends a SEL_CHANGED to its target; at the end of the change, it sends a SEL_COMMAND. The message data represents the current color value, of the type FXColor.