Enlightenment CVS committal
Author : moom16
Project : e17
Module : proto
Dir : e17/proto/etk/src/lib
Modified Files:
Etk.h Makefile.am etk_text_view.c etk_text_view.h etk_types.h
Added Files:
etk_textblock.c etk_textblock.h
Removed Files:
etk_text_buffer.c etk_text_buffer.h etk_text_iter.c
etk_text_iter.h
Log Message:
* Start the work on the text view
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Etk.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- Etk.h 15 Feb 2006 15:03:17 -0000 1.22
+++ Etk.h 15 Feb 2006 18:36:55 -0000 1.23
@@ -38,9 +38,8 @@
#include "etk_toggle_button.h"
#include "etk_check_button.h"
#include "etk_radio_button.h"
-#include "etk_text_buffer.h"
-#include "etk_text_iter.h"
#include "etk_editable_text_object.h"
+#include "etk_textblock.h"
#include "etk_entry.h"
#include "etk_text_view.h"
#include "etk_canvas.h"
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- Makefile.am 15 Feb 2006 15:03:17 -0000 1.26
+++ Makefile.am 15 Feb 2006 18:36:55 -0000 1.27
@@ -17,6 +17,7 @@
ETKHEADERS = \
Etk.h etk_types.h etk_main.h etk_utils.h \
+etk_string.h \
etk_type.h etk_object.h etk_property.h \
etk_signal.h etk_signal_callback.h etk_marshallers.h \
etk_theme.h etk_cache.h \
@@ -29,7 +30,7 @@
etk_image.h \
etk_stock.h \
etk_label.h \
-etk_string.h etk_text_buffer.h etk_text_iter.h etk_editable_text_object.h \
+etk_textblock.h etk_editable_text_object.h \
etk_button.h etk_toggle_button.h etk_check_button.h etk_radio_button.h \
etk_entry.h etk_text_view.h \
etk_canvas.h \
@@ -50,6 +51,7 @@
libetk_la_SOURCES = \
etk_main.c etk_utils.c \
+etk_string.c \
etk_type.c etk_object.c etk_property.c \
etk_signal.c etk_signal_callback.c etk_marshallers.c \
etk_theme.c etk_cache.c \
@@ -62,7 +64,7 @@
etk_image.c \
etk_stock.c \
etk_label.c \
-etk_string.c etk_text_buffer.c etk_text_iter.c etk_editable_text_object.c \
+etk_textblock.c etk_editable_text_object.c \
etk_button.c etk_toggle_button.c etk_check_button.c etk_radio_button.c \
etk_entry.c etk_text_view.c \
etk_canvas.c \
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_text_view.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- etk_text_view.c 11 Feb 2006 00:28:34 -0000 1.1
+++ etk_text_view.c 15 Feb 2006 18:36:55 -0000 1.2
@@ -5,8 +5,7 @@
#include <string.h>
#include "etk_signal.h"
#include "etk_signal_callback.h"
-#include "etk_text_buffer.h"
-#include "etk_string.h"
+#include "etk_textblock.h"
/**
* @addtogroup Etk_Text_View
@@ -22,6 +21,7 @@
static void _etk_text_view_constructor(Etk_Text_View *text_view);
static void _etk_text_view_size_allocate(Etk_Widget *widget, Etk_Geometry
geometry);
static void _etk_text_view_realize_cb(Etk_Object *object, void *data);
+static void _etk_text_view_unrealize_cb(Etk_Object *object, void *data);
static Etk_Signal *_etk_text_view_signals[ETK_TEXT_VIEW_NUM_SIGNALS];
@@ -72,11 +72,11 @@
if (!text_view)
return;
- text_view->text_buffer = etk_text_buffer_new();
- text_view->textblock_object = NULL;
+ text_view->textblock = etk_textblock_new();
ETK_WIDGET(text_view)->size_allocate = _etk_text_view_size_allocate;
etk_signal_connect("realize", ETK_OBJECT(text_view),
ETK_CALLBACK(_etk_text_view_realize_cb), NULL);
+ etk_signal_connect("unrealize", ETK_OBJECT(text_view),
ETK_CALLBACK(_etk_text_view_unrealize_cb), NULL);
}
/* TODO: Renders the textblock object */
@@ -88,7 +88,8 @@
return;
printf("text_view_size_allocate\n");
- evas_object_textblock_text_markup_set(text_view->textblock_object,
etk_string_get(text_view->text_buffer->formatted_buffer));
+ evas_object_move(text_view->textblock->textblock_object, geometry.x,
geometry.y);
+ evas_object_resize(text_view->textblock->textblock_object, geometry.w,
geometry.h);
}
/**************************
@@ -97,25 +98,29 @@
*
**************************/
-/* Called when the text_view is realized */
+/* Called when the text view is realized */
static void _etk_text_view_realize_cb(Etk_Object *object, void *data)
{
- Evas_Textblock_Style *text_style;
Etk_Text_View *text_view;
- Etk_Widget *text_view_widget;
Evas *evas;
- if (!(text_view_widget = ETK_WIDGET(object)) || !(evas =
etk_widget_toplevel_evas_get(text_view_widget)))
+ if (!(text_view = ETK_TEXT_VIEW(object)) || !(evas =
etk_widget_toplevel_evas_get(ETK_WIDGET(text_view))))
return;
- text_view = ETK_TEXT_VIEW(text_view_widget);
- text_view->textblock_object = evas_object_textblock_add(evas);
- text_style = evas_textblock_style_new();
- evas_textblock_style_set(text_style, "DEFAULT='font=Vera font_size=10
align=left color=#000000 wrap=word' br='\n'");
- evas_object_textblock_style_set(text_view->textblock_object, text_style);
- evas_object_show(text_view->textblock_object);
- etk_widget_theme_object_swallow(text_view_widget, "text_area",
text_view->textblock_object);
- etk_widget_member_object_add(text_view_widget, text_view->textblock_object);
+ //etk_textblock_realize(text_view->textblock, evas);
+ etk_widget_member_object_add(ETK_WIDGET(text_view),
text_view->textblock->textblock_object);
+}
+
+/* Called when the text view is unrealized */
+static void _etk_text_view_unrealize_cb(Etk_Object *object, void *data)
+{
+ Etk_Text_View *text_view;
+
+ if (!(text_view = ETK_TEXT_VIEW(object)))
+ return;
+
+ etk_widget_member_object_del(ETK_WIDGET(text_view),
text_view->textblock->textblock_object);
+ //etk_textblock_unrealize(text_view->textblock);
}
/** @} */
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_text_view.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- etk_text_view.h 11 Feb 2006 00:28:35 -0000 1.1
+++ etk_text_view.h 15 Feb 2006 18:36:55 -0000 1.2
@@ -28,8 +28,7 @@
/* Inherit from Etk_Widget */
Etk_Widget widget;
- Etk_Text_Buffer *text_buffer;
- Evas_Object *textblock_object;
+ Etk_Textblock *textblock;
};
Etk_Type *etk_text_view_type_get();
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_types.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- etk_types.h 15 Feb 2006 03:13:54 -0000 1.28
+++ etk_types.h 15 Feb 2006 18:36:55 -0000 1.29
@@ -68,8 +68,8 @@
typedef struct _Etk_Toggle_Button Etk_Toggle_Button;
typedef struct _Etk_Check_Button Etk_Check_Button;
typedef struct _Etk_Radio_Button Etk_Radio_Button;
-typedef struct _Etk_Text_Buffer Etk_Text_Buffer;
-typedef struct _Etk_Text_Iter Etk_Text_Iter;
+typedef struct _Etk_Textblock Etk_Textblock;
+typedef struct _Etk_Textblock_Iter Etk_Textblock_Iter;
typedef struct _Etk_Entry Etk_Entry;
typedef struct _Etk_Text_View Etk_Text_View;
typedef struct _Etk_Canvas Etk_Canvas;
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs