| 260 | } |
| 261 | |
| 262 | void UniformGrid::SetupColumnDefinitions(uint32_t columns) |
| 263 | { |
| 264 | const auto definitions = ColumnDefinitions(); |
| 265 | |
| 266 | // Mark initial definitions so we don't erase them. |
| 267 | for (const auto &cd : definitions) |
| 268 | { |
| 269 | if (!GetAutoLayout(cd)) |
| 270 | { |
| 271 | SetAutoLayout(cd, false); |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | // Remove non-autolayout rows we've added and then add them in the right spots. |
| 276 | if (columns != definitions.Size()) |
| 277 | { |
| 278 | for (int32_t c = definitions.Size() - 1; c >= 0; c--) |
| 279 | { |
| 280 | const auto layout = GetAutoLayout(definitions.GetAt(c)); |
| 281 | if (layout && layout.Value()) |
| 282 | { |
| 283 | definitions.RemoveAt(c); |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | for (uint32_t c = definitions.Size(); c < columns; c++) |
| 288 | { |
| 289 | wux::Controls::ColumnDefinition cd; |
| 290 | SetAutoLayout(cd, true); |
| 291 | definitions.InsertAt(c, cd); |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | bool UniformGrid::GetSpot(int i, int j) |
| 297 | { |
nothing calls this directly
no outgoing calls
no test coverage detected