Class: Wx::SF::ShapeTextEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/wx/shapes/events.rb

Overview

Class encapsulates Wx::SF shape text change event.

Instance Method Summary collapse

Constructor Details

#initialize(evt_type = Wx::EVT_NULL, id = 0) ⇒ ShapeTextEvent

Constructor

Parameters:

  • evt_type (Integer) (defaults to: Wx::EVT_NULL)
  • id (Integer) (defaults to: 0)


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_shapeWx::SF::Shape? Also known as: shape

Get a shape object from the event object.

Returns:



144
145
146
# File 'lib/wx/shapes/events.rb', line 144

def get_shape
  @shape
end

#get_textString Also known as: text

Get shape text

Returns:

  • (String)

    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.

Parameters:



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

Parameters:

  • text (String)

    new text



151
152
153
# File 'lib/wx/shapes/events.rb', line 151

def set_text(text)
  @text = text
end