xref: /haiku/src/apps/icon-o-matic/style/SetColorCommand.h (revision 1deede7388b04dbeec5af85cae7164735ea9e70d)
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 SET_COLOR_COMMAND_H
9 #define SET_COLOR_COMMAND_H
10 
11 
12 #include "Command.h"
13 #include "IconBuild.h"
14 
15 #include <InterfaceDefs.h>
16 
17 
18 _BEGIN_ICON_NAMESPACE
19 	class Style;
20 _END_ICON_NAMESPACE
21 
22 _USING_ICON_NAMESPACE
23 
24 
25 class SetColorCommand : public Command {
26  public:
27 								SetColorCommand(Style* style,
28 												const rgb_color& color);
29 	virtual						~SetColorCommand();
30 
31 	virtual	status_t			InitCheck();
32 
33 	virtual	status_t			Perform();
34 	virtual status_t			Undo();
35 
36 	virtual void				GetName(BString& name);
37 
38 	virtual	bool				CombineWithNext(const Command* next);
39 
40  private:
41 			Style*				fStyle;
42 			rgb_color			fColor;
43 };
44 
45 #endif // SET_COLOR_COMMAND_H
46