Added the ability to use the event to cancel the method

Previous, next and show can be cancelled by returning false in the
events.