Planeshift
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

pawsColorPromptWindow Class Reference

pawsColorPromptWindow is window that lets the user enter a color by the use of three sliders and a color preview. More...

#include <pawscolorpromptwindow.h>

List of all members.

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 pawsColorPromptWindowCreate (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

iOnColorEnteredActionaction
pawsButtonbuttonPreview
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
pawsScrollBarscrollBarB
pawsScrollBarscrollBarG
pawsScrollBarscrollBarR

Detailed Description

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.


Constructor & Destructor Documentation

pawsColorPromptWindow::pawsColorPromptWindow ( )
pawsColorPromptWindow::pawsColorPromptWindow ( const pawsColorPromptWindow origin)

Member Function Documentation

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.

Parameters:
buttonThe button pressed.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

virtual bool pawsColorPromptWindow::OnKeyDown ( utf32_char  keyCode,
utf32_char  keyChar,
int  modifiers 
) [virtual]

Process keydown messages.

Parameters:
keyCodeThe code for the pressed key.
keyCharThe key pressed.
modifiersUsed to modify tab behavior.
Returns:
bool TRUE for success FALSE if no action.
Remarks:
If you override this, be sure to also override GetFocusOverridesControls() as returning true

Reimplemented from pawsWidget.

virtual bool pawsColorPromptWindow::OnScroll ( int  scrollDirection,
pawsScrollBar widget 
) [virtual]

Called whenever a window is scrolled.

Parameters:
scrollDirectionThe direction to move.
widgetThe scrollbar widget being manipulated.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

virtual bool pawsColorPromptWindow::PostSetup ( ) [virtual]

Executed after the widget is setup.

Returns:
true

Reimplemented from pawsPromptWindow.

void pawsColorPromptWindow::SetBoundaries ( int  minColor,
int  maxColor 
) [protected]

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.


Member Data Documentation

Definition at line 151 of file pawscolorpromptwindow.h.

Definition at line 149 of file pawscolorpromptwindow.h.

This is last valid input from user - we use it to fall back from invalid input.

Definition at line 143 of file pawscolorpromptwindow.h.

Definition at line 140 of file pawscolorpromptwindow.h.

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.

Definition at line 153 of file pawscolorpromptwindow.h.

Definition at line 147 of file pawscolorpromptwindow.h.

Definition at line 146 of file pawscolorpromptwindow.h.

Definition at line 145 of file pawscolorpromptwindow.h.


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