diff options
author | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-09-02 00:39:06 +0000 |
---|---|---|
committer | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-09-02 00:39:06 +0000 |
commit | e41621d535a6948b191396f9063f6bd17bb9e381 (patch) | |
tree | c0a918b22de1a874ebdf42fc1a5b82f806eb0a34 /src/submenunode.cpp | |
parent | 024b9daf038ab85fe5d64b46d9d8dc0f172b4537 (diff) | |
download | vdr-plugin-menuorg-e41621d535a6948b191396f9063f6bd17bb9e381.tar.gz vdr-plugin-menuorg-e41621d535a6948b191396f9063f6bd17bb9e381.tar.bz2 |
Added Double Dispatch / Visitor Pattern to MenuNode in preparation of menu structure setup.
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/menuorg/trunk@6120 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
Diffstat (limited to 'src/submenunode.cpp')
-rw-r--r-- | src/submenunode.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/submenunode.cpp b/src/submenunode.cpp index eb423b8..27b7526 100644 --- a/src/submenunode.cpp +++ b/src/submenunode.cpp @@ -24,18 +24,26 @@ #include <vdr/osdbase.h> #include "osditemdefinition.h" #include "childlock.h" +#include "imenunodeprocessor.h" -SubMenuNode::SubMenuNode(std::string text) +using namespace std; + +SubMenuNode::SubMenuNode(string text) { _text = text; } -IMenuItemDefinition* SubMenuNode::CreateMenuItemDefinition() +string SubMenuNode::Text() { - return new OsdItemDefinition(new cOsdItem(_text.c_str(), osUser1)); + return _text; } bool SubMenuNode::IsHidden() { return ChildLock::IsMenuHidden(_text.c_str()); } + +void SubMenuNode::Process(IMenuNodeProcessor* menuNodeProcessor) +{ + menuNodeProcessor->ProcessSubMenuNode(this); +} |