![]() |
Cadabra
Computer algebra system for field theory problems
|
The actual text widget used by CodeInput.
#include <CodeInput.hh>
Public Member Functions | |
| exp_input_tv (DTree::iterator, Glib::RefPtr< Gtk::TextBuffer >, double scale, double display_scale, Glib::RefPtr< Gtk::Adjustment >) | |
| virtual void | on_show () override |
| bool | handle_key_press (guint keyval, Gdk::ModifierType state) |
| Key handling, shared between the toolkits. | |
| void | on_focus_entered () |
| Side effects of focus and pointer motion, likewise shared. | |
| void | on_focus_left () |
| void | on_pointer_motion () |
| virtual bool | on_key_press_event (GdkEventKey *) override |
| virtual bool | on_focus_in_event (GdkEventFocus *) override |
| virtual bool | on_focus_out_event (GdkEventFocus *) override |
| virtual bool | on_motion_notify_event (GdkEventMotion *event) override |
| virtual Gtk::SizeRequestMode | get_request_mode_vfunc () const override |
| void | draw_gutter (const Cairo::RefPtr< Cairo::Context > &cr, int height) |
| Paint the coloured bar down the left-hand side of the cell, on top of the TextView's own rendering. | |
| bool | measure_width_for_height (int &minimum_width, int &natural_width) const |
| Width logic for LaTeX cells, shared between the toolkits; returns false when the base class should decide instead. | |
| virtual bool | on_draw (const Cairo::RefPtr< Cairo::Context > &) override |
| virtual void | get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override |
| virtual void | on_size_allocate (Gtk::Allocation &allocation) override |
| void | shift_enter_pressed () |
| void | on_textbuf_change () |
Public Attributes | |
| sigc::signal< bool(DTree::iterator)> | content_execute |
| sigc::signal< bool(DTree::iterator)> | content_changed |
| sigc::signal< bool(std::string, int, DTree::iterator)> | content_insert |
| sigc::signal< bool(int, int, DTree::iterator)> | content_erase |
| sigc::signal< bool(DTree::iterator)> | cell_got_focus |
| sigc::signal< bool(DTree::iterator, int)> | complete_request |
| friend | CodeInput |
| int | window_width = 100 |
Private Attributes | |
| double | scale_ |
| double | display_scale_ |
| DTree::iterator | datacell |
| Glib::RefPtr< Gtk::Adjustment > | vadjustment |
| double | previous_value = -99.0 |
| CodeInput::exp_input_tv::exp_input_tv | ( | DTree::iterator | it, |
| Glib::RefPtr< Gtk::TextBuffer > | tb, | ||
| double | scale, | ||
| double | display_scale, | ||
| Glib::RefPtr< Gtk::Adjustment > | vadjustment_ ) |
| void CodeInput::exp_input_tv::draw_gutter | ( | const Cairo::RefPtr< Cairo::Context > & | cr, |
| int | h ) |
Paint the coloured bar down the left-hand side of the cell, on top of the TextView's own rendering.
Paint the coloured bar down the left-hand side of an input cell, which indicates the cell type and whether it is running.
Drawn on top of the TextView's own rendering by both toolkits.
|
overridevirtual |
|
overridevirtual |
| bool CodeInput::exp_input_tv::handle_key_press | ( | guint | keyval, |
| Gdk::ModifierType | state ) |
Key handling, shared between the toolkits.
Handle a key press.
Returns true when the key was consumed; false lets the TextView's own default handling run. gtkmm-3 reaches it through the on_key_press_event vfunc, GTK4 through an Gtk::EventControllerKey, which has the same contract.
Returns true when the key was consumed; false means the TextView's own default handling should run. Shared between gtkmm-3's on_key_press_event vfunc and GTK4's Gtk::EventControllerKey, which has the same true/false contract.
| bool CodeInput::exp_input_tv::measure_width_for_height | ( | int & | minimum_width, |
| int & | natural_width ) const |
Width logic for LaTeX cells, shared between the toolkits; returns false when the base class should decide instead.
LaTeX cells are forced to the window width.
Shared between gtkmm-3's get_preferred_width_for_height_vfunc and GTK4's measure_vfunc; returns false when the caller should defer to the base class.
|
overridevirtual |
| void CodeInput::exp_input_tv::on_focus_entered | ( | ) |
Side effects of focus and pointer motion, likewise shared.
The side effects of gaining focus, losing focus and pointer motion.
Shared between gtkmm-3's vfuncs and GTK4's Gtk::EventControllerFocus / Gtk::EventControllerMotion, neither of which gtkmm-3 wraps.
|
overridevirtual |
| void CodeInput::exp_input_tv::on_focus_left | ( | ) |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
| void CodeInput::exp_input_tv::on_pointer_motion | ( | ) |
|
overridevirtual |
|
overridevirtual |
| void CodeInput::exp_input_tv::on_textbuf_change | ( | ) |
| void CodeInput::exp_input_tv::shift_enter_pressed | ( | ) |
| sigc::signal<bool(DTree::iterator)> cadabra::CodeInput::exp_input_tv::cell_got_focus |
| friend cadabra::CodeInput::exp_input_tv::CodeInput |
| sigc::signal<bool(DTree::iterator, int)> cadabra::CodeInput::exp_input_tv::complete_request |
| sigc::signal<bool(DTree::iterator)> cadabra::CodeInput::exp_input_tv::content_changed |
| sigc::signal<bool(int, int, DTree::iterator)> cadabra::CodeInput::exp_input_tv::content_erase |
| sigc::signal<bool(DTree::iterator)> cadabra::CodeInput::exp_input_tv::content_execute |
| sigc::signal<bool(std::string, int, DTree::iterator)> cadabra::CodeInput::exp_input_tv::content_insert |
|
private |
|
private |
|
private |
|
private |
|
private |
| int cadabra::CodeInput::exp_input_tv::window_width = 100 |