From 6eb76febdc8502d886b6de7bc79aac7d84dfcf62 Mon Sep 17 00:00:00 2001 From: jens Date: Sun, 21 Jan 2024 15:26:48 +0100 Subject: [PATCH] - added ToolTips for RBM windows --- source/DrawComponent.hpp | 2 +- source/RbmComponent.cpp | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/source/DrawComponent.hpp b/source/DrawComponent.hpp index 978c83c..a6857c6 100644 --- a/source/DrawComponent.hpp +++ b/source/DrawComponent.hpp @@ -44,7 +44,7 @@ public: Describe your class and how it works here! //[/Comments] */ -class DrawComponent : public Component +class DrawComponent : public Component, public SettableTooltipClient { public: //============================================================================== diff --git a/source/RbmComponent.cpp b/source/RbmComponent.cpp index e98b234..3bd1907 100644 --- a/source/RbmComponent.cpp +++ b/source/RbmComponent.cpp @@ -35,29 +35,37 @@ RbmComponent::RbmComponent (DeepStack &stack, const std::string &name, size_t id , m_sizeX(430) , m_sizeY(190) { + addAndMakeVisible (DrawVisibleTrain = new DrawComponent (numVisibleX, numVisibleY)); + DrawVisibleTrain->setTooltip (Layer::name() + TRANS(": ") + TRANS("Visible Training")); DrawVisibleTrain->setListener(this); addAndMakeVisible (DrawHidden = new DrawComponent (numHidden, 1)); + DrawHidden->setTooltip (TRANS(Layer::name() + TRANS(": ") + "Hidden")); DrawHidden->setListener(this); addAndMakeVisible (DrawContextTrain = new DrawComponent (numContext, 1)); + DrawContextTrain->setTooltip (TRANS(Layer::name() + TRANS(": ") + "Context Training")); DrawContextTrain->setListener(this); addAndMakeVisible (DrawContextReconst = new DrawComponent (numContext, 1)); + DrawContextReconst->setTooltip (TRANS(Layer::name() + TRANS(": ") + "Context Reconstruction")); DrawContextReconst->setListener(this); addAndMakeVisible (DrawVisibleReconst = new DrawComponent (numVisibleX, numVisibleY)); + DrawVisibleReconst->setTooltip (TRANS(Layer::name() + TRANS(": ") + "Visibe Reconstruction")); + addAndMakeVisible (DrawWeights = new DrawComponent (numVisibleX, numVisibleY, 0.5, 0.5)); + DrawWeights->setTooltip (TRANS(Layer::name() + TRANS(": ") + "Weights")); addAndMakeVisible (m_toggleEnable = new ToggleButton ("Enable layer")); - m_toggleEnable->setTooltip (TRANS("Enable layer for up pass")); + m_toggleEnable->setTooltip (Layer::name() + TRANS(": ") + TRANS("Enable layer for up pass")); m_toggleEnable->setButtonText (TRANS("Enable")); m_toggleEnable->addListener (this); m_toggleEnable->setToggleState(true, NotificationType::dontSendNotification); addChildComponent (m_buttonCopyH2C = new TextButton ("Copy hidden state to context")); - m_buttonCopyH2C->setTooltip (TRANS("Copy hidden state to context input")); + m_buttonCopyH2C->setTooltip (Layer::name() + TRANS(": ") + TRANS("Copy hidden state to context input")); m_buttonCopyH2C->setButtonText (TRANS("H2C")); m_buttonCopyH2C->addListener (this);