CControlSpliceService



Implements control splice service. You may use it as a base class for your control splice service and overwrite the only needed methods. By default all methods of this class just call corresponding methods of the service specified at construction time.

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

class CControlSpliceService :public virtual IControlService
{
public:
    // Getters
    PointF getSizeRequested() override;

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

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

    // State change notifications
    void NotifyOnAttach() override;
    void NotifyOnDetaching() override;
    void NotifyOnDetach() override;

    // Component notifications
    void NotifyOnComponentAttach(IComponent *component) override;
    void NotifyOnComponentDetach(IComponent *component) override;
    void NotifyOnComponentChange(IComponent *component) override;

    // Control notifications
    void NotifyOnControlAttach(IControl *control) override;
    void NotifyOnControlDetach(IControl *control) override;
    void NotifyOnControlChange(IControl *control) override;
    void NotifyOnControlSetFocus(IControl *control, const MESSAGE_FOCUS &m) override;
    void NotifyOnControlKillFocus(IControl *control) override;
    void NotifyOnControlSetCaptureKeyboard(IControl *control) override;
    void NotifyOnControlKillCaptureKeyboard(IControl *control) override;
    void NotifyOnControlSetCaptureMouse(IControl *control) override;
    void NotifyOnControlKillCaptureMouse(IControl *control) override;
    void NotifyOnControlSetModal(IControl *control) override;
    void NotifyOnControlKillModal(IControl *control) override;

    // Other input notifications
    void NotifyOnHotkey(const MESSAGE_HOTKEY &m) override;

    // Application notifications
    void NotifyOnApplicationActivate() override;
    void NotifyOnApplicationDeactivate() override;
    void NotifyOnTimeChange() override;
    void NotifyOnInputLanguageChange() override;
    void NotifyOnDisplayChange(const MESSAGE_SIZE &m) override;
    void NotifyOnThemeChange() override;
    void NotifyOnClipboardUpdate() override;
    // Since 2.0.0
    void NotifyOnTranslateChange() override;

    // Form/window notifications
    void NotifyOnFormActivate(const MESSAGE_WINDOW_ACTIVATE &m) override;
    void NotifyOnFormDeactivate() override;
    void NotifyOnFormSetFocus() override;
    void NotifyOnFormKillFocus() override;
    void NotifyOnFormEnable() override;
    void NotifyOnFormDisable() override;
    void NotifyOnFormShow() override;
    void NotifyOnFormHide() override;
    void NotifyOnFormMove(const MESSAGE_POSITION &m) override;
    void NotifyOnFormRestore(const MESSAGE_SIZE &m) override;
    void NotifyOnFormMinimize(const MESSAGE_SIZE &m) override;
    void NotifyOnFormMaximize(const MESSAGE_SIZE &m) override;
    void NotifyOnFormEnterSizeMove() override;
    void NotifyOnFormExitSizeMove() override;

    // Dialog box notifications(since 9.0.0)
    void NotifyOnDialogBoxActivate(IDialogBox *control) override;
    void NotifyOnDialogBoxDeactivate(IDialogBox *control) 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;

    CControlSpliceService(IControl *control); // Specify control which service should be spliced(replaced) by this one. Control is assumed to be valid, empty value should not be used. Also control should return valid service via QueryService() method. Empty service is unacceptable
    virtual ~CControlSpliceService(); // Restore control original service and destroy itself. If control's service was spliced several times, restore only own splicing changes. It allows to work propertly with multiple splicing
};
Namespace: nitisa
Include: Nitisa/Core/ControlSpliceService.h