?? gtkcellrenderer.sgml
字號:
<!-- ##### SECTION Title ##### -->GtkCellRenderer<!-- ##### SECTION Short_Description ##### -->An object for rendering a single cell on a #GdkDrawable<!-- ##### SECTION Long_Description ##### --><para>The #GtkCellRenderer is a base class of a set of objects used forrendering a cell to a #GdkDrawable. These objects are used primarily bythe #GtkTreeView widget, though they aren't tied to them in anyspecific way. It is worth noting that #GtkCellRenderer is not a#GtkWidget and cannot be treated as such.</para><para>The primary use of a #GtkCellRenderer is for drawing a certain graphicalelements on a #GdkDrawable. Typically, one cell renderer is used todraw many cells on the screen. To this extent, it isn't expected that aCellRenderer keep any permanent state around. Instead, any state is setjust prior to use using #GObject<!-- -->s property system. Then, thecell is measured using gtk_cell_renderer_get_size(). Finally, the cellis rendered in the correct location using gtk_cell_renderer_render().</para><para>There are a number of rules that must be followed when writing a new#GtkCellRenderer. First and formost, it's important that a certain setof properties will always yield a cell renderer of the same size,barring a #GtkStyle change. The #GtkCellRenderer also has a number ofgeneric properties that are expected to be honored by all children.</para><para>Beyond merely rendering a cell, cell renderers can optionally provide active user interface elements. A cell renderer can be <firstterm>activatable</firstterm> like #GtkCellRendererToggle, which toggles when it gets activated by a mouse click, or it can be <firstterm>editable</firstterm> like #GtkCellRendererText, which allows the user to edit the text using a #GtkEntry.To make a cell renderer activatable or editable, you have to implement the @activate or @start_editing virtual functions, respectively.</para><!-- ##### SECTION See_Also ##### --><para>#GtkCellRendererText,#GtkCellRendererPixbuf,#GtkCellRendererToggle</para><!-- ##### SECTION Stability_Level ##### --><!-- ##### ENUM GtkCellRendererState ##### --><para>Tells how a cell is to be rendererd.</para>@GTK_CELL_RENDERER_SELECTED: The cell is currently selected, andprobably has a selection colored background to render to.@GTK_CELL_RENDERER_PRELIT: The mouse is hovering over the cell.@GTK_CELL_RENDERER_INSENSITIVE: The cell is drawn in an insensitive manner@GTK_CELL_RENDERER_SORTED: The cell is in a sorted row@GTK_CELL_RENDERER_FOCUSED: <!-- ##### ENUM GtkCellRendererMode ##### --><para>Identifies how the user can interact with a particular cell.</para>@GTK_CELL_RENDERER_MODE_INERT: The cell is just for displayand cannot be interacted with. Note that this doesn't mean that eg. therow being drawn can't be selected -- just that a particular element ofit cannot be individually modified.@GTK_CELL_RENDERER_MODE_ACTIVATABLE: The cell can be clicked.@GTK_CELL_RENDERER_MODE_EDITABLE: The cell can be edited or otherwise modified.<!-- ##### STRUCT GtkCellRenderer ##### --><para></para><!-- ##### SIGNAL GtkCellRenderer::editing-canceled ##### --><para></para>@cellrenderer: the object which received the signal.<!-- ##### SIGNAL GtkCellRenderer::editing-started ##### --><para></para>@cellrenderer: the object which received the signal.@arg1: @arg2: <!-- ##### ARG GtkCellRenderer:cell-background ##### --><para></para><!-- ##### ARG GtkCellRenderer:cell-background-gdk ##### --><para></para><!-- ##### ARG GtkCellRenderer:cell-background-set ##### --><para></para><!-- ##### ARG GtkCellRenderer:height ##### --><para></para><!-- ##### ARG GtkCellRenderer:is-expanded ##### --><para></para><!-- ##### ARG GtkCellRenderer:is-expander ##### --><para></para><!-- ##### ARG GtkCellRenderer:mode ##### --><para></para><!-- ##### ARG GtkCellRenderer:sensitive ##### --><para></para><!-- ##### ARG GtkCellRenderer:visible ##### --><para></para><!-- ##### ARG GtkCellRenderer:width ##### --><para></para><!-- ##### ARG GtkCellRenderer:xalign ##### --><para></para><!-- ##### ARG GtkCellRenderer:xpad ##### --><para></para><!-- ##### ARG GtkCellRenderer:yalign ##### --><para></para><!-- ##### ARG GtkCellRenderer:ypad ##### --><para></para><!-- ##### FUNCTION gtk_cell_renderer_get_size ##### --><para></para>@cell: @widget: @cell_area: @x_offset: @y_offset: @width: @height: <!-- ##### FUNCTION gtk_cell_renderer_render ##### --><para></para>@cell: @window: @widget: @background_area: @cell_area: @expose_area: @flags: <!-- ##### FUNCTION gtk_cell_renderer_activate ##### --><para></para>@cell: @event: @widget: @path: @background_area: @cell_area: @flags: @Returns: <!-- ##### FUNCTION gtk_cell_renderer_start_editing ##### --><para></para>@cell: @event: @widget: @path: @background_area: @cell_area: @flags: @Returns: <!-- ##### FUNCTION gtk_cell_renderer_editing_canceled ##### --><para></para>@cell: <!-- ##### FUNCTION gtk_cell_renderer_stop_editing ##### --><para></para>@cell: @canceled: <!-- ##### FUNCTION gtk_cell_renderer_get_fixed_size ##### --><para></para>@cell: @width: @height: <!-- ##### FUNCTION gtk_cell_renderer_set_fixed_size ##### --><para></para>@cell: @width: @height:
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -