xref: /haiku/src/apps/icon-o-matic/shape/commands/MovePathsCommand.h (revision cf0498cbc6757a329333cee1b58221774199fc37)
10e1ba39fSStephan Aßmus /*
2325a6253SAxel Dörfler  * Copyright 2006-2007, Haiku.
30e1ba39fSStephan Aßmus  * Distributed under the terms of the MIT License.
40e1ba39fSStephan Aßmus  *
50e1ba39fSStephan Aßmus  * Authors:
60e1ba39fSStephan Aßmus  *		Stephan Aßmus <superstippi@gmx.de>
70e1ba39fSStephan Aßmus  */
8*cf0498cbSJérôme Duval #ifndef MOVE_PATHS_COMMAND_H
9*cf0498cbSJérôme Duval #define MOVE_PATHS_COMMAND_H
100e1ba39fSStephan Aßmus 
11325a6253SAxel Dörfler 
120e1ba39fSStephan Aßmus #include "Command.h"
1325dc253dSIngo Weinhold #include "IconBuild.h"
1425dc253dSIngo Weinhold 
150e1ba39fSStephan Aßmus 
160e1ba39fSStephan Aßmus // TODO: make a templated "move items" command?
170e1ba39fSStephan Aßmus 
1825dc253dSIngo Weinhold _BEGIN_ICON_NAMESPACE
190e1ba39fSStephan Aßmus 	class VectorPath;
200e1ba39fSStephan Aßmus 	class PathContainer;
2125dc253dSIngo Weinhold _END_ICON_NAMESPACE
2225dc253dSIngo Weinhold 
2325dc253dSIngo Weinhold _USING_ICON_NAMESPACE
2425dc253dSIngo Weinhold 
250e1ba39fSStephan Aßmus 
260e1ba39fSStephan Aßmus class MovePathsCommand : public Command {
270e1ba39fSStephan Aßmus  public:
280e1ba39fSStephan Aßmus 								MovePathsCommand(
290e1ba39fSStephan Aßmus 									PathContainer* container,
300e1ba39fSStephan Aßmus 									VectorPath** paths,
310e1ba39fSStephan Aßmus 									int32 count,
320e1ba39fSStephan Aßmus 									int32 toIndex);
330e1ba39fSStephan Aßmus 	virtual						~MovePathsCommand();
340e1ba39fSStephan Aßmus 
350e1ba39fSStephan Aßmus 	virtual	status_t			InitCheck();
360e1ba39fSStephan Aßmus 
370e1ba39fSStephan Aßmus 	virtual	status_t			Perform();
380e1ba39fSStephan Aßmus 	virtual status_t			Undo();
390e1ba39fSStephan Aßmus 
400e1ba39fSStephan Aßmus 	virtual void				GetName(BString& name);
410e1ba39fSStephan Aßmus 
420e1ba39fSStephan Aßmus  private:
430e1ba39fSStephan Aßmus 			PathContainer*		fContainer;
440e1ba39fSStephan Aßmus 			VectorPath**		fPaths;
450e1ba39fSStephan Aßmus 			int32*				fIndices;
460e1ba39fSStephan Aßmus 			int32				fToIndex;
470e1ba39fSStephan Aßmus 			int32				fCount;
480e1ba39fSStephan Aßmus };
490e1ba39fSStephan Aßmus 
50*cf0498cbSJérôme Duval #endif // MOVE_PATHS_COMMAND_H
51