PixelLightAPI  .
LayoutBox.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: LayoutBox.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_LAYOUT_LAYOUTBOX_H__
00024 #define __PLGUI_LAYOUT_LAYOUTBOX_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLMath/Vector2i.h>
00032 #include "PLGui/Layout/Layout.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLGui {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Classes                                               ]
00043 //[-------------------------------------------------------]
00044 /**
00045 *  @brief
00046 *    Box layout
00047 */
00048 class LayoutBox : public Layout {
00049 
00050 
00051     //[-------------------------------------------------------]
00052     //[ Class definition                                      ]
00053     //[-------------------------------------------------------]
00054     pl_class(PLGUI_RTTI_EXPORT, LayoutBox, "PLGui", PLGui::Layout, "Box layout")
00055         // Attributes
00056         pl_attribute(Orientation,   pl_enum_type(EOrientation), Horizontal, ReadWrite,  GetSet, "Box orientation",  "")
00057         // Constructors
00058         pl_constructor_0(DefaultConstructor,    "Default constructor",  "")
00059     pl_class_end
00060 
00061 
00062     //[-------------------------------------------------------]
00063     //[ Public RTTI get/set functions                         ]
00064     //[-------------------------------------------------------]
00065     public:
00066         PLGUI_API EOrientation GetOrientation() const;
00067         PLGUI_API void SetOrientation(EOrientation nOrientation);
00068 
00069 
00070     //[-------------------------------------------------------]
00071     //[ Public functions                                      ]
00072     //[-------------------------------------------------------]
00073     public:
00074         /**
00075         *  @brief
00076         *    Constructor
00077         *
00078         *  @param[in] nOrientation
00079         *    Orientation
00080         */
00081         PLGUI_API LayoutBox(EOrientation nOrientation = Horizontal);
00082 
00083         /**
00084         *  @brief
00085         *    Destructor
00086         */
00087         PLGUI_API virtual ~LayoutBox();
00088 
00089 
00090     //[-------------------------------------------------------]
00091     //[ Protected virtual Layout functions                    ]
00092     //[-------------------------------------------------------]
00093     protected:
00094         virtual void ApplyLayout() override;
00095 
00096 
00097     //[-------------------------------------------------------]
00098     //[ Protected data                                        ]
00099     //[-------------------------------------------------------]
00100     protected:
00101         // Exported variables
00102         EOrientation      m_nOrientation;   /**< Box orientation (horizontal or vertical) */
00103 
00104         // Internal data
00105         PLMath::Vector2i *m_pSizes;         /**< Data space used for calculations */
00106         PLCore::uint32    m_nWidgets;       /**< Number of widgets that are in the layout */
00107 
00108 
00109 };
00110 
00111 
00112 //[-------------------------------------------------------]
00113 //[ Namespace                                             ]
00114 //[-------------------------------------------------------]
00115 } // PLGui
00116 
00117 
00118 #endif // __PLGUI_LAYOUT_LAYOUTBOX_H__


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