Add: data parameter in Window::Close method.

This allows passing data when closing a window, e.g. to indicate how it was closed.
This commit is contained in:
2023-10-13 12:59:15 +01:00
committed by Peter Nelson
parent cda6f24fe8
commit f379b31e28
28 changed files with 50 additions and 50 deletions

View File

@@ -73,13 +73,13 @@ void SetWindowDirty(WindowClass cls, T number)
SetWindowDirty(cls, static_cast<typename T::BaseType>(number));
}
void CloseWindowById(WindowClass cls, WindowNumber number, bool force = true);
void CloseWindowByClass(WindowClass cls);
void CloseWindowById(WindowClass cls, WindowNumber number, bool force = true, int data = 0);
void CloseWindowByClass(WindowClass cls, int data = 0);
template<typename T, std::enable_if_t<std::is_base_of<StrongTypedefBase, T>::value, int> = 0>
void CloseWindowById(WindowClass cls, T number, bool force = true)
void CloseWindowById(WindowClass cls, T number, bool force = true, int data = 0)
{
CloseWindowById(cls, static_cast<typename T::BaseType>(number), force);
CloseWindowById(cls, static_cast<typename T::BaseType>(number), force, data);
}
bool EditBoxInGlobalFocus();