Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5231: Query the UI module using a custom message to check whether th…
…e application is active or not.
- Loading branch information
1 parent
be0fc77
commit 2804d0b
Showing
7 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#pragma once | ||
|
||
#include "imessagebus.h" | ||
|
||
namespace radiant | ||
{ | ||
|
||
/** | ||
* Message sent to query whether DarkRadiant is active. | ||
* The UI module should respond to this request and set the flag | ||
* in the message instance accordingly, using setApplicationIsActive(). | ||
* | ||
* If no code responds to this query, the application is considered | ||
* active by default. | ||
*/ | ||
class ApplicationIsActiveRequest : | ||
public radiant::IMessage | ||
{ | ||
private: | ||
bool _isActive; | ||
|
||
public: | ||
ApplicationIsActiveRequest() : | ||
_isActive(true) | ||
{} | ||
|
||
std::size_t getId() const override | ||
{ | ||
return Type::ApplicationIsActiveQuery; | ||
} | ||
|
||
void setApplicationIsActive(bool isActive) | ||
{ | ||
_isActive = isActive; | ||
} | ||
|
||
// TRUE if the application is currently active | ||
bool getApplicationIsActive() const | ||
{ | ||
return _isActive; | ||
} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters