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

Zurück zum Archiv-Index

ruby-****@lists***** ruby-****@lists*****
2003年 7月 19日 (土) 00:18:24 JST


-------------------------
REMOTE_ADDR = 61.204.181.66
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gtk%3A%3ATreeViewColumn
-------------------------
= class Gtk::TreeViewColumn
The Gtk::TreeViewColumn object is a visible column in a Gtk::TreeView widget. It determines the geometry, type.

== super class
* Gtk::Object

== class methods
--- Gtk::TreeViewColumn.new(title = nil, cell_renderer = nil, attributes = nil)
    Creates a new Gtk::TreeViewColumn.
    * title: The title to set the header to. 
    * cell_renderer: The Gtk::CellRenderer
    * attributes: the hash of attributes which are the properties on cell_renderer to be set from the value. {attr_key1 => value1, attr_key2 => value2, .... }. attr_keys are Symbol or String. 

     {:text => "Hello", :background => "green", editable => true}

    * Returns : A newly created Gtk::TreeViewColumn.  

== public instance methods
--- pack_start(cell, expand)
    Packs the cell into the beginning of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.
    * cell: The Gtk::CellRenderer.  
    * expand: true if cell is to be given extra space allocated to box.  
    * Returns: self

--- pack_end(cell, expand)
    Adds the cell to end of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.
    * cell: The Gtk::CellRenderer.  
    * expand: true if cell is to be given extra space allocated to box.
    * Returns: self

--- clear
    Unsets all the mappings on all renderers on the Gtk::TreeViewColumn.
    * Returns: self

--- cell_renderers
    Returns an array of all the cell renderers in the column, in no particular order.
    * Returns: An array of Gtk::CellRenderer s

--- add_attribute(cell_renderer, attribute, column)
    Adds an attribute mapping to the list in the Gtk::TreeViewColumn. The column is the column of the model to get a value from, and the attribute is the parameter on cell_renderer to be set from the value. So for example if column 2 of the model contains strings, you could have the :text attribute of a Gtk::CellRendererText get its values from column 2.
    * cell_renderer: the Gtk::CellRenderer to set attributes on  
    * attribute: An attribute on the renderer(Symbol or String)
    * column: The column position on the model to get the attribute from.  
    * Returns: self

--- set_cell_data_func(cell) {|tvc, cell, model, iter| ... }
    Sets the block which is used instead of the standard attributes mapping for setting the column value, and should set the value of Gtk::TreeViewColumn's cell renderer as appropriate.
    * cell: A Gtk::CellRenderer 
    * {|tvc, cell, model, iter| ... }: the block
       * tvc: the Gtk::TreeViewColumn
       * cell: the Gtk::CellRenderer
       * model: the Gtk::TreeModel
       * iter: the Gtk::TreeIter
    * Returns: self

--- clear_attributes(cell_renderer)
    Clears all existing attributes previously set with Gtk::TreeViewColumn#add_attribute.
    * cell_renderer: a Gtk::CellRenderer to clear the attribute mapping on. 
    * Returns: self

--- spacing
    Returns the spacing of the Gtk::TreeViewColumn.
    * Returns : the spacing of the Gtk::TreeViewColumn. 
--- spacing=(spacing)
    Sets the spacing field of the Gtk::TreeViewColumn, which is the number of pixels to place between cell renderers packed into it.
    * spacing: distance between cell renderers in pixels. 
    * Returns: spacing
--- set_spacing(spacing)
    Same as spacing=.
    * spacing: distance between cell renderers in pixels. 
    * Returns: self

--- visible?
    Returns true if Gtk::TreeViewColumn is visible.
    * Returns: whether the column is visible or not. If it is visible, then the tree will show the column. 
--- visible=(visible)
    Sets the visibility of Gtk::TreeViewColumn.
    * visible : true if the Gtk::TreeViewColumn is visible. 
    * Returns: visible
--- set_visible(visible)
    Same as visible=.
    * Returns: self

--- alignment
    not yet
    * Returns: self
--- alignment=
    not yet
    * Returns: self
--- cell_data_func=
    not yet
    * Returns: self
--- cell_is_visible?
    not yet
    * Returns: self
--- cell_set_cell_data
    not yet
    * Returns: self
