1
package Padre::Wx::Role::Conduit;
7
Padre::Wx::Role::Conduit - Role to allows an object to receive Wx events
11
This is a role that provides the functionality needed to receive Wx thread
14
However, you should only use this role once, in the parent process.
16
It is implemented as a role so that the functionality can be used across the
17
main process and various testing classes (and will be easier to turn into a
28
our $VERSION = '0.76';
33
$SIGNAL = Wx::NewEventType();
44
TRACE( $_[0] ) if DEBUG;
47
Wx::Event::EVT_COMMAND( $CONDUIT, -1, $SIGNAL, \&on_signal );
52
TRACE( $_[0] ) if DEBUG;
53
$CONDUIT->AddPendingEvent( Wx::PlThreadEvent->new( -1, $SIGNAL, $_[1] ) ) if $CONDUIT;
56
# Pass the event through to the event handler
58
TRACE( $_[1] ) if DEBUG;
59
$HANDLER->on_signal( $_[1] ) if $HANDLER;
65
# Copyright 2008-2010 The Padre development team as listed in Padre.pm.
67
# This program is free software; you can redistribute it and/or
68
# modify it under the same terms as Perl 5 itself.