![]() |
Cadabra
Computer algebra system for field theory problems
|
Public Member Functions | |
| TextViewProxy (Console &parent) | |
| bool | handle_key_press (guint keyval, Gdk::ModifierType state) |
| The keys the console interprets itself (Return, Up, Down). | |
| void | sync_to_view () |
| Mirror this (model) buffer and its selection into the parent's visible buffer. | |
| bool | on_key_press_event (GdkEventKey *key_event) override |
Public Attributes | |
| size_t | history_max_length |
Private Member Functions | |
| void | set_text_quietly (const Glib::ustring &text) |
| Replace the buffer contents without it counting as user editing. | |
| void | remember_partial_input () |
| Remember the partially typed line, so that walking down off the end of the history can restore it. | |
Private Attributes | |
| Console & | parent |
| std::string | temp_in |
| std::list< std::string > | history |
| std::list< std::string >::iterator | history_ptr |
| bool | updating_buffer = false |
| Set while we rewrite the buffer ourselves, so that the GTK4 buffer-changed handler does not mistake it for user editing. | |
| Console::TextViewProxy::TextViewProxy | ( | Console & | parent | ) |
| bool Console::TextViewProxy::handle_key_press | ( | guint | keyval, |
| Gdk::ModifierType | state ) |
The keys the console interprets itself (Return, Up, Down).
Handle the keys the console interprets itself: Return submits, Up/Down walk the history.
Returns true when consumed; false lets the TextView edit its own buffer. gtkmm-3 reaches this through the on_key_press_event vfunc, GTK4 through an Gtk::EventControllerKey on this widget.
Returns true when the key was consumed; false means the TextView's own editing should run. Shared between gtkmm-3's on_key_press_event vfunc and GTK4's Gtk::EventControllerKey.
|
override |
|
private |
Remember the partially typed line, so that walking down off the end of the history can restore it.
|
private |
Replace the buffer contents without it counting as user editing.
| void Console::TextViewProxy::sync_to_view | ( | ) |
Mirror this (model) buffer and its selection into the parent's visible buffer.
Mirror this (model) buffer, and its selection, into the parent's visible buffer.
|
private |
| size_t cadabra::Console::TextViewProxy::history_max_length |
|
private |
|
private |
|
private |
|
private |
Set while we rewrite the buffer ourselves, so that the GTK4 buffer-changed handler does not mistake it for user editing.