PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: AbstractFrontend.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight 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 * PixelLight 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 PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLCORE_ABSTRACTFRONTEND_H__ 00024 #define __PLCORE_ABSTRACTFRONTEND_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLCore/String/String.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLCore { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Forward declarations ] 00042 //[-------------------------------------------------------] 00043 template <class ValueType> class Container; 00044 00045 00046 //[-------------------------------------------------------] 00047 //[ Classes ] 00048 //[-------------------------------------------------------] 00049 /** 00050 * @brief 00051 * Abstract frontend class 00052 * 00053 * @remarks 00054 * Please note that the frontend system is not designed to be a replacement for a decent GUI 00055 * system. In here, only primitive and commonly used GUI related feature are offered with a 00056 * limited feature set. For more complex stuff one has to use a real GUI system. 00057 */ 00058 class AbstractFrontend { 00059 00060 00061 //[-------------------------------------------------------] 00062 //[ Public virtual AbstractFrontend functions ] 00063 //[-------------------------------------------------------] 00064 public: 00065 /** 00066 * @brief 00067 * Called when the window size has been changed 00068 */ 00069 virtual void OnSize() = 0; 00070 00071 /** 00072 * @brief 00073 * Called when the fullscreen mode was changed 00074 * 00075 * @remarks 00076 * This method just says "something related to fullscreen mode has been changed". Whether we 00077 * changed from window mode into fullscreen mode or changed e.g. the resolution used in 00078 * fullscreen mode is not really interesting in here. 00079 */ 00080 virtual void OnFullscreenMode() = 0; 00081 00082 /** 00083 * @brief 00084 * Called to let the frontend draw into it's window 00085 */ 00086 virtual void OnDraw() = 0; 00087 00088 /** 00089 * @brief 00090 * Called to let the frontend update it's states 00091 * 00092 * @remarks 00093 * You can use this method to do work you have to perform on a regular basis. It's 00094 * recommended to keep the work done within the implementation as compact as possible. 00095 * Don't use this function to perform 'polling'-everything, use events or if required 00096 * for example timers or threads instead. 00097 */ 00098 virtual void OnUpdate() = 0; 00099 00100 /** 00101 * @brief 00102 * Called when string data has been dropped onto the frontend window 00103 * 00104 * @param[in] lstFiles 00105 * List of file names 00106 */ 00107 virtual void OnDrop(const Container<String> &lstFiles) = 0; 00108 00109 00110 //[-------------------------------------------------------] 00111 //[ Protected functions ] 00112 //[-------------------------------------------------------] 00113 protected: 00114 /** 00115 * @brief 00116 * Default constructor 00117 */ 00118 AbstractFrontend(); 00119 00120 /** 00121 * @brief 00122 * Destructor 00123 */ 00124 virtual ~AbstractFrontend(); 00125 00126 00127 }; 00128 00129 00130 //[-------------------------------------------------------] 00131 //[ Namespace ] 00132 //[-------------------------------------------------------] 00133 } // PLCore 00134 00135 00136 #endif // __PLCORE_ABSTRACTFRONTEND_H__
|