367 // menu |
367 // menu |
368 ui_menu("File") { |
368 ui_menu("File") { |
369 ui_menuitem(.label = "Test"); |
369 ui_menuitem(.label = "Test"); |
370 } |
370 } |
371 |
371 |
|
372 UiMenuBuilder *menubuilder; |
|
373 ui_contextmenu(&menubuilder) { |
|
374 ui_menuitem(.label = "Context Item 1"); |
|
375 ui_menuitem(.label = "Context Item 2"); |
|
376 ui_menu("Context Submenu") { |
|
377 ui_menuitem(.label = "Context Sub Item"); |
|
378 } |
|
379 } |
|
380 |
|
381 ui_menu("Edit") { |
|
382 ui_menuitem(.label = "Undo"); |
|
383 ui_menuseparator(); |
|
384 ui_menu("Submenu") { |
|
385 ui_menuitem(.label = "Subitem"); |
|
386 } |
|
387 } |
|
388 |
372 ui_toolbar_item("Test", .label = "Test", .onclick = action_toolbar_button); |
389 ui_toolbar_item("Test", .label = "Test", .onclick = action_toolbar_button); |
373 ui_toolbar_item("Test2", .label = "New Window", .onclick = action_toolbar_newwindow); |
390 ui_toolbar_item("Test2", .label = "New Window", .onclick = action_toolbar_newwindow); |
374 ui_toolbar_item("Test3", .label = "Dialog", .onclick = action_toolbar_dialog); |
391 ui_toolbar_item("Test3", .label = "Dialog", .onclick = action_toolbar_dialog); |
375 ui_toolbar_item("Test4", .label = "Unref Window", .onclick = action_toolbar_unrefwindow); |
392 ui_toolbar_item("Test4", .label = "Unref Window", .onclick = action_toolbar_unrefwindow); |
376 ui_toolbar_item("Test5", .label = "Test 5", .onclick = action_toolbar_button); |
393 ui_toolbar_item("Test5", .label = "Test 5", .onclick = action_toolbar_button); |