2016-02-15 09:20:41 -08:00
|
|
|
class Elm.Code_Widget (Elm.Layout, Elm.Interface_Atspi_Text)
|
2015-01-23 14:55:13 -08:00
|
|
|
{
|
2015-06-02 00:22:36 -07:00
|
|
|
eo_prefix: elm_obj_code_widget;
|
|
|
|
legacy_prefix: elm_code_widget;
|
2015-05-11 15:11:28 -07:00
|
|
|
methods {
|
|
|
|
@property code {
|
2015-01-24 14:07:00 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set the underlying code object that this widget renders.
|
2015-02-28 05:22:38 -08:00
|
|
|
This can only be set during construction, once the widget is created the
|
2015-09-07 15:12:08 -07:00
|
|
|
backing code object cannot be changed.]]
|
2015-01-24 14:07:00 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the underlying code object we are rendering]]
|
2015-01-24 14:07:00 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
code: Elm_Code *; [[Our underlying Elm_Code object]]
|
2015-01-24 14:07:00 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-24 10:39:57 -07:00
|
|
|
@property font {
|
2015-01-23 14:55:13 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set the font that this widget uses, the font should be a monospaced scalable font.
|
|
|
|
Passing NULL will load the default system monospaced font.]]
|
2015-01-23 14:55:13 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the font currently in use.
|
|
|
|
The font name is a copy ad should be freed once it is no longer needed]]
|
2015-01-23 14:55:13 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
name: const(char) *; [[The name of the font to load]]
|
|
|
|
size: Evas_Font_Size; [[The font size for the widget]]
|
2015-01-23 14:55:13 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-11 15:11:28 -07:00
|
|
|
@property gravity {
|
2015-01-28 06:16:46 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set how this widget's scroller should respond to new lines being added.
|
2015-01-28 06:16:46 -08:00
|
|
|
|
|
|
|
An x value of 0.0 will maintain the distance from the left edge, 1.0 will ensure the rightmost edge (of the longest line) is respected
|
2015-09-07 15:12:08 -07:00
|
|
|
With 0.0 for y the view will keep it's position relative to the top whereas 1.0 will scroll downward as lines are added.]]
|
2015-01-28 06:16:46 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the current x and y gravity of the widget's scroller]]
|
2015-01-28 06:16:46 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
x: double; [[The horizontal value of the scroller gravity - valid values are 0.0 and 1.0]]
|
|
|
|
y: double; [[The vertical gravity of the widget's scroller - valid values are 0.0 and 1.0]]
|
2015-01-28 06:16:46 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-30 02:26:51 -07:00
|
|
|
@property policy {
|
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set the policy for scrollbar visibility.]]
|
2015-05-30 02:26:51 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the widget's policy for scrollbar visibility.]]
|
2015-05-30 02:26:51 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
policy_h: Elm_Scroller_Policy; [[The horizontal scrollbar visibility policy]]
|
|
|
|
policy_v: Elm_Scroller_Policy; [[The vertical scrollbar visibility policy]]
|
2015-05-30 02:26:51 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-11 15:11:28 -07:00
|
|
|
@property tabstop {
|
2015-03-29 12:12:28 -07:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set the width of a tab stop, used purely for visual layout of tab characters.
|
2015-03-29 12:12:28 -07:00
|
|
|
|
2015-09-07 15:12:08 -07:00
|
|
|
Recommended value is between 2 and 8.]]
|
2015-03-29 12:12:28 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the current width of a tab stop.
|
|
|
|
This is used to determine where characters after a tab should appear in the line.]]
|
2015-03-29 12:12:28 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
tabstop: uint; [[Maximum width of a tab character]]
|
2015-03-29 12:12:28 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-11 15:11:28 -07:00
|
|
|
@property editable {
|
2015-01-24 14:07:00 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set whether this widget allows editing
|
2015-01-26 15:09:22 -08:00
|
|
|
|
2015-09-07 15:12:08 -07:00
|
|
|
If editable then the widget will allow user input to manipulate
|
2015-01-26 15:09:22 -08:00
|
|
|
the underlying Elm_Code_File of this Elm_Code instance.
|
|
|
|
Any other Elm_Code_Widget's connected to this Elm_Code will
|
2015-09-07 15:12:08 -07:00
|
|
|
update to reflect the changes.]]
|
2015-01-24 14:07:00 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the current editable state of this widget
|
2015-01-26 15:09:22 -08:00
|
|
|
|
2015-09-07 15:12:08 -07:00
|
|
|
returns EINA_TRUE if the widget is editable, EINA_FALSE otherwise.
|
2015-01-26 15:09:22 -08:00
|
|
|
If this widget is not editable the underlying Elm_Code_File could
|
2015-09-07 15:12:08 -07:00
|
|
|
still be manipulated by a different widget or the filesystem.]]
|
2015-01-24 14:07:00 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
editable: Eina_Bool; [[The editable state of the widget]]
|
2015-01-24 14:07:00 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-11 15:11:28 -07:00
|
|
|
@property line_numbers {
|
2015-01-28 16:36:28 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set whether line numbers should be displayed in the left gutter.
|
2015-01-28 16:36:28 -08:00
|
|
|
|
|
|
|
Passing EINA_TRUE will reserve a space for showing line numbers,
|
2015-09-07 15:12:08 -07:00
|
|
|
EINA_FALSE will turn this off.]]
|
2015-01-28 16:36:28 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the status of line number display for this widget.]]
|
2015-01-28 16:36:28 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
line_numbers: Eina_Bool; [[Whether or not line numbers (or their placeholder) should be shown]]
|
2015-01-28 16:36:28 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-11 15:11:28 -07:00
|
|
|
@property line_width_marker {
|
2015-02-23 13:52:49 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set where the line width market should be shown.
|
2015-02-23 13:52:49 -08:00
|
|
|
|
|
|
|
Passing a non-zero value will set which line width to mark with a vertical line.
|
2015-09-07 15:12:08 -07:00
|
|
|
Passing 0 will hide this marker.]]
|
2015-02-23 13:52:49 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the position of the line width marker, any positive return indicates where the marker appears.]]
|
2015-02-23 13:52:49 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
line_width_marker: uint; [[Where to display a line width marker, if at all]]
|
2015-02-23 13:52:49 -08:00
|
|
|
}
|
|
|
|
}
|
2015-05-11 15:11:28 -07:00
|
|
|
@property show_whitespace {
|
2015-02-28 06:59:42 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set where white space should be shown.]]
|
2015-02-28 06:59:42 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get whether or not white space will be visible.]]
|
2015-02-28 06:59:42 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
show_whitespace: Eina_Bool; [[Whether or not we show whitespace characters]]
|
2015-02-28 06:59:42 -08:00
|
|
|
}
|
|
|
|
}
|
2016-02-08 16:32:16 -08:00
|
|
|
@property tab_inserts_spaces {
|
|
|
|
set {
|
|
|
|
[[Set whether space characters should be inserted instead of tabs.]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Get whether or not space characters will be inserted instead of tabs.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
tab_inserts_spaces: Eina_Bool; [[EINA_TRUE if we should insert space characters instead of a tab when the Tab key is pressed]]
|
|
|
|
}
|
|
|
|
}
|
2015-05-11 15:11:28 -07:00
|
|
|
@property cursor_position {
|
2015-02-19 13:16:18 -08:00
|
|
|
set {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Set the current location of the text cursor.]]
|
2015-02-19 13:16:18 -08:00
|
|
|
}
|
|
|
|
get {
|
2015-09-07 15:12:08 -07:00
|
|
|
[[Get the current x and y position of the widget's cursor.]]
|
2015-02-19 13:16:18 -08:00
|
|
|
}
|
|
|
|
values {
|
2015-09-07 15:12:08 -07:00
|
|
|
col: uint; [[The horizontal position of the cursor, starting from column 1]]
|
|
|
|
line: uint; [[The vertical position of the cursor - the top row is 1]]
|
2015-02-19 13:16:18 -08:00
|
|
|
}
|
|
|
|
}
|
2015-02-21 09:30:17 -08:00
|
|
|
line_refresh {
|
|
|
|
params {
|
2015-09-07 15:12:08 -07:00
|
|
|
line: Elm_Code_Line *; [[The line to refresh.]]
|
2015-02-21 09:30:17 -08:00
|
|
|
}
|
|
|
|
}
|
2015-04-02 14:48:23 -07:00
|
|
|
line_visible_get {
|
|
|
|
params {
|
2015-09-07 15:12:08 -07:00
|
|
|
line: Elm_Code_Line *; [[The line to test for visibility.]]
|
2015-04-02 14:48:23 -07:00
|
|
|
}
|
2015-09-07 15:12:08 -07:00
|
|
|
return: bool; [[true if the line specified is currently visible within the scroll region.]]
|
2015-04-04 11:01:05 -07:00
|
|
|
}
|
2015-05-12 15:15:25 -07:00
|
|
|
lines_visible_get {
|
2015-09-07 15:12:08 -07:00
|
|
|
return: uint; [[the number of lines currently visible in the widget.]]
|
2015-05-12 15:15:25 -07:00
|
|
|
}
|
2015-04-04 11:01:05 -07:00
|
|
|
|
2015-09-07 15:12:08 -07:00
|
|
|
//text functions
|
2015-04-04 11:01:05 -07:00
|
|
|
text_left_gutter_width_get {
|
2015-09-07 15:12:08 -07:00
|
|
|
return: int; [[the current column width of the gutter for the widget.]]
|
2015-04-04 11:01:05 -07:00
|
|
|
}
|
|
|
|
text_line_number_width_get {
|
2015-09-07 15:12:08 -07:00
|
|
|
return: int; [[the column width required to represent the number of lines in the widget.]]
|
2015-04-02 14:48:23 -07:00
|
|
|
}
|
2015-06-03 13:29:31 -07:00
|
|
|
|
|
|
|
line_text_column_width_to_position {
|
|
|
|
params {
|
|
|
|
line: Elm_Code_Line *;
|
|
|
|
position: uint;
|
|
|
|
}
|
|
|
|
return: uint;
|
|
|
|
}
|
|
|
|
line_text_column_width_get {
|
|
|
|
params {
|
|
|
|
line: Elm_Code_Line *;
|
|
|
|
}
|
|
|
|
return: uint;
|
|
|
|
}
|
|
|
|
line_text_position_for_column_get {
|
|
|
|
params {
|
|
|
|
line: Elm_Code_Line *;
|
|
|
|
column: uint;
|
|
|
|
}
|
|
|
|
return: uint;
|
|
|
|
}
|
2015-06-08 15:13:03 -07:00
|
|
|
text_tabwidth_at_column_get {
|
|
|
|
params {
|
|
|
|
column: uint;
|
|
|
|
}
|
|
|
|
return: uint;
|
|
|
|
}
|
2016-02-21 10:11:33 -08:00
|
|
|
undo {
|
|
|
|
}
|
2015-01-23 14:55:13 -08:00
|
|
|
}
|
|
|
|
implements {
|
|
|
|
class.constructor;
|
|
|
|
Eo.Base.constructor;
|
2015-02-28 05:22:38 -08:00
|
|
|
Eo.Base.finalize;
|
2015-01-23 14:55:13 -08:00
|
|
|
Evas.Object_Smart.add;
|
2015-05-11 15:11:28 -07:00
|
|
|
Elm.Widget.event;
|
|
|
|
Elm.Widget.focus_next_manager_is;
|
|
|
|
Elm.Widget.focus_direction_manager_is;
|
2015-01-23 14:55:13 -08:00
|
|
|
}
|
2015-05-20 06:18:20 -07:00
|
|
|
constructors {
|
|
|
|
.code;
|
|
|
|
}
|
2015-01-23 14:55:13 -08:00
|
|
|
events {
|
2015-01-24 14:07:00 -08:00
|
|
|
line,clicked;
|
2015-03-27 16:54:28 -07:00
|
|
|
line,gutter,clicked;
|
2015-02-19 13:16:18 -08:00
|
|
|
cursor,changed;
|
2015-03-21 13:04:12 -07:00
|
|
|
changed,user;
|
2015-03-18 15:24:56 -07:00
|
|
|
selection,changed;
|
|
|
|
selection,cleared;
|
2015-01-23 14:55:13 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|