WidgetChooseColor Class Template Reference
[Widgets]

ChooseColorDialog class. More...

List of all members.

Public Types

typedef WidgetChooseColor<
Parent > 
ObjectType
 Object type.
typedef WidgetChooseColor<
Parent > 
ThisType
 Class type.

Public Member Functions

ColorParams showDialog (const ColorParams &colorParams, bool basic=true, bool allowFullOpen=true)
 Shows the Choose Color Dialog.
ColorParams showDialog (bool basic=true, bool allowFullOpen=true)
 Shows the Choose Color Dialog.
 WidgetChooseColor (Parent *parent=0)
 Expicit constructor taking pointer to parent.

Classes

class  ColorParams
 Helper class for WidgetChooseColor. More...


Detailed Description

template<class Parent>
class SmartWin::WidgetChooseColor< Parent >

ChooseColorDialog class.

choosecolor.png
Class for showing a common ChooseColorDialog box.
Either derive from it or call WidgetFactory::createChooseColor.
Note!
If you wish to use this class with EventHandlerClass classes other than those from SmartWin you need to expose a public function called "parent" taking no arguments returning an HWND.
the complete signature of the function will then be "HWND parent()"
This is one of few Widgets in SmartWin++ which can be used without linking in the actual library!


Member Typedef Documentation

typedef WidgetChooseColor< Parent > ObjectType

Object type.

Note, not a pointer!!!!


Member Function Documentation

WidgetChooseColor< Parent >::ColorParams showDialog ( const ColorParams colorParams,
bool  basic = true,
bool  allowFullOpen = true 
)

Shows the Choose Color Dialog.

Returns a ColorParams object, if user presses Ok the userPressedOk will be true, else if user pressed Cancel the userPressedOk obviously will be false.
Note!
This function "resets" the remembered state of the dialog meaning if you've manipulated the "remembered" state the colorParams object will be the next state if you press ok!
If you press Cancel the "old" state ( either default one or from a previous call to this or sibling function will become it's "current state" )
If basic is true dialog will be showed with only basic functionality, if allowFullOpen is true dialog will allow the user to show "more info".

WidgetChooseColor< Parent >::ColorParams showDialog ( bool  basic = true,
bool  allowFullOpen = true 
)

Shows the Choose Color Dialog.

Returns a ColorParams object, if user presses Ok the userPressedOk will be true, else if user pressed Cancel the userPressedOk obviously will be false.
This dialog "remembers" its state from call to call. If you manipulate the Custom Colors, the next time it displays, it will have the same Custom Colors.
Note!
This is true even across DIFFERENT instances of the dialog!!
If basic is true dialog will be showed with only basic functionality, if allowFullOpen is true dialog will allow the user to show "more info".

Back to SmartWin website
SourceForge.net Logo