tools/uitools/inventory.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2011 by Jorrit Tyberghein 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef __CEL_UITOOLS_INVENTORY__ 00021 #define __CEL_UITOOLS_INVENTORY__ 00022 00023 struct iCelEntity; 00024 struct iCelEntityTemplate; 00025 struct iPcInventory; 00026 00027 struct iString; 00028 struct iMeshFactoryWrapper; 00029 struct iTextureHandle; 00030 struct iGraphics3D; 00031 00036 struct iUIInventoryInfo : public virtual iBase 00037 { 00038 SCF_INTERFACE (iUIInventoryInfo, 0, 0, 1); 00039 00043 virtual csRef<iString> GetName (iCelEntity* entity) = 0; 00044 virtual csRef<iString> GetName (iCelEntityTemplate* tpl, int count) = 0; 00045 00051 virtual csRef<iString> GetDescription (iCelEntity* entity) = 0; 00052 virtual csRef<iString> GetDescription (iCelEntityTemplate* tpl, int count) = 0; 00053 00058 virtual iMeshFactoryWrapper* GetMeshFactory (iCelEntity* entity) = 0; 00059 virtual iMeshFactoryWrapper* GetMeshFactory (iCelEntityTemplate* tpl, int count) = 0; 00060 00065 virtual iTextureHandle* GetTexture (iCelEntity* entity) = 0; 00066 virtual iTextureHandle* GetTexture (iCelEntityTemplate* tpl, int count) = 0; 00067 }; 00068 00069 00073 struct iUIInventorySelectionCallback : public virtual iBase 00074 { 00075 SCF_INTERFACE (iUIInventorySelectionCallback, 0, 0, 1); 00076 00083 virtual void SelectEntity (iCelEntity* entity, const char* argument) = 0; 00084 virtual void SelectTemplate (iCelEntityTemplate* tpl, const char* argument) = 0; 00085 }; 00086 00090 struct iUIInventory: public virtual iBase 00091 { 00092 SCF_INTERFACE (iUIInventory, 0, 0, 1); 00093 00099 virtual void SetInfo (iUIInventoryInfo* info) = 0; 00100 00106 virtual iUIInventoryInfo* GetInfo () const = 0; 00107 00109 virtual void Open (const char* title, iPcInventory* inventory) = 0; 00111 virtual void Close () = 0; 00113 virtual iPcInventory* GetInventory () const = 0; 00114 00116 virtual void AddSelectionListener (iUIInventorySelectionCallback* cb) = 0; 00117 virtual void RemoveSelectionListener (iUIInventorySelectionCallback* cb) = 0; 00118 00125 virtual bool SetStyleOption (const char* name, const char* value) = 0; 00126 00142 virtual bool Bind (const char* eventname, const char* command, const char* args) = 0; 00143 }; 00144 00145 #endif // __CEL_UITOOLS_INVENTORY__ 00146
Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1
