guiDynamicCtrlArrayCtrl.h
Engine/source/gui/containers/guiDynamicCtrlArrayCtrl.h
Classes:
Detailed Description
1 2//----------------------------------------------------------------------------- 3// Copyright (c) 2012 GarageGames, LLC 4// 5// Permission is hereby granted, free of charge, to any person obtaining a copy 6// of this software and associated documentation files (the "Software"), to 7// deal in the Software without restriction, including without limitation the 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9// sell copies of the Software, and to permit persons to whom the Software is 10// furnished to do so, subject to the following conditions: 11// 12// The above copyright notice and this permission notice shall be included in 13// all copies or substantial portions of the Software. 14// 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21// IN THE SOFTWARE. 22//----------------------------------------------------------------------------- 23 24#ifndef _GUIDYNAMICCTRLARRAYCTRL_H_ 25#define _GUIDYNAMICCTRLARRAYCTRL_H_ 26 27#ifndef _GUICONTROL_H_ 28#include "gui/core/guiControl.h" 29#endif 30 31#include "gfx/gfxDevice.h" 32#include "console/console.h" 33#include "console/consoleTypes.h" 34 35class GuiDynamicCtrlArrayControl : public GuiControl 36{ 37 typedef GuiControl Parent; 38 39public: 40 41 GuiDynamicCtrlArrayControl(); 42 virtual ~GuiDynamicCtrlArrayControl(); 43 44 DECLARE_CONOBJECT(GuiDynamicCtrlArrayControl); 45 DECLARE_CATEGORY( "Gui Containers" ); 46 47 // ConsoleObject 48 static void initPersistFields(); 49 50 // SimObject 51 void inspectPostApply(); 52 53 // SimSet 54 void addObject(SimObject *obj); 55 56 // GuiControl 57 bool resize(const Point2I &newPosition, const Point2I &newExtent); 58 void childResized(GuiControl *child); 59 60 // GuiDynamicCtrlArrayCtrl 61 void refresh(); 62 63protected: 64 65 S32 mCols; 66 S32 mRows; 67 S32 mRowSize; 68 S32 mColSize; 69 S32 mRowSpacing; 70 S32 mColSpacing; 71 bool mResizing; 72 bool mSizeToChildren; 73 bool mAutoCellSize; 74 bool mFrozen; 75 bool mDynamicSize; 76 bool mFillRowFirst; 77 78 RectSpacingI mPadding; 79}; 80 81#endif // _GUIDYNAMICCTRLARRAYCTRL_H_ 82