ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 18日 (火) 03:37:36 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -82,23 +82,10 @@ Cell renderers are packed into tree view columns similar to how you add widgets into horizontal boxes. However, for this you use Gtk::TreeViewColumn#pack_start and Gtk::TreeViewColumn#pack_end respectively. Each tree view column can contain one or more cell renderers, which are used to render the data. For example, in a file browser, the image column would be rendered with the Gtk::CellRendererPixbuf and the file name with Gtk::CellRendererText. ---- pack_start(cell, expand) +Later when we learn about some additional features, that help us manage cell rendering, we will look at the program which implements multiple cell renderers per column. At this point I would advise you not pay too much attention to the multi-item columns. Please just remember that a simplistic view of renderers and columns as a "one to one" (1:1) proposition is not the whole story, and rest assured, that the promise to revisit this topic when the time is right will be kept. - 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 - - +The primary use of a Gtk::CellRenderer is for drawing a certain graphical elements on a Gdk::Drawable. Typically, one cell renderer is used to draw many cells on the screen (the above advice not to think about multi-item columns was offered precisely because here do not describe such "multi-columns"). Each cell renderer is responsible for rendering a column of cells, one for every row in the tree view. It begins with the first row, rendering its cells and then proceeding to the next row down until all that was requested or the entire column is completed. Or to put it differently, a cell renderer does not render just one single cell, but is responsible for rendering part or whole of a tree view column for each single row. It basically starts in the first row and renders its part of the column there. Then it proceeds to the next row and renders its part of the column there again. And so on. -The primary use of a Gtk::CellRenderer is for drawing a certain graphical elements on a Gdk::Drawable. Typically, one cell renderer is used to draw many cells on the screen. Each cell renderer is responsible for rendering a column of cells, one for every row in the tree view. It begins with the first row, rendering its cells and then proceeding to the next row down until all that was requested or the entire column is completed. Or to put it differently, a cell renderer does not render just one single cell, but is responsible for rendering part or whole of a tree view column for each single row. It basically starts in the first row and renders its part of the column there. Then it proceeds to the next row and renders its part of the column there again. And so on. ####################################### # -- ig: append the next extension here