From 95d65f9f3085bc0c935b1bb3691151f89343f7b2 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Mon, 23 Nov 2020 16:42:03 +0100 Subject: [PATCH] Documentation for NotificationManager --- src/slic3r/GUI/NotificationManager.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/NotificationManager.hpp b/src/slic3r/GUI/NotificationManager.hpp index d483173c3..da544391d 100644 --- a/src/slic3r/GUI/NotificationManager.hpp +++ b/src/slic3r/GUI/NotificationManager.hpp @@ -150,7 +150,9 @@ private: const int duration; const std::string text1; const std::string hypertext; - // Callback for hypertext - returns if notif shall close. + // Callback for hypertext - returns true if notification should close after triggering + // Usually sends event to UI thread thru wxEvtHandler. + // Examples in basic_notifications. std::function callback { nullptr }; const std::string text2; }; @@ -227,7 +229,8 @@ private: void render_left_sign(ImGuiWrapper& imgui); virtual void render_minimize_button(ImGuiWrapper& imgui, const float win_pos_x, const float win_pos_y); - // Hypertext action, returns if close notification + // Hypertext action, returns true if notification should close. + // Action is stored in NotificationData::callback as std::function virtual bool on_text_click(); const NotificationData m_data;