[goocanvasmm] Build the examples during make check (and distcheck).
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvasmm] Build the examples during make check (and distcheck).
- Date: Thu, 24 Feb 2011 22:16:20 +0000 (UTC)
commit 03fcc4c26e9216ef4a2dfe77c66bf7bbd6e93fd6
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Feb 24 15:08:54 2011 +0100
Build the examples during make check (and distcheck).
* Makefile.am: Add examples to the SUBDIRS.
* examples: Remove the individual Makefile.am files, adding their contents
to examples/Makefile.am.
The build of the examples was apparently disabled since we converted the build
to use mm-common.
ChangeLog | 11 +++++
Makefile.am | 2 +-
configure.ac | 1 +
examples/Makefile.am | 72 ++++++++++++++++++++++++++++++-
examples/coordinates/Makefile.am | 5 --
examples/custom_item/Makefile.am | 5 --
examples/demo/Makefile.am | 5 --
examples/demo/primitives.cc | 20 ++++----
examples/demo/primitives.h | 2 +-
examples/drag_to_canvas/Makefile.am | 5 --
examples/drag_to_canvas/examplewindow.h | 2 +-
examples/moving_shapes/Makefile.am | 5 --
examples/simple/Makefile.am | 5 --
examples/simple/examplewindow.cc | 2 +-
examples/table/Makefile.am | 5 --
examples/tablemodel/Makefile.am | 5 --
examples/text/Makefile.am | 5 --
17 files changed, 96 insertions(+), 61 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8c1fe80..d0b0adb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-02-24 Murray Cumming <murrayc murrayc com>
+
+ Build the examples during make check (and distcheck).
+
+ * Makefile.am: Add examples to the SUBDIRS.
+ * examples: Remove the individual Makefile.am files, adding their contents
+ to examples/Makefile.am.
+
+ The build of the examples was apparently disabled since we converted the build
+ to use mm-common.
+
1.90.3:
2011-02-02 Murray Cumming <murrayc murrayc com>
diff --git a/Makefile.am b/Makefile.am
index cd85c40..45c9a95 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ doc_subdirs = doc
else
doc_subdirs =
endif
-SUBDIRS = $(src_subdirs) goocanvas/goocanvasmm $(doc_subdirs)
+SUBDIRS = $(src_subdirs) goocanvas/goocanvasmm $(doc_subdirs) examples
goocanvasmm_includedir = $(includedir)/$(GOOCANVASMM_MODULE_NAME)
goocanvasmm_include_HEADERS = goocanvas/goocanvasmm.h
diff --git a/configure.ac b/configure.ac
index b9c4bcf..689129c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,7 @@ AC_CONFIG_FILES([Makefile
goocanvas/${GOOCANVASMM_MODULE_NAME}-uninstalled.pc:goocanvas/goocanvasmm-uninstalled.pc.in
goocanvas/src/Makefile
goocanvas/goocanvasmm/Makefile
+ examples/Makefile
doc/Makefile
doc/reference/Doxyfile])
AC_OUTPUT
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 9110750..700b741 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,5 +1,73 @@
-SUBDIRS = drag_to_canvas simple moving_shapes demo coordinates text table tablemodel custom_item
+include $(top_srcdir)/examples/Makefile.am_fragment
-#EXTRA_DIST = Makefile.am_fragment
+AUTOMAKE_OPTIONS = subdir-objects
+AM_CPPFLAGS = -I$(top_builddir) $(GOOCANVASMM_CFLAGS)
+AM_CXXFLAGS = $(GOOCANSASMM_WXXFLAGS)
+LDADD = $(GOOCANVASMM_LIBS)
+check_PROGRAMS = \
+ coordinates/example \
+ custom_item/example \
+ demo/example \
+ drag_to_canvas/example \
+ simple/example \
+ moving_shapes/example \
+ table/example \
+ tablemodel/example \
+ text/example
+
+coordinates_example_SOURCES = \
+ coordinates/main.cc \
+ coordinates/window.cc \
+ coordinates/window.h
+
+custom_item_example_SOURCES = \
+ custom_item/main.cc \
+ custom_item/exampleitem.cc \
+ custom_item/exampleitem.h \
+ custom_item/examplewindow.cc \
+ custom_item/examplewindow.h
+
+demo_example_SOURCES = \
+ demo/main.cc \
+ demo/page.h \
+ demo/primitives.h \
+ demo/primitives.cc \
+ demo/window.cc \
+ demo/window.h
+
+drag_to_canvas_example_SOURCES = \
+ drag_to_canvas/main.cc \
+ drag_to_canvas/examplewindow.cc \
+ drag_to_canvas/examplewindow.h
+
+simple_example_SOURCES = \
+ simple/main.cc \
+ simple/examplewindow.cc \
+ simple/examplewindow.h
+
+moving_shapes_example_SOURCES = \
+ moving_shapes/main.cc \
+ moving_shapes/window.cc \
+ moving_shapes/window.h
+
+table_example_SOURCES = \
+ table/main.cc \
+ table/examplewindow.cc \
+ table/examplewindow.h
+
+tablemodel_example_SOURCES = \
+ tablemodel/main.cc \
+ tablemodel/examplewindow.cc \
+ tablemodel/examplewindow.h
+
+text_example_SOURCES = \
+ text/main.cc \
+ text/window.cc \
+ text/window.h
+
+dist_noinst_DATA = \
+ demo/demo.glade \
+ demo/flower.png \
+ demo/toroid.png
diff --git a/examples/demo/primitives.cc b/examples/demo/primitives.cc
index f38d680..7d49a30 100644
--- a/examples/demo/primitives.cc
+++ b/examples/demo/primitives.cc
@@ -98,7 +98,7 @@ Primitives::_setup_heading(const Glib::ustring& heading, int pos)
double x = (pos%3) * 200 + 100 ;
double y = (pos/3) * 150 + 5 ;
- Glib::RefPtr<Goocanvas::Text> text = Goocanvas::Text::create(heading, x, y, -1, Gtk::ANCHOR_N);
+ Glib::RefPtr<Goocanvas::Text> text = Goocanvas::Text::create(heading, x, y, -1, Goocanvas::ANCHOR_N);
_canvas->get_root_item()->add_child(text);
#ifdef GLIBMM_PROPERTIES_ENABLED
text->property_font() = "Sans 12" ;
@@ -302,7 +302,7 @@ Primitives::_setup_texts()
Glib::RefPtr<Goocanvas::Item> anchor;
anchor = _create_anchor(420, 20);
- text = Goocanvas::Text::create("Anchor NW", 0, 0, -1, Gtk::ANCHOR_NW);
+ text = Goocanvas::Text::create("Anchor NW", 0, 0, -1, Goocanvas::ANCHOR_NW);
anchor->add_child(text);
//ellipse->property_fill_pattern() = _create_stipple("blue");
Cairo::RefPtr<Cairo::Pattern> p = _create_stipple("blue");
@@ -319,7 +319,7 @@ Primitives::_setup_texts()
_setup_signals(text);
anchor = _create_anchor(470, 75);
- text = Goocanvas::Text::create("Anchor center\nJustify center\nMultiline text\n8bit text 'gibberish'", 0, 0, -1, Gtk::ANCHOR_CENTER);
+ text = Goocanvas::Text::create("Anchor center\nJustify center\nMultiline text\n8bit text 'gibberish'", 0, 0, -1, Goocanvas::ANCHOR_CENTER);
anchor->add_child(text);
#ifdef GLIBMM_PROPERTIES_ENABLED
text->property_font() = "monospace bold 14" ;
@@ -335,7 +335,7 @@ Primitives::_setup_texts()
anchor = _create_anchor(420, 240);
text = Goocanvas::Text::create(
"This is a very long paragraph that will need to be wrapped over several lines so we can see what happens to line-breaking as the view is zoomed in and out.",
- 0, 0, 180, Gtk::ANCHOR_W);
+ 0, 0, 180, Goocanvas::ANCHOR_W);
anchor->add_child(text);
#ifdef GLIBMM_PROPERTIES_ENABLED
text->property_font() = "Sans 12" ;
@@ -346,7 +346,7 @@ Primitives::_setup_texts()
#endif
_setup_signals(text);
- text = Goocanvas::Text::create("Ellipsized text.", 20, 420, 115, Gtk::ANCHOR_W);
+ text = Goocanvas::Text::create("Ellipsized text.", 20, 420, 115, Goocanvas::ANCHOR_W);
_canvas->get_root_item()->add_child(text);
#ifdef GLIBMM_PROPERTIES_ENABLED
text->property_font() = "Sans 12" ;
@@ -396,10 +396,10 @@ Primitives::_setup_images()
#endif
_setup_signals(img);
- _create_flower(20.0, 170.0, Gtk::ANCHOR_NW);
- _create_flower(180.0, 170.0, Gtk::ANCHOR_NE);
- _create_flower(20.0, 280.0, Gtk::ANCHOR_SW);
- _create_flower(180.0, 280.0, Gtk::ANCHOR_SE);
+ _create_flower(20.0, 170.0, Goocanvas::ANCHOR_NW);
+ _create_flower(180.0, 170.0, Goocanvas::ANCHOR_NE);
+ _create_flower(20.0, 280.0, Goocanvas::ANCHOR_SW);
+ _create_flower(180.0, 280.0, Goocanvas::ANCHOR_SE);
}
void
@@ -510,7 +510,7 @@ Primitives::_create_anchor(double x, double y)
}
void
-Primitives::_create_flower(double x, double y, Gtk::AnchorType anchor)
+Primitives::_create_flower(double x, double y, Goocanvas::AnchorType anchor)
{
Cairo::RefPtr<Cairo::ImageSurface> surface ;
diff --git a/examples/demo/primitives.h b/examples/demo/primitives.h
index 9556d7b..119ca4d 100644
--- a/examples/demo/primitives.h
+++ b/examples/demo/primitives.h
@@ -59,7 +59,7 @@ private:
Glib::RefPtr<Goocanvas::Item>
_create_anchor(double x, double y);
- void _create_flower(double x, double y, Gtk::AnchorType anchor);
+ void _create_flower(double x, double y, Goocanvas::AnchorType anchor);
void _create_polish_diamond();
void _create_hilbert();
diff --git a/examples/drag_to_canvas/examplewindow.h b/examples/drag_to_canvas/examplewindow.h
index 5429ed4..ec6605e 100644
--- a/examples/drag_to_canvas/examplewindow.h
+++ b/examples/drag_to_canvas/examplewindow.h
@@ -52,7 +52,7 @@ protected:
Gtk::HBox m_hbox;
Gtk::Button m_button_rect, m_button_ellipse;
- std::list<Gtk::TargetEntry> m_drag_targets;
+ std::vector<Gtk::TargetEntry> m_drag_targets;
Glib::RefPtr<Goocanvas::Item> m_layout_item_dropping;
bool m_drag_preview_requested;
};
diff --git a/examples/simple/examplewindow.cc b/examples/simple/examplewindow.cc
index 59975e4..afa24b8 100644
--- a/examples/simple/examplewindow.cc
+++ b/examples/simple/examplewindow.cc
@@ -46,7 +46,7 @@ ExampleWindow::ExampleWindow()
rect->signal_button_press_event ().connect (sigc::mem_fun (this,
&ExampleWindow::on_rect_button_press));
- Glib::RefPtr<Goocanvas::Text> text = Goocanvas::Text::create("Hello World", 300, 300, -1, Gtk::ANCHOR_CENTER);
+ Glib::RefPtr<Goocanvas::Text> text = Goocanvas::Text::create("Hello World", 300, 300, -1, Goocanvas::ANCHOR_CENTER);
root->add_child(text);
#ifdef GLIBMM_PROPERTIES_ENABLED
text->property_font() = "Sans 24";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]