SourceXtractorPlusPlus
0.12
Please provide a description of the project.
|
Public Member Functions | |
LogWidget (int display_height, int display_width, int display_y, int display_x, short bar_color, short ind_color) | |
virtual | ~LogWidget () |
void | write (const char *data, ssize_t nchars) |
void | resize (int display_height, int display_width) |
void | scrollText (int d) |
void | handleKeyPress (int key) |
std::vector< std::string > | getText () |
Private Member Functions | |
void | drawScroll () const |
void | drawLog () const |
Private Attributes | |
WINDOW * | m_pad |
WINDOW * | m_scroll |
int | m_display_height |
int | m_display_width |
int | m_display_y |
int | m_display_x |
int | m_written_lines |
int | m_active_line |
int | m_scroll_bar_color |
int | m_scroll_ind_color |
Static Private Attributes | |
static const int | BUFFER_INCREASE_STEP_SIZE = 10 |
static const int | BUFFER_MAX_SIZE = 16384 |
Widget into which the logging is redirected
Definition at line 297 of file ProgressNCurses.cpp.
|
inline |
Constructor
display_height | Displayed height on the screen. The actual pad height is handled internally. |
display_width | Displayed width on the screen. |
display_y | Y position on the screen. |
display_x | X position on the screen. |
bar_color | Color for the progress bar |
ind_color | Color for the bar indicator |
Definition at line 329 of file ProgressNCurses.cpp.
References m_pad.
|
inlinevirtual |
|
inlineprivate |
Draw log lines
Definition at line 473 of file ProgressNCurses.cpp.
References m_active_line, m_display_height, m_display_width, m_display_x, m_display_y, m_pad, and std::max().
Referenced by resize(), scrollText(), and write().
|
inlineprivate |
Draw scroll marker
Definition at line 448 of file ProgressNCurses.cpp.
References m_active_line, m_display_height, m_display_width, m_display_x, m_display_y, m_scroll, m_scroll_bar_color, m_scroll_ind_color, m_written_lines, std::max(), and std::min().
Referenced by resize(), scrollText(), and write().
|
inline |
Dump into a vector the content of the buffer
Definition at line 427 of file ProgressNCurses.cpp.
References std::vector< T >::back(), std::vector< T >::data(), std::vector< T >::emplace_back(), std::string::empty(), std::vector< T >::empty(), m_display_width, m_pad, m_written_lines, and std::vector< T >::pop_back().
|
inline |
Handle key presses (scrolling)
Definition at line 407 of file ProgressNCurses.cpp.
References scrollText().
Referenced by SourceXtractor::ProgressNCurses::Dashboard::handleKeyPress().
|
inline |
Update the screen size
Definition at line 371 of file ProgressNCurses.cpp.
References drawLog(), drawScroll(), m_display_height, m_display_width, m_pad, and m_scroll.
|
inline |
Allow to scroll the pad
Definition at line 389 of file ProgressNCurses.cpp.
References drawLog(), drawScroll(), m_active_line, m_display_height, m_pad, and m_written_lines.
Referenced by handleKeyPress().
|
inline |
Write into the widget
Definition at line 348 of file ProgressNCurses.cpp.
References BUFFER_INCREASE_STEP_SIZE, BUFFER_MAX_SIZE, drawLog(), drawScroll(), m_active_line, m_display_width, m_pad, m_written_lines, and std::min().
Referenced by SourceXtractor::ProgressNCurses::Dashboard::handleSignal(), and SourceXtractor::ProgressNCurses::Dashboard::pipeToLog().
|
staticprivate |
Definition at line 310 of file ProgressNCurses.cpp.
Referenced by write().
|
staticprivate |
Definition at line 310 of file ProgressNCurses.cpp.
Referenced by write().
|
private |
Definition at line 306 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), scrollText(), and write().
|
private |
Definition at line 301 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), resize(), and scrollText().
|
private |
Definition at line 301 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), getText(), resize(), and write().
|
private |
Definition at line 302 of file ProgressNCurses.cpp.
Referenced by drawLog(), and drawScroll().
|
private |
Definition at line 302 of file ProgressNCurses.cpp.
Referenced by drawLog(), and drawScroll().
|
private |
Definition at line 299 of file ProgressNCurses.cpp.
Referenced by drawLog(), getText(), LogWidget(), resize(), scrollText(), write(), and ~LogWidget().
|
private |
Definition at line 299 of file ProgressNCurses.cpp.
Referenced by drawScroll(), resize(), and ~LogWidget().
|
private |
Definition at line 308 of file ProgressNCurses.cpp.
Referenced by drawScroll().
|
private |
Definition at line 308 of file ProgressNCurses.cpp.
Referenced by drawScroll().
|
private |
Definition at line 304 of file ProgressNCurses.cpp.
Referenced by drawScroll(), getText(), scrollText(), and write().