ui/winui/container.h

branch
newapi
changeset 378
d41b1ffc5f77
parent 374
eae5d6623fd3
equal deleted inserted replaced
377:3a60db9ebb5d 378:d41b1ffc5f77
65 UiLayoutBool fill; 65 UiLayoutBool fill;
66 UiBool newline; 66 UiBool newline;
67 char* label; 67 char* label;
68 UiBool hexpand; 68 UiBool hexpand;
69 UiBool vexpand; 69 UiBool vexpand;
70 UiBool hfill;
71 UiBool vfill;
70 int width; 72 int width;
71 int height; 73 int height;
72 int colspan; 74 int colspan;
73 int rowspan; 75 int rowspan;
74 }; 76 };
120 int columnspacing; 122 int columnspacing;
121 int rowspacing; 123 int rowspacing;
122 124
123 virtual UiObject* AddTab(const char* label, int index = -1) = 0; 125 virtual UiObject* AddTab(const char* label, int index = -1) = 0;
124 virtual void Remove(int index) = 0; 126 virtual void Remove(int index) = 0;
125 127 virtual void Select(int index) = 0;
126 virtual FrameworkElement GetFrameworkElement() = 0; 128 virtual FrameworkElement GetFrameworkElement() = 0;
127 }; 129 };
128 130
129 struct UiTabViewContainer : UiContainer { 131 struct UiTabViewContainer : UiContainer {
130 UiTabView* tabview; 132 UiTabView* tabview;
139 141
140 UiPivotTabView(UiObject *obj, Pivot pivot, UiTabViewArgs args); 142 UiPivotTabView(UiObject *obj, Pivot pivot, UiTabViewArgs args);
141 143
142 UiObject* AddTab(const char* label, int index = -1); 144 UiObject* AddTab(const char* label, int index = -1);
143 void Remove(int index); 145 void Remove(int index);
146 void Select(int index);
144 FrameworkElement GetFrameworkElement(); 147 FrameworkElement GetFrameworkElement();
145 }; 148 };
146 149
147 struct UiMainTabView : UiTabView { 150 struct UiMainTabView : UiTabView {
148 TabView tabview; 151 TabView tabview;
149 152
150 UiMainTabView(UiObject* obj, TabView tabview, UiTabViewArgs args); 153 UiMainTabView(UiObject* obj, TabView tabview, UiTabViewArgs args);
151 154
152 UiObject* AddTab(const char* label, int index = -1); 155 UiObject* AddTab(const char* label, int index = -1);
153 void Remove(int index); 156 void Remove(int index);
157 void Select(int index);
154 FrameworkElement GetFrameworkElement(); 158 FrameworkElement GetFrameworkElement();
155 }; 159 };
156 160
157 struct UiNavigationTabView : UiTabView { 161 struct UiNavigationTabView : UiTabView {
158 NavigationView navigationview; 162 NavigationView navigationview;
161 165
162 UiNavigationTabView(UiObject* obj, NavigationView navigationview, UiTabViewArgs args, UiTabViewType type); 166 UiNavigationTabView(UiObject* obj, NavigationView navigationview, UiTabViewArgs args, UiTabViewType type);
163 167
164 UiObject* AddTab(const char* label, int index = -1); 168 UiObject* AddTab(const char* label, int index = -1);
165 void Remove(int index); 169 void Remove(int index);
170 void Select(int index);
166 FrameworkElement GetFrameworkElement(); 171 FrameworkElement GetFrameworkElement();
167 172
168 void SelectionChanged(NavigationView const& sender, NavigationViewSelectionChangedEventArgs const& args); 173 void SelectionChanged(NavigationView const& sender, NavigationViewSelectionChangedEventArgs const& args);
169 }; 174 };
175
176 struct UiInvisibleTabView : UiTabView {
177 Grid container;
178 std::vector<FrameworkElement> pages;
179 int currentIndex;
180
181 UiInvisibleTabView(UiObject *obj, Grid container, UiTabViewArgs args);
182
183 UiObject* AddTab(const char* label, int index = -1);
184 void Remove(int index);
185 void Select(int index);
186 FrameworkElement GetFrameworkElement();
187 };

mercurial