![]() |
![]() |
![]() |
GtkExtra Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#include <gtkextra.h> GtkDataTextView; GtkDataTextView * gtk_data_text_view_new (void); const gchar * gtk_data_text_view_get_description (GtkDataTextView *data_text_view); gint gtk_data_text_view_get_max_length (GtkDataTextView *data_text_view); gint gtk_data_text_view_get_max_length_bytes (GtkDataTextView *data_text_view); void gtk_data_text_view_set_description (GtkDataTextView *data_text_view, const gchar *description); void gtk_data_text_view_set_max_length (GtkDataTextView *data_text_view, gint max_length); void gtk_data_text_view_set_max_length_bytes (GtkDataTextView *data_text_view, gint max_length_bytes);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkTextView +----GtkDataTextView
"description" gchar* : Read / Write "max-length" gint : Read / Write "max-length-bytes" gint : Read / Write
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.
typedef struct _GtkDataTextView GtkDataTextView;
The GtkDataTextView struct contains only private data. It should only be accessed through the functions described below.
GtkDataTextView * gtk_data_text_view_new (void);
Creates a new GtkDataTextView Widget.
Returns : |
the new GtkDataTextView Widget |
Since 3.0.6
const gchar * gtk_data_text_view_get_description (GtkDataTextView *data_text_view);
Retrieves the GtkDataTextView description.
|
a GtkDataTextView |
Returns : |
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
gint gtk_data_text_view_get_max_length (GtkDataTextView *data_text_view);
Retrieves the maximum character length for the contents of GtkDataTextView.
|
a GtkDataTextView |
Returns : |
maximum byte length or 0. |
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.
|
a GtkDataTextView |
Returns : |
maximum byte length or 0. |
Since 3.0.6
void gtk_data_text_view_set_description (GtkDataTextView *data_text_view, const gchar *description);
Sets the GtkDataTextView description.
|
a GtkDataTextView |
|
the description or NULL |
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.
|
a GtkDataTextView |
|
maximum character length or 0 |
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.
|
a GtkDataTextView |
|
maximum byte length or 0 |
Since 3.0.6
"description"
property"description" gchar* : Read / Write
Description of the GtkDataTextView, no functionality, a place for private information that cannot be put anywhere else.
Default value: ""
Since 3.0.6
"max-length"
property"max-length" gint : Read / Write
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.
Allowed values: [0,1073741823]
Default value: 0
Since 3.0.6
"max-length-bytes"
property"max-length-bytes" gint : Read / Write
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.
Allowed values: [0,1073741823]
Default value: 0
Since 3.0.6