public void UpdatePagesPopupButton(FigmaDocument document, int pageIndex)
        {
            PagePopUpButton.RemoveAllItems();

            foreach (var item in document.children.ToArray())
            {
                PagePopUpButton.AddItem(item.name);

                PagePopUpButton.Activated += delegate {
                    PageChanged?.Invoke(this, (int)PagePopUpButton.IndexOfSelectedItem);
                };
            }

            if (pageIndex + 1 > document.children.Length)
            {
                PagePopUpButton.SelectItem(0);
            }
            else
            {
                PagePopUpButton.SelectItem(pageIndex);
            }
        }
 internal void GenerateTree(FigmaDocument document, IFigmaDesignerDelegate figmaDelegate)
 {
     data = new FigmaNodeView(document);
     figmaDelegate.ConvertToNodes(document, data);
     outlinePanel.GenerateTree(data);
 }