| 93 |
93 |
| 94 // main content |
94 // main content |
| 95 UiModel* model = ui_model(obj->ctx, UI_ICON_TEXT, "Name", UI_STRING_FREE, "Flags", UI_STRING, "Type", UI_STRING_FREE, "Last Modified", UI_STRING_FREE, "Size", -1); |
95 UiModel* model = ui_model(obj->ctx, UI_ICON_TEXT, "Name", UI_STRING_FREE, "Flags", UI_STRING, "Type", UI_STRING_FREE, "Last Modified", UI_STRING_FREE, "Size", -1); |
| 96 model->columnsize[0] = -1; |
96 model->columnsize[0] = -1; |
| 97 model->columnsize[2] = 150; |
97 model->columnsize[2] = 150; |
| 98 model->getvalue = (ui_getvaluefunc) window_resource_table_getvalue; |
|
| 99 ui_table(obj, |
98 ui_table(obj, |
| 100 .fill = TRUE, |
99 .fill = TRUE, |
| 101 .model = model, |
100 .model = model, |
| |
101 .getvalue = (ui_getvaluefunc) window_resource_table_getvalue, |
| 102 .onselection = action_list_selection, |
102 .onselection = action_list_selection, |
| 103 .onactivate = action_list_activate, |
103 .onactivate = action_list_activate, |
| 104 .ondragstart = action_dnd_start, |
104 .ondragstart = action_dnd_start, |
| 105 .ondragcomplete = action_dnd_end, |
105 .ondragcomplete = action_dnd_end, |
| 106 .ondrop = action_dnd_drop, |
106 .ondrop = action_dnd_drop, |
| 253 } |
253 } |
| 254 } |
254 } |
| 255 |
255 |
| 256 ui_tab(win, "Properties") { |
256 ui_tab(win, "Properties") { |
| 257 UiModel* model = ui_model(win->ctx, UI_STRING, "Namespace", UI_STRING, "Name", UI_STRING, "Value", -1); |
257 UiModel* model = ui_model(win->ctx, UI_STRING, "Namespace", UI_STRING, "Name", UI_STRING, "Value", -1); |
| 258 model->getvalue = (ui_getvaluefunc) resourceviewer_proplist_getvalue; |
258 ui_table(win, |
| 259 ui_table(win, .fill = TRUE, .model = model, .varname = "properties", .onselection = action_resourceviewer_property_select, .onactivate = action_resourceviewer_property_activate); |
259 .fill = TRUE, |
| |
260 .model = model, |
| |
261 .getvalue = (ui_getvaluefunc) resourceviewer_proplist_getvalue, |
| |
262 .varname = "properties", |
| |
263 .onselection = action_resourceviewer_property_select, |
| |
264 .onactivate = action_resourceviewer_property_activate); |
| 260 ui_hbox(win, .margin = 4, .spacing = 4) { |
265 ui_hbox(win, .margin = 4, .spacing = 4) { |
| 261 ui_button(win, .label = "Add", .onclick = action_resourceviewer_property_add); |
266 ui_button(win, .label = "Add", .onclick = action_resourceviewer_property_add); |
| 262 ui_button(win, .label = "Edit", .onclick = action_resourceviewer_property_edit, .groups = UI_GROUPS(RESOURCEVIEWER_STATE_PROP_SELECTED)); |
267 ui_button(win, .label = "Edit", .onclick = action_resourceviewer_property_edit, .groups = UI_GROUPS(RESOURCEVIEWER_STATE_PROP_SELECTED)); |
| 263 ui_button(win, .label = "Remove", .onclick = action_resourceviewer_property_remove, .groups = UI_GROUPS(RESOURCEVIEWER_STATE_PROP_SELECTED)); |
268 ui_button(win, .label = "Remove", .onclick = action_resourceviewer_property_remove, .groups = UI_GROUPS(RESOURCEVIEWER_STATE_PROP_SELECTED)); |
| 264 } |
269 } |