Inv(#1020): remove debugging output

...done thus far!
This commit is contained in:
Fischlurch 2016-11-01 23:25:54 +01:00
parent 1fbade3a67
commit 1e642dc805
4 changed files with 24 additions and 36 deletions

View file

@ -256,48 +256,34 @@ namespace panel {
Gtk::Container::ForeachSlot callback
= [&](Gtk::Widget& chld)
{
cout << "hoya "<<chld;
auto allo = chld.get_allocation();
uint x = allo.get_x();
uint y = allo.get_y();
x += allo.get_width();
y += allo.get_height();
auto alloc = chld.get_allocation();
uint x = alloc.get_x();
uint y = alloc.get_y();
x += alloc.get_width();
y += alloc.get_height();
extH = max (extH, x);
extV = max (extV, y);
cout << "x="<<x<<" y="<<y<<endl;
};
foreach(callback);
recalcExtension_ = false;
set_size (extH, extV);
}
namespace {
_Fmt debugAdj(" | Adj-%s(%3d<%5.2f<%3d)");
}
bool
Canvas::on_draw(Cairo::RefPtr<Cairo::Context> const& cox)
{
if (shallDraw_)
{
int h = get_allocation().get_width();
int v = get_allocation().get_height();
uint extH=20, extV=20;
uint extH, extV;
determineExtension();
get_size (extH, extV);
auto adjH = get_hadjustment();
auto adjV = get_vadjustment();
cout << "draw h:"<<h<<" v:"<<v
<< " ext-h:"<<extH<<" ext-v:"<<extV
<< string(debugAdj % "H" % adjH->get_lower() % adjH->get_value() % adjH->get_upper())
<< string(debugAdj % "V" % adjV->get_lower() % adjV->get_value() % adjV->get_upper())
<< endl;
double offH = adjH->get_value();
double offV = adjV->get_value();
cox->save();
cox->translate(-offH, -offV);
@ -310,7 +296,7 @@ namespace panel {
cox->restore();
// cause child widgets to be redrawn
Gtk::Layout::on_draw(cox);
bool event_is_handled = Gtk::Layout::on_draw(cox);
// any drawing which follows happens on top of child widgets...
cox->save();
@ -322,7 +308,7 @@ namespace panel {
cox->stroke();
cox->restore();
return false;
return event_is_handled;
}
else
return Gtk::Layout::on_draw(cox);

View file

@ -98,10 +98,10 @@ namespace panel {
*
* \par Plan of investigation
* 1. place some simple widgets (Buttons)
* 2. learn how to draw
* 2. learn how to draw
* 3. place a huge number of widgets, to scrutinise scrolling and performance
* 4. place widgets overlapping and irregularily, beyond the scrollable area
* 5. bind signals to those widgets, to verify event dispatching
* 5. bind signals to those widgets, to verify event dispatching
* 6. bind some further signal(s) to the ~GtkLayout container
* 7. hide and re-show a partially and a totally overlapped widget
* 8. find a way to move a widget and delete arbitrary widgets

View file

@ -2648,7 +2648,7 @@ In the most general case, there can be per-track content and nested content at t
&amp;rarr; important question: how to [[organise the widgets|GuiTimelineWidgetStructure]]
</pre>
</div>
<div title="GuiTimelineWidgetStructure" creator="Ichthyostega" modifier="Ichthyostega" created="201410250002" modified="201611012218" tags="GuiPattern discuss decision impl" changecount="58">
<div title="GuiTimelineWidgetStructure" creator="Ichthyostega" modifier="Ichthyostega" created="201410250002" modified="201611012221" tags="GuiPattern discuss decision impl" changecount="59">
<pre>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).
@ -2746,12 +2746,11 @@ In order to build a sensible plan for our timeline structure, we need to investi
Gtk::Container::ForeachSlot callback
= [&amp;](Gtk::Widget&amp; chld)
{
cout &lt;&lt; &quot;hoya &quot;&lt;&lt;chld;
auto allo = chld.get_allocation();
uint x = allo.get_x();
uint y = allo.get_y();
x += allo.get_width();
y += allo.get_height();
auto alloc = chld.get_allocation();
uint x = alloc.get_x();
uint y = alloc.get_y();
x += alloc.get_width();
y += alloc.get_height();
extH = max (extH, x);
extV = max (extV, y);
};

View file

@ -9389,9 +9389,10 @@
<node CREATED="1477601706168" ID="ID_130395672" MODIFIED="1477601711906" TEXT="Kind-Klasse anlegen"/>
<node CREATED="1477601712063" ID="ID_1720776876" MODIFIED="1477601717354" TEXT="Kinder managen"/>
</node>
<node CREATED="1477595418669" ID="ID_517122292" MODIFIED="1477596119220" TEXT="# learn how to draw">
<node CREATED="1477595418669" ID="ID_517122292" MODIFIED="1478039048340" TEXT="# learn how to draw">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
<icon BUILTIN="full-2"/>
<icon BUILTIN="button_ok"/>
<node CREATED="1477788816168" ID="ID_904860978" MODIFIED="1477788929338" TEXT="documentation">
<icon BUILTIN="info"/>
<node CREATED="1477788823751" ID="ID_111966354" LINK="https://developer.gnome.org/gtkmm-tutorial/stable/chapter-drawingarea.html.en" MODIFIED="1477788918987" TEXT="read the custom drawing chapter">
@ -9425,7 +9426,7 @@
</html></richcontent>
</node>
</node>
<node CREATED="1477791881630" ID="ID_1823256674" MODIFIED="1478038049036" TEXT="coordinates">
<node CREATED="1477791881630" FOLDED="true" HGAP="37" ID="ID_1823256674" MODIFIED="1478039071618" TEXT="coordinates" VSHIFT="11">
<icon BUILTIN="button_ok"/>
<node CREATED="1477791885614" ID="ID_380369648" MODIFIED="1477791916343">
<richcontent TYPE="NODE"><html>
@ -9590,17 +9591,19 @@
<icon BUILTIN="button_ok"/>
</node>
</node>
<node CREATED="1477595418670" ID="ID_1370967982" MODIFIED="1477596119220" TEXT="# bind signals to those widgets, to verify event dispatching">
<node CREATED="1477595418670" ID="ID_1370967982" MODIFIED="1478039086087" TEXT="# bind signals to those widgets, to verify event dispatching">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
<icon BUILTIN="full-5"/>
<icon BUILTIN="button_ok"/>
</node>
<node CREATED="1477595418670" ID="ID_1603374862" MODIFIED="1477596119219" TEXT="# bind some further signal(s) to the GtkLayout container">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
<icon BUILTIN="full-6"/>
</node>
<node CREATED="1477595418670" ID="ID_496085779" MODIFIED="1477596119219" TEXT="# hide and re-show a partially and a totally overlapped widget">
<node CREATED="1477595418670" ID="ID_496085779" MODIFIED="1478039095462" TEXT="# hide and re-show a partially and a totally overlapped widget">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
<icon BUILTIN="full-7"/>
<icon BUILTIN="button_ok"/>
</node>
<node CREATED="1477595418670" ID="ID_1516591439" MODIFIED="1477754020121" TEXT="# move and delete widgets">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>