xref: /haiku/src/apps/haikudepot/edits_generic/UndoableEdit.cpp (revision 1403313c7fab3f265ed48b14f18a82f08aaeca78)
1 /*
2  * Copyright 2006-2012, Stephan Aßmus <superstippi@gmx.de>
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #include "UndoableEdit.h"
7 
8 #include <stdio.h>
9 
10 #include <OS.h>
11 #include <String.h>
12 
13 
UndoableEdit()14 UndoableEdit::UndoableEdit()
15 	:
16 	fTimeStamp(system_time())
17 {
18 }
19 
20 
~UndoableEdit()21 UndoableEdit::~UndoableEdit()
22 {
23 }
24 
25 
26 status_t
InitCheck()27 UndoableEdit::InitCheck()
28 {
29 	return B_NO_INIT;
30 }
31 
32 
33 status_t
Perform(EditContext & context)34 UndoableEdit::Perform(EditContext& context)
35 {
36 	return B_ERROR;
37 }
38 
39 
40 status_t
Undo(EditContext & context)41 UndoableEdit::Undo(EditContext& context)
42 {
43 	return B_ERROR;
44 }
45 
46 
47 status_t
Redo(EditContext & context)48 UndoableEdit::Redo(EditContext& context)
49 {
50 	return Perform(context);
51 }
52 
53 
54 void
GetName(BString & name)55 UndoableEdit::GetName(BString& name)
56 {
57 	name << "Name of edit goes here.";
58 }
59 
60 
61 bool
UndoesPrevious(const UndoableEdit * previous)62 UndoableEdit::UndoesPrevious(const UndoableEdit* previous)
63 {
64 	return false;
65 }
66 
67 
68 bool
CombineWithNext(const UndoableEdit * next)69 UndoableEdit::CombineWithNext(const UndoableEdit* next)
70 {
71 	return false;
72 }
73 
74 
75 bool
CombineWithPrevious(const UndoableEdit * previous)76 UndoableEdit::CombineWithPrevious(const UndoableEdit* previous)
77 {
78 	return false;
79 }
80