Class: Wx::SF::ShapeMouseEvent
- Inherits:
 - 
      Event
      
        
- Object
 - Event
 - Wx::SF::ShapeMouseEvent
 
 
- Defined in:
 - lib/wx/shapes/events.rb
 
Overview
Class encapsulates Wx::SF shape’s mouse event.
Instance Method Summary collapse
- 
  
    
      #get_mouse_position  ⇒ Wx::Point 
    
    
      (also: #mouse_position)
    
  
  
  
  
  
  
  
  
  
    
Get absolute position of mouse cursor.
 - 
  
    
      #get_shape  ⇒ Wx::SF::Shape? 
    
    
      (also: #shape)
    
  
  
  
  
  
  
  
  
  
    
Get a shape object from the event object.
 - 
  
    
      #initialize(evt_type = Wx::EVT_NULL, id = 0)  ⇒ ShapeMouseEvent 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Constructor.
 - 
  
    
      #set_mouse_position(mouse_position)  ⇒ Object 
    
    
      (also: #mouse_position=)
    
  
  
  
  
  
  
  
  
  
    
Set absolute position of mouse cursor.
 - 
  
    
      #set_shape(shape)  ⇒ Object 
    
    
      (also: #shape=)
    
  
  
  
  
  
  
  
  
  
    
Insert a shape object to the event object.
 
Constructor Details
#initialize(evt_type = Wx::EVT_NULL, id = 0) ⇒ ShapeMouseEvent
Constructor
      89 90 91 92 93  | 
    
      # File 'lib/wx/shapes/events.rb', line 89 def initialize(evt_type = Wx::EVT_NULL, id = 0) super(evt_type, id.to_i) @shape = nil @mouse_pos = Wx::DEFAULT_POSITION end  | 
  
Instance Method Details
#get_mouse_position ⇒ Wx::Point Also known as: mouse_position
Get absolute position of mouse cursor
      118 119 120  | 
    
      # File 'lib/wx/shapes/events.rb', line 118 def get_mouse_position @mouse_position end  | 
  
#get_shape ⇒ Wx::SF::Shape? Also known as: shape
Get a shape object from the event object.
      104 105 106  | 
    
      # File 'lib/wx/shapes/events.rb', line 104 def get_shape @shape end  | 
  
#set_mouse_position(mouse_position) ⇒ Object Also known as: mouse_position=
Set absolute position of mouse cursor.
      111 112 113  | 
    
      # File 'lib/wx/shapes/events.rb', line 111 def set_mouse_position(mouse_position) @mouse_position = mouse_position.to_point end  | 
  
#set_shape(shape) ⇒ Object Also known as: shape=
Insert a shape object to the event object.
      97 98 99  | 
    
      # File 'lib/wx/shapes/events.rb', line 97 def set_shape(shape) @shape = shape end  |