Cadabra
Computer algebra system for field theory problems
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cadabra::Console Class Reference

#include <Console.hh>

Inheritance diagram for cadabra::Console:

Public Member Functions

 Console (sigc::slot< void > run_slot)
 
 ~Console ()
 
void initialize ()
 
void set_input (const Glib::ustring &line, size_t range_start=std::string::npos, size_t range_end=std::string::npos)
 
std::string grab_input ()
 
void send_input (const std::string &code)
 
void signal_message (const Json::Value &msg)
 
void set_height (int px)
 
void scroll_to_bottom ()
 
uint64_t get_id () const
 
Glib::RefPtr< Gtk::TextBuffer > get_buffer ()
 

Private Member Functions

void insert_text (const std::string &text, Glib::RefPtr< Gtk::TextTag > tag)
 
void insert_graphic (const std::string &bytes)
 
void prompt (bool continuation, bool newline=false)
 
void process_message_queue ()
 

Private Attributes

Glib::Dispatcher dispatch_message
 
Glib::Dispatcher run
 
uint64_t id_
 
bool needs_focus
 
std::string collect
 
std::queue< Json::Value > message_queue
 
std::queue< std::string > run_queue
 
Gtk::ScrolledWindow win
 
TextViewProxy input
 
Gtk::TextView tv
 
Glib::RefPtr< Gtk::TextBuffer::Mark > input_begin
 
Glib::RefPtr< Gtk::TextBuffer::Mark > prompt_begin
 
Glib::RefPtr< Gtk::TextTag > input_tag
 
Glib::RefPtr< Gtk::TextTag > output_tag
 
Glib::RefPtr< Gtk::TextTag > warning_tag
 
Glib::RefPtr< Gtk::TextTag > error_tag
 

Constructor & Destructor Documentation

◆ Console()

Console::Console ( sigc::slot< void >  run_slot)

◆ ~Console()

Console::~Console ( )

Member Function Documentation

◆ get_buffer()

Glib::RefPtr< Gtk::TextBuffer > Console::get_buffer ( )

◆ get_id()

uint64_t Console::get_id ( ) const

◆ grab_input()

std::string Console::grab_input ( )

◆ initialize()

void Console::initialize ( )

◆ insert_graphic()

void Console::insert_graphic ( const std::string &  bytes)
private

◆ insert_text()

void Console::insert_text ( const std::string &  text,
Glib::RefPtr< Gtk::TextTag >  tag 
)
private

◆ process_message_queue()

void Console::process_message_queue ( )
private

◆ prompt()

void Console::prompt ( bool  continuation,
bool  newline = false 
)
private

◆ scroll_to_bottom()

void Console::scroll_to_bottom ( )

◆ send_input()

void Console::send_input ( const std::string &  code)

◆ set_height()

void Console::set_height ( int  px)

◆ set_input()

void Console::set_input ( const Glib::ustring &  line,
size_t  range_start = std::string::npos,
size_t  range_end = std::string::npos 
)

◆ signal_message()

void Console::signal_message ( const Json::Value &  msg)

Member Data Documentation

◆ collect

std::string cadabra::Console::collect
private

◆ dispatch_message

Glib::Dispatcher cadabra::Console::dispatch_message
private

◆ error_tag

Glib::RefPtr<Gtk::TextTag> cadabra::Console::error_tag
private

◆ id_

uint64_t cadabra::Console::id_
private

◆ input

TextViewProxy cadabra::Console::input
private

◆ input_begin

Glib::RefPtr<Gtk::TextBuffer::Mark> cadabra::Console::input_begin
private

◆ input_tag

Glib::RefPtr<Gtk::TextTag> cadabra::Console::input_tag
private

◆ message_queue

std::queue<Json::Value> cadabra::Console::message_queue
private

◆ needs_focus

bool cadabra::Console::needs_focus
private

◆ output_tag

Glib::RefPtr<Gtk::TextTag> cadabra::Console::output_tag
private

◆ prompt_begin

Glib::RefPtr<Gtk::TextBuffer::Mark> cadabra::Console::prompt_begin
private

◆ run

Glib::Dispatcher cadabra::Console::run
private

◆ run_queue

std::queue<std::string> cadabra::Console::run_queue
private

◆ tv

Gtk::TextView cadabra::Console::tv
private

◆ warning_tag

Glib::RefPtr<Gtk::TextTag> cadabra::Console::warning_tag
private

◆ win

Gtk::ScrolledWindow cadabra::Console::win
private

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