Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5128: Add ComponentSelectionModeToggleRequest to make it interceptab…
…le by client code. Move SelectionSystem interface to selection namespace. Move ComponentSelectionMode enumeration to selection namespace and refactor the references.
- Loading branch information
1 parent
e817477
commit b1d91be
Showing
56 changed files
with
305 additions
and
222 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma once | ||
|
||
#include "imessagebus.h" | ||
#include "iselection.h" | ||
|
||
namespace selection | ||
{ | ||
|
||
/** | ||
* Message sent out by the main selection system when the user | ||
* hits a shortcut to toggle the component selection mode. | ||
* This gives listeners a chance to react to the request | ||
* before it is handled by the RadiantSelectionSystem itself. | ||
* Unhandled requests will be processed as usual. | ||
*/ | ||
class ComponentSelectionModeToggleRequest : | ||
public radiant::IMessage | ||
{ | ||
private: | ||
bool _handled; | ||
ComponentSelectionMode _mode; | ||
|
||
public: | ||
ComponentSelectionModeToggleRequest(ComponentSelectionMode mode) : | ||
_handled(false), | ||
_mode(mode) | ||
{} | ||
|
||
std::size_t getId() const override | ||
{ | ||
return Type::ComponentSelectionModeToggleRequest; | ||
} | ||
|
||
ComponentSelectionMode getMode() const | ||
{ | ||
return _mode; | ||
} | ||
|
||
// Handled requests will not be processed by the selection system | ||
void setHandled(bool handled) | ||
{ | ||
_handled = true; | ||
} | ||
|
||
// TRUE whether this request has been handled | ||
bool isHandled() const | ||
{ | ||
return _handled; | ||
} | ||
}; | ||
|
||
} |
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
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
Oops, something went wrong.