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();
17 virtual ~ImageView();
18
19 void set_image_from_base64(const std::string& b64);
20
21 virtual bool on_motion_notify_event(GdkEventMotion *event) override;
22 virtual bool on_button_press_event(GdkEventButton *event) override;
23 virtual bool on_button_release_event(GdkEventButton *event) override;
24
25 private:
26 Gtk::VBox vbox;
27 Gtk::Image image;
28 Glib::RefPtr<Gdk::Pixbuf> pixbuf;
29
30 bool sizing;
31 double prev_x, prev_y;
33 };
34
35 };
An image viewing widget.
Definition: ImageView.hh:14
Gtk::Image image
Definition: ImageView.hh:27
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:26
int height_at_press
Definition: ImageView.hh:32
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:32
ImageView()
Definition: ImageView.cc:10
virtual ~ImageView()
Definition: ImageView.cc:26
bool sizing
Definition: ImageView.hh:30
Glib::RefPtr< Gdk::Pixbuf > pixbuf
Definition: ImageView.hh:28
double prev_x
Definition: ImageView.hh:31
double prev_y
Definition: ImageView.hh:31
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83