private void AddHUDItem(ICollection <IHUDItem> container, System.Windows.Rect rect)
        {
            var item = new WidgetInfo(rect);

            item.Location = rect.Location;
            item.Bounds   = rect;

            container.Add(item);
        }
        public void Enumerate(ICollection <IHUDItem> container)
        {
            var desktopBounds = HitaHint.UIAssistantAPI.Screen.Bounds;
            var results       = new List <IHUDItem>();

            HitaHint.UIAssistantAPI.WindowAPI.EnumerateWindows((window) =>
            {
                if (window.IsAltTabWindow())
                {
                    return(true);
                }

                var rect        = window.Bounds.ToClientCoordinate();
                WidgetInfo item = new WidgetInfo(": " + window.Title, rect);
                item.Window     = window;
                HitaHint.UIAssistantAPI.ViewAPI.UIDispatcher.Invoke(() => AdjustLocation(results, item, desktopBounds));
                results.Add(item);
                return(true);
            });
            // 重なり解消のため必要
            results.OrderBy(item => item.Bounds.X).ToList().ForEach(x => container.Add(x));
        }