Relative-Hook: remove obsolete direct manipulation (test) code

the marked pars are diagnostics code anyway,
however, the first attempt used direct manipulation of the child offsets from "outside".
Now, after switching to the ViewHook-mechanism, such direct manipulation
of view innards is no longer neccessary, as can be verified by removing that test code now.
This commit is contained in:
Fischlurch 2020-02-27 21:42:40 +01:00
parent 0837498cc0
commit 1ee2f18d65
10 changed files with 16 additions and 62 deletions

View file

@ -42,9 +42,6 @@
#include "common/advice.hpp"
#include "lib/util.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
#include "lib/format-cout.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
//#include <algorithm>
//#include <vector>
@ -521,23 +518,6 @@ namespace timeline {
adjust (rulerCanvas_, canvasWidth, rulerHeight);
adjust (mainCanvas_, canvasWidth, max(0, totalHeight-rulerHeight));
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
///
///
void
BodyCanvasWidget::DEBUG_injectTrackLabel (cuString const& trackName, int startLine)
{
NOTREACHED ("debug code obsoleted by the new ViewHook concept");
///////////////////////////TODO TOD-oh
// Gtk::Button* butt = Gtk::manage (new Gtk::Button{trackName});
// butt->signal_clicked().connect(
// [butt]{ cout << "|=="<<butt->get_label()<<endl; });
//
// uint x = rand() % 50;
// mainCanvas_.put (*butt, x, startLine);
// butt->show();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
TimelineCanvas&
BodyCanvasWidget::getCanvas (int yPos)

View file

@ -134,9 +134,6 @@ namespace timeline {
/** a way to get and possibly (re)compute the current TrackProfile */
using ProfileGetter = std::function<TrackProfile&()>;
ProfileGetter getProfile;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
void DEBUG_injectTrackLabel(cuString const& trackName, int startLine);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
protected: /* ==== Interface: ViewHook ===== */

View file

@ -44,9 +44,6 @@
#include "stage/timeline/timeline-controller.hpp"
#include "stage/timeline/track-presenter.hpp"
#include "stage/timeline/marker-widget.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
#include "stage/timeline/body-canvas-widget.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
//#include "stage/workspace/workspace-window.hpp"
//#include "stage/ui-bus.hpp"
@ -90,9 +87,6 @@ namespace timeline {
, name_{identity.getSym()} // fallback initialise name from human-readable ID symbol
, markers_{}
, fork_{new TrackPresenter{trackID, nexus, layoutManager}}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
, DEBUG_canvas_{layoutManager.exposeCanvasForDebug()}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
{ }
@ -107,7 +101,7 @@ namespace timeline {
{
if (mark.idi.getSym() == "test" && this->fork_)
{
this->fork_->injectDebugTrackLabels(DEBUG_canvas_);
this->fork_->injectDebugTrackLabels();
}
else // forward to default handler
model::Controller::doMark (mark);

View file

@ -74,9 +74,6 @@ namespace timeline {
class TrackPresenter;
class TimelineLayout;
class MarkerWidget;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
class BodyCanvasWidget;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
/**
@ -124,7 +121,6 @@ namespace timeline {
private:/* ===== Events ===== */
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
virtual void doMark (GenNode const& mark) override;
BodyCanvasWidget& DEBUG_canvas_;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
private:/* ===== Internals ===== */

View file

@ -128,9 +128,6 @@ namespace timeline {
void installRootTrack (TrackHeadWidget&,TrackBody&);
Gtk::WidgetPath getBodyWidgetPath() const;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
BodyCanvasWidget& exposeCanvasForDebug() { return bodyCanvas_; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
protected: /* ==== Interface: LayoutManager===== */

View file

@ -89,9 +89,6 @@ namespace timeline {
TrackBody::setTrackName (cuString& trackName)
{
TODO ("is the track name of any relevance for the TrackBody widget?");
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
this->TODO_trackName_ = trackName;;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
}

View file

@ -146,9 +146,6 @@ namespace timeline {
return rulers_;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
uString TODO_trackName_;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
};

View file

@ -38,9 +38,6 @@
#include "include/ui-protocol.hpp"
#include "stage/timeline/track-presenter.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
#include "stage/timeline/body-canvas-widget.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
#include "lib/format-cout.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
@ -86,11 +83,8 @@ namespace timeline {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
void
TrackPresenter::injectDebugTrackLabels(BodyCanvasWidget& bodyCanvas)
TrackPresenter::injectDebugTrackLabels()
{
///////////////////////////TODO TOD-oh
// bodyCanvas.DEBUG_injectTrackLabel (display_.body_.TODO_trackName_, display_.body_.startLine_ + display_.body_.contentOffset_);
///////////////////////////TODO TOD-oh
uint x = rand() % 50;
uint y = 0;
Gtk::Button* butt = Gtk::manage (new ViewHooked<Gtk::Button, Gtk::Widget>{display_.hookedAt(x,y), TODO_trackName_});
@ -99,7 +93,7 @@ namespace timeline {
butt->show();
for (auto& subTrack : subFork_)
subTrack->injectDebugTrackLabels (bodyCanvas);
subTrack->injectDebugTrackLabels();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
/**

View file

@ -66,9 +66,6 @@
namespace stage {
namespace timeline {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
class BodyCanvasWidget;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
using std::vector;
using std::unique_ptr;
@ -204,7 +201,7 @@ namespace timeline {
/** set up a binding to respond to mutation messages via UiBus */
virtual void buildMutator (lib::diff::TreeMutator::Handle) override;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
void injectDebugTrackLabels(BodyCanvasWidget&);
void injectDebugTrackLabels();
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
uString TODO_trackName_;

View file

@ -19428,7 +19428,7 @@
</html></richcontent>
<icon BUILTIN="button_ok"/>
</node>
<node COLOR="#338800" CREATED="1575667886287" ID="ID_1416159951" MODIFIED="1575845508415" TEXT="Umbau auf ein ViewHooked&lt;W&gt;">
<node COLOR="#338800" CREATED="1575667886287" FOLDED="true" ID="ID_1416159951" MODIFIED="1582835881291" TEXT="Umbau auf ein ViewHooked&lt;W&gt;">
<arrowlink COLOR="#e79332" DESTINATION="ID_1096729219" ENDARROW="Default" ENDINCLINATION="-1237;46;" ID="Arrow_ID_1348207622" STARTARROW="None" STARTINCLINATION="2421;0;"/>
<icon BUILTIN="button_ok"/>
<node CREATED="1575239353279" HGAP="53" ID="ID_777015627" MODIFIED="1575668026370" TEXT="statt frei stehendem ViewHook" VSHIFT="32">
@ -19518,8 +19518,8 @@
<icon BUILTIN="button_ok"/>
</node>
</node>
<node COLOR="#338800" CREATED="1582503131945" ID="ID_1439869815" MODIFIED="1582833270452" TEXT="Problem Covarianz">
<linktarget COLOR="#6c2232" DESTINATION="ID_1439869815" ENDARROW="Default" ENDINCLINATION="-760;97;" ID="Arrow_ID_655919678" SOURCE="ID_1081924103" STARTARROW="None" STARTINCLINATION="1660;0;"/>
<node COLOR="#338800" CREATED="1582503131945" FOLDED="true" ID="ID_1439869815" MODIFIED="1582835809970" TEXT="Problem Covarianz">
<linktarget COLOR="#66226c" DESTINATION="ID_1439869815" ENDARROW="Default" ENDINCLINATION="-760;97;" ID="Arrow_ID_655919678" SOURCE="ID_1081924103" STARTARROW="None" STARTINCLINATION="1660;0;"/>
<icon BUILTIN="button_ok"/>
<node CREATED="1582503148935" ID="ID_10487556" MODIFIED="1582503193549" TEXT="ViewHooked&lt;WiX&gt; f&#xfc;r ViewHook&lt;WID&gt; mit WiX &lt;: WID">
<icon BUILTIN="info"/>
@ -22119,8 +22119,8 @@
<icon BUILTIN="ksmiletris"/>
</node>
</node>
<node COLOR="#338800" CREATED="1582503247986" ID="ID_1081924103" MODIFIED="1582833337026" TEXT="Problem Covarianz Clip vs Widget">
<arrowlink COLOR="#6c2232" DESTINATION="ID_1439869815" ENDARROW="Default" ENDINCLINATION="-760;97;" ID="Arrow_ID_655919678" STARTARROW="None" STARTINCLINATION="1660;0;"/>
<node COLOR="#338800" CREATED="1582503247986" ID="ID_1081924103" MODIFIED="1582835894937" TEXT="Problem Covarianz Clip vs Widget">
<arrowlink COLOR="#66226c" DESTINATION="ID_1439869815" ENDARROW="Default" ENDINCLINATION="-760;97;" ID="Arrow_ID_655919678" STARTARROW="None" STARTINCLINATION="1660;0;"/>
<icon BUILTIN="button_ok"/>
<node CREATED="1582503411035" HGAP="45" ID="ID_1293494572" MODIFIED="1582503470645" TEXT="der Canvas braucht nur ein Widget, wir aber konstruieren einen Clip" VSHIFT="22">
<richcontent TYPE="NOTE"><html>
@ -22152,7 +22152,11 @@
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1576974176981" ID="ID_1792139654" MODIFIED="1576975019591" TEXT="Kind-Widget-Offsets">
<linktarget COLOR="#5e57bd" DESTINATION="ID_1792139654" ENDARROW="Default" ENDINCLINATION="-2065;214;" ID="Arrow_ID_1917645572" SOURCE="ID_178738138" STARTARROW="None" STARTINCLINATION="-949;44;"/>
<icon BUILTIN="flag-yellow"/>
<node CREATED="1576974190516" ID="ID_1324645925" MODIFIED="1576974196544" TEXT="welche Offsets treten konkret auf"/>
<node CREATED="1576974190516" ID="ID_1324645925" MODIFIED="1582836038184" TEXT="welche Offsets treten konkret auf?"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582835948615" ID="ID_75969285" MODIFIED="1582836030572" TEXT="Kind-Offsets sind falsch">
<arrowlink COLOR="#d3384d" DESTINATION="ID_1855510589" ENDARROW="Default" ENDINCLINATION="-764;-101;" ID="Arrow_ID_1877663178" STARTARROW="None" STARTINCLINATION="570;60;"/>
<icon BUILTIN="broken-line"/>
</node>
<node CREATED="1576974515950" ID="ID_1628336999" MODIFIED="1576974623765" TEXT="gibt es ein gemeinsames Koordinatensystem?">
<arrowlink COLOR="#474293" DESTINATION="ID_1222461806" ENDARROW="Default" ENDINCLINATION="-912;90;" ID="Arrow_ID_890343372" STARTARROW="None" STARTINCLINATION="-1540;96;"/>
<node CREATED="1576975245489" ID="ID_1473334633" MODIFIED="1576975295363" TEXT="es l&#xe4;uft auf &quot;nein&quot; hinaus....">
@ -26522,7 +26526,8 @@
<node CREATED="1567876413663" ID="ID_1376431800" MODIFIED="1567876429537" TEXT="alle Content-Labels erscheinen nach untern verschoben">
<icon BUILTIN="messagebox_warning"/>
</node>
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1567876430941" ID="ID_1855510589" MODIFIED="1567876437643" TEXT="Ursache untersuchen">
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1567876430941" ID="ID_1855510589" MODIFIED="1582836000650" TEXT="Ursache untersuchen">
<linktarget COLOR="#d3384d" DESTINATION="ID_1855510589" ENDARROW="Default" ENDINCLINATION="-764;-101;" ID="Arrow_ID_1877663178" SOURCE="ID_75969285" STARTARROW="None" STARTINCLINATION="570;60;"/>
<icon BUILTIN="flag-pink"/>
</node>
</node>