LLFloaterColorPicker Class Reference

#include <llfloatercolorpicker.h>

Inheritance diagram for LLFloaterColorPicker:

Inheritance graph
[legend]
Collaboration diagram for LLFloaterColorPicker:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLFloaterColorPicker (LLColorSwatchCtrl *swatch, BOOL show_apply_immediate=FALSE)
virtual ~LLFloaterColorPicker ()
virtual BOOL postBuild ()
virtual void draw ()
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual void onMouseCaptureLost ()
virtual void onClose (bool app_quitting)
void createUI ()
void initUI (F32 rValIn, F32 gValIn, F32 bValIn)
void showUI ()
void destroyUI ()
void cancelSelection ()
LLColorSwatchCtrlgetSwatch ()
void setOrigRgb (F32 origRIn, F32 origGIn, F32 origBIn)
void getOrigRgb (F32 &origROut, F32 &origGOut, F32 &origBOut)
F32 getOrigR ()
F32 getOrigG ()
F32 getOrigB ()
void setCurRgb (F32 curRIn, F32 curGIn, F32 curBIn)
void getCurRgb (F32 &curROut, F32 &curGOut, F32 &curBOut)
F32 getCurR ()
F32 getCurG ()
F32 getCurB ()
void setCurHsl (F32 curHIn, F32 curSIn, F32 curLIn)
void getCurHsl (F32 &curHOut, F32 &curSOut, F32 &curLOut)
F32 getCurH ()
F32 getCurS ()
F32 getCurL ()
BOOL updateRgbHslFromPoint (S32 xPosIn, S32 yPosIn)
void updateTextEntry ()
void stopUsingPipette ()
void setMouseDownInHueRegion (BOOL mouse_down_in_region)
BOOL getMouseDownInHueRegion ()
void setMouseDownInLumRegion (BOOL mouse_down_in_region)
BOOL getMouseDownInLumRegion ()
void setMouseDownInSwatch (BOOL mouse_down_in_swatch)
BOOL getMouseDownInSwatch ()
void onTextEntryChanged (LLUICtrl *ctrl)
void hslToRgb (F32 hValIn, F32 sValIn, F32 lValIn, F32 &rValOut, F32 &gValOut, F32 &bValOut)
F32 hueToRgb (F32 val1In, F32 val2In, F32 valHUeIn)
void setActive (BOOL active)

Static Protected Member Functions

static void onClickCancel (void *data)
static void onClickSelect (void *data)
static void onClickPipette (void *data)
static void onTextCommit (LLUICtrl *ctrl, void *data)
static void onImmediateCheck (LLUICtrl *ctrl, void *data)
static void onColorSelect (const LLTextureEntry &te, void *data)

Private Member Functions

void enableTextCallbacks (BOOL stateIn)
void drawPalette ()
const LLColor4getComplimentaryColor (const LLColor4 &backgroundColor)

Private Attributes

F32 origR
F32 origG
F32 origB
F32 curR
F32 curG
F32 curB
F32 curH
F32 curS
F32 curL
const S32 mComponents
BOOL mMouseDownInLumRegion
BOOL mMouseDownInHueRegion
BOOL mMouseDownInSwatch
const S32 mRGBViewerImageLeft
const S32 mRGBViewerImageTop
const S32 mRGBViewerImageWidth
const S32 mRGBViewerImageHeight
const S32 mLumRegionLeft
const S32 mLumRegionTop
const S32 mLumRegionWidth
const S32 mLumRegionHeight
const S32 mLumMarkerSize
const S32 mSwatchRegionLeft
const S32 mSwatchRegionTop
const S32 mSwatchRegionWidth
const S32 mSwatchRegionHeight
LLViewmSwatchView
const S32 numPaletteColumns
const S32 numPaletteRows
std::vector< LLColor4 * > mPalette
S32 highlightEntry
const S32 mPaletteRegionLeft
const S32 mPaletteRegionTop
const S32 mPaletteRegionWidth
const S32 mPaletteRegionHeight
LLPointer< LLImageGLmRGBImage
LLColorSwatchCtrlmSwatch
BOOL mActive
LLCheckBoxCtrlmApplyImmediateCheck
BOOL mCanApplyImmediately
LLButtonmSelectBtn
LLButtonmCancelBtn
LLButtonmPipetteBtn
F32 mContextConeOpacity


Detailed Description

Definition at line 49 of file llfloatercolorpicker.h.


Constructor & Destructor Documentation

