Cadabra
Computer algebra system for field theory problems
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 
8 namespace 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  };
cadabra::ImageView::vbox
Gtk::VBox vbox
Definition: ImageView.hh:26
cadabra::ImageView::on_button_release_event
virtual bool on_button_release_event(GdkEventButton *event) override
Definition: ImageView.cc:54
cadabra::ImageView::ImageView
ImageView()
Definition: ImageView.cc:10
cadabra::ImageView::height_at_press
int height_at_press
Definition: ImageView.hh:32
cadabra::ImageView
Definition: ImageView.hh:14
cadabra::ImageView::sizing
bool sizing
Definition: ImageView.hh:30
cadabra::ImageView::on_button_press_event
virtual bool on_button_press_event(GdkEventButton *event) override
Definition: ImageView.cc:42
cadabra::ImageView::image
Gtk::Image image
Definition: ImageView.hh:27
cadabra::ImageView::prev_y
double prev_y
Definition: ImageView.hh:31
cadabra::ImageView::~ImageView
virtual ~ImageView()
Definition: ImageView.cc:26
cadabra::ImageView::on_motion_notify_event
virtual bool on_motion_notify_event(GdkEventMotion *event) override
Definition: ImageView.cc:30
cadabra::ImageView::pixbuf
Glib::RefPtr< Gdk::Pixbuf > pixbuf
Definition: ImageView.hh:28
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:80
cadabra::ImageView::set_image_from_base64
void set_image_from_base64(const std::string &b64)
Definition: ImageView.cc:63
cadabra::ImageView::prev_x
double prev_x
Definition: ImageView.hh:31
cadabra::ImageView::width_at_press
int width_at_press
Definition: ImageView.hh:32