27 using widget::ErrorLogDisplay;
31 :
Panel(panelManager, dockItem, getTitle(), getStockID())
32 , twoParts_{Gtk::ORIENTATION_VERTICAL}
34 , frame_{_(
"System Information")}
35 , logExpander_{_(
"Error Log")}
38 twoParts_.pack_start(frame_);
39 twoParts_.pack_start(buttons_, Gtk::PACK_SHRINK);
41 buttons_.set_layout (Gtk::BUTTONBOX_START);
44 buttonClear_.set_label (_(
"_clear Log"));
45 buttonClear_.set_use_underline();
46 buttonClear_.set_tooltip_markup (_(
"Discard all contents of the error log."));
47 buttonClear_.signal_clicked().connect(
48 [
this](){
if (theLog_) theLog_->clearAll(); });
49 buttonClearErr_.set_label (_(
"_Error OK"));
50 buttonClearErr_.set_use_underline();
51 buttonClearErr_.set_tooltip_markup (_(
"Clear the error state and turn errors in to information entries."));
52 buttonClearErr_.signal_clicked().connect(
53 [
this](){
if (theLog_) theLog_->turnError_into_InfoMsg(); });
54 buttonClearInfo_.set_label (_(
"drop _Info"));
55 buttonClearInfo_.set_use_underline();
56 buttonClearInfo_.set_tooltip_markup (_(
"Discard all mere info message, retain error entries only."));
57 buttonClearInfo_.signal_clicked().connect(
58 [
this](){
if (theLog_) theLog_->clearInfoMsg(); });
60 buttons_.add (buttonClear_);
61 buttons_.add (buttonClearErr_);
62 buttons_.add (buttonClearInfo_);
66 this->add (twoParts_);
72 .connect_once ( sigc::bind<bool>(
73 sigc::mem_fun (*
this, &InfoBoxPanel::reflect_LogErrorState),
false)
85 InfoBoxPanel::getStockID()
87 return "panel_infobox";
105 logExpander_.set_expanded (
false);
106 logExpander_.add (*theLog_);
107 theLog_->expand =
model::Expander{[&]() ->
bool {
return logExpander_.get_expanded(); }
108 ,[&](
bool yes) { logExpander_.set_expanded (yes); }
111 theLog_->expand(
true);
113 frame_.set_border_width (5);
114 frame_.add (logExpander_);
117 theLog_->signalErrorChanged().connect(
118 mem_fun(*
this, &InfoBoxPanel::reflect_LogErrorState));
125 InfoBoxPanel::reflect_LogErrorState (
bool isError)
127 buttonClearErr_.set_visible (isError);
128 buttonClearInfo_.set_visible (isError);
static const char * getTitle()
void show(bool show=true)
Shows or hides the panel.
Functor component to support the default implementation of revealing an UI-Element.
A class to manage DockItem objects for WorkspaceWindow.
The base class for all dockable panels.
Lumiera GTK UI implementation root.
Widget to display error messages to be accessible in non-modal way.
A (dockable) panel to display and manage information and parameters.
InfoBoxPanel(workspace::PanelManager &, Gdl::DockItem &)
Build a new InfoBox-Panel.
widget::ErrorLogDisplay & getLog()
on demand allocate display of information / error log
Functor component to support the default implementation of expanding/collapsing.
A set of basic GTK includes for the UI.