4 #include <gtkmm/eventbox.h>
6 #include <gtkmm/drawingarea.h>
7 #if GTKMM_MINOR_VERSION>=10
8 #include <gtkmm/revealer.h>
13 #include "../common/TeXEngine.hh"
17 #include "utils/utf.h"
33 std::shared_ptr<TeXEngine::TeXRequest>
content;
49 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context>& cr)
override;
55 void update_image(std::shared_ptr<TeXEngine::TeXRequest>,
double scale);
79 int& natural_height)
const override;
81 int& natural_width)
const override;
108 virtual void on_show()
override;
TeXEngine is used to convert LaTeX strings into PNG images.
Definition: TeXEngine.hh:23
Definition: TeXView.hh:44
std::string fixed
Definition: TeXView.hh:91
std::string unfixed
Definition: TeXView.hh:91
void get_preferred_width_for_height_vfunc(int height, int &minimum_width, int &natural_width) const override
Definition: TeXView.cc:119
TeXView * owner
Definition: TeXView.hh:85
void set_latex(const std::string &latex)
MicroTeX: set the LaTeX string and replace/substitute so that MicroTeX can render it (but do not actu...
Definition: TeXView.cc:330
TeXArea(bool use_microtex, TeXView *owner_)
Definition: TeXView.cc:459
int padding_x
Definition: TeXView.hh:87
void layout_latex() const
MicroTeX: just run the LaTeX layout algorithms, do not draw.
Definition: TeXView.cc:238
double scale_
Definition: TeXView.hh:62
virtual bool on_draw(const Cairo::RefPtr< Cairo::Context > &cr) override
Definition: TeXView.cc:278
microtex::Render * _render
Definition: TeXView.hh:90
bool use_microtex
Definition: TeXView.hh:74
Glib::RefPtr< Gdk::Pixbuf > pixbuf
The actual image is stored in the image referenced by pixbuf.
Definition: TeXView.hh:61
float _text_size
Definition: TeXView.hh:63
int padding_y
Definition: TeXView.hh:87
void update_image(std::shared_ptr< TeXEngine::TeXRequest >, double scale)
Update the visible image from the pixbuf.
Definition: TeXView.cc:205
int rendering_width
Definition: TeXView.hh:86
Gtk::SizeRequestMode get_request_mode_vfunc() const override
Definition: TeXView.cc:86
~TeXArea()
Definition: TeXView.cc:470
void on_size_allocate(Gtk::Allocation &allocation) override
Definition: TeXView.cc:136
void get_preferred_height_for_width_vfunc(int width, int &minimum_height, int &natural_height) const override
Definition: TeXView.cc:91
TeXView is a widget which knows how to turn a string into a LaTeX-rendered image and display that.
Definition: TeXView.hh:28
Gtk::VBox vbox
Definition: TeXView.hh:41
virtual bool on_button_release_event(GdkEventButton *) override
Definition: TeXView.cc:188
TeXEngine & engine
Definition: TeXView.hh:113
void dim(bool)
Dim the output to indicate that the result is no longer guaranteed to be correlated with the input ce...
Definition: TeXView.cc:182
Gtk::Revealer rbox
Definition: TeXView.hh:40
virtual ~TeXView()
Definition: TeXView.cc:49
float text_size() const
Definition: TeXView.cc:63
TeXArea image
Definition: TeXView.hh:94
DTree::iterator datacell
Definition: TeXView.hh:39
void update_image()
Update the TeX image.
Definition: TeXView.cc:194
virtual void on_show() override
Definition: TeXView.cc:79
std::shared_ptr< TeXEngine::TeXRequest > content
Definition: TeXView.hh:33
TeXView(TeXEngine &, DTree::iterator, bool use_microtex_, int hmargin=25)
Definition: TeXView.cc:15
Gtk::HBox hbox
Definition: TeXView.hh:42
bool use_microtex
Definition: TeXView.hh:114
void set_use_microtex(bool)
Definition: TeXView.cc:54
void convert()
Definition: TeXView.cc:159
sigc::signal1< bool, DTree::iterator > show_hide_requested
Definition: TeXView.hh:35
sigc::signal1< bool, std::string > tex_error
Definition: TeXView.hh:104
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83