Clutter::Entry Class Reference

#include <entry.h>

Inheritance diagram for Clutter::Entry:

Inheritance graph
[legend]

List of all members.

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 get_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 entry's Pango::Alignment.
void set_alignment (Pango::Alignment wrap_mode)
 Sets text alignment of the entry.
int get_cursor_position () const
 Gets the position, in characters, of the cursor in entry.
void set_cursor_position (int position)
 Sets the position of the cursor.
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 ()
 
Prototype:
void on_my_text_changed()

Glib::SignalProxy1< void,
const Geometry & > 
signal_cursor_event ()
 
Prototype:
void on_my_cursor_event(const Geometry& geometry)

Glib::SignalProxy0< void > signal_activate ()
 
Prototype:
void on_my_activate()

Glib::PropertyProxy
< Pango::Alignment > 
property_alignment ()
 The preferred alignment for the string.
Glib::PropertyProxy_ReadOnly
< Pango::Alignment > 
property_alignment () const
 The preferred alignment for the string.
Glib::PropertyProxy< Colorproperty_color ()
 Font Colour.
Glib::PropertyProxy_ReadOnly
< Color
property_color () const
 Font Colour.
Glib::PropertyProxy< bool > property_cursor_visible ()
 Whether the input cursor is visible.
Glib::PropertyProxy_ReadOnly
< bool > 
property_cursor_visible () const
 Whether the input cursor is visible.
Glib::PropertyProxy< unsigned int > property_entry_padding ()
 The padding space between the text and the left and right borders.
Glib::PropertyProxy_ReadOnly
< unsigned int > 
property_entry_padding () const
 The padding space between the text and the left and right borders.
Glib::PropertyProxy
< Glib::ustring > 
property_font_name ()
 Pango font description.
Glib::PropertyProxy_ReadOnly
< Glib::ustring > 
property_font_name () const
 Pango font description.
Glib::PropertyProxy< int > property_max_length ()
 The maximum length of the entry text.
Glib::PropertyProxy_ReadOnly< int > property_max_length () const
 The maximum length of the entry text.
Glib::PropertyProxy< int > property_position ()
 The cursor position.
Glib::PropertyProxy_ReadOnly< int > property_position () const
 The cursor position.
Glib::PropertyProxy
< Glib::ustring > 
property_text ()
 Text to render.
Glib::PropertyProxy_ReadOnly
< Glib::ustring > 
property_text () const
 Text to render.
Glib::PropertyProxy< bool > property_text_visible ()
 Whether the text is visible in plain form.
Glib::PropertyProxy_ReadOnly
< bool > 
property_text_visible () const
 Whether the text is visible in plain form.
Glib::PropertyProxy< double > property_x_align ()
 The horizontal alignment to be used for the text.
Glib::PropertyProxy_ReadOnly
< double > 
property_x_align () const
 The horizontal alignment to be used for the text.

Static Public Member Functions

static Glib::RefPtr< Entrycreate ()
static Glib::RefPtr< Entrycreate (const Glib::ustring &font_name, const Glib::ustring &text)
static Glib::RefPtr< Entrycreate (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 (const Geometry &geometry)
virtual void on_activate ()

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Clutter::Entrywrap (ClutterEntry *object, bool take_copy=false)
 A Glib::wrap() method for this object.


Constructor & Destructor Documentation

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]


Member Function Documentation

ClutterEntry* Clutter::Entry::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

const ClutterEntry* Clutter::Entry::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

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.

static Glib::RefPtr<Entry> Clutter::Entry::create (  )  [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 ( const Glib::ustring &  font_name,
const Glib::ustring &  text,
const Color color 
) [static]

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

Parameters:
text The text to be displayed.

Glib::ustring Clutter::Entry::get_text (  )  const

Retrieves the text displayed by entry.

Returns:
The text of the entry. The returned string is owned by Clutter::Entry and should not be modified or freed.
Since: 0.4.

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

Parameters:
font_name A font name and size, or 0 for the default font.

Glib::ustring Clutter::Entry::get_font_name (  )  const

Retrieves the font used by entry.

Returns:
A string containing the font name, in a format understandable by pango_font_description_from_string(). The string is owned by Clutter::Entry and should not be modified or freed.
Since: 0.4.

Color Clutter::Entry::get_color (  )  const

Retrieves the color of entry.

Since: 0.4

Parameters:
color Return location for a Clutter::Color.

void Clutter::Entry::set_color ( const Color color  ) 

Sets the color of entry.

Since: 0.4

Parameters:
color A Clutter::Color.

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.

Returns:
The Pango::Layout for this entry
Since: 0.4.

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.

Returns:
The Pango::Layout for this entry
Since: 0.4.

Pango::Alignment Clutter::Entry::get_alignment (  )  const

Return value: The entry's Pango::Alignment.

Returns:
The entry's Pango::Alignment
Since 0.4.

void Clutter::Entry::set_alignment ( Pango::Alignment  wrap_mode  ) 

Sets text alignment of the entry.

Since: 0.4

Parameters:
alignment A Pango::Alignment.

int Clutter::Entry::get_cursor_position (  )  const

Gets the position, in characters, of the cursor in entry.

Returns:
The position of the cursor.
Since: 0.6.

void Clutter::Entry::set_cursor_position ( int  position  ) 

Sets the position of the cursor.

The position must be less than or equal to the number of characters in the entry. A value of -1 indicates that the position should be set after the last character in the entry. Note that this position is in characters, not in bytes.

Since: 0.6

Parameters:
position The position of the cursor.

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

Parameters:
wc A Unicode character.

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 entry's text, and a value of -1 indicates that the text will be inserted after the last character in the entry's text.

Since: 0.4

Parameters:
text The text to insert.
position The position at which to insert the text.

void Clutter::Entry::delete_chars ( guint  len  ) 

Characters are removed from before the current postion of the cursor.

Since: 0.4

Parameters:
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

Parameters:
start_pos The starting position.
end_pos The end position.

void Clutter::Entry::set_visible_cursor ( bool  visible  ) 

Sets the visibility of the input cursor.

Since: 0.4

Parameters:
visible Whether the input cursor should be visible.

bool Clutter::Entry::get_visible_cursor (  )  const

Return value: whether the input cursor is visible.

Returns:
Whether the input cursor is visible
Since: 0.4.

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

Parameters:
visible true if the contents of the entry are displayed as plaintext.

bool Clutter::Entry::get_visibility (  )  const

Return value: true if the contents of the entry are displayed as plaintext.

Returns:
true if the contents of the entry are displayed as plaintext.
Since: 0.4.

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

Parameters:
wc A Unicode character.

gunichar Clutter::Entry::get_invisible_char (  )  const

Return value: a Unicode character.

Returns:
A Unicode character.

int Clutter::Entry::get_max_length (  )  const

Gets the maximum length of text that can be set into entry.

See set_max_length().

Returns:
The maximum number of characters.
Since: 0.4.

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

Parameters:
max The maximum number of characters allowed in the entry; 0 to disable or -1 to set the length of the current string.

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

Deprecated: 0.8: The key events will automatically be handled when giving the key focus to an entry using Clutter::Stage::set_key_focus().

Parameters:
kev A Clutter::KeyEvent.

Glib::SignalProxy0< void > Clutter::Entry::signal_text_changed (  ) 

Prototype:
void on_my_text_changed()

Glib::SignalProxy1< void,const Geometry& > Clutter::Entry::signal_cursor_event (  ) 

Prototype:
void on_my_cursor_event(const Geometry& geometry)

Glib::SignalProxy0< void > Clutter::Entry::signal_activate (  ) 

Prototype:
void on_my_activate()

Glib::PropertyProxy<Pango::Alignment> Clutter::Entry::property_alignment (  ) 

The preferred alignment for the string.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Pango::Alignment> Clutter::Entry::property_alignment (  )  const

The preferred alignment for the string.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Color> Clutter::Entry::property_color (  ) 

Font Colour.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Color> Clutter::Entry::property_color (  )  const

Font Colour.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Clutter::Entry::property_cursor_visible (  ) 

Whether the input cursor is visible.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Clutter::Entry::property_cursor_visible (  )  const

Whether the input cursor is visible.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<unsigned int> Clutter::Entry::property_entry_padding (  ) 

The padding space between the text and the left and right borders.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<unsigned int> Clutter::Entry::property_entry_padding (  )  const

The padding space between the text and the left and right borders.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Clutter::Entry::property_font_name (  ) 

Pango font description.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Clutter::Entry::property_font_name (  )  const

Pango font description.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Clutter::Entry::property_max_length (  ) 

The maximum length of the entry text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Clutter::Entry::property_max_length (  )  const

The maximum length of the entry text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Clutter::Entry::property_position (  ) 

The cursor position.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Clutter::Entry::property_position (  )  const

The cursor position.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Clutter::Entry::property_text (  ) 

Text to render.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Clutter::Entry::property_text (  )  const

Text to render.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Clutter::Entry::property_text_visible (  ) 

Whether the text is visible in plain form.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Clutter::Entry::property_text_visible (  )  const

Whether the text is visible in plain form.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Clutter::Entry::property_x_align (  ) 

The horizontal alignment to be used for the text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Clutter::Entry::property_x_align (  )  const

The horizontal alignment to be used for the text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

virtual void Clutter::Entry::paint_cursor_vfunc (  )  [protected, virtual]

virtual void Clutter::Entry::on_text_changed (  )  [protected, virtual]

virtual void Clutter::Entry::on_cursor_event ( const Geometry geometry  )  [protected, virtual]

virtual void Clutter::Entry::on_activate (  )  [protected, virtual]


Friends And Related Function Documentation

Glib::RefPtr< Clutter::Entry > wrap ( ClutterEntry *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
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.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated on Sun Jul 27 21:36:01 2008 for cluttermm by  doxygen 1.5.4