Classes | Public Types | Public Member Functions | Static Public Attributes

UserInterface Class Reference

#include <ui.h>

List of all members.

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.
Parserparser () 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

Detailed Description

commands, messages and plot refreshing it has callbacks that can be set by user interface

Definition at line 15 of file ui.h.


Member Function Documentation

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().


The documentation for this class was generated from the following files:

Generated on Mon Jul 18 2011 17:25:28 for Fityk by Doxygen 1.7.1