Add wxActivateEvent::GetActivationReason().
This method is implemented for wxMSW-only currently and allows to check whether the window is being activated by a mouse click or in some other way there. Closes #15516. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2976,16 +2976,46 @@ public:
|
||||
class wxActivateEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Specifies the reason for the generation of this event.
|
||||
|
||||
See GetActivationReason().
|
||||
|
||||
@since 3.0
|
||||
*/
|
||||
enum Reason
|
||||
{
|
||||
/// Window activated by mouse click.
|
||||
Reason_Mouse,
|
||||
/// Window was activated with some other method than mouse click.
|
||||
Reason_Unknown
|
||||
};
|
||||
|
||||
/**
|
||||
Constructor.
|
||||
*/
|
||||
wxActivateEvent(wxEventType eventType = wxEVT_NULL, bool active = true,
|
||||
int id = 0);
|
||||
int id = 0, Reason ActivationReason = Reason_Unknown);
|
||||
|
||||
/**
|
||||
Returns @true if the application or window is being activated, @false otherwise.
|
||||
*/
|
||||
bool GetActive() const;
|
||||
|
||||
/**
|
||||
Allows to check if the window was activated by clicking it with the
|
||||
mouse or in some other way.
|
||||
|
||||
This method is currently only implemented in wxMSW and returns @c
|
||||
Reason_Mouse there if the window was activated by a mouse click and @c
|
||||
Reason_Unknown if it was activated in any other way (e.g. from
|
||||
keyboard or programmatically).
|
||||
|
||||
Under all the other platforms, @c Reason_Unknown is always returned.
|
||||
|
||||
@since 3.0
|
||||
*/
|
||||
Reason GetActivationReason() const;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user