Add GtkTextViewClass to the docs

So that the existing information about draw_layer actually
ends up in the docs. While we are at it, document the other
vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=737952
This commit is contained in:
Matthias Clasen
2014-10-06 22:33:19 -04:00
parent 62da080bd0
commit ba63f95a4a
2 changed files with 57 additions and 35 deletions

View File

@ -3814,6 +3814,8 @@ gtk_text_tag_table_get_type
<FILE>gtktextview</FILE> <FILE>gtktextview</FILE>
<TITLE>GtkTextView</TITLE> <TITLE>GtkTextView</TITLE>
GtkTextView GtkTextView
GtkTextViewClass
GtkTextViewLayer
GtkTextWindowType GtkTextWindowType
GtkWrapMode GtkWrapMode
gtk_text_view_new gtk_text_view_new
@ -3831,7 +3833,7 @@ gtk_text_view_get_visible_rect
gtk_text_view_get_iter_location gtk_text_view_get_iter_location
gtk_text_view_get_cursor_locations gtk_text_view_get_cursor_locations
gtk_text_view_get_line_at_y gtk_text_view_get_line_at_y
gtk_text_view_get_line_yrange /gtk_text_view_get_line_yrange
gtk_text_view_get_iter_at_location gtk_text_view_get_iter_at_location
gtk_text_view_get_iter_at_position gtk_text_view_get_iter_at_position
gtk_text_view_buffer_to_window_coords gtk_text_view_buffer_to_window_coords

View File

@ -72,7 +72,8 @@ typedef enum
* @GTK_TEXT_VIEW_LAYER_BELOW: The layer rendered below the text (but above the background). * @GTK_TEXT_VIEW_LAYER_BELOW: The layer rendered below the text (but above the background).
* @GTK_TEXT_VIEW_LAYER_ABOVE: The layer rendered above the text. * @GTK_TEXT_VIEW_LAYER_ABOVE: The layer rendered above the text.
* *
* Used to reference the parts of #GtkTextView. * Used to reference the layers of #GtkTextView for the purpose of customized
* drawing with the ::draw_layer vfunc.
*/ */
typedef enum typedef enum
{ {
@ -96,52 +97,71 @@ struct _GtkTextView
{ {
GtkContainer parent_instance; GtkContainer parent_instance;
/*< private >*/
GtkTextViewPrivate *priv; GtkTextViewPrivate *priv;
}; };
/** /**
* GtkTextViewClass: * GtkTextViewClass:
* @parent_class: The object class structure needs to be the first * @parent_class: The object class structure needs to be the first
* @draw_layer: Draw layers below and above the text in the text window. * @populate_popup: The class handler for the #GtkTextView::populate-popup
* signal.
* @move_cursor: The class handler for the #GtkTextView::move-cursor
* keybinding signal.
* @set_anchor: The class handler for the #GtkTextView::set-anchor
* keybinding signal.
* @insert_at_cursor: The class handler for the #GtkTextView::insert-at-cursor
* keybinding signal.
* @delete_from_cursor: The class handler for the #GtkTextView::delete-from-cursor
* keybinding signal.
* @backspace: The class handler for the #GtkTextView::backspace
* keybinding signal.
* @cut_clipboard: The class handler for the #GtkTextView::cut-clipboard
* keybinding signal
* @copy_clipboard: The class handler for the #GtkTextview::copy-clipboard
* keybinding signal.
* @paste_clipboard: The class handler for the #GtkTextView::paste-clipboard
* keybinding signal.
* @toggle_overwrite: The class handler for the #GtkTextView::toggle-overwrite
* keybinding signal.
* @create_buffer: The create_buffer vfunc is called to create a #GtkTextBuffer
* for the text view. The default implementation is to just call
* gtk_text_buffer_new(). Since: 3.10
* @draw_layer: The draw_layer vfunc is called before and after the text
* view is drawing its own text. Applications can override this vfunc
* in a subclass to draw customized content underneath or above the
* text. Since: 3.14
*/ */
struct _GtkTextViewClass struct _GtkTextViewClass
{ {
GtkContainerClass parent_class; GtkContainerClass parent_class;
void (* populate_popup) (GtkTextView *text_view, /*< public */
GtkWidget *popup);
/* These are all RUN_ACTION signals for keybindings */ void (* populate_popup) (GtkTextView *text_view,
GtkWidget *popup);
void (* move_cursor) (GtkTextView *text_view,
GtkMovementStep step,
gint count,
gboolean extend_selection);
void (* set_anchor) (GtkTextView *text_view);
void (* insert_at_cursor) (GtkTextView *text_view,
const gchar *str);
void (* delete_from_cursor) (GtkTextView *text_view,
GtkDeleteType type,
gint count);
void (* backspace) (GtkTextView *text_view);
void (* cut_clipboard) (GtkTextView *text_view);
void (* copy_clipboard) (GtkTextView *text_view);
void (* paste_clipboard) (GtkTextView *text_view);
void (* toggle_overwrite) (GtkTextView *text_view);
GtkTextBuffer * (* create_buffer) (GtkTextView *text_view);
void (* draw_layer) (GtkTextView *text_view,
GtkTextViewLayer layer,
cairo_t *cr);
/* move insertion point */ /*< private >*/
void (* move_cursor) (GtkTextView *text_view,
GtkMovementStep step,
gint count,
gboolean extend_selection);
/* move the "anchor" (what Emacs calls the mark) to the cursor position */
void (* set_anchor) (GtkTextView *text_view);
/* Edits */
void (* insert_at_cursor) (GtkTextView *text_view,
const gchar *str);
void (* delete_from_cursor) (GtkTextView *text_view,
GtkDeleteType type,
gint count);
void (* backspace) (GtkTextView *text_view);
/* cut copy paste */
void (* cut_clipboard) (GtkTextView *text_view);
void (* copy_clipboard) (GtkTextView *text_view);
void (* paste_clipboard) (GtkTextView *text_view);
/* overwrite */
void (* toggle_overwrite) (GtkTextView *text_view);
GtkTextBuffer * (* create_buffer) (GtkTextView *text_view);
void (* draw_layer) (GtkTextView *text_view,
GtkTextViewLayer layer,
cairo_t *cr);
/* Padding for future expansion */ /* Padding for future expansion */
void (*_gtk_reserved1) (void); void (*_gtk_reserved1) (void);