commit 53f3a296446aed753d58c3da8a3093addde91884
parent 5d1a9b8f2e72665f524fdff7011bafaa1ee9ecf5
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Mon, 2 Jan 2023 12:00:23 +0100
Needs a struct actually so one can show the title as disabled
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/clap/ext/draft/context-menu.h b/include/clap/ext/draft/context-menu.h
@@ -46,7 +46,7 @@ enum {
CLAP_CONTEXT_MENU_ITEM_END_SUBMENU,
// Adds a title entry
- // data: const char *title
+ // data: const clap_context_menu_title_entry_t *
CLAP_CONTEXT_MENU_ITEM_TITLE,
};
typedef uint32_t clap_context_menu_item_kind_t;
@@ -72,6 +72,14 @@ typedef struct clap_context_menu_check_entry {
clap_id action_id;
} clap_context_menu_check_entry_t;
+typedef struct clap_context_menu_title_entry {
+ // text to be displayed
+ const char *title;
+
+ // if false, then the menu entry is greyed out
+ bool is_enabled;
+} clap_context_menu_title_entry_t;
+
typedef struct clap_context_menu_submenu {
// text to be displayed
const char *label;