diff --git a/src/gui/panel/timeline-panel.cpp b/src/gui/panel/timeline-panel.cpp index 09f725ae8..6be25e6b4 100644 --- a/src/gui/panel/timeline-panel.cpp +++ b/src/gui/panel/timeline-panel.cpp @@ -40,6 +40,7 @@ #include "lib/format-cout.hpp" //#include "lib/util.hpp" +#include @@ -50,6 +51,7 @@ using util::_Fmt; using sigc::mem_fun; using std::cout; using std::endl; +using std::rand; namespace gui { @@ -66,6 +68,7 @@ namespace panel { , button_2_() , frame_("Gtk::Layout Experiments") , scroller_() + , canvas_() { twoParts_.pack_start(buttons_, Gtk::PACK_SHRINK); twoParts_.pack_start(frame_); @@ -87,10 +90,11 @@ namespace panel { scroller_.set_shadow_type(Gtk::SHADOW_NONE); scroller_.set_border_width(10); + scroller_.add(canvas_); - chldEx_ = Gtk::manage(new ChildEx); - scroller_.add(*chldEx_); + canvas_.set_size(1000,500); + // show everything.... this->add(twoParts_); this->show_all(); } @@ -112,6 +116,13 @@ namespace panel { TimelinePanel::experiment_1() { frame_.set_label("Experiment 1..."); + + ChildEx* chld = makeChld(); + childz_.push_back(chld); + uint x = rand() % 1000; + uint y = rand() % 500; + canvas_.put(*chld, x, y); + chld->show(); } @@ -145,12 +156,19 @@ namespace panel { } + ChildEx* + TimelinePanel::makeChld() + { + return Gtk::manage(new ChildEx); + } + + ////////////////////////////////////////////////////////////////////TICKET #1020 : verification code for instance management ChildEx::~ChildEx() { --instanceCnt; if (instanceCnt > 0) - cout << " 💀 still "< +#include @@ -42,7 +43,7 @@ namespace gui { namespace model{ class Sequence; } - namespace panel { +namespace panel { //using std::shared_ptr; @@ -74,7 +75,7 @@ namespace model{ * As of 10/2016, we start this task with an exploration of GTK behaviour * * \par Plan of investigation - * 1. place some simple widgets (Buttons) + * 1. place some simple widgets (Buttons) ✔ * 2. learn how to draw * 3. place a huge number of widgets, to scrutinise scrolling and performance * 4. place widgets overlapping @@ -108,8 +109,12 @@ namespace model{ Gtk::Button button_2_; Gtk::Frame frame_; Gtk::ScrolledWindow scroller_; + Gtk::Layout canvas_; - ChildEx* chldEx_; + ChildEx* makeChld(); + + using ChildV = std::vector; + ChildV childz_; void experiment_1(); void experiment_2(); diff --git a/wiki/renderengine.html b/wiki/renderengine.html index 2978de301..2e30bec51 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -2635,7 +2635,7 @@ In the most general case, there can be per-track content and nested content at t &rarr; important question: how to [[organise the widgets|GuiTimelineWidgetStructure]] -
+
The Timeline is probably the most prominent place in the GUI where we need to come up with a custom UI design.
 Instead of combining standard components in one of the well-known ways, here we need to come up with our own handling solution -- which also means to write one or several custom GTK widgets. Thus the question of layout and screen space division and organisation becomes a crucial design decision. The ~GTK-2 Gui, as implemented currently, did already take some steps along this route, yet this kind of decision should be cast and documented explicitly (be it after the fact).
 
@@ -2689,6 +2689,13 @@ In order to build a sensible plan for our timeline structure, we need to investi
 # retrofit all preceding tests to use this "''clip''" widget
 
 !!!Observations
+* the size of the scrollable area needs to be setup beforehand, otherwise children won't show up
+* children need to be made visible, otherwise they are added, but remain hidden
+* the coordinate of children (upper left corner) is within the scrollable area, but the extension might well be beyond
+* children may be so close to the boundary, that it is not possible to click on them
+* after receiving an onClic event, the scrollable area jumps back to (left, top).
+* when overall window is enlarged, the visible area seems to be expanded. Then even children close to boundary come into sight and are clickable.
+
 
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 7e46e312b..4d91388d2 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -9345,9 +9345,10 @@ - + + @@ -9359,9 +9360,13 @@ - + + + + +