IWindowListener



Describes window listener. You may set it to window to receive notifications about events happend to window or system. Form sets listener to associated window. What each event means is pretty clear from it name, so we don't provide additional description here. You may have a look at form service. There are corresponding notifications with descriptions.

You can find more information in comments below.

class IWindowListener : public virtual IWindowListenerOnMessage
{
public:
    virtual void OnCreate() = 0;
    virtual void OnDestroy() = 0;
    virtual void OnActivate(const MESSAGE_WINDOW_ACTIVATE &m) = 0;
    virtual void OnDeactivate() = 0;
    virtual void OnSetFocus() = 0;
    virtual void OnKillFocus() = 0;
    virtual void OnEnable() = 0;
    virtual void OnDisable() = 0;
    virtual void OnClose(CLOSE_ACTION &action) = 0;
    virtual void OnShow() = 0;
    virtual void OnHide() = 0;
    virtual void OnActivateApp() = 0;
    virtual void OnDeactivateApp() = 0;
    virtual void OnMove(const MESSAGE_POSITION &m) = 0;
    virtual void OnRestore(const MESSAGE_SIZE &m) = 0;
    virtual void OnMinimize(const MESSAGE_SIZE &m) = 0;
    virtual void OnMaximize(const MESSAGE_SIZE &m) = 0;
    virtual void OnResizing(const MESSAGE_WINDOW_RESIZING &m) = 0;
    virtual void OnMoving(const MESSAGE_RECT &m) = 0;
    virtual void OnEnterSizeMove() = 0;
    virtual void OnExitSizeMove() = 0;
    virtual void OnKeyDown(const MESSAGE_KEY &m) = 0;
    virtual void OnKeyUp(const MESSAGE_KEY &m) = 0;
    virtual void OnChar(const MESSAGE_CHAR &m) = 0;
    virtual void OnDeadChar(const MESSAGE_CHAR &m) = 0;
    virtual void OnHScroll(const MESSAGE_WINDOW_SCROLL &m) = 0;
    virtual void OnVScroll(const MESSAGE_WINDOW_SCROLL &m) = 0;
    virtual void OnGestureZoom(const MESSAGE_POSITION &m) = 0;
    virtual void OnGesturePan(const MESSAGE_POSITION &m) = 0;
    virtual void OnGestureRotate(const MESSAGE_POSITION &m) = 0;
    virtual void OnGestureTwoFingerTap(const MESSAGE_POSITION &m) = 0;
    virtual void OnGesturePressAndTap(const MESSAGE_POSITION &m) = 0;
    virtual void OnGestureNotify() = 0;
    virtual void OnMouseMove(const MESSAGE_MOUSE &m) = 0;
    virtual void OnLeftMouseButtonDown(const MESSAGE_MOUSE &m) = 0;
    virtual void OnLeftMouseButtonUp(const MESSAGE_MOUSE &m) = 0;
    virtual void OnLeftMouseButtonDoubleClick(const MESSAGE_MOUSE &m) = 0;
    virtual void OnRightMouseButtonDown(const MESSAGE_MOUSE &m) = 0;
    virtual void OnRightMouseButtonUp(const MESSAGE_MOUSE &m) = 0;
    virtual void OnRightMouseButtonDoubleClick(const MESSAGE_MOUSE &m) = 0;
    virtual void OnMiddleMouseButtonDown(const MESSAGE_MOUSE &m) = 0;
    virtual void OnMiddleMouseButtonUp(const MESSAGE_MOUSE &m) = 0;
    virtual void OnMiddleMouseButtonDoubleClick(const MESSAGE_MOUSE &m) = 0;
    virtual void OnMouseVerticalWheel(const MESSAGE_MOUSE_WHEEL &m) = 0;
    virtual void OnMouseHorizontalWheel(const MESSAGE_MOUSE_WHEEL &m) = 0;
    virtual void OnMouseHover(const MESSAGE_MOUSE &m) = 0;
    virtual void OnMouseLeave() = 0;
    virtual void OnLoseCapture() = 0;
    virtual void OnPaint(const MESSAGE_RECT &m) = 0;
    virtual void OnQueryEndSession(bool &restricted) = 0;
    virtual void OnQueryOpen(bool &restricted) = 0;
    virtual void OnEndSession(const MESSAGE_END_SESSION &m) = 0;
    virtual void OnDeviceModeChange() = 0;
    virtual void OnTimeChange() = 0;
    virtual void OnInputLanguageChangeRequest(bool &restricted) = 0;
    virtual void OnInputLanguageChange() = 0;
    virtual void OnDisplayChange(const MESSAGE_SIZE &m) = 0;
    virtual void OnThemeChanged() = 0;
    virtual void OnClipboardUpdate() = 0;
    virtual void OnDropFiles(const MESSAGE_DROP_FILES &m, bool accepted) = 0;
    virtual void OnTouch(const MESSAGE_TOUCH &m) = 0;
    virtual void OnPasteString(const MESSAGE_PASTE &m) = 0; // Called when paste operation was requested and there is something to paste 
};

Remarks

Below you can find methods' availability/usage information depending on the operating system. Windows is the most powerful and user friendly operating system. Many methods are used under the Windows while only few of them are used on another operating systems.

Option Windows Android Linux
OnCreate + + N/A
OnDestroy + + +
OnActivate + + N/A
OnDeactivate + + N/A
OnSetFocus + + +
OnKillFocus + + +
OnEnable + N/A +
OnDisable + N/A +
OnClose + N/A +
OnShow + + +
OnHide + + +
OnActivateApp + + N/A
OnDeactivateApp + + N/A
OnMove + N/A +
OnRestore + N/A N/A
OnMinimize + N/A N/A
OnMaximize + N/A N/A
OnResizing + + +
OnMoving + N/A N/A
OnEnterSizeMove + N/A N/A
OnExitSizeMove + N/A N/A
OnKeyDown + + +
OnKeyUp + + +
OnChar + N/A +
OnDeadChar + N/A N/A
OnHScroll + N/A N/A
OnVScroll + N/A N/A
OnGestureZoom + N/A N/A
OnGesturePan + N/A N/A
OnGestureRotate + N/A N/A
OnGestureTwoFingerTap + N/A N/A
OnGesturePressAndTap + N/A N/A
OnGestureNotify + N/A N/A
OnMouseMove + + +
OnLeftMouseButtonDown + + +
OnLeftMouseButtonUp + + +
OnLeftMouseButtonDoubleClick + N/A -
OnRightMouseButtonDown + + +
OnRightMouseButtonUp + + +
OnRightMouseButtonDoubleClick + N/A -
OnMiddleMouseButtonDown + N/A +
OnMiddleMouseButtonUp + N/A +
OnMiddleMouseButtonDoubleClick + N/A -
OnMouseVerticalWheel + N/A +
OnMouseHorizontalWheel + N/A N/A
OnMouseHover + N/A +
OnMouseLeave + N/A +
OnLoseCapture + N/A N/A
OnPaint + + +
OnQueryEndSession + N/A N/A
OnQueryOpen + N/A N/A
OnEndSession + N/A N/A
OnDeviceModeChange + + N/A
OnTimeChange + N/A N/A
OnInputLanguageChangeRequest + N/A N/A
OnInputLanguageChange + N/A N/A
OnDisplayChange + N/A N/A
OnThemeChanged + N/A N/A
OnClipboardUpdate + N/A N/A
OnDropFiles + N/A -
OnTouch + N/A N/A
OnPasteString + N/A +

Where:

+ - available
- - not used
N/A - not available on the platform

Namespace: nitisa
Include: Nitisa/Interfaces/IWindow.h