A drawing area with built in mouse handlers for pan-zoom control.
More...
#include <mpblocks/gtk/pan_zoom_view.h>
|
sigc::signal< void,
GdkEventButton * > | sig_button |
| button event with transformed coordinates More...
|
|
sigc::signal< void, const
Cairo::RefPtr< Cairo::Context > & > | sig_draw |
| Signal is emitted by the on_draw handler, and sends out the context with appropriate scaling and. More...
|
|
sigc::signal< void,
GdkEventMotion * > | sig_motion |
| motion event with transformed coordinates More...
|
|
|
bool | active_ |
| If true, controls are enabled, if false, controls are disabled and events are passed through. More...
|
|
Eigen::Vector2d | last_pos_ |
| The last mouse position (used during pan) More...
|
|
Glib::RefPtr< Gtk::Adjustment > | offset_x_ |
| offset of viewport More...
|
|
Glib::RefPtr< Gtk::Adjustment > | offset_y_ |
| offset of viewport More...
|
|
int | pan_button_ |
| Which mouse button is used for pan. More...
|
|
guint | pan_button_mask_ |
|
Glib::RefPtr< Gtk::Adjustment > | scale_ |
| Size (in virtual units) of the largest dimension of the widget. More...
|
|
Glib::RefPtr< Gtk::Adjustment > | scale_rate_ |
| When the mouse wheel is turned multiply or divide the scale by this much. More...
|
|
A drawing area with built in mouse handlers for pan-zoom control.
Definition at line 36 of file pan_zoom_view.h.
mpblocks::gtk::PanZoomView::PanZoomView |
( |
| ) |
|
|
inline |
double mpblocks::gtk::PanZoomView::GetMaxDim |
( |
| ) |
|
|
inline |
Eigen::Vector2d mpblocks::gtk::PanZoomView::GetOffset |
( |
| ) |
|
|
inline |
double mpblocks::gtk::PanZoomView::GetScale |
( |
| ) |
|
|
inline |
double mpblocks::gtk::PanZoomView::GetScaleRate |
( |
| ) |
|
|
inline |
virtual bool mpblocks::gtk::PanZoomView::on_button_press_event |
( |
GdkEventButton * |
event | ) |
|
|
inlinevirtual |
virtual bool mpblocks::gtk::PanZoomView::on_draw |
( |
const Cairo::RefPtr< Cairo::Context > & |
ctx | ) |
|
|
inlinevirtual |
virtual bool mpblocks::gtk::PanZoomView::on_motion_notify_event |
( |
GdkEventMotion * |
event | ) |
|
|
inlinevirtual |
virtual bool mpblocks::gtk::PanZoomView::on_scroll_event |
( |
GdkEventScroll * |
event | ) |
|
|
inlinevirtual |
Eigen::Vector2d mpblocks::gtk::PanZoomView::RawPoint |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inline |
Convert the point (x,y) in GTK coordinates, with the origin at the top left, to a point in traditional cartesian coordinates, where the origin is at the bottom left.
Definition at line 142 of file pan_zoom_view.h.
void mpblocks::gtk::PanZoomView::SetOffset |
( |
const Eigen::Vector2d & |
offset | ) |
|
|
inline |
void mpblocks::gtk::PanZoomView::SetOffsetAdjustments |
( |
Glib::RefPtr< Gtk::Adjustment > |
offset_x, |
|
|
Glib::RefPtr< Gtk::Adjustment > |
offset_y |
|
) |
| |
|
inline |
void mpblocks::gtk::PanZoomView::SetScale |
( |
double |
scale | ) |
|
|
inline |
void mpblocks::gtk::PanZoomView::SetScaleAdjustments |
( |
Glib::RefPtr< Gtk::Adjustment > |
scale, |
|
|
Glib::RefPtr< Gtk::Adjustment > |
scale_rate |
|
) |
| |
|
inline |
void mpblocks::gtk::PanZoomView::SetScaleRate |
( |
double |
scale_rate | ) |
|
|
inline |
template<typename Event >
void mpblocks::gtk::PanZoomView::TransformEvent |
( |
Event * |
event | ) |
|
|
inline |
Eigen::Vector2d mpblocks::gtk::PanZoomView::TransformPoint |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inline |
Return a point in the virtual cartesian plane by applying the offset and scaling of the viewport.
Definition at line 148 of file pan_zoom_view.h.
bool mpblocks::gtk::PanZoomView::active_ |
|
private |
If true, controls are enabled, if false, controls are disabled and events are passed through.
Definition at line 53 of file pan_zoom_view.h.
Eigen::Vector2d mpblocks::gtk::PanZoomView::last_pos_ |
|
private |
The last mouse position (used during pan)
Definition at line 49 of file pan_zoom_view.h.
Glib::RefPtr<Gtk::Adjustment> mpblocks::gtk::PanZoomView::offset_x_ |
|
private |
Glib::RefPtr<Gtk::Adjustment> mpblocks::gtk::PanZoomView::offset_y_ |
|
private |
int mpblocks::gtk::PanZoomView::pan_button_ |
|
private |
guint mpblocks::gtk::PanZoomView::pan_button_mask_ |
|
private |
Glib::RefPtr<Gtk::Adjustment> mpblocks::gtk::PanZoomView::scale_ |
|
private |
Size (in virtual units) of the largest dimension of the widget.
Definition at line 42 of file pan_zoom_view.h.
Glib::RefPtr<Gtk::Adjustment> mpblocks::gtk::PanZoomView::scale_rate_ |
|
private |
When the mouse wheel is turned multiply or divide the scale by this much.
Definition at line 46 of file pan_zoom_view.h.
sigc::signal<void, GdkEventButton*> mpblocks::gtk::PanZoomView::sig_button |
button event with transformed coordinates
Definition at line 68 of file pan_zoom_view.h.
sigc::signal<void, const Cairo::RefPtr<Cairo::Context>&> mpblocks::gtk::PanZoomView::sig_draw |
Signal is emitted by the on_draw handler, and sends out the context with appropriate scaling and.
Definition at line 62 of file pan_zoom_view.h.
sigc::signal<void, GdkEventMotion*> mpblocks::gtk::PanZoomView::sig_motion |
motion event with transformed coordinates
Definition at line 65 of file pan_zoom_view.h.
The documentation for this class was generated from the following file: