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_TRANSFORMERS_COMMAND_H 9 #define ADD_TRANSFORMERS_COMMAND_H 10 11 12 #include "Command.h" 13 14 15 namespace BPrivate { 16 namespace Icon { 17 class Shape; 18 class Transformer; 19 } 20 } 21 using namespace BPrivate::Icon; 22 23 // TODO: make a templated "add items" command? 24 25 class AddTransformersCommand : public Command { 26 public: 27 AddTransformersCommand( 28 Shape* container, 29 Transformer** const transformers, 30 int32 count, 31 int32 index); 32 virtual ~AddTransformersCommand(); 33 34 virtual status_t InitCheck(); 35 36 virtual status_t Perform(); 37 virtual status_t Undo(); 38 39 virtual void GetName(BString& name); 40 41 private: 42 Shape* fContainer; 43 Transformer** fTransformers; 44 int32 fCount; 45 int32 fIndex; 46 bool fTransformersAdded; 47 }; 48 49 #endif // ADD_TRANSFORMERS_COMMAND_H 50