shpsels.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: shpsels.h
00004 
00005     DESCRIPTION:  Defines Shape Selection utility objects
00006 
00007     CREATED BY: Tom Hudson
00008 
00009     HISTORY: created 31 October 1995
00010 
00011  *> Copyright (c) 1995, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 #include <WTypes.h>
00016 #include "coreexp.h"
00017 #include "maxheap.h"
00018 #include "maxtypes.h"
00019 #include "bitarray.h"
00020 
00021 // forward declarations
00022 class BezierShape;
00023 class PolyShape;
00024 class ILoad;
00025 class ISave;
00026 
00036 class ShapeVSel: public MaxHeapOperators {
00037     public:
00038     int polys;
00039     BitArray *sel;
00042     CoreExport ShapeVSel();
00043     CoreExport ShapeVSel(ShapeVSel& from);
00044     CoreExport ~ShapeVSel();
00046     CoreExport ShapeVSel& operator=(ShapeVSel& from);
00047     CoreExport BOOL operator==(ShapeVSel& s);
00054     CoreExport void Insert(int where,int count=0);
00059     CoreExport void Delete(int where);
00060     CoreExport void SetSize(ShapeVSel& selset, BOOL save=FALSE);
00070     CoreExport void SetSize(BezierShape& shape, BOOL save=FALSE);
00079     CoreExport void SetSize(PolyShape& shape, BOOL save=FALSE);
00080     CoreExport BitArray& operator[](int index);
00082     CoreExport void ClearAll();
00083     CoreExport void SetAll();
00084     CoreExport void Toggle();
00086     CoreExport void Empty();
00087     CoreExport BOOL IsCompatible(ShapeVSel& selset);
00088     CoreExport BOOL IsCompatible(BezierShape& shape);
00089     CoreExport BOOL IsCompatible(PolyShape& shape);
00091     CoreExport IOResult Save(ISave* isave);
00095     CoreExport IOResult Load(ILoad* iload);
00096 
00098 
00105     CoreExport bool Delete(const unsigned int* pIndices, unsigned int n);
00106     };
00107 
00117 class ShapeSSel: public MaxHeapOperators {
00118     public:
00119     int polys;
00120     BitArray *sel;
00124     CoreExport ShapeSSel();
00125     CoreExport ShapeSSel(ShapeSSel& from);
00127     CoreExport ~ShapeSSel();
00129     CoreExport ShapeSSel& operator=(ShapeSSel& from);
00130     CoreExport BOOL operator==(ShapeSSel& s);
00137     CoreExport void Insert(int where,int count=0);
00142     CoreExport void Delete(int where);
00143     CoreExport void SetSize(ShapeSSel& selset, BOOL save=FALSE);
00152     CoreExport void SetSize(BezierShape& shape, BOOL save=FALSE);
00161     CoreExport void SetSize(PolyShape& shape, BOOL save=FALSE);
00162     CoreExport BitArray& operator[](int index);
00164     CoreExport void ClearAll();
00165     CoreExport void SetAll();
00166     CoreExport void Toggle();
00168     CoreExport void Empty();
00169     CoreExport BOOL IsCompatible(ShapeSSel& selset);
00170     CoreExport BOOL IsCompatible(BezierShape& shape);
00171     CoreExport BOOL IsCompatible(PolyShape& shape);
00173     CoreExport IOResult Save(ISave* isave);
00177     CoreExport IOResult Load(ILoad* iload);
00178 
00180 
00187     CoreExport bool Delete(const unsigned int* pIndices, unsigned int n);
00188     };
00189 
00199 class ShapePSel: public MaxHeapOperators {
00200     public:
00201     int polys;
00202     BitArray sel;
00204     CoreExport ShapePSel();
00205     CoreExport ShapePSel(ShapePSel& from);
00207     CoreExport ~ShapePSel();
00209     CoreExport ShapePSel& operator=(ShapePSel& from);
00210     CoreExport BOOL operator==(ShapePSel& s);
00216     CoreExport void Insert(int where);
00221     CoreExport void Delete(int where);
00222     CoreExport void SetSize(ShapePSel& selset, BOOL save=FALSE);
00230     CoreExport void SetSize(BezierShape& shape, BOOL save=FALSE);
00238     CoreExport void SetSize(PolyShape& shape, BOOL save=FALSE);
00243     CoreExport void Set(int index);
00250     CoreExport void Set(int index, int value);
00255     CoreExport void Clear(int index);
00257     CoreExport int operator[](int index) const;
00259     CoreExport void ClearAll();
00260     CoreExport void SetAll();
00261     CoreExport void Toggle();
00263     CoreExport void Empty();
00264     CoreExport BOOL IsCompatible(ShapePSel& selset);
00265     CoreExport BOOL IsCompatible(BezierShape& shape);
00266     CoreExport BOOL IsCompatible(PolyShape& shape);
00268     CoreExport IOResult Save(ISave* isave);
00272     CoreExport IOResult Load(ILoad* iload);
00274 
00281     CoreExport bool Delete(const unsigned int* pIndices, unsigned int n);
00282     };
00283 
00284