xref: /haiku/src/apps/icon-o-matic/style/AddStylesCommand.h (revision 7749d0bb0c358a3279b1b9cc76d8376e900130a5)
1 /*
2  * Copyright 2006-2007, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 #ifndef ADD_STYLES_COMMAND_H
9 #define ADD_STYLES_COMMAND_H
10 
11 
12 #include "Command.h"
13 #include "IconBuild.h"
14 
15 
16 _BEGIN_ICON_NAMESPACE
17 	class Style;
18 	class StyleContainer;
19 _END_ICON_NAMESPACE
20 
21 _USING_ICON_NAMESPACE
22 
23 
24 class AddStylesCommand : public Command {
25  public:
26 								AddStylesCommand(
27 									StyleContainer* container,
28 									Style** const styles,
29 									int32 count,
30 									int32 index);
31 	virtual						~AddStylesCommand();
32 
33 	virtual	status_t			InitCheck();
34 
35 	virtual	status_t			Perform();
36 	virtual status_t			Undo();
37 
38 	virtual void				GetName(BString& name);
39 
40  private:
41 			StyleContainer*		fContainer;
42 			Style**				fStyles;
43 			int32				fCount;
44 			int32				fIndex;
45 			bool				fStylesAdded;
46 };
47 
48 #endif // ADD_STYLES_COMMAND_H
49