Top |
gchar * | description | Read / Write |
gint | max-length | Read / Write |
gint | max-length-bytes | Read / Write |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkTextView ╰── GtkDataTextView
GtkDataTextView implements AtkImplementorIface, GtkBuildable and GtkScrollable.
GtkDataTextView provides additional properties:
“description” - no functionality, a place for private information that cannot be put anywhere else
“max-length” - set the maximum character length for the contents of the widget.
“max-length-bytes” - set the maximum byte length for the contents of the widget.
The main reason for this widget is to provide a length limit for text contents, required by SQL database systems. There is always a limit, no matter what you do.
Some database systems may handle character length of UTF-8 strings correctly, others may not. Choose the appropriate limit for your system, characters or bytes.
Note that setting a byte length limit > 0 on a datatextview
may slow down text insertions. The byte length limit is
imposed upon gtk_text_buffer_get_text()
including invisible
content. See gtk_text_buffer_get_text()
for details.
GtkDataTextView *
gtk_data_text_view_new (void
);
Creates a new GtkDataTextView Widget.
Since: 3.0.6
const gchar *
gtk_data_text_view_get_description (GtkDataTextView *data_text_view
);
Retrieves the GtkDataTextView description.
a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.
Since: 3.0.6
void gtk_data_text_view_set_description (GtkDataTextView *data_text_view
,const gchar *description
);
Sets the GtkDataTextView description.
Since: 3.0.6
gint
gtk_data_text_view_get_max_length (GtkDataTextView *data_text_view
);
Retrieves the maximum character length for the contents of GtkDataTextView.
Since: 3.0.6
void gtk_data_text_view_set_max_length (GtkDataTextView *data_text_view
,gint max_length
);
Sets the maximum character length for the contents of the GtkDataTextView. Existing content will not be truncted.
Since: 3.0.6
gint
gtk_data_text_view_get_max_length_bytes
(GtkDataTextView *data_text_view
);
Retrieves the maximum byte length for the contents of GtkDataTextView data_format.
Since: 3.0.6
void gtk_data_text_view_set_max_length_bytes (GtkDataTextView *data_text_view
,gint max_length_bytes
);
Sets the maximum byte length for the contents of the GtkDataTextView. Existing content will not be truncted.
Since: 3.0.6
“description”
property“description” gchar *
Description of the GtkDataTextView, no functionality, a place for private information that cannot be put anywhere else.
Flags: Read / Write
Default value: ""
Since: 3.0.6
“max-length”
property“max-length” gint
Set the maximum length in characters for the GtkDataTextView. For details see gtk_data_text_view_set_max_length.
Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled.
Flags: Read / Write
Allowed values: [0,1073741823]
Default value: 0
Since: 3.0.6
“max-length-bytes”
property“max-length-bytes” gint
Set the maximum length in bytes for the GtkDataTextView. For details see gtk_data_text_view_set_max_length_bytes.
Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled.
Flags: Read / Write
Allowed values: [0,1073741823]
Default value: 0
Since: 3.0.6