More adaptation to latest Text changes
Previous fix relied on old headers still being present, which is not good.
This commit is contained in:
parent
aeaba83065
commit
cba451e99b
|
@ -3,10 +3,10 @@
|
|||
#include <Elementary.h>
|
||||
#include <Efl_Ui.h>
|
||||
// Temporary workaround until Unified Text stops using Legacy classes internally
|
||||
#include <efl_ui_text.eo.h>
|
||||
#include <efl_ui_textbox.eo.h>
|
||||
#include <efl_text_interactive.eo.h>
|
||||
|
||||
Efl_Ui_Text *_editor;
|
||||
Efl_Ui_Textbox *_editor;
|
||||
Efl_Ui_Button *_toolbar_new;
|
||||
|
||||
Eina_Bool _edited = EINA_FALSE;
|
||||
|
@ -81,7 +81,7 @@ _gui_toolbar_refresh(void)
|
|||
}
|
||||
|
||||
EFL_CALLBACKS_ARRAY_DEFINE(_editor_callbacks,
|
||||
{ EFL_UI_TEXT_EVENT_CHANGED, _editor_changed_cb },
|
||||
{ EFL_UI_TEXTBOX_EVENT_CHANGED, _editor_changed_cb },
|
||||
{ EFL_TEXT_INTERACTIVE_EVENT_CHANGED_USER, _editor_changed_cb });
|
||||
|
||||
static void
|
||||
|
@ -103,12 +103,12 @@ _gui_setup()
|
|||
|
||||
_gui_toolbar_setup(box);
|
||||
|
||||
_editor = efl_add(EFL_UI_TEXT_CLASS, box,
|
||||
_editor = efl_add(EFL_UI_TEXTBOX_CLASS, box,
|
||||
efl_text_multiline_set(efl_added, EINA_TRUE),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_TRUE),
|
||||
efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL),
|
||||
efl_pack(box, efl_added));
|
||||
efl_ui_text_scrollable_set(_editor, EINA_TRUE);
|
||||
efl_ui_textbox_scrollable_set(_editor, EINA_TRUE);
|
||||
efl_text_font_family_set(_editor, "Mono");
|
||||
efl_text_font_size_set(_editor, 14);
|
||||
}
|
||||
|
|
|
@ -20,12 +20,12 @@ using System;
|
|||
public class TextEditor : Efl.Csharp.Application
|
||||
{
|
||||
private Efl.Ui.Win win; // The main window
|
||||
private Efl.Ui.Text editorTextBox; // The main text entry
|
||||
private Efl.Ui.Textbox editorTextBox; // The main text entry
|
||||
private Efl.Ui.Button toolbarButtonNew; // The "New" button in the toolbar
|
||||
private Efl.Ui.Button toolbarButtonSave; // The "Save" button in the toolbar
|
||||
private Efl.Ui.Button toolbarButtonLoad; // The "Load" button in the toolbar
|
||||
|
||||
private bool edited = false; // Document was edited since last save
|
||||
private bool edited = false; // Document was edited since last save
|
||||
|
||||
// File to load and save is fixed since we do not use a file selection dialog
|
||||
private readonly string filename = System.IO.Path.Combine(System.IO.Path.GetTempPath(),
|
||||
|
@ -167,7 +167,7 @@ public class TextEditor : Efl.Csharp.Application
|
|||
GUIToolbarSetup(box);
|
||||
|
||||
// Create the main text entry
|
||||
editorTextBox = new Efl.Ui.Text(box);
|
||||
editorTextBox = new Efl.Ui.Textbox(box);
|
||||
editorTextBox.FontFamily = "Mono";
|
||||
editorTextBox.FontSize = 14;
|
||||
editorTextBox.Multiline = true;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <Elementary.h>
|
||||
#include <Efl_Ui.h>
|
||||
// Temporary workaround until Unified Text stops using Legacy classes internally
|
||||
#include <efl_ui_text.eo.h>
|
||||
#include <efl_ui_textbox.eo.h>
|
||||
#include <efl_text_interactive.eo.h>
|
||||
|
||||
static void
|
||||
|
@ -43,7 +43,7 @@ _gui_setup()
|
|||
efl_content_set(win, efl_added),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, box,
|
||||
efl_add(EFL_UI_TEXTBOX_CLASS, box,
|
||||
efl_text_set(efl_added, "Label"),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <Elementary.h>
|
||||
#include <Efl_Ui.h>
|
||||
// Temporary workaround until Unified Text stops using Legacy classes internally
|
||||
#include <efl_ui_text.eo.h>
|
||||
#include <efl_ui_textbox.eo.h>
|
||||
|
||||
/*
|
||||
* Efl.UI container examples.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <Elementary.h>
|
||||
#include <Efl_Ui.h>
|
||||
// Temporary workaround until Unified Text stops using Legacy classes internally
|
||||
#include <efl_ui_text.eo.h>
|
||||
#include <efl_ui_textbox.eo.h>
|
||||
#include <efl_text_interactive.eo.h>
|
||||
|
||||
static void
|
||||
|
@ -29,7 +29,7 @@ _gui_setup()
|
|||
efl_content_set(win, efl_added),
|
||||
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, box,
|
||||
efl_add(EFL_UI_TEXTBOX_CLASS, box,
|
||||
efl_text_markup_set(efl_added, "Hello World.<br>This is an <b>Efl.Ui</b> application!"),
|
||||
efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
|
||||
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
|
||||
|
|
|
@ -31,7 +31,7 @@ public class Example : Efl.Csharp.Application
|
|||
win.SetContent(box);
|
||||
|
||||
// Create a text label widget
|
||||
var label = new Efl.Ui.Text(box);
|
||||
var label = new Efl.Ui.Textbox(box);
|
||||
// Set its content and customize it
|
||||
label.SetText("Hello World. This is an Efl.Ui application!");
|
||||
label.Editable = false;
|
||||
|
|
Loading…
Reference in New Issue