PixelLightAPI  .
ThemeDesktop.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: ThemeDesktop.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_THEME_DESKTOP_H__
00024 #define __PLGUI_THEME_DESKTOP_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLGraphics/Color/Color4.h>
00032 #include "PLGui/Gui/Resources/Image.h"
00033 #include "PLGui/Themes/Theme.h"
00034 
00035 
00036 //[-------------------------------------------------------]
00037 //[ Namespace                                             ]
00038 //[-------------------------------------------------------]
00039 namespace PLGui {
00040 
00041 
00042 //[-------------------------------------------------------]
00043 //[ Classes                                               ]
00044 //[-------------------------------------------------------]
00045 /**
00046 *  @brief
00047 *    PixelLight desktop theme
00048 */
00049 class ThemeDesktop : public Theme {
00050 
00051 
00052     //[-------------------------------------------------------]
00053     //[ Friends                                               ]
00054     //[-------------------------------------------------------]
00055     friend class Widget;
00056 
00057 
00058     //[-------------------------------------------------------]
00059     //[ Class definition                                      ]
00060     //[-------------------------------------------------------]
00061     pl_class(PLGUI_RTTI_EXPORT, ThemeDesktop, "PLGui", PLGui::Theme, "PixelLight desktop theme")
00062     pl_class_end
00063 
00064 
00065     //[-------------------------------------------------------]
00066     //[ Public functions                                      ]
00067     //[-------------------------------------------------------]
00068     public:
00069         /**
00070         *  @brief
00071         *    Constructor
00072         *
00073         *  @param[in] cGui
00074         *    Owner GUI
00075         */
00076         PLGUI_API ThemeDesktop(Gui &cGui);
00077 
00078         /**
00079         *  @brief
00080         *    Destructor
00081         */
00082         PLGUI_API virtual ~ThemeDesktop();
00083 
00084 
00085     //[-------------------------------------------------------]
00086     //[ Public virtual Theme functions                        ]
00087     //[-------------------------------------------------------]
00088     public:
00089         PLGUI_API virtual void DrawRect(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, ELineStyle nStyle, const PLGraphics::Color4 &cColor, int nWidth, int nRound = 0) override;
00090         PLGUI_API virtual void DrawBorder(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EBorderStyle nBorderStyle) override;
00091         PLGUI_API virtual void DrawFocusRect(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2) override;
00092         PLGUI_API virtual void DrawSeparator(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation) override;
00093         PLGUI_API virtual void DrawRule(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation) override;
00094 
00095         PLGUI_API virtual void DrawPanel(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EBorderStyle nBorderStyle) override;
00096         PLGUI_API virtual void DrawWindow(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, bool bBorder, PLCore::uint32 nWidgetState, const PLCore::String &sTitle, const PLGui::Image &cIcon) override;
00097         PLGUI_API virtual void DrawSystemButton(Graphics &cGraphics, const PLMath::Vector2i &vPos, ESystemCommand nSystemCommand, PLCore::uint32 nWidgetState) override;
00098         PLGUI_API virtual void DrawButton(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, const PLCore::String &sTitle, const Image &cImage, PLCore::uint32 nWidgetState) override;
00099         PLGUI_API virtual void DrawToggleButton(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, const PLCore::String &sTitle, const Image &cImage, PLCore::uint32 nWidgetState, ECheckState nChecked) override;
00100         PLGUI_API virtual void DrawRadioButton(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, const PLCore::String &sTitle, PLCore::uint32 nWidgetState, ECheckState nChecked) override;
00101         PLGUI_API virtual void DrawCheckBox(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, const PLCore::String &sTitle, PLCore::uint32 nWidgetState, ECheckState nChecked) override;
00102         PLGUI_API virtual void DrawTooltip(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, PLCore::uint32 nWidgetState) override;
00103         PLGUI_API virtual void DrawSlider(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00104         PLGUI_API virtual void DrawSliderHandle(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00105         PLGUI_API virtual void DrawScrollBar(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00106         PLGUI_API virtual void DrawScrollBarPlusButton(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00107         PLGUI_API virtual void DrawScrollBarMinusButton(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00108         PLGUI_API virtual void DrawScrollBarHandle(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00109         PLGUI_API virtual void DrawSplitter(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation) override;
00110         PLGUI_API virtual void DrawMenuBar(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00111         PLGUI_API virtual void DrawPopupMenu(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00112         PLGUI_API virtual void DrawMenuItem(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, const PLCore::String &sTitle, const Image &cImage, bool bDrawArrow, EMenuItemType nType, EOrientation nOrientation, PLCore::uint32 nWidgetState) override;
00113 
00114 
00115     //[-------------------------------------------------------]
00116     //[ Protected functions                                   ]
00117     //[-------------------------------------------------------]
00118     protected:
00119         PLGUI_API void DrawControlBorder(Graphics &cGraphics, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, const PLGraphics::Color4 &cColorBorder, const PLGraphics::Color4 &cColorHighlight);
00120 
00121 
00122     //[-------------------------------------------------------]
00123     //[ Protected data                                        ]
00124     //[-------------------------------------------------------]
00125     protected:
00126         // Options
00127         int                 m_nControlRound;                    /**< Rounded edges for controls */
00128 
00129         // Colors
00130         PLGraphics::Color4  m_cColorPanelRaised;                /**< Raised border color */
00131         PLGraphics::Color4  m_cColorPanelSunken;                /**< Sunken border color */
00132         PLGraphics::Color4  m_cColorBorder;                     /**< Border color */
00133         PLGraphics::Color4  m_cColorTitleBar;                   /**< Title bar color (active) */
00134         PLGraphics::Color4  m_cColorTitleBarInactive;           /**< Title bar color (inactive) */
00135         PLGraphics::Color4  m_cColorControlBack;                /**< Controls: Background color */
00136         PLGraphics::Color4  m_cColorControlBackDisabled;        /**< Controls: Background color (disabled) */
00137         PLGraphics::Color4  m_cColorControlBackSelect;          /**< Controls: Background color (mouse-over) */
00138         PLGraphics::Color4  m_cColorControlBackPressed;         /**< Controls: Background color (pressed) */
00139         PLGraphics::Color4  m_cColorControlBorder;              /**< Controls: Border color */
00140         PLGraphics::Color4  m_cColorControlBorderSelect;        /**< Controls: Border color (mouse-over) */
00141         PLGraphics::Color4  m_cColorControlHighlightSelect;     /**< Controls: Highlight color (mouse-over) */
00142 
00143         // Images
00144         Image               m_cImageArrowLeft;                  /**< Arrow left */
00145         Image               m_cImageArrowRight;                 /**< Arrow right */
00146         Image               m_cImageArrowUp;                    /**< Arrow up */
00147         Image               m_cImageArrowDown;                  /**< Arrow down */
00148         Image               m_cImageRadioButton;                /**< Radio button */
00149         Image               m_cImageRadioButtonChecked;         /**< Radio button (checked) */
00150         Image               m_cImageCheckBox;                   /**< Check box */
00151         Image               m_cImageCheckBoxChecked;            /**< Check box (checked) */
00152         Image               m_cImageCheckBoxPartially;          /**< Check box (partially checked) */
00153         Image               m_cImageMinimize;                   /**< System button 'minimize' */
00154         Image               m_cImageMaximize;                   /**< System button 'maximize' */
00155         Image               m_cImageRestore;                    /**< System button 'restore' */
00156         Image               m_cImageClose;                      /**< System button 'close' */
00157 
00158 
00159 };
00160 
00161 
00162 //[-------------------------------------------------------]
00163 //[ Namespace                                             ]
00164 //[-------------------------------------------------------]
00165 } // PLGui
00166 
00167 
00168 #endif // __PLGUI_THEME_DESKTOP_H__


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