Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ui.c
| Show First 20 Lines • Show All 875 Lines • ▼ Show 20 Lines | static bool rna_UILayout_active_get(PointerRNA *ptr) | ||||
| return uiLayoutGetActive(ptr->data); | return uiLayoutGetActive(ptr->data); | ||||
| } | } | ||||
| static void rna_UILayout_active_set(PointerRNA *ptr, bool value) | static void rna_UILayout_active_set(PointerRNA *ptr, bool value) | ||||
| { | { | ||||
| uiLayoutSetActive(ptr->data, value); | uiLayoutSetActive(ptr->data, value); | ||||
| } | } | ||||
| static bool rna_UILayout_activate_init_get(PointerRNA *ptr) | |||||
| { | |||||
| return uiLayoutGetActivateInit(ptr->data); | |||||
| } | |||||
| static void rna_UILayout_activate_init_set(PointerRNA *ptr, bool value) | |||||
| { | |||||
| uiLayoutSetActivateInit(ptr->data, value); | |||||
| } | |||||
| static bool rna_UILayout_alert_get(PointerRNA *ptr) | static bool rna_UILayout_alert_get(PointerRNA *ptr) | ||||
| { | { | ||||
| return uiLayoutGetRedAlert(ptr->data); | return uiLayoutGetRedAlert(ptr->data); | ||||
| } | } | ||||
| static void rna_UILayout_alert_set(PointerRNA *ptr, bool value) | static void rna_UILayout_alert_set(PointerRNA *ptr, bool value) | ||||
| { | { | ||||
| uiLayoutSetRedAlert(ptr->data, value); | uiLayoutSetRedAlert(ptr->data, value); | ||||
| ▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | static void rna_def_ui_layout(BlenderRNA *brna) | ||||
| srna = RNA_def_struct(brna, "UILayout", NULL); | srna = RNA_def_struct(brna, "UILayout", NULL); | ||||
| RNA_def_struct_sdna(srna, "uiLayout"); | RNA_def_struct_sdna(srna, "uiLayout"); | ||||
| RNA_def_struct_ui_text(srna, "UI Layout", "User interface layout in a panel or header"); | RNA_def_struct_ui_text(srna, "UI Layout", "User interface layout in a panel or header"); | ||||
| prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_UILayout_active_get", "rna_UILayout_active_set"); | RNA_def_property_boolean_funcs(prop, "rna_UILayout_active_get", "rna_UILayout_active_set"); | ||||
| prop = RNA_def_property(srna, "activate_init", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_funcs(prop, "rna_UILayout_activate_init_get", "rna_UILayout_activate_init_set"); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Activate on Init", | |||||
| "When true, buttons defined in popovers will be activated when the popup opens"); | |||||
| prop = RNA_def_property(srna, "operator_context", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "operator_context", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, rna_enum_operator_context_items); | RNA_def_property_enum_items(prop, rna_enum_operator_context_items); | ||||
| RNA_def_property_enum_funcs(prop, "rna_UILayout_op_context_get", "rna_UILayout_op_context_set", NULL); | RNA_def_property_enum_funcs(prop, "rna_UILayout_op_context_get", "rna_UILayout_op_context_set", NULL); | ||||
| prop = RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_UILayout_enabled_get", "rna_UILayout_enabled_set"); | RNA_def_property_boolean_funcs(prop, "rna_UILayout_enabled_get", "rna_UILayout_enabled_set"); | ||||
| RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout is grayed out"); | RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout is grayed out"); | ||||
| ▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines | |||||