LLFloaterColorPicker::LLFloaterColorPicker ( LLColorSwatchCtrl swatch,
BOOL  show_apply_immediate = FALSE 
)

Definition at line 80 of file llfloatercolorpicker.cpp.

References createUI(), FALSE, mApplyImmediateCheck, mCanApplyImmediately, LLCheckBoxCtrl::set(), and LLCheckBoxCtrl::setEnabled().

Here is the call graph for this function:

LLFloaterColorPicker::~LLFloaterColorPicker (  )  [virtual]

Definition at line 128 of file llfloatercolorpicker.cpp.

References destroyUI().

Here is the call graph for this function:


Member Function Documentation

BOOL LLFloaterColorPicker::postBuild ( void   )  [virtual]

void LLFloaterColorPicker::draw ( void   )  [virtual]

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

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

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

void LLFloaterColorPicker::onMouseCaptureLost (  )  [virtual]

Reimplemented from LLView.

Definition at line 530 of file llfloatercolorpicker.cpp.

References FALSE, setMouseDownInHueRegion(), and setMouseDownInLumRegion().

Here is the call graph for this function:

void LLFloaterColorPicker::onClose ( bool  app_quitting  )  [virtual]

Reimplemented from LLFloater.

Definition at line 1073 of file llfloatercolorpicker.cpp.

References LLFloater::onClose().

Here is the call graph for this function:

void LLFloaterColorPicker::createUI (  ) 

void LLFloaterColorPicker::initUI ( F32  rValIn,
F32  gValIn,
F32  bValIn 
)

Definition at line 259 of file llfloatercolorpicker.cpp.

References enableTextCallbacks(), llclamp(), setCurRgb(), setOrigRgb(), TRUE, and updateTextEntry().

Referenced by LLColorSwatchCtrl::showPicker().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::showUI (  ) 

void LLFloaterColorPicker::destroyUI (  ) 

Definition at line 283 of file llfloatercolorpicker.cpp.

References mPalette, mSwatchView, NULL, LLView::removeChild(), and stopUsingPipette().

Referenced by ~LLFloaterColorPicker().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::cancelSelection (  ) 

LLColorSwatchCtrl* LLFloaterColorPicker::getSwatch (  )  [inline]

Definition at line 71 of file llfloatercolorpicker.h.

References mSwatch.

Referenced by cancelSelection(), handleMouseDown(), handleMouseUp(), onTextEntryChanged(), and showUI().

Here is the caller graph for this function:

void LLFloaterColorPicker::setOrigRgb ( F32  origRIn,
F32  origGIn,
F32  origBIn 
)

Definition at line 353 of file llfloatercolorpicker.cpp.

References origB, origG, and origR.

Referenced by initUI(), LLColorSwatchCtrl::setOriginal(), and showUI().

Here is the caller graph for this function:

void LLFloaterColorPicker::getOrigRgb ( F32 origROut,
F32 origGOut,
F32 origBOut 
)

Definition at line 364 of file llfloatercolorpicker.cpp.

References origB, origG, and origR.

F32 LLFloaterColorPicker::getOrigR (  )  [inline]

Definition at line 76 of file llfloatercolorpicker.h.

References origR.

Referenced by cancelSelection().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getOrigG (  )  [inline]

Definition at line 77 of file llfloatercolorpicker.h.

References origG.

Referenced by cancelSelection().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getOrigB (  )  [inline]

Definition at line 78 of file llfloatercolorpicker.h.

References origB.

Referenced by cancelSelection().

Here is the caller graph for this function:

void LLFloaterColorPicker::setCurRgb ( F32  curRIn,
F32  curGIn,
F32  curBIn 
)

Definition at line 375 of file llfloatercolorpicker.cpp.

References curB, curG, curH, curL, curR, curS, enableTextCallbacks(), FALSE, TRUE, and updateTextEntry().

Referenced by cancelSelection(), handleMouseDown(), initUI(), onTextEntryChanged(), LLColorSwatchCtrl::set(), and showUI().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::getCurRgb ( F32 curROut,
F32 curGOut,
F32 curBOut 
)

Definition at line 397 of file llfloatercolorpicker.cpp.

References curB, curG, and curR.

Referenced by onTextEntryChanged().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getCurR (  )  [inline]

Definition at line 83 of file llfloatercolorpicker.h.

References curR.

Referenced by draw(), handleMouseUp(), LLColorSwatchCtrl::onColorChanged(), and updateTextEntry().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getCurG (  )  [inline]

Definition at line 84 of file llfloatercolorpicker.h.

References curG.

