CFormEditor



Implements FormEditor widget.

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

// Grid is not available if there is child control transformation 
class CFormEditor :public virtual IFormEditor, public CControl
{
public:
    enum SELECTION_STATE // Selection marker states 
    {
        ssNormal, // One element is selected and no mouse transformation is active 
        ssHovered, // One element is selected, no mouse transformation is active and some selection element is hovered 
        ssActive, // One element is selected and mouse transformation is active 
        ssDisabled // More than one elements are selected 
    };
public:
    // IControl getters 
    CURSOR_TYPE getCursor() override;
    IFont *getFont() override;
    IStyle *getStyle() override;
    ITransform *getTransformControls() override;
    bool isShowHint() override;
    float getHintDelay() override;
    PointF getHintShift() override;

    // IControl setters 
    bool setDPI(const Point &value) override;

    // IControl methods 
    bool InsertControl(IControl *control, const int before) override;
    void Refresh(const bool refresh_children) override;

    // IFormEditor getters 
    bool isControlSelected(IControl *control) override;
    bool isComponentSelected(IComponent *component) override;
    PointF getComponentPosition(IComponent *component) override;
    PointF getControlPosition(IControl *control) override;

    // // FormEditor setters 
    bool setComponentPosition(IComponent *component, const PointF &value) override;
    bool setControlPosition(IControl *control, const PointF &value) override;

    // IFormEditor methods 
    bool SelectControl(IControl *control) override;
    bool SelectComponent(IComponent *component) override;
    bool SelectAllControls() override;
    bool SelectAllComponents() override;
    bool SelectAll() override;
    bool DeselectControl(IControl *control) override;
    bool DeselectComponent(IComponent *component) override;
    bool DeselectAllControls() override;
    bool DeselectAllComponents() override;
    bool DeselectAll() override;
    bool DeleteSelected() override;

    CFormEditor();
    CFormEditor(IForm *parent);
    CFormEditor(IControl *parent);

    IForm *getPropertySource(); // Return assigned form to be used to get some properties 
    Color getBackgroundColor(); // Return background color 
    Gradient *getBackgroundGradient(); // Return background gradient 
    float getSelectionSize() const; // Return selection markers size 
    Color getSelectionColor(const SELECTION_STATE state) const; // Return selection markers color depending on state 
    PointB getGridEnabled() const; // Return whether the move grid is enabled 
    PointF getGridSize() const; // Return the move grid steps 
    float getGridPointSize() const; // Return grid point size 
    Color getGridPointColor() const; // Return grid point color 
    bool isRotateGridEnabled() const; // Return whether rotation grid enabled 
    float getRotateGridSize() const; // Return rotation grid step 
    bool isUseMask() const; // Return whether clipping mask should be used 
    float getRotateShift() const; // Return rotation marker shift 
    float getSelectionBorderWidth() const; // Return border width of selection rectangle 
    Color getSelectionBorderColor() const; // Return border color of selection rectangle 
    Color getSelectionBackgroundColor() const; // Return background color of selection rectangle 

    bool setPropertySource(IForm *value); // Assign form to be used to get some properties 
    bool setBackgroundColor(const Color &value); // Set background color 
    bool setSelectionSize(const float value); // Set selection markers size 
    bool setSelectionColor(const SELECTION_STATE state, const Color &value); // Set selection markers color depending on state 
    bool setGridEnabled(const PointB &value); // Set whether the move grid enabled 
    bool setGridSize(const PointF &value); // Set the move grid steps 
    bool setGridPointSize(const float value); // Set grid point size 
    bool setGridPointColor(const Color &value); // Set grid point color 
    bool setRotateGridEnabled(const bool value); // Set whether rotation grid enabled 
    bool setRotateGridSize(const float value); // Set rotation grid step 
    bool setUseMask(const bool value); // Set whether clipping mask should be used 
    bool setRotateShift(const float value); // Set rotate marker shift 
    bool setSelectionBorderWidth(const float value); // Set border width of selection rectangle 
    bool setSelectionBorderColor(const Color &value); // Set border color of selection rectangle 
    bool setSelectionBackgroundColor(const Color &value); // Set background color of selection rectangle 
};
Namespace: nitisa::ide
Include: Ide/Controls/FormEditor/FormEditor.h