Class: Autogui::Children
- Inherits:
-
Object
- Object
- Autogui::Children
- Includes:
- Enumerable, Windows::Window
- Defined in:
- lib/win32/autogui/window.rb
Overview
Enumerate just the child windows one level down from the parent window
Constant Summary
Constants included from Windows::Window
Instance Method Summary collapse
- #each {|Window| ... } ⇒ Object
-
#initialize(parent) ⇒ Children
constructor
A new instance of Children.
Constructor Details
#initialize(parent) ⇒ Children
Returns a new instance of Children.
32 33 34 |
# File 'lib/win32/autogui/window.rb', line 32 def initialize(parent) @parent = parent end |
Instance Method Details
#each {|Window| ... } ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/win32/autogui/window.rb', line 38 def each child_after = 0 while (child_after = FindWindowEx(@parent.handle, child_after, nil, nil)) > 0 do window = Window.new child_after # immediate children only yield window if (window.parent.handle == @parent.handle) end end |