# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx
#
TR_NO_BUTTONS = 0
#
TR_HAS_BUTTONS = 1
#
TR_NO_LINES = 4
#
TR_LINES_AT_ROOT = 8
#
TR_TWIST_BUTTONS = 16
#
TR_SINGLE = 0
#
TR_MULTIPLE = 32
#
TR_HAS_VARIABLE_ROW_HEIGHT = 128
#
TR_EDIT_LABELS = 512
#
TR_ROW_LINES = 1024
#
TR_HIDE_ROOT = 2048
#
TR_FULL_ROW_HIGHLIGHT = 8192
#
TR_DEFAULT_STYLE = 9
# Indicates which type to associate an image with a {Wx::TreeCtrl} item.
#
#
# @see Wx::TreeCtrl#get_item_image
# @see Wx::TreeCtrl#set_item_image
#
#
class TreeItemIcon < Wx::Enum
# To get/set the item image for when the item is not selected and not expanded.
#
TreeItemIcon_Normal = Wx::TreeItemIcon.new(0)
# To get/set the item image for when the item is selected and not expanded.
#
TreeItemIcon_Selected = Wx::TreeItemIcon.new(1)
# To get/set the item image for when the item is not selected and expanded.
#
TreeItemIcon_Expanded = Wx::TreeItemIcon.new(2)
# To get/set the item image for when the item is selected and expanded.
#
TreeItemIcon_SelectedExpanded = Wx::TreeItemIcon.new(3)
#
#
TreeItemIcon_Max = Wx::TreeItemIcon.new(4)
end # TreeItemIcon
# special values for the 'state' parameter of {Wx::TreeCtrl#set_item_state}
#
TREE_ITEMSTATE_NONE = -1
#
#
TREE_ITEMSTATE_NEXT = -2
#
#
TREE_ITEMSTATE_PREV = -3
#
#
TREE_HITTEST_ABOVE = 1
#
#
TREE_HITTEST_BELOW = 2
#
#
TREE_HITTEST_NOWHERE = 4
#
#
TREE_HITTEST_ONITEMBUTTON = 8
#
#
TREE_HITTEST_ONITEMICON = 16
#
#
TREE_HITTEST_ONITEMINDENT = 32
#
#
TREE_HITTEST_ONITEMLABEL = 64
#
#
TREE_HITTEST_ONITEMRIGHT = 128
#
#
TREE_HITTEST_ONITEMSTATEICON = 256
#
#
TREE_HITTEST_TOLEFT = 512
#
#
TREE_HITTEST_TORIGHT = 1024
#
#
TREE_HITTEST_ONITEMUPPERPART = 2048
#
#
TREE_HITTEST_ONITEMLOWERPART = 4096
#
#
TREE_HITTEST_ONITEM = 80
#
#
EVT_TREE_BEGIN_DRAG = 10104
#
#
EVT_TREE_BEGIN_RDRAG = 10105
#
#
EVT_TREE_BEGIN_LABEL_EDIT = 10106
#
#
EVT_TREE_END_LABEL_EDIT = 10107
#
#
EVT_TREE_DELETE_ITEM = 10108
#
#
EVT_TREE_GET_INFO = 10109
#
#
EVT_TREE_SET_INFO = 10110
#
#
EVT_TREE_ITEM_EXPANDED = 10111
#
#
EVT_TREE_ITEM_EXPANDING = 10112
#
#
EVT_TREE_ITEM_COLLAPSED = 10113
#
#
EVT_TREE_ITEM_COLLAPSING = 10114
#
#
EVT_TREE_SEL_CHANGED = 10115
#
#
EVT_TREE_SEL_CHANGING = 10116
#
#
EVT_TREE_KEY_DOWN = 10117
#
#
EVT_TREE_ITEM_ACTIVATED = 10118
#
#
EVT_TREE_ITEM_RIGHT_CLICK = 10119
#
#
EVT_TREE_ITEM_MIDDLE_CLICK = 10120
#
#
EVT_TREE_END_DRAG = 10121
#
#
EVT_TREE_STATE_IMAGE_CLICK = 10122
#
#
EVT_TREE_ITEM_GETTOOLTIP = 10123
#
#
EVT_TREE_ITEM_MENU = 10124
# A tree control presents information as a hierarchy, with items that may be expanded to show further items.
# Items in a tree control are referenced by {Wx::TreeItemId} handles, which may be tested for validity by calling {Wx::TreeItemId#is_ok}.
# A similar control with a fully native implementation for GTK+ and macOS as well is {Wx::DataViewTreeCtrl}.
#
# == Images in wxTreeCtrl
#
# {Wx::TreeCtrl} inherits from {Wx::WithImages} classes providing the functions for associating images with the control items. Each item refers to its image using an index, which can possibly by {Wx::WithImages::NO_IMAGE} to indicate that the item doesn't use any image at all, and the corresponding image is taken either from the vector passed to {Wx::WithImages#set_images} or from the image list passed to {Wx::WithImages#set_image_list} or {Wx::WithImages#assign_image_list} functions.
# In addition to normal images, handled with the methods mentioned above, {Wx::TreeCtrl} also provides optional state images that may be used to indicate some additional state of the item, e.g. checked or unchecked status. These images can be set using {Wx::TreeCtrl#set_state_image_list} and {Wx::TreeCtrl#assign_state_image_list} functions that behave in the same way as the corresponding methods of {Wx::WithImages}.
# Finally, in the generic version of this control ({Wx::GenericTreeCtrl}), also provides {Wx::TreeCtrl#set_buttons_image_list} and {Wx::TreeCtrl#assign_buttons_image_list}, which can be used to change the images used for the control buttons, used to expand or collapse its branches. These methods are not available in the native wxMSW and {Wx::Qt} implementations.
#
# == Events
#
# To intercept events from a tree control, use the event table macros described in {Wx::TreeEvent}.
# === Styles
#
# This class supports the following styles:
#
# - {Wx::TR_EDIT_LABELS}: Use this style if you wish the user to be able to edit labels in the tree control.
#
# - {Wx::TR_NO_BUTTONS}: For convenience to document that no buttons are to be drawn.
#
# - {Wx::TR_HAS_BUTTONS}: Use this style to show + and - buttons to the left of parent items.
#
# - {Wx::TR_TWIST_BUTTONS}: Selects alternative style of +/
and shows rotating ("twisting") arrows instead. Currently this style is only implemented under Microsoft Windows Vista and later Windows versions and is ignored under the other platforms as enabling it is equivalent to using Wx::SystemThemedControl#enable_system_theme.
#
# - {Wx::TR_NO_LINES}: Use this style to hide vertical level connectors.
#
# - {Wx::TR_FULL_ROW_HIGHLIGHT}: Use this style to have the background colour and the selection highlight extend over the entire horizontal row of the tree control window. (This flag is ignored under Windows unless you specify {Wx::TR_NO_LINES} as well.)
#
# - {Wx::TR_LINES_AT_ROOT}: Use this style to show lines leading to the root nodes (unless no {Wx::TR_NO_LINES} is also used, in which case no lines are shown). Note that in the MSW version, if this style is omitted, not only the lines, but also the button used for expanding the root item is not shown, which can be unexpected, so it is recommended to always use it.
#
# - {Wx::TR_HIDE_ROOT}: Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes.
#
# - {Wx::TR_ROW_LINES}: Use this style to draw a contrasting border between displayed rows.
#
# - {Wx::TR_HAS_VARIABLE_ROW_HEIGHT}: Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset. Generic only.
#
# - {Wx::TR_SINGLE}: For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default.
#
# - {Wx::TR_MULTIPLE}: Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected.
#
# - {Wx::TR_DEFAULT_STYLE}: The set of flags that are closest to the defaults for the native control for a particular toolkit.
#
# === Events emitted by this class
#
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::TreeEvent} events.
# Event handler methods for events emitted by this class:
#
# - {Wx::EvtHandler#evt_tree_begin_drag}(id, meth = nil, &block): Begin dragging with the left mouse button. If you want to enable left-dragging you need to intercept this event and explicitly call {Wx::TreeEvent#allow}, as it's vetoed by default. Processes a {Wx::EVT_TREE_BEGIN_DRAG} event type.
#
# - {Wx::EvtHandler#evt_tree_begin_rdrag}(id, meth = nil, &block): Begin dragging with the right mouse button. If you want to enable right-dragging you need to intercept this event and explicitly call {Wx::TreeEvent#allow}, as it's vetoed by default. Processes a {Wx::EVT_TREE_BEGIN_RDRAG} event type.
#
# - {Wx::EvtHandler#evt_tree_end_drag}(id, meth = nil, &block): End dragging with the left or right mouse button. Processes a {Wx::EVT_TREE_END_DRAG} event type.
#
# - {Wx::EvtHandler#evt_tree_begin_label_edit}(id, meth = nil, &block): Begin editing a label. This can be prevented by calling Veto(). Processes a {Wx::EVT_TREE_BEGIN_LABEL_EDIT} event type.
#
# - {Wx::EvtHandler#evt_tree_end_label_edit}(id, meth = nil, &block): Finish editing a label. This can be prevented by calling Veto(). Processes a {Wx::EVT_TREE_END_LABEL_EDIT} event type.
#
# - {Wx::EvtHandler#evt_tree_delete_item}(id, meth = nil, &block): An item was deleted. Processes a {Wx::EVT_TREE_DELETE_ITEM} event type.
#
# - {Wx::EvtHandler#evt_tree_get_info}(id, meth = nil, &block): Request information from the application. Processes a {Wx::EVT_TREE_GET_INFO} event type.
#
# - {Wx::EvtHandler#evt_tree_set_info}(id, meth = nil, &block): Information is being supplied. Processes a {Wx::EVT_TREE_SET_INFO} event type.
#
# - {Wx::EvtHandler#evt_tree_item_activated}(id, meth = nil, &block): The item has been activated, i.e. chosen by double clicking it with mouse or from keyboard. Processes a {Wx::EVT_TREE_ITEM_ACTIVATED} event type.
#
# - {Wx::EvtHandler#evt_tree_item_collapsed}(id, meth = nil, &block): The item has been collapsed. Processes a {Wx::EVT_TREE_ITEM_COLLAPSED} event type.
#
# - {Wx::EvtHandler#evt_tree_item_collapsing}(id, meth = nil, &block): The item is being collapsed. This can be prevented by calling Veto(). Processes a {Wx::EVT_TREE_ITEM_COLLAPSING} event type.
#
# - {Wx::EvtHandler#evt_tree_item_expanded}(id, meth = nil, &block): The item has been expanded. Processes a {Wx::EVT_TREE_ITEM_EXPANDED} event type.
#
# - {Wx::EvtHandler#evt_tree_item_expanding}(id, meth = nil, &block): The item is being expanded. This can be prevented by calling Veto(). Processes a {Wx::EVT_TREE_ITEM_EXPANDING} event type.
#
# - {Wx::EvtHandler#evt_tree_item_right_click}(id, meth = nil, &block): The user has clicked the item with the right mouse button. Processes a {Wx::EVT_TREE_ITEM_RIGHT_CLICK} event type.
#
# - {Wx::EvtHandler#evt_tree_item_middle_click}(id, meth = nil, &block): The user has clicked the item with the middle mouse button. This is only supported by the generic control. Processes a {Wx::EVT_TREE_ITEM_MIDDLE_CLICK} event type.
#
# - {Wx::EvtHandler#evt_tree_sel_changed}(id, meth = nil, &block): Selection has changed. Processes a {Wx::EVT_TREE_SEL_CHANGED} event type.
#
# - {Wx::EvtHandler#evt_tree_sel_changing}(id, meth = nil, &block): Selection is changing. This can be prevented by calling Veto(). Processes a {Wx::EVT_TREE_SEL_CHANGING} event type.
#
# - {Wx::EvtHandler#evt_tree_key_down}(id, meth = nil, &block): A key has been pressed. Processes a {Wx::EVT_TREE_KEY_DOWN} event type.
#
# - {Wx::EvtHandler#evt_tree_item_gettooltip}(id, meth = nil, &block): The opportunity to set the item tooltip is being given to the application (call {Wx::TreeEvent#set_tool_tip}). Windows only. Processes a {Wx::EVT_TREE_ITEM_GETTOOLTIP} event type.
#
# - {Wx::EvtHandler#evt_tree_item_menu}(id, meth = nil, &block): The context menu for the selected item has been requested, either by a right click or by using the menu key. Notice that these events always carry a valid tree item and so are not generated when (right) clicking outside of the items area. If you need to handle such events, consider using {Wx::EVT_CONTEXT_MENU} instead. Processes a {Wx::EVT_TREE_ITEM_MENU} event type.
#
# - {Wx::EvtHandler#evt_tree_state_image_click}(id, meth = nil, &block): The state image has been clicked. Processes a {Wx::EVT_TREE_STATE_IMAGE_CLICK} event type.
#
# See also Window Styles.
# Win32 notes:
# {Wx::TreeCtrl} class uses the standard common treeview control under Win32 implemented in the system library comctl32.dll. Some versions of this library are known to have bugs with handling the tree control colours: the usual symptom is that the expanded items leave black (or otherwise incorrectly coloured) background behind them, especially for the controls using non-default background colour. The recommended solution is to upgrade the comctl32.dll to a newer version: see http://www.microsoft.com/downloads/details.aspx?familyid=cb2cf3a2-8025-4e8f-8511-9b476a8d35d2
# ===
#
# Category: {Wx::Controls} -
buttons
wxMSW Appearance # | wxGTK Appearance # | wxOSX Appearance # |
false if it was not (in this case rect is not changed) for example, if the item is currently invisible.
# Notice that the rectangle coordinates are logical, not physical ones. So, for example, the x coordinate may be negative if the tree has a horizontal scrollbar and its position is not 0.
# @param item [Wx::TreeItemId]
# @param rect [Wx::Rect]
# @param textOnly [Boolean]
# @return [Boolean]
def get_bounding_rect(item, rect, textOnly=false) end
alias_method :bounding_rect, :get_bounding_rect
# Returns the number of items in the branch.
# If recursively is true, returns the total number of descendants, otherwise only one level of children is counted.
# @param item [Wx::TreeItemId]
# @param recursively [Boolean]
# @return [Integer]
def get_children_count(item, recursively=true) end
alias_method :children_count, :get_children_count
# Returns the number of items in the control.
# @return [Integer]
def get_count; end
alias_method :count, :get_count
# Returns the edit control being currently used to edit a label.
# Returns NULL if no label is being edited.
# This is currently only implemented for wxMSW.
# @return [Wx::TextCtrl]
def get_edit_control; end
alias_method :edit_control, :get_edit_control
# Returns the first visible item.
# @return [Wx::TreeItemId]
def get_first_visible_item; end
alias_method :first_visible_item, :get_first_visible_item
# Returns the item last clicked or otherwise selected.
# Unlike {Wx::TreeCtrl#get_selection}, it can be used whether or not the control has the {Wx::TR_MULTIPLE} style.
# @return [Wx::TreeItemId]
def get_focused_item; end
alias_method :focused_item, :get_focused_item
# Clears the currently focused item.
# @return [void]
def clear_focused_item; end
# Sets the currently focused item.
# @param item [Wx::TreeItemId] The item to make the current one. It must be valid.
# @return [void]
def set_focused_item(item) end
alias_method :focused_item=, :set_focused_item
# Returns the current tree control indentation.
# @return [Integer]
def get_indent; end
alias_method :indent, :get_indent
# Returns the current tree control spacing.
# This is the number of horizontal pixels between the buttons and the state images.
# @return [Integer]
def get_spacing; end
alias_method :spacing, :get_spacing
# Returns the background colour of the item.
# @param item [Wx::TreeItemId]
# @return [Wx::Colour]
def get_item_background_colour(item) end
alias_method :item_background_colour, :get_item_background_colour
# Returns the tree item data associated with the item.
# - GetPlData(item): returns the Perl data associated with the Wx::TreeItemData. It is just the same as tree->GetItemData(item)->GetData().
# @see Wx::TreeItemData
# @param item [Wx::TreeItemId]
# @return [Object]
def get_item_data(item) end
alias_method :item_data, :get_item_data
# Returns the font of the item label.
# If the font hadn't been explicitly set for the specified item with {Wx::TreeCtrl#set_item_font}, returns an invalid {Wx::NULL_FONT} font. {Wx::TreeCtrl#get_font} can be used to retrieve the global tree control font used for the items without any specific font.
# @param item [Wx::TreeItemId]
# @return [Wx::Font]
def get_item_font(item) end
alias_method :item_font, :get_item_font
# Gets the specified item image.
# The value of which may be:
#
# - {Wx::TreeItemIcon::TreeItemIcon_Normal}: to get the normal item image.
# - {Wx::TreeItemIcon::TreeItemIcon_Selected}: to get the selected item image (i.e. the image which is shown when the item is currently selected).
# - {Wx::TreeItemIcon::TreeItemIcon_Expanded}: to get the expanded image (this only makes sense for items which have children - then this image is shown when the item is expanded and the normal image is shown when it is collapsed).
# - {Wx::TreeItemIcon::TreeItemIcon_SelectedExpanded}: to get the selected expanded image (which is shown when an expanded item is currently selected).
# @param item [Wx::TreeItemId]
# @param which [Wx::TreeItemIcon]
# @return [Integer]
def get_item_image(item, which=Wx::TreeItemIcon::TreeItemIcon_Normal) end
alias_method :item_image, :get_item_image
# Returns the item's parent.
# @param item [Wx::TreeItemId]
# @return [Wx::TreeItemId]
def get_item_parent(item) end
alias_method :item_parent, :get_item_parent
# Gets the specified item state.
# @param item [Wx::TreeItemId]
# @return [Integer]
def get_item_state(item) end
alias_method :item_state, :get_item_state
# Returns the item label.
# @param item [Wx::TreeItemId]
# @return [String]
def get_item_text(item) end
alias_method :item_text, :get_item_text
# Returns the colour of the item label.
# @param item [Wx::TreeItemId]
# @return [Wx::Colour]
def get_item_text_colour(item) end
alias_method :item_text_colour, :get_item_text_colour
# Returns the last child of the item (or an invalid tree item if this item has no children).
#
# @see Wx::TreeCtrl#get_first_child
# @see Wx::TreeCtrl#get_next_sibling
# @see Wx::TreeCtrl#get_last_child
# @param item [Wx::TreeItemId]
# @return [Wx::TreeItemId]
def get_last_child(item) end
alias_method :last_child, :get_last_child
# Returns the next sibling of the specified item; call {Wx::TreeCtrl#get_prev_sibling} for the previous sibling.
# Returns an invalid tree item if there are no further siblings.
# @see Wx::TreeCtrl#get_prev_sibling
# @param item [Wx::TreeItemId]
# @return [Wx::TreeItemId]
def get_next_sibling(item) end
alias_method :next_sibling, :get_next_sibling
# Returns the next visible item or an invalid item if this item is the last visible one.
# The item itself must be visible.
# @param item [Wx::TreeItemId]
# @return [Wx::TreeItemId]
def get_next_visible(item) end
alias_method :next_visible, :get_next_visible
# Returns the previous sibling of the specified item; call {Wx::TreeCtrl#get_next_sibling} for the next sibling.
# Returns an invalid tree item if there are no further children.
# @see Wx::TreeCtrl#get_next_sibling
# @param item [Wx::TreeItemId]
# @return [Wx::TreeItemId]
def get_prev_sibling(item) end
alias_method :prev_sibling, :get_prev_sibling
# Returns the previous visible item or an invalid item if this item is the first visible one.
# The item itself must be visible.
# @param item [Wx::TreeItemId]
# @return [Wx::TreeItemId]
def get_prev_visible(item) end
alias_method :prev_visible, :get_prev_visible
# Returns true if the control will use a quick calculation for the best size, looking only at the first and last items.
# The default is false.
# @see Wx::TreeCtrl#set_quick_best_size
# @return [Boolean]
def get_quick_best_size; end
alias_method :quick_best_size, :get_quick_best_size
# Returns the root item for the tree control.
# @return [Wx::TreeItemId]
def get_root_item; end
alias_method :root_item, :get_root_item
# Returns the selection, or an invalid item if there is no selection.
# This function only works with the controls without {Wx::TR_MULTIPLE} style, use {Wx::TreeCtrl#get_selections} for the controls which do have this style or, if a single item is wanted, use {Wx::TreeCtrl#get_focused_item}.
# @return [Wx::TreeItemId]
def get_selection; end
alias_method :selection, :get_selection
# Returns the state image list (from which application-defined state images are taken).
# @return [Wx::ImageList]
def get_state_image_list; end
alias_method :state_image_list, :get_state_image_list
# Calculates which (if any) item is under the given point, returning the tree item id at this point plus extra information flags.
# flags is a bitlist of the following:
#
# - {Wx::TREE_HITTEST_ABOVE}: Above the client area.
# - {Wx::TREE_HITTEST_BELOW}: Below the client area.
# - {Wx::TREE_HITTEST_NOWHERE}: In the client area but below the last item.
# - {Wx::TREE_HITTEST_ONITEMBUTTON}: On the button associated with an item.
# - {Wx::TREE_HITTEST_ONITEMICON}: On the bitmap associated with an item.
# - {Wx::TREE_HITTEST_ONITEMINDENT}: In the indentation associated with an item.
# - {Wx::TREE_HITTEST_ONITEMLABEL}: On the label (string) associated with an item.
# - {Wx::TREE_HITTEST_ONITEMRIGHT}: In the area to the right of an item.
# - {Wx::TREE_HITTEST_ONITEMSTATEICON}: On the state icon for a tree view item that is in a user-defined state.
# - {Wx::TREE_HITTEST_TOLEFT}: To the right of the client area.
# - {Wx::TREE_HITTEST_TORIGHT}: To the left of the client area.
# @param point [Array(Integer, Integer), Wx::Point]
# @return [Array(Wx::TreeItemId,Integer)]
def hit_test(point) end
# Inserts an item after a given one (previous).
# The image and selImage parameters are an index within the normal image list specifying the image to use for unselected and selected items, respectively. If image > -1 and selImage is -1, the same image is used for both selected and unselected items.
# @param parent [Wx::TreeItemId]
# @param previous [Wx::TreeItemId]
# @param text [String]
# @param image [Integer]
# @param selImage [Integer]
# @param data [Object]
# @return [Wx::TreeItemId]
def insert_item(parent, previous, text, image=-1, selImage=-1, data=nil) end
# Returns true if the given item is in bold state.
#
# @see Wx::TreeCtrl#set_item_bold
# @param item [Wx::TreeItemId]
# @return [Boolean]
def is_bold(item) end
alias_method :bold?, :is_bold
# Returns true if the control is empty (i.e. has no items, even no root one).
# @return [Boolean]
def is_empty; end
alias_method :empty?, :is_empty
# Returns true if the item is expanded (only makes sense if it has children).
# @param item [Wx::TreeItemId]
# @return [Boolean]
def is_expanded(item) end
alias_method :expanded?, :is_expanded
# Returns true if the item is selected.
# @param item [Wx::TreeItemId]
# @return [Boolean]
def is_selected(item) end
alias_method :selected?, :is_selected
# Returns true if the item is visible on the screen.
# @param item [Wx::TreeItemId]
# @return [Boolean]
def is_visible(item) end
alias_method :visible?, :is_visible
# Returns true if the item has children.
# @param item [Wx::TreeItemId]
# @return [Boolean]
def item_has_children(item) end
# Override this function in the derived class to change the sort order of the items in the tree control.
# The function should return a negative, zero or positive value if the first item is less than, equal to or greater than the second one.
# Please note that you must use {Wx::RTTI} macros {declare_dynamic_class} and {implement_dynamic_class} if you override this function because otherwise the base class considers that it is not overridden and uses the default comparison, i.e. sorts the items alphabetically, which allows it optimize away the calls to the virtual function completely.
# @see Wx::TreeCtrl#sort_children
# @param item1 [Wx::TreeItemId]
# @param item2 [Wx::TreeItemId]
# @return [Integer]
def on_compare_items(item1, item2) end
# Appends an item as the first child of parent, return a new item id.
# The image and selImage parameters are an index within the normal image list specifying the image to use for unselected and selected items, respectively. If image > -1 and selImage is -1, the same image is used for both selected and unselected items.
# @param parent [Wx::TreeItemId]
# @param text [String]
# @param image [Integer]
# @param selImage [Integer]
# @param data [Object]
# @return [Wx::TreeItemId]
def prepend_item(parent, text, image=-1, selImage=-1, data=nil) end
# Scrolls the specified item into view.
# Note that this method doesn't work while the window is frozen (See {Wx::Window#freeze}), at least under MSW.
# @see Wx::TreeCtrl#ensure_visible
# @param item [Wx::TreeItemId]
# @return [void]
def scroll_to(item) end
# Selects the given item.
# In multiple selection controls, can be also used to deselect a currently selected item if the value of select is false.
# Notice that calling this method will generate {Wx::EVT_TREE_SEL_CHANGING} and {Wx::EVT_TREE_SEL_CHANGED} events and that the change could be vetoed by the former event handler.
# @param item [Wx::TreeItemId]
# @param select [Boolean]
# @return [void]
def select_item(item, select=true) end
# Sets the indentation for the tree control.
# @param indent [Integer]
# @return [void]
def set_indent(indent) end
alias_method :indent=, :set_indent
# Sets the spacing for the tree control.
# Spacing is the number of horizontal pixels between the buttons and the state images. This has no effect under wxMSW.
# @param spacing [Integer]
# @return [void]
def set_spacing(spacing) end
alias_method :spacing=, :set_spacing
# Sets the colour of the item's background.
# @param item [Wx::TreeItemId]
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_item_background_colour(item, col) end
# Makes item appear in bold font if bold parameter is true or resets it to the normal state.
#
# @see Wx::TreeCtrl#is_bold
# @param item [Wx::TreeItemId]
# @param bold [Boolean]
# @return [void]
def set_item_bold(item, bold=true) end
alias_method :item_bold=, :set_item_bold
# Sets the item client data.
# Notice that the client data previously associated with the item (if any) is not freed by this function and so calling this function multiple times for the same item will result in memory leaks unless you delete the old item data pointer yourself.
# @param item [Wx::TreeItemId]
# @param data [Object]
# @return [void]
def set_item_data(item, data) end
# Gives the item the visual feedback for Drag'n'Drop actions, which is useful if something is dragged from the outside onto the tree control (as opposed to a DnD operation within the tree control, which already is implemented internally).
# @param item [Wx::TreeItemId]
# @param highlight [Boolean]
# @return [void]
def set_item_drop_highlight(item, highlight=true) end
alias_method :item_drop_highlight=, :set_item_drop_highlight
# Sets the item's font.
# All items in the tree should have the same height to avoid text clipping, so the fonts height should be the same for all of them, although font attributes may vary.
# @see Wx::TreeCtrl#set_item_bold
# @param item [Wx::TreeItemId]
# @param font [Wx::Font,Wx::FontInfo]
# @return [void]
def set_item_font(item, font) end
# Force appearance of the button next to the item.
# This is useful to allow the user to expand the items which don't have any children now, but instead adding them only when needed, thus minimizing memory usage and loading time.
# @param item [Wx::TreeItemId]
# @param hasChildren [Boolean]
# @return [void]
def set_item_has_children(item, hasChildren=true) end
alias_method :item_has_children=, :set_item_has_children
# Sets the specified item's image.
# See {Wx::TreeCtrl#get_item_image} for the description of the which parameter.
# @param item [Wx::TreeItemId]
# @param image [Integer]
# @param which [Wx::TreeItemIcon]
# @return [void]
def set_item_image(item, image, which=Wx::TreeItemIcon::TreeItemIcon_Normal) end
# Sets the specified item state.
# The value of state may be an index into the state image list, or one of the special values:
#
# - {Wx::TREE_ITEMSTATE_NONE}: to disable the item state (the state image will be not displayed).
# - {Wx::TREE_ITEMSTATE_NEXT}: to set the next item state.
# - {Wx::TREE_ITEMSTATE_PREV}: to set the previous item state.
# @param item [Wx::TreeItemId]
# @param state [Integer]
# @return [void]
def set_item_state(item, state) end
# Sets the item label.
# @param item [Wx::TreeItemId]
# @param text [String]
# @return [void]
def set_item_text(item, text) end
# Sets the colour of the item's text.
# @param item [Wx::TreeItemId]
# @param col [Wx::Colour,String,Symbol]
# @return [void]
def set_item_text_colour(item, col) end
# If true is passed, specifies that the control will use a quick calculation for the best size, looking only at the first and last items.
# Otherwise, it will look at all items. The default is false.
# @see Wx::TreeCtrl#get_quick_best_size
# @param quickBestSize [Boolean]
# @return [void]
def set_quick_best_size(quickBestSize) end
alias_method :quick_best_size=, :set_quick_best_size
# Sets the state image list (from which application-defined state images are taken).
# Image list assigned with this method will not be deleted by {Wx::TreeCtrl}'s destructor, you must delete it yourself.
# @see Wx::TreeCtrl#assign_state_image_list.
# @param imageList [Wx::ImageList]
# @return [void]
def set_state_image_list(imageList) end
alias_method :state_image_list=, :set_state_image_list
# Sets the mode flags associated with the display of the tree control.
# The new mode takes effect immediately.
# Generic only; MSW ignores changes.
# @param styles [Integer]
# @return [void]
def set_window_style(styles) end
alias_method :window_style=, :set_window_style
# Sorts the children of the given item using {Wx::TreeCtrl#on_compare_items}.
# You should override that method to change the sort order (the default is ascending case-sensitive alphabetical order).
# @see Wx::TreeItemData
# @see Wx::TreeCtrl#on_compare_items
# @param item [Wx::TreeItemId]
# @return [void]
def sort_children(item) end
# Toggles the given item between collapsed and expanded states.
# @param item [Wx::TreeItemId]
# @return [void]
def toggle(item) end
# Toggles the given item between selected and unselected states.
# For multiselection controls only.
# @param item [Wx::TreeItemId]
# @return [void]
def toggle_item_selection(item) end
# Removes the selection from the currently selected item (if any).
# @return [void]
def unselect; end
# This function either behaves the same as {Wx::TreeCtrl#unselect} if the control doesn't have {Wx::TR_MULTIPLE} style, or removes the selection from all items if it does have this style.
# @return [void]
def unselect_all; end
# Unselects the given item.
# This works in multiselection controls only.
# @param item [Wx::TreeItemId]
# @return [void]
def unselect_item(item) end
# Select all the immediate children of the given parent.
# This function can be used with multiselection controls only.
# @param parent [Wx::TreeItemId]
# @return [void]
def select_children(parent) end
end # TreeCtrl
end