36 using widget::ErrorLogDisplay;
40 :
Panel(panelManager, dockItem, getTitle(), getStockID())
41 , twoParts_{Gtk::ORIENTATION_VERTICAL}
43 , frame_{_(
"System Information")}
44 , logExpander_{_(
"Error Log")}
47 twoParts_.pack_start(frame_);
48 twoParts_.pack_start(buttons_, Gtk::PACK_SHRINK);
50 buttons_.set_layout (Gtk::BUTTONBOX_START);
53 buttonClear_.set_label (_(
"_clear Log"));
54 buttonClear_.set_use_underline();
55 buttonClear_.set_tooltip_markup (_(
"Discard all contents of the error log."));
56 buttonClear_.signal_clicked().connect(
57 [
this](){
if (theLog_) theLog_->clearAll(); });
58 buttonClearErr_.set_label (_(
"_Error OK"));
59 buttonClearErr_.set_use_underline();
60 buttonClearErr_.set_tooltip_markup (_(
"Clear the error state and turn errors in to information entries."));
61 buttonClearErr_.signal_clicked().connect(
62 [
this](){
if (theLog_) theLog_->turnError_into_InfoMsg(); });
63 buttonClearInfo_.set_label (_(
"drop _Info"));
64 buttonClearInfo_.set_use_underline();
65 buttonClearInfo_.set_tooltip_markup (_(
"Discard all mere info message, retain error entries only."));
66 buttonClearInfo_.signal_clicked().connect(
67 [
this](){
if (theLog_) theLog_->clearInfoMsg(); });
69 buttons_.add (buttonClear_);
70 buttons_.add (buttonClearErr_);
71 buttons_.add (buttonClearInfo_);
75 this->add (twoParts_);
81 .connect_once ( sigc::bind<bool>(
82 sigc::mem_fun (*
this, &InfoBoxPanel::reflect_LogErrorState),
false)
94 InfoBoxPanel::getStockID()
96 return "panel_infobox";
114 logExpander_.set_expanded (
false);
115 logExpander_.add (*theLog_);
116 theLog_->expand =
model::Expander{[&]() ->
bool {
return logExpander_.get_expanded(); }
117 ,[&](
bool yes) { logExpander_.set_expanded (yes); }
120 theLog_->expand(
true);
122 frame_.set_border_width (5);
123 frame_.add (logExpander_);
126 theLog_->signalErrorChanged().connect(
127 mem_fun(*
this, &InfoBoxPanel::reflect_LogErrorState));
134 InfoBoxPanel::reflect_LogErrorState (
bool isError)
136 buttonClearErr_.set_visible (isError);
137 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.