forked from enlightenment/efl
Ui text: introduce this new text widget
This composite object utilizes the Efl.Canvas.Text, Efl.Canvas.Text.Cursor and Efl.Ui.Interactive API to server as a proper replacement for the Elm Entry widget. @feature
This commit is contained in:
parent
eabf319b11
commit
dbc82782d1
|
@ -1179,6 +1179,110 @@ group { name: "elm/entry/handler/end/default";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group { name: "elm/efl_ui_text/base/default";
|
||||||
|
sounds {
|
||||||
|
sample { name: "key-tap1" LOSSY 64;
|
||||||
|
source: "kbd-tap.wav";
|
||||||
|
}
|
||||||
|
sample { name: "key-tap2" LOSSY 64;
|
||||||
|
source: "kbd-tap2.wav";
|
||||||
|
}
|
||||||
|
sample { name: "key-tap3" LOSSY 64;
|
||||||
|
source: "kbd-tap3.wav";
|
||||||
|
}
|
||||||
|
sample { name: "key-tap4" LOSSY 64;
|
||||||
|
source: "kbd-tap4.wav";
|
||||||
|
}
|
||||||
|
sample { name: "key-tap5" LOSSY 64;
|
||||||
|
source: "kbd-tap5.wav";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// data.item: "context_menu_orientation" "horizontal";
|
||||||
|
parts {
|
||||||
|
part { name: "elm.swallow.background"; type: SWALLOW;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.offset: 1 1;
|
||||||
|
rel2.offset: -2 -2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "elm.text"; type: SWALLOW;
|
||||||
|
scale: 1;
|
||||||
|
entry_mode: EDITABLE;
|
||||||
|
select_mode: DEFAULT;
|
||||||
|
// select_mode: EXPLICIT;
|
||||||
|
cursor_mode: BEFORE;
|
||||||
|
multiline: 1;
|
||||||
|
source: "elm/entry/selection/default"; // selection under
|
||||||
|
// source2: "X"; // selection over
|
||||||
|
// source3: "X"; // cursor under
|
||||||
|
source4: "elm/entry/cursor/default"; // cursorover
|
||||||
|
// source5: "elm/entry/anchor/default"; // anchor under
|
||||||
|
source6: "elm/entry/anchor/default"; // anchor over
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
/* we gotta use 0 0 here, because of scrolled entries */
|
||||||
|
fixed: 0 0;
|
||||||
|
rel1.offset: 2 2;
|
||||||
|
rel2.offset: -3 -3;
|
||||||
|
}
|
||||||
|
description { state: "disabled" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
programs {
|
||||||
|
program {
|
||||||
|
signal: "load"; source: "";
|
||||||
|
action: FOCUS_SET;
|
||||||
|
target: "elm.text";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
signal: "elm,state,disabled"; source: "elm";
|
||||||
|
action: STATE_SET "disabled" 0.0;
|
||||||
|
target: "elm.text";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
signal: "elm,state,enabled"; source: "elm";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "elm.text";
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
program {
|
||||||
|
signal: "elm,guide,disabled"; source: "elm";
|
||||||
|
action: STATE_SET "hidden" 0.0;
|
||||||
|
target: "elm.guide";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
signal: "elm,guide,enabled"; source: "elm";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "elm.guide";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
program { name: "key-down";
|
||||||
|
signal: "entry,keydown"; source: "elm.text";
|
||||||
|
script {
|
||||||
|
new buf[32];
|
||||||
|
snprintf(buf, 31, "key-down%i", (rand() % 5) + 1);
|
||||||
|
run_program(get_program_id(buf));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
program { name: "key-down1";
|
||||||
|
action: PLAY_SAMPLE "key-tap1" 1.0 INPUT;
|
||||||
|
}
|
||||||
|
program { name: "key-down2";
|
||||||
|
action: PLAY_SAMPLE "key-tap2" 1.0 INPUT;
|
||||||
|
}
|
||||||
|
program { name: "key-down3";
|
||||||
|
action: PLAY_SAMPLE "key-tap3" 1.0 INPUT;
|
||||||
|
}
|
||||||
|
program { name: "key-down4";
|
||||||
|
action: PLAY_SAMPLE "key-tap4" 1.0 INPUT;
|
||||||
|
}
|
||||||
|
program { name: "key-down5";
|
||||||
|
action: PLAY_SAMPLE "key-tap5" 1.0 INPUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// emoticon images from:
|
// emoticon images from:
|
||||||
// Tanya - Latvia
|
// Tanya - Latvia
|
||||||
|
|
|
@ -139,6 +139,7 @@ elm_public_eolian_files = \
|
||||||
lib/elementary/elm_scroller_internal_part.eo \
|
lib/elementary/elm_scroller_internal_part.eo \
|
||||||
lib/elementary/elm_code_widget.eo \
|
lib/elementary/elm_code_widget.eo \
|
||||||
lib/elementary/efl_ui_text_interactive.eo \
|
lib/elementary/efl_ui_text_interactive.eo \
|
||||||
|
lib/elementary/efl_ui_text.eo \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
# Private classes (not exposed or shipped)
|
# Private classes (not exposed or shipped)
|
||||||
|
@ -693,6 +694,7 @@ lib_elementary_libelementary_la_SOURCES = \
|
||||||
lib/elementary/efl_ui_grid.c \
|
lib/elementary/efl_ui_grid.c \
|
||||||
lib/elementary/efl_ui_grid_static.c \
|
lib/elementary/efl_ui_grid_static.c \
|
||||||
lib/elementary/efl_ui_grid_private.h \
|
lib/elementary/efl_ui_grid_private.h \
|
||||||
|
lib/elementary/efl_ui_text.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,7 @@ test_win_plug.c \
|
||||||
test_win_state.c \
|
test_win_state.c \
|
||||||
test_win_wm_rotation.c \
|
test_win_wm_rotation.c \
|
||||||
test_win_dialog.c \
|
test_win_dialog.c \
|
||||||
|
test_efl_ui_text.c \
|
||||||
test.h
|
test.h
|
||||||
|
|
||||||
elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \
|
elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \
|
||||||
|
|
|
@ -285,6 +285,7 @@ void test_code_mirror(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_code_log(void *data, Evas_Object *obj, void *event_info);
|
void test_code_log(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_code_diff(void *data, Evas_Object *obj, void *event_info);
|
void test_code_diff(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_code_diff_inline(void *data, Evas_Object *obj, void *event_info);
|
void test_code_diff_inline(void *data, Evas_Object *obj, void *event_info);
|
||||||
|
void test_efl_ui_text(void *data, Evas_Object *obj, void *event_info);
|
||||||
|
|
||||||
Evas_Object *win, *tbx; // TODO: refactoring
|
Evas_Object *win, *tbx; // TODO: refactoring
|
||||||
void *tt;
|
void *tt;
|
||||||
|
@ -630,6 +631,7 @@ add_tests:
|
||||||
ADD_TEST(NULL, "Entries", "Entry Anchor", test_entry_anchor);
|
ADD_TEST(NULL, "Entries", "Entry Anchor", test_entry_anchor);
|
||||||
ADD_TEST(NULL, "Entries", "Entry Anchor2", test_entry_anchor2);
|
ADD_TEST(NULL, "Entries", "Entry Anchor2", test_entry_anchor2);
|
||||||
ADD_TEST(NULL, "Entries", "Entry Emoticon", test_entry_emoticon);
|
ADD_TEST(NULL, "Entries", "Entry Emoticon", test_entry_emoticon);
|
||||||
|
ADD_TEST(NULL, "Entries", "Efl UI Text", test_efl_ui_text);
|
||||||
|
|
||||||
//------------------------------//
|
//------------------------------//
|
||||||
ADD_TEST(NULL, "Advanced Entries", "Code Entry Markup", test_code_welcome);
|
ADD_TEST(NULL, "Advanced Entries", "Code Entry Markup", test_code_welcome);
|
||||||
|
@ -912,7 +914,6 @@ add_tests:
|
||||||
|
|
||||||
ADD_TEST(NULL, "Widgets Disable/Enable", "Box", test_box_disable);
|
ADD_TEST(NULL, "Widgets Disable/Enable", "Box", test_box_disable);
|
||||||
ADD_TEST(NULL, "Widgets Disable/Enable", "Layout", test_layout_disable);
|
ADD_TEST(NULL, "Widgets Disable/Enable", "Layout", test_layout_disable);
|
||||||
|
|
||||||
#undef ADD_TEST
|
#undef ADD_TEST
|
||||||
|
|
||||||
if (autorun)
|
if (autorun)
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "elementary_config.h"
|
||||||
|
#endif
|
||||||
|
#define EO_BETA_API
|
||||||
|
#include <Elementary.h>
|
||||||
|
|
|
@ -2816,3 +2816,128 @@ test_entry_emoticon(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
evas_object_resize(win, 400, 500);
|
evas_object_resize(win, 400, 500);
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
my_efl_ui_text_bt_5(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Evas_Object *en = data;
|
||||||
|
efl_ui_text_scrollable_set(en, !efl_ui_text_scrollable_get(en));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Evas_Object *win, *bx, *bx2, *bx3, *bt, *en, *ck;
|
||||||
|
|
||||||
|
win = elm_win_util_standard_add("entry", "Entry");
|
||||||
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
|
||||||
|
bx = elm_box_add(win);
|
||||||
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
elm_win_resize_object_add(win, bx);
|
||||||
|
evas_object_show(bx);
|
||||||
|
|
||||||
|
en = eo_add(EFL_UI_TEXT_CLASS, win);
|
||||||
|
printf("Added Efl.Ui.Text object\n");
|
||||||
|
// elm_entry_line_wrap_set(en, ELM_WRAP_NONE);
|
||||||
|
efl_text_set(en, "Hello world!\nGoodbye world!\n"
|
||||||
|
"Another line\nAnd another line\nYet another line!");
|
||||||
|
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, en);
|
||||||
|
evas_object_show(en);
|
||||||
|
elm_object_focus_set(en, EINA_TRUE);
|
||||||
|
|
||||||
|
bx2 = elm_box_add(win);
|
||||||
|
elm_box_horizontal_set(bx2, EINA_TRUE);
|
||||||
|
evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Clr");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", my_entry_bt_1, en);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
elm_box_pack_end(bx2, bt);
|
||||||
|
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Prnt");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", my_entry_bt_2, en);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
elm_box_pack_end(bx2, bt);
|
||||||
|
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Sel");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", my_entry_bt_3, en);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
elm_box_pack_end(bx2, bt);
|
||||||
|
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Ins");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", my_entry_bt_4, en);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
elm_box_pack_end(bx2, bt);
|
||||||
|
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Scrl");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", my_efl_ui_text_bt_5, en);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
elm_box_pack_end(bx2, bt);
|
||||||
|
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Wr");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", my_entry_bt_6, en);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
elm_box_pack_end(bx2, bt);
|
||||||
|
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Edit");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", my_entry_bt_7, en);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
elm_box_pack_end(bx2, bt);
|
||||||
|
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bx3 = elm_box_add(win);
|
||||||
|
elm_box_horizontal_set(bx3, EINA_TRUE);
|
||||||
|
evas_object_size_hint_weight_set(bx3, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
evas_object_size_hint_align_set(bx3, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
|
||||||
|
ck = elm_check_add(win);
|
||||||
|
elm_object_text_set(ck, "Context Menu Disable");
|
||||||
|
evas_object_smart_callback_add(ck, "changed", changed_cb1, ck);
|
||||||
|
elm_box_pack_end(bx3, ck);
|
||||||
|
evas_object_show(ck);
|
||||||
|
|
||||||
|
ck = elm_check_add(win);
|
||||||
|
elm_object_text_set(ck, "Select Allow");
|
||||||
|
// elm_check_state_set(ck, elm_entry_select_allow_get(en));
|
||||||
|
evas_object_smart_callback_add(ck, "changed", select_allow_check_changed_cb, en);
|
||||||
|
elm_box_pack_end(bx3, ck);
|
||||||
|
evas_object_show(ck);
|
||||||
|
|
||||||
|
elm_box_pack_end(bx, bx3);
|
||||||
|
elm_box_pack_end(bx, bx2);
|
||||||
|
evas_object_show(bx3);
|
||||||
|
evas_object_show(bx2);
|
||||||
|
|
||||||
|
evas_object_show(win);
|
||||||
|
}
|
||||||
|
|
|
@ -277,6 +277,7 @@ EAPI extern Elm_Version *elm_version;
|
||||||
# include <efl_ui_win.eo.h>
|
# include <efl_ui_win.eo.h>
|
||||||
# include <efl_ui_win_standard.eo.h>
|
# include <efl_ui_win_standard.eo.h>
|
||||||
# include <efl_ui_text_interactive.eo.h>
|
# include <efl_ui_text_interactive.eo.h>
|
||||||
|
# include <efl_ui_text.eo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* include deprecated calls last of all */
|
/* include deprecated calls last of all */
|
||||||
|
|
|
@ -498,6 +498,8 @@ includesub_HEADERS = \
|
||||||
elm_helper.h \
|
elm_helper.h \
|
||||||
efl_ui_box_private.h \
|
efl_ui_box_private.h \
|
||||||
efl_ui_grid_private.h \
|
efl_ui_grid_private.h \
|
||||||
|
efl_ui_text.h \
|
||||||
|
efl_ui_text.eo.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
includesubdir = $(includedir)/elementary-@VMAJ@/
|
includesubdir = $(includedir)/elementary-@VMAJ@/
|
||||||
|
@ -630,6 +632,7 @@ libelementary_la_SOURCES = \
|
||||||
efl_ui_box_layout.c \
|
efl_ui_box_layout.c \
|
||||||
efl_ui_grid.c \
|
efl_ui_grid.c \
|
||||||
efl_ui_grid_static.c \
|
efl_ui_grid_static.c \
|
||||||
|
efl_ui_text.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libelementary_la_CFLAGS = @ELEMENTARY_CFLAGS@
|
libelementary_la_CFLAGS = @ELEMENTARY_CFLAGS@
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,468 @@
|
||||||
|
import elm_general;
|
||||||
|
import elm_icon;
|
||||||
|
import elm_entry;
|
||||||
|
|
||||||
|
class Efl.Ui.Text (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
|
||||||
|
Elm.Interface.Atspi.Text, Elm.Interface.Atspi.Text.Editable, Efl.File,
|
||||||
|
Evas.Selectable_Interface, Evas.Scrollable_Interface, Efl.Ui.Text.Interactive)
|
||||||
|
{
|
||||||
|
methods {
|
||||||
|
@property scrollable {
|
||||||
|
set {
|
||||||
|
[[Enable or disable scrolling in entry
|
||||||
|
|
||||||
|
Normally the entry is not scrollable unless you enable it with this call.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the scrollable state of the entry
|
||||||
|
|
||||||
|
Normally the entry is not scrollable. This gets the scrollable state
|
||||||
|
of the entry.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
scroll: bool; [[$true if it is to be scrollable, $false otherwise.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_show_on_demand {
|
||||||
|
set {
|
||||||
|
[[Set the attribute to show the input panel in case of only an user's explicit Mouse Up event.
|
||||||
|
It doesn't request to show the input panel even though it has focus.
|
||||||
|
|
||||||
|
@since 1.9
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the attribute to show the input panel in case of only an user's explicit Mouse Up event.
|
||||||
|
|
||||||
|
@since 1.9
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
ondemand: bool; [[If true, the input panel will be shown in case of only Mouse up event.
|
||||||
|
(Focus event will be ignored.)
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property context_menu_disabled {
|
||||||
|
set {
|
||||||
|
[[This disables the entry's contextual (longpress) menu.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[This returns whether the entry's contextual (longpress) menu is
|
||||||
|
disabled.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
disabled: bool; [[If $true, the menu is disabled.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property cnp_mode {
|
||||||
|
set {
|
||||||
|
[[Control pasting of text and images for the widget.
|
||||||
|
|
||||||
|
Normally the entry allows both text and images to be pasted.
|
||||||
|
By setting cnp_mode to be #ELM_CNP_MODE_NO_IMAGE, this prevents images from being copy or past.
|
||||||
|
By setting cnp_mode to be #ELM_CNP_MODE_PLAINTEXT, this remove all tags in text .
|
||||||
|
|
||||||
|
Note: This only changes the behaviour of text.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Getting elm_entry text paste/drop mode.
|
||||||
|
|
||||||
|
Normally the entry allows both text and images to be pasted.
|
||||||
|
This gets the copy & paste mode of the entry.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
cnp_mode: Elm.Cnp_Mode; [[One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP, #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_language {
|
||||||
|
set {
|
||||||
|
[[Set the language mode of the input panel.
|
||||||
|
|
||||||
|
This API can be used if you want to show the alphabet keyboard mode.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the language mode of the input panel.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
lang: Elm.Input.Panel.Lang; [[language to be set to the input panel.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property selection_handler_disabled {
|
||||||
|
set {
|
||||||
|
[[This disabled the entry's selection handlers.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[This returns whether the entry's selection handlers are disabled.]]
|
||||||
|
legacy: null;
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
disabled: bool; [[If $true, the selection handlers are disabled.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_layout_variation {
|
||||||
|
set {
|
||||||
|
[[Set the input panel layout variation of the entry
|
||||||
|
|
||||||
|
@since 1.8
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the input panel layout variation of the entry
|
||||||
|
|
||||||
|
@since 1.8
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
variation: int; [[layout variation type.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property autocapital_type {
|
||||||
|
set {
|
||||||
|
[[Set the autocapitalization type on the immodule.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the autocapitalization type on the immodule.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
autocapital_type: Elm.Autocapital.Type; [[The type of autocapitalization.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property editable {
|
||||||
|
set {
|
||||||
|
[[Sets if the entry is to be editable or not.
|
||||||
|
|
||||||
|
By default, entries are editable and when focused, any text input by the
|
||||||
|
user will be inserted at the current cursor position. But calling this
|
||||||
|
function with $editable as $false will prevent the user from
|
||||||
|
inputting text into the entry.
|
||||||
|
|
||||||
|
The only way to change the text of a non-editable entry is to use
|
||||||
|
\@ref elm_object_text_set, \@ref elm_entry_entry_insert and other related
|
||||||
|
functions.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get whether the entry is editable or not.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
editable: bool; [[If $true, user input will be inserted in the entry,
|
||||||
|
if not, the entry is read-only and no user input is allowed.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property password {
|
||||||
|
set {
|
||||||
|
[[Sets the entry to password mode.
|
||||||
|
|
||||||
|
In password mode, entries are implicitly single line and the display of
|
||||||
|
any text in them is replaced with asterisks (*).
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get whether the entry is set to password mode.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
password: bool; [[If true, password mode is enabled.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_return_key_disabled {
|
||||||
|
set {
|
||||||
|
[[Set the return key on the input panel to be disabled.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get whether the return key on the input panel should be disabled or not.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
disabled: bool; [[The state to put in in: $true for
|
||||||
|
disabled, $false for enabled.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property prediction_allow {
|
||||||
|
set {
|
||||||
|
[[Set whether the entry should allow to use the text prediction.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get whether the entry should allow to use the text prediction.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
prediction: bool; [[Whether the entry should allow to use the text prediction.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_hint {
|
||||||
|
set {
|
||||||
|
[[Sets the input hint which allows input methods to fine-tune their behavior.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Gets the value of input hint.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
hints: Elm.Input.Hints; [[Input hint.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_layout {
|
||||||
|
set {
|
||||||
|
[[Set the input panel layout of the entry.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the input panel layout of the entry.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
layout: Elm.Input.Panel.Layout(Elm.Input.Panel.Layout.invalid); [[layout type.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_return_key_type {
|
||||||
|
set {
|
||||||
|
[[Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
|
||||||
|
|
||||||
|
An input panel displays the string or icon associated with this type.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the "return" key type.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
return_key_type: Elm.Input.Panel.Return_Key.Type; [[The type of "return" key on the input panel.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_enabled {
|
||||||
|
set {
|
||||||
|
[[Sets the attribute to show the input panel automatically.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[Get the attribute to show the input panel automatically.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
enabled: bool; [[If true, the input panel is appeared when entry is clicked or has a focus.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property input_panel_return_key_autoenabled {
|
||||||
|
set {
|
||||||
|
[[Set whether the return key on the input panel is disabled automatically when entry has no text.
|
||||||
|
|
||||||
|
If $enabled is $true, The return key on input panel is disabled when the entry has no text.
|
||||||
|
The return key on the input panel is automatically enabled when the entry has text.
|
||||||
|
The default value is $false.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
enabled: bool; [[If $enabled is true, the return key is automatically disabled when the entry has no text.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@property imf_context {
|
||||||
|
get {
|
||||||
|
[[Returns the input method context of the entry.
|
||||||
|
|
||||||
|
This function exposes the internal input method context.
|
||||||
|
|
||||||
|
IMPORTANT: Many functions may change (i.e delete and create a new one)
|
||||||
|
the internal input method context. Do NOT cache the returned object.
|
||||||
|
]]
|
||||||
|
return: void_ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item_provider_prepend {
|
||||||
|
[[This prepends a custom item provider to the list for that entry
|
||||||
|
|
||||||
|
This prepends the given callback.]]
|
||||||
|
params {
|
||||||
|
@in func: Elm_Entry_Item_Provider_Cb; [[The function called to provide the item object.]]
|
||||||
|
@in data: void_ptr @optional; [[The data passed to $func.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input_panel_show {
|
||||||
|
[[Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on.
|
||||||
|
|
||||||
|
Note that input panel is shown or hidden automatically according to the focus state of entry widget.
|
||||||
|
This API can be used in the case of manually controlling by using @.input_panel_enabled.set(en, $false).
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
imf_context_reset {
|
||||||
|
[[Reset the input method context of the entry if needed.
|
||||||
|
|
||||||
|
This can be necessary in the case where modifying the buffer would confuse on-going input method behavior.
|
||||||
|
This will typically cause the Input Method Context to clear the preedit state.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
selection_copy {
|
||||||
|
[[This executes a "copy" action on the selected text in the entry.]]
|
||||||
|
}
|
||||||
|
item_provider_remove {
|
||||||
|
[[This removes a custom item provider to the list for that entry
|
||||||
|
|
||||||
|
This removes the given callback. See @.item_provider_append for
|
||||||
|
more information
|
||||||
|
]]
|
||||||
|
params {
|
||||||
|
@in func: Elm_Entry_Item_Provider_Cb; [[The function called to provide the item object.]]
|
||||||
|
@in data: void_ptr @optional; [[The data passed to $func.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context_menu_clear {
|
||||||
|
[[This clears and frees the items in a entry's contextual (longpress)
|
||||||
|
menu.
|
||||||
|
|
||||||
|
See also @.context_menu_item_add.
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
input_panel_imdata_set {
|
||||||
|
[[Set the input panel-specific data to deliver to the input panel.
|
||||||
|
|
||||||
|
This API is used by applications to deliver specific data to the input panel.
|
||||||
|
The data format MUST be negotiated by both application and the input panel.
|
||||||
|
The size and format of data are defined by the input panel.
|
||||||
|
]]
|
||||||
|
params {
|
||||||
|
@in data: const(void_ptr); [[The specific data to be set to the input panel.]]
|
||||||
|
@in len: int; [[The length of data, in bytes, to send to the input panel.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input_panel_imdata_get @const {
|
||||||
|
[[Get the specific data of the current input panel.]]
|
||||||
|
params {
|
||||||
|
@out data: void; [[The specific data to be got from the input panel.]]
|
||||||
|
@out len: int; [[The length of data.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
selection_paste {
|
||||||
|
[[This executes a "paste" action in the entry.]]
|
||||||
|
}
|
||||||
|
input_panel_hide {
|
||||||
|
[[Hide the input panel (virtual keyboard).
|
||||||
|
|
||||||
|
Note that input panel is shown or hidden automatically according to the focus state of entry widget.
|
||||||
|
This API can be used in the case of manually controlling by using @.input_panel_enabled.set(en, $false)
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
cursor_selection_end {
|
||||||
|
[[This ends a selection within the entry as though
|
||||||
|
the user had just released the mouse button while making a selection.]]
|
||||||
|
}
|
||||||
|
selection_cut {
|
||||||
|
[[This executes a "cut" action on the selected text in the entry.]]
|
||||||
|
}
|
||||||
|
item_provider_append {
|
||||||
|
[[This appends a custom item provider to the list for that entry
|
||||||
|
|
||||||
|
This appends the given callback. The list is walked from beginning to end
|
||||||
|
with each function called given the item href string in the text. If the
|
||||||
|
function returns an object handle other than $null (it should create an
|
||||||
|
object to do this), then this object is used to replace that item. If
|
||||||
|
not the next provider is called until one provides an item object, or the
|
||||||
|
default provider in entry does.
|
||||||
|
|
||||||
|
See also \@ref entry-items.
|
||||||
|
]]
|
||||||
|
params {
|
||||||
|
@in func: Elm_Entry_Item_Provider_Cb; [[The function called to provide the item object.]]
|
||||||
|
@in data: void_ptr @optional; [[The data passed to $func.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context_menu_item_add {
|
||||||
|
[[This adds an item to the entry's contextual menu.
|
||||||
|
|
||||||
|
A longpress on an entry will make the contextual menu show up, if this
|
||||||
|
hasn't been disabled with @.context_menu_disabled.set.
|
||||||
|
By default, this menu provides a few options like enabling selection mode,
|
||||||
|
which is useful on embedded devices that need to be explicit about it,
|
||||||
|
and when a selection exists it also shows the copy and cut actions.
|
||||||
|
|
||||||
|
With this function, developers can add other options to this menu to
|
||||||
|
perform any action they deem necessary.
|
||||||
|
]]
|
||||||
|
params {
|
||||||
|
@in label: string @optional; [[The item's text label.]]
|
||||||
|
@in icon_file: string @optional; [[The item's icon file.]]
|
||||||
|
@in icon_type: Elm.Icon.Type; [[The item's icon type.]]
|
||||||
|
@in func: Evas_Smart_Cb @optional; [[The callback to execute when the item is clicked.]]
|
||||||
|
@in data: const(void_ptr) @optional; [[The data to associate with the item for related functions.]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
implements {
|
||||||
|
class.constructor;
|
||||||
|
Eo.Base.constructor;
|
||||||
|
Evas.Object.Smart.move;
|
||||||
|
Evas.Object.Smart.member_add;
|
||||||
|
Evas.Object.Smart.add;
|
||||||
|
Evas.Object.Smart.resize;
|
||||||
|
Evas.Object.Smart.del;
|
||||||
|
Evas.Object.Smart.show;
|
||||||
|
Evas.Object.Smart.hide;
|
||||||
|
Elm.Widget.activate;
|
||||||
|
Elm.Widget.focus_direction_manager_is;
|
||||||
|
Elm.Widget.theme_apply;
|
||||||
|
Elm.Widget.on_focus;
|
||||||
|
Elm.Widget.on_focus_region;
|
||||||
|
Elm.Widget.disable;
|
||||||
|
Elm.Widget.sub_object_del;
|
||||||
|
Elm.Widget.focus_next_manager_is;
|
||||||
|
Elm.Layout.theme_enable;
|
||||||
|
Elm.Layout.sizing_eval;
|
||||||
|
Elm.Layout.text.get;
|
||||||
|
Elm.Layout.signal_callback_add;
|
||||||
|
Elm.Layout.signal_callback_del;
|
||||||
|
Elm.Layout.signal_emit;
|
||||||
|
Elm.Layout.text.set;
|
||||||
|
Elm.Layout.content_aliases.get;
|
||||||
|
Elm.Interface_Scrollable.policy.set;
|
||||||
|
Elm.Interface_Scrollable.bounce_allow.set;
|
||||||
|
Elm.Interface.Atspi_Accessible.state_set.get;
|
||||||
|
Elm.Interface.Atspi_Accessible.name.get;
|
||||||
|
Elm.Interface.Atspi.Text.text.get;
|
||||||
|
Elm.Interface.Atspi.Text.string.get;
|
||||||
|
Elm.Interface.Atspi.Text.attribute.get;
|
||||||
|
Elm.Interface.Atspi.Text.attributes.get;
|
||||||
|
Elm.Interface.Atspi.Text.default_attributes.get;
|
||||||
|
Elm.Interface.Atspi.Text.caret_offset.get;
|
||||||
|
Elm.Interface.Atspi.Text.caret_offset.set;
|
||||||
|
Elm.Interface.Atspi.Text.character.get;
|
||||||
|
Elm.Interface.Atspi.Text.character_extents.get;
|
||||||
|
Elm.Interface.Atspi.Text.character_count.get;
|
||||||
|
Elm.Interface.Atspi.Text.offset_at_point.get;
|
||||||
|
Elm.Interface.Atspi.Text.bounded_ranges.get;
|
||||||
|
Elm.Interface.Atspi.Text.range_extents.get;
|
||||||
|
Elm.Interface.Atspi.Text.selection.get;
|
||||||
|
Elm.Interface.Atspi.Text.selections_count.get;
|
||||||
|
Elm.Interface.Atspi.Text.selection_add;
|
||||||
|
Elm.Interface.Atspi.Text.selection_remove;
|
||||||
|
Elm.Interface.Atspi.Text.selection.set;
|
||||||
|
Elm.Interface.Atspi.Text.Editable.content.set;
|
||||||
|
Elm.Interface.Atspi.Text.Editable.insert;
|
||||||
|
Elm.Interface.Atspi.Text.Editable.copy;
|
||||||
|
Elm.Interface.Atspi.Text.Editable.cut;
|
||||||
|
Elm.Interface.Atspi.Text.Editable.delete;
|
||||||
|
Elm.Interface.Atspi.Text.Editable.paste;
|
||||||
|
Efl.File.file.set;
|
||||||
|
Efl.File.file.get;
|
||||||
|
}
|
||||||
|
events {
|
||||||
|
activated;
|
||||||
|
changed;
|
||||||
|
changed,user;
|
||||||
|
validate;
|
||||||
|
context,open;
|
||||||
|
anchor,clicked;
|
||||||
|
rejected;
|
||||||
|
maxlength,reached;
|
||||||
|
preedit,changed;
|
||||||
|
press;
|
||||||
|
redo,request;
|
||||||
|
undo,request;
|
||||||
|
text,set,done;
|
||||||
|
aborted;
|
||||||
|
anchor,down;
|
||||||
|
anchor,hover,opened;
|
||||||
|
anchor,in;
|
||||||
|
anchor,out;
|
||||||
|
anchor,up;
|
||||||
|
cursor,changed;
|
||||||
|
cursor,changed,manual;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef ELM_ENTRY_COMMON_H_
|
||||||
|
#define ELM_ENTRY_COMMON_H_
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup Elm_Entry
|
* @addtogroup Elm_Entry
|
||||||
*
|
*
|
||||||
|
@ -257,3 +260,4 @@ EAPI void elm_entry_context_menu_item_icon_get(const Elm
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
#endif //ELM_ENTRY_COMMON_H_
|
||||||
|
|
Loading…
Reference in New Issue