Author image Zakariyya Mughal
and 4 contributors

NAME

Renard::Curie::Component::PageDrawingArea::Role::MouseScrollBindings - A role to setup the bindings for mouse wheel scrolling for a page drawing area

VERSION

version 0.005

ATTRIBUTES

MIN_ZOOM_LEVEL

A constant for the minimum zoom level possible so that the zoom level never becomes negative.

METHODS

setup_scroll_bindings

  method setup_scroll_bindings()

Sets up the signals to capture scroll events on this component.

compute_zoom_out

  method compute_zoom_out( (ZoomLevel) $zoom_level, $amount = 0.05 )

Computes the new zoom level in order to zoom out.

compute_zoom_in

  method compute_zoom_in( (ZoomLevel) $zoom_level, $amount = 0.05 ) :ReturnType(ZoomLevel) {

Computes the new zoom level in order to zoom in.

CALLBACKS

on_scroll_event_cb

  callback on_scroll_event_cb($window, $event, $self)

Callback that responds to specific scroll events and dispatches the associated handlers.

AUTHOR

Project Renard

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Project Renard.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.