Referenced by draw(), handleMouseUp(), LLColorSwatchCtrl::onColorChanged(), and updateTextEntry().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getCurB (  )  [inline]

Definition at line 85 of file llfloatercolorpicker.h.

References curB.

Referenced by draw(), handleMouseUp(), LLColorSwatchCtrl::onColorChanged(), and updateTextEntry().

Here is the caller graph for this function:

void LLFloaterColorPicker::setCurHsl ( F32  curHIn,
F32  curSIn,
F32  curLIn 
)

Definition at line 408 of file llfloatercolorpicker.cpp.

References curB, curG, curH, curL, curR, curS, and hslToRgb().

Referenced by onTextEntryChanged(), and updateRgbHslFromPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::getCurHsl ( F32 curHOut,
F32 curSOut,
F32 curLOut 
)

Definition at line 423 of file llfloatercolorpicker.cpp.

References curH, curL, and curS.

Referenced by onTextEntryChanged().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getCurH (  )  [inline]

Definition at line 90 of file llfloatercolorpicker.h.

References curH.

Referenced by draw(), updateRgbHslFromPoint(), and updateTextEntry().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getCurS (  )  [inline]

Definition at line 91 of file llfloatercolorpicker.h.

References curS.

Referenced by draw(), updateRgbHslFromPoint(), and updateTextEntry().

Here is the caller graph for this function:

F32 LLFloaterColorPicker::getCurL (  )  [inline]

Definition at line 92 of file llfloatercolorpicker.h.

References curL.

Referenced by draw(), updateRgbHslFromPoint(), and updateTextEntry().

Here is the caller graph for this function:

BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32  xPosIn,
S32  yPosIn 
)

Definition at line 865 of file llfloatercolorpicker.cpp.

References FALSE, getCurH(), getCurL(), getCurS(), mLumRegionHeight, mLumRegionLeft, mLumRegionTop, mLumRegionWidth, mRGBViewerImageHeight, mRGBViewerImageLeft, mRGBViewerImageTop, mRGBViewerImageWidth, setCurHsl(), and TRUE.

Referenced by handleHover(), and handleMouseDown().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::updateTextEntry (  ) 

Definition at line 752 of file llfloatercolorpicker.cpp.

References LLPanel::childSetValue(), getCurB(), getCurG(), getCurH(), getCurL(), getCurR(), and getCurS().

Referenced by handleHover(), handleMouseDown(), initUI(), onTextEntryChanged(), and setCurRgb().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::stopUsingPipette (  ) 

Definition at line 1226 of file llfloatercolorpicker.cpp.

References LLToolMgr::clearTransientTool(), LLSingleton< LLToolPipette >::getInstance(), and LLSingleton< LLToolMgr >::getInstance().

Referenced by destroyUI(), and setActive().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::setMouseDownInHueRegion ( BOOL  mouse_down_in_region  ) 

Definition at line 1177 of file llfloatercolorpicker.cpp.

References LLFocusMgr::childHasKeyboardFocus(), gFocusMgr, mMouseDownInHueRegion, mSelectBtn, LLUICtrl::setFocus(), and TRUE.

Referenced by handleMouseDown(), handleMouseUp(), and onMouseCaptureLost().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFloaterColorPicker::getMouseDownInHueRegion (  )  [inline]

Definition at line 104 of file llfloatercolorpicker.h.

References mMouseDownInHueRegion.

Referenced by handleHover(), and handleMouseUp().

Here is the caller graph for this function:

void LLFloaterColorPicker::setMouseDownInLumRegion ( BOOL  mouse_down_in_region  ) 

Definition at line 1190 of file llfloatercolorpicker.cpp.

References LLFocusMgr::childHasKeyboardFocus(), gFocusMgr, mMouseDownInLumRegion, mSelectBtn, LLUICtrl::setFocus(), and TRUE.

Referenced by handleMouseDown(), handleMouseUp(), and onMouseCaptureLost().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFloaterColorPicker::getMouseDownInLumRegion (  )  [inline]

Definition at line 107 of file llfloatercolorpicker.h.

References mMouseDownInLumRegion.

Referenced by handleHover(), and handleMouseUp().

Here is the caller graph for this function:

void LLFloaterColorPicker::setMouseDownInSwatch ( BOOL  mouse_down_in_swatch  ) 

Definition at line 1203 of file llfloatercolorpicker.cpp.

References LLFocusMgr::childHasKeyboardFocus(), gFocusMgr, mMouseDownInSwatch, mSelectBtn, LLUICtrl::setFocus(), and TRUE.

