Class: GlimR::TextCursor
- Inherits:
-
StretchableImage
- Object
- SceneObject
- Model
- Widget
- Image
- StretchableImage
- GlimR::TextCursor
- Defined in:
- lib/glimr/widgets/text_editor.rb
Constant Summary
Constants included from Layoutable
Instance Attribute Summary
Attributes inherited from Image
Attributes inherited from Widget
Attributes included from Layoutable
Attributes inherited from Model
#geometry, #material, #shader, #texture, #transform
Attributes inherited from SceneObject
#children, #drawables, #mtime, #parent, #viewport
Attributes included from EventListener
#event_listeners, #listener_count
Instance Method Summary collapse
- #default_config ⇒ Object
-
#initialize(*a, &b) ⇒ TextCursor
constructor
A new instance of TextCursor.
- #use_insert ⇒ Object
- #use_normal ⇒ Object
Methods inherited from StretchableImage
#create_normals, #create_texcoords, #create_vertices, #height=, #set_dimensions, #update_geometry, #width=
Methods inherited from Image
#create_colors, #create_normals, #create_texcoords, #create_vertices, #load, load, load_theme, #load_theme, #texture=, #update_geometry
Methods inherited from Widget
#activate, #blur, #click, #focus, for, #key_down, #key_up, #lock, #mouse_down, #mouse_move, #mouse_out, #mouse_over, #mouse_up, #unlock
Methods included from Layoutable
#attach, #children_change, #constant_size?, #detach, #expand!, #expand?, #expand_height, #expand_to_max_height!, #expand_to_max_width!, #expand_width, #fit_height!, #fit_to_children!, #fit_width!, #free_height, #free_width, #full_depth, #full_height, #full_width, #inner_depth, #inner_height, #inner_width, #inspect, #layout, #layoutable_children, #margin, #margin=, #max_height=, #max_width=, #min_height=, #min_width=, #padding, #padding=, #parent=, #size_changing, size_changing_accessor, #tell_children_of_size_change, #x=, #y=
Methods inherited from Model
#absolute_transform, #apply, #inspect, #pop_state, #push_state
Methods inherited from SceneObject
#<<, #absolute_geometry, #absolute_material, #absolute_shader, #absolute_texture, #absolute_transform, #absolute_transform_for_drawing, #add_drawables, #apply, #attach, #clone, #detach, #detach_self, #inspect, #pop_state, #push_state, #remove_drawables, #render, #replace_node, #root, #touch!, #visible
Methods included from EventListener
#add_event_listener, #decrement_listener_count, #dispatch_event, #event_root, #increment_listener_count, #method_missing, #multicast_event, #process_event, #remove_event_listener
Constructor Details
#initialize(*a, &b) ⇒ TextCursor
Returns a new instance of TextCursor.
15 16 17 18 19 20 |
# File 'lib/glimr/widgets/text_editor.rb', line 15 def initialize(*a,&b) super load_theme(@normal) @normal_texture = @texture @insert_texture = Texture.load(GlimR.theme + @insert) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class GlimR::EventListener
Instance Method Details
#default_config ⇒ Object
8 9 10 11 12 13 |
# File 'lib/glimr/widgets/text_editor.rb', line 8 def default_config super.merge( :normal => "text_cursor.png", :insert => "text_cursor_insert.png" ) end |
#use_insert ⇒ Object
27 28 29 30 |
# File 'lib/glimr/widgets/text_editor.rb', line 27 def use_insert @texture = @insert_texture touch! end |
#use_normal ⇒ Object
22 23 24 25 |
# File 'lib/glimr/widgets/text_editor.rb', line 22 def use_normal @texture = @normal_texture touch! end |