#include <ui.h>
Classes | |
| struct | Cmd |
Public Types | |
| enum | RepaintMode { kRepaint, kRepaintImmediately } |
| enum | Style { kNormal, kWarning, kQuoted, kInput } |
| enum | Status { kStatusOk, kStatusExecuteError, kStatusSyntaxError } |
| typedef void | t_do_draw_plot (RepaintMode mode) |
| typedef void | t_show_message (Style style, const std::string &s) |
| typedef UserInterface::Status | t_exec_command (const std::string &s) |
| typedef void | t_refresh () |
| typedef void | t_compute_ui (bool) |
| typedef void | t_wait (float seconds) |
Public Member Functions | |
| UserInterface (Ftk *F) | |
| void | draw_plot (RepaintMode mode) |
| Redraw the plot. | |
| void | output_message (Style style, const std::string &s) const |
| void | exec_script (const std::string &filename) |
| Excute commands from file, i.e. run a script (.fit). | |
| void | exec_stream (FILE *fp) |
| void | exec_string_as_script (const char *s) |
| UserInterface::Status | exec_and_log (const std::string &c) |
| void | raw_execute_line (const std::string &str) |
| UserInterface::Status | execute_line (const std::string &str) |
| bool | check_syntax (const std::string &str) |
| return true if the syntax is correct | |
| void | process_cmd_line_filename (const std::string &par) |
| void | set_do_draw_plot (t_do_draw_plot *func) |
| void | set_show_message (t_show_message *func) |
| void | set_exec_command (t_exec_command *func) |
| void | set_refresh (t_refresh *func) |
| void | refresh () |
| refresh the screen if needed, for use during time-consuming tasks | |
| void | set_compute_ui (t_compute_ui *func) |
| void | enable_compute_ui (bool enable) |
| void | set_wait (t_wait *func) |
| void | wait (float seconds) |
| Wait and disable UI for ... seconds. | |
| Parser * | parser () const |
| share parser -- it can be safely reused | |
| const std::vector< Cmd > & | cmds () const |
| std::string | get_history_summary () const |
Static Public Attributes | |
| static const int | max_cmd = 4096 |
commands, messages and plot refreshing it has callbacks that can be set by user interface
Definition at line 15 of file ui.h.
| void UserInterface::output_message | ( | Style | style, | |
| const std::string & | s | |||
| ) | const |
Calls the show_message(), logs the message to file if logging is on, handles the exit_on_warning option.
Definition at line 210 of file ui.cpp.
Referenced by Ftk::msg(), fityk::Fityk::out(), Ftk::rmsg(), Ftk::vmsg(), and Ftk::warn().