paragraph_prev [[Advances to the end of the previous paragraph.]]
}
-// Missing pen_geometry get? - probably not, that's the cursor geometry with under.
-// Should we always do split cursor and "under" should just be content geometry? -- probably!
-// Problem with this is that it doesn't necessarily work correctly vertically.
class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
[[Cursor API.]]
c_prefix: efl_text_cursor;
methods {
+
@property position {
[[Cursor position.]]
set { }
position: int; [[Cursor position.]]
}
}
+
@property content {
[[The content of the cursor (the character under the cursor).]]
get {
content: Eina.Unicode; [[The unicode codepoint of the character.]]
}
}
+
@property content_geometry {
[[The geometry of the item/char pointed by the cursor.]]
get { }
geometry: Eina.Rect; [[The geometry in pixels.]]
}
}
+
@property line_number {
[[The line the cursor is on.]]
set { }
}
return: bool; [[$true if cursors are equal, $false otherwise.]]
}
+
compare @const {
[[Compare two cursors
Return <0 if cursor position less than dst, 0 if cursor == dest and >0 otherwise.]]
}
return: int; [[Difference between cursors.]]
}
+
copy @const {
[[Copy existing cursor to destination cursor, like position and cursor text object.]]
params {
dst: Efl.Text.Cursor; [[Destination Cursor.]]
}
}
+
move {
[[Move the cursor.]]
params {
}
return: bool; [[True if actually moved.]]
}
+
char_delete {
[[Deletes a single character from position pointed by given cursor.]]
}
- // FIXME: It's just implemented as range delete with cluster start + end.
- // Should we have convenience wrappers for those though? This and cluster prev/next?
- // cluster_delete {
-
line_jump_by {
[[Jump the cursor by the given number of lines.]]
params {
}
}
- // FIXME: Add a way to add with a length parameter (always have it?) so we just copy n characters, or all if -1. Useful for saving copies when inserting from another source.
text_insert {
[[Adds text to the current cursor position and set the cursor to
*after* the start of the text just added.]]
cur2: Efl.Text.Cursor; [[End of range.]]
}
}
- // FIXME: returning an iterator here feels a bit stupid
+
range_geometry_get {
[[Get the simple geometry in pixels of a range in the text.
return: iterator<Eina.Rect> @move; [[
Iterator on all geoemtries of the given range.]]
}
+
range_precise_geometry_get {
[[Get the "precise" geometry in pixels of a range.
return: iterator<Eina.Rect> @move; [[
Iterator on all simple geometries of the given range.]]
}
+
range_delete {
[[Deletes the range between given cursors.
}
}
events {
- // FIXME: Needed for people who cache the position.
changed: void; [[Called when its position has changed.]]
}