Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gdaui_formatted_entry_new () |
gchar * | gdaui_formatted_entry_get_text () |
void | (*GdauiFormattedEntryInsertFunc) () |
void | gdaui_formatted_entry_set_insert_func () |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkEntry ╰── GdauiEntry ╰── GdauiFormattedEntry
GdauiFormattedEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.
GtkWidget * gdaui_formatted_entry_new (const gchar *format
,const gchar *mask
);
Creates a new GdauiFormattedEntry widget.
Characters in format
are of two types:
writeable: writeable characters which will be replaced with and underscore and where text will be entered
fixed: every other characters are fixed characters, where text cant' be edited, and will be displayed AS IS
Possible values for writeable characters are:
'0': digits
'9': digits excluded 0
'@': alpha
'^': alpha converted to upper case
'#': alphanumeric
'*': any char
if mask
is not NULL
, then it should only contains the follogin characters, which are used side by side with
format
's characters:
'_': the corresponding character in format
is actually used as a writable character
'-': the corresponding character in format
is actually used as a writable character, but
the character will be removed from gdaui_formatted_entry_get_text()
's result if it was not
filled by the user
' ': the corresponding character in format
will not be considered as a writable character
but as a non writable character
it is then interpreted in the following way: for a character C in format
, if the character at the same
position in mask
is the space character (' '), then C will not interpreted as a writable format
character as defined above. mask
does not be to have the same length as format
.
gchar *
gdaui_formatted_entry_get_text (GdauiFormattedEntry *entry
);
Get entry
's contents. This function is similar to gdaui_get_text()
except
that it optionnally uses the information contained in mask
when gdaui_formatted_entry_new()
was called to format the output differently.
void (*GdauiFormattedEntryInsertFunc) (GdauiFormattedEntry *entry
,gunichar insert_char
,gint virt_pos
,gpointer data
);
void gdaui_formatted_entry_set_insert_func (GdauiFormattedEntry *entry
,GdauiFormattedEntryInsertFunc insert_func
,gpointer data
);
Specifies that entry
should call insert_func
when the user wants to insert a char
which is anot allowed, to perform other actions
entry |
a GdauiFormattedEntry widget |
|
insert_func |
a GdauiFormattedEntryInsertFunc, or |
[nullable][scope notified] |
data |
a pointer which will be passed to |
[nullable] |