Hugintrunk
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
hugin1
base_wx
CommandHistory.h
Go to the documentation of this file.
1
// -*- c-basic-offset: 4 -*-
24
#ifndef _COMMANDHISTORY_H
25
#define _COMMANDHISTORY_H
26
27
#include <
hugin_shared.h
>
28
#include "
Command.h
"
29
#include <vector>
30
31
namespace
PanoCommand
32
{
38
class
WXIMPEX
CommandHistory
39
{
40
public
:
41
44
CommandHistory
();
45
48
virtual
~
CommandHistory
();
49
55
void
clear();
56
58
void
clearRedoQueue();
59
71
void
addCommand(
PanoCommand
*command,
bool
execute =
true
);
72
76
virtual
void
undo();
80
virtual
void
redo();
81
83
bool
canUndo()
const
;
84
86
bool
canRedo()
const
;
87
89
std::string getLastCommandName()
const
;
90
92
const
PanoCommand
* getLastCommand()
const
;
93
private
:
94
// our commands
95
std::vector<PanoCommand*>
commands
;
96
size_t
nextCmd
;
97
98
};
99
100
106
class
WXIMPEX
GlobalCmdHist
:
public
CommandHistory
107
{
108
public
:
109
static
GlobalCmdHist
& getInstance();
110
protected
:
111
GlobalCmdHist
();
112
private
:
113
static
GlobalCmdHist
*
instance
;
114
};
115
116
}
// namespace
117
118
#endif // _COMMANDHISTORY_H
PanoCommand::PanoCommand
Base class for all panorama commands.
Definition:
Command.h:38
PanoCommand::CommandHistory
A history for Command, provides undo/redo functionality.
Definition:
CommandHistory.h:38
PanoCommand::GlobalCmdHist
Singleton CommandHistory.
Definition:
CommandHistory.h:106
hugin_shared.h
WXIMPEX
#define WXIMPEX
Definition:
hugin_shared.h:40
PanoCommand::GlobalCmdHist::instance
static GlobalCmdHist * instance
Definition:
CommandHistory.h:113
PanoCommand::CommandHistory::nextCmd
size_t nextCmd
Definition:
CommandHistory.h:96
Command.h
PanoCommand::CommandHistory::commands
std::vector< PanoCommand * > commands
Definition:
CommandHistory.h:95
Generated on Sun Nov 17 2024 01:25:25 for Hugintrunk by
1.8.5