[ruby-gnome2-doc-cvs] [Hiki] update - Gtk::TreeView

Back to archive index

ruby-****@lists***** ruby-****@lists*****
2003年 7月 31日 (木) 02:54:05 JST


-------------------------
REMOTE_ADDR = 210.249.204.48
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gtk%3A%3ATreeView
-------------------------
= class Gtk::TreeView
Widget that displays any object that implements the Gtk::TreeModel interface.

== Super Class
* Gtk::Container

== Class Methods
--- Gtk::TreeView.new(model = nil)
    Creates a new Gtk::TreeView widget with the model initialized to model or nil.
    * model: the model. 
    * Returns: A newly created Gtk::TreeView widget. 

== Instance Methods
--- model
    Returns the model the the Gtk::TreeView is based on. Returns nil if the model is unset.
    * Returns: A Gtk::TreeModel, or nil if none is currently being used. 
--- model=(model)
    Sets the model for a Gtk::TreeView. If the Gtk::TreeView already has a model set, it will remove it before setting the new model. If model is nil, then it will unset the old model.
    * model: The model 
    * Returns: model
--- set_model(model)
    Same as model=.
    * model: The model
    * Returns: self

--- selection
    Gets the Gtk::TreeSelection associated with the TreeView.
    * Returns: A Gtk::TreeSelection object. 

--- hadjustment
    Gets the Gtk::Adjustment currently being used for the horizontal aspect.
    * Returns: A Gtk::Adjustment object, or nil if none is currently being used. 
--- hadjustment=(adjustment)
    Sets the Gtk::Adjustment for the current horizontal aspect.
    * adjustment: The Gtk::Adjustment to set, or nil 
    * Returns: adjustment
--- set_hadjustment(adjustment)
    Same as hadjustment=.
    * Returns: self

--- vadjustment
    Gets the Gtk::Adjustment currently being used for the vertical aspect.
    * Returns: A Gtk::Adjustment object, or nil if none is currently being used. 
--- vadjustment=(adjustment)
    Sets the Gtk::Adjustment for the current vertical aspect.
    * adjustment: The Gtk::Adjustment to set, or nil 
    * Returns: adjustment
--- set_vadjustment(adjustment)
    Same as vadjustment=.
    * Returns: self

--- headers_visible?
    Returns true if the headers on the Gtk::TreeView are visible.
    * Returns: Whether the headers are visible or not. 
--- headers_visible=(headers_visible)
    Sets the the visibility state of the headers.
    * headers_visible: true if the headers are visible 
    * Returns: headers_visible
--- set_headers_visible(headers_visible)
    Same as headers_visible=.
    * Returns: headers_visible

--- columns_autosize
    Resizes all columns to their optimal width. Only works after the Gtk::TreeView has been realized.
    * Returns: self

--- headers_clickable=(setting)
    Allow the column title buttons to be clicked.
    * setting: true if the columns are clickable. 
    * Returns: self

--- set_headers_clickable(setting)
    Same as headers_clickable=.
    * setting: true if the columns are clickable. 
    * Returns: self

--- rules_hint?
    Gets the setting set by Gtk::TreeView#rules_hint=.
    * Returns: true if rules are useful for the user of this tree 
--- rules_hint=(setting)
    This method tells GTK+ that the user interface for your application requires users to read across tree rows and associate cells with one another. By default, GTK+ will then render the tree with alternating row colors. Do not use it just because you prefer the appearance of the ruled tree; that's a question for the theme. Some themes will draw tree rows in alternating colors even when rules are turned off, and users who prefer that appearance all the time can choose those themes. You should call this method only as a semantic hint to the theme engine that your tree makes alternating colors useful from a functional standpoint (since it has lots of columns, generally).
    * setting: true if the tree requires reading across rows 
    * Returns: setting
--- set_rules_hint(setting)
    Same as rules_hint=.
    * setting: true if the tree requires reading across rows 
    * Returns: self

--- append_column(column)
    Appends column to the list of columns.
    * column : The Gtk::TreeViewColumn to add. 
    * Returns : The number of columns in the Gtk::TreeView after appending. 

--- remove_column(column)
    Removes column from the Gtk::TreeView.
    * column : The Gtk::TreeViewColumn to remove. 
    * Returns : The number of columns in Gtk::TreeView after removing. 

--- insert_column(column, position)
    This inserts the column into the Gtk::TreeView at position. If position is -1, then the column is inserted at the end.
    * column: The Gtk::TreeViewColumn to be inserted. 
    * position: The position to insert column in. 
    * Returns: The number of columns in the Gtk::TreeView after insertion. 
--- insert_column(position, title, cell, attributes)
    Creates a new Gtk::TreeViewColumn and inserts it into the Gtk::TreeView at position. If position is -1, then the newly created column is inserted at the end. The column is initialized with the attributes given.
    * position: The position to insert the new column in. 
    * title: The title to set the header to. 
    * cell: The Gtk::CellRenderer. 
    * attribures: a hash of attributes. See Gtk::TreeViewColumn#add_attribute.
    * Returns: The number of columns in Gtk::TreeView after insertion. 
