[libgda-uimm] Add the RtEditor class.
- From: Josà Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda-uimm] Add the RtEditor class.
- Date: Mon, 3 Oct 2011 21:57:28 +0000 (UTC)
commit 9d8cb6c026418b4eab468bba0833d8d26a6e756b
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date: Mon Oct 3 17:03:41 2011 -0400
Add the RtEditor class.
* tools/extra_defs_gen/generate_defs_libgda_ui.cc: Add the
GDAUI_TYPE_RT_EDITOR GType to the list of types for which properties
and signals should be generated.
* libgda-ui/src/libgda_ui_signals.defs: Regenerate the signal and
property defs file with the above tool.
* libgda-ui/src/filelist.am:
* libgda-ui/src/rteditor.{ccg,hg}: Add the new sources wrapping the
methods, signals and properties and include them in the list of files
to be built.
ChangeLog | 15 +++++
libgda-ui/src/filelist.am | 1 +
libgda-ui/src/libgda_ui_signals.defs | 45 +++++++++++++
libgda-ui/src/rteditor.ccg | 31 +++++++++
libgda-ui/src/rteditor.hg | 76 +++++++++++++++++++++++
tools/extra_defs_gen/generate_defs_libgda_ui.cc | 2 +
6 files changed, 170 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6417e59..ffda84a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2011-10-03 Josà Alburquerque <jaalburqu svn gnome org>
+ Add the RtEditor class.
+
+ * tools/extra_defs_gen/generate_defs_libgda_ui.cc: Add the
+ GDAUI_TYPE_RT_EDITOR GType to the list of types for which properties
+ and signals should be generated.
+ * libgda-ui/src/libgda_ui_signals.defs: Regenerate the signal and
+ property defs file with the above tool.
+
+ * libgda-ui/src/filelist.am:
+ * libgda-ui/src/rteditor.{ccg,hg}: Add the new sources wrapping the
+ methods, signals and properties and include them in the list of files
+ to be built.
+
+2011-10-03 Josà Alburquerque <jaalburqu svn gnome org>
+
DataEntry: Allow null values for value setting methods.
* libgda-ui/src/dataentry.hg (set_value);
diff --git a/libgda-ui/src/filelist.am b/libgda-ui/src/filelist.am
index a03c49e..4b5894d 100644
--- a/libgda-ui/src/filelist.am
+++ b/libgda-ui/src/filelist.am
@@ -24,6 +24,7 @@ files_hg = \
providerselector.hg \
rawform.hg \
rawgrid.hg \
+ rteditor.hg \
serveroperation.hg
diff --git a/libgda-ui/src/libgda_ui_signals.defs b/libgda-ui/src/libgda_ui_signals.defs
index 3eba263..3f752e4 100644
--- a/libgda-ui/src/libgda_ui_signals.defs
+++ b/libgda-ui/src/libgda_ui_signals.defs
@@ -512,6 +512,51 @@
)
+;; From GdauiRtEditor
+
+(define-signal changed
+ (of-object "GdauiRtEditor")
+ (return-type "void")
+ (when "last")
+)
+
+(define-property no-background
+ (of-object "GdauiRtEditor")
+ (prop-type "GParamBoolean")
+ (docs "")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property show-markup
+ (of-object "GdauiRtEditor")
+ (prop-type "GParamBoolean")
+ (docs "")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property buffer
+ (of-object "GdauiRtEditor")
+ (prop-type "GParamObject")
+ (docs "")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property in-scrolled-window
+ (of-object "GdauiRtEditor")
+ (prop-type "GParamBoolean")
+ (docs "")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+
;; From GdauiServerOperation
(define-property server-operation
diff --git a/libgda-ui/src/rteditor.ccg b/libgda-ui/src/rteditor.ccg
new file mode 100644
index 0000000..b6084dd
--- /dev/null
+++ b/libgda-ui/src/rteditor.ccg
@@ -0,0 +1,31 @@
+/* libgda-uimm - a C++ wrapper for libgda-ui
+ *
+ * Copyright (c) 2011 libgda-uimm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgda-ui/gdaui-rt-editor.h>
+#include <gtkmm/textbuffer.h>
+
+namespace Gnome
+{
+
+namespace GdaUI
+{
+
+} /* namespace GdaUI */
+
+} /* namespace Gnome */
diff --git a/libgda-ui/src/rteditor.hg b/libgda-ui/src/rteditor.hg
new file mode 100644
index 0000000..89cde46
--- /dev/null
+++ b/libgda-ui/src/rteditor.hg
@@ -0,0 +1,76 @@
+/* libgda-uimm - a C++ wrapper for libgda-ui
+ *
+ * Copyright (c) 2011 libgda-uimm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/box.h>
+
+_DEFS(libgda-uimm,libgda_ui)
+_PINCLUDE(gtkmm/private/box_p.h)
+
+namespace Gtk
+{
+
+class TextBuffer;
+
+}
+
+namespace Gnome
+{
+
+// Gnome::Gda class forward declarations.
+namespace Gda
+{
+
+class DataModel;
+
+}
+
+namespace GdaUI
+{
+
+/** RtEditor - Rich text editor which uses a subset of the txt2tags markup.
+ * The text entered in the editor can be formatted using bold, underline,
+ * title, ... attributes and then extracted using a subset of the txt2tags
+ * markup. Use this widget to edit textual fields where some markup is
+ * desirable to organize the text.
+ */
+class RtEditor :
+ public Gtk::Box
+{
+ _CLASS_GTKOBJECT(RtEditor, GdauiRtEditor, GDAUI_RT_EDITOR, Gtk::Box, GtkBox)
+
+public:
+ _WRAP_METHOD_DOCS_ONLY(gdaui_rt_editor_new)
+ _CTOR_DEFAULT()
+
+public:
+ _WRAP_METHOD(Glib::ustring get_contents() const, gdaui_rt_editor_get_contents)
+ _WRAP_METHOD(void set_contents(const Glib::ustring& markup, int length = -1), gdaui_rt_editor_set_contents)
+ _WRAP_METHOD(void set_editable(bool editable), gdaui_rt_editor_set_editable)
+
+ _WRAP_SIGNAL(void changed(), "changed")
+
+ _WRAP_PROPERTY("buffer", Glib::RefPtr<Gtk::TextBuffer>)
+ _WRAP_PROPERTY("in-scrolled-window", bool)
+ _WRAP_PROPERTY("no-background", bool)
+ _WRAP_PROPERTY("show-markup", bool)
+};
+
+} // namespace GdaUI
+
+} // namespace Gnome
diff --git a/tools/extra_defs_gen/generate_defs_libgda_ui.cc b/tools/extra_defs_gen/generate_defs_libgda_ui.cc
index 09bd7e0..e15b8b7 100644
--- a/tools/extra_defs_gen/generate_defs_libgda_ui.cc
+++ b/tools/extra_defs_gen/generate_defs_libgda_ui.cc
@@ -35,6 +35,7 @@
#include <libgda-ui/gdaui-provider-selector.h>
#include <libgda-ui/gdaui-raw-form.h>
#include <libgda-ui/gdaui-raw-grid.h>
+#include <libgda-ui/gdaui-rt-editor.h>
#include <libgda-ui/gdaui-server-operation.h>
#include <libgda-ui/gdaui-tree-store.h>
#include <iostream>
@@ -60,6 +61,7 @@ int main(int, char**)
<< get_defs(GDAUI_TYPE_PROVIDER_SELECTOR) << std::endl
<< get_defs(GDAUI_TYPE_RAW_FORM) << std::endl
<< get_defs(GDAUI_TYPE_RAW_GRID) << std::endl
+ << get_defs(GDAUI_TYPE_RT_EDITOR) << std::endl
<< get_defs(GDAUI_TYPE_SERVER_OPERATION) << std::endl
<< get_defs(GDAUI_TYPE_TREE_STORE) << std::endl
;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]