CControlService



This class implements basic control service. Use it as a base class for service of your control. Usually you will override only FreeResources and only used notifications.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CControlService :public virtual IControlService, public CComponentService
{
public:
    CControlService(CControl *control); // Constructor

    // Getters 
    PointF getSizeRequested() override;

    // Setters 
    void setParent(IControl *value) override;
    void setTabOrder(const int value) override;
    void setSize(const PointF &value) override;

    // Helpers 
    void FreeResources() override;
    void AdjustSize() override;
    bool MoveControl(IControl *control, const int before) override;
    void SendChangeNotification() override;
    void AlignControls() override;
    void InsertControl(IControl *control, const int before) override;

    // Notifications from parent control 
    void NotifyOnParentStyleChange() override;
    void NotifyOnParentFontChange() override;
    void NotifyOnParentResize() override;
    void NotifyOnParentTransform() override;
    void NotifyOnParentTransformControls() override;

    // Notifications from child controls 
    void NotifyOnChildStyleChange(IControl *control) override;
    void NotifyOnChildFontChange(IControl *control) override;
    void NotifyOnChildTransform(IControl *control) override;
    void NotifyOnChildResize(IControl *control) override;
    void NotifyOnChildShow(IControl *control) override;
    void NotifyOnChildHide(IControl *control) override;
    void NotifyOnChildAttach(IControl *control) override;
    void NotifyOnChildDetach(IControl *control) override;
    void NotifyOnChildEnable(IControl *control) override;
    void NotifyOnChildDisable(IControl *control) override;

    // State change notifications 
    void NotifyOnShow() override;
    void NotifyOnHide() override;
    void NotifyOnEnable() override;
    void NotifyOnDisable() override;
    void NotifyOnResize() override;
    void NotifyOnTransform() override;
    void NotifyOnTransformControls() override;
    void NotifyOnStyleChange() override;
    void NotifyOnFontChange() override;
    void NotifyOnSetModal() override;
    void NotifyOnKillModal() override;
    void NotifyOnSetFocus(const MESSAGE_FOCUS &m) override;
    void NotifyOnKillFocus() override;
    void NotifyOnSetCaptureKeyboard() override;
    void NotifyOnKillCaptureKeyboard() override;
    void NotifyOnSetCaptureMouse() override;
    void NotifyOnKillCaptureMouse() override;
    void NotifyOnActivate() override;
    void NotifyOnDeactivate() override;

    // Paint notifications 
    void NotifyOnPaint(const MESSAGE_PAINT &m, bool &draw_children) override;
    void NotifyOnPaintEnd(const MESSAGE_PAINT &m) override;

    // Keyboard input notifications 
    void NotifyOnKeyDown(const MESSAGE_KEY &m, bool &processed) override;
    void NotifyOnKeyUp(const MESSAGE_KEY &m, bool &processed) override;
    void NotifyOnChar(const MESSAGE_CHAR &m, bool &processed) override;
    void NotifyOnDeadChar(const MESSAGE_CHAR &m, bool &processed) override;

    // Mouse input notifications 
    void NotifyOnMouseHover(const MESSAGE_POSITION &m) override;
    void NotifyOnMouseLeave() override;
    void NotifyOnMouseMove(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnLeftMouseButtonDown(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnLeftMouseButtonUp(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnLeftMouseButtonDoubleClick(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnRightMouseButtonDown(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnRightMouseButtonUp(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnRightMouseButtonDoubleClick(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnMiddleMouseButtonDown(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnMiddleMouseButtonUp(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnMiddleMouseButtonDoubleClick(const MESSAGE_MOUSE &m, bool &processed) override;
    void NotifyOnMouseVerticalWheel(const MESSAGE_MOUSE_WHEEL &m, bool &processed) override;
    void NotifyOnMouseHorizontalWheel(const MESSAGE_MOUSE_WHEEL &m, bool &processed) override;

    // Other input notifications 
    void NotifyOnDropFiles(const MESSAGE_DROP_FILES &m, bool &processed, bool &accepted) override;

    // Clipboard notifications 
    void NotifyOnPasteString(const MESSAGE_PASTE_STRING &m) override;

    // Interceprors 
    bool InterceptSetCursor(IControl *control) override;
    bool InterceptMouseHover(IControl *control) override;
    bool InterceptShowHint(IControl *control, String &hint) override;
    bool InterceptTabOrder() override;
    bool InterceptHotkeys(IControl *control, const MESSAGE_HOTKEY &m) override;
    bool InterceptKeyDown(IControl *control, const MESSAGE_KEY &m) override;
    bool InterceptKeyUp(IControl *control, const MESSAGE_KEY &m) override;
    bool InterceptChar(IControl *control, const MESSAGE_CHAR &m) override;
    bool InterceptDeadChar(IControl *control, const MESSAGE_CHAR &m) override;
    bool InterceptMouseMove(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptLeftMouseButtonDown(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptLeftMouseButtonUp(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptLeftMouseButtonDoubleClick(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptMiddleMouseButtonDown(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptMiddleMouseButtonUp(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptMiddleMouseButtonDoubleClick(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptRightMouseButtonDown(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptRightMouseButtonUp(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptRightMouseButtonDoubleClick(IControl *control, const MESSAGE_MOUSE &m) override;
    bool InterceptMouseVerticalWheel(IControl *control, const MESSAGE_MOUSE_WHEEL &m) override;
    bool InterceptMouseHorizontalWheel(IControl *control, const MESSAGE_MOUSE_WHEEL &m) override;
    bool InterceptDropFiles(IControl *control, const MESSAGE_DROP_FILES &m) override;
    bool InterceptFocus(IControl *control, const FOCUSED_BY focused_by) override;
};
Namespace: nitisa
Include: Nitisa/Core/ControlService.h