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

ContainerEnumerator.h

Go to the documentation of this file.
00001 #ifndef ContainerEnumeratorH
00002 #define ContainerEnumeratorH
00003 
00004 /*******************************************************************************
00005 Copyright 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 molekulového modelování
00025 ** SOUBOR:              ContainerEnumerator
00026 ** ÚČEL:                base class for object enumeration
00027 ** VERZE:               1.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 *******************************************************************************/
00034 
00038 /* HEADER FILES ***************************************************************/
00039 
00040 #include "CoreMainHeader.h"
00041 #include "ExtObject.h"
00042 
00043 /* HEADER FILES END ***********************************************************/
00044 
00045 /*  CLASS:   CContainerEnumerator
00046     PURPOSE: base class for object enumeration
00047 */
00048 
00050 
00053 class NEMESIS_CORE_PACKAGE CContainerEnumerator : public CExtObject {
00054     public:
00055         __fastcall CContainerEnumerator(CComObject* owner,CPluginObjectInfo* objectinfo,CProject* project);
00056 
00057  // sprava objektů ----------------------------------
00058     virtual int __fastcall NumOfCommands(void);
00059     virtual CSmallString __fastcall GetCommand(int i,bool& enabled);
00060     virtual bool __fastcall DoCommand(int i);
00061     virtual bool __fastcall RenameItem(const CSmallString& newname);
00062 
00063  // sekce zabývající se popisem podkontejnerů ----------------------------------
00064     virtual int __fastcall GetSelectedImageIndex(void);
00065 
00066     virtual CContainerEnumerator* __fastcall GetFirstSubContainer(void);
00067     virtual CContainerEnumerator* __fastcall GetNextSubContainer(void);
00068 
00069     virtual bool __fastcall ContainSubContainers(void);
00070 
00071  // sekce zabývající se popisem objektů v kontejneru ---------------------------
00072     virtual int         __fastcall NumOfObjects(void);
00073     virtual bool        __fastcall PrepareObjects(int startpos,int size,int rstart,int rend);
00074     virtual CExtObject* __fastcall GetObject(int pos);
00075 
00076  // funkce pro rozšířený popis objektů a kontejnerů ----------------------------
00077     virtual CExtObject* __fastcall GetCurrentObject(void);
00078     virtual bool __fastcall SetCurrentObject(CExtObject* p_object);
00079 
00080     virtual int                __fastcall NumOfColumns(void);  // počet sloupců popisujících objekt
00081     virtual const CSmallString __fastcall GetColumnCaption(int index); // popis sloupce
00082     virtual const CSmallString __fastcall GetObjectProperty(int index); // vlastnost objektu
00083     virtual int                __fastcall GetObjectImageIndex(void);
00084 
00085  // funkce pro selekci objektů -------------------------------------------------
00086     virtual int __fastcall NumOfSelectedObjects(void);
00087     virtual CExtObject* __fastcall GetFirstSelectedObject(void);
00088     virtual CExtObject* __fastcall GetNextSelectedObject(void);
00089     virtual bool __fastcall IsSelected(CExtObject* p_obj);
00090     virtual bool __fastcall SelectObject(CExtObject* p_obj,bool selected);
00091     virtual bool __fastcall SelectRange(int startindex,int endindex,bool selected);
00092     virtual void __fastcall UnselectAll(void);
00093 
00094  // objekt, který kontejner zastupuje
00095     virtual CExtObject* __fastcall GetMyMaster(void);
00096     public:
00097     bool    EnumerateContainersAsObjects;
00098     protected:
00099     CSimpleList<CExtObject>         SelectedObjects;
00100     CSimpleIterator<CExtObject>     SO;
00101     };
00102 
00103 //---------------------------------------------------------------------------
00104 
00105 DECLARE_EVENT(Container_AddObject);
00106 DECLARE_EVENT(Container_DeleteObject);
00107 DECLARE_EVENT(Container_ChangeObject);
00108 DECLARE_EVENT(Container_ChangeObjectsOrder);
00109 
00110 DECLARE_EVENT(Container_ObjectsChange);
00111 
00112 DECLARE_EVENT(Container_AddSubContainer);
00113 DECLARE_EVENT(Container_DeleteSubContainer);
00114 DECLARE_EVENT(Container_ChangeSubContainer);
00115 
00116 DECLARE_EVENT(Container_SubContainersChange);
00117 
00118 DECLARE_EVENT(Container_ChangeColumns);
00119 
00120 //---------------------------------------------------------------------------
00121 
00122 #endif

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