Class: SDL2::Event::TextEditing
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::TextEditing
- Defined in:
- ext/sdl2_ext/event.c,
ext/sdl2_ext/event.c
Overview
This class represents text editing event.
Instance Attribute Summary collapse
-
#length ⇒ Integer
the length of selected editing text.
-
#start ⇒ Integer
the start cursor of selected editing text.
-
#text ⇒ String
the editing text.
-
#window_id ⇒ Integer
the associate window id.
Attributes inherited from SDL2::Event
Instance Method Summary collapse
-
#inspect ⇒ String
Inspection string.
Methods inherited from SDL2::Event
enable=, enabled?, poll, #window
Instance Attribute Details
#length ⇒ Integer
the length of selected editing text
#start ⇒ Integer
the start cursor of selected editing text
#text ⇒ String
the editing text
#window_id ⇒ Integer
the associate window id
Instance Method Details
#inspect ⇒ String
Returns inspection string.
417 418 419 420 421 422 423 424 |
# File 'ext/sdl2_ext/event.c', line 417
static VALUE EvTextEditing_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u"
" window_id=%u text=%s start=%d length=%d>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->edit.windowID, ev->edit.text, ev->edit.start, ev->edit.length);
}
|