Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ui_api.c
| Show First 20 Lines • Show All 543 Lines • ▼ Show 20 Lines | void RNA_api_ui_layout(StructRNA *srna) | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| RNA_def_boolean(func, "expand", false, "", "Expand button to show more detail"); | RNA_def_boolean(func, "expand", false, "", "Expand button to show more detail"); | ||||
| RNA_def_boolean(func, "slider", false, "", "Use slider widget for numeric values"); | RNA_def_boolean(func, "slider", false, "", "Use slider widget for numeric values"); | ||||
| RNA_def_boolean(func, "toggle", false, "", "Use toggle widget for boolean values"); | RNA_def_boolean(func, "toggle", false, "", "Use toggle widget for boolean values"); | ||||
| RNA_def_boolean(func, "icon_only", false, "", "Draw only icons in buttons, no text"); | RNA_def_boolean(func, "icon_only", false, "", "Draw only icons in buttons, no text"); | ||||
| RNA_def_boolean(func, "event", false, "", "Use button to input key events"); | RNA_def_boolean(func, "event", false, "", "Use button to input key events"); | ||||
| RNA_def_boolean(func, "full_event", false, "", "Use button to input full events including modifiers"); | RNA_def_boolean(func, "full_event", false, "", "Use button to input full events including modifiers"); | ||||
| RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, just the icon/text"); | RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, not just the icon/text"); | ||||
| RNA_def_int(func, "index", -1, -2, INT_MAX, "", | RNA_def_int(func, "index", -1, -2, INT_MAX, "", | ||||
| "The index of this button, when set a single member of an array can be accessed, " | "The index of this button, when set a single member of an array can be accessed, " | ||||
| "when set to -1 all array members are used", -2, INT_MAX); /* RNA_NO_INDEX == -1 */ | "when set to -1 all array members are used", -2, INT_MAX); /* RNA_NO_INDEX == -1 */ | ||||
| parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | ||||
| func = RNA_def_function(srna, "props_enum", "uiItemsEnumR"); | func = RNA_def_function(srna, "props_enum", "uiItemsEnumR"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| Show All 16 Lines | void RNA_api_ui_layout(StructRNA *srna) | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| for (int is_menu_hold = 0; is_menu_hold < 2; is_menu_hold++) { | for (int is_menu_hold = 0; is_menu_hold < 2; is_menu_hold++) { | ||||
| func = (is_menu_hold) ? | func = (is_menu_hold) ? | ||||
| RNA_def_function(srna, "operator_menu_hold", "rna_uiItemOMenuHold") : | RNA_def_function(srna, "operator_menu_hold", "rna_uiItemOMenuHold") : | ||||
| RNA_def_function(srna, "operator", "rna_uiItemO"); | RNA_def_function(srna, "operator", "rna_uiItemO"); | ||||
| api_ui_item_op_common(func); | api_ui_item_op_common(func); | ||||
| RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, just the icon/text"); | RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, not just the icon/text"); | ||||
| RNA_def_boolean(func, "depress", false, "", "Draw pressed in"); | RNA_def_boolean(func, "depress", false, "", "Draw pressed in"); | ||||
| parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | ||||
| if (is_menu_hold) { | if (is_menu_hold) { | ||||
| parm = RNA_def_string(func, "menu", NULL, 0, "", "Identifier of the menu"); | parm = RNA_def_string(func, "menu", NULL, 0, "", "Identifier of the menu"); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| parm = RNA_def_pointer(func, "properties", "OperatorProperties", "", "Operator properties to fill in"); | parm = RNA_def_pointer(func, "properties", "OperatorProperties", "", "Operator properties to fill in"); | ||||
| ▲ Show 20 Lines • Show All 366 Lines • Show Last 20 Lines | |||||