home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.9 KB | 113 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: GroupCmd.h
- // Release Version: $ ODF 1 $
- //
- // Author: Mary Boetcher
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef GROUPCMD_H
- #define GROUPCMD_H
-
- // ----- FrameWork Includes -----
-
- #ifndef CONTENT_H
- #include "Content.h"
- #endif
-
- #ifndef FWCMD_H
- #include "FWCmd.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CFrame;
- class CDrawSelection;
- class CDrawContent;
- class CGroupShape;
- class CShapeCollection;
-
- //========================================================================================
- // class CGroupContent
- //========================================================================================
-
- class CGroupContent : public CDrawContent
- {
- public:
-
- FW_DECLARE_AUTO(CGroupContent)
-
- CGroupContent(Environment* ev, CDrawContent* other);
- virtual ~CGroupContent();
-
- CShapeCollection* GetShapeList();
- };
-
- //========================================================================================
- // class CGroupShapesCommand - combine selected shapes into one group shape
- //========================================================================================
-
- class CGroupShapesCommand : public FW_CCommand
- {
- public:
-
- FW_DECLARE_AUTO(CGroupShapesCommand)
-
- CGroupShapesCommand(Environment* ev,
- FW_CFrame* frame,
- CDrawSelection* selection);
- virtual ~CGroupShapesCommand();
-
- virtual void DoIt(Environment* ev);
- virtual void UndoIt(Environment* ev);
- virtual void RedoIt(Environment* ev);
-
- virtual void CommitUndone(Environment* ev);
-
- private:
- void GroupShapes(Environment* ev);
-
- private:
- CDrawSelection* fDrawSelection;
- CGroupShape* fGroupShape;
- CGroupContent* fGroupedContent;
- };
-
- //========================================================================================
- // class CUngroupShapesCommand - ungroup selected shapes, if any are grouped
- //========================================================================================
-
- class CUngroupShapesCommand : public FW_CCommand
- {
- public:
-
- FW_DECLARE_AUTO(CUngroupShapesCommand)
-
- CUngroupShapesCommand(Environment* ev,
- FW_CFrame* frame,
- CDrawSelection* selection);
- virtual ~CUngroupShapesCommand();
-
- virtual void DoIt(Environment* ev);
- virtual void UndoIt(Environment* ev);
- virtual void RedoIt(Environment* ev);
-
- virtual void CommitDone(Environment* ev);
-
- private:
- void UngroupShape(Environment* ev, CGroupShape* groupShape);
- void RegroupShape(Environment* ev, CGroupShape* groupShape);
-
- private:
- CDrawSelection* fDrawSelection;
- CShapeCollection* fGroupList; // list of CGroupShape*
- };
-
-
- #endif
-