From 2350998fdb67ecbf8854134d9d85fa5f28996390 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 27 Oct 2016 04:15:20 +0200 Subject: [PATCH] setup layout for experiments (closes #1021) --- src/gui/panel/timeline-panel.cpp | 43 ++++++++++++++++++++++ src/gui/panel/timeline-panel.hpp | 12 +++++- wiki/thinkPad.ichthyo.mm | 63 ++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 1 deletion(-) diff --git a/src/gui/panel/timeline-panel.cpp b/src/gui/panel/timeline-panel.cpp index 6595c43e8..1d82f180e 100644 --- a/src/gui/panel/timeline-panel.cpp +++ b/src/gui/panel/timeline-panel.cpp @@ -44,6 +44,7 @@ //using std::shared_ptr; //using std::weak_ptr; //using util::contains; +using sigc::mem_fun; namespace gui { @@ -54,7 +55,35 @@ namespace panel { TimelinePanel::TimelinePanel (workspace::PanelManager& panelManager, Gdl::DockItem& dockItem) : Panel(panelManager, dockItem, getTitle(), getStockID()) + , twoParts_(Gtk::ORIENTATION_VERTICAL) + , buttons_() + , button_1_() + , button_2_() + , frame_("Gtk::Layout Experiments") + , scroller_() { + twoParts_.pack_start(buttons_, Gtk::PACK_SHRINK); + twoParts_.pack_start(frame_); + + buttons_.add(button_1_); + buttons_.add(button_2_); + buttons_.set_layout(Gtk::BUTTONBOX_START); + + button_1_.set_label("Experiment _1"); + button_1_.signal_clicked().connect( + mem_fun(*this, &TimelinePanel::experiment_1)); + + button_2_.set_label("Experiment _2"); + button_2_.signal_clicked().connect( + mem_fun(*this, &TimelinePanel::experiment_2)); + + frame_.add(scroller_); + frame_.set_border_width(5); + + scroller_.set_shadow_type(Gtk::SHADOW_NONE); + + this->add(twoParts_); + this->show_all(); } const char* @@ -70,5 +99,19 @@ namespace panel { } + void + TimelinePanel::experiment_1() + { + frame_.set_label("Experiment 1..."); + } + + + void + TimelinePanel::experiment_2() + { + frame_.set_label("Experiment 2..."); + } + + }} // namespace gui::panel diff --git a/src/gui/panel/timeline-panel.hpp b/src/gui/panel/timeline-panel.hpp index b8ede1ea1..3224a0e1f 100644 --- a/src/gui/panel/timeline-panel.hpp +++ b/src/gui/panel/timeline-panel.hpp @@ -50,6 +50,7 @@ namespace model{ /** * Dockable panel to hold timeline widget(s). + * @todo as of 10/2016 this is used for exploring GTK behaviour */ class TimelinePanel : public Panel @@ -66,7 +67,16 @@ namespace model{ static const gchar* getStockID(); - protected: + private: + Gtk::Box twoParts_; + Gtk::ButtonBox buttons_; + Gtk::Button button_1_; + Gtk::Button button_2_; + Gtk::Frame frame_; + Gtk::ScrolledWindow scroller_; + + void experiment_1(); + void experiment_2(); }; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index ea7fef465..b1495d29b 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -174,6 +174,23 @@ + + + + + + + + + + + + + + + + + @@ -9121,6 +9138,52 @@ + + + + + + + + + + + + + + + + +

+ ...nicht mehr das klassische gtk::Main +

+ + +
+
+
+ + + + + + + + + + +

+ ...können vom CSS-Stylesheet aus gesetzt werden. +

+

+ Siehe Beschreibung im Beispiel/Tutorial +

+ + +
+ +
+