diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-06-05 15:27:09 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-06-05 15:27:09 +0100 |
| commit | 88493962ebb65a6b58c80b496521d7c1753bb610 (patch) | |
| tree | f79e013964017f0cb12de4229573a056e5e0f977 /UnityCore | |
| parent | ee3c2a1e2efeb2f4d59aa8f35a5cb0ad70c9ac84 (diff) | |
Indicators: add a method to get the active entry
(bzr r3964.6.1)
Diffstat (limited to 'UnityCore')
| -rw-r--r-- | UnityCore/Indicators.cpp | 9 | ||||
| -rw-r--r-- | UnityCore/Indicators.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/UnityCore/Indicators.cpp b/UnityCore/Indicators.cpp index b66b271c0..6b929dcbf 100644 --- a/UnityCore/Indicators.cpp +++ b/UnityCore/Indicators.cpp @@ -27,9 +27,8 @@ namespace unity namespace indicator { -class Indicators::Impl +struct Indicators::Impl { -public: typedef std::unordered_map<std::string, Indicator::Ptr> IndicatorMap; Impl(Indicators* owner) @@ -49,7 +48,6 @@ public: Entry::Ptr GetEntry(std::string const& entry_id); -private: Indicators* owner_; IndicatorMap indicators_; Entry::Ptr active_entry_; @@ -93,6 +91,11 @@ void Indicators::RemoveIndicator(std::string const& name) return pimpl->RemoveIndicator(name); } +Entry::Ptr const& Indicators::GetActiveEntry() const +{ + return pimpl->active_entry_; +} + void Indicators::Impl::ActivateEntry(std::string const& panel, std::string const& entry_id, nux::Rect const& geometry) { if (active_entry_) diff --git a/UnityCore/Indicators.h b/UnityCore/Indicators.h index 3351f9462..cb35450ab 100644 --- a/UnityCore/Indicators.h +++ b/UnityCore/Indicators.h @@ -40,6 +40,7 @@ public: virtual ~Indicators(); IndicatorsList GetIndicators() const; + Entry::Ptr const& GetActiveEntry() const; virtual std::vector<std::string> const& IconPaths() const = 0; virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0; |
