ui/winui/container.cpp

changeset 478
6292f93c2213
parent 476
31213068c2ba
equal deleted inserted replaced
477:be34594ee942 478:6292f93c2213
49 } 49 }
50 return 1; 50 return 1;
51 } 51 }
52 52
53 53
54 UIEXPORT UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) {
55 UiObject* current = uic_current_obj(obj);
56
57 UIWIDGET widget = create_widget(obj, args, userdata);
58 FrameworkElement w = widget->uielement.as<FrameworkElement>();
59
60 UI_APPLY_LAYOUT1(current, args);
61
62 current->container->Add(w, false);
63
64 return widget;
65 }
66
54 // --------------------- UiBoxContainer --------------------- 67 // --------------------- UiBoxContainer ---------------------
55 68
56 static UIWIDGET ui_box(UiObject* obj, UiContainerArgs args, UiBoxContainerType type) { 69 static UIWIDGET ui_box(UiObject* obj, UiContainerArgs args, UiBoxContainerType type) {
57 UiObject* current = uic_current_obj(obj); 70 UiObject* current = uic_current_obj(obj);
58 UI_APPLY_LAYOUT1(current, args); 71 UI_APPLY_LAYOUT1(current, args);
871 boxargs.fill = UI_OFF; 884 boxargs.fill = UI_OFF;
872 ui_hbox_create(obj, boxargs); 885 ui_hbox_create(obj, boxargs);
873 } 886 }
874 887
875 888
889
876 /* 890 /*
877 * -------------------- Layout Functions -------------------- 891 * -------------------- Layout Functions --------------------
878 * 892 *
879 * functions for setting layout attributes for the current container 893 * functions for setting layout attributes for the current container
880 * 894 *

mercurial