PixelLightAPI  .
Panel.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: Panel.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_PANEL_H__
00024 #define __PLGUI_PANEL_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLGui/Themes/Theme.h"
00032 #include "PLGui/Widgets/Containers/ContainerWidget.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLGui {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Classes                                               ]
00043 //[-------------------------------------------------------]
00044 /**
00045 *  @brief
00046 *    Container widget that displays a raised or sunken panel
00047 */
00048 class Panel : public ContainerWidget {
00049 
00050 
00051     //[-------------------------------------------------------]
00052     //[ Class definition                                      ]
00053     //[-------------------------------------------------------]
00054     pl_class(PLGUI_RTTI_EXPORT, Panel, "PLGui", PLGui::ContainerWidget, "Container widget that displays a raised or sunken panel")
00055         // Attributes
00056         pl_attribute(BorderStyle,   pl_enum_type(EBorderStyle), RaisedBorder,   ReadWrite,  GetSet, "Border style", "")
00057         // Constructors
00058         pl_constructor_0(DefaultConstructor,    "Default constructor",  "")
00059     pl_class_end
00060 
00061 
00062     //[-------------------------------------------------------]
00063     //[ Public functions                                      ]
00064     //[-------------------------------------------------------]
00065     public:
00066         /**
00067         *  @brief
00068         *    Constructor
00069         *
00070         *  @param[in] pParent
00071         *    Pointer to parent widget
00072         */
00073         PLGUI_API Panel(Widget *pParent = nullptr);
00074 
00075         /**
00076         *  @brief
00077         *    Destructor
00078         */
00079         PLGUI_API virtual ~Panel();
00080 
00081         /**
00082         *  @brief
00083         *    Get border style
00084         *
00085         *  @return
00086         *    Border style
00087         */
00088         PLGUI_API EBorderStyle GetBorderStyle() const;
00089 
00090         /**
00091         *  @brief
00092         *    Set border style
00093         *
00094         *  @param[in] nBorderStyle
00095         *    Border style
00096         */
00097         PLGUI_API void SetBorderStyle(EBorderStyle nBorderStyle);
00098 
00099 
00100     //[-------------------------------------------------------]
00101     //[ Public virtual Widget functions                       ]
00102     //[-------------------------------------------------------]
00103     public:
00104         PLGUI_API virtual void OnDraw(Graphics &cGraphics) override;
00105         PLGUI_API virtual PLMath::Vector2i OnPreferredSize(const PLMath::Vector2i &vRefSize) const override;
00106         PLGUI_API virtual void OnAdjustContent() override;
00107 
00108 
00109     //[-------------------------------------------------------]
00110     //[ Protected data                                        ]
00111     //[-------------------------------------------------------]
00112     public:
00113         EBorderStyle m_nBorderStyle;    /**< Border style */
00114 
00115 
00116 };
00117 
00118 
00119 //[-------------------------------------------------------]
00120 //[ Namespace                                             ]
00121 //[-------------------------------------------------------]
00122 } // PLGui
00123 
00124 
00125 #endif // __PLGUI_PANEL_H__


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