xref: /haiku/src/apps/icon-o-matic/style/MoveStylesCommand.h (revision 9d6d3fcf5fe8308cd020cecf89dede440346f8c4)
1 /*
2  * Copyright 2006, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 
9 #ifndef MOVE_STYLES_COMMAND_H
10 #define MOVE_STYLES_COMMAND_H
11 
12 #include "Command.h"
13 
14 // TODO: make a templated "move items" command?
15 
16 class Style;
17 class StyleContainer;
18 
19 class MoveStylesCommand : public Command {
20  public:
21 								MoveStylesCommand(
22 									StyleContainer* container,
23 									Style** styles,
24 									int32 count,
25 									int32 toIndex);
26 	virtual						~MoveStylesCommand();
27 
28 	virtual	status_t			InitCheck();
29 
30 	virtual	status_t			Perform();
31 	virtual status_t			Undo();
32 
33 	virtual void				GetName(BString& name);
34 
35  private:
36 			StyleContainer*		fContainer;
37 			Style**				fStyles;
38 			int32*				fIndices;
39 			int32				fToIndex;
40 			int32				fCount;
41 };
42 
43 #endif // MOVE_STYLES_COMMAND_H
44