Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6131: Refactor MediaBrowser to be compatible with the IUserControl i…
…nterfaces Separate module implementation from the control. Remove the imediabrowser.h interface that is no longer needed, it's been replaced by a MessageBus request.
- Loading branch information
1 parent
fc403bc
commit 9ed1396
Showing
13 changed files
with
205 additions
and
230 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 was deleted.
Oops, something went wrong.
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,40 @@ | ||
#pragma once | ||
|
||
#include "imessagebus.h" | ||
#include "iradiant.h" | ||
|
||
namespace ui | ||
{ | ||
|
||
/** | ||
* Request to focus a specific material in the MediaBrowser | ||
*/ | ||
class FocusMaterialRequest : | ||
public radiant::IMessage | ||
{ | ||
private: | ||
std::string _requestedMaterial; | ||
public: | ||
FocusMaterialRequest(const std::string& material) : | ||
_requestedMaterial(material) | ||
{} | ||
|
||
std::size_t getId() const override | ||
{ | ||
return Type::FocusMaterialRequest; | ||
} | ||
|
||
const std::string& getRequestedMaterial() const | ||
{ | ||
return _requestedMaterial; | ||
} | ||
|
||
// Convenience method | ||
static void Send(const std::string& material) | ||
{ | ||
FocusMaterialRequest msg(material); | ||
GlobalRadiantCore().getMessageBus().sendMessage(msg); | ||
} | ||
}; | ||
|
||
} |
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.