PixelLightAPI  .
Layout.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: Layout.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_H__
00024 #define __PLGUI_LAYOUT_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLCore/Base/Object.h>
00032 #include "PLGui/PLGui.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLGui {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Classes                                               ]
00043 //[-------------------------------------------------------]
00044 /**
00045 *  @brief
00046 *    Layout base class
00047 */
00048 class Layout : public PLCore::Object {
00049 
00050 
00051     //[-------------------------------------------------------]
00052     //[ Friends                                               ]
00053     //[-------------------------------------------------------]
00054     friend class Widget;
00055 
00056 
00057     //[-------------------------------------------------------]
00058     //[ Class definition                                      ]
00059     //[-------------------------------------------------------]
00060     pl_class(PLGUI_RTTI_EXPORT, Layout, "PLGui", PLCore::Object, "GUI layout class")
00061     pl_class_end
00062 
00063 
00064     //[-------------------------------------------------------]
00065     //[ Public functions                                      ]
00066     //[-------------------------------------------------------]
00067     public:
00068         /**
00069         *  @brief
00070         *    Constructor
00071         */
00072         PLGUI_API Layout();
00073 
00074         /**
00075         *  @brief
00076         *    Destructor
00077         */
00078         PLGUI_API virtual ~Layout();
00079 
00080         /**
00081         *  @brief
00082         *    Get widget
00083         *
00084         *  @return
00085         *    Widget to which the layout belongs
00086         */
00087         PLGUI_API Widget *GetWidget() const;
00088 
00089 
00090     //[-------------------------------------------------------]
00091     //[ Protected virtual Layout functions                    ]
00092     //[-------------------------------------------------------]
00093     protected:
00094         virtual void ApplyLayout();
00095 
00096 
00097     //[-------------------------------------------------------]
00098     //[ Protected functions                                   ]
00099     //[-------------------------------------------------------]
00100     protected:
00101         /**
00102         *  @brief
00103         *    Set widget
00104         *
00105         *  @param[in] pWidget
00106         *    Widget to which the layout belongs
00107         */
00108         PLGUI_API void SetWidget(Widget *pWidget);
00109 
00110 
00111     //[-------------------------------------------------------]
00112     //[ Protected data                                        ]
00113     //[-------------------------------------------------------]
00114     protected:
00115         // Data
00116         Widget *m_pWidget;  /**< Widget to which the layout belongs */
00117 
00118 
00119 };
00120 
00121 
00122 //[-------------------------------------------------------]
00123 //[ Namespace                                             ]
00124 //[-------------------------------------------------------]
00125 } // PLGui
00126 
00127 
00128 #endif // __PLGUI_LAYOUT_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