Example #1
0
 Util.ArrayBuilder_ <AWnd> _AllChildren(AWnd wParent)
 {
     wParent.ThrowIfInvalid();
     return(Internal_.EnumWindows2(Internal_.EnumAPI.EnumChildWindows,
                                   onlyVisible: 0 == (_flags & WCFlags.HiddenToo),
                                   sortFirstVisible: true,
                                   wParent: wParent,
                                   directChild: 0 != (_flags & WCFlags.DirectChild)));
 }
Example #2
0
 /// <summary>
 /// Gets top-level windows.
 /// </summary>
 /// <param name="a">Receives window handles as <b>wnd</b>. If null, this function creates new List, else clears before adding items.</param>
 /// <param name="onlyVisible"></param>
 /// <param name="sortFirstVisible"></param>
 /// <remarks>
 /// Use this overload to avoid much garbage when calling frequently with the same List variable. Other overload always allocates new array. This overload in most cases reuses memory allocated for the list variable.
 /// </remarks>
 public static void allWindows(ref List <wnd> a, bool onlyVisible = false, bool sortFirstVisible = false)
 {
     Internal_.EnumWindows2(Internal_.EnumAPI.EnumWindows, onlyVisible, sortFirstVisible, list: a ??= new List <wnd>());
 }
Example #3
0
 /// <summary>
 /// Gets child controls, including all descendants.
 /// </summary>
 /// <param name="a">Receives window handles as AWnd. If null, this function creates new List, else clears before adding items.</param>
 /// <param name="onlyVisible">Need only visible controls.</param>
 /// <param name="sortFirstVisible">Place all array elements of hidden controls at the end of the array.</param>
 /// <param name="directChild">Need only direct children, not all descendants.</param>
 /// <exception cref="AuWndException">This variable is invalid (window not found, closed, etc).</exception>
 /// <remarks>
 /// Use this overload to avoid much garbage when calling frequently with the same List variable. Other overload always allocates new array. This overload in most cases reuses memory allocated for the list variable.
 /// </remarks>
 public void Children(ref List <AWnd> a, bool onlyVisible = false, bool sortFirstVisible = false, bool directChild = false)
 {
     _w.ThrowIfInvalid();
     Internal_.EnumWindows2(Internal_.EnumAPI.EnumChildWindows, onlyVisible, sortFirstVisible, _w, directChild, list: a ??= new List <AWnd>());
 }