Planeshift
|
pawsColorPromptWindow is window that lets the user enter a color by the use of three sliders and a color preview. More...
#include <pawscolorpromptwindow.h>
Public Member Functions | |
void | Initialize (const csString &label, int color, int minColor, int maxColor, iOnColorEnteredAction *action, const char *name, int param=0) |
bool | OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget) |
Called whenever a button is pressed. | |
virtual bool | OnKeyDown (utf32_char keyCode, utf32_char keyChar, int modifiers) |
Process keydown messages. | |
virtual bool | OnScroll (int scrollDirection, pawsScrollBar *widget) |
Called whenever a window is scrolled. | |
pawsColorPromptWindow (const pawsColorPromptWindow &origin) | |
pawsColorPromptWindow () | |
virtual bool | PostSetup () |
Executed after the widget is setup. | |
Static Public Member Functions | |
static pawsColorPromptWindow * | Create (const csString &label, int color, int minColor, int maxColor, iOnColorEnteredAction *action, const char *name, int param=0) |
Protected Member Functions | |
void | ColorWasEntered (int color) |
This is called when hitting OK. | |
void | SetBoundaries (int minColor, int maxColor) |
restrict the RGB range for all components. | |
Protected Attributes | |
iOnColorEnteredAction * | action |
pawsButton * | buttonPreview |
csString | lastValidText |
This is last valid input from user - we use it to fall back from invalid input. | |
int | maxColor |
int | minColor |
csString | name |
The name of this widget. | |
int | param |
pawsScrollBar * | scrollBarB |
pawsScrollBar * | scrollBarG |
pawsScrollBar * | scrollBarR |
pawsColorPromptWindow is window that lets the user enter a color by the use of three sliders and a color preview.
Definition at line 113 of file pawscolorpromptwindow.h.
pawsColorPromptWindow::pawsColorPromptWindow | ( | ) |
pawsColorPromptWindow::pawsColorPromptWindow | ( | const pawsColorPromptWindow & | origin | ) |
void pawsColorPromptWindow::ColorWasEntered | ( | int | color | ) | [protected] |
This is called when hitting OK.
static pawsColorPromptWindow* pawsColorPromptWindow::Create | ( | const csString & | label, |
int | color, | ||
int | minColor, | ||
int | maxColor, | ||
iOnColorEnteredAction * | action, | ||
const char * | name, | ||
int | param = 0 |
||
) | [static] |
void pawsColorPromptWindow::Initialize | ( | const csString & | label, |
int | color, | ||
int | minColor, | ||
int | maxColor, | ||
iOnColorEnteredAction * | action, | ||
const char * | name, | ||
int | param = 0 |
||
) |
bool pawsColorPromptWindow::OnButtonPressed | ( | int | button, |
int | keyModifier, | ||
pawsWidget * | widget | ||
) | [virtual] |
Called whenever a button is pressed.
button | The button pressed. |
keyModifier | Modifier key in effect. |
widget | The widget the button belongs to. |
Reimplemented from pawsWidget.
virtual bool pawsColorPromptWindow::OnKeyDown | ( | utf32_char | keyCode, |
utf32_char | keyChar, | ||
int | modifiers | ||
) | [virtual] |
Process keydown messages.
keyCode | The code for the pressed key. |
keyChar | The key pressed. |
modifiers | Used to modify tab behavior. |
Reimplemented from pawsWidget.
virtual bool pawsColorPromptWindow::OnScroll | ( | int | scrollDirection, |
pawsScrollBar * | widget | ||
) | [virtual] |
Called whenever a window is scrolled.
scrollDirection | The direction to move. |
widget | The scrollbar widget being manipulated. |
Reimplemented from pawsWidget.
virtual bool pawsColorPromptWindow::PostSetup | ( | ) | [virtual] |
restrict the RGB range for all components.
eg minColor = 0, maxColor = 100 means that each color component (R, G, B) can be set to a value between 0 and 100.
iOnColorEnteredAction* pawsColorPromptWindow::action [protected] |
Definition at line 151 of file pawscolorpromptwindow.h.
pawsButton* pawsColorPromptWindow::buttonPreview [protected] |
Definition at line 149 of file pawscolorpromptwindow.h.
csString pawsColorPromptWindow::lastValidText [protected] |
This is last valid input from user - we use it to fall back from invalid input.
Definition at line 143 of file pawscolorpromptwindow.h.
int pawsColorPromptWindow::maxColor [protected] |
Definition at line 140 of file pawscolorpromptwindow.h.
int pawsColorPromptWindow::minColor [protected] |
Definition at line 140 of file pawscolorpromptwindow.h.
csString pawsColorPromptWindow::name [protected] |
The name of this widget.
Reimplemented from pawsWidget.
Definition at line 152 of file pawscolorpromptwindow.h.
int pawsColorPromptWindow::param [protected] |
Definition at line 153 of file pawscolorpromptwindow.h.
pawsScrollBar* pawsColorPromptWindow::scrollBarB [protected] |
Definition at line 147 of file pawscolorpromptwindow.h.
pawsScrollBar* pawsColorPromptWindow::scrollBarG [protected] |
Definition at line 146 of file pawscolorpromptwindow.h.
pawsScrollBar* pawsColorPromptWindow::scrollBarR [protected] |
Definition at line 145 of file pawscolorpromptwindow.h.