![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "stage/widget/error-log-display.hpp"
Widget to display log and error messages.
Based on a multiline text display box with scrollbars. Warning and error messages are highlighted by special formatting. And error entries are treated specially, insofar they are tracked by an index, allowing to build additional convenience features later on...
Definition at line 114 of file error-log-display.hpp.
Public Attributes | |
| model::Expander | expand |
| model::Revealer | reveal |
Public Member Functions | |
| ~ErrorLogDisplay () | |
| ErrorLogDisplay () | |
| void | clearAll () |
| empty text buffer and discard all error bookmarks | |
| void | addInfo (string text) |
| just add normal information message to buffer, without special markup and without expanding the widget | |
| void | addWarn (string text) |
| add an information message, formatted more prominent as warning | |
| void | addError (string text) |
| present an error notification prominently. | |
| void | clearInfoMsg () |
| clear all mere information messages; retain just the previously tagged errors | |
| void | turnError_into_InfoMsg () |
| visit all errors and downgrade the markup; discard all bookmarks | |
| void | triggerFlash () |
| temporarily change display style to prompt for attention; set callback-timeout for return to normal state. | |
| bool | isError () const |
| SignalErrorChanged | signalErrorChanged () |
| signal fired when error state changes | |
Private Types | |
| using | Mark = Glib::RefPtr< Gtk::TextBuffer::Mark > |
| using | Entry = std::pair< Mark, Mark > |
| using | TextWidget = model::FlashDeco< Gtk::TextView > |
| using | SignalErrorChanged = sigc::signal< void, bool > |
Private Member Functions | |
| Entry | addEntry (string const &text, Literal markupTagName=nullptr) |
| add message entry to the (ever growing) text buffer. | |
Private Attributes | |
| vector< Entry > | errorMarks_ |
| TextWidget | textLog_ |
| SignalErrorChanged | errorChangedSignal_ |
|
inline |
Definition at line 131 of file error-log-display.hpp.
|
inline |
Definition at line 133 of file error-log-display.hpp.
References ErrorLogDisplay::textLog_.
|
private |
Definition at line 118 of file error-log-display.hpp.
Definition at line 119 of file error-log-display.hpp.
|
private |
Definition at line 120 of file error-log-display.hpp.
|
private |
Definition at line 122 of file error-log-display.hpp.
|
inline |
empty text buffer and discard all error bookmarks
Definition at line 157 of file error-log-display.hpp.
References _, ErrorLogDisplay::errorChangedSignal_, ErrorLogDisplay::isError(), and ErrorLogDisplay::textLog_.
Here is the call graph for this function:
|
inline |
just add normal information message to buffer, without special markup and without expanding the widget
Definition at line 176 of file error-log-display.hpp.
References ErrorLogDisplay::addEntry().
Referenced by ErrorLogDisplay::clearInfoMsg(), and NotificationHub::doMsg().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
add an information message, formatted more prominent as warning
Definition at line 183 of file error-log-display.hpp.
References ErrorLogDisplay::addEntry(), and stage::TAG_WARN.
Referenced by NotificationHub::doMark().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
present an error notification prominently.
Adds the error text, formatted accordingly to stand out, but also stores a Mark to bookmark the presence of this error entry. And finally expand the display if collapsed.
Definition at line 196 of file error-log-display.hpp.
References ErrorLogDisplay::addEntry(), ErrorLogDisplay::errorChangedSignal_, ErrorLogDisplay::expand, ErrorLogDisplay::isError(), Expander::isExpanded(), and stage::TAG_ERROR.
Referenced by NotificationHub::doErr().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
clear all mere information messages; retain just the previously tagged errors
Definition at line 215 of file error-log-display.hpp.
References _, ErrorLogDisplay::addInfo(), ErrorLogDisplay::errorMarks_, and ErrorLogDisplay::textLog_.
Here is the call graph for this function:
|
inline |
visit all errors and downgrade the markup; discard all bookmarks
Definition at line 249 of file error-log-display.hpp.
References ErrorLogDisplay::errorChangedSignal_, ErrorLogDisplay::errorMarks_, ErrorLogDisplay::isError(), stage::TAG_ERROR, stage::TAG_WARN, and ErrorLogDisplay::textLog_.
Here is the call graph for this function:
|
inline |
temporarily change display style to prompt for attention; set callback-timeout for return to normal state.
Definition at line 272 of file error-log-display.hpp.
References FlashDeco< WIT >::flash(), and ErrorLogDisplay::textLog_.
Here is the call graph for this function:
|
inline |
Definition at line 281 of file error-log-display.hpp.
References ErrorLogDisplay::errorMarks_.
Referenced by ErrorLogDisplay::addError(), ErrorLogDisplay::clearAll(), and ErrorLogDisplay::turnError_into_InfoMsg().
Here is the caller graph for this function:
|
inline |
signal fired when error state changes
Definition at line 288 of file error-log-display.hpp.
References ErrorLogDisplay::errorChangedSignal_.
add message entry to the (ever growing) text buffer.
TextView::scroll_to(iter) is not reliable; preferably we should use a text mark, which could e.g. be the insert position. The handling of marks and tags is described in the GTKmm tutorial. Definition at line 311 of file error-log-display.hpp.
References ErrorLogDisplay::textLog_.
Referenced by ErrorLogDisplay::addError(), ErrorLogDisplay::addInfo(), and ErrorLogDisplay::addWarn().
Here is the caller graph for this function:
|
private |
Definition at line 124 of file error-log-display.hpp.
Referenced by ErrorLogDisplay::clearInfoMsg(), ErrorLogDisplay::isError(), and ErrorLogDisplay::turnError_into_InfoMsg().
|
private |
Definition at line 125 of file error-log-display.hpp.
Referenced by ErrorLogDisplay::ErrorLogDisplay(), ErrorLogDisplay::addEntry(), ErrorLogDisplay::clearAll(), ErrorLogDisplay::clearInfoMsg(), ErrorLogDisplay::triggerFlash(), and ErrorLogDisplay::turnError_into_InfoMsg().
|
private |
Definition at line 127 of file error-log-display.hpp.
Referenced by ErrorLogDisplay::addError(), ErrorLogDisplay::clearAll(), ErrorLogDisplay::signalErrorChanged(), and ErrorLogDisplay::turnError_into_InfoMsg().
| model::Expander expand |
Definition at line 151 of file error-log-display.hpp.
Referenced by NotificationHub::NotificationHub(), ErrorLogDisplay::addError(), and InfoBoxPanel::getLog().
| model::Revealer reveal |
Definition at line 152 of file error-log-display.hpp.
Referenced by NotificationHub::NotificationHub().
Inheritance diagram for ErrorLogDisplay:
Collaboration diagram for ErrorLogDisplay: