1 /** 2 Control for a single item inside a $(D Tree). 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.treeitem; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.meta; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.object; 22 import godot.texture; 23 /** 24 Control for a single item inside a $(D Tree). 25 26 May have child `TreeItem`s and be styled as well as contain buttons. 27 */ 28 @GodotBaseClass struct TreeItem 29 { 30 enum string _GODOT_internal_name = "TreeItem"; 31 public: 32 @nogc nothrow: 33 union { godot_object _godot_object; GodotObject _GODOT_base; } 34 alias _GODOT_base this; 35 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 36 package(godot) __gshared bool _classBindingInitialized = false; 37 package(godot) static struct _classBinding 38 { 39 __gshared: 40 @GodotName("set_cell_mode") GodotMethod!(void, long, long) setCellMode; 41 @GodotName("get_cell_mode") GodotMethod!(TreeItem.TreeCellMode, long) getCellMode; 42 @GodotName("set_checked") GodotMethod!(void, long, bool) setChecked; 43 @GodotName("is_checked") GodotMethod!(bool, long) isChecked; 44 @GodotName("set_text") GodotMethod!(void, long, String) setText; 45 @GodotName("get_text") GodotMethod!(String, long) getText; 46 @GodotName("set_icon") GodotMethod!(void, long, Texture) setIcon; 47 @GodotName("get_icon") GodotMethod!(Texture, long) getIcon; 48 @GodotName("set_icon_region") GodotMethod!(void, long, Rect2) setIconRegion; 49 @GodotName("get_icon_region") GodotMethod!(Rect2, long) getIconRegion; 50 @GodotName("set_icon_max_width") GodotMethod!(void, long, long) setIconMaxWidth; 51 @GodotName("get_icon_max_width") GodotMethod!(long, long) getIconMaxWidth; 52 @GodotName("set_range") GodotMethod!(void, long, double) setRange; 53 @GodotName("get_range") GodotMethod!(double, long) getRange; 54 @GodotName("set_range_config") GodotMethod!(void, long, double, double, double, bool) setRangeConfig; 55 @GodotName("get_range_config") GodotMethod!(Dictionary, long) getRangeConfig; 56 @GodotName("set_metadata") GodotMethod!(void, long, Variant) setMetadata; 57 @GodotName("get_metadata") GodotMethod!(Variant, long) getMetadata; 58 @GodotName("set_custom_draw") GodotMethod!(void, long, GodotObject, String) setCustomDraw; 59 @GodotName("set_collapsed") GodotMethod!(void, bool) setCollapsed; 60 @GodotName("is_collapsed") GodotMethod!(bool) isCollapsed; 61 @GodotName("set_custom_minimum_height") GodotMethod!(void, long) setCustomMinimumHeight; 62 @GodotName("get_custom_minimum_height") GodotMethod!(long) getCustomMinimumHeight; 63 @GodotName("get_next") GodotMethod!(TreeItem) getNext; 64 @GodotName("get_prev") GodotMethod!(TreeItem) getPrev; 65 @GodotName("get_parent") GodotMethod!(TreeItem) getParent; 66 @GodotName("get_children") GodotMethod!(TreeItem) getChildren; 67 @GodotName("get_next_visible") GodotMethod!(TreeItem) getNextVisible; 68 @GodotName("get_prev_visible") GodotMethod!(TreeItem) getPrevVisible; 69 @GodotName("remove_child") GodotMethod!(void, GodotObject) removeChild; 70 @GodotName("set_selectable") GodotMethod!(void, long, bool) setSelectable; 71 @GodotName("is_selectable") GodotMethod!(bool, long) isSelectable; 72 @GodotName("is_selected") GodotMethod!(bool, long) isSelected; 73 @GodotName("select") GodotMethod!(void, long) select; 74 @GodotName("deselect") GodotMethod!(void, long) deselect; 75 @GodotName("set_editable") GodotMethod!(void, long, bool) setEditable; 76 @GodotName("is_editable") GodotMethod!(bool, long) isEditable; 77 @GodotName("set_custom_color") GodotMethod!(void, long, Color) setCustomColor; 78 @GodotName("clear_custom_color") GodotMethod!(void, long) clearCustomColor; 79 @GodotName("set_custom_bg_color") GodotMethod!(void, long, Color, bool) setCustomBgColor; 80 @GodotName("clear_custom_bg_color") GodotMethod!(void, long) clearCustomBgColor; 81 @GodotName("get_custom_bg_color") GodotMethod!(Color, long) getCustomBgColor; 82 @GodotName("set_custom_as_button") GodotMethod!(void, long, bool) setCustomAsButton; 83 @GodotName("is_custom_set_as_button") GodotMethod!(bool, long) isCustomSetAsButton; 84 @GodotName("add_button") GodotMethod!(void, long, Texture, long, bool, String) addButton; 85 @GodotName("get_button_count") GodotMethod!(long, long) getButtonCount; 86 @GodotName("get_button") GodotMethod!(Texture, long, long) getButton; 87 @GodotName("set_button") GodotMethod!(void, long, long, Texture) setButton; 88 @GodotName("erase_button") GodotMethod!(void, long, long) eraseButton; 89 @GodotName("is_button_disabled") GodotMethod!(bool, long, long) isButtonDisabled; 90 @GodotName("set_expand_right") GodotMethod!(void, long, bool) setExpandRight; 91 @GodotName("get_expand_right") GodotMethod!(bool, long) getExpandRight; 92 @GodotName("set_tooltip") GodotMethod!(void, long, String) setTooltip; 93 @GodotName("get_tooltip") GodotMethod!(String, long) getTooltip; 94 @GodotName("set_text_align") GodotMethod!(void, long, long) setTextAlign; 95 @GodotName("get_text_align") GodotMethod!(TreeItem.TextAlign, long) getTextAlign; 96 @GodotName("move_to_top") GodotMethod!(void) moveToTop; 97 @GodotName("move_to_bottom") GodotMethod!(void) moveToBottom; 98 @GodotName("set_disable_folding") GodotMethod!(void, bool) setDisableFolding; 99 @GodotName("is_folding_disabled") GodotMethod!(bool) isFoldingDisabled; 100 } 101 bool opEquals(in TreeItem other) const { return _godot_object.ptr is other._godot_object.ptr; } 102 TreeItem opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 103 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 104 mixin baseCasts; 105 static TreeItem _new() 106 { 107 static godot_class_constructor constructor; 108 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("TreeItem"); 109 if(constructor is null) return typeof(this).init; 110 return cast(TreeItem)(constructor()); 111 } 112 @disable new(size_t s); 113 /// 114 enum TreeCellMode : int 115 { 116 /** 117 Cell contains a string. 118 */ 119 cellModeString = 0, 120 /** 121 Cell can be checked. 122 */ 123 cellModeCheck = 1, 124 /** 125 Cell contains a range. 126 */ 127 cellModeRange = 2, 128 /** 129 Cell contains an icon. 130 */ 131 cellModeIcon = 3, 132 /** 133 134 */ 135 cellModeCustom = 4, 136 } 137 /// 138 enum TextAlign : int 139 { 140 /** 141 Align text to the left. See `set_text_align()`. 142 */ 143 alignLeft = 0, 144 /** 145 Center text. See `set_text_align()`. 146 */ 147 alignCenter = 1, 148 /** 149 Align text to the right. See `set_text_align()`. 150 */ 151 alignRight = 2, 152 } 153 /// 154 enum Constants : int 155 { 156 alignLeft = 0, 157 cellModeString = 0, 158 alignCenter = 1, 159 cellModeCheck = 1, 160 alignRight = 2, 161 cellModeRange = 2, 162 cellModeIcon = 3, 163 cellModeCustom = 4, 164 } 165 /** 166 Sets the given column's cell mode to `mode`. See `CELL_MODE_*` constants. 167 */ 168 void setCellMode(in long column, in long mode) 169 { 170 checkClassBinding!(typeof(this))(); 171 ptrcall!(void)(_classBinding.setCellMode, _godot_object, column, mode); 172 } 173 /** 174 Returns the column's cell mode. See `CELL_MODE_*` constants. 175 */ 176 TreeItem.TreeCellMode getCellMode(in long column) const 177 { 178 checkClassBinding!(typeof(this))(); 179 return ptrcall!(TreeItem.TreeCellMode)(_classBinding.getCellMode, _godot_object, column); 180 } 181 /** 182 If `true` the column `column` is checked. 183 */ 184 void setChecked(in long column, in bool checked) 185 { 186 checkClassBinding!(typeof(this))(); 187 ptrcall!(void)(_classBinding.setChecked, _godot_object, column, checked); 188 } 189 /** 190 Returns `true` if the given column is checked. 191 */ 192 bool isChecked(in long column) const 193 { 194 checkClassBinding!(typeof(this))(); 195 return ptrcall!(bool)(_classBinding.isChecked, _godot_object, column); 196 } 197 /** 198 199 */ 200 void setText(StringArg1)(in long column, in StringArg1 text) 201 { 202 checkClassBinding!(typeof(this))(); 203 ptrcall!(void)(_classBinding.setText, _godot_object, column, text); 204 } 205 /** 206 Returns the given column's text. 207 */ 208 String getText(in long column) const 209 { 210 checkClassBinding!(typeof(this))(); 211 return ptrcall!(String)(_classBinding.getText, _godot_object, column); 212 } 213 /** 214 Sets the given column's icon $(D Texture). 215 */ 216 void setIcon(in long column, Texture texture) 217 { 218 checkClassBinding!(typeof(this))(); 219 ptrcall!(void)(_classBinding.setIcon, _godot_object, column, texture); 220 } 221 /** 222 Returns the given column's icon $(D Texture). Error if no icon is set. 223 */ 224 Ref!Texture getIcon(in long column) const 225 { 226 checkClassBinding!(typeof(this))(); 227 return ptrcall!(Texture)(_classBinding.getIcon, _godot_object, column); 228 } 229 /** 230 Sets the given column's icon's texture region. 231 */ 232 void setIconRegion(in long column, in Rect2 region) 233 { 234 checkClassBinding!(typeof(this))(); 235 ptrcall!(void)(_classBinding.setIconRegion, _godot_object, column, region); 236 } 237 /** 238 Returns the icon $(D Texture) region as $(D Rect2). 239 */ 240 Rect2 getIconRegion(in long column) const 241 { 242 checkClassBinding!(typeof(this))(); 243 return ptrcall!(Rect2)(_classBinding.getIconRegion, _godot_object, column); 244 } 245 /** 246 Sets the given column's icon's maximum width. 247 */ 248 void setIconMaxWidth(in long column, in long width) 249 { 250 checkClassBinding!(typeof(this))(); 251 ptrcall!(void)(_classBinding.setIconMaxWidth, _godot_object, column, width); 252 } 253 /** 254 Returns the column's icon's maximum width. 255 */ 256 long getIconMaxWidth(in long column) const 257 { 258 checkClassBinding!(typeof(this))(); 259 return ptrcall!(long)(_classBinding.getIconMaxWidth, _godot_object, column); 260 } 261 /** 262 263 */ 264 void setRange(in long column, in double value) 265 { 266 checkClassBinding!(typeof(this))(); 267 ptrcall!(void)(_classBinding.setRange, _godot_object, column, value); 268 } 269 /** 270 271 */ 272 double getRange(in long column) const 273 { 274 checkClassBinding!(typeof(this))(); 275 return ptrcall!(double)(_classBinding.getRange, _godot_object, column); 276 } 277 /** 278 279 */ 280 void setRangeConfig(in long column, in double min, in double max, in double step, in bool expr = false) 281 { 282 checkClassBinding!(typeof(this))(); 283 ptrcall!(void)(_classBinding.setRangeConfig, _godot_object, column, min, max, step, expr); 284 } 285 /** 286 287 */ 288 Dictionary getRangeConfig(in long column) 289 { 290 checkClassBinding!(typeof(this))(); 291 return ptrcall!(Dictionary)(_classBinding.getRangeConfig, _godot_object, column); 292 } 293 /** 294 295 */ 296 void setMetadata(VariantArg1)(in long column, in VariantArg1 meta) 297 { 298 checkClassBinding!(typeof(this))(); 299 ptrcall!(void)(_classBinding.setMetadata, _godot_object, column, meta); 300 } 301 /** 302 303 */ 304 Variant getMetadata(in long column) const 305 { 306 checkClassBinding!(typeof(this))(); 307 return ptrcall!(Variant)(_classBinding.getMetadata, _godot_object, column); 308 } 309 /** 310 Sets the given column's custom draw callback to `callback` method on `object`. 311 The `callback` should accept two arguments: the $(D TreeItem) that is drawn and its position and size as a $(D Rect2). 312 */ 313 void setCustomDraw(StringArg2)(in long column, GodotObject object, in StringArg2 callback) 314 { 315 checkClassBinding!(typeof(this))(); 316 ptrcall!(void)(_classBinding.setCustomDraw, _godot_object, column, object, callback); 317 } 318 /** 319 320 */ 321 void setCollapsed(in bool enable) 322 { 323 checkClassBinding!(typeof(this))(); 324 ptrcall!(void)(_classBinding.setCollapsed, _godot_object, enable); 325 } 326 /** 327 328 */ 329 bool isCollapsed() 330 { 331 checkClassBinding!(typeof(this))(); 332 return ptrcall!(bool)(_classBinding.isCollapsed, _godot_object); 333 } 334 /** 335 336 */ 337 void setCustomMinimumHeight(in long height) 338 { 339 checkClassBinding!(typeof(this))(); 340 ptrcall!(void)(_classBinding.setCustomMinimumHeight, _godot_object, height); 341 } 342 /** 343 344 */ 345 long getCustomMinimumHeight() const 346 { 347 checkClassBinding!(typeof(this))(); 348 return ptrcall!(long)(_classBinding.getCustomMinimumHeight, _godot_object); 349 } 350 /** 351 Returns the next TreeItem in the tree. 352 */ 353 TreeItem getNext() 354 { 355 checkClassBinding!(typeof(this))(); 356 return ptrcall!(TreeItem)(_classBinding.getNext, _godot_object); 357 } 358 /** 359 Returns the previous TreeItem in the tree. 360 */ 361 TreeItem getPrev() 362 { 363 checkClassBinding!(typeof(this))(); 364 return ptrcall!(TreeItem)(_classBinding.getPrev, _godot_object); 365 } 366 /** 367 Returns the parent TreeItem. 368 */ 369 TreeItem getParent() 370 { 371 checkClassBinding!(typeof(this))(); 372 return ptrcall!(TreeItem)(_classBinding.getParent, _godot_object); 373 } 374 /** 375 Returns the TreeItem's child items. 376 */ 377 TreeItem getChildren() 378 { 379 checkClassBinding!(typeof(this))(); 380 return ptrcall!(TreeItem)(_classBinding.getChildren, _godot_object); 381 } 382 /** 383 Returns the next visible TreeItem in the tree. 384 */ 385 TreeItem getNextVisible() 386 { 387 checkClassBinding!(typeof(this))(); 388 return ptrcall!(TreeItem)(_classBinding.getNextVisible, _godot_object); 389 } 390 /** 391 Returns the previous visible TreeItem in the tree. 392 */ 393 TreeItem getPrevVisible() 394 { 395 checkClassBinding!(typeof(this))(); 396 return ptrcall!(TreeItem)(_classBinding.getPrevVisible, _godot_object); 397 } 398 /** 399 Removes the given child TreeItem. 400 */ 401 void removeChild(GodotObject child) 402 { 403 checkClassBinding!(typeof(this))(); 404 ptrcall!(void)(_classBinding.removeChild, _godot_object, child); 405 } 406 /** 407 If `true` the given column is selectable. 408 */ 409 void setSelectable(in long column, in bool selectable) 410 { 411 checkClassBinding!(typeof(this))(); 412 ptrcall!(void)(_classBinding.setSelectable, _godot_object, column, selectable); 413 } 414 /** 415 Returns `true` if column `column` is selectable. 416 */ 417 bool isSelectable(in long column) const 418 { 419 checkClassBinding!(typeof(this))(); 420 return ptrcall!(bool)(_classBinding.isSelectable, _godot_object, column); 421 } 422 /** 423 Returns `true` if column `column` is selected. 424 */ 425 bool isSelected(in long column) 426 { 427 checkClassBinding!(typeof(this))(); 428 return ptrcall!(bool)(_classBinding.isSelected, _godot_object, column); 429 } 430 /** 431 Selects the column `column`. 432 */ 433 void select(in long column) 434 { 435 checkClassBinding!(typeof(this))(); 436 ptrcall!(void)(_classBinding.select, _godot_object, column); 437 } 438 /** 439 Deselects the given column. 440 */ 441 void deselect(in long column) 442 { 443 checkClassBinding!(typeof(this))(); 444 ptrcall!(void)(_classBinding.deselect, _godot_object, column); 445 } 446 /** 447 If `true` column `column` is editable. 448 */ 449 void setEditable(in long column, in bool enabled) 450 { 451 checkClassBinding!(typeof(this))(); 452 ptrcall!(void)(_classBinding.setEditable, _godot_object, column, enabled); 453 } 454 /** 455 Returns `true` if column `column` is editable. 456 */ 457 bool isEditable(in long column) 458 { 459 checkClassBinding!(typeof(this))(); 460 return ptrcall!(bool)(_classBinding.isEditable, _godot_object, column); 461 } 462 /** 463 Sets the given column's custom color. 464 */ 465 void setCustomColor(in long column, in Color color) 466 { 467 checkClassBinding!(typeof(this))(); 468 ptrcall!(void)(_classBinding.setCustomColor, _godot_object, column, color); 469 } 470 /** 471 Resets the color for the given column to default. 472 */ 473 void clearCustomColor(in long column) 474 { 475 checkClassBinding!(typeof(this))(); 476 ptrcall!(void)(_classBinding.clearCustomColor, _godot_object, column); 477 } 478 /** 479 Sets the given column's custom background color and whether to just use it as an outline. 480 */ 481 void setCustomBgColor(in long column, in Color color, in bool just_outline = false) 482 { 483 checkClassBinding!(typeof(this))(); 484 ptrcall!(void)(_classBinding.setCustomBgColor, _godot_object, column, color, just_outline); 485 } 486 /** 487 Resets the background color for the given column to default. 488 */ 489 void clearCustomBgColor(in long column) 490 { 491 checkClassBinding!(typeof(this))(); 492 ptrcall!(void)(_classBinding.clearCustomBgColor, _godot_object, column); 493 } 494 /** 495 Returns the custom background color of column `column`. 496 */ 497 Color getCustomBgColor(in long column) const 498 { 499 checkClassBinding!(typeof(this))(); 500 return ptrcall!(Color)(_classBinding.getCustomBgColor, _godot_object, column); 501 } 502 /** 503 504 */ 505 void setCustomAsButton(in long column, in bool enable) 506 { 507 checkClassBinding!(typeof(this))(); 508 ptrcall!(void)(_classBinding.setCustomAsButton, _godot_object, column, enable); 509 } 510 /** 511 512 */ 513 bool isCustomSetAsButton(in long column) const 514 { 515 checkClassBinding!(typeof(this))(); 516 return ptrcall!(bool)(_classBinding.isCustomSetAsButton, _godot_object, column); 517 } 518 /** 519 Adds a button with $(D Texture) `button` at column `column`. The `button_idx` index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling $(D getButtonCount) immediately after this method. Optionally, the button can be `disabled` and have a `tooltip`. 520 */ 521 void addButton(StringArg4)(in long column, Texture button, in long button_idx = -1, in bool disabled = false, in StringArg4 tooltip = "") 522 { 523 checkClassBinding!(typeof(this))(); 524 ptrcall!(void)(_classBinding.addButton, _godot_object, column, button, button_idx, disabled, tooltip); 525 } 526 /** 527 Returns the number of buttons in column `column`. May be used to get the most recently added button's index, if no index was specified. 528 */ 529 long getButtonCount(in long column) const 530 { 531 checkClassBinding!(typeof(this))(); 532 return ptrcall!(long)(_classBinding.getButtonCount, _godot_object, column); 533 } 534 /** 535 Returns the $(D Texture) of the button at index `button_idx` in column `column`. 536 */ 537 Ref!Texture getButton(in long column, in long button_idx) const 538 { 539 checkClassBinding!(typeof(this))(); 540 return ptrcall!(Texture)(_classBinding.getButton, _godot_object, column, button_idx); 541 } 542 /** 543 Sets the given column's button $(D Texture) at index `button_idx` to `button`. 544 */ 545 void setButton(in long column, in long button_idx, Texture button) 546 { 547 checkClassBinding!(typeof(this))(); 548 ptrcall!(void)(_classBinding.setButton, _godot_object, column, button_idx, button); 549 } 550 /** 551 Removes the button at index `button_idx` in column `column`. 552 */ 553 void eraseButton(in long column, in long button_idx) 554 { 555 checkClassBinding!(typeof(this))(); 556 ptrcall!(void)(_classBinding.eraseButton, _godot_object, column, button_idx); 557 } 558 /** 559 Returns `true` if the button at index `button_idx` for the given column is disabled. 560 */ 561 bool isButtonDisabled(in long column, in long button_idx) const 562 { 563 checkClassBinding!(typeof(this))(); 564 return ptrcall!(bool)(_classBinding.isButtonDisabled, _godot_object, column, button_idx); 565 } 566 /** 567 If `true` column `column` is expanded to the right. 568 */ 569 void setExpandRight(in long column, in bool enable) 570 { 571 checkClassBinding!(typeof(this))(); 572 ptrcall!(void)(_classBinding.setExpandRight, _godot_object, column, enable); 573 } 574 /** 575 Returns `true` if `expand_right` is set. 576 */ 577 bool getExpandRight(in long column) const 578 { 579 checkClassBinding!(typeof(this))(); 580 return ptrcall!(bool)(_classBinding.getExpandRight, _godot_object, column); 581 } 582 /** 583 Sets the given column's tooltip text. 584 */ 585 void setTooltip(StringArg1)(in long column, in StringArg1 tooltip) 586 { 587 checkClassBinding!(typeof(this))(); 588 ptrcall!(void)(_classBinding.setTooltip, _godot_object, column, tooltip); 589 } 590 /** 591 Returns the given column's tooltip. 592 */ 593 String getTooltip(in long column) const 594 { 595 checkClassBinding!(typeof(this))(); 596 return ptrcall!(String)(_classBinding.getTooltip, _godot_object, column); 597 } 598 /** 599 Sets the given column's text alignment. See `ALIGN_*` constants. 600 */ 601 void setTextAlign(in long column, in long text_align) 602 { 603 checkClassBinding!(typeof(this))(); 604 ptrcall!(void)(_classBinding.setTextAlign, _godot_object, column, text_align); 605 } 606 /** 607 Returns the given column's text alignment. 608 */ 609 TreeItem.TextAlign getTextAlign(in long column) const 610 { 611 checkClassBinding!(typeof(this))(); 612 return ptrcall!(TreeItem.TextAlign)(_classBinding.getTextAlign, _godot_object, column); 613 } 614 /** 615 Moves this TreeItem to the top in the $(D Tree) hierarchy. 616 */ 617 void moveToTop() 618 { 619 checkClassBinding!(typeof(this))(); 620 ptrcall!(void)(_classBinding.moveToTop, _godot_object); 621 } 622 /** 623 Moves this TreeItem to the bottom in the $(D Tree) hierarchy. 624 */ 625 void moveToBottom() 626 { 627 checkClassBinding!(typeof(this))(); 628 ptrcall!(void)(_classBinding.moveToBottom, _godot_object); 629 } 630 /** 631 632 */ 633 void setDisableFolding(in bool disable) 634 { 635 checkClassBinding!(typeof(this))(); 636 ptrcall!(void)(_classBinding.setDisableFolding, _godot_object, disable); 637 } 638 /** 639 640 */ 641 bool isFoldingDisabled() const 642 { 643 checkClassBinding!(typeof(this))(); 644 return ptrcall!(bool)(_classBinding.isFoldingDisabled, _godot_object); 645 } 646 /** 647 If `true` the TreeItem is collapsed. 648 */ 649 @property bool collapsed() 650 { 651 return isCollapsed(); 652 } 653 /// ditto 654 @property void collapsed(bool v) 655 { 656 setCollapsed(v); 657 } 658 /** 659 If `true` folding is disabled for this TreeItem. 660 */ 661 @property bool disableFolding() 662 { 663 return isFoldingDisabled(); 664 } 665 /// ditto 666 @property void disableFolding(bool v) 667 { 668 setDisableFolding(v); 669 } 670 /** 671 The custom minimum height. 672 */ 673 @property long customMinimumHeight() 674 { 675 return getCustomMinimumHeight(); 676 } 677 /// ditto 678 @property void customMinimumHeight(long v) 679 { 680 setCustomMinimumHeight(v); 681 } 682 }