CDialogBoxEx



Implements DialogBoxEx control.

You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.

class CDialogBoxEx :public virtual IDialogBoxEx, public CDialogBox
{
public:
    enum STATE // States of elements 
    {
        stNormal, // Normal state 
        stActive, // Dialog box is active 
        stModal, // Dialog box is modal(and most probably active as well) 
        stBlinking, // Blinking 
        stDisabled, // Disabled 
    };

    enum BUTTON_STATE // Button states 
    {
        bsNormal, // Normal 
        bsHovered, // Mouse over button 
        bsDown, // Mouse was down over button 
        bsDownHovered,  // Mouse was down over button and is currently over it 
        bsDisabled // Disabled 
    };
public:
    // IControl getters 
    RectF getClientRect() override;
    RectF getRenderRect() override;
    CURSOR_TYPE getCursor() override;

    // IControl setters
    bool setAlign(const ALIGN value) override; // Not allowed 
    bool setDPI(const Point &value) override;

    // IControl methods 
    void Refresh(const bool refresh_children) override;

    // IDialogBox getters 
    Color getBackgroundColor() override;
    String getCaption() override;
    WINDOW_STATE getState() override;
    RectF getBorderWidth() override; // Return padding 
    bool hasCloseBox() override;
    bool hasMaximizeBox() override;
    bool hasMinimizeBox() override;
    bool hasSizeBox() override;
    bool hasSystemMenu() override;
    bool hasBorder() override;
    bool hasCaption() override;
    bool isPopup() override;

    // IDialogBox setters 
    bool setBackgroundColor(const Color &value) override;
    bool setCaption(const String &value) override;
    bool setClientSize(const Point &value) override; // Set notmal state and required size so that controls client size becomes equal to specified one 
    bool setState(const WINDOW_STATE value) override;
    bool setBorderWidth(const RectF &value) override; // Set padding 
    bool setHasCloseBox(const bool value) override;
    bool setHasMaximizeBox(const bool value) override;
    bool setHasMinimizeBox(const bool value) override;
    bool setHasSizeBox(const bool value) override;
    bool setHasSystemMenu(const bool value) override;
    bool setHasBorder(const bool value) override;
    bool setHasCaption(const bool value) override;
    bool setIsPopup(const bool value) override;

    // IDialogBox actions 
    bool Maximize() override;
    bool Minimize() override;
    bool Restore() override;
    bool Hide() override;

    // IDialogBoxEx actions 
    void AutoResize(const bool transform) override;

    CDialogBoxEx(const String &class_name, const bool accept_form, const bool accept_control, const bool accept_focus, const bool tab_stop, const Point &design_dpi = { 96, 96 });
    CDialogBoxEx();
    CDialogBoxEx(IControl *parent);
    CDialogBoxEx(IForm *parent);

    STATE getControlState(); // Return current control state 
    bool isUseMask() const; // Return whether mask should be used to clip child controls 
    Gradient *getBackgroundGradient(const STATE state); // Return background gradient depending on state 
    float getCaptionHeight() const; // Return caption area height 
    RectF getCaptionPadding() const; // Return caption padding on caption area 
    TEXT_ALIGN getCaptionHorizontalAlign() const; // Return caption horizontal alignment 
    VERTICAL_ALIGN getCaptionVerticalAlign() const; // Return caption vertical alignment 
    Color getCaptionColor(const STATE state) const; // Return caption color area background depending on state 
    Gradient *getCaptionGradient(const STATE state); // Return caption area background gradient depending on state 
    Color getCaptionTextColor(const STATE state) const; // Return caption color depending on state 
    RectF getBorderRadius(const WINDOW_STATE state) const; // Return border radius depending on state 
    RectF getResizeBorderWidth() const; // Return resize border width. Border widthes used to resize control. Used only in wsNormal state 
    RectF getMargin() const; // Return margin which is blank space outside control 
    RectF getRimWidth(const WINDOW_STATE state) const; // Return border width depending on state 
    RectF getPadding() const; // Return padding 
    RectC getBorderColor(const STATE state) const; // Return border color depending on state 
    PointF getButtonSize() const; // Return button size 
    RectF getButtonPadding() const; // Return button padding 
    RectF getButtonBorderWidth() const; // Return button border width 
    RectF getButtonBorderRadius() const; // Return button border radius 
    RectC getButtonBorderColor(const BUTTON_STATE state) const; // Return button border color depending on state 
    Color getButtonBackgroundColor(const BUTTON_STATE state) const; // Return button background color depending on state 
    Gradient *getButtonBackgroundGradient(const BUTTON_STATE state); // Return button background gradient depending on state 
    IImageList *getButtonIcons(); // Return button icons image list 
    int getCloseIconIndex(const BUTTON_STATE state) const; // Return index of close icon in button image list depending on state 
    int getMinimizeIconIndex(const BUTTON_STATE state) const; // Return index of minimize icon in button image list depending on state 
    int getMaximizeIconIndex(const BUTTON_STATE state) const; // Return index of maximize icon in button image list depending on state 
    int getRestoreIconIndex(const BUTTON_STATE state) const; // Return index of restore icon in button image list depending on state 
    bool isUseDefaultCloseIcon() const; // Return whether default close button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    bool isUseDefaultMinimizeIcon() const; // Return whether default minimize button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    bool isUseDefaultMaximizeIcon() const; // Return whether default maximize button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    bool isUseDefaultRestoreIcon() const; // Return whether default restore button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    Color getShadowColor(const STATE state) const; // Return shadow color depending on state 
    int getShadowRadius(const STATE state) const; // Return shadow radius depending on state 
    PointF getShadowShift(const STATE state) const; // Return shadow shift depending on state 
    float getMinimizedWidth() const; // Return control width in minimized state 
    RectF getIconPadding() const; // Return system icon padding 
    IImageList *getIcons(); // Return image list where system icon is 
    int getIconIndex(const STATE state) const; // Return index of system icon in system icon image list 
    float getBlinkInterval() const; // Return blinking interval 
    int getBlinkCount() const; // Return number of blinks. <=0 means no blinking 

