1 2@c %start of fragment 3 4@deftp Class <gtk-box> 5Derives from @code{<gtk-container>}. 6 7This class defines the following slots: 8 9@table @code 10@item spacing 11The amount of space between children 12 13@item homogeneous 14Whether the children should all be the same size 15 16@end table 17 18@end deftp 19 20@deffn Function gtk-box-pack-start (self@tie{}@code{<gtk-box>}) (child@tie{}@code{<gtk-widget>}) (expand@tie{}@code{bool}) (fill@tie{}@code{bool}) (padding@tie{}@code{unsigned-int}) 21@deffnx Method pack-start 22Adds @var{child} to @var{box}, packed with reference to the start of @var{box}. 23The @var{child} is packed after any other child packed with reference to the 24start of @var{box}. 25 26@table @var 27@item box 28a @code{<gtk-box>}. 29 30@item child 31the @code{<gtk-widget>} to be added to @var{box}. 32 33@item expand 34@samp{@code{#t}} if the new child is to be given extra space allocated to 35@var{box}. The extra space will be divided evenly between all children of 36@var{box} that use this option. 37 38@item fill 39@samp{@code{#t}} if space given to @var{child} by the @var{expand} option is 40actually allocated to @var{child}, rather than just padding it. This parameter 41has no effect if @var{expand} is set to @samp{@code{#f}}. A child is always 42allocated the full height of a @code{<gtk-hbox>} and the full width of a 43@code{<gtk-vbox>}. This option affects the other dimension. 44 45@item padding 46extra space in pixels to put between this child and its neighbors, over and 47above the global amount specified by @c (structfield "spacing") in 48@code{<gtk-box>}. If @var{child} is a widget at one of the reference ends of 49@var{box}, then @var{padding} pixels are also put between @var{child} and the 50reference edge of @var{box}. 51 52@end table 53 54@end deffn 55 56@deffn Function gtk-box-pack-end (self@tie{}@code{<gtk-box>}) (child@tie{}@code{<gtk-widget>}) (expand@tie{}@code{bool}) (fill@tie{}@code{bool}) (padding@tie{}@code{unsigned-int}) 57@deffnx Method pack-end 58Adds @var{child} to @var{box}, packed with reference to the end of @var{box}. 59The @var{child} is packed after (away from end of) any other child packed with 60reference to the end of @var{box}. 61 62@table @var 63@item box 64a @code{<gtk-box>}. 65 66@item child 67the @code{<gtk-widget>} to be added to @var{box}. 68 69@item expand 70@samp{@code{#t}} if the new child is to be given extra space allocated to 71@var{box}. The extra space will be divided evenly between all children of 72@var{box} that use this option. 73 74@item fill 75@samp{@code{#t}} if space given to @var{child} by the @var{expand} option is 76actually allocated to @var{child}, rather than just padding it. This parameter 77has no effect if @var{expand} is set to @samp{@code{#f}}. A child is always 78allocated the full height of a @code{<gtk-hbox>} and the full width of a 79@code{<gtk-vbox>}. This option affects the other dimension. 80 81@item padding 82extra space in pixels to put between this child and its neighbors, over and 83above the global amount specified by @c (structfield "spacing") in 84@code{<gtk-box>}. If @var{child} is a widget at one of the reference ends of 85@var{box}, then @var{padding} pixels are also put between @var{child} and the 86reference edge of @var{box}. 87 88@end table 89 90@end deffn 91 92@deffn Function gtk-box-pack-start-defaults (self@tie{}@code{<gtk-box>}) (widget@tie{}@code{<gtk-widget>}) 93@deffnx Method pack-start-defaults 94Adds @var{widget} to @var{box}, packed with reference to the start of @var{box}. 95The child is packed after any other child packed with reference to the start of 96@var{box}. 97 98Parameters for how to pack the child @var{widget}, @c (structfield "expand") , 99@c (structfield "fill") , and @c (structfield "padding") in 100@code{<gtk-box-child>}, are given their default values, @samp{@code{#t}}, 101@samp{@code{#t}}, and 0, respectively. 102 103@table @var 104@item box 105a @code{<gtk-box>}. 106 107@item widget 108the @code{<gtk-widget>} to be added to @var{box}. 109 110@end table 111 112@end deffn 113 114@deffn Function gtk-box-pack-end-defaults (self@tie{}@code{<gtk-box>}) (widget@tie{}@code{<gtk-widget>}) 115@deffnx Method pack-end-defaults 116Adds @var{widget} to @var{box}, packed with reference to the end of @var{box}. 117The child is packed after (away from end of) any other child packed with 118reference to the end of @var{box}. 119 120Parameters for how to pack the child @var{widget}, @c (structfield "expand") , 121@c (structfield "fill") , and @c (structfield "padding") in 122@code{<gtk-box-child>}, are given their default values, @samp{@code{#t}}, 123@samp{@code{#t}}, and 0, respectively. 124 125@table @var 126@item box 127a @code{<gtk-box>}. 128 129@item widget 130the @code{<gtk-widget>} to be added to @var{box}. 131 132@end table 133 134@end deffn 135 136@deffn Function gtk-box-get-homogeneous (self@tie{}@code{<gtk-box>}) @result{}@tie{} (ret@tie{}@code{bool}) 137@deffnx Method get-homogeneous 138Returns whether the box is homogeneous (all children are the same size). See 139@code{gtk-box-set-homogeneous}. 140 141@table @var 142@item box 143a @code{<gtk-box>} 144 145@item ret 146@samp{@code{#t}} if the box is homogeneous. 147 148@end table 149 150@end deffn 151 152@deffn Function gtk-box-set-homogeneous (self@tie{}@code{<gtk-box>}) (homogeneous@tie{}@code{bool}) 153@deffnx Method set-homogeneous 154Sets the @c (structfield "homogeneous") field of @code{<gtk-box>}, controlling 155whether or not all children of @var{box} are given equal space in the box. 156 157@table @var 158@item box 159a @code{<gtk-box>}. 160 161@item homogeneous 162a boolean value, @samp{@code{#t}} to create equal allotments, @samp{@code{#f}} 163for variable allotments. 164 165@end table 166 167@end deffn 168 169@deffn Function gtk-box-get-spacing (self@tie{}@code{<gtk-box>}) @result{}@tie{} (ret@tie{}@code{int}) 170@deffnx Method get-spacing 171Gets the value set by @code{gtk-box-set-spacing}. 172 173@table @var 174@item box 175a @code{<gtk-box>} 176 177@item ret 178spacing between children 179 180@end table 181 182@end deffn 183 184@deffn Function gtk-box-set-spacing (self@tie{}@code{<gtk-box>}) (spacing@tie{}@code{int}) 185@deffnx Method set-spacing 186Sets the @c (structfield "spacing") field of @code{<gtk-box>}, which is the 187number of pixels to place between children of @var{box}. 188 189@table @var 190@item box 191a @code{<gtk-box>}. 192 193@item spacing 194the number of pixels to put between children. 195 196@end table 197 198@end deffn 199 200@deffn Function gtk-box-reorder-child (self@tie{}@code{<gtk-box>}) (child@tie{}@code{<gtk-widget>}) (position@tie{}@code{int}) 201@deffnx Method reorder-child 202Moves @var{child} to a new @var{position} in the list of @var{box} children. The 203list is the @c (structfield "children") field of @code{<gtk-box>}, and contains 204both widgets packed @code{<gtk-pack-start>} as well as widgets packed 205@code{<gtk-pack-end>}, in the order that these widgets were added to @var{box}. 206 207A widget's position in the @var{box} children list determines where the widget 208is packed into @var{box}. A child widget at some position in the list will be 209packed just after all other widgets of the same packing type that appear earlier 210in the list. 211 212@table @var 213@item box 214a @code{<gtk-box>}. 215 216@item child 217the @code{<gtk-widget>} to move. 218 219@item position 220the new position for @var{child} in the @c (structfield "children") list of 221@code{<gtk-box>}, starting from 0. If negative, indicates the end of the list. 222 223@end table 224 225@end deffn 226 227@deffn Function gtk-box-set-child-packing (self@tie{}@code{<gtk-box>}) (child@tie{}@code{<gtk-widget>}) (expand@tie{}@code{bool}) (fill@tie{}@code{bool}) (padding@tie{}@code{unsigned-int}) (pack_type@tie{}@code{<gtk-pack-type>}) 228@deffnx Method set-child-packing 229Sets the way @var{child} is packed into @var{box}. 230 231@table @var 232@item box 233a @code{<gtk-box>}. 234 235@item child 236the @code{<gtk-widget>} of the child to set. 237 238@item expand 239the new value of the @c (structfield "expand") field in @code{<gtk-box-child>}. 240 241@item fill 242the new value of the @c (structfield "fill") field in @code{<gtk-box-child>}. 243 244@item padding 245the new value of the @c (structfield "padding") field in @code{<gtk-box-child>}. 246 247@item pack-type 248the new value of the @c (structfield "pack") field in @code{<gtk-box-child>}. 249 250@end table 251 252@end deffn 253 254 255@c %end of fragment 256