logic: UndoRedo
UndoRedo working for ActiveTokensMessages
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "component/view/UndoRedoView.h"
|
||||
|
||||
#include "component/controller/UndoRedoController.h"
|
||||
|
||||
UndoRedoView::UndoRedoView(ViewLayout* viewLayout)
|
||||
: View(viewLayout, Vec2i(100,100))
|
||||
{
|
||||
}
|
||||
|
||||
UndoRedoView::~UndoRedoView()
|
||||
{
|
||||
}
|
||||
|
||||
std::string UndoRedoView::getName() const
|
||||
{
|
||||
return "UndoRedoView";
|
||||
}
|
||||
|
||||
UndoRedoController* UndoRedoView::getController()
|
||||
{
|
||||
return View::getController<UndoRedoController>();
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef UNDO_REDO_VIEW_H
|
||||
#define UNDO_REDO_VIEW_H
|
||||
|
||||
#include "component/view/View.h"
|
||||
|
||||
class UndoRedoController;
|
||||
|
||||
class UndoRedoView : public View
|
||||
{
|
||||
public:
|
||||
UndoRedoView(ViewLayout* viewLayout);
|
||||
~UndoRedoView(void);
|
||||
|
||||
virtual std::string getName() const;
|
||||
|
||||
virtual void setRedoButtonEnabled(bool enabled) = 0;
|
||||
virtual void setUndoButtonEnabled(bool enabled) = 0;
|
||||
protected:
|
||||
UndoRedoController* getController();
|
||||
};
|
||||
|
||||
#endif //UNDO_REDO_VIEW_H
|
||||
@@ -8,6 +8,7 @@ class GraphView;
|
||||
class MainView;
|
||||
class SearchView;
|
||||
class StatusBarView;
|
||||
class UndoRedoView;
|
||||
class ViewLayout;
|
||||
|
||||
class ViewFactory
|
||||
@@ -21,6 +22,7 @@ public:
|
||||
virtual std::shared_ptr<GraphView> createGraphView(ViewLayout* viewLayout) const = 0;
|
||||
virtual std::shared_ptr<SearchView> createSearchView(ViewLayout* viewLayout) const = 0;
|
||||
virtual std::shared_ptr<StatusBarView> createStatusBarView(ViewLayout* viewLayout) const = 0;
|
||||
virtual std::shared_ptr<UndoRedoView> createUndoRedoView(ViewLayout* viewLayout) const = 0;
|
||||
};
|
||||
|
||||
#endif // VIEW_FACTORY_H
|
||||
|
||||
Reference in New Issue
Block a user