LLColorSwatchCtrl Class Reference

#include <llcolorswatch.h>

Inheritance diagram for LLColorSwatchCtrl:

Inheritance graph
[legend]
Collaboration diagram for LLColorSwatchCtrl:

Collaboration graph
[legend]

List of all members.

Public Types

enum  e_color_pick_op { COLOR_CHANGE, COLOR_SELECT, COLOR_CANCEL }
typedef enum
LLColorSwatchCtrl::e_color_pick_op 
EColorPickOp

Public Member Functions

 LLColorSwatchCtrl (const std::string &name, const LLRect &rect, const LLColor4 &color, void(*on_commit_callback)(LLUICtrl *ctrl, void *userdata), void *callback_userdata)
 LLColorSwatchCtrl (const std::string &name, const LLRect &rect, const std::string &label, const LLColor4 &color, void(*on_commit_callback)(LLUICtrl *ctrl, void *userdata), void *callback_userdata)
 ~LLColorSwatchCtrl ()
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
const LLColor4get ()
void set (const LLColor4 &color, BOOL update_picker=FALSE, BOOL from_event=FALSE)
void setOriginal (const LLColor4 &color)
void setValid (BOOL valid)
void setLabel (const std::string &label)
void setCanApplyImmediately (BOOL apply)
void setOnCancelCallback (LLUICtrlCallback cb)
void setOnSelectCallback (LLUICtrlCallback cb)
void showPicker (BOOL take_focus)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleDoubleClick (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual BOOL handleUnicodeCharHere (llwchar uni_char)
virtual void draw ()
virtual void setEnabled (BOOL enabled)
virtual LLXMLNodePtr getXML (bool save_children=true) const

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
static void onColorChanged (void *data, EColorPickOp pick_op=COLOR_CHANGE)

Protected Attributes

BOOL mValid
LLColor4 mColor
LLColor4 mBorderColor
LLTextBoxmCaption
LLHandle< LLFloatermPickerHandle
LLViewBordermBorder
BOOL mCanApplyImmediately
LLUICtrlCallback mOnCancelCallback
LLUICtrlCallback mOnSelectCallback
LLPointer< LLUIImagemAlphaGradientImage


Detailed Description

Definition at line 48 of file llcolorswatch.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
COLOR_CHANGE 
COLOR_SELECT 
COLOR_CANCEL 

Definition at line 52 of file llcolorswatch.h.


Constructor & Destructor Documentation

LLColorSwatchCtrl::LLColorSwatchCtrl ( const std::string &  name,
const LLRect rect,
const LLColor4 color,
void(*)(LLUICtrl *ctrl, void *userdata)  on_commit_callback,
void *  callback_userdata 
)

Definition at line 55 of file llcolorswatch.cpp.

References LLView::addChild(), LLViewBorder::BEVEL_IN, BTN_HEIGHT_SMALL, FOLLOWS_BOTTOM, FOLLOWS_LEFT, FOLLOWS_RIGHT, LLView::getRect(), LLUI::getUIImage(), mAlphaGradientImage, mBorder, LLRectBase< Type >::mBottom, mCaption, LLView::setFollows(), and LLFontGL::sSansSerifSmall.

Referenced by fromXML().

Here is the call graph for this function:

Here is the caller graph for this function:

LLColorSwatchCtrl::LLColorSwatchCtrl ( const std::string &  name,
const LLRect rect,
const std::string &  label,
const LLColor4 color,
void(*)(LLUICtrl *ctrl, void *userdata)  on_commit_callback,
void *  callback_userdata 
)

LLColorSwatchCtrl::~LLColorSwatchCtrl (  ) 

Definition at line 109 of file llcolorswatch.cpp.

References LLFloaterColorPicker::cancelSelection(), LLFloater::close(), LLHandle< T >::get(), mAlphaGradientImage, mPickerHandle, and NULL.

Here is the call graph for this function:


Member Function Documentation

void LLColorSwatchCtrl::setValue ( const LLSD value  )  [virtual]

Reimplemented from LLView.

Definition at line 260 of file llcolorswatch.cpp.

References TRUE.

virtual LLSD LLColorSwatchCtrl::getValue (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 70 of file llcolorswatch.h.

References LLColor4::getValue(), and mColor.

Here is the call graph for this function:

const LLColor4& LLColorSwatchCtrl::get (  )  [inline]

void LLColorSwatchCtrl::set ( const LLColor4 color,
BOOL  update_picker = FALSE,
BOOL  from_event = FALSE 
)

void LLColorSwatchCtrl::setOriginal ( const LLColor4 color  ) 

Definition at line 142 of file llcolorswatch.cpp.

References LLHandle< T >::get(), mColor, mPickerHandle, LLColor4::mV, LLFloaterColorPicker::setOrigRgb(), VBLUE, VGREEN, and VRED.

Referenced by LLPanelFace::getState().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLColorSwatchCtrl::setValid ( BOOL  valid  ) 

Definition at line 300 of file llcolorswatch.cpp.

References LLHandle< T >::get(), mPickerHandle, mValid, and LLFloaterColorPicker::setActive().

Referenced by LLPanelVolume::clearCtrls(), LLPanelVolume::getState(), and LLPanelFace::getState().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLColorSwatchCtrl::setLabel ( const std::string &  label  ) 

Definition at line 166 of file llcolorswatch.cpp.

References mCaption, and LLTextBox::setText().

Here is the call graph for this function:

void LLColorSwatchCtrl::setCanApplyImmediately ( BOOL  apply  )  [inline]

Definition at line 77 of file llcolorswatch.h.

References mCanApplyImmediately.

Referenced by fromXML(), LLPanelFace::getState(), and LLPanelFace::postBuild().

Here is the caller graph for this function:

void LLColorSwatchCtrl::setOnCancelCallback ( LLUICtrlCallback  cb  )  [inline]

Definition at line 78 of file llcolorswatch.h.

References mOnCancelCallback.

Referenced by LLPanelVolume::postBuild(), and LLPanelFace::postBuild().

Here is the caller graph for this function:

void LLColorSwatchCtrl::setOnSelectCallback ( LLUICtrlCallback  cb  )  [inline]

Definition at line 79 of file llcolorswatch.h.

References mOnSelectCallback.

Referenced by LLPanelVolume::postBuild(), and LLPanelFace::postBuild().

Here is the caller graph for this function:

void LLColorSwatchCtrl::showPicker ( BOOL  take_focus  ) 

BOOL LLColorSwatchCtrl::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 171 of file llcolorswatch.cpp.

References gViewerWindow, LLViewerWindow::setMouseCapture(), and TRUE.

Referenced by handleDoubleClick().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLColorSwatchCtrl::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 181 of file llcolorswatch.cpp.

References FALSE, LLView::getEnabled(), LLView::getVisible(), gViewerWindow, LLView::hasMouseCapture(), llassert, NULL, LLView::pointInView(), LLViewerWindow::setMouseCapture(), showPicker(), and TRUE.

Here is the call graph for this function:

BOOL LLColorSwatchCtrl::handleDoubleClick ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 121 of file llcolorswatch.cpp.

References handleMouseDown().

Here is the call graph for this function:

BOOL LLColorSwatchCtrl::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 126 of file llcolorswatch.cpp.

References LLView::getWindow(), LLWindow::setCursor(), TRUE, and UI_CURSOR_HAND.

Here is the call graph for this function:

BOOL LLColorSwatchCtrl::handleUnicodeCharHere ( llwchar  uni_char  )  [virtual]

Reimplemented from LLView.

Definition at line 132 of file llcolorswatch.cpp.

References LLView::handleUnicodeCharHere(), showPicker(), and TRUE.

Here is the call graph for this function:

void LLColorSwatchCtrl::draw ( void   )  [virtual]

void LLColorSwatchCtrl::setEnabled ( BOOL  enabled  )  [virtual]

Reimplemented from LLView.

Definition at line 243 of file llcolorswatch.cpp.

References LLFloaterColorPicker::cancelSelection(), LLFloater::close(), LLHandle< T >::get(), mCaption, mPickerHandle, and LLView::setEnabled().

Referenced by LLPanelVolume::clearCtrls(), LLPanelVolume::getState(), and LLPanelFace::getState().

Here is the call graph for this function:

Here is the caller graph for this function:

LLXMLNodePtr LLColorSwatchCtrl::getXML ( bool  save_children = true  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 334 of file llcolorswatch.cpp.

References LLTextBox::getText(), LLUICtrl::getXML(), mBorderColor, mCanApplyImmediately, mCaption, mColor, LLColor4::mV, and TRUE.

Here is the call graph for this function:

LLView * LLColorSwatchCtrl::fromXML ( LLXMLNodePtr  node,
LLView parent,
LLUICtrlFactory factory 
) [static]

Reimplemented from LLUICtrl.

Definition at line 352 of file llcolorswatch.cpp.

References LLView::createRect(), FALSE, LLUICtrl::initFromXML(), LLColorSwatchCtrl(), NULL, and setCanApplyImmediately().

Here is the call graph for this function:

void LLColorSwatchCtrl::onColorChanged ( void *  data,
EColorPickOp  pick_op = COLOR_CHANGE 
) [static]


Member Data Documentation

Definition at line 96 of file llcolorswatch.h.

Referenced by draw(), and setValid().

Definition at line 97 of file llcolorswatch.h.

Referenced by draw(), get(), getValue(), getXML(), onColorChanged(), set(), setOriginal(), and showPicker().

Definition at line 98 of file llcolorswatch.h.

Referenced by draw(), and getXML().

Definition at line 99 of file llcolorswatch.h.

Referenced by getXML(), LLColorSwatchCtrl(), setEnabled(), and setLabel().

Definition at line 101 of file llcolorswatch.h.

Referenced by draw(), and LLColorSwatchCtrl().

Definition at line 102 of file llcolorswatch.h.

Referenced by getXML(), setCanApplyImmediately(), and showPicker().

Definition at line 103 of file llcolorswatch.h.

Referenced by onColorChanged(), and setOnCancelCallback().

Definition at line 104 of file llcolorswatch.h.

Referenced by onColorChanged(), and setOnSelectCallback().

Definition at line 106 of file llcolorswatch.h.

Referenced by draw(), LLColorSwatchCtrl(), and ~LLColorSwatchCtrl().


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

Generated on Fri May 16 08:42:59 2008 for SecondLife by  doxygen 1.5.5