00001 #ifndef DesktopH 00002 #define DesktopH 00003 00004 /******************************************************************************* 00005 Copyright 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 ** PROJECT: Project NEMESIS 00025 ** FILE: Desktop 00026 ** FUNCTION: project desktop properties 00027 ** VERSION: 1.0 00028 ** LANGUAGE: CBuilder C++ 00029 ** TARGET COMPUTER: IBM PC 00030 ** PROGRAMMER: Petr Kulhánek 00031 ** HISTORY: 00032 VERSION DATE NOTE 00033 *******************************************************************************/ 00034 00038 /* HEADER FILES ***************************************************************/ 00039 00040 #include "CoreMainHeader.h" 00041 #include "SmallString.h" 00042 #include "XMLFile.h" 00043 #include "EventSystem.h" 00044 00045 /* HEADER FILES END ***********************************************************/ 00046 00047 00048 class CUUID; 00049 00050 //--------------------------------------------------------------------------- 00051 00053 00056 class NEMESIS_CORE_PACKAGE CDesktop{ 00057 public: 00058 __fastcall CDesktop(void); 00059 00060 // loading configuration file for desktop 00061 bool __fastcall Load(void); 00062 bool __fastcall Save(void); 00063 00064 bool __fastcall LoadFromRepository(const CUUID& uuid); 00065 bool __fastcall SaveToRepository(const CUUID& uuid); 00066 00067 // manipulating with variables 00068 bool __fastcall SetVar(const CSmallString& var,int value); 00069 bool __fastcall GetVar(const CSmallString& var,int& value); 00070 bool __fastcall RemoveVar(const CSmallString& var); 00071 00072 // provate data 00073 private: 00074 CXMLFile File; // desktop file 00075 CXMLElement* MainElement; 00076 }; 00077 00078 //--------------------------------------------------------------------------- 00079 00080 // this event is for event pass system, it should be sent to active project from 00081 // main form when user wants save current desktop to repository 00082 00083 DECLARE_EVENT(DESKTOP_SAVE_TO_REPOSITORY); 00084 00085 //--------------------------------------------------------------------------- 00086 00087 #endif