xref: /haiku/src/apps/icon-o-matic/style/RemoveStylesCommand.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 REMOVE_STYLES_COMMAND_H
10 #define REMOVE_STYLES_COMMAND_H
11 
12 #include <List.h>
13 
14 #include "Command.h"
15 
16 class Style;
17 class StyleContainer;
18 
19 class RemoveStylesCommand : public Command {
20  public:
21 								RemoveStylesCommand(
22 									StyleContainer* container,
23 									Style** const styles,
24 									int32 count);
25 	virtual						~RemoveStylesCommand();
26 
27 	virtual	status_t			InitCheck();
28 
29 	virtual	status_t			Perform();
30 	virtual status_t			Undo();
31 
32 	virtual void				GetName(BString& name);
33 
34  private:
35 			StyleContainer*		fContainer;
36 			struct StyleInfo {
37 				Style*			style;
38 				int32			index;
39 				BList			shapes;
40 			};
41 			StyleInfo*			fInfos;
42 			int32				fCount;
43 			bool				fStylesRemoved;
44 };
45 
46 #endif // REMOVE_STYLES_COMMAND_H
47