|
Last change
on this file since e62daa was 770138, checked in by Tillmann Crueger <crueger@…>, 16 years ago |
|
Added mechanism that deactivates undo and redo menupoint if not applicable
|
-
Property mode
set to
100644
|
|
File size:
524 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * ActionMenuItem.cpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Dec 11, 2009
|
|---|
| 5 | * Author: crueger
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #include <iostream>
|
|---|
| 9 |
|
|---|
| 10 | #include "Menu/ActionMenuItem.hpp"
|
|---|
| 11 | #include "Actions/MethodAction.hpp"
|
|---|
| 12 |
|
|---|
| 13 | using namespace std;
|
|---|
| 14 |
|
|---|
| 15 | ActionMenuItem::ActionMenuItem(char _trigger, const char* _description,Menu* _menu,Action* _action)
|
|---|
| 16 | : MenuItem(_trigger,_description,_menu),
|
|---|
| 17 | action(_action)
|
|---|
| 18 | {
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | ActionMenuItem::~ActionMenuItem()
|
|---|
| 22 | {}
|
|---|
| 23 |
|
|---|
| 24 | void ActionMenuItem::doTrigger() {
|
|---|
| 25 | action->call();
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | bool ActionMenuItem::isActive() {
|
|---|
| 29 | return action->isActive();
|
|---|
| 30 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.