Referenced by handleMouseDown().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFloaterColorPicker::getMouseDownInSwatch (  )  [inline]

Definition at line 110 of file llfloatercolorpicker.h.

References mMouseDownInSwatch.

void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl ctrl  ) 

void LLFloaterColorPicker::hslToRgb ( F32  hValIn,
F32  sValIn,
F32  lValIn,
F32 rValOut,
F32 gValOut,
F32 bValOut 
)

Definition at line 323 of file llfloatercolorpicker.cpp.

References hueToRgb().

Referenced by createUI(), draw(), and setCurHsl().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLFloaterColorPicker::hueToRgb ( F32  val1In,
F32  val2In,
F32  valHUeIn 
)

Definition at line 309 of file llfloatercolorpicker.cpp.

Referenced by hslToRgb().

Here is the caller graph for this function:

void LLFloaterColorPicker::setActive ( BOOL  active  ) 

Definition at line 1216 of file llfloatercolorpicker.cpp.

References LLButton::getToggleState(), mActive, mPipetteBtn, and stopUsingPipette().

Referenced by LLColorSwatchCtrl::setValid().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::onClickCancel ( void *  data  )  [static, protected]

Definition at line 434 of file llfloatercolorpicker.cpp.

Referenced by postBuild().

Here is the caller graph for this function:

void LLFloaterColorPicker::onClickSelect ( void *  data  )  [static, protected]

Definition at line 452 of file llfloatercolorpicker.cpp.

References LLColorSwatchCtrl::COLOR_SELECT, and LLColorSwatchCtrl::onColorChanged().

Referenced by postBuild().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::onClickPipette ( void *  data  )  [static, protected]

Definition at line 467 of file llfloatercolorpicker.cpp.

References LLToolMgr::clearTransientTool(), LLSingleton< LLToolMgr >::getInstance(), LLSingleton< LLToolPipette >::getInstance(), onColorSelect(), LLToolPipette::setSelectCallback(), and LLToolMgr::setTransientTool().

Referenced by postBuild().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::onTextCommit ( LLUICtrl ctrl,
void *  data 
) [static, protected]

Definition at line 491 of file llfloatercolorpicker.cpp.

Referenced by enableTextCallbacks(), and postBuild().

Here is the caller graph for this function:

void LLFloaterColorPicker::onImmediateCheck ( LLUICtrl ctrl,
void *  data 
) [static, protected]

Definition at line 503 of file llfloatercolorpicker.cpp.

References LLColorSwatchCtrl::COLOR_CHANGE, gSavedSettings, LLColorSwatchCtrl::onColorChanged(), and LLControlGroup::setBOOL().

Referenced by postBuild().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::onColorSelect ( const LLTextureEntry te,
void *  data 
) [static, protected]

Definition at line 517 of file llfloatercolorpicker.cpp.

References LLColorSwatchCtrl::COLOR_CHANGE, LLTextureEntry::getColor(), LLColor4::mV, LLColorSwatchCtrl::onColorChanged(), VBLUE, VGREEN, and VRED.

Referenced by onClickPipette().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::enableTextCallbacks ( BOOL  stateIn  )  [private]

Definition at line 767 of file llfloatercolorpicker.cpp.

References LLPanel::childSetCommitCallback(), and onTextCommit().

Referenced by cancelSelection(), handleMouseDown(), initUI(), onTextEntryChanged(), and setCurRgb().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFloaterColorPicker::drawPalette (  )  [private]

Definition at line 699 of file llfloatercolorpicker.cpp.

References FALSE, getComplimentaryColor(), gl_line_2d(), gl_rect_2d(), highlightEntry, mPalette, mPaletteRegionHeight, mPaletteRegionLeft, mPaletteRegionTop, mPaletteRegionWidth, numPaletteColumns, numPaletteRows, S32, and TRUE.

Referenced by draw().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLColor4 & LLFloaterColorPicker::getComplimentaryColor ( const LLColor4 backgroundColor  )  [private]

Definition at line 677 of file llfloatercolorpicker.cpp.

References LLColor4::black, LLColor4::calcHSL(), and LLColor4::white.

Referenced by drawPalette().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 140 of file llfloatercolorpicker.h.

Referenced by getOrigR(), getOrigRgb(), and setOrigRgb().

Definition at line 140 of file llfloatercolorpicker.h.

Referenced by getOrigG(), getOrigRgb(), and setOrigRgb().

Definition at line 140 of file llfloatercolorpicker.h.

Referenced by getOrigB(), getOrigRgb(), and setOrigRgb().

