gtktext.html
来自「最新gtk中文资料集」· HTML 代码 · 共 915 行 · 第 1/3 页
HTML
915 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>GtkText</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="GTK+ Reference Manual"><link rel="up" href="DeprecatedObjects.html" title="Deprecated"><link rel="prev" href="GtkProgress.html" title="GtkProgress"><link rel="next" href="GtkTooltips.html" title="GtkTooltips"><meta name="generator" content="GTK-Doc V1.9 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="gtk.html" title="Part I. GTK+ Overview"><link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference"><link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects"><link rel="chapter" href="ch01.html" title="Object Hierarchy"><link rel="chapter" href="ch02.html" title="Widget Gallery"><link rel="chapter" href="WindowWidgets.html" title="Windows"><link rel="chapter" href="DisplayWidgets.html" title="Display Widgets"><link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles"><link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry"><link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor"><link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets"><link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar"><link rel="chapter" href="Actions.html" title="Action-based menus and toolbars"><link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)"><link rel="chapter" href="LayoutContainers.html" title="Layout Containers"><link rel="chapter" href="Ornaments.html" title="Ornaments"><link rel="chapter" href="ScrollingWidgets.html" title="Scrolling"><link rel="chapter" href="Printing.html" title="Printing"><link rel="chapter" href="MiscObjects.html" title="Miscellaneous"><link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes"><link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding"><link rel="chapter" href="SpecialObjects.html" title="Special-purpose features"><link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents"><link rel="chapter" href="Builder.html" title="Interface builder"><link rel="chapter" href="DeprecatedObjects.html" title="Deprecated"><link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+"><link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist"><link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser"><link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction"><link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry"><link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView"><link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog"><link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton"><link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant"><link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser"><link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton"><link rel="chapter" href="gtk-migrating-GtkBuilder.html" title="Migrating from libglade to GtkBuilder"><link rel="chapter" href="gtk-migrating-tooltips.html" title="Migrating from GtkTooltips to GtkTooltip"><link rel="part" href="pt05.html" title="Part V. GTK+ Tools"><link rel="glossary" href="glossary.html" title="Glossary"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 2.2"><link rel="index" href="ix04.html" title="Index of new symbols in 2.4"><link rel="index" href="ix05.html" title="Index of new symbols in 2.6"><link rel="index" href="ix06.html" title="Index of new symbols in 2.8"><link rel="index" href="ix07.html" title="Index of new symbols in 2.10"><link rel="index" href="ix08.html" title="Index of new symbols in 2.12"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="GtkProgress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="DeprecatedObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GTK+ Reference Manual</th><td><a accesskey="n" href="GtkTooltips.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#id4580865" class="shortcut">Top</a>  |  <a href="#id4581526" class="shortcut">Description</a>  |  <a href="#id4581321" class="shortcut">Object Hierarchy</a>  |  <a href="#id4581375" class="shortcut">Implemented Interfaces</a>  |  <a href="#id4581412" class="shortcut">Properties</a>  |  <a href="#id4581497" class="shortcut">Signals</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="GtkText"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><a name="id4580865"></a><span class="refentrytitle">GtkText</span></h2><p>GtkText — A text widget</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include <gtk/gtk.h> <a class="link" href="GtkText.html#GtkText-struct">GtkText</a>; <a class="link" href="GtkText.html#GtkTextFont">GtkTextFont</a>; <a class="link" href="GtkText.html#GtkPropertyMark">GtkPropertyMark</a>;<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a class="link" href="GtkText.html#gtk-text-new">gtk_text_new</a> (<a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *hadj, <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *vadj);void <a class="link" href="GtkText.html#gtk-text-set-editable">gtk_text_set_editable</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> editable);void <a class="link" href="GtkText.html#gtk-text-set-word-wrap">gtk_text_set_word_wrap</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> word_wrap);void <a class="link" href="GtkText.html#gtk-text-set-line-wrap">gtk_text_set_line_wrap</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> line_wrap);void <a class="link" href="GtkText.html#gtk-text-set-adjustments">gtk_text_set_adjustments</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *hadj, <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *vadj);void <a class="link" href="GtkText.html#gtk-text-set-point">gtk_text_set_point</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> index);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> <a class="link" href="GtkText.html#gtk-text-get-point">gtk_text_get_point</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> <a class="link" href="GtkText.html#gtk-text-get-length">gtk_text_get_length</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text);void <a class="link" href="GtkText.html#gtk-text-freeze">gtk_text_freeze</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text);void <a class="link" href="GtkText.html#gtk-text-thaw">gtk_text_thaw</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text);void <a class="link" href="GtkText.html#gtk-text-insert">gtk_text_insert</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <ahref="/usr/share/gtk-doc/html/gdk/gdk-Fonts.html#GdkFont">GdkFont</a> *font, const <ahref="/usr/share/gtk-doc/html/gdk/gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *fore, const <ahref="/usr/share/gtk-doc/html/gdk/gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *back, const char *chars, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> length);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="GtkText.html#gtk-text-backward-delete">gtk_text_backward_delete</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> nchars);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="GtkText.html#gtk-text-forward-delete">gtk_text_forward_delete</a> (<a class="link" href="GtkText.html" title="GtkText">GtkText</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> nchars);#define <a class="link" href="GtkText.html#GTK-TEXT-INDEX:CAPS">GTK_TEXT_INDEX</a> (t, index)</pre></div><div class="refsect1" lang="en"><a name="id4581321"></a><h2>Object Hierarchy</h2><pre class="synopsis"> <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> +----<ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a> +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> +----<a class="link" href="GtkOldEditable.html" title="GtkOldEditable">GtkOldEditable</a> +----GtkText</pre></div><div class="refsect1" lang="en"><a name="id4581375"></a><h2>Implemented Interfaces</h2><p>GtkText implements AtkImplementorIface, <a class="link" href="gtk-gtkbuildable.html#GtkBuildable">GtkBuildable</a> and <a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a>.</p></div><div class="refsect1" lang="en"><a name="id4581412"></a><h2>Properties</h2><pre class="synopsis"> "<a class="link" href="GtkText.html#GtkText--hadjustment">hadjustment</a>" <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> : Read / Write "<a class="link" href="GtkText.html#GtkText--line-wrap">line-wrap</a>" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write "<a class="link" href="GtkText.html#GtkText--vadjustment">vadjustment</a>" <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> : Read / Write "<a class="link" href="GtkText.html#GtkText--word-wrap">word-wrap</a>" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre></div><div class="refsect1" lang="en"><a name="id4581497"></a><h2>Signals</h2><pre class="synopsis"> "<a class="link" href="GtkText.html#GtkText-set-scroll-adjustments">set-scroll-adjustments</a>" : Run Last</pre></div><div class="refsect1" lang="en"><a name="id4581526"></a><h2>Description</h2><p></p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a> is deprecated and unsupported. It is known to bebuggy. To use it, you must define the symbol <code class="literal">GTK_ENABLE_BROKEN</code>prior to including the GTK+ header files. Use <a class="link" href="GtkTextView.html" title="GtkTextView"><span class="type">GtkTextView</span></a> instead.</p></div><p>A <a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a> widget allows one to display any given text and manipulate itby deleting from one point to another, selecting a region, and variousother functions as outlined below. It is inherited from <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>.</p></div><div class="refsect1" lang="en"><a name="id4581596"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id4581607"></a><h3><a name="GtkText-struct"></a>GtkText</h3><a class="indexterm" name="id4581619"></a><pre class="programlisting">typedef struct _GtkText GtkText;</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">GtkText</code> is deprecated and should not be used in newly-written code.</p></div><p>Most of the <a class="link" href="GtkText.html#GtkText-struct"><span class="type">GtkText</span></a> struct members should not be accessed directly.Listed below are a few exceptions and how to use them.</p></div><hr><div class="refsect2" lang="en"><a name="id4581656"></a><h3><a name="GtkTextFont"></a>GtkTextFont</h3><a class="indexterm" name="id4581671"></a><pre class="programlisting">typedef struct _GtkTextFont GtkTextFont;</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">GtkTextFont</code> is deprecated and should not be used in newly-written code.</p></div><p>Internal <a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a> data type.</p></div><hr><div class="refsect2" lang="en"><a name="id4581710"></a><h3><a name="GtkPropertyMark"></a>GtkPropertyMark</h3><a class="indexterm" name="id4581726"></a><pre class="programlisting">typedef struct { /* Position in list. */ GList* property; /* Offset into that property. */ guint offset; /* Current index. */ guint index;} GtkPropertyMark;</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">GtkPropertyMark</code> is deprecated and should not be used in newly-written code.</p></div><p>Internal <a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a> data type. Should not be accessed directly.</p></div><hr><div class="refsect2" lang="en"><a name="id4581768"></a><h3><a name="gtk-text-new"></a>gtk_text_new ()</h3><a class="indexterm" name="id4581783"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_text_new (<a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *hadj, <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *vadj);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_text_new</code> is deprecated and should not be used in newly-written code.</p></div><p>Creates a new <a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a> widget, initialized with the given pointers to<span class="type">GtkAdjustments</span>. These pointers can be used to track the viewing positionof the <a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a> widget. Passing <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to either or both of them will makethe <a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a> create its own. You can set these later with the function<code class="function">gtk_text_set_adjustment()</code>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>hadj</code></em> :</span></p></td><td>horizontal adjustment.</td></tr>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?