Class: Wx::RT::ThreadEvent
- Defined in:
- lib/wx/doc/gen/rt/thread_event.rb,
lib/wx/doc/rt/thread_event.rb
Overview
This class adds some simple functionality to Event to facilitate inter-thread communication.
This event is not natively emitted by any control/class: it is just a helper class for the user. Its most important feature is the #get_event_category implementation which allows thread events NOT to be processed by GUIEventLoop#yield_for calls (unless the EventCategory::EVT_CATEGORY_THREAD is specified - which is never in wx code).
In wxRuby user defined classes can be derived from this class but it is important to note that when used with SharedEvtHandler#queue_message (the only imaginable use for thread events) no Ruby state will ever persist and adding instance variables is therefor not useful. The real benefit of being able to derive from this class is that it provides for the registration and use of user defined event types for the derived classes allowing to differentiate in event handling.
Instance Method Summary collapse
-
#clone ⇒ Wx::Event
Clones this event making sure that all internal members which use COW (only m_commandString for now; see Reference Counting) are unshared (see Object#un_share).
-
#get_extra_long ⇒ Integer
(also: #extra_long)
Returns extra information integer value.
-
#get_int ⇒ Integer
(also: #int)
Returns stored integer value.
-
#get_string ⇒ String
(also: #string)
Returns stored string value.
-
#initialize(eventType = Wx::EVT_THREAD, id = Wx::StandardID::ID_ANY) ⇒ Wx::RT::ThreadEvent
constructor
Constructor.
-
#set_extra_long(extraLong) ⇒ void
(also: #extra_long=)
Sets the extra information value.
-
#set_int(intCommand) ⇒ void
(also: #int=)
Sets the integer value.
-
#set_string(string) ⇒ void
(also: #string=)
Sets the string value.
Methods inherited from Event
#get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation
Methods inherited from Object
Constructor Details
#initialize(eventType = Wx::EVT_THREAD, id = Wx::StandardID::ID_ANY) ⇒ Wx::RT::ThreadEvent
Constructor.
22 |
# File 'lib/wx/doc/rt/thread_event.rb', line 22 def initialize(eventType=Wx::EVT_THREAD, id=Wx::StandardID::ID_ANY) end |
Instance Method Details
#clone ⇒ Wx::Event
Clones this event making sure that all internal members which use COW (only m_commandString for now; see Reference Counting) are unshared (see Object#un_share).
31 |
# File 'lib/wx/doc/gen/rt/thread_event.rb', line 31 def clone; end |
#get_extra_long ⇒ Integer Also known as: extra_long
Returns extra information integer value.
35 |
# File 'lib/wx/doc/gen/rt/thread_event.rb', line 35 def get_extra_long; end |
#get_int ⇒ Integer Also known as: int
Returns stored integer value.
40 |
# File 'lib/wx/doc/gen/rt/thread_event.rb', line 40 def get_int; end |
#get_string ⇒ String Also known as: string
Returns stored string value.
45 |
# File 'lib/wx/doc/gen/rt/thread_event.rb', line 45 def get_string; end |
#set_extra_long(extraLong) ⇒ void Also known as: extra_long=
This method returns an undefined value.
Sets the extra information value.
51 |
# File 'lib/wx/doc/gen/rt/thread_event.rb', line 51 def set_extra_long(extraLong) end |
#set_int(intCommand) ⇒ void Also known as: int=
This method returns an undefined value.
Sets the integer value.
57 |
# File 'lib/wx/doc/gen/rt/thread_event.rb', line 57 def set_int(intCommand) end |
#set_string(string) ⇒ void Also known as: string=
This method returns an undefined value.
Sets the string value.
63 |
# File 'lib/wx/doc/gen/rt/thread_event.rb', line 63 def set_string(string) end |