summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-12-11 15:51:03 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-12-11 15:51:03 +0100
commitcba451e99b9e9237c71e37833c72447b2e49b765 (patch)
tree7a133118bc46839fbcfaa82b8ab8c922bb4f398a
parentaeaba8306575961868e7a4df8ac82456b4bf6628 (diff)
More adaptation to latest Text changes
Previous fix relied on old headers still being present, which is not good.
-rw-r--r--apps/c/texteditor/src/texteditor_main.c10
-rw-r--r--apps/csharp/texteditor/src/texteditor_main.cs6
-rw-r--r--reference/c/ui/src/focus_main.c4
-rw-r--r--reference/c/ui/src/ui_container.c2
-rw-r--r--tutorial/c/hello-gui/src/gui_main.c4
-rw-r--r--tutorial/csharp/hello-gui/src/gui_main.cs2
6 files changed, 14 insertions, 14 deletions
diff --git a/apps/c/texteditor/src/texteditor_main.c b/apps/c/texteditor/src/texteditor_main.c
index 2ee15ef5..20fbd5f1 100644
--- a/apps/c/texteditor/src/texteditor_main.c
+++ b/apps/c/texteditor/src/texteditor_main.c
@@ -3,10 +3,10 @@
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally 5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_text.eo.h> 6#include <efl_ui_textbox.eo.h>
7#include <efl_text_interactive.eo.h> 7#include <efl_text_interactive.eo.h>
8 8
9Efl_Ui_Text *_editor; 9Efl_Ui_Textbox *_editor;
10Efl_Ui_Button *_toolbar_new; 10Efl_Ui_Button *_toolbar_new;
11 11
12Eina_Bool _edited = EINA_FALSE; 12Eina_Bool _edited = EINA_FALSE;
@@ -81,7 +81,7 @@ _gui_toolbar_refresh(void)
81} 81}
82 82
83EFL_CALLBACKS_ARRAY_DEFINE(_editor_callbacks, 83EFL_CALLBACKS_ARRAY_DEFINE(_editor_callbacks,
84 { EFL_UI_TEXT_EVENT_CHANGED, _editor_changed_cb }, 84 { EFL_UI_TEXTBOX_EVENT_CHANGED, _editor_changed_cb },
85 { EFL_TEXT_INTERACTIVE_EVENT_CHANGED_USER, _editor_changed_cb }); 85 { EFL_TEXT_INTERACTIVE_EVENT_CHANGED_USER, _editor_changed_cb });
86 86
87static void 87static void
@@ -103,12 +103,12 @@ _gui_setup()
103 103
104 _gui_toolbar_setup(box); 104 _gui_toolbar_setup(box);
105 105
106 _editor = efl_add(EFL_UI_TEXT_CLASS, box, 106 _editor = efl_add(EFL_UI_TEXTBOX_CLASS, box,
107 efl_text_multiline_set(efl_added, EINA_TRUE), 107 efl_text_multiline_set(efl_added, EINA_TRUE),
108 efl_text_interactive_editable_set(efl_added, EINA_TRUE), 108 efl_text_interactive_editable_set(efl_added, EINA_TRUE),
109 efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL), 109 efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL),
110 efl_pack(box, efl_added)); 110 efl_pack(box, efl_added));
111 efl_ui_text_scrollable_set(_editor, EINA_TRUE); 111 efl_ui_textbox_scrollable_set(_editor, EINA_TRUE);
112 efl_text_font_family_set(_editor, "Mono"); 112 efl_text_font_family_set(_editor, "Mono");
113 efl_text_font_size_set(_editor, 14); 113 efl_text_font_size_set(_editor, 14);
114} 114}
diff --git a/apps/csharp/texteditor/src/texteditor_main.cs b/apps/csharp/texteditor/src/texteditor_main.cs
index 0de15e22..339441bd 100644
--- a/apps/csharp/texteditor/src/texteditor_main.cs
+++ b/apps/csharp/texteditor/src/texteditor_main.cs
@@ -20,12 +20,12 @@ using System;
20public class TextEditor : Efl.Csharp.Application 20public class TextEditor : Efl.Csharp.Application
21{ 21{
22 private Efl.Ui.Win win; // The main window 22 private Efl.Ui.Win win; // The main window
23 private Efl.Ui.Text editorTextBox; // The main text entry 23 private Efl.Ui.Textbox editorTextBox; // The main text entry
24 private Efl.Ui.Button toolbarButtonNew; // The "New" button in the toolbar 24 private Efl.Ui.Button toolbarButtonNew; // The "New" button in the toolbar
25 private Efl.Ui.Button toolbarButtonSave; // The "Save" button in the toolbar 25 private Efl.Ui.Button toolbarButtonSave; // The "Save" button in the toolbar
26 private Efl.Ui.Button toolbarButtonLoad; // The "Load" button in the toolbar 26 private Efl.Ui.Button toolbarButtonLoad; // The "Load" button in the toolbar
27 27
28 private bool edited = false; // Document was edited since last save 28 private bool edited = false; // Document was edited since last save
29 29
30 // File to load and save is fixed since we do not use a file selection dialog 30 // File to load and save is fixed since we do not use a file selection dialog
31 private readonly string filename = System.IO.Path.Combine(System.IO.Path.GetTempPath(), 31 private readonly string filename = System.IO.Path.Combine(System.IO.Path.GetTempPath(),
@@ -167,7 +167,7 @@ public class TextEditor : Efl.Csharp.Application
167 GUIToolbarSetup(box); 167 GUIToolbarSetup(box);
168 168
169 // Create the main text entry 169 // Create the main text entry
170 editorTextBox = new Efl.Ui.Text(box); 170 editorTextBox = new Efl.Ui.Textbox(box);
171 editorTextBox.FontFamily = "Mono"; 171 editorTextBox.FontFamily = "Mono";
172 editorTextBox.FontSize = 14; 172 editorTextBox.FontSize = 14;
173 editorTextBox.Multiline = true; 173 editorTextBox.Multiline = true;
diff --git a/reference/c/ui/src/focus_main.c b/reference/c/ui/src/focus_main.c
index d4f678eb..8db43e19 100644
--- a/reference/c/ui/src/focus_main.c
+++ b/reference/c/ui/src/focus_main.c
@@ -3,7 +3,7 @@
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally 5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_text.eo.h> 6#include <efl_ui_textbox.eo.h>
7#include <efl_text_interactive.eo.h> 7#include <efl_text_interactive.eo.h>
8 8
9static void 9static void
@@ -43,7 +43,7 @@ _gui_setup()
43 efl_content_set(win, efl_added), 43 efl_content_set(win, efl_added),
44 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240))); 44 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
45 45
46 efl_add(EFL_UI_TEXT_CLASS, box, 46 efl_add(EFL_UI_TEXTBOX_CLASS, box,
47 efl_text_set(efl_added, "Label"), 47 efl_text_set(efl_added, "Label"),
48 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 48 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
49 efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, 49 efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
diff --git a/reference/c/ui/src/ui_container.c b/reference/c/ui/src/ui_container.c
index 0c7270a0..1c32fdd9 100644
--- a/reference/c/ui/src/ui_container.c
+++ b/reference/c/ui/src/ui_container.c
@@ -3,7 +3,7 @@
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally 5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_text.eo.h> 6#include <efl_ui_textbox.eo.h>
7 7
8/* 8/*
9 * Efl.UI container examples. 9 * Efl.UI container examples.
diff --git a/tutorial/c/hello-gui/src/gui_main.c b/tutorial/c/hello-gui/src/gui_main.c
index 882443f6..fa9eeab2 100644
--- a/tutorial/c/hello-gui/src/gui_main.c
+++ b/tutorial/c/hello-gui/src/gui_main.c
@@ -3,7 +3,7 @@
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally 5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_text.eo.h> 6#include <efl_ui_textbox.eo.h>
7#include <efl_text_interactive.eo.h> 7#include <efl_text_interactive.eo.h>
8 8
9static void 9static void
@@ -29,7 +29,7 @@ _gui_setup()
29 efl_content_set(win, efl_added), 29 efl_content_set(win, efl_added),
30 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240))); 30 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
31 31
32 efl_add(EFL_UI_TEXT_CLASS, box, 32 efl_add(EFL_UI_TEXTBOX_CLASS, box,
33 efl_text_markup_set(efl_added, "Hello World.<br>This is an <b>Efl.Ui</b> application!"), 33 efl_text_markup_set(efl_added, "Hello World.<br>This is an <b>Efl.Ui</b> application!"),
34 efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE), 34 efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
35 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 35 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
diff --git a/tutorial/csharp/hello-gui/src/gui_main.cs b/tutorial/csharp/hello-gui/src/gui_main.cs
index ec4994d1..235de800 100644
--- a/tutorial/csharp/hello-gui/src/gui_main.cs
+++ b/tutorial/csharp/hello-gui/src/gui_main.cs
@@ -31,7 +31,7 @@ public class Example : Efl.Csharp.Application
31 win.SetContent(box); 31 win.SetContent(box);
32 32
33 // Create a text label widget 33 // Create a text label widget
34 var label = new Efl.Ui.Text(box); 34 var label = new Efl.Ui.Textbox(box);
35 // Set its content and customize it 35 // Set its content and customize it
36 label.SetText("Hello World. This is an Efl.Ui application!"); 36 label.SetText("Hello World. This is an Efl.Ui application!");
37 label.Editable = false; 37 label.Editable = false;