41 {0,
nullptr, 0,
nullptr,
nullptr},
45 {-1,
"UNSUPPORTED", 0,
"Not Supported",
"This region does not support panel categories"},
46 {0,
nullptr, 0,
nullptr,
nullptr},
77 screen->do_draw =
true;
78 screen->do_refresh =
true;
91static bool rna_Screen_is_animation_playing_get(
PointerRNA * )
101 return screen->scrubbing;
121 return (area->butspacetype ==
SPACE_EMPTY) ? area->spacetype : area->butspacetype;
139 area->butspacetype = value;
211 int totitem_prev = totitem;
214 while (totitem_prev < totitem) {
215 item[totitem_prev++].value |= item_from->
value << 16;
220 item[totitem_prev++].value = item_from->
value << 16;
236 const int area_type = rna_Area_type_get(
ptr);
237 const bool area_changing = area->butspacetype !=
SPACE_EMPTY;
238 int value = area_type << 16;
247 if (type ==
nullptr || area_changing) {
249 if (type ==
nullptr) {
254 if (type->space_subtype_item_extend !=
nullptr) {
255 value |= area_changing ? area->butspacetype_subtype : type->space_subtype_get(area);
263 const int space_type = value >> 16;
270 rna_Area_type_set(
ptr, space_type);
273 area->butspacetype_subtype = value & 0xffff;
281 rna_Area_type_update(C,
ptr);
291 if (region->regiondata !=
nullptr) {
304static int rna_Region_active_panel_category_editable_get(
const PointerRNA *
ptr,
310 *r_info =
N_(
"This region does not support panel categories");
317static int rna_Region_active_panel_category_get(
PointerRNA *
ptr)
324static void rna_Region_active_panel_category_set(
PointerRNA *
ptr,
int value)
326 BLI_assert(rna_Region_active_panel_category_editable_get(
ptr,
nullptr));
339 if (!rna_Region_active_panel_category_editable_get(
ptr,
nullptr)) {
349 item.
value = category_index;
351 item.
name = pc_dyn->idname;
360static void rna_View2D_region_to_view(
View2D *v2d,
float x,
float y,
float result[2])
365static void rna_View2D_view_to_region(
View2D *v2d,
float x,
float y,
bool clip,
int result[2])
418 func,
"text",
nullptr, 0,
"Text",
"New string for the header, None clears the text");
437 "Spaces contained in this area, the first being the active space "
438 "(NOTE: Useful for example to restore a previously used 3D view space "
439 "in a certain area to get the old view orientation)");
471 prop,
"rna_Area_ui_type_get",
"rna_Area_ui_type_set",
"rna_Area_ui_type_itemf");
481 prop,
"X Position",
"The window relative vertical location of the area");
487 prop,
"Y Position",
"The window relative horizontal location of the area");
507 static const float view_default[2] = {0.0f, 0.0f};
508 static const int region_default[2] = {0, 0};
510 func =
RNA_def_function(srna,
"region_to_view",
"rna_View2D_region_to_view");
529 func =
RNA_def_function(srna,
"view_to_region",
"rna_View2D_view_to_region");
532 func,
"x", 0.0f, -
FLT_MAX,
FLT_MAX,
"x",
"2D View x coordinate", -10000.0f, 10000.0f);
535 func,
"y", 0.0f, -
FLT_MAX,
FLT_MAX,
"y",
"2D View y coordinate", -10000.0f, 10000.0f);
537 RNA_def_boolean(func,
"clip",
true,
"Clip",
"Clip coordinates to the visible region");
545 "Region coordinates",
574 func =
RNA_def_function(srna,
"tag_refresh_ui",
"rna_Region_tag_refresh_ui");
584 {
RGN_ALIGN_NONE,
"NONE", 0,
"None",
"Don't use any fixed alignment, fill available space"},
595 "Region floats on screen, doesn't use any fixed alignment"},
600 "Region is split horizontally and vertically"},
601 {0,
nullptr, 0,
nullptr,
nullptr},
618 prop,
"X Position",
"The window relative vertical location of the region");
624 prop,
"Y Position",
"The window relative horizontal location of the region");
651 prop,
"Region Data",
"Region specific data (the type depends on the region type)");
659 "rna_Region_active_panel_category_get",
660 "rna_Region_active_panel_category_set",
661 "rna_Region_active_panel_category_itemf");
664 "Active Panel Category",
665 "The current active panel category, may be Null if the region does not "
666 "support this feature (NOTE: these categories are generated at runtime, so list may be "
667 "empty at initialization, before any drawing took place)");
683 srna,
"Screen",
"Screen data-block, defining the layout of areas in a window");
702 prop,
"User is Scrubbing",
"True when the user is scrubbing through time");
721 func =
RNA_def_function(srna,
"statusbar_info",
"rna_Screen_statusbar_info_get");
723 parm =
RNA_def_string(func,
"statusbar_info",
nullptr, 0,
"Status Bar Info",
"");
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
void CTX_wm_window_set(bContext *C, wmWindow *win)
Main * CTX_data_main(const bContext *C)
void CTX_wm_area_set(bContext *C, ScrArea *area)
void CTX_wm_region_set(bContext *C, ARegion *region)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
SpaceType * BKE_spacetype_from_id(int spaceid)
ARegionType * BKE_regiontype_from_id(const SpaceType *st, int regionid)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void DEG_tag_on_visible_update(Main *bmain, bool do_time)
#define RGN_ALIGN_ENUM_FROM_MASK(align)
@ RGN_TYPE_ASSET_SHELF_HEADER
@ SCREEN_COLLAPSE_STATUSBAR
const char * ED_info_statusbar_string(Main *bmain, Scene *scene, ViewLayer *view_layer)
void ED_area_tag_redraw(ScrArea *area)
void ED_region_tag_refresh_ui(ARegion *region)
void ED_area_newspace(bContext *C, ScrArea *area, int type, bool skip_region_exit)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
void ED_area_tag_refresh(ScrArea *area)
void ED_screen_animation_timer_update(bScreen *screen, int redraws)
constexpr PointerRNA PointerRNA_NULL
int UI_panel_category_index_find(ARegion *region, const char *idname)
void UI_panel_category_index_active_set(ARegion *region, const int index)
const char * UI_panel_category_active_get(ARegion *region, bool set_fallback)
bool UI_view2d_view_to_region_clip(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_view_to_region(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
void snode_set_context(const bContext &C)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
static void rna_def_view2d(BlenderRNA *brna)
static void rna_def_area(BlenderRNA *brna)
static const EnumPropertyItem rna_enum_region_panel_category_items[]
static void rna_def_view2d_api(StructRNA *srna)
const EnumPropertyItem rna_enum_region_type_items[]
static void rna_def_region(BlenderRNA *brna)
static void rna_def_area_spaces(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_area_api(StructRNA *srna)
void RNA_def_screen(BlenderRNA *brna)
static void rna_def_screen(BlenderRNA *brna)
static void rna_def_region_api(StructRNA *srna)
const EnumPropertyItem rna_enum_space_type_items[]
void(* space_subtype_item_extend)(bContext *C, EnumPropertyItem **item, int *totitem)
void WM_main_add_notifier(uint type, void *reference)
bScreen * WM_window_get_active_screen(const wmWindow *win)