ui/winui/container.h

branch
newapi
changeset 378
d41b1ffc5f77
parent 374
eae5d6623fd3
--- a/ui/winui/container.h	Sun Nov 10 10:16:47 2024 +0100
+++ b/ui/winui/container.h	Sun Nov 10 15:27:44 2024 +0100
@@ -67,6 +67,8 @@
     char* label;
     UiBool       hexpand;
     UiBool       vexpand;
+    UiBool       hfill;
+    UiBool       vfill;
     int          width;
     int          height;
     int          colspan;
@@ -122,7 +124,7 @@
 
     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;
 };
 
@@ -141,6 +143,7 @@
 
     UiObject* AddTab(const char* label, int index = -1);
     void Remove(int index);
+    void Select(int index);
     FrameworkElement GetFrameworkElement();
 };
 
@@ -151,6 +154,7 @@
 
     UiObject* AddTab(const char* label, int index = -1);
     void Remove(int index);
+    void Select(int index);
     FrameworkElement GetFrameworkElement();
 };
 
@@ -163,7 +167,21 @@
 
     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