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.
64 65 66 |
# File 'lib/win32/autogui/window.rb', line 64 def initialize(parent) @parent = parent end |
Instance Method Details
#each {|Window| ... } ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/win32/autogui/window.rb', line 70 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) && (window.parent.handle == @parent.handle) end end |