#include <entry.h>
Public Member Functions | |
virtual | ~Entry () |
ClutterEntry * | gobj () |
Provides access to the underlying C GObject. | |
const ClutterEntry * | gobj () const |
Provides access to the underlying C GObject. | |
ClutterEntry * | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
void | set_text (const Glib::ustring &text) |
Sets text as the text to be displayed by entry. | |
Glib::ustring | set_text () const |
Retrieves the text displayed by entry. | |
void | set_font_name (const Glib::ustring &font_name) |
Sets font_name as the font used by entry. | |
Glib::ustring | get_font_name () const |
Retrieves the font used by entry. | |
Color | get_color () const |
Retrieves the color of entry. | |
void | set_color (const Color &color) |
Sets the color of entry. | |
Glib::RefPtr< Pango::Layout > | get_layout () |
Gets the Pango::Layout used to display the entry. | |
Glib::RefPtr< const Pango::Layout > | get_layout () const |
Gets the Pango::Layout used to display the entry. | |
Pango::Alignment | get_alignment () const |
Return value: The entrys Pango::Alignment. | |
void | set_alignment (Pango::Alignment wrap_mode) |
Sets text alignment of the entry. | |
int | get_cursor_position () const |
void | set_cursor_position (int position) |
void | insert (gunichar wc) |
Insert a character to the right of the current position of the cursor, and updates the position of the cursor. | |
void | insert (const Glib::ustring &text, gssize position) |
Insert text at a specifc position. | |
void | delete_chars (guint len) |
Characters are removed from before the current postion of the cursor. | |
void | delete_text (gssize start_pos, gssize end_pos) |
Deletes a sequence of characters. | |
void | set_visible_cursor (bool visible) |
Sets the visibility of the input cursor. | |
bool | get_visible_cursor () const |
Return value: whether the input cursor is visible. | |
void | set_visibility (bool visible) |
Sets whether the contents of the entry are visible or not. | |
bool | get_visibility () const |
Return value: true if the contents of the entry are displayed as plaintext. | |
void | set_invisible_char (gunichar wc) |
Sets the character to use in place of the actual text when set_visibility() has been called to set text visibility to false . | |
gunichar | get_invisible_char () const |
Return value: a Unicode character. | |
int | get_max_length () const |
Gets the maximum length of text that can be set into entry. | |
void | set_max_length (int max_length) |
Sets the maximum allowed length of the contents of the actor. | |
void | handle_key_event (KeyEvent *kev) |
This function will handle a Clutter::KeyEvent, like those returned in a key-press/release-event, and will translate it for the entry. | |
Glib::SignalProxy0< void > | signal_text_changed () |
Glib::SignalProxy1< void, ClutterGeometry * > | signal_cursor_event () |
Glib::SignalProxy0< void > | signal_activate () |
Static Public Member Functions | |
static Glib::RefPtr< Entry > | create () |
static Glib::RefPtr< Entry > | create (const Glib::ustring &font_name, const Glib::ustring &text) |
static Glib::RefPtr< Entry > | create (const Glib::ustring &font_name, const Glib::ustring &text, const Color &color) |
Protected Member Functions | |
Entry () | |
Entry (const Glib::ustring &font_name, const Glib::ustring &text) | |
Entry (const Glib::ustring &font_name, const Glib::ustring &text, const Color &color) | |
virtual void | paint_cursor_vfunc () |
virtual void | on_text_changed () |
virtual void | on_cursor_event (ClutterGeometry *geometry) |
virtual void | on_activate () |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Clutter::Entry > | wrap (ClutterEntry *object, bool take_copy=false) |
A Glib::wrap() method for this object. |
virtual Clutter::Entry::~Entry | ( | ) | [virtual] |
Clutter::Entry::Entry | ( | ) | [protected] |
Clutter::Entry::Entry | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text | |||
) | [explicit, protected] |
Clutter::Entry::Entry | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text, | |||
const Color & | color | |||
) | [explicit, protected] |
static Glib::RefPtr<Entry> Clutter::Entry::create | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text, | |||
const Color & | color | |||
) | [static] |
static Glib::RefPtr<Entry> Clutter::Entry::create | ( | const Glib::ustring & | font_name, | |
const Glib::ustring & | text | |||
) | [static] |
static Glib::RefPtr<Entry> Clutter::Entry::create | ( | ) | [static] |
void Clutter::Entry::delete_chars | ( | guint | len | ) |
Characters are removed from before the current postion of the cursor.
Since: 0.4
len | The number of characters to remove. |
void Clutter::Entry::delete_text | ( | gssize | start_pos, | |
gssize | end_pos | |||
) |
Deletes a sequence of characters.
The characters that are deleted are those characters at positions from start_pos up to, but not including, end_pos. If end_pos is negative, then the characters deleted will be those characters from start_pos to the end of the text.
Since: 0.4
start_pos | The starting position. | |
end_pos | The end position. |
Pango::Alignment Clutter::Entry::get_alignment | ( | ) | const |
Return value: The entrys Pango::Alignment.
Color Clutter::Entry::get_color | ( | ) | const |
int Clutter::Entry::get_cursor_position | ( | ) | const |
Glib::ustring Clutter::Entry::get_font_name | ( | ) | const |
Retrieves the font used by entry.
gunichar Clutter::Entry::get_invisible_char | ( | ) | const |
Return value: a Unicode character.
Glib::RefPtr<const Pango::Layout> Clutter::Entry::get_layout | ( | ) | const |
Gets the Pango::Layout used to display the entry.
The layout is useful to e.g. convert text positions to pixel positions. The returned layout is owned by the entry so need not be freed by the caller.
Glib::RefPtr<Pango::Layout> Clutter::Entry::get_layout | ( | ) |
Gets the Pango::Layout used to display the entry.
The layout is useful to e.g. convert text positions to pixel positions. The returned layout is owned by the entry so need not be freed by the caller.
int Clutter::Entry::get_max_length | ( | ) | const |
Gets the maximum length of text that can be set into entry.
See set_max_length().
bool Clutter::Entry::get_visibility | ( | ) | const |
Return value: true
if the contents of the entry are displayed as plaintext.
true
if the contents of the entry are displayed as plaintext.bool Clutter::Entry::get_visible_cursor | ( | ) | const |
Return value: whether the input cursor is visible.
const ClutterEntry* Clutter::Entry::gobj | ( | ) | const [inline] |
ClutterEntry* Clutter::Entry::gobj | ( | ) | [inline] |
ClutterEntry* Clutter::Entry::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented from Clutter::Actor.
void Clutter::Entry::handle_key_event | ( | KeyEvent * | kev | ) |
This function will handle a Clutter::KeyEvent, like those returned in a key-press/release-event, and will translate it for the entry.
This includes non-alphanumeric keys, such as the arrows keys, which will move the input cursor. You should use this function inside a handler for the ClutterStage::key-press-event or ClutterStage::key-release-event.
Since: 0.4
kev | A Clutter::KeyEvent. |
void Clutter::Entry::insert | ( | const Glib::ustring & | text, | |
gssize | position | |||
) |
Insert text at a specifc position.
A value of 0 indicates that the text will be inserted before the first character in the entrys text, and a value of -1 indicates that the text will be inserted after the last character in the entrys text.
Since: 0.4
text | The text to insert. | |
position | The position at which to insert the text. |
void Clutter::Entry::insert | ( | gunichar | wc | ) |
Insert a character to the right of the current position of the cursor, and updates the position of the cursor.
Since: 0.4
wc | A Unicode character. |
virtual void Clutter::Entry::on_activate | ( | ) | [protected, virtual] |
virtual void Clutter::Entry::on_cursor_event | ( | ClutterGeometry * | geometry | ) | [protected, virtual] |
virtual void Clutter::Entry::on_text_changed | ( | ) | [protected, virtual] |
virtual void Clutter::Entry::paint_cursor_vfunc | ( | ) | [protected, virtual] |
void Clutter::Entry::set_alignment | ( | Pango::Alignment | wrap_mode | ) |
Sets text alignment of the entry.
Since: 0.4
alignment | A Pango::Alignment. |
void Clutter::Entry::set_color | ( | const Color & | color | ) |
void Clutter::Entry::set_cursor_position | ( | int | position | ) |
void Clutter::Entry::set_font_name | ( | const Glib::ustring & | font_name | ) |
Sets font_name as the font used by entry.
font_name must be a string containing the font name and its size, similarly to what you would feed to the pango_font_description_from_string() function.
Since: 0.4
font_name | A font name and size, or 0 for the default font. |
void Clutter::Entry::set_invisible_char | ( | gunichar | wc | ) |
Sets the character to use in place of the actual text when set_visibility() has been called to set text visibility to false
.
i.e. this is the character used in "password mode" to show the user how many characters have been typed. The default invisible char is an asterisk ('*'). If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.
Since: 0.4
wc | A Unicode character. |
void Clutter::Entry::set_max_length | ( | int | max_length | ) |
Sets the maximum allowed length of the contents of the actor.
If the current contents are longer than the given length, then they will be truncated to fit.
Since: 0.4
max | The maximum number of characters allowed in the entry, or -1 to disable. |
Glib::ustring Clutter::Entry::set_text | ( | ) | const |
Retrieves the text displayed by entry.
void Clutter::Entry::set_text | ( | const Glib::ustring & | text | ) |
Sets text as the text to be displayed by entry.
The ClutterEntry::text-changed signal is emitted.
Since: 0.4
text | The text to be displayed. |
void Clutter::Entry::set_visibility | ( | bool | visible | ) |
Sets whether the contents of the entry are visible or not.
When visibility is set to false
, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere.
The default invisible char is the asterisk '*', but it can be changed with set_invisible_char().
Since: 0.4
visible | true if the contents of the entry are displayed as plaintext. |
void Clutter::Entry::set_visible_cursor | ( | bool | visible | ) |
Sets the visibility of the input cursor.
Since: 0.4
visible | Whether the input cursor should be visible. |
Glib::SignalProxy0< void > Clutter::Entry::signal_activate | ( | ) |
void on_my_activate()
Glib::SignalProxy1< void,ClutterGeometry* > Clutter::Entry::signal_cursor_event | ( | ) |
void on_my_cursor_event(ClutterGeometry* geometry)
Glib::SignalProxy0< void > Clutter::Entry::signal_text_changed | ( | ) |
void on_my_text_changed()
Glib::RefPtr< Clutter::Entry > wrap | ( | ClutterEntry * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |