Commit Graph

9 Commits

Author SHA1 Message Date
Emmanuele Bassi
7af992974e Initialize the cursor position
By default, the cursor position is initialized to -1, meaning
"place the cursor always at the end of the text".
2008-12-11 11:42:33 +00:00
Emmanuele Bassi
d5df1bebcf Add text-visibility accessors for ClutterText
A ClutterText can be put in "password mode" by setting the
text as "invisible": every character inside the Text actor's
contents will be replaced when building the Pango layout with
a specific Unicode character.

The Unicode character is set to '*' by default, but the user
can be changed using the provided API.
2008-12-11 11:40:55 +00:00
Emmanuele Bassi
97cf7e6819 Correctly initialize the initial state of ClutterText
Some of the values in ClutterText have an initial state that
does not match a zero-ed out ClutterTextPrivate structure.
2008-12-11 11:35:52 +00:00
Emmanuele Bassi
fc168a3482 Merge the ClutterLabel properties into ClutterText
ClutterText should have the same properties as ClutterLabel.

While at it, we can finally fix the disconnect between the wrap
and wrap-mode properties and its accessors, that we perpetuated
from GtkLabel.

The ClutterText:line-wrap property and ClutterText:line-wrap-mode
are mapped to the set_line_wrap(), get_line_wrap() and
set_line_wrap_mode(), get_line_wrap_mode() accessor functions
respectively. This should simplify bindings the Vala ones that
map a property into a method.
2008-12-11 11:33:10 +00:00
Emmanuele Bassi
437f96982e Expose the Text accessors as public API
Fix up the header to expose ClutterText accessors for the main
properties, matching ClutterLabel.
2008-12-11 11:20:14 +00:00
Emmanuele Bassi
4d62da80ad Coalesce ClutterLabel API usage
ClutterText replaces ClutterLabel, so it should expose the same
kind of API - ideally with the minimal amount of changes, so that
the porting is trivial.
2008-12-11 11:17:26 +00:00
Emmanuele Bassi
a91bb5450f Group all the integer private fields
Integer fields using the ": <bits>" notation should be packed
together so that the compiler can optimize the structure size
correctly.
2008-12-11 11:15:56 +00:00
Emmanuele Bassi
f9bf187e5d Use internal headers
Since ClutterText is part of Clutter, it can use the internal
and private headers instead of the catch-all clutter.h.
2008-12-11 11:15:11 +00:00
Emmanuele Bassi
a98720ae19 Initial import of the Text actor from Tidy
The TidyText actor is meant as a replacement for both ClutterLabel
and ClutterText.

Any text-displaying and editing actor should derive from ClutterText
and implement the various visual cues to differentiate the editable
from the non-editable state. Those visual cues usually belong to
a high-level toolkit, especially if themeing is involved.
2008-12-11 11:12:48 +00:00