/usr/include/d/gtkd-3/gtk/ToolItemGroup.d is in libgtkd-3-dev 3.7.5-2build1.
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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | /*
* This file is part of gtkD.
*
* gtkD is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version, with
* some exceptions, please read the COPYING file.
*
* gtkD 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with gtkD; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/
// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage
module gtk.ToolItemGroup;
private import glib.ConstructionException;
private import glib.Str;
private import gobject.ObjectG;
private import gtk.Container;
private import gtk.ToolItem;
private import gtk.ToolShellIF;
private import gtk.ToolShellT;
private import gtk.Widget;
private import gtk.c.functions;
public import gtk.c.types;
public import gtkc.gtktypes;
/**
* A #GtkToolItemGroup is used together with #GtkToolPalette to add
* #GtkToolItems to a palette like container with different
* categories and drag and drop support.
*
* # CSS nodes
*
* GtkToolItemGroup has a single CSS node named toolitemgroup.
*/
public class ToolItemGroup : Container, ToolShellIF
{
/** the main Gtk struct */
protected GtkToolItemGroup* gtkToolItemGroup;
/** Get the main Gtk struct */
public GtkToolItemGroup* getToolItemGroupStruct(bool transferOwnership = false)
{
if (transferOwnership)
ownedRef = false;
return gtkToolItemGroup;
}
/** the main Gtk struct as a void* */
protected override void* getStruct()
{
return cast(void*)gtkToolItemGroup;
}
protected override void setStruct(GObject* obj)
{
gtkToolItemGroup = cast(GtkToolItemGroup*)obj;
super.setStruct(obj);
}
/**
* Sets our main struct and passes it to the parent class.
*/
public this (GtkToolItemGroup* gtkToolItemGroup, bool ownedRef = false)
{
this.gtkToolItemGroup = gtkToolItemGroup;
super(cast(GtkContainer*)gtkToolItemGroup, ownedRef);
}
// add the ToolShell capabilities
mixin ToolShellT!(GtkToolItemGroup);
/**
* Retrieves the current orientation for the tool shell. Tool items must not
* call this function directly, but rely on gtk_tool_item_get_orientation()
* instead.
* Since 2.14
* Returns: the current orientation of shell
*/
public GtkOrientation getOrientation()
{
return gtk_tool_shell_get_orientation(getToolShellStruct());
}
/**
*/
/** */
public static GType getType()
{
return gtk_tool_item_group_get_type();
}
/**
* Creates a new tool item group with label @label.
*
* Params:
* label = the label of the new group
*
* Returns: a new #GtkToolItemGroup.
*
* Since: 2.20
*
* Throws: ConstructionException GTK+ fails to create the object.
*/
public this(string label)
{
auto p = gtk_tool_item_group_new(Str.toStringz(label));
if(p is null)
{
throw new ConstructionException("null returned by new");
}
this(cast(GtkToolItemGroup*) p);
}
/**
* Gets whether @group is collapsed or expanded.
*
* Returns: %TRUE if @group is collapsed, %FALSE if it is expanded
*
* Since: 2.20
*/
public bool getCollapsed()
{
return gtk_tool_item_group_get_collapsed(gtkToolItemGroup) != 0;
}
/**
* Gets the tool item at position (x, y).
*
* Params:
* x = the x position
* y = the y position
*
* Returns: the #GtkToolItem at position (x, y)
*
* Since: 2.20
*/
public ToolItem getDropItem(int x, int y)
{
auto p = gtk_tool_item_group_get_drop_item(gtkToolItemGroup, x, y);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(ToolItem)(cast(GtkToolItem*) p);
}
/**
* Gets the ellipsization mode of @group.
*
* Returns: the #PangoEllipsizeMode of @group
*
* Since: 2.20
*/
public PangoEllipsizeMode getEllipsize()
{
return gtk_tool_item_group_get_ellipsize(gtkToolItemGroup);
}
/**
* Gets the relief mode of the header button of @group.
*
* Returns: the #GtkReliefStyle
*
* Since: 2.20
*/
public GtkReliefStyle getHeaderRelief()
{
return gtk_tool_item_group_get_header_relief(gtkToolItemGroup);
}
/**
* Gets the position of @item in @group as index.
*
* Params:
* item = a #GtkToolItem
*
* Returns: the index of @item in @group or -1 if @item is no child of @group
*
* Since: 2.20
*/
public int getItemPosition(ToolItem item)
{
return gtk_tool_item_group_get_item_position(gtkToolItemGroup, (item is null) ? null : item.getToolItemStruct());
}
/**
* Gets the label of @group.
*
* Returns: the label of @group. The label is an internal string of @group
* and must not be modified. Note that %NULL is returned if a custom
* label has been set with gtk_tool_item_group_set_label_widget()
*
* Since: 2.20
*/
public string getLabel()
{
return Str.toString(gtk_tool_item_group_get_label(gtkToolItemGroup));
}
/**
* Gets the label widget of @group.
* See gtk_tool_item_group_set_label_widget().
*
* Returns: the label widget of @group
*
* Since: 2.20
*/
public Widget getLabelWidget()
{
auto p = gtk_tool_item_group_get_label_widget(gtkToolItemGroup);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
}
/**
* Gets the number of tool items in @group.
*
* Returns: the number of tool items in @group
*
* Since: 2.20
*/
public uint getNItems()
{
return gtk_tool_item_group_get_n_items(gtkToolItemGroup);
}
/**
* Gets the tool item at @index in group.
*
* Params:
* index = the index
*
* Returns: the #GtkToolItem at index
*
* Since: 2.20
*/
public ToolItem getNthItem(uint index)
{
auto p = gtk_tool_item_group_get_nth_item(gtkToolItemGroup, index);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(ToolItem)(cast(GtkToolItem*) p);
}
/**
* Inserts @item at @position in the list of children of @group.
*
* Params:
* item = the #GtkToolItem to insert into @group
* position = the position of @item in @group, starting with 0.
* The position -1 means end of list.
*
* Since: 2.20
*/
public void insert(ToolItem item, int position)
{
gtk_tool_item_group_insert(gtkToolItemGroup, (item is null) ? null : item.getToolItemStruct(), position);
}
/**
* Sets whether the @group should be collapsed or expanded.
*
* Params:
* collapsed = whether the @group should be collapsed or expanded
*
* Since: 2.20
*/
public void setCollapsed(bool collapsed)
{
gtk_tool_item_group_set_collapsed(gtkToolItemGroup, collapsed);
}
/**
* Sets the ellipsization mode which should be used by labels in @group.
*
* Params:
* ellipsize = the #PangoEllipsizeMode labels in @group should use
*
* Since: 2.20
*/
public void setEllipsize(PangoEllipsizeMode ellipsize)
{
gtk_tool_item_group_set_ellipsize(gtkToolItemGroup, ellipsize);
}
/**
* Set the button relief of the group header.
* See gtk_button_set_relief() for details.
*
* Params:
* style = the #GtkReliefStyle
*
* Since: 2.20
*/
public void setHeaderRelief(GtkReliefStyle style)
{
gtk_tool_item_group_set_header_relief(gtkToolItemGroup, style);
}
/**
* Sets the position of @item in the list of children of @group.
*
* Params:
* item = the #GtkToolItem to move to a new position, should
* be a child of @group.
* position = the new position of @item in @group, starting with 0.
* The position -1 means end of list.
*
* Since: 2.20
*/
public void setItemPosition(ToolItem item, int position)
{
gtk_tool_item_group_set_item_position(gtkToolItemGroup, (item is null) ? null : item.getToolItemStruct(), position);
}
/**
* Sets the label of the tool item group. The label is displayed in the header
* of the group.
*
* Params:
* label = the new human-readable label of of the group
*
* Since: 2.20
*/
public void setLabel(string label)
{
gtk_tool_item_group_set_label(gtkToolItemGroup, Str.toStringz(label));
}
/**
* Sets the label of the tool item group.
* The label widget is displayed in the header of the group, in place
* of the usual label.
*
* Params:
* labelWidget = the widget to be displayed in place of the usual label
*
* Since: 2.20
*/
public void setLabelWidget(Widget labelWidget)
{
gtk_tool_item_group_set_label_widget(gtkToolItemGroup, (labelWidget is null) ? null : labelWidget.getWidgetStruct());
}
}
|