1 /* 2 * Copyright 2006-2007, 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 #ifndef REMOVE_STYLES_COMMAND_H 9 #define REMOVE_STYLES_COMMAND_H 10 11 12 #include "Command.h" 13 14 #include <List.h> 15 16 17 namespace BPrivate { 18 namespace Icon { 19 class Style; 20 class StyleContainer; 21 } 22 } 23 using namespace BPrivate::Icon; 24 25 class RemoveStylesCommand : public Command { 26 public: 27 RemoveStylesCommand( 28 StyleContainer* container, 29 Style** const styles, 30 int32 count); 31 virtual ~RemoveStylesCommand(); 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 struct StyleInfo { 43 Style* style; 44 int32 index; 45 BList shapes; 46 }; 47 StyleInfo* fInfos; 48 int32 fCount; 49 bool fStylesRemoved; 50 }; 51 52 #endif // REMOVE_STYLES_COMMAND_H 53