Definition at line 143 of file llfloatercolorpicker.h.

Referenced by getCurR(), getCurRgb(), setCurHsl(), and setCurRgb().

Definition at line 143 of file llfloatercolorpicker.h.

Referenced by getCurG(), getCurRgb(), setCurHsl(), and setCurRgb().

Definition at line 143 of file llfloatercolorpicker.h.

Referenced by getCurB(), getCurRgb(), setCurHsl(), and setCurRgb().

Definition at line 144 of file llfloatercolorpicker.h.

Referenced by getCurH(), getCurHsl(), setCurHsl(), and setCurRgb().

Definition at line 144 of file llfloatercolorpicker.h.

Referenced by getCurHsl(), getCurS(), setCurHsl(), and setCurRgb().

Definition at line 144 of file llfloatercolorpicker.h.

Referenced by getCurHsl(), getCurL(), setCurHsl(), and setCurRgb().

Definition at line 146 of file llfloatercolorpicker.h.

Referenced by createUI().

Definition at line 148 of file llfloatercolorpicker.h.

Referenced by getMouseDownInLumRegion(), and setMouseDownInLumRegion().

Definition at line 149 of file llfloatercolorpicker.h.

Referenced by getMouseDownInHueRegion(), and setMouseDownInHueRegion().

Definition at line 152 of file llfloatercolorpicker.h.

Referenced by draw(), handleHover(), handleMouseDown(), and updateRgbHslFromPoint().

Definition at line 153 of file llfloatercolorpicker.h.

Referenced by draw(), handleHover(), handleMouseDown(), and updateRgbHslFromPoint().

Definition at line 157 of file llfloatercolorpicker.h.

Referenced by draw(), handleHover(), handleMouseDown(), and updateRgbHslFromPoint().

Definition at line 158 of file llfloatercolorpicker.h.

Referenced by draw(), handleHover(), handleMouseDown(), and updateRgbHslFromPoint().

Definition at line 159 of file llfloatercolorpicker.h.

Referenced by draw(), handleHover(), handleMouseDown(), and updateRgbHslFromPoint().

Definition at line 160 of file llfloatercolorpicker.h.

Referenced by draw(), handleHover(), handleMouseDown(), and updateRgbHslFromPoint().

Definition at line 161 of file llfloatercolorpicker.h.

Referenced by draw(), and handleMouseDown().

Definition at line 164 of file llfloatercolorpicker.h.

Referenced by draw(), and handleMouseDown().

Definition at line 165 of file llfloatercolorpicker.h.

Referenced by draw(), and handleMouseDown().

Definition at line 166 of file llfloatercolorpicker.h.

Referenced by draw(), and handleMouseDown().

Definition at line 167 of file llfloatercolorpicker.h.

Referenced by draw(), and handleMouseDown().

Definition at line 169 of file llfloatercolorpicker.h.

Referenced by destroyUI().

std::vector< LLColor4* > LLFloaterColorPicker::mPalette [private]

Definition at line 174 of file llfloatercolorpicker.h.

Referenced by drawPalette(), and handleHover().

Definition at line 175 of file llfloatercolorpicker.h.

Referenced by drawPalette(), handleHover(), handleMouseDown(), and handleMouseUp().

Definition at line 176 of file llfloatercolorpicker.h.

Referenced by drawPalette(), handleHover(), handleMouseDown(), and handleMouseUp().

Definition at line 177 of file llfloatercolorpicker.h.

Referenced by drawPalette(), handleHover(), handleMouseDown(), and handleMouseUp().

Definition at line 178 of file llfloatercolorpicker.h.

Referenced by drawPalette(), handleHover(), handleMouseDown(), and handleMouseUp().

Definition at line 181 of file llfloatercolorpicker.h.

Referenced by createUI(), and draw().

Definition at line 184 of file llfloatercolorpicker.h.

Referenced by draw(), and getSwatch().

Definition at line 187 of file llfloatercolorpicker.h.

Referenced by draw(), and setActive().

Definition at line 191 of file llfloatercolorpicker.h.

Referenced by draw(), and LLFloaterColorPicker().

Definition at line 194 of file llfloatercolorpicker.h.

Referenced by postBuild().

Definition at line 196 of file llfloatercolorpicker.h.

Referenced by draw(), postBuild(), and setActive().

Definition at line 198 of file llfloatercolorpicker.h.

Referenced by draw().


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

Generated on Fri May 16 08:45:18 2008 for SecondLife by  doxygen 1.5.5