--- insert_column(position, title, cell) {|tvc, cell, model, iter| ... }
    Convenience method that inserts a new column into the Gtk::TreeView with the given cell renderer and a Block to set cell renderer attributes (normally using data from the model). See also Gtk::TreeViewColumn#set_cell_data_func, Gtk::TreeViewColumn#pack_start.
    * position: Position to insert, -1 for append 
    * title: column title 
    * cell: cell renderer for column 
    * {|tvc, cell, model, iter| ... }: A block to set the properties of a cell instead of just using the straight mapping between the cell and the model. This is useful for customizing the cell renderer. For example, a block might get an Integer from the model, and render it to the "text" attribute of "cell" by converting it to its written equivilent. This is set by calling Gtk::TreeViewColumn#set_cell_data_func
      * tvc: A Gtk::TreeColumn 
      * cell: The Gtk::CellRenderer that is being rendered by tree_column 
      * model: The Gtk::TreeModel being rendered 
      * iter: A Gtk::TreeIter of the current row rendered 
    * Returns: number of columns in the tree view post-insert 

--- get_column(n)
    Gets the Gtk::TreeViewColumn at the given position in the Gtk::TreeView.
    * n: The position of the column, counting from 0. 
    * Returns: The Gtk::TreeViewColumn, or nil if the position is outside the range of columns. 

--- columns
    Returns an array of all the Gtk::TreeViewColumn s currently in the Gtk::TreeView. 
    * Returns: An array of Gtk::TreeViewColumn s 

--- move_column_after(column, base_column)
    Moves column to be after to base_column. If base_column is nil, then column is placed in the first position.
    * column: The Gtk::TreeViewColumn to be moved. 
    * base_column: The GtkTreeViewColumn to be moved relative to, or nil. 
    * Returns: self

--- expander_column
    Returns the column that is the current expander column. This column has the expander arrow drawn next to it.
    * Returns : The expander column. 
--- expander_column=(column)
    Sets the Gtk::TreeViewColumn to draw the expander arrow at. It must be in the Gtk:TreeView. If column is nil, then the expander arrow is always at the first visible column.
    * column: nil, or the Gtk::TreeViewColumn to draw the expander arrow at. 
    * Returns: column
--- set_expander_column(column)
    Same as expander_column=.
    * column: nil, or the column to draw the expander arrow at. 
    * Returns: self

--- set_column_drag_function{|tree_view, column, prev_column, next_column| ... }
    Sets a block for determining where a column may be dropped when dragged. This method is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. The arguments passed to func are: the tree_view, the Gtk::TreeViewColumn being dragged, the two Gtk::TreeViewColumn s determining the drop spot. If either of the Gtk::TreeViewColumn arguments for the drop spot are nil, then they indicate an edge.
    * {|tree_view, column, prev_column, next_column| ... }: a block for determining whether column can be dropped in a particular spot (as determined by prev_column and next_column). In left to right locales, prev_column is on the left of the potential drop spot, and next_column is on the right. In right to left mode, this is reversed. This method should return true if the spot is a valid drop spot. Please note that returning true does not actually indicate that the column drop was made, but is meant only to indicate a possible drop spot to the user.
      * tree_view: A Gtk::TreeView 
      * column: The Gtk::TreeViewColumn being dragged 
      * prev_column: A Gtk::TreeViewColumn on one side of column 
      * next_column: A Gtk::TreeViewColumn on the other side of column 
      * Returns: true, if column can be dropped in this spot  

--- scroll_to_point(tree_x, tree_y)
    Scrolls the tree view such that the top-left corner of the visible area is tree_x, tree_y, where tree_x and tree_y are specified in tree window coordinates. The Gtk::TreeView must be realized before this method is called. If it isn't, you probably want to be using Gtk::TreeView#scroll_to_cell.
    If either tree_x or tree_y are -1, then that direction isn't scrolled.
    * tree_x: X coordinate of new top-left pixel of visible area, or -1 
    * tree_y: Y coordinate of new top-left pixel of visible area, or -1 
    * Returns: self

--- scroll_to_cell
    Moves the alignments of the Gtk::TreeView to the position specified by column and path. If column is nil, then no horizontal scrolling occurs. Likewise, if path is nil no vertical scrolling occurs. At a minimum, one of column or path need to be non-nil. row_align determines where the row is placed, and col_align determines where column is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.
    If use_align is false, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the cell onto the screen. This means that the cell will be scrolled to the edge closest to it's current position. If the cell is currently visible on the screen, nothing is done.
    This method only works if the model is set, and path is a valid row on the model. If the model changes before the Gtk::TreeView is realized, the centered path will be modified to reflect this change.
    * path: The Gtk::TreePath of the row to move to, or nil. 
    * column: The Gtk::TreeViewColumn to move horizontally to, or nil. 
    * use_align: whether to use alignment arguments, or false. 
    * row_align: The vertical alignment of the row specified by path between 0.0 and 1.0.
    * col_align: The horizontal alignment of the column specified by column between 0.0 and 1.0.
    * Returns: self

--- cursor
    Gets the current path and focus column. If the cursor isn't currently set, then path will be nil. If no column currently has focus, then focus_column will be nil.
    * Returns: [path, focus_column]
      * path: the current cursor path, or nil
      * focus_column: the current focus column, or nil 
--- set_cursor(path, focus_column, start_editing)
    Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user's attention on a particular row. If column is not nil, then focus is given to the column specified by it. Additionally, if column is specified, and start_editing is true, then editing should be started in the specified cell. This method is often followed by Gtk::Widget#grab_focus in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
    * path: A Gtk::TreePath 
    * focus_column: A Gtk::TreeViewColumn, or nil 
    * start_editing: true if the specified cell should start being edited. 
    * Returns: self

--- row_activated(path, column)
    Activates the cell determined by path and column.
    * path: The Gtk::TreePath to be activated. 
    * column: The Gtk::TreeViewColumn to be activated. 
    * Returns: self

