20 #ifndef PAWS_COLOR_PROMPT_WINDOW_HEADER 21 #define PAWS_COLOR_PROMPT_WINDOW_HEADER 23 #include <csutil/list.h> 24 #include <iutil/document.h> 40 virtual void OnColorEntered(
const char* name,
int param,
int color) = 0;
50 SetRelativeFrameSize(140, 80);
56 scrollBarR->SetHorizontal(
true);
57 scrollBarR->SetRelativeFrame(1, 1, 110, 20);
58 scrollBarR->SetTickValue(1);
59 scrollBarR->PostSetup();
62 scrollBarG->SetHorizontal(
true);
63 scrollBarG->SetRelativeFrame(1, 31, 110, 20);
64 scrollBarG->SetTickValue(1);
65 scrollBarG->PostSetup();
68 scrollBarB->SetHorizontal(
true);
69 scrollBarB->SetRelativeFrame(1, 61, 110, 20);
70 scrollBarB->SetTickValue(1);
71 scrollBarB->PostSetup();
74 buttonPreview->SetRelativeFrame(115, 35, 20, 20);
79 AddChild(buttonPreview);
88 for(
unsigned int i = 0 ; i < origin.
children.GetSize(); i++)
91 buttonPreview =
dynamic_cast<pawsButton*
>(children[i]);
99 if(buttonPreview != 0 && scrollBarB != 0 && scrollBarG != 0 && scrollBarR != 0)
break;
119 virtual bool PostSetup();
120 bool OnButtonPressed(
int mouseButton,
int keyModifier,
pawsWidget* widget);
121 virtual bool OnKeyDown(utf32_char keyCode, utf32_char keyChar,
int modifiers);
122 virtual bool OnScroll(
int scrollDirection,
pawsScrollBar* widget);
124 void Initialize(
const csString &label,
int color,
int minColor,
int maxColor,
128 int color,
int minColor,
int maxColor,
135 void SetBoundaries(
int minColor,
int maxColor);
138 void ColorWasEntered(
int color);
pawsColorPromptWindow is window that lets the user enter a color by the use of three sliders and a co...
pawsButton * buttonPreview
pawsScrollBar * scrollBarR
virtual ~iOnColorEnteredAction()
pawsScrollBar * scrollBarB
pawsScrollBar * scrollBarG
csString lastValidText
This is last valid input from user - we use it to fall back from invalid input.
void void Initialize(iObjectRegistry *object_reg)
pawsPromptWindow is the common base for windows that let the user enter one piece of information...
CREATE_PAWS_FACTORY(pawsColorInput)
iOnColorEnteredAction * action
virtual void OnColorEntered(const char *name, int param, int color)=0