[clutter-gtkmm] [Examples] Updated event example to new api.
- From: Chris KÃhl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gtkmm] [Examples] Updated event example to new api.
- Date: Thu, 30 Jun 2011 23:28:39 +0000 (UTC)
commit d19c3776149a8880b609d8cc8cedaf22ec92aa80
Author: Chris KÃhl <chrisk openismus com>
Date: Fri Jul 1 00:59:49 2011 +0200
[Examples] Updated event example to new api.
* examples/events/event.[h|cc]
ChangeLog | 6 ++++++
examples/events/event.cc | 20 ++++++++++----------
examples/events/event.h | 2 +-
3 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8bbeccf..7c03548 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2011-07-01 Chris KÃhl <chrisk openismus com>
+ [Examples] Updated event example to new api.
+
+ * examples/events/event.[h|cc]
+
+2011-07-01 Chris KÃhl <chrisk openismus com>
+
Removed remaining viewport.h include.
* /clutter-gtk/clutter-gtkmm.h
diff --git a/examples/events/event.cc b/examples/events/event.cc
index 917eef0..8ccc4df 100644
--- a/examples/events/event.cc
+++ b/examples/events/event.cc
@@ -6,10 +6,10 @@ Event::Event()
m_label_y("Rotate y-axis"),
m_label_z("Rotate z-axis"),
m_label_opacity("Adjust opacity"),
- m_adjustment_x(0.0, 0.0, 360.0),
- m_adjustment_y(0.0, 0.0, 360.0),
- m_adjustment_z(0.0, 0.0, 360.0),
- m_adjustment_opacity(255.0, 0.0, 255.0),
+ m_adjustment_x(Gtk::Adjustment::create(0.0, 0.0, 360.0)),
+ m_adjustment_y(Gtk::Adjustment::create(0.0, 0.0, 360.0)),
+ m_adjustment_z(Gtk::Adjustment::create(0.0, 0.0, 360.0)),
+ m_adjustment_opacity(Gtk::Adjustment::create(255.0, 0.0, 255.0)),
m_spin_x(m_adjustment_x),
m_spin_y(m_adjustment_y),
m_spin_z(m_adjustment_z),
@@ -33,9 +33,9 @@ Event::Event()
m_hbox.pack_start(m_embed);
m_stage = m_embed.get_stage();
- Clutter::Color stage_color;
- Clutter::Gtk::get_bg_color(*this, Gtk::STATE_NORMAL, stage_color);
- m_stage->set_color(stage_color);
+ // Clutter::Color stage_color;
+ // Clutter::Gtk::get_bg_color(*this, Gtk::STATE_NORMAL, stage_color);
+ // m_stage->set_color(stage_color);
m_embed.set_size_request(640, 480);
m_stage->signal_captured_event().connect(sigc::mem_fun(*this, &Event::on_stage_capture));
@@ -51,9 +51,9 @@ Event::Event()
m_hand->set_reactive();
m_hand->signal_button_press_event().connect(sigc::mem_fun(*this, &Event::on_hand_button_press));
- Clutter::Color text_color;
- Clutter::Gtk::get_text_color(*this, Gtk::STATE_NORMAL, text_color);
- m_clutter_entry = Clutter::Text::create("Sans 10", "", text_color);
+ // Clutter::Color text_color;
+ // Clutter::Gtk::get_text_color(*this, Gtk::STATE_NORMAL, text_color);
+ // m_clutter_entry = Clutter::Text::create("Sans 10", "", text_color);
m_stage->add_actor(m_clutter_entry);
m_clutter_entry->set_position(0, 0);
m_clutter_entry->set_size(500, 20);
diff --git a/examples/events/event.h b/examples/events/event.h
index a33c9cf..5078a95 100644
--- a/examples/events/event.h
+++ b/examples/events/event.h
@@ -22,7 +22,7 @@ protected:
Gtk::Entry m_gtk_entry;
Gtk::Button m_button;
Gtk::Label m_label_x, m_label_y, m_label_z, m_label_opacity;
- Gtk::Adjustment m_adjustment_x, m_adjustment_y, m_adjustment_z, m_adjustment_opacity;
+ Glib::RefPtr<Gtk::Adjustment> m_adjustment_x, m_adjustment_y, m_adjustment_z, m_adjustment_opacity;
Gtk::SpinButton m_spin_x, m_spin_y, m_spin_z, m_spin_opacity;
Clutter::Gtk::Embed m_embed;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]