Page MenuHomePhabricator

Efl.Text_Cursor
Open, TODOPublic

Description

interface Efl.Text_Cursor
├ (P) text_cursor
├ (P) cursor_position
├ (P) cursor_content
├ (P) cursor_geometry
├ (M) cursor_new
├ (M) cursor_free
├ (M) cursor_equal
├ (M) cursor_compare
├ (M) cursor_copy
├ (M) cursor_char_next
├ (M) cursor_char_prev
├ (M) cursor_cluster_next
├ (M) cursor_cluster_prev
├ (M) cursor_paragraph_char_first
├ (M) cursor_paragraph_char_last
├ (M) cursor_word_start
├ (M) cursor_word_end
├ (M) cursor_line_char_first
├ (M) cursor_line_char_last
├ (M) cursor_paragraph_first
├ (M) cursor_paragraph_last
├ (M) cursor_paragraph_next
├ (M) cursor_paragraph_prev
├ (M) cursor_line_jump_by
├ (M) cursor_coord_set
├ (M) cursor_cluster_coord_set
├ (M) cursor_text_insert
├ (M) cursor_char_delete
zmike created this task.Oct 1 2019, 10:08 AM
zmike triaged this task as TODO priority.

The proposed rework:

class Efl2.Text.Cursor
├ (P) position
├ (P) content
├ (P) content_geometry
├ (P) line_number
├ (P) geometry
├ (P) handle
├ (M) equal
├ (M) compare
├ (M) copy
├ (M) char_next
├ (M) char_prev
├ (M) char_delete
├ (M) cluster_start
├ (M) cluster_end
├ (M) paragraph_start
├ (M) paragraph_end
├ (M) word_start
├ (M) word_end
├ (M) line_start
├ (M) line_end
├ (M) paragraph_first
├ (M) paragraph_last
├ (M) paragraph_next
├ (M) paragraph_prev
├ (M) line_jump_by
├ (M) coord_set
├ (M) text_insert
├ (M) range_text_get
├ (M) range_geometry_get
├ (M) range_precise_geometry_get
├ (M) range_delete
├ (E) changed
zmike added a comment.Oct 1 2019, 10:23 AM

I do like this rework a lot better, and it seems sensible to have a (temporary) object for this kind of thing just for actual usage.

class Efl2.Text.Cursor
├ (P) position

This should probably be something more like text_position just to be explicit about what kind of position it is.

├ (P) content
├ (P) content_geometry

This should be Eina.Rect

├ (P) line_number
├ (P) geometry

This should use Eina.Rect

├ (P) handle
├ (M) equal
├ (M) compare
├ (M) copy
├ (M) char_next
├ (M) char_prev
├ (M) char_delete
├ (M) cluster_start
├ (M) cluster_end
├ (M) paragraph_start
├ (M) paragraph_end
├ (M) word_start
├ (M) word_end
├ (M) line_start
├ (M) line_end
├ (M) paragraph_first
├ (M) paragraph_last
├ (M) paragraph_next
├ (M) paragraph_prev
├ (M) line_jump_by
├ (M) coord_set

This should probably be something more like canvas_position and must use Eina.Position2D

├ (M) text_insert

Should probably return uint

├ (M) range_text_get
├ (M) range_geometry_get
├ (M) range_precise_geometry_get
├ (M) range_delete

Should have a bool return?

├ (E) changed

What position is this event for? It should pass the related data as event info.

tasn added a comment.Oct 1 2019, 1:16 PM

Thanks a lot for your feedback! I only learned today about Eina.Position2D et al. This is exactly the kind of feedback I was looking for. Will act upon it soon!

tasn added a comment.Oct 2 2019, 2:56 AM
In T8299#144189, @zmike wrote:

I do like this rework a lot better, and it seems sensible to have a (temporary) object for this kind of thing just for actual usage.

class Efl2.Text.Cursor
├ (P) position

This should probably be something more like text_position just to be explicit about what kind of position it is.

efl_text_cursor_text_position feels long and redundant. I think just position is fine.

├ (P) content
├ (P) content_geometry

This should be Eina.Rect

Changed.

├ (P) line_number
├ (P) geometry

This should use Eina.Rect

├ (P) handle
├ (M) equal
├ (M) compare
├ (M) copy
├ (M) char_next
├ (M) char_prev
├ (M) char_delete
├ (M) cluster_start
├ (M) cluster_end
├ (M) paragraph_start
├ (M) paragraph_end
├ (M) word_start
├ (M) word_end
├ (M) line_start
├ (M) line_end
├ (M) paragraph_first
├ (M) paragraph_last
├ (M) paragraph_next
├ (M) paragraph_prev
├ (M) line_jump_by
├ (M) coord_set

This should probably be something more like canvas_position and must use Eina.Position2D

I don't think I like this one. How about "jump_to_coordinate"?

├ (M) text_insert

Should probably return uint

Done.

├ (M) range_text_get
├ (M) range_geometry_get
├ (M) range_precise_geometry_get
├ (M) range_delete

Should have a bool return?

Bool indicating what?

├ (E) changed

What position is this event for? It should pass the related data as event info.

There is only one position, and that is the text position (which is the property called position). The other one is just a way to change this position based on coordinate.

zmike moved this task from Backlog to Evaluating on the efl: api board.Oct 14 2019, 5:56 AM