Class: Wx::SashEvent
- Inherits:
-
CommandEvent
- Object
- Object
- Event
- CommandEvent
- Wx::SashEvent
- Defined in:
- lib/wx/doc/gen/sash_event.rb
Overview
A sash event is sent when the sash of a SashWindow has been dragged by the user.
When a sash belonging to a sash window is dragged by the user, and then released, this event is sent to the window, where it may be processed by an event table entry in a derived class, a plug-in event handler or an ancestor class. Note that the SashWindow doesn't change the window's size itself. It relies on the application's event handler to do that. This is because the application may have to handle other consequences of the resize, or it may wish to veto it altogether. The event handler should look at the drag rectangle: see #get_drag_rect to see what the new size of the window would be if the resize were to be applied. It should also call #get_drag_status to see whether the drag was OK or out of the current allowed range.
Events using this class
The following event-handler methods redirect the events to member method or handler blocks for SashEvent events. Event handler methods:
-
EvtHandler#evt_sash_dragged(id, meth = nil, &block): Process a EVT_SASH_DRAGGED event, when the user has finished dragging a sash.
-
EvtHandler#evt_sash_dragged_range(id1, id2, meth = nil, &block): Process a EVT_SASH_DRAGGED_RANGE event, when the user has finished dragging a sash. The event handler is called when windows with ids in the given range have their sashes dragged.
Category: Events
Instance Method Summary collapse
-
#get_drag_rect ⇒ Wx::Rect
(also: #drag_rect)
Returns the rectangle representing the new size the window would be if the resize was applied.
-
#get_drag_status ⇒ Wx::SashDragStatus
(also: #drag_status)
Returns the status of the sash: one of Wx::SashDragStatus::SASH_STATUS_OK, Wx::SashDragStatus::SASH_STATUS_OUT_OF_RANGE.
-
#get_edge ⇒ Wx::SashEdgePosition
(also: #edge)
Returns the dragged edge.
-
#initialize(id = 0, edge = Wx::SashEdgePosition::SASH_NONE) ⇒ Wx::SashEvent
constructor
Constructor.
- #set_drag_rect(rect) ⇒ void (also: #drag_rect=)
- #set_drag_status(status) ⇒ void (also: #drag_status=)
- #set_edge(edge) ⇒ void (also: #edge=)
Methods inherited from CommandEvent
#client_data, #client_data=, #get_client_data, #get_client_object, #get_int, #get_selection, #get_string, #is_checked, #is_selection, #set_client_data, #set_client_object, #set_extra_long, #set_int, #set_string
Methods inherited from Event
#clone, #get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(id = 0, edge = Wx::SashEdgePosition::SASH_NONE) ⇒ Wx::SashEvent
Constructor.
106 |
# File 'lib/wx/doc/gen/sash_event.rb', line 106 def initialize(id=0, edge=Wx::SashEdgePosition::SASH_NONE) end |
Instance Method Details
#get_drag_rect ⇒ Wx::Rect Also known as: drag_rect
Returns the rectangle representing the new size the window would be if the resize was applied.
It is up to the application to set the window size if required.
112 |
# File 'lib/wx/doc/gen/sash_event.rb', line 112 def get_drag_rect; end |
#get_drag_status ⇒ Wx::SashDragStatus Also known as: drag_status
Returns the status of the sash: one of Wx::SashDragStatus::SASH_STATUS_OK, Wx::SashDragStatus::SASH_STATUS_OUT_OF_RANGE.
If the drag caused the notional bounding box of the window to flip over, for example, the drag will be out of rage.
119 |
# File 'lib/wx/doc/gen/sash_event.rb', line 119 def get_drag_status; end |
#get_edge ⇒ Wx::SashEdgePosition Also known as: edge
Returns the dragged edge.
The return value is one of Wx::SashEdgePosition::SASH_TOP, Wx::SashEdgePosition::SASH_RIGHT, Wx::SashEdgePosition::SASH_BOTTOM, Wx::SashEdgePosition::SASH_LEFT.
126 |
# File 'lib/wx/doc/gen/sash_event.rb', line 126 def get_edge; end |
#set_drag_rect(rect) ⇒ void Also known as: drag_rect=
This method returns an undefined value.
136 |
# File 'lib/wx/doc/gen/sash_event.rb', line 136 def set_drag_rect(rect) end |
#set_drag_status(status) ⇒ void Also known as: drag_status=
This method returns an undefined value.
141 |
# File 'lib/wx/doc/gen/sash_event.rb', line 141 def set_drag_status(status) end |
#set_edge(edge) ⇒ void Also known as: edge=
This method returns an undefined value.
131 |
# File 'lib/wx/doc/gen/sash_event.rb', line 131 def set_edge(edge) end |