Class: Fzeet::PopupMenu
- Inherits:
-
Handle
- Object
- Handle
- Fzeet::PopupMenu
- Includes:
- Windows::MenuMethods
- Defined in:
- lib/fzeet/windows/user/Menu.rb
Instance Attribute Summary collapse
-
#submenus ⇒ Object
readonly
Returns the value of attribute submenus.
Instance Method Summary collapse
- #dispose ⇒ Object
-
#initialize ⇒ PopupMenu
constructor
A new instance of PopupMenu.
- #track(window, x, y, flags = 0) ⇒ Object
Methods included from Windows::MenuMethods
#[], #append, #images=, #rdetach
Constructor Details
#initialize ⇒ PopupMenu
Returns a new instance of PopupMenu.
233 234 235 236 237 |
# File 'lib/fzeet/windows/user/Menu.rb', line 233 def initialize = [] @handle = Windows.DetonateLastError(FFI::Pointer::NULL, :CreatePopupMenu); attach end |
Instance Attribute Details
#submenus ⇒ Object (readonly)
Returns the value of attribute submenus.
239 240 241 |
# File 'lib/fzeet/windows/user/Menu.rb', line 239 def end |
Instance Method Details
#dispose ⇒ Object
241 |
# File 'lib/fzeet/windows/user/Menu.rb', line 241 def dispose; Windows.DestroyMenu(@handle); rdetach end |
#track(window, x, y, flags = 0) ⇒ Object
243 |
# File 'lib/fzeet/windows/user/Menu.rb', line 243 def track(window, x, y, flags = 0) Windows.TrackPopupMenu(@handle, Fzeet.flags(flags, :tpm_), x, y, 0, window.handle, nil); self end |