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 REMOVE_TRANSFORMERS_COMMAND_H 9#define REMOVE_TRANSFORMERS_COMMAND_H 10 11 12#include "Command.h" 13#include "IconBuild.h" 14 15 16_BEGIN_ICON_NAMESPACE 17 class Shape; 18 class Transformer; 19_END_ICON_NAMESPACE 20 21_USING_ICON_NAMESPACE 22 23 24// TODO: make a templated "remove items" command? 25 26class RemoveTransformersCommand : public Command { 27 public: 28 RemoveTransformersCommand( 29 Shape* container, 30 const int32* indices, 31 int32 count); 32 virtual ~RemoveTransformersCommand(); 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* fIndices; 45 int32 fCount; 46 bool fTransformersRemoved; 47}; 48 49#endif // REMOVE_TRANSFORMERS_COMMAND_H 50