![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
00001 /******************************************************************************** 00002 * * 00003 * X - O b j e c t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,2012 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************/ 00021 #ifndef FXID_H 00022 #define FXID_H 00023 00024 #ifndef FXOBJECT_H 00025 #include "FXObject.h" 00026 #endif 00027 00028 namespace FX { 00029 00030 class FXApp; 00031 00032 00034 class FXAPI FXId : public FXObject { 00035 FXDECLARE_ABSTRACT(FXId) 00036 private: 00037 FXApp *app; // Back link to application object 00038 void *data; // User data 00039 protected: 00040 FXID xid; 00041 private: 00042 FXId(const FXId&); 00043 FXId &operator=(const FXId&); 00044 protected: 00045 FXId():app((FXApp*)-1L),data(NULL),xid(0){} 00046 FXId(FXApp* a):app(a),data(NULL),xid(0){} 00047 public: 00048 00050 FXApp* getApp() const { return app; } 00051 00053 FXID id() const { return xid; } 00054 00056 virtual void create(); 00057 00059 virtual void detach(); 00060 00062 virtual void destroy(); 00063 00065 void setUserData(void *ptr){ data=ptr; } 00066 00068 void* getUserData() const { return data; } 00069 00071 virtual void save(FXStream& store) const; 00072 00074 virtual void load(FXStream& store); 00075 00077 virtual ~FXId(); 00078 }; 00079 00080 } 00081 00082 #endif
|
|