|
Last change
on this file since 3896fc was aa117c, checked in by Tillmann Crueger <crueger@…>, 16 years ago |
|
Added possibility to add default Items to textMenus
|
-
Property mode
set to
100644
|
|
File size:
914 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * SeperatorItem.cpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Dec 11, 2009
|
|---|
| 5 | * Author: crueger
|
|---|
| 6 | */
|
|---|
| 7 | #include <string>
|
|---|
| 8 | #include <sstream>
|
|---|
| 9 |
|
|---|
| 10 | #include "Menu/SeperatorItem.hpp"
|
|---|
| 11 | #include "Menu/Menu.hpp"
|
|---|
| 12 | #include "defs.hpp"
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | SeperatorItem::SeperatorItem(Menu* menu):
|
|---|
| 16 | MenuItem('\0',"",menu),
|
|---|
| 17 | spacer(STD_SEPERATOR_SPACER),
|
|---|
| 18 | length(STD_MENU_LENGTH)
|
|---|
| 19 | {
|
|---|
| 20 | // TODO Auto-generated constructor stub
|
|---|
| 21 |
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | SeperatorItem::SeperatorItem(Menu* menu,char _spacer, int _length):
|
|---|
| 25 | MenuItem('\0',"",menu),
|
|---|
| 26 | spacer(_spacer),
|
|---|
| 27 | length(_length)
|
|---|
| 28 | {
|
|---|
| 29 | // TODO Auto-generated constructor stub
|
|---|
| 30 |
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | SeperatorItem::~SeperatorItem()
|
|---|
| 34 | {
|
|---|
| 35 | // TODO Auto-generated destructor stub
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 | void SeperatorItem::doTrigger(){}
|
|---|
| 40 | bool SeperatorItem::checkTrigger(char){
|
|---|
| 41 | return false;
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 | const string SeperatorItem::getDescription() {
|
|---|
| 45 | return string("");
|
|---|
| 46 | }
|
|---|
| 47 |
|
|---|
| 48 | const string SeperatorItem::formatEntry(){
|
|---|
| 49 | stringstream s;
|
|---|
| 50 | for(int i=0; i<length;i++)
|
|---|
| 51 | s << spacer;
|
|---|
| 52 | return s.str();
|
|---|
| 53 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.