Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members Related Pages

# ColorCommonDialogC Class Reference

Color Dialog Class. More...

`#include <ColorCommonDialogC.h>`

Inheritance diagram for ColorCommonDialogC:

List of all members.

## Public Member Functions
virtual Edit::DataBlockI * | create ()
| Creates new dialog.
virtual PluginClass::ClassIdC | get_class_id ()
| Returns the class ID if the dialog.
virtual bool | do_modal ()
| Prompts the dialog.
virtual void | set_parent_wnd (HWND hParent)
| Sets the parent window handle, use before calling do_modal().
virtual void | set_caption (const char *szName)
| Sets the caption of the dialog, use before calling do_modal().
virtual void | set_color (const PajaTypes::ColorC &rCol)
| Sets the initial color fo the dialog, use before calling do_modal().
virtual const PajaTypes::ColorC & | get_color () const
| Returns the selected color (use after calling do_modal()).
## Static Public Member Functions
ColorCommonDialogC * | create_new ()
| Creates new dialog.
## Protected Attributes
PajaTypes::ColorC | m_rColor
std::string | m_sCaption
HWND | m_hWndParent

## Detailed Description

Color Dialog Class.

Color dialog implements the same color choose dialog which is used all over Demopaja.

Example:

            ...
            ColorC              rColor;
            ColorCommonDialogC* pDlg = (ColorCommonDialogC*)pImpInterface->get_common_dialog( CLASS_COLORCOMMONDIALOG );
            if( pDlg ) {
                // set the initial color
                pDlg->set_color( rColor );
                // set parent windows handle, important!
                pDlg->set_parent_wnd( hDlg );
                if( pDlg->do_modal() ) {
                    // get color
                    rColor = pDlg->get_color();
                }
            }
            ...

## Member Function Documentation

virtual Edit::DataBlockI* create | ( |  | ) | `[virtual]`

| Creates new dialog. Implements DataBlockI.

ColorCommonDialogC* create_new | ( |  | ) | `[static]`

| Creates new dialog.

virtual bool do_modal | ( |  | ) | `[virtual]`

| Prompts the dialog. Implements CommonDialogI.

virtual PluginClass::ClassIdC get_class_id | ( |  | ) | `[virtual]`

| Returns the class ID if the dialog. Implements CommonDialogI.

virtual const PajaTypes::ColorC& get_color | ( |  | ) | const`[virtual]`

| Returns the selected color (use after calling do_modal()).

virtual void set_caption | ( | const char * | szName | ) | `[virtual]`

| Sets the caption of the dialog, use before calling do_modal().

virtual void set_color | ( | const PajaTypes::ColorC & | rCol | ) | `[virtual]`

| Sets the initial color fo the dialog, use before calling do_modal().

virtual void set_parent_wnd | ( | HWND | hParent | ) | `[virtual]`

| Sets the parent window handle, use before calling do_modal().