class CCL::ControlBox

Overview

Box for controls. More…

#include <viewbox.h>

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

    ControlBox (IView* view = nullptr);

    ControlBox (
        UIDRef classID,
        IParameter* param = nullptr,
        RectRef size = Rect (),
        StyleRef style = 0,
        StringRef title = nullptr
    );

    // methods

    void setParameter (IParameter* param);
    IParameter* getParameter () const;
};

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 controls.

Construction

ControlBox (
    UIDRef classID,
    IParameter* param = nullptr,
    RectRef size = Rect (),
    StyleRef style = 0,
    StringRef title = nullptr
)

Create and initialize new control of given class.

Be careful, ControlBox does not own the newly created view object!