#include <llcolorswatch.h>


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 LLColor4 & | get () |
| 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 LLView * | fromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) |
| static void | onColorChanged (void *data, EColorPickOp pick_op=COLOR_CHANGE) |
Protected Attributes | |
| BOOL | mValid |
| LLColor4 | mColor |
| LLColor4 | mBorderColor |
| LLTextBox * | mCaption |
| LLHandle< LLFloater > | mPickerHandle |
| LLViewBorder * | mBorder |
| BOOL | mCanApplyImmediately |
| LLUICtrlCallback | mOnCancelCallback |
| LLUICtrlCallback | mOnSelectCallback |
| LLPointer< LLUIImage > | mAlphaGradientImage |
Definition at line 48 of file llcolorswatch.h.
| 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().


| 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 | |||
| ) |
Definition at line 82 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.

| LLColorSwatchCtrl::~LLColorSwatchCtrl | ( | ) |
Definition at line 109 of file llcolorswatch.cpp.
References LLFloaterColorPicker::cancelSelection(), LLFloater::close(), LLHandle< T >::get(), mAlphaGradientImage, mPickerHandle, and NULL.

| void LLColorSwatchCtrl::setValue | ( | const LLSD & | value | ) | [virtual] |
| virtual LLSD LLColorSwatchCtrl::getValue | ( | ) | const [inline, virtual] |
Reimplemented from LLUICtrl.
Definition at line 70 of file llcolorswatch.h.
References LLColor4::getValue(), and mColor.

| const LLColor4& LLColorSwatchCtrl::get | ( | ) | [inline] |
Definition at line 71 of file llcolorswatch.h.
References mColor.
Referenced by LLFloaterEnvSettings::onChangeWaterColor(), LLPanelEditWearable::onColorCommit(), LLPanelVolume::onCommitLight(), LLPanelVolume::onLightSelectColor(), LLFloaterWater::onWaterFogColorMoved(), LLPanelFace::sendColor(), and LLFloaterColorPicker::showUI().

| void LLColorSwatchCtrl::set | ( | const LLColor4 & | color, | |
| BOOL | update_picker = FALSE, |
|||
| BOOL | from_event = FALSE | |||
| ) |
Definition at line 152 of file llcolorswatch.cpp.
References LLHandle< T >::get(), LLColor4::getValue(), mColor, mPickerHandle, LLColor4::mV, LLView::setControlValue(), LLFloaterColorPicker::setCurRgb(), VBLUE, VGREEN, and VRED.
Referenced by LLPanelEditWearable::draw(), LLPanelVolume::getState(), LLPanelFace::getState(), LLFloaterWater::syncMenu(), and LLFloaterEnvSettings::syncMenu().


| 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().


| 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().


| void LLColorSwatchCtrl::setLabel | ( | const std::string & | label | ) |
Definition at line 166 of file llcolorswatch.cpp.
References mCaption, and LLTextBox::setText().

| void LLColorSwatchCtrl::setCanApplyImmediately | ( | BOOL | apply | ) | [inline] |
Definition at line 77 of file llcolorswatch.h.
References mCanApplyImmediately.
Referenced by fromXML(), LLPanelFace::getState(), and LLPanelFace::postBuild().

| void LLColorSwatchCtrl::setOnCancelCallback | ( | LLUICtrlCallback | cb | ) | [inline] |
Definition at line 78 of file llcolorswatch.h.
References mOnCancelCallback.
Referenced by LLPanelVolume::postBuild(), and LLPanelFace::postBuild().

| void LLColorSwatchCtrl::setOnSelectCallback | ( | LLUICtrlCallback | cb | ) | [inline] |
Definition at line 79 of file llcolorswatch.h.
References mOnSelectCallback.
Referenced by LLPanelVolume::postBuild(), and LLPanelFace::postBuild().

| void LLColorSwatchCtrl::showPicker | ( | BOOL | take_focus | ) |
Definition at line 311 of file llcolorswatch.cpp.
References LLFloater::addDependentFloater(), LLHandle< T >::get(), LLFloater::getHandle(), LLFloaterView::getParentFloater(), gFloaterView, LLFloaterColorPicker::initUI(), mCanApplyImmediately, mColor, mPickerHandle, LLColor4::mV, LLFloater::setFocus(), LLFloaterColorPicker::showUI(), TRUE, VBLUE, VGREEN, and VRED.
Referenced by handleMouseUp(), and handleUnicodeCharHere().


