class CCL::FormBox

Overview

Box for form views. More…

#include <viewbox.h>

class FormBox: public CCL::ViewBox
{
public:
    // construction

    FormBox (IView* view = nullptr);
    FormBox (RectRef size, StyleRef windowStyle = 0, StringRef title = nullptr);

    // methods

    IForm* getForm () const;
    StyleFlags getWindowStyle () const;
    void setWindowStyle (StyleRef style);
    void setController (IUnknown* controller);
    IWindow* openWindow ();
    void closeWindow ();
    static bool isForm (IView* view);
};

Inherited Members

public:
    // structs

    struct StyleModifier;

    // methods

    UIDRef getClassID () const;
    void setName (StringRef name);
    String getName () const;
    void setTitle (StringRef title);
    String getTitle () const;
    void setTooltip (StringRef title);
    String getTooltip () const;
    void setTooltipTrackingEnabled (bool state);
    bool isTooltipTrackingEnabled () const;
    StyleRef getStyle () const;
    void setStyle (StyleRef style);
    ITheme& getTheme () const;
    void setTheme (ITheme* theme);
    const IVisualStyle& getVisualStyle () const;
    void setVisualStyle (IVisualStyle* visualStyle);
    void setVisualStyle (const IVisualStyle& visualStyle);
    IUnknown* getController () const;
    bool isAttached () const;
    IWindow* getWindow () const;
    int getSizeMode () const;
    void setSizeMode (int flags);
    void disableSizeMode (bool state = true);
    bool isEnabled () const;
    void enable (bool state);
    int getMouseState () const;
    void setMouseState (int state);
    int getThemeElementState () const;
    bool wantsFocus () const;
    void wantsFocus (bool state);
    bool isLayerBackingEnabled () const;
    void setLayerBackingEnabled (bool state);
    IGraphicsLayer* getGraphicsLayer () const;
    bool isAccessibilityEnabled () const;
    void setAccessibilityEnabled (bool state);
    bool getAttribute (Variant& value, const char* id) const;
    bool setAttribute (const char* id, VariantRef value);
    bool setHelpIdentifier (StringRef id);
    RectRef getSize () const;
    void setSize (RectRef size);
    Rect& getClientRect (Rect& r) const;
    bool getVisibleClient (Rect& r) const;
    Coord getWidth () const;
    Coord getHeight () const;
    Point getPosition () const;
    void setPosition (PointRef pos);
    void setSizeLimits (const SizeLimit& sizeLimits);
    const SizeLimit& getSizeLimits () const;
    void setZoomFactor (float factor);
    float getZoomFactor () const;
    Point& clientToWindow (Point& p) const;
    Point& windowToClient (Point& p) const;
    Point& clientToScreen (Point& p) const;
    Point& screenToClient (Point& p) const;
    IView* getParent () const;
    IView* getParent (UIDRef cid) const;
    IView* getViewAt (int index) const;
    int getViewIndex (const IView* childView) const;
    IViewChildren& getChildren () const;
    void autoSize (tbool horizontal = true, tbool vertical = true);
    void redraw ();
    void invalidate ();
    void invalidate (RectRef rect);
    void updateClient ();
    void updateClient (RectRef rect);
    void scrollClient (RectRef rect, PointRef delta);
    bool makeVisible (RectRef rect, tbool relaxed = false);
    bool takeFocus ();
    bool killFocus ();
    void setCursor (IMouseCursor* cursor);
    bool detectDrag (const MouseEvent& event);
    bool detectDoubleClick (const MouseEvent& event);
    ViewBox& operator = (IView* view);
    operator IView * ();
    IView* operator -> ();

    template  <class T>
    T* as ();

    IView* as ();
    static void setModuleTheme (ITheme* theme);
    static ITheme* getModuleTheme ();

Detailed Documentation

Box for form views.

A form can create a window by itself.

Construction

FormBox (RectRef size, StyleRef windowStyle = 0, StringRef title = nullptr)

Construct new form with given size, window style and title.