[help] Stub out a right-click-help UI

Not looking anything up yet but we're getting started
This commit is contained in:
Andy Williams 2016-04-07 17:44:12 +01:00
parent d3ae71510c
commit a1c47c1e9b
2 changed files with 14 additions and 2 deletions

View File

@ -603,11 +603,12 @@ _elm_code_widget_cursor_move(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
_elm_code_widget_fill_line(widget, elm_code_file_line_get(pd->code->file, pd->cursor_line));
}
static Eina_Bool
_elm_code_widget_position_at_coordinates_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
EOLIAN static Eina_Bool
_elm_code_widget_position_at_coordinates_get(Eo *obj, Elm_Code_Widget_Data *pd,
Evas_Coord x, Evas_Coord y,
unsigned int *row, int *col)
{
Elm_Code_Widget *widget;
Eina_List *item;
Elm_Code_Line *line;
Evas_Coord ox, oy, sx, sy, rowy;
@ -615,6 +616,7 @@ _elm_code_widget_position_at_coordinates_get(Elm_Code_Widget *widget, Elm_Code_W
int cw, ch, gutter;
unsigned int guess, number;
widget = (Elm_Code_Widget *)obj;
evas_object_geometry_get(widget, &ox, &oy, NULL, NULL);
elm_scroller_region_get(pd->scroller, &sx, &sy, NULL, NULL);
x = x + sx - ox;

View File

@ -177,6 +177,16 @@ class Elm.Code_Widget (Elm.Layout, Elm.Interface_Atspi_Text)
lines_visible_get {
return: uint; [[the number of lines currently visible in the widget.]]
}
position_at_coordinates_get {
[[get the row, col position for a given coordinate on the widget.]]
params {
x: Evas_Coord; [[the x coordinate in the widget]]
y: Evas_Coord; [[the y coordinate in the widget]]
row: uint *; [[the row for the coordinates]]
col: int *; [[the column for the coordinates]]
}
return: bool; [[true if a line exists at these coordinates]]
}
//text functions
text_left_gutter_width_get {