Class: Wx::SF::ShapeTextEvent
- Inherits:
-
Event
- Object
- Event
- Wx::SF::ShapeTextEvent
- Defined in:
- lib/wx/shapes/events.rb
Overview
Class encapsulates Wx::SF shape text change event.
Instance Method Summary collapse
-
#get_shape ⇒ Wx::SF::Shape?
(also: #shape)
Get a shape object from the event object.
-
#get_text ⇒ String
(also: #text)
Get shape text.
-
#initialize(evt_type = Wx::EVT_NULL, id = 0) ⇒ ShapeTextEvent
constructor
Constructor.
-
#set_shape(shape) ⇒ Object
(also: #shape=)
Insert a shape object to the event object.
-
#set_text(text) ⇒ Object
(also: #text=)
Set new shape text.
Constructor Details
#initialize(evt_type = Wx::EVT_NULL, id = 0) ⇒ ShapeTextEvent
Constructor
129 130 131 132 133 |
# File 'lib/wx/shapes/events.rb', line 129 def initialize(evt_type = Wx::EVT_NULL, id = 0) super(evt_type, id.to_i) @shape = nil @text = '' end |
Instance Method Details
#get_shape ⇒ Wx::SF::Shape? Also known as: shape
Get a shape object from the event object.
144 145 146 |
# File 'lib/wx/shapes/events.rb', line 144 def get_shape @shape end |
#get_text ⇒ String Also known as: text
Get shape text
158 159 160 |
# File 'lib/wx/shapes/events.rb', line 158 def get_text @text end |
#set_shape(shape) ⇒ Object Also known as: shape=
Insert a shape object to the event object.
137 138 139 |
# File 'lib/wx/shapes/events.rb', line 137 def set_shape(shape) @shape = shape end |
#set_text(text) ⇒ Object Also known as: text=
Set new shape text
151 152 153 |
# File 'lib/wx/shapes/events.rb', line 151 def set_text(text) @text = text end |