Reimplemented from LLView.
Definition at line 171 of file llcolorswatch.cpp.
References gViewerWindow, LLViewerWindow::setMouseCapture(), and TRUE.
Referenced by handleDoubleClick().


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.

Reimplemented from LLView.
Definition at line 121 of file llcolorswatch.cpp.
References handleMouseDown().

Reimplemented from LLView.
Definition at line 126 of file llcolorswatch.cpp.
References LLView::getWindow(), LLWindow::setCursor(), TRUE, and UI_CURSOR_HAND.

Reimplemented from LLView.
Definition at line 132 of file llcolorswatch.cpp.
References LLView::handleUnicodeCharHere(), showPicker(), and TRUE.

| void LLColorSwatchCtrl::draw | ( | void | ) | [virtual] |
Reimplemented from LLView.
Definition at line 204 of file llcolorswatch.cpp.
References LLColor4::black, BTN_HEIGHT_SMALL, LLGLImmediate::color4fv(), LLView::draw(), FALSE, LLView::getRect(), gGL, gl_draw_x(), gl_rect_2d(), gl_rect_2d_checkerboard(), LLColor4::grey, LLUICtrl::hasFocus(), mAlphaGradientImage, mBorder, mBorderColor, mColor, LLColor4::mV, mValid, LLPointer< Type >::notNull(), LLGLImmediate::popMatrix(), LLGLImmediate::pushMatrix(), LLViewBorder::setKeyboardFocusHighlight(), LLRectBase< Type >::stretch(), TRUE, and VALPHA.

| 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().


| 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.

| 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().

| void LLColorSwatchCtrl::onColorChanged | ( | void * | data, | |
| EColorPickOp | pick_op = COLOR_CHANGE | |||
| ) | [static] |
Definition at line 267 of file llcolorswatch.cpp.
References COLOR_CANCEL, COLOR_SELECT, LLHandle< T >::get(), LLFloaterColorPicker::getCurB(), LLFloaterColorPicker::getCurG(), LLFloaterColorPicker::getCurR(), LLUICtrl::mCallbackUserData, mColor, mOnCancelCallback, mOnSelectCallback, mPickerHandle, LLColor4::mV, LLUICtrl::onCommit(), LLView::setControlValue(), and VALPHA.
Referenced by LLFloaterColorPicker::cancelSelection(), LLFloaterColorPicker::handleMouseDown(), LLFloaterColorPicker::handleMouseUp(), LLFloaterColorPicker::onClickSelect(), LLFloaterColorPicker::onColorSelect(), LLFloaterColorPicker::onImmediateCheck(), LLFloaterColorPicker::onTextEntryChanged(), and LLFloaterColorPicker::showUI().


BOOL LLColorSwatchCtrl::mValid [protected] |
LLColor4 LLColorSwatchCtrl::mColor [protected] |
Definition at line 97 of file llcolorswatch.h.
Referenced by draw(), get(), getValue(), getXML(), onColorChanged(), set(), setOriginal(), and showPicker().
LLColor4 LLColorSwatchCtrl::mBorderColor [protected] |
LLTextBox* LLColorSwatchCtrl::mCaption [protected] |
Definition at line 99 of file llcolorswatch.h.
Referenced by getXML(), LLColorSwatchCtrl(), setEnabled(), and setLabel().
LLHandle<LLFloater> LLColorSwatchCtrl::mPickerHandle [protected] |
Definition at line 100 of file llcolorswatch.h.
Referenced by onColorChanged(), set(), setEnabled(), setOriginal(), setValid(), showPicker(), and ~LLColorSwatchCtrl().
LLViewBorder* LLColorSwatchCtrl::mBorder [protected] |
BOOL LLColorSwatchCtrl::mCanApplyImmediately [protected] |
Definition at line 102 of file llcolorswatch.h.
Referenced by getXML(), setCanApplyImmediately(), and showPicker().
LLUICtrlCallback LLColorSwatchCtrl::mOnCancelCallback [protected] |
Definition at line 103 of file llcolorswatch.h.
Referenced by onColorChanged(), and setOnCancelCallback().
LLUICtrlCallback LLColorSwatchCtrl::mOnSelectCallback [protected] |
Definition at line 104 of file llcolorswatch.h.
Referenced by onColorChanged(), and setOnSelectCallback().
LLPointer<LLUIImage> LLColorSwatchCtrl::mAlphaGradientImage [protected] |
Definition at line 106 of file llcolorswatch.h.
Referenced by draw(), LLColorSwatchCtrl(), and ~LLColorSwatchCtrl().
1.5.5