Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GraphicsObject.h

Go to the documentation of this file.
00001 #ifndef GraphicsObjectH
00002 #define GraphicsObjectH
00003 
00004 /*******************************************************************************
00005 Copyright 1998,1999,2000,2001,2002 Petr Kulhanek
00006 
00007     This file is part of Core plugin.
00008 
00009     Core plugin is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     Core plugin is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018 
00019     You should have received a copy of the GNU General Public License
00020     along with Core plugin; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 *******************************************************************************/
00023 /*******************************************************************************
00024 ** PROJEKT:             Projekt NEMESIS
00025 ** SOUBOR:              GraphicsObject.cpp,.h
00026 ** úČEL:                bázová třída pro grafické objekty
00027 ** VERZE:               3.0
00028 ** JAZYK:               CBuilder C++ 
00029 ** CÍLOVÝ POČÍTAČ:      IBM PC
00030 ** PROGRAMÁTOR:         Petr Kulhánek
00031 ** HISTORIE úPRAV:
00032 VERZE   DATUM       POZNÁMKA
00033 1.0
00034 2.0     11/99       převedení na verzi s pluginy
00035 3.0     2001-04-21  zahrnutí seznamu objektů, grafické profily
00036 *******************************************************************************/
00037 
00041 /* HLAVIČKOVÉ SOUBORY *********************************************************/
00042 
00043 #include "CoreMainHeader.h"
00044 #include "ExtObject.h"
00045 #include "Manipulator.h"
00046 #include "Setups.h"
00047 
00048 class CGraphicsObjectsList;
00049 class CGraphicsObject;
00050 class CXMLElement;
00051 
00052 
00053 /* KONEC HLAVIČKOVÝCH SOUBORů *************************************************/
00054 
00055 /* DEFINICE TŘÍD **************************************************************/
00056 
00057 
00058 //------------------------------------------------------------------------------
00059 //##############################################################################
00060 //------------------------------------------------------------------------------
00061 
00063 
00066 enum EDrawPriority {
00067     DP_PRIORITY_OBJECT=0,
00068     DP_NORMAL_PRIORITY_OBJECT=1000,
00069     DP_HIGH_PRIORITY_OBJECT=2000,
00070     DP_INIT_OBJECT=3000,
00071     DP_HIGH_INIT_OBJECT=4000,
00072     };
00073 
00074 //------------------------------------------------------------------------------
00075 
00077 
00080 class NEMESIS_CORE_PACKAGE CGraphicsObject : public CExtObject, public CManipulator, public CSetupStub {
00081     public:
00082  // konstruktor a destrukce objektu --------------------------------------------
00083                  __fastcall CGraphicsObject(CPluginObjectInfo* objectinfo,CGraphicsObjectsList* p_glist,int priority);
00084     virtual void __fastcall RemoveFromBaseList(CElementsRecord* history=NULL);
00085 
00086  // operace se záznamem do history listu ---------------------------------------
00087     bool __fastcall Delete(void);   // odstraní objekt
00088 
00089  // hlavní výkonná funkce pro vykreslení ---------------------------------------
00090     virtual void __fastcall Draw(void);    // vykreslí jednotlivé objekty
00091     virtual void __fastcall DrawToPOVStream(ostream& str);
00092     virtual void __fastcall SetLevel(EDrawLevel level);
00093     virtual bool __fastcall GetObjectMetrics(CPoint& low,CPoint& high);
00094 
00095  // priorita objektu -----------------------------------------------------------
00096     inline int __fastcall GetDrawPriority(void) const;
00097 
00098  // operace pro dočasné zobrazení ----------------------------------------------
00099     inline bool __fastcall IsTemporaryObject(void);
00100     void        __fastcall ShowAsTemporaryObject(void);
00101     void        __fastcall HideAsTemporaryObject(void);
00102     inline bool __fastcall IsGLListSupported(void);
00103 
00104     inline CGraphicsObjectsList* __fastcall GetGraphicsObjectsList(void);
00105 
00106  // global / local coordinate system support
00107     void __fastcall RevertToGlobalSystem(void);
00108     void __fastcall RevertToLocalSystem(void);
00109 
00110  // uložení a načtení dat ------------------------------------------------------
00111 
00112     bool __fastcall Load(CXMLElement* p_el);
00113     bool __fastcall Save(CXMLElement* p_el);
00114 
00115     virtual bool __fastcall LoadData(CXMLElement* p_el);
00116     virtual bool __fastcall SaveData(CXMLElement* p_el);
00117 
00118  // sekce soukromých dat -------------------------------------------------------
00119     private:
00120     int                                 FDrawPriority;
00121     CGraphicsObjectsList*               GraphicsObjectsList;
00122     protected:
00123     bool                                SupportGLList;
00124     };
00125 
00126 //------------------------------------------------------------------------------
00127 
00128 class CGraphicsObjectDeleteHistory:public CCoreElementsRecord{
00129     public:
00130         __fastcall CGraphicsObjectDeleteHistory(CGraphicsObject* p_object);
00131         private:
00132     virtual CSmallString __fastcall GetDescription(const CSmallString& format);
00133     CSmallString    ObjectName;
00134     CSmallString    ObjectType;
00135     };
00136 
00137 /* KONEC DEFINICE TŘÍD ********************************************************/
00138 
00139 //------------------------------------------------------------------------------
00140 
00141 inline int __fastcall CGraphicsObject::GetDrawPriority(void) const
00142 {
00143  return(FDrawPriority);
00144 }
00145 
00146 //------------------------------------------------------------------------------
00147 
00148 inline CGraphicsObjectsList* __fastcall CGraphicsObject::GetGraphicsObjectsList(void)
00149 {
00150  return(GraphicsObjectsList);
00151 }
00152 
00153 //------------------------------------------------------------------------------
00154 
00155 inline bool __fastcall CGraphicsObject::IsGLListSupported(void)
00156 {
00157  return(SupportGLList);
00158 }
00159 
00160 //------------------------------------------------------------------------------
00161 
00162 #endif

Generated on Sun Feb 9 12:53:50 2003 for NemesisCore by doxygen1.3-rc2