[libgda-uimm] Add Grid and RawGrid classes.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda-uimm] Add Grid and RawGrid classes.
- Date: Thu, 4 Mar 2010 00:27:49 +0000 (UTC)
commit 71693e63be3096c69b9e07fcfea22b6817b17316
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Wed Mar 3 15:55:00 2010 -0500
Add Grid and RawGrid classes.
* libgda-ui/libgda-uimm.h:
* libgda-ui/src/filelist.am:
* libgda-ui/src/grid.ccg:
* libgda-ui/src/grid.hg:
* libgda-ui/src/rawgrid.ccg:
* libgda-ui/src/rawgrid.hg: Add Grid and RawGrid classes which are
related in a similar way as Form and RawForm are.
* tools/m4/convert_libgda_uimm.m4: Added RawGrid conversions.
.gitignore | 2 +-
ChangeLog | 14 +++++++
libgda-ui/libgda-uimm.h | 2 +
libgda-ui/src/filelist.am | 4 ++-
libgda-ui/src/grid.ccg | 31 +++++++++++++++++
libgda-ui/src/grid.hg | 70 +++++++++++++++++++++++++++++++++++++
libgda-ui/src/rawgrid.ccg | 31 +++++++++++++++++
libgda-ui/src/rawgrid.hg | 72 +++++++++++++++++++++++++++++++++++++++
tools/m4/convert_libgda_uimm.m4 | 4 ++
9 files changed, 228 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 47c8962..079208f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,4 @@ stamp-h?
/libgda-ui/libgda-uimm-*.pc
/libgda-ui/libgda-uimmconfig.h
/libgda-ui/src/.stamps/
-/tools/extra_defs_gen/generate_libgda_ui
+/tools/extra_defs_gen/generate_defs_libgda_ui
diff --git a/ChangeLog b/ChangeLog
index b0eeab0..38c4de5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2010-03-03 José Alburquerque <jaalburqu svn gnome org>
+ Add Grid and RawGrid classes.
+
+ * libgda-ui/libgda-uimm.h:
+ * libgda-ui/src/filelist.am:
+ * libgda-ui/src/grid.ccg:
+ * libgda-ui/src/grid.hg:
+ * libgda-ui/src/rawgrid.ccg:
+ * libgda-ui/src/rawgrid.hg: Add Grid and RawGrid classes which are
+ related in a similar way as Form and RawForm are.
+ * tools/m4/convert_libgda_uimm.m4: Added RawGrid conversions.
+ * .gitignore: Typo.
+
+2010-03-03 José Alburquerque <jaalburqu svn gnome org>
+
Replace first line of sources with library name instead of filename.
* libgda-ui/src/basicform.ccg:
diff --git a/libgda-ui/libgda-uimm.h b/libgda-ui/libgda-uimm.h
index ade6bb0..bfa1a5c 100644
--- a/libgda-ui/libgda-uimm.h
+++ b/libgda-ui/libgda-uimm.h
@@ -26,8 +26,10 @@
#include <dataproxyinfo.h>
#include <dataselector.h>
#include <form.h>
+#include <grid.h>
#include <login.h>
#include <providerselector.h>
#include <rawform.h>
+#include <rawgrid.h>
#endif /* _LIBGDA_UIMM_H */
diff --git a/libgda-ui/src/filelist.am b/libgda-ui/src/filelist.am
index 091699b..249f38b 100644
--- a/libgda-ui/src/filelist.am
+++ b/libgda-ui/src/filelist.am
@@ -15,9 +15,11 @@ files_hg = \
dataproxyinfo.hg \
dataselector.hg \
form.hg \
+ grid.hg \
login.hg \
providerselector.hg \
- rawform.hg
+ rawform.hg \
+ rawgrid.hg
files_ccg = $(files_hg:.hg=.ccg)
diff --git a/libgda-ui/src/grid.ccg b/libgda-ui/src/grid.ccg
new file mode 100644
index 0000000..ef24633
--- /dev/null
+++ b/libgda-ui/src/grid.ccg
@@ -0,0 +1,31 @@
+/* libgda-uimm - a C++ wrapper for libgda-ui
+ *
+ * Copyright (c) 2010 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-grid.h>
+#include <libgdamm/datamodel.h>
+
+namespace Gnome
+{
+
+namespace GdaUI
+{
+
+} /* namespace GdaUI */
+
+} /* namespace Gnome */
diff --git a/libgda-ui/src/grid.hg b/libgda-ui/src/grid.hg
new file mode 100644
index 0000000..57310f4
--- /dev/null
+++ b/libgda-ui/src/grid.hg
@@ -0,0 +1,70 @@
+/* libgda-uimm - a C++ wrapper for libgda-ui
+ *
+ * Copyright (c) 2010 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>
+#include <libgda-uimm/dataproxy.h>
+#include <libgda-uimm/dataselector.h>
+#include <libgda-uimm/dataproxyinfo.h>
+
+_DEFS(libgda-uimm,libgda_ui)
+_PINCLUDE(gtkmm/private/box_p.h)
+
+namespace Gnome
+{
+
+// Gnome::Gda class forward declarations.
+namespace Gda
+{
+
+class DataModel;
+
+}
+
+namespace GdaUI
+{
+
+class RawGrid;
+
+/** Grid - Grid widget to manipulate data in a Gnome::Gda::DataModel, with
+ * decorations.
+ */
+class Grid :
+ public Gtk::VBox,
+ public DataSelector,
+ public DataProxy
+{
+ _CLASS_GTKOBJECT(Grid, GdauiGrid, GDAUI_GRID, Gtk::VBox, GtkVBox)
+ _IMPLEMENTS_INTERFACE(DataSelector)
+ _IMPLEMENTS_INTERFACE(DataProxy)
+
+public:
+ _WRAP_METHOD_DOCS_ONLY(gdaui_grid_new)
+ _WRAP_CTOR(Grid(const Glib::RefPtr<Gnome::Gda::DataModel>& model), gdaui_grid_new)
+
+public:
+ _WRAP_METHOD(void set_sample_size(int sample_size), gdaui_grid_set_sample_size)
+ _WRAP_PROPERTY("info", DataProxyInfo*)
+ _WRAP_PROPERTY("info-flags", DataProxyInfoFlag)
+ _WRAP_PROPERTY("model", Glib::RefPtr<Gnome::Gda::DataModel>)
+ _WRAP_PROPERTY("raw-grid", RawGrid*)
+};
+
+} // namespace GdaUI
+
+} // namespace Gnome
diff --git a/libgda-ui/src/rawgrid.ccg b/libgda-ui/src/rawgrid.ccg
new file mode 100644
index 0000000..c86139b
--- /dev/null
+++ b/libgda-ui/src/rawgrid.ccg
@@ -0,0 +1,31 @@
+/* libgda-uimm - a C++ wrapper for libgda-ui
+ *
+ * Copyright (c) 2010 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-raw-grid.h>
+#include <libgdamm/datamodel.h>
+
+namespace Gnome
+{
+
+namespace GdaUI
+{
+
+} /* namespace GdaUI */
+
+} /* namespace Gnome */
diff --git a/libgda-ui/src/rawgrid.hg b/libgda-ui/src/rawgrid.hg
new file mode 100644
index 0000000..2dbab5a
--- /dev/null
+++ b/libgda-ui/src/rawgrid.hg
@@ -0,0 +1,72 @@
+/* libgda-uimm - a C++ wrapper for libgda-ui
+ *
+ * Copyright (c) 2010 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/treeview.h>
+#include <libgda-uimm/dataselector.h>
+#include <libgda-uimm/dataproxy.h>
+
+_DEFS(libgda-uimm,libgda_ui)
+_PINCLUDE(gtkmm/private/treeview_p.h)
+
+namespace Gnome
+{
+
+// Gnome::Gda class forward declarations.
+namespace Gda
+{
+
+class DataModel;
+
+}
+
+namespace GdaUI
+{
+
+/** RawGrid - Grid widget to manipulate data in a Gnome::Gda::DataModel.
+ */
+class RawGrid :
+ public Gtk::TreeView,
+ public DataSelector,
+ public DataProxy
+{
+ _CLASS_GTKOBJECT(RawGrid, GdauiRawGrid, GDAUI_RAW_GRID, Gtk::TreeView, GtkTreeView)
+ _IMPLEMENTS_INTERFACE(DataSelector)
+ _IMPLEMENTS_INTERFACE(DataProxy)
+
+public:
+ _WRAP_METHOD_DOCS_ONLY(gdaui_raw_grid_new)
+ _WRAP_CTOR(RawGrid(const Glib::RefPtr<Gnome::Gda::DataModel>& model), gdaui_raw_grid_new)
+
+public:
+ _WRAP_METHOD(void set_sample_size(int sample_size), gdaui_raw_grid_set_sample_size)
+ _WRAP_METHOD(void set_sample_start(int sample_start), gdaui_raw_grid_set_sample_start)
+ _WRAP_METHOD(void set_layout_from_file(const std::string& file_name, const Glib::ustring& grid_name), gdaui_raw_grid_set_layout_from_file)
+
+ _WRAP_SIGNAL(void double_clicked(int arg1), "double-clicked")
+ _WRAP_SIGNAL(void populate_popup(Gtk::Menu* arg1), "populate-popup")
+
+ _WRAP_PROPERTY("global-actions-visible", bool)
+ _WRAP_PROPERTY("info-cell-visible", bool)
+ _WRAP_PROPERTY("model", Glib::RefPtr<Gnome::Gda::DataModel>)
+ //TODO: _WRAP_PROPERTY("xml-layout", gpointer)
+};
+
+} // namespace GdaUI
+
+} // namespace Gnome
diff --git a/tools/m4/convert_libgda_uimm.m4 b/tools/m4/convert_libgda_uimm.m4
index be7523d..20f130f 100644
--- a/tools/m4/convert_libgda_uimm.m4
+++ b/tools/m4/convert_libgda_uimm.m4
@@ -31,6 +31,10 @@ _CONVERSION(`Glib::RefPtr<Gnome::Gda::DataModelIter>', `GdaDataModelIter*', `Gli
dnl Holder:
_CONVERSION(`const Glib::RefPtr<Gnome::Gda::Holder>&', `GdaHolder*', `Glib::unwrap($3)')
+dnl Menu:
+_CONVERSION(`GtkMenu*', `Gtk::Menu*', `Glib::wrap($3)')
+_CONVERSION(`Gtk::Menu*', `GtkMenu*', `Glib::unwrap($3)')
+
dnl ServerProvider:
_CONVERSION(`GdaServerProvider*', `Glib::RefPtr<Gnome::Gda::ServerProvider>', `Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]