--- expand_all
    Recursively expands all nodes in the Gtk::TreeView.
    * Returns: self

--- collapse_all
    Recursively collapses all visible, expanded nodes in the Gtk::TreeView.
    * Returns: self

--- expand_row(path, open_all)
    Opens the row so its children are visible.
    * path: a Gtk::TreePath to a row in the Gtk::TreeView
    * open_all: whether to recursively expand, or just expand immediate children 
    * Returns: true if the row existed and had children 

--- collapse_row(path)
    Collapses a row (hides its child rows, if they exist).
    * path : a Gtk::TreePath to a row in the Gtk::TreeView 
    * Returns: true if the row was collapsed. 

--- map_expanded_rows {|tree_view, path| ... }
    Calls block on all expanded rows.
    * {|tree_view, path| ... }
       * tree_view: A Gtk::TreeView 
       * path: The path that's expanded 

--- row_expanded?(path)
    Returns true if the node pointed to by path is expanded in Gtk::TreeView.
    * path: A Gtk::TreePath to test expansion state. 
    * Returns: true if path is expanded. 

--- reorderable?
    Retrieves whether the user can reorder the tree via drag-and-drop. See Gtk::TreeView#reorderable=.
    * Returns: true if the tree can be reordered. 
--- reorderable=(reorderable)
    This method is a convenience method to allow you to reorder models that support the Gtk::DragSource and the Gtk::DragDest. Both Gtk::TreeStore and Gtk::ListStore support these.
    If reorderable is true, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model's signals.
    This method does not give you any degree of control over the order -- any reorderering is allowed. If more control is needed, you should probably handle drag and drop manually.
    * reorderable : true, if the tree can be reordered. 
    * Returns: reorderable
--- set_reorderable(reorderable)
    Same as reorderable=.
    * reorderable: true, if the tree can be reordered. 
    * Returns: self

--- get_path_at_pos(x, y)
    Finds the path at the point (x, y), relative to widget coordinates. That is, x and y are relative to an events coordinates. x and y must come from an event on the tree_view only where event.window == Gtk::TreeView#bin_window. It is primarily for things like popup menus.
    This method is only meaningful if Gtk::TreeView is realized.
    * x: The x position to be identified. 
    * y: The y position to be identified. 
    * Returns: [path, column, cell_x, cell_y] if a row exists at that coordinate or nil 
      * path: A pointer to a Gtk::TreePath pointer to be filled in, or nil 
      * column: A pointer to a Gtk::TreeViewColumn pointer to be filled in, or nil 
      * cell_x: A pointer where the X coordinate relative to the cell can be placed, or nil 
      * cell_y: A pointer where the Y coordinate relative to the cell can be placed, or nil 

--- get_cell_area(path, column)
    Returns the Gdk::Rectangle in tree window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a path not currently displayed, the y and height fields of the rectangle will be 0. If column is nil, the x and width fields will be 0. The sum of all cell rects does not cover the entire tree; there are extra pixels in between rows, for example. The returned rectangle is equivalent to the cell_area passed to Gtk::CellRenderer#render. This method is only valid if Gtk::TreeView is realized.
    * path: a Gtk::TreePath for the row, or nil to get only horizontal coordinates 
    * column: a Gtk::TreeViewColumn for the column, or nil to get only vertical coordiantes 
    * Returns: a Gdk::Rectangle to fill with cell rect 

--- get_background_area(path, column)
    Fills the bounding rectangle in tree window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a node not found in the tree, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields will be filled with 0. The returned rectangle is equivalent to the background_area passed to Gtk::CellRenderer#render. These background areas tile to cover the entire tree window (except for the area used for header buttons). Contrast with the cell_area, returned by Gtk::TreeView#get_cell_area, which returns only the cell itself, excluding surrounding borders and the tree expander area.
    * path: a Gtk::TreePath for the row, or nil to get only horizontal coordinates 
    * column: a Gtk::TreeViewColumn for the column, or nil to get only vertical coordiantes 
    * Returns: a Gdk::Rectangle to fill with cell background rect 

--- visible_rect
    Fills visible_rect with the currently-visible region of the buffer, in tree coordinates. Convert to widget coordinates with Gtk::TreeView#tree_to_widget_coords. Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.
    * Returns: Gdk::Rectangle 

--- bin_window
    Returns the window that tree_view renders to. This is used primarily to compare to event.window to confirm that the event on the Gtk::TreeView is on the right window.
    * Returns: A Gdk::Window, or nil when the Gtk::TreeView hasn't been realized yet 

--- widget_to_tree_coords(wx, wy)
    Converts widget coordinates to coordinates for the tree window (the full scrollable area of the tree).
    * wx: widget X coordinate 
    * wy: widget Y coordinate 
    * Returns: [tx, ty]
      * tx: return location for tree X coordinate 
      * ty: return location for tree Y coordinate 

--- tree_to_widget_coords(tx, ty)
    Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
    * tx: tree X coordinate
    * ty: tree Y coordinate 
    * Returns: [wx, wy]
      * wx: return location for widget X coordinate 
      * wy: return location for widget Y coordinate 

