Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | List of all members
cadabra::TeXView Class Reference

Description

TeXView is a widget which knows how to turn a string into a LaTeX-rendered image and display that.

#include <TeXView.hh>

Inheritance diagram for cadabra::TeXView:

Public Member Functions

 TeXView (TeXEngine &, DTree::iterator, int hmargin=25)
 
virtual ~TeXView ()
 
void update_image ()
 Update the visible image from the pixbuf. More...
 
void dim (bool)
 Dim the output to indicate that the result is no longer guaranteed to be correlated with the input cell from which it was derived. More...
 

Public Attributes

std::shared_ptr
< TeXEngine::TeXRequest
content
 
sigc::signal1< bool,
DTree::iterator > 
show_hide_requested
 
DTree::iterator datacell
 
Gtk::VBox vbox
 
Gtk::HBox hbox
 
Gtk::Image image
 
Glib::RefPtr< Gdk::Pixbuf > pixbuf
 The actual image is stored in the image referenced by pixbuf. More...
 
sigc::signal1< bool, std::string > tex_error
 

Protected Member Functions

virtual bool on_button_release_event (GdkEventButton *) override
 
virtual void on_show () override
 
void convert ()
 

Private Attributes

TeXEngineengine
 

Constructor & Destructor Documentation

TeXView::TeXView ( TeXEngine eng,
DTree::iterator  it,
int  hmargin = 25 
)
TeXView::~TeXView ( )
virtual

Member Function Documentation

void TeXView::convert ( )
protected
void TeXView::dim ( bool  d)

Dim the output to indicate that the result is no longer guaranteed to be correlated with the input cell from which it was derived.

bool TeXView::on_button_release_event ( GdkEventButton *  ev)
overrideprotectedvirtual
void TeXView::on_show ( )
overrideprotectedvirtual
void TeXView::update_image ( )

Update the visible image from the pixbuf.

Call this in order to propagate changes to the pixbuf (e.g. from re-running the TeXRequest) to the visible widget itself.

Member Data Documentation

std::shared_ptr<TeXEngine::TeXRequest> cadabra::TeXView::content
DTree::iterator cadabra::TeXView::datacell
TeXEngine& cadabra::TeXView::engine
private
Gtk::HBox cadabra::TeXView::hbox
Gtk::Image cadabra::TeXView::image
Glib::RefPtr<Gdk::Pixbuf> cadabra::TeXView::pixbuf

The actual image is stored in the image referenced by pixbuf.

FIXME: This pointer is not yet shared among instances which show the same content.

sigc::signal1<bool, DTree::iterator> cadabra::TeXView::show_hide_requested
sigc::signal1<bool, std::string> cadabra::TeXView::tex_error
Gtk::VBox cadabra::TeXView::vbox

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