Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
ImageView.hh
Go to the documentation of this file.
1
2#pragma once
3
4#include <gtkmm/box.h>
5#include <gtkmm/image.h>
6#include <gtkmm/eventbox.h>
7
8namespace cadabra {
9
13
14 class ImageView : public Gtk::EventBox {
15 public:
16 ImageView(double scale);
17 virtual ~ImageView();
18
19 void set_image_from_base64(const std::string& b64);
20 void set_image_from_svg(const std::string& svg);
21
22 virtual bool on_motion_notify_event(GdkEventMotion *event) override;
23 virtual bool on_button_press_event(GdkEventButton *event) override;
24 virtual bool on_button_release_event(GdkEventButton *event) override;
25
26 private:
27 Gtk::VBox vbox;
28 Gtk::Image image;
29 Glib::RefPtr<Gdk::Pixbuf> pixbuf;
30
31 bool sizing;
32 double prev_x, prev_y;
34 double scale;
35 };
36
37 };
ImageView(double scale)
Definition ImageView.cc:10
void set_image_from_svg(const std::string &svg)
Definition ImageView.cc:84
Gtk::Image image
Definition ImageView.hh:28
void set_image_from_base64(const std::string &b64)
Definition ImageView.cc:63
virtual bool on_button_release_event(GdkEventButton *event) override
Definition ImageView.cc:54
Gtk::VBox vbox
Definition ImageView.hh:27
int height_at_press
Definition ImageView.hh:33
virtual bool on_motion_notify_event(GdkEventMotion *event) override
Definition ImageView.cc:30
virtual bool on_button_press_event(GdkEventButton *event) override
Definition ImageView.cc:42
int width_at_press
Definition ImageView.hh:33
virtual ~ImageView()
Definition ImageView.cc:26
bool sizing
Definition ImageView.hh:31
Glib::RefPtr< Gdk::Pixbuf > pixbuf
Definition ImageView.hh:29
double prev_x
Definition ImageView.hh:32
double prev_y
Definition ImageView.hh:32
double scale
Definition ImageView.hh:34
Functions to handle the exchange properties of two or more symbols in a product.
Definition Adjform.cc:83