PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: CursorManager.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 __PLGUI_CURSORMANAGER_H__ 00024 #define __PLGUI_CURSORMANAGER_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLGui/Gui/Resources/Cursor.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLGui { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Forward declarations ] 00042 //[-------------------------------------------------------] 00043 class Gui; 00044 00045 00046 //[-------------------------------------------------------] 00047 //[ Classes ] 00048 //[-------------------------------------------------------] 00049 /** 00050 * @brief 00051 * Cursor manager 00052 */ 00053 class CursorManager { 00054 00055 00056 //[-------------------------------------------------------] 00057 //[ Public functions ] 00058 //[-------------------------------------------------------] 00059 public: 00060 /** 00061 * @brief 00062 * Constructor 00063 * 00064 * @param[in] cGui 00065 * Owner GUI 00066 */ 00067 PLGUI_API CursorManager(Gui &cGui); 00068 00069 /** 00070 * @brief 00071 * Destructor 00072 */ 00073 PLGUI_API ~CursorManager(); 00074 00075 /** 00076 * @brief 00077 * Get owner GUI 00078 * 00079 * @return 00080 * Pointer to GUI object (never a null pointer) 00081 */ 00082 PLGUI_API Gui *GetGui() const; 00083 00084 /** 00085 * @brief 00086 * Get standard cursor 00087 * 00088 * @param[in] nCursor 00089 * Cursor ID 00090 * 00091 * @return 00092 * Mouse cursor, can be a null pointer if the backend doesn't support it 00093 */ 00094 PLGUI_API Cursor *GetCursor(EMouseCursor nCursor); 00095 00096 00097 //[-------------------------------------------------------] 00098 //[ Protected data ] 00099 //[-------------------------------------------------------] 00100 protected: 00101 Gui *m_pGui; /**< Pointer to GUI */ 00102 Cursor *m_pCursors[Cursor_Count]; /**< Standard mouse cursors */ 00103 00104 00105 }; 00106 00107 00108 //[-------------------------------------------------------] 00109 //[ Namespace ] 00110 //[-------------------------------------------------------] 00111 } // PLGui 00112 00113 00114 #endif // __PLGUI_CURSORMANAGER_H__
|