Main Page   Class Hierarchy   Compound List   File List   Compound Members  

elemlst.h

00001 /*
00002 Program ELEMLST.H
00003 Purpose Defines a list of elements (Header)
00004 Last Update     04-04-1996
00005 */
00006 #ifndef ELEMLST_H
00007 #define ELEMLST_H
00008 
00009 #ifdef __GNUG__
00010 #pragma interface
00011 #endif
00012 
00013 #include "misc.h"
00014 #include "_lnk_itr.h"
00015 
00016 #include "bbox.h"
00017 #include "element.h"
00018 #include "shape.h"
00019 #include "wxmatrix.h"
00020 #include "gdserr.h"
00021 #include "group.h"
00022 #include "proper.h"
00023 
00024 class DrawDriver;
00025 class Driver_out;
00026 
00027 enum OPS { AND, OR, EXOR, A_SUB_B, B_SUB_A, MAKE_RING, CORRECTION, SMOOTHEN};
00028 
00029 class Structure;
00030 
00031 class ElementList : public DL_List<void*>
00032 {
00033         public:
00034 
00035                 ElementList();
00036                 ~ElementList();
00037 
00038       void Write(Driver_out& where);
00039       void Write(DrawDriver& dr);
00040 
00041                 void           SetBoundingBox(BoundingBox& b){ _boundingbox = b   ;};
00042                 BoundingBox&    GetBoundingBox()                                  { return _boundingbox;};
00043                 ElementList&    operator=(ElementList&);
00044 
00045                 BoundingBox&    CalcBoundingBox();
00046 
00047                 bool                            CalcArea(double* area,EleFlags mask);
00048                 void                            SortOnBoundingBox();
00049                 void                            SortOnXYmin();
00050                 void                            SetReferenceNr();
00051                 void                            SetExplodeReferenceNr();
00052 
00053                 bool                    Delete_A(bool groupmode,EleFlags mask);
00054                 bool                    Delete(TYPE a_type,bool OnlySelected);
00055       bool                      Delete(TYPE a_type,EleFlags mask);
00056                 bool                    Delete(int whichlayer);
00057                 void                            Transform(wxTransformMatrix* _trans,EleFlags mask);
00058                 bool                    SelectedAtPoint(Point* P);
00059                 bool            AddProperty(const wxString& name,const wxString& type,const wxString& value,bool _selectedonly);
00060                 bool                    AddProperty(EleFlags mask,const wxString& name,const wxString& type,const wxString& value);
00061                 void                    SetTimeStamp(long time);
00062                 void                    ClearFlags(short int mask);
00063                 void                    SetFlags(EleFlags mask,bool onlyselected);
00064                 Element*                Select(Point* ,SelectType);
00065                 bool                    Select(BoundingBox* ,SelectType,wxTransformMatrix*);
00066 
00067                 bool        ToLines(int destination,EleFlags mask);
00068                 bool                    ToArcs(int destination,EleFlags mask);
00069                 bool                    Move(int destination,EleFlags mask);
00070                 bool                    Copy(int destination,EleFlags mask);
00071                 void                    SetGroupFlags(group* a_group,EleFlags mask,bool srefselected);
00072                 void                    SetGroupFlagsRefs(EleFlags mask,bool srefselected);
00073                 void                    SetAvailable();
00074                 void        Flatten(Structure* _Top,wxTransformMatrix* _Matrix,bool,bool select,EleFlags refgroup,bool deep);
00075                 void                    Operation(OPS operation,EleFlags maskA,EleFlags maskB,int destination,bool m_destination_add);
00076 
00077       void                      SetBinHere(bool bin){m_binhere=bin;}
00078                 bool                    GetBinHere(){ return m_binhere;}
00079 
00080       void                      SetSortedOnBox(bool value){m_sortedOnBbox=value;}
00081 
00082       protected:
00083 
00084                 BoundingBox     _boundingbox;
00085       bool        m_sortedOnBbox;
00086       bool        m_binhere;
00087 
00088 };
00089 
00090 #endif
elemlst.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page