![]() |
Cadabra
Computer algebra system for field theory problems
|
#include <TeXView.hh>
Public Member Functions | |
| TeXArea (TeXView *owner_) | |
| ~TeXArea () | |
| bool | draw_impl (const Cairo::RefPtr< Cairo::Context > &cr) |
| The actual painting, shared between the two toolkits. | |
| virtual bool | on_draw (const Cairo::RefPtr< Cairo::Context > &cr) override |
| void | update_image (std::shared_ptr< TeXEngine::TeXRequest >) |
| Propagate a change in the TeXRequest (i.e. | |
| void | set_latex (const std::string &latex) |
| MicroTeX: set the LaTeX string and replace/substitute so that MicroTeX can render it (but do not actually render). | |
| void | layout_latex () const |
| MicroTeX: just run the LaTeX layout algorithms, do not draw. | |
| int | need_height (int width) const |
Public Attributes | |
| float | _text_size |
Protected Member Functions | |
| Gtk::SizeRequestMode | get_request_mode_vfunc () const override |
| void | measure_height_for_width (int width, int &minimum_height, int &natural_height) const |
| The MicroTeX size logic, shared between the two toolkits. | |
| void | relayout_for_allocation (int width, int height) |
| The re-layout that follows a new allocation, shared between gtkmm-3's on_size_allocate and GTK4's size_allocate_vfunc. | |
| void | get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const override |
| void | get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override |
| void | on_size_allocate (Gtk::Allocation &allocation) override |
Private Member Functions | |
| std::string | verbatimise (const std::string &) const |
Private Attributes | |
| TeXView * | owner |
| int | rendering_width |
| int | padding_x |
| int | padding_y |
| microtex::Render * | _render |
| std::string | unfixed |
| std::string | fixed |
| std::string | _laid_out_text |
| int | _laid_out_width = -1 |
| float | _laid_out_text_size = -1.f |
| TeXView::TeXArea::TeXArea | ( | TeXView * | owner_ | ) |
| TeXView::TeXArea::~TeXArea | ( | ) |
| bool TeXView::TeXArea::draw_impl | ( | const Cairo::RefPtr< Cairo::Context > & | cr | ) |
The actual painting, shared between the two toolkits.
gtkmm-3 reaches it through the on_draw vfunc, GTK4 through the callback registered with set_draw_func().
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
| void TeXView::TeXArea::layout_latex | ( | ) | const |
MicroTeX: just run the LaTeX layout algorithms, do not draw.
|
protected |
The MicroTeX size logic, shared between the two toolkits.
The MicroTeX height-for-width computation, shared between gtkmm-3's get_preferred_height_for_width_vfunc and GTK4's measure_vfunc.
| int TeXView::TeXArea::need_height | ( | int | width | ) | const |
|
overridevirtual |
|
overrideprotected |
|
protected |
The re-layout that follows a new allocation, shared between gtkmm-3's on_size_allocate and GTK4's size_allocate_vfunc.
| void TeXView::TeXArea::set_latex | ( | const std::string & | latex | ) |
MicroTeX: set the LaTeX string and replace/substitute so that MicroTeX can render it (but do not actually render).
| void TeXView::TeXArea::update_image | ( | std::shared_ptr< TeXEngine::TeXRequest > | content | ) |
Propagate a change in the TeXRequest (i.e.
a new LaTeX string) through to the visible widget.
|
private |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
| float cadabra::TeXView::TeXArea::_text_size |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |