Re: gtk_ctree_node_get_row_style()



On Sat, Oct 17, 1998 at 11:12:54PM +0200, Tim Janik wrote:

> > Like row fore/background colors, row and cell styles can't be changed out
> > of gtkrc. Only the ctree style can be changed.
> 
> we could feature column styles for clist from the rc files,
> currently widgets retrive their styles via
> 
> GtkStyle* gtk_rc_get_style              (GtkWidget   *widget);
> 
> which actually just needs the widget pointer to build the style path out of
> the widgets and its parents names or classes, e.g.
> MyWindow.GtkHBox.MyCList or GtkWindow.GtkHBox.GtkCList.
> we could provide an additional function
> 
> GtkStyle* gtk_rc_get_sub_style          (GtkWidget   *widget,
>                                          const gchar *sub);
> that could be used as
>   for (i = 0; i < clist->columns; i++)
>   {
>     gchar buffer[32];
>     sprintf (buffer, "column%u", i);
>     style = gtk_rc_get_sub_style (GTK_WIDGET (clist), buffer);
>   }
> and would produce (and try to match) widget paths like
> MyWindow.GtkHBox.MyCList:column1 or GtkWindow.GtkHBox.GtkCList:column2.
> this would of course only work for columns and not be usefull for rows...
> 
> so lars, do you need gtk_rc_get_sub_style() ? ;)

Mmmh. There are no column styles yet. Does somebody needs them ? ;)
If you really would provide gtk_rc_get_sub_style, I think it would be
possible to change cell and row styles too. Then we could add gchar *name
fields to row and cell structs and write some functions like
gtk_clist_set_row_name.
Unfortunately this would enlarge GtkCell and GtkCListRow by sizeof(gchar *).

bye,
  Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]