mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
feat: Add EventViewClosed event (#2377)
Where one door opens, another one closes (said someone) and in this situation i mean view, because there's no event for closing a view only opening one, so please add this :c ### Problem description Simply adds an **EventViewClosed** to match the pre-existing **EventViewOpened**. Also fixes the issue where EventViewOpened wouldn't trigger for windows that were popups (even if they are technically a View. ### Implementation description I mirrored the current functionality of EventViewOpened for closing. --------- Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
This commit is contained in:
@@ -9,13 +9,10 @@ namespace hex { class View; }
|
||||
|
||||
/* GUI events definitions */
|
||||
namespace hex {
|
||||
|
||||
/**
|
||||
* @brief Signals a newly opened window
|
||||
* @brief Signals a newly opened view
|
||||
*
|
||||
* This event is sent when the window has just been opened and docked by the Window manager.
|
||||
*
|
||||
* FIXME: In the event that a newly created window is already docked, this will not be sent.
|
||||
* This event is sent when the view has just been opened by the Window manager.
|
||||
*
|
||||
* FIXME: This is currently only used for the introduction tutorial.
|
||||
* If the event's only purpose is this, maybe rename it?
|
||||
@@ -24,6 +21,15 @@ namespace hex {
|
||||
*/
|
||||
EVENT_DEF(EventViewOpened, View*);
|
||||
|
||||
/**
|
||||
* @brief Signals a newly closed view
|
||||
*
|
||||
* This event is sent when the view has just been closed.
|
||||
*
|
||||
* @param view the closed view reference
|
||||
*/
|
||||
EVENT_DEF(EventViewClosed, View*);
|
||||
|
||||
/**
|
||||
* @brief Signals a change in the DPI scale.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user