A couple of questions regarding gtkcellrenderertext
- From: Brian Cameron <Brian Cameron Sun COM>
- To: jrb redhat com, gtk-devel-list gnome org
- Subject: A couple of questions regarding gtkcellrenderertext
- Date: Fri, 27 Jul 2001 17:52:48 +0100 (BST)
Gtk-Experts:
A couple of questions regarding gtkcellrenderertext:
The function gtk_cell_renderer_text_render() calls get_layout() which
creates and returns a PangoLayout which is then rendered on screen.
The PangoLayout is then unref'ed. This means that to access the
textcell's associated PangoLayout,
The ATK representation of a cell contains a copy of the GtkCellRendererText
and tries to create the PangoLayout in the same way as the get_layout()
function does. Basically I just copied the logic from get_layout() into
the AtkText functions that need to access the PangoLayout for the text
cell.
How can I use functions on this PangoLayout such as
pango_layout_line_x_to_index() without also rendering it on screen? It
seems that this function always returns 0. I assume because my copy
of the renderer is actually not being renderered to the screen?
Basically working with the PangoLayout in GtkTreeView seems to be
challanging because the PangoLayout isn't cached for every cell.
A second question is that the PangoLayout for a textcell as created by
get_layout() seems to set the attribute properties over the entire range.
The code is something like this:
attr->start_index = 0;
attr->end_index = G_MAXINT;
How can attributes then be set over single characters. It seems that the
treestoretest GTK test program has attributes. The cells in the first
column have a red coloured single character.
Am I missing something?
Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]