ui/winui/button.cpp

branch
newapi
changeset 373
2eede3d98aba
parent 230
4f5b32a2a60f
child 374
eae5d6623fd3
equal deleted inserted replaced
372:4657ec1229f2 373:2eede3d98aba
285 // store a list of radio buttons in the value 285 // store a list of radio buttons in the value
286 CxList* radioButtons = (CxList*) (value->obj ? value->obj : cxLinkedListCreate(current->ctx->allocator, NULL, CX_STORE_POINTERS)); 286 CxList* radioButtons = (CxList*) (value->obj ? value->obj : cxLinkedListCreate(current->ctx->allocator, NULL, CX_STORE_POINTERS));
287 // get or create the group name 287 // get or create the group name
288 static int groupCount = 0; 288 static int groupCount = 0;
289 winrt::hstring groupName; 289 winrt::hstring groupName;
290 if (radioButtons->size == 0) { 290 if (cxListSize(radioButtons) == 0) {
291 groupName = winrt::to_hstring(groupCount++); 291 groupName = winrt::to_hstring(groupCount++);
292 } else { 292 } else {
293 UiWidget* firstButtonWidget = (UiWidget*)cxListAt(radioButtons, 0); 293 UiWidget* firstButtonWidget = (UiWidget*)cxListAt(radioButtons, 0);
294 RadioButton firstRadioButton = firstButtonWidget->uielement.as<RadioButton>(); 294 RadioButton firstRadioButton = firstButtonWidget->uielement.as<RadioButton>();
295 groupName = firstRadioButton.GroupName(); 295 groupName = firstRadioButton.GroupName();

mercurial