Class: Wx::CursorBundle
- Inherits:
-
Object
- Object
- Wx::CursorBundle
- Defined in:
- lib/wx/doc/gen/cursor.rb
Overview
This class is untracked and should not be derived from nor instances extended!
A cursor bundle is a set of different versions of the same cursor at different sizes.
This class relationship with Cursor is similar to that of BitmapBundle with Bitmap, but it has a simpler interface because cursors are never scaled and always use the closest available size. It is typically used like the following:
MyFrame::MyFrame()
{
SetCursorBundle(wxCursorBundle(wxBitmapBundle::FromResources("mycursor"),
wxPoint(1, 1)));
}
Please see BitmapBundle documentation for more information about different ways of creating it.
Category: Graphics Device Interface (GDI)
Instance Method Summary collapse
-
#clear ⇒ void
Clear the bundle contents.
-
#get_cursor_for(window) ⇒ Wx::Cursor
(also: #cursor_for)
Get the cursor of the size suitable for the given window.
-
#get_cursor_for_main_window ⇒ Wx::Cursor
(also: #cursor_for_main_window)
Get the cursor of the default size.
-
#initialize(*args) ⇒ CursorBundle
constructor
A new instance of CursorBundle.
-
#is_ok ⇒ Boolean
(also: #ok?)
Check if cursor bundle is non-empty.
-
#is_same_as(other) ⇒ Boolean
(also: #same_as?)
Check if two objects refer to the same bundle.
Constructor Details
#initialize ⇒ Wx::CursorBundle #initialize(bitmaps, hotSpot) ⇒ Wx::CursorBundle #initialize(bitmaps, hotSpotX = 0, hotSpotY = 0) ⇒ Wx::CursorBundle #initialize(other) ⇒ Wx::CursorBundle
Returns a new instance of CursorBundle.
155 |
# File 'lib/wx/doc/gen/cursor.rb', line 155 def initialize(*args) end |
Instance Method Details
#clear ⇒ void
This method returns an undefined value.
Clear the bundle contents.
#is_ok will return false after doing this. Use the assignment operator to set the bundle contents later.
167 |
# File 'lib/wx/doc/gen/cursor.rb', line 167 def clear; end |
#get_cursor_for(window) ⇒ Wx::Cursor Also known as: cursor_for
Get the cursor of the size suitable for the given window.
172 |
# File 'lib/wx/doc/gen/cursor.rb', line 172 def get_cursor_for(window) end |
#get_cursor_for_main_window ⇒ Wx::Cursor Also known as: cursor_for_main_window
Get the cursor of the default size.
Prefer to use #get_cursor_for instead if there is a suitable window available, this function only exists as last resort.
179 |
# File 'lib/wx/doc/gen/cursor.rb', line 179 def get_cursor_for_main_window; end |
#is_ok ⇒ Boolean Also known as: ok?
Check if cursor bundle is non-empty.
159 |
# File 'lib/wx/doc/gen/cursor.rb', line 159 def is_ok; end |
#is_same_as(other) ⇒ Boolean Also known as: same_as?
Check if two objects refer to the same bundle.
Note that this compares the object identity, i.e. this function returns true only for copies of the same bundle, but false for two bundles created from the same bitmap bundle and same hotspot coordinates.
187 |
# File 'lib/wx/doc/gen/cursor.rb', line 187 def is_same_as(other) end |