50#ifndef STAGE_WIDGET_ERROR_LOG_DISPLAY_H
51#define STAGE_WIDGET_ERROR_LOG_DISPLAY_H
79 using Tag = Glib::RefPtr<Gtk::TextBuffer::Tag>;
90 errorTag->property_background() =
"Yellow";
91 errorTag->property_weight() = PANGO_WEIGHT_BOLD;
92 tagTable->add (errorTag);
95 warnTag->property_background() =
"LightYellow";
96 tagTable->add (warnTag);
115 :
public Gtk::ScrolledWindow
118 using Mark = Glib::RefPtr<Gtk::TextBuffer::Mark>;
134 :
Gtk::ScrolledWindow()
138 set_size_request (200, 80);
139 property_expand() =
true;
140 set_border_width (10);
141 set_shadow_type (Gtk::SHADOW_NONE);
144 set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
148 populateStandardTextTags (
textLog_.get_buffer()->get_tag_table());
159 bool shallNotify = this->
isError();
162 size_t lineCnt = max (0,
textLog_.get_buffer()->get_line_count() - 1);
165 placeholder =
_Fmt{
_(
"───════ %d preceding lines removed ════───\n")} % lineCnt;
166 textLog_.get_buffer()->set_text (placeholder);
198 bool shallNotify = not this->
isError();
200 errorMarks_.emplace_back(
217 auto newBuff = Gtk::TextBuffer::create (
textLog_.get_buffer()->get_tag_table());
218 vector<Entry> newMarks;
221 newBuff->insert (newBuff->end(),
"\n");
222 auto pos = newBuff->end();
224 newMarks.emplace_back(
226 newBuff->create_mark (pos,
true),
227 newBuff->create_mark (pos,
false)));
230 ,entry.first->get_iter()
231 ,entry.second->get_iter()
235 auto oldBuff =
textLog_.get_buffer();
240 int oldLines = oldBuff->get_line_count();
241 int newLines = newBuff->get_line_count();
242 ASSERT (oldLines >= newLines);
243 addInfo (
_Fmt{
_(
"───════ %d old log lines removed ════───\n")} % (oldLines-newLines));
256 auto begin = entry.first->get_iter();
257 auto end = entry.second->get_iter();
314 buff->insert (buff->end(),
"\n");
315 auto pos = buff->end();
317 auto begin = buff->create_mark (pos,
true);
318 auto after = buff->create_mark (pos,
false);
320 buff->insert_with_tag(pos, text,
cuString{markupTagName});
322 buff->insert (pos, text);
324 return make_pair (move(begin), move(after));
Functor component to support the default implementation of expanding/collapsing.
Functor component to support the default implementation of revealing an UI-Element.
A front-end for using printf-style formatting.
Helper components to implement some standard UI-element actions by installing a functor.
Decorator to add the ability to display a visual flash action to a GTK widget.
A set of basic GTK includes for the UI.
Major public Interface of the Lumiera GUI.
Lumiera GTK UI implementation root.
Definition of access keys for uniform UI styling.
Marker types to indicate a literal string and a Symbol.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...