Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Gtk4DrawArea Class Reference

Definition at line 19 of file Gtk4DrawArea.h.

Public Member Functions

 Gtk4DrawArea ()
 
virtual ~Gtk4DrawArea ()=default
 
Cairo::ImageSurface * GetCache () const
 
TCanvas * GetCanvas () const
 
Cairo::Context * GetContext () const
 
void SetCanvas (TCanvas *c)
 
void ShowContextMenu (Glib::RefPtr< Gio::Menu > menu_model, const char *title, int x, int y)
 Shows context menu with provided items and title at specified position.
 

Public Attributes

sigc::signal< void(const char *) status_changed )()
 

Protected Member Functions

void on_draw (const Cairo::RefPtr< Cairo::Context > &cr, int width, int height)
 
void on_mouse_click (int n_press, double x, double y)
 
void on_mouse_enter (double x, double y)
 
void on_mouse_leave ()
 
void on_mouse_move (double x, double y)
 
void on_mouse_released (int n_press, double x, double y)
 
bool on_mouse_scroll (double dx, double dy)
 
bool on_my_query_tooltip (int x, int y, bool keyboard_tooltip, const Glib::RefPtr< Gtk::Tooltip > &tooltip)
 

Protected Attributes

TCanvas * fCanvas = nullptr
 
Cairo::Context * fContext = nullptr
 
Cairo::RefPtr< Cairo::ImageSurface > fDrawingCache
 
double fLastMouseX = 0
 
double fLastMouseY = 0
 
bool fShowEventStatus = true
 
Glib::RefPtr< Gtk::GestureClick > m_click_gesture
 
Glib::RefPtr< Gtk::EventControllerMotion > m_motion_controller
 
Glib::RefPtr< Gtk::EventControllerScroll > m_scroll_controller
 
sigc::signal< void(const char *) m_status_changed )
 

#include </github/home/ROOT-CI/src/gui/gtk4canvas/src/Gtk4DrawArea.h>

Inheritance diagram for Gtk4DrawArea:
[legend]

Constructor & Destructor Documentation

◆ Gtk4DrawArea()

Gtk4DrawArea::Gtk4DrawArea ( )

Definition at line 25 of file Gtk4DrawArea.cxx.

◆ ~Gtk4DrawArea()

virtual Gtk4DrawArea::~Gtk4DrawArea ( )
virtualdefault

Member Function Documentation

◆ GetCache()

Cairo::ImageSurface * Gtk4DrawArea::GetCache ( ) const
inline

Definition at line 29 of file Gtk4DrawArea.h.

◆ GetCanvas()

TCanvas * Gtk4DrawArea::GetCanvas ( ) const
inline

Definition at line 25 of file Gtk4DrawArea.h.

◆ GetContext()

Cairo::Context * Gtk4DrawArea::GetContext ( ) const
inline

Definition at line 27 of file Gtk4DrawArea.h.

◆ on_draw()

void Gtk4DrawArea::on_draw ( const Cairo::RefPtr< Cairo::Context > & cr,
int width,
int height )
protected

Definition at line 72 of file Gtk4DrawArea.cxx.

◆ on_mouse_click()

void Gtk4DrawArea::on_mouse_click ( int n_press,
double x,
double y )
protected

Definition at line 114 of file Gtk4DrawArea.cxx.

◆ on_mouse_enter()

void Gtk4DrawArea::on_mouse_enter ( double x,
double y )
protected

Definition at line 167 of file Gtk4DrawArea.cxx.

◆ on_mouse_leave()

void Gtk4DrawArea::on_mouse_leave ( )
protected

Definition at line 176 of file Gtk4DrawArea.cxx.

◆ on_mouse_move()

void Gtk4DrawArea::on_mouse_move ( double x,
double y )
protected

Definition at line 184 of file Gtk4DrawArea.cxx.

◆ on_mouse_released()

void Gtk4DrawArea::on_mouse_released ( int n_press,
double x,
double y )
protected

Definition at line 139 of file Gtk4DrawArea.cxx.

◆ on_mouse_scroll()

bool Gtk4DrawArea::on_mouse_scroll ( double dx,
double dy )
protected

Definition at line 226 of file Gtk4DrawArea.cxx.

◆ on_my_query_tooltip()

bool Gtk4DrawArea::on_my_query_tooltip ( int x,
int y,
bool keyboard_tooltip,
const Glib::RefPtr< Gtk::Tooltip > & tooltip )
protected

Definition at line 292 of file Gtk4DrawArea.cxx.

◆ SetCanvas()

void Gtk4DrawArea::SetCanvas ( TCanvas * c)
inline

Definition at line 24 of file Gtk4DrawArea.h.

◆ ShowContextMenu()

void Gtk4DrawArea::ShowContextMenu ( Glib::RefPtr< Gio::Menu > menu_model,
const char * title,
int x,
int y )

Shows context menu with provided items and title at specified position.

Definition at line 238 of file Gtk4DrawArea.cxx.

Member Data Documentation

◆ fCanvas

TCanvas* Gtk4DrawArea::fCanvas = nullptr
protected

Definition at line 41 of file Gtk4DrawArea.h.

◆ fContext

Cairo::Context* Gtk4DrawArea::fContext = nullptr
protected

Definition at line 42 of file Gtk4DrawArea.h.

◆ fDrawingCache

Cairo::RefPtr<Cairo::ImageSurface> Gtk4DrawArea::fDrawingCache
protected

Definition at line 46 of file Gtk4DrawArea.h.

◆ fLastMouseX

double Gtk4DrawArea::fLastMouseX = 0
protected

Definition at line 43 of file Gtk4DrawArea.h.

◆ fLastMouseY

double Gtk4DrawArea::fLastMouseY = 0
protected

Definition at line 44 of file Gtk4DrawArea.h.

◆ fShowEventStatus

bool Gtk4DrawArea::fShowEventStatus = true
protected

Definition at line 45 of file Gtk4DrawArea.h.

◆ m_click_gesture

Glib::RefPtr<Gtk::GestureClick> Gtk4DrawArea::m_click_gesture
protected

Definition at line 58 of file Gtk4DrawArea.h.

◆ m_motion_controller

Glib::RefPtr<Gtk::EventControllerMotion> Gtk4DrawArea::m_motion_controller
protected

Definition at line 59 of file Gtk4DrawArea.h.

◆ m_scroll_controller

Glib::RefPtr<Gtk::EventControllerScroll> Gtk4DrawArea::m_scroll_controller
protected

Definition at line 60 of file Gtk4DrawArea.h.

◆ m_status_changed

sigc::signal<void(const char *) Gtk4DrawArea::m_status_changed)
protected

Definition at line 56 of file Gtk4DrawArea.h.

◆ status_changed

sigc::signal< void(const char *) Gtk4DrawArea::status_changed) ()

Definition at line 220 of file Gtk4DrawArea.h.

  • gui/gtk4canvas/src/Gtk4DrawArea.h
  • gui/gtk4canvas/src/Gtk4DrawArea.cxx