ui/winui/container.h

changeset 76
641dcc79e0ef
parent 0
2483f517c562
--- a/ui/winui/container.h	Sun Nov 10 09:12:30 2024 +0100
+++ b/ui/winui/container.h	Sun Nov 10 15:30:46 2024 +0100
@@ -67,6 +67,8 @@
     char* label;
     UiBool       hexpand;
     UiBool       vexpand;
+    UiBool       hfill;
+    UiBool       vfill;
     int          width;
     int          height;
     int          colspan;
@@ -120,8 +122,9 @@
     int columnspacing;
     int rowspacing;
 
-    virtual UiObject* AddTab(const char* label) = 0;
-
+    virtual UiObject* AddTab(const char* label, int index = -1) = 0;
+    virtual void Remove(int index) = 0;
+    virtual void Select(int index) = 0;
     virtual FrameworkElement GetFrameworkElement() = 0;
 };
 
@@ -138,7 +141,9 @@
 
     UiPivotTabView(UiObject *obj, Pivot pivot, UiTabViewArgs args);
 
-    UiObject* AddTab(const char* label);
+    UiObject* AddTab(const char* label, int index = -1);
+    void Remove(int index);
+    void Select(int index);
     FrameworkElement GetFrameworkElement();
 };
 
@@ -147,7 +152,9 @@
 
     UiMainTabView(UiObject* obj, TabView tabview, UiTabViewArgs args);
 
-    UiObject* AddTab(const char* label);
+    UiObject* AddTab(const char* label, int index = -1);
+    void Remove(int index);
+    void Select(int index);
     FrameworkElement GetFrameworkElement();
 };
 
@@ -158,8 +165,23 @@
 
     UiNavigationTabView(UiObject* obj, NavigationView navigationview, UiTabViewArgs args, UiTabViewType type);
 
-    UiObject* AddTab(const char* label);
+    UiObject* AddTab(const char* label, int index = -1);
+    void Remove(int index);
+    void Select(int index);
     FrameworkElement GetFrameworkElement();
 
     void SelectionChanged(NavigationView const& sender, NavigationViewSelectionChangedEventArgs const& args);
 };
+
+struct UiInvisibleTabView : UiTabView {
+    Grid container;
+    std::vector<FrameworkElement> pages;
+    int currentIndex;
+
+    UiInvisibleTabView(UiObject *obj, Grid container, UiTabViewArgs args);
+
+    UiObject* AddTab(const char* label, int index = -1);
+    void Remove(int index);
+    void Select(int index);
+    FrameworkElement GetFrameworkElement();
+};
\ No newline at end of file

mercurial