--- cell_size
    not yet
    * Returns: self
--- clickable=
    not yet
    * Returns: self
--- clickable?
    not yet
    * Returns: self
--- clicked
    not yet
    * Returns: self
--- fixed_width
    not yet
    * Returns: self
--- fixed_width=
    not yet
    * Returns: self
--- max_width
    not yet
    * Returns: self
--- max_width=
    not yet
    * Returns: self
--- min_width
    not yet
    * Returns: self
--- min_width=
    not yet
    * Returns: self
--- reorderable=
    not yet
    * Returns: self
--- reorderable?
    not yet
    * Returns: self
--- resizable=
    not yet
    * Returns: self
--- resizable?
    not yet
    * Returns: self
--- set_alignment
    not yet
    * Returns: self
--- set_clickable
    not yet
    * Returns: self
--- set_fixed_width
    not yet
    * Returns: self
--- set_max_width
    not yet
    * Returns: self
--- set_min_width
    not yet
    * Returns: self
--- set_reorderable
    not yet
    * Returns: self
--- set_resizable
    not yet
    * Returns: self
--- set_sizing
    not yet
    * Returns: self
--- set_sort_column_id
    not yet
    * Returns: self
--- set_sort_indicator
    not yet
    * Returns: self
--- set_sort_order
    not yet
    * Returns: self
--- set_title
    not yet
    * Returns: self
--- set_widget
    not yet
    * Returns: self
--- sizing
    not yet
    * Returns: self
--- sizing=
    not yet
    * Returns: self
--- sort_column_id
    not yet
    * Returns: self
--- sort_column_id=
    not yet
    * Returns: self
--- sort_indicator=
    not yet
    * Returns: self
--- sort_indicator?
    not yet
    * Returns: self
--- sort_order
    not yet
    * Returns: self
--- sort_order=
    not yet
    * Returns: self
--- title
    not yet
    * Returns: self
--- title=
    not yet
    * Returns: self
--- widget
    not yet
    * Returns: self
--- widget=
    not yet
    * Returns: self
--- width
    not yet
    * Returns: self

== constants
=== GtkTreeViewColumnSizing
The sizing method the column uses to determine its width. Please note that Gtk::TreeViewColumn::AUTOSIZE are inefficient for large views, and can make columns appear choppy. 

--- GROW_ONLY
    Columns only get bigger in reaction to changes in the model.
--- AUTOSIZE
    Columns resize to be the optimal size everytime the model changes.  
--- FIXED
    Columns are a fixed numbers of pixels wide.

== signals
--- clicked: self
     * self: Gtk::TreeViewColumn

== See Also
Gtk::TreeView, Gtk::TreeSelection, Gtk::TreeDnd, Gtk::TreeMode, Gtk::TreeSortable, Gtk::TreeModelSort, Gtk::ListStore, Gtk::TreeStore, Gtk::CellRenderer, Gtk::CellEditable, Gtk::CellRendererPixbuf, Gtk::CellRendererText, Gtk::CellRendererToggle 

-------------------------
= class Gtk::TreeViewColumn
The Gtk::TreeViewColumn object is a visible column in a Gtk::TreeView widget. It determines the geometry, type.

== super class
* Gtk::Object

== class methods
--- Gtk::TreeViewColumn.new(title = nil, cell_renderer = nil, attributes = nil)
    Creates a new Gtk::TreeViewColumn.
    * title: The title to set the header to. 
    * cell_renderer: The Gtk::CellRenderer
    * attributes: the hash of attributes which are the properties on cell_renderer to be set from the value. {attr_key1 => value1, attr_key2 => value2, .... }. attr_keys are Symbol or String. 

     {:text => "Hello", :background => "green", editable => true}

    * Returns : A newly created Gtk::TreeViewColumn.  

== public instance methods
--- pack_start(cell, expand)
    Packs the cell into the beginning of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.
    * cell: The Gtk::CellRenderer.  
    * expand: true if cell is to be given extra space allocated to box.  
    * Returns: self

--- pack_end(cell, expand)
    Adds the cell to end of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.
    * cell: The Gtk::CellRenderer.  
    * expand: true if cell is to be given extra space allocated to box.
    * Returns: self

--- clear
    Unsets all the mappings on all renderers on the Gtk::TreeViewColumn.
    * Returns: self

