Archicad 28 C++ API
Loading...
Searching...
No Matches
API_IWindowEventHandler Class Referenceabstract

The base class you need to inherit from in case you want to handle window change events. More...

#include <APIdefs_Callback.h>

Inheritance diagram for API_IWindowEventHandler:
API_IEventHandler

Public Member Functions

virtual GS::UniString GetName () const override final
 
virtual void Dispatch (const API_IEventNotifier &eventNotifier) const override final
 It dispatches the event.
 
virtual void OnWindowBroughtForward (const API_WindowInfo &window) const =0
 Event handler for window brought forward event.
 
virtual void OnWindowSentBackward (const API_WindowInfo &window) const =0
 Event handler for window sent backward event.
 
virtual GS::UniString GetName () const =0
 
virtual void Dispatch (const API_IEventNotifier &eventNotifier) const =0
 It dispatches the event.
 

Detailed Description

The base class you need to inherit from in case you want to handle window change events.

Since
Archicad 28

Member Function Documentation

◆ Dispatch()

virtual void API_IWindowEventHandler::Dispatch ( const API_IEventNotifier eventNotifier) const
inlinefinaloverridevirtual

It dispatches the event.

Parameters
eventNotifierThe occurrence of an event can be notified via this parameter.

Implements API_IEventHandler.

◆ GetName()

virtual GS::UniString API_IWindowEventHandler::GetName ( ) const
inlinefinaloverridevirtual
Returns
Human readable name of the event handler.

Implements API_IEventHandler.

◆ OnWindowBroughtForward()

virtual void API_IWindowEventHandler::OnWindowBroughtForward ( const API_WindowInfo window) const
pure virtual

Event handler for window brought forward event.

Warning
Avoid complex operations in this function. It could cause significant slowdowns
Parameters
[in]windowThe window brought forward

The function called on windows gaining top status. This event is only triggered by windows (Floorplan, 3D, Section, etc.) and does not consider palettes or dialogs. OnWindowBroughtForward is usually received after an OnWindowSentBackward event, except when all windows are closed. Closing all windows will not result in a OnWindowBroughtForward event.

Remarks
Note that in case of the parameter only the fields which are necessary to identify the window type and the database behind the windows are filled out (similarly to ACAPI_Window_GetCurrentWindow). In order to retrieve the additional parameters of the database (title, name, ref, masterLayoutUnId) call the ACAPI_Window_GetDatabaseInfo function with the databaseUnId of the window.

◆ OnWindowSentBackward()

virtual void API_IWindowEventHandler::OnWindowSentBackward ( const API_WindowInfo window) const
pure virtual

Event handler for window sent backward event.

Warning
Avoid complex operations in this function. It could cause significant slowdowns
Parameters
[in]windowThe window sent backward

The function called on windows losing top status. This event is only triggered by windows (Floorplan, 3D, Section, etc.) and does not consider palettes or dialogs. OnWindowSentBackward is usually received before an OnWindowBroughtForward event, except opening the first window. Opening the first window will not result in a OnWindowSentBackward event.

Remarks
Note that in case of the parameter only the fields which are necessary to identify the window type and the database behind the windows are filled out (similarly to ACAPI_Window_GetCurrentWindow). In order to retrieve the additional parameters of the database (title, name, ref, masterLayoutUnId) call the ACAPI_Window_GetDatabaseInfo function with the databaseUnId of the window.