gtk.CellView — a widget displaying a single row of a gtk.TreeModel
(new in PyGTK 2.6).
class gtk.CellView(gtk.Widget, gtk.CellLayout): |
Functionsdef gtk.cell_view_new_with_text(
text
)def gtk.cell_view_new_with_markup(
markup
)def gtk.cell_view_new_with_pixbuf(
pixbuf
)
|
This widget is available in PyGTK 2.6 and above.
The gtk.CellView
is a
widget that displays one row of a gtk.TreeModel
. gtk.CellView
implements the gtk.CellLayout
interface that provides for the addition and management of gtk.CellRenderer
objects.
gtk.CellView()
Returns : | a new gtk.CellView |
This constructor is available in PyGTK 2.6 and above.
Creates a new gtk.CellView
widget.
def get_model()
Returns : | a gtk.TreeModel
used or None .
|
This method is available in PyGTK 2.16 and above.
The get_model
() method returns the model for cell_view.
If no model is used None
is returned.
def set_model(model
)
| a gtk.TreeModel or None |
This method is available in PyGTK 2.6 and above.
The set_model
() method sets the gtk.TreeModel
used by the cell view to that specified by model
. If
model
is None
the cell view's
model will be unset.
def set_displayed_row(path
)
| a tree path or None to unset
the row |
This method is available in PyGTK 2.6 and above.
The set_displayed_row
() method sets the
row of the model that is currently displayed to the path specified by
path
. If path
is
None
the display row will be unset, and the contents of
the cell view "stick" at their last value. This is not normally a desired
result, but may be a needed intermediate state if say, the model for the
cell view becomes temporarily empty.
def get_displayed_row()
Returns : | the path of the currently displayed row in the cell view's model |
This method is available in PyGTK 2.6 and above.
The get_displayed_row
() method returns
the path of the currently displayed row as set by the set-displayed_row
()
method.
def get_size_of_row(path
)
| the path of a row |
Returns : | a gtk.Requisition
containing the required size data |
This method is available in PyGTK 2.6 and above.
The get_size_of_row
() method returns a
gtk.Requisition
containing the size required for displaying the row with the tree path
specified by path
.
def set_background_color(color
)
|
This method is available in PyGTK 2.6 and above.
The set_background_color
() method sets
the background color of the cell view to the gtk.gdk.Color
specified by color
.
def get_cell_renderers()
Returns : | a list of the gtk.CellRenderer
objects of the cell view. |
This method is available in PyGTK 2.6 and above.
This method is deprecated since PyGTK 2.22 and should not be used in newly-written code. Use "gtk.CellLayout.get_cells()" instead.
The get_cell_renderers
() method returns
a list containing the gtk.CellRenderer
objects used by the cell view.
def gtk.cell_view_new_with_text(text
)
| a string |
Returns : | a new gtk.CellView |
This function is available in PyGTK 2.6 and above.
The gtk.cell_view_new_with_text
() function
creates a new gtk.CellView
with
a gtk.CellRendererText
displaying the string specified by text
.
def gtk.cell_view_new_with_markup(markup
)
| a string containing Pango markup to be displayed. |
Returns : | a new gtk.CellView |
This function is available in PyGTK 2.6 and above.
The gtk.cell_view_new_with_markup
()
function creates a new gtk.CellView
with
a gtk.CellRendererText
displaying the Pango markup specified by
markup
.
def gtk.cell_view_new_with_pixbuf(pixbuf
)
| a gtk.gdk.Pixbuf |
Returns : | a new gtk.CellView |
This function is available in PyGTK 2.6 and above.
The gtk.cell_view_new_with_pixbuf
()
function creates a new gtk.CellView
with
a gtk.CellRendererPixbuf
displaying the gtk.gdk.Pixbuf
specified by pixbuf
.