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); |