ui/winui/container.h

branch
newapi
changeset 374
eae5d6623fd3
parent 202
9f309d1914a2
equal deleted inserted replaced
373:2eede3d98aba 374:eae5d6623fd3
118 int margin; 118 int margin;
119 int spacing; 119 int spacing;
120 int columnspacing; 120 int columnspacing;
121 int rowspacing; 121 int rowspacing;
122 122
123 virtual UiObject* AddTab(const char* label) = 0; 123 virtual UiObject* AddTab(const char* label, int index = -1) = 0;
124 virtual void Remove(int index) = 0;
124 125
125 virtual FrameworkElement GetFrameworkElement() = 0; 126 virtual FrameworkElement GetFrameworkElement() = 0;
126 }; 127 };
127 128
128 struct UiTabViewContainer : UiContainer { 129 struct UiTabViewContainer : UiContainer {
136 struct UiPivotTabView : UiTabView { 137 struct UiPivotTabView : UiTabView {
137 Pivot pivot; 138 Pivot pivot;
138 139
139 UiPivotTabView(UiObject *obj, Pivot pivot, UiTabViewArgs args); 140 UiPivotTabView(UiObject *obj, Pivot pivot, UiTabViewArgs args);
140 141
141 UiObject* AddTab(const char* label); 142 UiObject* AddTab(const char* label, int index = -1);
143 void Remove(int index);
142 FrameworkElement GetFrameworkElement(); 144 FrameworkElement GetFrameworkElement();
143 }; 145 };
144 146
145 struct UiMainTabView : UiTabView { 147 struct UiMainTabView : UiTabView {
146 TabView tabview; 148 TabView tabview;
147 149
148 UiMainTabView(UiObject* obj, TabView tabview, UiTabViewArgs args); 150 UiMainTabView(UiObject* obj, TabView tabview, UiTabViewArgs args);
149 151
150 UiObject* AddTab(const char* label); 152 UiObject* AddTab(const char* label, int index = -1);
153 void Remove(int index);
151 FrameworkElement GetFrameworkElement(); 154 FrameworkElement GetFrameworkElement();
152 }; 155 };
153 156
154 struct UiNavigationTabView : UiTabView { 157 struct UiNavigationTabView : UiTabView {
155 NavigationView navigationview; 158 NavigationView navigationview;
156 UiTabViewType type; 159 UiTabViewType type;
157 std::vector<std::tuple<NavigationViewItem, FrameworkElement> > pages; 160 std::vector<std::tuple<NavigationViewItem, FrameworkElement> > pages;
158 161
159 UiNavigationTabView(UiObject* obj, NavigationView navigationview, UiTabViewArgs args, UiTabViewType type); 162 UiNavigationTabView(UiObject* obj, NavigationView navigationview, UiTabViewArgs args, UiTabViewType type);
160 163
161 UiObject* AddTab(const char* label); 164 UiObject* AddTab(const char* label, int index = -1);
165 void Remove(int index);
162 FrameworkElement GetFrameworkElement(); 166 FrameworkElement GetFrameworkElement();
163 167
164 void SelectionChanged(NavigationView const& sender, NavigationViewSelectionChangedEventArgs const& args); 168 void SelectionChanged(NavigationView const& sender, NavigationViewSelectionChangedEventArgs const& args);
165 }; 169 };

mercurial