| 122 | } |
| 123 | |
| 124 | void GuiGradientSwatchCtrl::onMouseDown(const GuiEvent &event) |
| 125 | { |
| 126 | if (! mActive) |
| 127 | return; |
| 128 | |
| 129 | if (mProfile->mCanKeyFocus) |
| 130 | setFirstResponder(); |
| 131 | |
| 132 | //capture current bounds and mouse down position |
| 133 | mOrigBounds = getBounds(); |
| 134 | mMouseDownPosition = event.mousePoint; |
| 135 | |
| 136 | if(mUseMouseEvents) |
| 137 | onMouseDown_callback(); |
| 138 | |
| 139 | //lock the mouse |
| 140 | mouseLock(); |
| 141 | mDepressed = true; |
| 142 | |
| 143 | // If we have a double click then execute the alt command. |
| 144 | if ( event.mouseClickCount == 2 ) |
| 145 | { |
| 146 | onDoubleClick_callback(); |
| 147 | |
| 148 | execAltConsoleCallback(); |
| 149 | } |
| 150 | |
| 151 | setUpdate(); |
| 152 | } |
| 153 | |
| 154 | void GuiGradientSwatchCtrl::onMouseDragged(const GuiEvent &event) |
| 155 | { |
nothing calls this directly
no test coverage detected