--- enable_model_drag_dest(targets, actions)
     * targets: an array of target entries. [[target, flags, info], ... ]. A target entry array represents a single type of data than can be supplied for by a widget for a selection or for supplied or received during drag-and-drop. 
       * target:  A string representing the drag type
       * flags: A flags field (used only for drag and drop - see ((<GtkTargetFlags|Gtk::Drag#GtkTargetFlags>)))
       * info: An application assigned integer ID. The integer ID will later be passed as a signal parameter for signals like "selection_get". It allows the application to identify the target type without extensive string compares.
     * actions: a ((<GdkDragAction|GdkDragContext#GdkDragAction>))
     * Returns: self

--- enable_model_drag_source(start_button_mask, targets, actions)
     * start_button_mask: ((<GdkModifierType|Gdk::Window#GdkModifierType>))
     * targets: an array of target entries. [[target, flags, info], ... ]. A target entry array represents a single type of data than can be supplied for by a widget for a selection or for supplied or received during drag-and-drop. 
       * target: A string representing the drag type
       * flags: A flags field (used only for drag and drop - see ((<GtkTargetFlags|Gtk::Drag#GtkTargetFlags>)))
       * info: An application assigned integer ID. The integer ID will later be passed as a signal parameter for signals like "selection_get". It allows the application to identify the target type without extensive string compares.
     * actions: a ((<GdkDragAction|GdkDragContext#GdkDragAction>))
     * Returns: self

--- unset_rows_drag_dest
     * Returns: self
--- unset_rows_drag_source
     * Returns: self

--- drag_dest_row
     * Returns: [path, position]
       * path: a Gtk::TreePath
       * position: a ((<GtkTreeViewDropPosition|Gtk::TreeView#GtkTreeViewDropPosition>))
--- set_drag_dest_row(path, position)
     * path: a Gtk::TreePath
     * position: a ((<GtkTreeViewDropPosition|Gtk::TreeView#GtkTreeViewDropPosition>))
     * Returns: self

--- get_dest_row_at_pos(drag_x, drag_y)
     * drag_x: an Integer
     * drag_y: an Integer
     * Returns: [path, position] or nil
       * path: a Gtk::TreePath
       * position: a ((<GtkTreeViewDropPosition|Gtk::TreeView#GtkTreeViewDropPosition>))

--- create_row_drag_icon(path)
    Creates a Gdk::Pixmap representation of the row at path. This image is used for a drag icon.
    * path: a Gtk::TreePath in the Gtk::TreeView 
    * Returns: a newly Gdk::Pixmap of the drag icon. 

--- enable_search?
    Returns whether or not the tree allows interactive searching.
    * Returns: whether or not to let the user search interactively 
--- enable_search=(enable_search)
    If enable_search is set, then the user can type in text to search through the tree interactively.
    * enable_search : true, if the user can search interactively 
    * Returns: enable_search
--- set_enable_search(enable_search)
    Same as enable_search=.
    * enable_search : true, if the user can search interactively 
    * Returns: self

--- search_column
    Gets the column searched on by the interactive search code.
    * Returns : the column the interactive search code searches in
--- search_column=(column)
    Sets column as the column where the interactive search code should search in. Additionally, turns on interactive searching.
    * column: the column to search in 
    * Returns: column
--- set_search_column(column)
    Same as search_column=.
    * column: the column to search in 
    * Returns: self

--- set_search_equal_func {|model, columnm, key, iter| ... }
    Sets the compare block for the interactive search capabilities.
    * {|model, columnm, key, iter| ... }
      * model: a Gtk::TreeModel
      * column: a Column number
      * key: a String
      * iter: a Gtk::TreeIter
      * Returns: true or false
      
 
== Constants
=== GtkTreeViewDropPosition
Determining where a dropped row goes.
--- DROP_BEFORE
    drop before this row 
--- DROP_AFTER
    drop after this row 
--- DROP_INTO_OR_BEFORE
    drop as a child of this row (with fallback to before if into is not possible)
--- DROP_INTO_OR_AFTER
    drop as a child of this row (with fallback to after if into is not possible)

== Signals
--- columns-changed: self
     * self: the Gtk::TreeView

--- cursor-changed: self
     * self: the Gtk::TreeView

--- expand-collapse-cursor-row: self, arg1, arg2, arg3
     * self: the Gtk::TreeView
     * arg1: true or false
     * arg2: true or false
     * arg3: true or false

--- move-cursor: self, step, arg1
     * self: the Gtk::TreeView
     * step: ((<GtkMovementStep|Gtk#GtkMovementStep>))
     * arg1: Integer
     * Returns: true or false

--- row-activated: self, path, column
     * self: the Gtk::TreeView
     * path: the Gtk::TreePath
     * column: the Gtk::TreeViewColumn

--- row-collapsed: self, iter, path
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath

--- row-expanded: self
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath

--- select-all: self
     * self: the Gtk::TreeView
     
--- select-cursor-parent: self
     * self: the Gtk::TreeView
     
--- select-cursor-row: self, arg1
     * self: the Gtk::TreeView
     * argq: true or false
     
--- set-scroll-adjustments: self, adj1, adj2
     * self: the Gtk::TreeView
     * adj1: the Gtk::Adjustment
     * adj2: the Gtk::Adjustment

--- start-interactive-search: self
     * self: the Gtk::TreeView
     
--- test-collapse-row: self
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath
     * Returns: true or false

--- test-expand-row: self
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath
     * Returns: true or false

--- toggle-cursor-row: self
     * self: the Gtk::TreeView

--- unselect-all: self
     * self: the Gtk::TreeView

== See Also
Gtk::TreeViewColumn, Gtk::TreeSelection, Gtk::TreeModel, Gtk::TreeSortable, Gtk::TreeModelSort, Gtk::ListStore, Gtk::TreeStore, Gtk::CellRenderer, Gtk::CellEditable, Gtk::CellRendererPixbuf, Gtk::CellRendererText, Gtk::CellRendererToggle



- ((<Masao>))
-------------------------
= class Gtk::TreeView
Widget that displays any object that implements the Gtk::TreeModel interface.

== Super Class
* Gtk::Container

== Class Methods
--- Gtk::TreeView.new(model = nil)
    Creates a new Gtk::TreeView widget with the model initialized to model or nil.
    * model: the model. 
    * Returns: A newly created Gtk::TreeView widget. 

== Instance Methods
--- model
    Returns the model the the Gtk::TreeView is based on. Returns nil if the model is unset.
    * Returns: A Gtk::TreeModel, or nil if none is currently being used. 
--- model=(model)
    Sets the model for a Gtk::TreeView. If the Gtk::TreeView already has a model set, it will remove it before setting the new model. If model is nil, then it will unset the old model.
    * model: The model 
    * Returns: model
--- set_model(model)
    Same as model=.
    * model: The model
    * Returns: self

--- selection
    Gets the Gtk::TreeSelection associated with the TreeView.
    * Returns: A Gtk::TreeSelection object. 

--- hadjustment
    Gets the Gtk::Adjustment currently being used for the horizontal aspect.
    * Returns: A Gtk::Adjustment object, or nil if none is currently being used. 
--- hadjustment=(adjustment)
    Sets the Gtk::Adjustment for the current horizontal aspect.
    * adjustment: The Gtk::Adjustment to set, or nil 
    * Returns: adjustment
--- set_hadjustment(adjustment)
    Same as hadjustment=.
    * Returns: self

--- vadjustment
    Gets the Gtk::Adjustment currently being used for the vertical aspect.
    * Returns: A Gtk::Adjustment object, or nil if none is currently being used. 
--- vadjustment=(adjustment)
    Sets the Gtk::Adjustment for the current vertical aspect.
    * adjustment: The Gtk::Adjustment to set, or nil 
    * Returns: adjustment
--- set_vadjustment(adjustment)
    Same as vadjustment=.
    * Returns: self

--- headers_visible?
    Returns true if the headers on the Gtk::TreeView are visible.
    * Returns: Whether the headers are visible or not. 
--- headers_visible=(headers_visible)
    Sets the the visibility state of the headers.
    * headers_visible: true if the headers are visible 
    * Returns: headers_visible
--- set_headers_visible(headers_visible)
    Same as headers_visible=.
    * Returns: headers_visible

--- columns_autosize
    Resizes all columns to their optimal width. Only works after the Gtk::TreeView has been realized.
    * Returns: self

--- headers_clickable=(setting)
    Allow the column title buttons to be clicked.
    * setting: true if the columns are clickable. 
    * Returns: self

--- set_headers_clickable(setting)
    Same as headers_clickable=.
    * setting: true if the columns are clickable. 
    * Returns: self

--- rules_hint?
    Gets the setting set by Gtk::TreeView#rules_hint=.
    * Returns: true if rules are useful for the user of this tree 
--- rules_hint=(setting)
    This method tells GTK+ that the user interface for your application requires users to read across tree rows and associate cells with one another. By default, GTK+ will then render the tree with alternating row colors. Do not use it just because you prefer the appearance of the ruled tree; that's a question for the theme. Some themes will draw tree rows in alternating colors even when rules are turned off, and users who prefer that appearance all the time can choose those themes. You should call this method only as a semantic hint to the theme engine that your tree makes alternating colors useful from a functional standpoint (since it has lots of columns, generally).
    * setting: true if the tree requires reading across rows 
    * Returns: setting
--- set_rules_hint(setting)
    Same as rules_hint=.
    * setting: true if the tree requires reading across rows 
    * Returns: self

--- append_column(column)
    Appends column to the list of columns.
    * column : The Gtk::TreeViewColumn to add. 
    * Returns : The number of columns in the Gtk::TreeView after appending. 

--- remove_column(column)
    Removes column from the Gtk::TreeView.
    * column : The Gtk::TreeViewColumn to remove. 
    * Returns : The number of columns in Gtk::TreeView after removing. 

--- insert_column(column, position)
    This inserts the column into the Gtk::TreeView at position. If position is -1, then the column is inserted at the end.
    * column: The Gtk::TreeViewColumn to be inserted. 
    * position: The position to insert column in. 
    * Returns: The number of columns in the Gtk::TreeView after insertion. 
--- insert_column(position, title, cell, attributes)
    Creates a new Gtk::TreeViewColumn and inserts it into the Gtk::TreeView at position. If position is -1, then the newly created column is inserted at the end. The column is initialized with the attributes given.
    * position: The position to insert the new column in. 
    * title: The title to set the header to. 
    * cell: The Gtk::CellRenderer. 
    * attribures: a hash of attributes. See Gtk::TreeViewColumn#add_attribute.
    * Returns: The number of columns in Gtk::TreeView after insertion. 
--- insert_column(position, title, cell) {|tvc, cell, model, iter| ... }
    Convenience method that inserts a new column into the Gtk::TreeView with the given cell renderer and a Block to set cell renderer attributes (normally using data from the model). See also Gtk::TreeViewColumn#set_cell_data_func, Gtk::TreeViewColumn#pack_start.
    * position: Position to insert, -1 for append 
    * title: column title 
    * cell: cell renderer for column 
    * {|tvc, cell, model, iter| ... }: A block to set the properties of a cell instead of just using the straight mapping between the cell and the model. This is useful for customizing the cell renderer. For example, a block might get an Integer from the model, and render it to the "text" attribute of "cell" by converting it to its written equivilent. This is set by calling Gtk::TreeViewColumn#set_cell_data_func
      * tvc: A Gtk::TreeColumn 
      * cell: The Gtk::CellRenderer that is being rendered by tree_column 
      * model: The Gtk::TreeModel being rendered 
      * iter: A Gtk::TreeIter of the current row rendered 
    * Returns: number of columns in the tree view post-insert 

--- get_column(n)
    Gets the Gtk::TreeViewColumn at the given position in the Gtk::TreeView.
    * n: The position of the column, counting from 0. 
    * Returns: The Gtk::TreeViewColumn, or nil if the position is outside the range of columns. 

--- columns
    Returns an array of all the Gtk::TreeViewColumn s currently in the Gtk::TreeView. 
    * Returns: An array of Gtk::TreeViewColumn s 

--- move_column_after(column, base_column)
    Moves column to be after to base_column. If base_column is nil, then column is placed in the first position.
    * column: The Gtk::TreeViewColumn to be moved. 
    * base_column: The GtkTreeViewColumn to be moved relative to, or nil. 
    * Returns: self

--- expander_column
    Returns the column that is the current expander column. This column has the expander arrow drawn next to it.
    * Returns : The expander column. 
--- expander_column=(column)
    Sets the Gtk::TreeViewColumn to draw the expander arrow at. It must be in the Gtk:TreeView. If column is nil, then the expander arrow is always at the first visible column.
    * column: nil, or the Gtk::TreeViewColumn to draw the expander arrow at. 
    * Returns: column
--- set_expander_column(column)
    Same as expander_column=.
    * column: nil, or the column to draw the expander arrow at. 
    * Returns: self

--- set_column_drag_function{|tree_view, column, prev_column, next_column| ... }
    Sets a block for determining where a column may be dropped when dragged. This method is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. The arguments passed to func are: the tree_view, the Gtk::TreeViewColumn being dragged, the two Gtk::TreeViewColumn s determining the drop spot. If either of the Gtk::TreeViewColumn arguments for the drop spot are nil, then they indicate an edge.
    * {|tree_view, column, prev_column, next_column| ... }: a block for determining whether column can be dropped in a particular spot (as determined by prev_column and next_column). In left to right locales, prev_column is on the left of the potential drop spot, and next_column is on the right. In right to left mode, this is reversed. This method should return true if the spot is a valid drop spot. Please note that returning true does not actually indicate that the column drop was made, but is meant only to indicate a possible drop spot to the user.
      * tree_view: A Gtk::TreeView 
      * column: The Gtk::TreeViewColumn being dragged 
      * prev_column: A Gtk::TreeViewColumn on one side of column 
      * next_column: A Gtk::TreeViewColumn on the other side of column 
      * Returns: true, if column can be dropped in this spot  

--- scroll_to_point(tree_x, tree_y)
    Scrolls the tree view such that the top-left corner of the visible area is tree_x, tree_y, where tree_x and tree_y are specified in tree window coordinates. The Gtk::TreeView must be realized before this method is called. If it isn't, you probably want to be using Gtk::TreeView#scroll_to_cell.
    If either tree_x or tree_y are -1, then that direction isn't scrolled.
    * tree_x: X coordinate of new top-left pixel of visible area, or -1 
    * tree_y: Y coordinate of new top-left pixel of visible area, or -1 
    * Returns: self

--- scroll_to_cell(path, column, use_align, row_align, col_align)
    Moves the alignments of the Gtk::TreeView to the position specified by column and path. If column is nil, then no horizontal scrolling occurs. Likewise, if path is nil no vertical scrolling occurs. At a minimum, one of column or path need to be non-nil. row_align determines where the row is placed, and col_align determines where column is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.
    If use_align is false, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the cell onto the screen. This means that the cell will be scrolled to the edge closest to it's current position. If the cell is currently visible on the screen, nothing is done.
    This method only works if the model is set, and path is a valid row on the model. If the model changes before the Gtk::TreeView is realized, the centered path will be modified to reflect this change.
    * path: The Gtk::TreePath of the row to move to, or nil. 
    * column: The Gtk::TreeViewColumn to move horizontally to, or nil. 
    * use_align: whether to use alignment arguments, or false. 
    * row_align: The vertical alignment of the row specified by path between 0.0 and 1.0.
    * col_align: The horizontal alignment of the column specified by column between 0.0 and 1.0.
    * Returns: self

--- cursor
    Gets the current path and focus column. If the cursor isn't currently set, then path will be nil. If no column currently has focus, then focus_column will be nil.
    * Returns: [path, focus_column]
      * path: the current cursor path, or nil
      * focus_column: the current focus column, or nil 
--- set_cursor(path, focus_column, start_editing)
    Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user's attention on a particular row. If column is not nil, then focus is given to the column specified by it. Additionally, if column is specified, and start_editing is true, then editing should be started in the specified cell. This method is often followed by Gtk::Widget#grab_focus in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.
    * path: A Gtk::TreePath 
    * focus_column: A Gtk::TreeViewColumn, or nil 
    * start_editing: true if the specified cell should start being edited. 
    * Returns: self

--- row_activated(path, column)
    Activates the cell determined by path and column.
    * path: The Gtk::TreePath to be activated. 
    * column: The Gtk::TreeViewColumn to be activated. 
    * Returns: self

--- expand_all
    Recursively expands all nodes in the Gtk::TreeView.
    * Returns: self

--- collapse_all
    Recursively collapses all visible, expanded nodes in the Gtk::TreeView.
    * Returns: self

--- expand_row(path, open_all)
    Opens the row so its children are visible.
    * path: a Gtk::TreePath to a row in the Gtk::TreeView
    * open_all: whether to recursively expand, or just expand immediate children 
    * Returns: true if the row existed and had children 

--- collapse_row(path)
    Collapses a row (hides its child rows, if they exist).
    * path : a Gtk::TreePath to a row in the Gtk::TreeView 
    * Returns: true if the row was collapsed. 

--- map_expanded_rows {|tree_view, path| ... }
    Calls block on all expanded rows.
    * {|tree_view, path| ... }
       * tree_view: A Gtk::TreeView 
       * path: The path that's expanded 

--- row_expanded?(path)
    Returns true if the node pointed to by path is expanded in Gtk::TreeView.
    * path: A Gtk::TreePath to test expansion state. 
    * Returns: true if path is expanded. 

--- reorderable?
    Retrieves whether the user can reorder the tree via drag-and-drop. See Gtk::TreeView#reorderable=.
    * Returns: true if the tree can be reordered. 
--- reorderable=(reorderable)
    This method is a convenience method to allow you to reorder models that support the Gtk::DragSource and the Gtk::DragDest. Both Gtk::TreeStore and Gtk::ListStore support these.
    If reorderable is true, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model's signals.
    This method does not give you any degree of control over the order -- any reorderering is allowed. If more control is needed, you should probably handle drag and drop manually.
    * reorderable : true, if the tree can be reordered. 
    * Returns: reorderable
--- set_reorderable(reorderable)
    Same as reorderable=.
    * reorderable: true, if the tree can be reordered. 
    * Returns: self

--- get_path_at_pos(x, y)
    Finds the path at the point (x, y), relative to widget coordinates. That is, x and y are relative to an events coordinates. x and y must come from an event on the tree_view only where event.window == Gtk::TreeView#bin_window. It is primarily for things like popup menus.
    This method is only meaningful if Gtk::TreeView is realized.
    * x: The x position to be identified. 
    * y: The y position to be identified. 
    * Returns: [path, column, cell_x, cell_y] if a row exists at that coordinate or nil 
      * path: A pointer to a Gtk::TreePath pointer to be filled in, or nil 
      * column: A pointer to a Gtk::TreeViewColumn pointer to be filled in, or nil 
      * cell_x: A pointer where the X coordinate relative to the cell can be placed, or nil 
      * cell_y: A pointer where the Y coordinate relative to the cell can be placed, or nil 

--- get_cell_area(path, column)
    Returns the Gdk::Rectangle in tree window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a path not currently displayed, the y and height fields of the rectangle will be 0. If column is nil, the x and width fields will be 0. The sum of all cell rects does not cover the entire tree; there are extra pixels in between rows, for example. The returned rectangle is equivalent to the cell_area passed to Gtk::CellRenderer#render. This method is only valid if Gtk::TreeView is realized.
    * path: a Gtk::TreePath for the row, or nil to get only horizontal coordinates 
    * column: a Gtk::TreeViewColumn for the column, or nil to get only vertical coordiantes 
    * Returns: a Gdk::Rectangle to fill with cell rect 

--- get_background_area(path, column)
    Fills the bounding rectangle in tree window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a node not found in the tree, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields will be filled with 0. The returned rectangle is equivalent to the background_area passed to Gtk::CellRenderer#render. These background areas tile to cover the entire tree window (except for the area used for header buttons). Contrast with the cell_area, returned by Gtk::TreeView#get_cell_area, which returns only the cell itself, excluding surrounding borders and the tree expander area.
    * path: a Gtk::TreePath for the row, or nil to get only horizontal coordinates 
    * column: a Gtk::TreeViewColumn for the column, or nil to get only vertical coordiantes 
    * Returns: a Gdk::Rectangle to fill with cell background rect 

--- visible_rect
    Fills visible_rect with the currently-visible region of the buffer, in tree coordinates. Convert to widget coordinates with Gtk::TreeView#tree_to_widget_coords. Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.
    * Returns: Gdk::Rectangle 

--- bin_window
    Returns the window that tree_view renders to. This is used primarily to compare to event.window to confirm that the event on the Gtk::TreeView is on the right window.
    * Returns: A Gdk::Window, or nil when the Gtk::TreeView hasn't been realized yet 

--- widget_to_tree_coords(wx, wy)
    Converts widget coordinates to coordinates for the tree window (the full scrollable area of the tree).
    * wx: widget X coordinate 
    * wy: widget Y coordinate 
    * Returns: [tx, ty]
      * tx: return location for tree X coordinate 
      * ty: return location for tree Y coordinate 

--- tree_to_widget_coords(tx, ty)
    Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
    * tx: tree X coordinate
    * ty: tree Y coordinate 
    * Returns: [wx, wy]
      * wx: return location for widget X coordinate 
      * wy: return location for widget Y coordinate 

--- enable_model_drag_dest(targets, actions)
     * targets: an array of target entries. [[target, flags, info], ... ]. A target entry array represents a single type of data than can be supplied for by a widget for a selection or for supplied or received during drag-and-drop. 
       * target:  A string representing the drag type
       * flags: A flags field (used only for drag and drop - see ((<GtkTargetFlags|Gtk::Drag#GtkTargetFlags>)))
       * info: An application assigned integer ID. The integer ID will later be passed as a signal parameter for signals like "selection_get". It allows the application to identify the target type without extensive string compares.
     * actions: a ((<GdkDragAction|GdkDragContext#GdkDragAction>))
     * Returns: self

--- enable_model_drag_source(start_button_mask, targets, actions)
     * start_button_mask: ((<GdkModifierType|Gdk::Window#GdkModifierType>))
     * targets: an array of target entries. [[target, flags, info], ... ]. A target entry array represents a single type of data than can be supplied for by a widget for a selection or for supplied or received during drag-and-drop. 
       * target: A string representing the drag type
       * flags: A flags field (used only for drag and drop - see ((<GtkTargetFlags|Gtk::Drag#GtkTargetFlags>)))
       * info: An application assigned integer ID. The integer ID will later be passed as a signal parameter for signals like "selection_get". It allows the application to identify the target type without extensive string compares.
     * actions: a ((<GdkDragAction|GdkDragContext#GdkDragAction>))
     * Returns: self

--- unset_rows_drag_dest
     * Returns: self
--- unset_rows_drag_source
     * Returns: self

--- drag_dest_row
     * Returns: [path, position]
       * path: a Gtk::TreePath
       * position: a ((<GtkTreeViewDropPosition|Gtk::TreeView#GtkTreeViewDropPosition>))
--- set_drag_dest_row(path, position)
     * path: a Gtk::TreePath
     * position: a ((<GtkTreeViewDropPosition|Gtk::TreeView#GtkTreeViewDropPosition>))
     * Returns: self

--- get_dest_row_at_pos(drag_x, drag_y)
     * drag_x: an Integer
     * drag_y: an Integer
     * Returns: [path, position] or nil
       * path: a Gtk::TreePath
       * position: a ((<GtkTreeViewDropPosition|Gtk::TreeView#GtkTreeViewDropPosition>))

--- create_row_drag_icon(path)
    Creates a Gdk::Pixmap representation of the row at path. This image is used for a drag icon.
    * path: a Gtk::TreePath in the Gtk::TreeView 
    * Returns: a newly Gdk::Pixmap of the drag icon. 

--- enable_search?
    Returns whether or not the tree allows interactive searching.
    * Returns: whether or not to let the user search interactively 
--- enable_search=(enable_search)
    If enable_search is set, then the user can type in text to search through the tree interactively.
    * enable_search : true, if the user can search interactively 
    * Returns: enable_search
--- set_enable_search(enable_search)
    Same as enable_search=.
    * enable_search : true, if the user can search interactively 
    * Returns: self

--- search_column
    Gets the column searched on by the interactive search code.
    * Returns : the column the interactive search code searches in
--- search_column=(column)
    Sets column as the column where the interactive search code should search in. Additionally, turns on interactive searching.
    * column: the column to search in 
    * Returns: column
--- set_search_column(column)
    Same as search_column=.
    * column: the column to search in 
    * Returns: self

--- set_search_equal_func {|model, columnm, key, iter| ... }
    Sets the compare block for the interactive search capabilities.
    * {|model, columnm, key, iter| ... }
      * model: a Gtk::TreeModel
      * column: a Column number
      * key: a String
      * iter: a Gtk::TreeIter
      * Returns: true or false
      
 
== Constants
=== GtkTreeViewDropPosition
Determining where a dropped row goes.
--- DROP_BEFORE
    drop before this row 
--- DROP_AFTER
    drop after this row 
--- DROP_INTO_OR_BEFORE
    drop as a child of this row (with fallback to before if into is not possible)
--- DROP_INTO_OR_AFTER
    drop as a child of this row (with fallback to after if into is not possible)

== Signals
--- columns-changed: self
     * self: the Gtk::TreeView

--- cursor-changed: self
     * self: the Gtk::TreeView

--- expand-collapse-cursor-row: self, arg1, arg2, arg3
     * self: the Gtk::TreeView
     * arg1: true or false
     * arg2: true or false
     * arg3: true or false

--- move-cursor: self, step, arg1
     * self: the Gtk::TreeView
     * step: ((<GtkMovementStep|Gtk#GtkMovementStep>))
     * arg1: Integer
     * Returns: true or false

--- row-activated: self, path, column
     * self: the Gtk::TreeView
     * path: the Gtk::TreePath
     * column: the Gtk::TreeViewColumn

--- row-collapsed: self, iter, path
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath

--- row-expanded: self
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath

--- select-all: self
     * self: the Gtk::TreeView
     
--- select-cursor-parent: self
     * self: the Gtk::TreeView
     
--- select-cursor-row: self, arg1
     * self: the Gtk::TreeView
     * argq: true or false
     
--- set-scroll-adjustments: self, adj1, adj2
     * self: the Gtk::TreeView
     * adj1: the Gtk::Adjustment
     * adj2: the Gtk::Adjustment

--- start-interactive-search: self
     * self: the Gtk::TreeView
     
--- test-collapse-row: self
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath
     * Returns: true or false

--- test-expand-row: self
     * self: the Gtk::TreeView
     * iter: the Gtk::TreeIter
     * path: the Gtk::TreePath
     * Returns: true or false

--- toggle-cursor-row: self
     * self: the Gtk::TreeView

--- unselect-all: self
     * self: the Gtk::TreeView

== See Also
Gtk::TreeViewColumn, Gtk::TreeSelection, Gtk::TreeModel, Gtk::TreeSortable, Gtk::TreeModelSort, Gtk::ListStore, Gtk::TreeStore, Gtk::CellRenderer, Gtk::CellEditable, Gtk::CellRendererPixbuf, Gtk::CellRendererText, Gtk::CellRendererToggle



- ((<Masao>))




ruby-gnome2-cvs メーリングリストの案内
Back to archive index