/usr/include/wxsmith/wxwidgets/wxssizer.h is in libwxsmithlib-dev 13.12+dfsg-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /*
* This file is part of wxSmith plugin for Code::Blocks Studio
* Copyright (C) 2006-2007 Bartlomiej Swiecki
*
* wxSmith is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wxSmith is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with wxSmith. If not, see <http://www.gnu.org/licenses/>.
*
* $Revision: 8704 $
* $Id: wxssizer.h 8704 2012-12-23 20:32:03Z mortenmacfly $
* $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-xx.yy/src/plugins/contrib/wxSmith/wxwidgets/wxssizer.h $
*/
#ifndef WXSSIZER_H
#define WXSSIZER_H
#include "wxsparent.h"
#include "wxsflags.h"
#include <prep.h>
using namespace wxsFlags;
/** \brief Structure containing additional parameters for each widget insidee sizer */
class wxsSizerExtra: public wxsPropertyContainer
{
public:
long Proportion; ///< \brief Proportion param (see wxW documentation for details)
long Flags; ///< \brief Sizer item flags
wxsDimensionData Border; ///< \brief Size of additional border
// wxSizeData MinSize; ///< \brief Minimal size
// wxSizeData Ratio; ///< \brief Ratio
wxsSizerExtra():
Proportion(1),
Flags(wxsSizerFlagsProperty::AlignCenterHorizontal|
wxsSizerFlagsProperty::AlignCenterVertical|
wxsSizerFlagsProperty::BorderTop|
wxsSizerFlagsProperty::BorderBottom|
wxsSizerFlagsProperty::BorderLeft|
wxsSizerFlagsProperty::BorderRight)
{
ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("wxsmith"));
Proportion = cfg->ReadInt ( _T("/defsizer/proportion"), Proportion );
Flags = cfg->ReadInt ( _T("/defsizer/flags"), Flags );
Border.Value = cfg->ReadInt ( _T("/defsizer/border"), 5 );
Border.DialogUnits = cfg->ReadBool ( _T("/defsizer/borderdu"), false );
}
wxString AllParamsCode(wxsCoderContext* Ctx);
protected:
virtual void OnEnumProperties(long Flags);
};
/** \brief Base class for sizers
*
* \note sizers doesn't have identifier by default. But because of some
* extra information it requires, random identifier will be generated
* for it when editing in source mode.
*/
class wxsSizer: public wxsParent
{
public:
/** \brief Ctor */
wxsSizer(wxsItemResData* Data,const wxsItemInfo* Info);
protected:
/** \brief Function generating sizer object used in preview
*
* Sizer created here will be used to generate previews. Adding items
* into sizer are handled automatically. Binding sizer into container
* must be done in container.
*/
virtual wxSizer* OnBuildSizerPreview(wxWindow* Parent) = 0;
/** \brief Function building code generating sizer
*
* This function must append code generating sizer to the end of Code
* param. Adding items into sizer is handled automatically.
*/
virtual void OnBuildSizerCreatingCode() = 0;
/** \brief Function enumerating all properties for specified sizer only
*
* Create custom implementation of this function to add properties
* which are not common for all sizers but are used in one
* type of sizer only
*/
virtual void OnEnumSizerProperties(long Flags) = 0;
/** \brief Adding extra QPP panel for specified sizer only
*
* This function may be used to add some extra properties
* to Quick Props panel. This should be used to properties
* that are used in one sizer type only.
*/
virtual void OnAddSizerQPP(cb_unused wxsAdvQPP* QPP) {}
private:
/** \brief Getting properties availability flags
*
* This function will be overridden here because
* sizers doesn't use variable when using XRC mode
*/
virtual long OnGetPropertiesFlags();
/** \brief Function building code
*
* Code is created using BuindSizerCreatingCode function. It
* automatically adds all children into sizer.
*/
virtual void OnBuildCreatingCode();
/** \brief Function generating declarations
*
* When using XRC file, sizers can not be declared
* so this function does disable them.
*/
virtual void OnBuildDeclarationsCode();
/** \brief Function building preview
*
* Preview is generated using BuildSizerPreview function. All child
* items are added and sizer is binded to parent object automatically.
*
* When there's no exact mode, there's additional panel on which
* guidelines are drawn.
*/
wxObject* OnBuildPreview(wxWindow* Parent,long Flags);
/** \brief Function creating additional data
*
* There's additional data configuring widget inside sizer - it does
* define placement, borders and some other flags.
*/
virtual wxsPropertyContainer* OnBuildExtra();
/** \brief Function adding additional QPP child panel */
virtual void OnAddChildQPP(wxsItem* Child,wxsAdvQPP* QPP);
/** \brief Custom child loading function - needed to support Spacer exception */
virtual bool OnXmlReadChild(TiXmlElement* Elem,bool IsXRC,bool IsExtra);
/** \brief Custom child writing function - needed to support Spacer exception */
virtual bool OnXmlWriteChild(int Index,TiXmlElement* Elem,bool IsXRC,bool IsExtra);
/** \brief Name of extra object node will be returned here */
virtual wxString OnXmlGetExtraObjectClass();
/** \brief Function enumerating properties for sizers*/
virtual void OnEnumItemProperties(long Flags);
/** \brief Adding generic sizer properties to QPP */
virtual void OnAddItemQPP(wxsAdvQPP* QPP);
};
#endif
|