PixelLightAPI  .
Screen.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: Screen.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_SCREEN_H__
00024 #define __PLGUI_SCREEN_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLCore/String/String.h>
00032 #include <PLMath/Vector2i.h>
00033 #include "PLGui/PLGui.h"
00034 
00035 
00036 //[-------------------------------------------------------]
00037 //[ Namespace                                             ]
00038 //[-------------------------------------------------------]
00039 namespace PLGui {
00040 
00041 
00042 //[-------------------------------------------------------]
00043 //[ Forward declarations                                  ]
00044 //[-------------------------------------------------------]
00045 class Gui;
00046 class Widget;
00047 
00048 
00049 //[-------------------------------------------------------]
00050 //[ Classes                                               ]
00051 //[-------------------------------------------------------]
00052 /**
00053 *  @brief
00054 *    Screen class
00055 *
00056 *  @remarks
00057 *    This class represents a physical or logical screen (e.g. a monitor device)
00058 */
00059 class Screen {
00060 
00061 
00062     //[-------------------------------------------------------]
00063     //[ Friends                                               ]
00064     //[-------------------------------------------------------]
00065     friend class Gui;
00066 
00067 
00068     //[-------------------------------------------------------]
00069     //[ Public functions                                      ]
00070     //[-------------------------------------------------------]
00071     public:
00072         /**
00073         *  @brief
00074         *    Constructor
00075         *
00076         *  @param[in] pGui
00077         *    Pointer to the owner GUI
00078         */
00079         PLGUI_API Screen(Gui *pGui);
00080 
00081         /**
00082         *  @brief
00083         *    Destructor
00084         */
00085         PLGUI_API ~Screen();
00086 
00087         /**
00088         *  @brief
00089         *    Get owner GUI
00090         *
00091         *  @return
00092         *    GUI
00093         */
00094         PLGUI_API Gui *GetGui() const;
00095 
00096         /**
00097         *  @brief
00098         *    Get screen name
00099         *
00100         *  @return
00101         *    Name of screen (this depends on the system)
00102         */
00103         PLGUI_API PLCore::String GetName() const;
00104 
00105         /**
00106         *  @brief
00107         *    Set screen name
00108         *
00109         *  @param[in] sName
00110         *    Name of screen
00111         */
00112         PLGUI_API void SetName(const PLCore::String &sName);
00113 
00114         /**
00115         *  @brief
00116         *    Get screen position
00117         *
00118         *  @return
00119         *    Screen position (upper/left corner)
00120         */
00121         PLGUI_API PLMath::Vector2i GetPos() const;
00122 
00123         /**
00124         *  @brief
00125         *    Set screen position
00126         *
00127         *  @param[in] vPos
00128         *    Screen size (x, y)
00129         */
00130         PLGUI_API void SetPos(const PLMath::Vector2i &vPos);
00131 
00132         /**
00133         *  @brief
00134         *    Get screen size
00135         *
00136         *  @return
00137         *    Screen size (width, height)
00138         */
00139         PLGUI_API PLMath::Vector2i GetSize() const;
00140 
00141         /**
00142         *  @brief
00143         *    Set screen size
00144         *
00145         *  @param[in] vSize
00146         *    Screen size (width, height)
00147         */
00148         PLGUI_API void SetSize(const PLMath::Vector2i &vSize);
00149 
00150         /**
00151         *  @brief
00152         *    Check if this is the default screen
00153         *
00154         *  @return
00155         *    'true', if the screen is the default screen
00156         */
00157         PLGUI_API bool IsDefault() const;
00158 
00159         /**
00160         *  @brief
00161         *    Set if this is the default screen
00162         *
00163         *  @param[in] bDefault
00164         *    'true', if the screen is the default screen
00165         */
00166         PLGUI_API void SetDefault(bool bDefault);
00167 
00168 
00169     //[-------------------------------------------------------]
00170     //[ Private data                                          ]
00171     //[-------------------------------------------------------]
00172     private:
00173         Gui              *m_pGui;           /**< Pointer to GUI instance */
00174         mutable Widget   *m_pDesktopWidget; /**< Desktop widget */
00175         bool              m_bDefault;       /**< 'true' if the screen is the default screen */
00176         PLCore::String    m_sName;          /**< Screen name */
00177         PLMath::Vector2i  m_vPos;           /**< Screen position */
00178         PLMath::Vector2i  m_vSize;          /**< Screen size */
00179 
00180 
00181 };
00182 
00183 
00184 //[-------------------------------------------------------]
00185 //[ Namespace                                             ]
00186 //[-------------------------------------------------------]
00187 } // PLGui
00188 
00189 
00190 #endif // __PLGUI_SCREEN_H__


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:08:59
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported