-
Notifications
You must be signed in to change notification settings - Fork 62
/
imagewidgets.h
51 lines (34 loc) · 917 Bytes
/
imagewidgets.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef IMAGEWIDGETS_H
#define IMAGEWIDGETS_H
#include "config.h"
#include <gtkmm.h>
class CImageWidget : public Gtk::DrawingArea
{
public:
CImageWidget(Glib::RefPtr<Gdk::Window> wnd);
virtual ~CImageWidget();
int w,h;
bool selected;
Glib::RefPtr<Gdk::Window> target_window;
Cairo::RefPtr<Cairo::Surface> image;
Cairo::RefPtr<Cairo::Context> image_ctx;
void SetSize(int x, int y);
virtual void Redraw();
virtual int GetBaseline();
virtual bool on_draw(const Cairo::RefPtr<Cairo::Context> &ctx);
virtual void on_unrealize();
virtual void destroy_notify_();
};
#if defined (HAVE_LASEM) || defined (HAVE_CLATEXMATH)
class CLatexWidget : public CImageWidget
{
public:
CLatexWidget(Glib::RefPtr<Gdk::Window> wnd, Glib::ustring source, Gdk::RGBA fg);
virtual ~CLatexWidget();
Glib::ustring source;
virtual void Redraw();
int baseline;
virtual int GetBaseline();
};
#endif
#endif