Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
cadabra::ImageView Class Reference

Description

An image viewing widget.

#include <ImageView.hh>

Inheritance diagram for cadabra::ImageView:

Public Member Functions

 ImageView (double display_scale, int logical_width)
 
virtual ~ImageView ()
 
void on_save_as () const
 
void on_pointer_motion (double x, double y)
 Drag-to-resize, shared between the toolkits.
 
virtual bool on_motion_notify_event (GdkEventMotion *event) override
 
void on_button_pressed (int n_press, double x, double y)
 Button handling goes through a gesture controller rather than the on_button_{press,release}_event vfuncs, which are removed in GTK4.
 
void on_button_released (int n_press, double x, double y)
 
void set_image_from_base64 (const std::string &b64)
 
void set_image_from_svg (const std::string &svg)
 

Private Attributes

ImageArea area
 
bool sizing
 
double prev_x
 
double prev_y
 
int height_at_press
 
int width_at_press
 
cdb::ContextMenu context_menu
 
Glib::RefPtr< cdb::ClickGesture > click_gesture
 

Constructor & Destructor Documentation

◆ ImageView()

ImageView::ImageView ( double  display_scale,
int  logical_width 
)

◆ ~ImageView()

ImageView::~ImageView ( )
virtual

Member Function Documentation

◆ on_button_pressed()

void ImageView::on_button_pressed ( int  n_press,
double  x,
double  y 
)

Button handling goes through a gesture controller rather than the on_button_{press,release}_event vfuncs, which are removed in GTK4.

Motion is still a vfunc: gtkmm-3 has no EventControllerMotion.

◆ on_button_released()

void ImageView::on_button_released ( int  n_press,
double  x,
double  y 
)

◆ on_motion_notify_event()

bool ImageView::on_motion_notify_event ( GdkEventMotion *  event)
overridevirtual

◆ on_pointer_motion()

void ImageView::on_pointer_motion ( double  x,
double  y 
)

Drag-to-resize, shared between the toolkits.

Drag-to-resize.

Shared between gtkmm-3's on_motion_notify_event vfunc and GTK4's Gtk::EventControllerMotion, which gtkmm-3 does not wrap.

◆ on_save_as()

void ImageView::on_save_as ( ) const

◆ set_image_from_base64()

void ImageView::set_image_from_base64 ( const std::string &  b64)

◆ set_image_from_svg()

void ImageView::set_image_from_svg ( const std::string &  svg)

Member Data Documentation

◆ area

ImageArea cadabra::ImageView::area
private

◆ click_gesture

Glib::RefPtr<cdb::ClickGesture> cadabra::ImageView::click_gesture
private

◆ context_menu

cdb::ContextMenu cadabra::ImageView::context_menu
private

◆ height_at_press

int cadabra::ImageView::height_at_press
private

◆ prev_x

double cadabra::ImageView::prev_x
private

◆ prev_y

double cadabra::ImageView::prev_y
private

◆ sizing

bool cadabra::ImageView::sizing
private

◆ width_at_press

int cadabra::ImageView::width_at_press
private

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