/* * DisplayMenuItem.cpp * * Created on: Dec 14, 2009 * Author: crueger */ #include #include #include "Menu/DisplayMenuItem.hpp" #include "Views/StringView.hpp" DisplayMenuItem::DisplayMenuItem(Menu* _menu, StringView *_view): MenuItem('\0',"",_menu), view(_view), title("") { } DisplayMenuItem::DisplayMenuItem(Menu* _menu, StringView *_view, string _title, char _spacer, int _length ): MenuItem('\0',"",_menu), view(_view), title(_title), spacer(_spacer), length(_length) { } DisplayMenuItem::~DisplayMenuItem() { // TODO Auto-generated destructor stub } void DisplayMenuItem::doTrigger(){} bool DisplayMenuItem::checkTrigger(char c){ return false; } const string DisplayMenuItem::formatEntry(){ stringstream s; if(title.length()>0) { int pre = floor((length-title.length())/2.0); int post = ceil((length-title.length())/2.0); for(int i=0;itoString(); return s.str(); } const string DisplayMenuItem::getDescription(){ return string(""); }