OSDN Git Service

A couple of bugfix in the Document. The version number is set to 1.0b1.
[molby/Molby.git] / wxSources / MyCommand.h
1 /*
2  *  MyCommand.h
3  *  Molby
4  *
5  *  Created by Toshi Nagata on 08/10/25.
6  *  Copyright 2008 Toshi Nagata. All rights reserved.
7  *
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation version 2 of the License.
11  
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  GNU General Public License for more details.
16  */
17
18 #ifndef __MyCommand_h__
19 #define __MyCommand_h__
20
21 #include "wx/cmdproc.h"
22
23 #include "../MolLib/MolLib.h"
24
25 class MyCommand: public wxCommand
26 {
27 public:
28         Molecule *mol;
29         MolAction **undoActions;
30         int numUndoActions;
31         MolAction **redoActions;
32         int numRedoActions;
33
34     MyCommand(Molecule *aMolecule, const wxString& name = wxEmptyString);
35     virtual ~MyCommand();
36
37         void SetUndoActions(MolAction **actions, int count);
38         void SetRedoActions(MolAction **actions, int count);
39         
40     virtual bool Do();
41         virtual bool Undo();
42 };
43
44 #endif /* __MyCommand_h__ */