    bool setUseMask(const bool value); // Set whether mask should be used to clip child controls 
    bool setCaptionHeight(const float value); // Set caption area height 
    bool setCaptionPadding(const RectF &value); // Set caption padding on caption area 
    bool setCaptionHorizontalAlign(const TEXT_ALIGN value); // Set caption horizontal alignment 
    bool setCaptionVerticalAlign(const VERTICAL_ALIGN value); // Set caption vertical alignment 
    bool setCaptionColor(const STATE state, const Color &value); // Set caption color area background depending on state 
    bool setCaptionTextColor(const STATE state, const Color &value); // Set caption color depending on state 
    bool setBorderRadius(const WINDOW_STATE state, const RectF &value); // Set border radius depending on state 
    bool setResizeBorderWidth(const RectF &value); // Set resize border width. Border widthes used to resize control. Used only in wsNormal state 
    bool setMargin(const RectF &value); // Set margin which is blank space outside control 
    bool setRimWidth(const WINDOW_STATE state, const RectF &value); // Set border width depending on state 
    bool setPadding(const RectF &value); // Set padding 
    bool setBorderColor(const STATE state, const RectC &value); // Set border color depending on state 
    bool setButtonSize(const PointF &value); // Set button size 
    bool setButtonPadding(const RectF &value); // Set button padding 
    bool setButtonBorderWidth(const RectF &value); // Set button border width 
    bool setButtonBorderRadius(const RectF &value); // Set button border radius 
    bool setButtonBorderColor(const BUTTON_STATE state, const RectC &value); // Set button border color depending on state 
    bool setButtonBackgroundColor(const BUTTON_STATE state, const Color &value); // Set button background color depending on state 
    bool setButtonIcons(IImageList *value); // Set button icons image list 
    bool setCloseIconIndex(const BUTTON_STATE state, const int value); // Set index of close icon in button image list depending on state 
    bool setMinimizeIconIndex(const BUTTON_STATE state, const int value); // Set index of minimize icon in button image list depending on state 
    bool setMaximizeIconIndex(const BUTTON_STATE state, const int value); // Set index of maximize icon in button image list depending on state 
    bool setRestoreIconIndex(const BUTTON_STATE state, const int value); // Set index of restore icon in button image list depending on state 
    bool setUseDefaultCloseIcon(const bool value); // Set whether default close button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    bool setUseDefaultMinimizeIcon(const bool value); // Set whether default minimize button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    bool setUseDefaultMaximizeIcon(const bool value); // Set whether default maximize button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    bool setUseDefaultRestoreIcon(const bool value); // Set whether default restore button icon should be drawn in case of there is no icon in attached button's icon list or no such list attached 
    bool setShadowColor(const STATE state, const Color &value); // Set shadow color depending on state 
    bool setShadowRadius(const STATE state, const int value); // Set shadow radius depending on state 
    bool setShadowShift(const STATE state, const PointF &value); // Set shadow shift depending on state 
    bool setMinimizedWidth(const float value); // Set control width in minimized state 
    bool setIconPadding(const RectF &value); // Set system icon padding 
    bool setIcons(IImageList *value); // Set image list where system icon is 
    bool setIconIndex(const STATE state, const int value); // Set index of system icon in system icon image list 
    bool setBlinkInterval(const float value); // Set blinking interval 
    bool setBlinkCount(const int value); // Set number of blinks. <=0 means no blinking 
};
Namespace: nitisa::standard
Include: Standard/Controls/DialogBoxEx/DialogBoxEx.h