|
SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
|
Public Member Functions | |
| LogWidget (int display_height, int display_width, int display_y, int display_x, short bar_color, short ind_color) | |
| virtual | ~LogWidget () |
| LogWidget (const LogWidget &)=delete | |
| const LogWidget & | operator= (const LogWidget &)=delete |
| 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 = 0 |
| int | m_active_line = 0 |
| 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 301 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 338 of file ProgressNCurses.cpp.
References BUFFER_INCREASE_STEP_SIZE, m_display_height, m_display_width, m_display_x, m_display_y, m_pad, m_scroll, m_scroll_bar_color, and m_scroll_ind_color.
Referenced by LogWidget(), and operator=().
|
inlinevirtual |
|
delete |
|
inlineprivate |
Draw log lines
Definition at line 489 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 463 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 442 of file ProgressNCurses.cpp.
References std::vector< T >::back(), std::vector< T >::data(), std::vector< T >::emplace_back(), std::vector< T >::empty(), m_display_width, m_pad, m_written_lines, and std::vector< T >::pop_back().
Referenced by SourceXtractor::ProgressNCurses::Dashboard::ncursesMode().

|
inline |
Handle key presses (scrolling)
Definition at line 420 of file ProgressNCurses.cpp.
References scrollText().
Referenced by SourceXtractor::ProgressNCurses::Dashboard::handleKeyPress().

|
inline |
Update the screen size
Definition at line 384 of file ProgressNCurses.cpp.
References drawLog(), drawScroll(), m_display_height, m_display_width, m_pad, and m_scroll.
Referenced by SourceXtractor::ProgressNCurses::Dashboard::ncursesMode().

|
inline |
Allow to scroll the pad
Definition at line 402 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 360 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 318 of file ProgressNCurses.cpp.
Referenced by LogWidget(), and write().
|
staticprivate |
Definition at line 319 of file ProgressNCurses.cpp.
Referenced by write().
|
private |
Definition at line 313 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), scrollText(), and write().
|
private |
Definition at line 306 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), LogWidget(), resize(), and scrollText().
|
private |
Definition at line 307 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), getText(), LogWidget(), resize(), and write().
|
private |
Definition at line 309 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), and LogWidget().
|
private |
Definition at line 308 of file ProgressNCurses.cpp.
Referenced by drawLog(), drawScroll(), and LogWidget().
|
private |
Definition at line 303 of file ProgressNCurses.cpp.
Referenced by drawLog(), getText(), LogWidget(), resize(), scrollText(), write(), and ~LogWidget().
|
private |
Definition at line 304 of file ProgressNCurses.cpp.
Referenced by drawScroll(), LogWidget(), resize(), and ~LogWidget().
|
private |
Definition at line 315 of file ProgressNCurses.cpp.
Referenced by drawScroll(), and LogWidget().
|
private |
Definition at line 316 of file ProgressNCurses.cpp.
Referenced by drawScroll(), and LogWidget().
|
private |
Definition at line 311 of file ProgressNCurses.cpp.
Referenced by drawScroll(), getText(), scrollText(), and write().