--- cell_renderers
    Returns an array of all the cell renderers in the column, in no particular order.
    * Returns: An array of Gtk::CellRenderer s

--- add_attribute(cell_renderer, attribute, column)
    Adds an attribute mapping to the list in the Gtk::TreeViewColumn. The column is the column of the model to get a value from, and the attribute is the parameter on cell_renderer to be set from the value. So for example if column 2 of the model contains strings, you could have the :text attribute of a Gtk::CellRendererText get its values from column 2.
    * cell_renderer: the Gtk::CellRenderer to set attributes on  
    * attribute: An attribute on the renderer(Symbol or String)
    * column: The column position on the model to get the attribute from.  
    * Returns: self

--- set_cell_data_func(cell) {|tvc, cell, model, iter| ... }
    Sets the block which is used instead of the standard attributes mapping for setting the column value, and should set the value of Gtk::TreeViewColumn's cell renderer as appropriate.
    * cell: A Gtk::CellRenderer 
    * {|tvc, cell, model, iter| ... }: the block
       * tvc: the Gtk::TreeViewColumn
       * cell: the Gtk::CellRenderer
       * model: the Gtk::TreeModel
       * iter: the Gtk::TreeIter
    * Returns: self

--- clear_attributes(cell_renderer)
    Clears all existing attributes previously set with Gtk::TreeViewColumn#add_attribute.
    * cell_renderer: a Gtk::CellRenderer to clear the attribute mapping on. 
    * Returns: self

--- spacing
    Returns the spacing of the Gtk::TreeViewColumn.
    * Returns : the spacing of the Gtk::TreeViewColumn. 
--- spacing=(spacing)
    Sets the spacing field of the Gtk::TreeViewColumn, which is the number of pixels to place between cell renderers packed into it.
    * spacing: distance between cell renderers in pixels. 
    * Returns: spacing
--- set_spacing(spacing)
    Same as spacing=.
    * spacing: distance between cell renderers in pixels. 
    * Returns: self

--- visible?
    Returns true if Gtk::TreeViewColumn is visible.
    * Returns: whether the column is visible or not. If it is visible, then the tree will show the column. 
--- visible=(visible)
    Sets the visibility of Gtk::TreeViewColumn.
    * visible : true if the Gtk::TreeViewColumn is visible. 
    * Returns: visible
--- set_visible(visible)
    Same as visible=.
    * Returns: self

--- resizable?
    Returns true if the Gtk::TreeViewColumn can be resized by the end user.
    * Returns: A Gtk::TreeViewColumn 
--- resizable=(resizable)
    If resizable is true, then the user can explicitly resize the column by grabbing the outer edge of the column button. If resizable is true and sizing mode of the column is Gtk::TreeViewColumn::AUTOSIZE, then the sizing mode is changed to Gtk::TreeViewColumn::GROW_ONLY.
    * resizable: true, if the column can be resized 
    * Returns: resizable
--- set_resizable(resizable)
    Same as resizable=.
    * resizable: true, if the column can be resized 
    * Returns: self

--- sizing
    Returns the current type of the Gtk::TreeViewColumn.
    * Returns: The value of the ((<GtkTreeViewColumnSizing|Gtk::TreeViewColumn#GtkTreeViewColumnSizing>)). 
--- sizing=(type)
    Sets the growth behavior of the Gtk::TreeViewColumn to type.
    * type : The ((<GtkTreeViewColumnSizing|Gtk::TreeViewColumn#GtkTreeViewColumnSizing>)). 
    * Returns: type

--- set_sizing(type)
    Same as sizing=.
    * type : The ((<GtkTreeViewColumnSizing|Gtk::TreeViewColumn#GtkTreeViewColumnSizing>)). 
    * Returns: self

--- width
    Returns the current size of the Gtk::TreeViewColumn in pixels.
    * Returns: The current width of the Gtk::TreeViewColumn.

--- fixed_width
    Gets the fixed width of the column. This value is only meaning may not be the actual width of the column on the screen, just what is requested.
    * Returns: the fixed width of the column
--- fixed_width=(fixed_width)
    Sets the size of the column in pixels. This is meaningful only if the sizing type is Gtk::TreeViewColumn::FIXED. The size of the column is clamped to the min/max width for the column. Please note that the min/max width of the column doesn't actually affect the "fixed_width" property of the widget, just the actual size when displayed.
    * fixed_width: The size to set the Gtk::TreeViewColumn to. Must be greater than 0. 
    * Returns: fixed_width
--- set_fixed_width
    Same as fixed_width=.
    * fixed_width: The size to set the Gtk::TreeViewColumn to. Must be greater than 0. 
    * Returns: self

--- min_width
    Returns the minimum width in pixels of the Gtk::TreeViewColumn, or -1 if no minimum width is set.    * Returns: The minimum width of the Gtk::TreeViewColumn. 
--- min_width=(min_width)
    Sets the minimum width of the Gtk::TreeViewColumn. If min_width is -1, then the minimum width is unset.
    * min_width: The minimum width of the column in pixels, or -1. 
    * Returns: min_width
--- set_min_width(min_width)
    Same as min_width=
    * min_width: The minimum width of the column in pixels, or -1. 
    * Returns: self

--- max_width
    Returns the maximum width in pixels of the Gtk::TreeViewColumn, or -1 if no maximum width is set.    * Returns : The maximum width of the Gtk::TreeViewColumn. 
--- max_width=(max_width)
    Sets the maximum width of the Gtk::TreeViewColumn. If max_width is -1, then the maximum width is unset. Note, the column can actually be wider than max width if it's the last column in a view. In this case, the column expands to fill any extra space.
    * max_width: The maximum width of the column in pixels, or -1. 
    * Returns: max_width
--- set_max_width(max_width)
    Same as max_width=.
    * max_width: The maximum width of the column in pixels, or -1. 
    * Returns: self

--- clicked
    Emits the "clicked" signal on the column. This method will only work if the Gtk::TreeViewColumn is clickable.
    * Returns: self

--- title
    Returns the title of the widget. This value should not be modified.
    * Returns : the title of the column. 
--- title=(title)
    Sets the title of the Gtk::TreeViewColumn. If a custom widget has been set, then this value is ignored.
    * title : The title of the Gtk::TreeViewColumn. 
    * Returns: title
--- set_title(title)
    Same as title=.
    * title : The title of the Gtk::TreeViewColumn. 
    * Returns: self

--- clickable?
    Returns true if the user can click on the header for the column.
    * Returns : true if user can click the column header. 
--- clickable=(clickable)
    Sets the header to be active if active is true. When the header is active, then it can take keyboard focus, and can be clicked.
    * clickable: true if the header is active. 
    * Returns: clickable
--- set_clickable
    Same as clickable=.
    * clickable: true if the header is active. 
    * Returns: self

--- widget
    Returns the Gtk::Widget in the button on the column header. If a custom widget has not been set then nil is returned.
    * Returns: The Gtk::Widget in the column header, or nil
--- widget=(widget)
    Sets the widget in the header to be widget. If widget is nil, then the header button is set with a Gtk::Label set to the title of the Gtk::TreeViewColumn.
    * widget: A child Gtk::Widget, or nil. 
    * Returns: widget
--- set_widget(widget)
    Same as widget=.
    * Returns: self

--- alignment
    Returns the current x alignment of tree_column. This value can range between 0.0 and 1.0.    * Returns: The current alignent of tree_column. 
--- alignment=(alignment)
    Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -- 0.0 for left, 0.5 for center, 1.0 for right.
    * xalign: The alignment, which is between [0.0 and 1.0] inclusive. 
    * Returns: alignment
--- set_alignment(alignment)
    Same as alignment=.
    * Returns: self

--- reorderable?
    Returns true if the Gtk::TreeViewColumn can be reordered by the user.
    * Returns : true if the Gtk::TreeViewColumn can be reordered by the user. 
--- reorderable=(reorderable)
    If reorderable is true, then the column can be reordered by the end user dragging the header.
    * reorderable: true, if the column can be reordered. 
    * Returns: reorderable
--- set_reorderable(reorderable)
    Same as reorderable=.
    * Returns: self

--- sort_column_id
    Gets the logical sort_column_id that the model sorts on when this column is selected for sorting. See Gtk::TreeViewColumn#sort_column_id=.
    * Returns: the current sort_column_id for this column, or -1 if this column can't be used for sorting. 
--- sort_column_id=(sort_column_id)
    Sets the logical sort_column_id that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable.
    * sort_column_id : The sort_column_id of the model to sort on
    * Returns: self
--- set_sort_column_id(sort_column_id)
    Same as sort_column_id=.
    * Returns: self

--- sort_indicator?
    Gets the value set by Gtk::TreeViewColumn#sort_indicator=.
    * Returns : whether the sort indicator arrow is displayed 
--- sort_indicator=(setting)
    Call this method with a setting of true to display an arrow in the header button indicating the column is sorted. Call Gtk::TreeViewColumn#sort_order= to change the direction of the arrow.
    * setting: true to display an indicator that the column is sorted 
    * Returns: setting
--- set_sort_indicator(setting)
    Same as sort_indicator=.
    * Returns: self

--- sort_order
    Gets the value set by Gtk::TreeViewColumn#sort_order=.
    * Returns: the ((<GtkSortType|Gtk#GtkSortType>)) the sort indicator is indicating 
--- sort_order=(order)
    Changes the appearance of the sort indicator. 
    This does not actually sort the model. Use Gtk::TreeViewColumn#sort_column_id= if you want automatic sorting support. This method is primarily for custom sorting behavior, and should be used in conjunction with Gtk::TreeSortable#sort_column= to do that. For custom models, the mechanism will vary. 
    The sort indicator changes direction to indicate normal sort or reverse sort. Note that you must have the sort indicator enabled to see anything when calling this function; see Gtk::TreeViewColumn#sort_indicator=.
    * order: ((<GtkSortType|Gtk#GtkSortType>)) that the sort indicator should indicate 
    * Returns: order
--- set_sort_order(order)
    Same as sort_order=.
    * Returns: self

--- cell_set_cell_data(model,iter, is_expander, is_expanded)
    Sets the cell renderer based on the tree_model and iter. That is, for every attribute mapping in the Gtk::TreeViewColumn, it will get a value from the set column on the iter, and use that value to set the attribute on the cell renderer. This is used primarily by the Gtk::TreeView.
    * tree_model: The GtkTreeModel to to get the cell renderers attributes from. 
    * iter: The Gtk::TreeIter to to get the cell renderer's attributes from. 
    * is_expander: true, if the row has children 
    * is_expanded: true, if the row has visible children 
    * Returns: self

--- cell_size(cell_area = nil)
    Obtains the width and height needed to render the column. This is used primarily by the Gtk::TreeView.
     * cell_area: An Gdk::Rectangle or nil
     * Returns: [cell_area, x_offset, y_offset, width, height]
       * cell_area: An Gdk::Rectangle or nil
       * x_offset: x offset of cell relative to cell_area, or nil
       * y_offset: y offset of cell relative to cell_area, or nil
       * width: width needed to render a cell, or nil 
       * height: height needed to render a cell, or nil

--- cell_is_visible?
    Returns true if any of the cells packed into the Gtk::TreeViewColumn are visible. For this to be meaningful, you must first initialize the cells with Gtk::TreeViewColumn#cell_set_cell_data.
    * Returns: true, if any of the cells packed into the Gtk::TreeViewColumn are currently visible 

--- cell_data_func=
    not yet
    * Returns: self

== constants
=== GtkTreeViewColumnSizing
The sizing method the column uses to determine its width. Please note that Gtk::TreeViewColumn::AUTOSIZE are inefficient for large views, and can make columns appear choppy. 

--- GROW_ONLY
    Columns only get bigger in reaction to changes in the model.
--- AUTOSIZE
    Columns resize to be the optimal size everytime the model changes.  
--- FIXED
    Columns are a fixed numbers of pixels wide.

== signals
--- clicked: self
     * self: Gtk::TreeViewColumn

== See Also
Gtk::TreeView, Gtk::TreeSelection, Gtk::TreeDnd, Gtk::TreeMode, Gtk::TreeSortable, Gtk::TreeModelSort, Gtk::ListStore, Gtk::TreeStore, Gtk::CellRenderer, Gtk::CellEditable, Gtk::CellRendererPixbuf, Gtk::CellRendererText, Gtk::CellRendererToggle 




ruby-gnome2-cvs メーリングリストの案内
Zurück zum Archiv-Index