Blender V5.0
SpaceType Struct Reference

#include <BKE_screen.hh>

Public Member Functions

Space-type/region-type handling
 ~SpaceType ()

Public Attributes

char name [BKE_ST_MAXNAME]
int spaceid
int iconid
SpaceLink *(* create )(const ScrArea *area, const Scene *scene)
void(* free )(SpaceLink *sl)
void(* init )(wmWindowManager *wm, ScrArea *area)
void(* exit )(wmWindowManager *wm, ScrArea *area)
void(* listener )(const wmSpaceTypeListenerParams *params)
void(* deactivate )(ScrArea *area)
void(* refresh )(const bContext *C, ScrArea *area)
SpaceLink *(* duplicate )(SpaceLink *sl)
void(* operatortypes )()
void(* keymap )(wmKeyConfig *keyconf)
void(* dropboxes )()
void(* gizmos )()
bContextDataCallback context
void(* id_remap )(ScrArea *area, SpaceLink *sl, const blender::bke::id::IDRemapper &mappings)
void(* foreach_id )(SpaceLink *space_link, LibraryForeachIDData *data)
int(* space_subtype_get )(ScrArea *area)
void(* space_subtype_set )(ScrArea *area, int value)
void(* space_subtype_item_extend )(bContext *C, EnumPropertyItem **item, int *totitem)
blender::StringRefNull(* space_name_get )(const ScrArea *area)
int(* space_icon_get )(const ScrArea *area)
void(* blend_read_data )(BlendDataReader *reader, SpaceLink *space_link)
void(* blend_read_after_liblink )(BlendLibReader *reader, ID *parent_id, SpaceLink *space_link)
void(* blend_write )(BlendWriter *writer, SpaceLink *space_link)
ListBase regiontypes
int keymapflag

Detailed Description

Definition at line 81 of file BKE_screen.hh.

Constructor & Destructor Documentation

◆ ~SpaceType()

SpaceType::~SpaceType ( )

Definition at line 223 of file screen.cc.

References BLI_freelistN(), BPY_callback_screen_free(), LISTBASE_FOREACH, and regiontypes.

Member Data Documentation

◆ blend_read_after_liblink

void(* SpaceType::blend_read_after_liblink) (BlendLibReader *reader, ID *parent_id, SpaceLink *space_link)

Update pointers to other id data blocks.

Definition at line 153 of file BKE_screen.hh.

Referenced by BKE_screen_area_blend_read_after_liblink().

◆ blend_read_data

void(* SpaceType::blend_read_data) (BlendDataReader *reader, SpaceLink *space_link)

Update pointers for all structs directly owned by this space.

Definition at line 148 of file BKE_screen.hh.

Referenced by direct_link_area().

◆ blend_write

void(* SpaceType::blend_write) (BlendWriter *writer, SpaceLink *space_link)

Write all structs that should be saved in a .blend file.

Definition at line 158 of file BKE_screen.hh.

Referenced by write_area().

◆ context

bContextDataCallback SpaceType::context

Return context data.

Definition at line 124 of file BKE_screen.hh.

Referenced by CTX_data_dir_get_ex(), and ctx_data_get().

◆ create

SpaceLink *(* SpaceType::create) (const ScrArea *area, const Scene *scene)

Initial allocation, after this WM will call init() too. Some editors need area and scene data (e.g. frame range) to set their initial scrolling.

Definition at line 93 of file BKE_screen.hh.

Referenced by do_version_area_change_space_to_space_action(), ED_area_newspace(), and screen_area_spacelink_add().

◆ deactivate

void(* SpaceType::deactivate) (ScrArea *area)

Called when the mouse moves out of the area.

Definition at line 105 of file BKE_screen.hh.

◆ dropboxes

void(* SpaceType::dropboxes) ()

On startup, define dropboxes for spacetype+regions.

Definition at line 118 of file BKE_screen.hh.

◆ duplicate

SpaceLink *(* SpaceType::duplicate) (SpaceLink *sl)

After a spacedata copy, an init should result in exact same situation.

Definition at line 111 of file BKE_screen.hh.

Referenced by BKE_spacedata_copylist().

◆ exit

void(* SpaceType::exit) (wmWindowManager *wm, ScrArea *area)

Exit is called when the area is hidden or removed.

Definition at line 100 of file BKE_screen.hh.

Referenced by area_offscreen_exit(), ED_area_exit(), and ED_area_newspace().

◆ foreach_id

void(* SpaceType::foreach_id) (SpaceLink *space_link, LibraryForeachIDData *data)

foreach_id callback to process all ID pointers of the editor. Used indirectly by lib_query's BKE_library_foreach_ID_link when IDWALK_INCLUDE_UI bit-flag is set (through WM's foreach_id usage of BKE_screen_foreach_id_screen_area).

Definition at line 134 of file BKE_screen.hh.

Referenced by BKE_screen_foreach_id_screen_area().

◆ free

void(* SpaceType::free) (SpaceLink *sl)

Not free spacelink itself.

Definition at line 95 of file BKE_screen.hh.

Referenced by BKE_spacedata_freelist(), and ED_area_newspace().

◆ gizmos

void(* SpaceType::gizmos) ()

Initialize gizmo-map-types and gizmo-group-types with the region.

Definition at line 121 of file BKE_screen.hh.

◆ iconid

int SpaceType::iconid

Icon lookup for menus.

Definition at line 87 of file BKE_screen.hh.

◆ id_remap

void(* SpaceType::id_remap) (ScrArea *area, SpaceLink *sl, const blender::bke::id::IDRemapper &mappings)

Used when we want to replace an ID by another (or NULL).

Definition at line 127 of file BKE_screen.hh.

Referenced by ED_spacedata_id_remap(), and ED_spacedata_id_remap_single().

◆ init

void(* SpaceType::init) (wmWindowManager *wm, ScrArea *area)

Init is to cope with file load, screen (size) changes, check handlers.

Definition at line 98 of file BKE_screen.hh.

Referenced by ED_area_init().

◆ keymap

void(* SpaceType::keymap) (wmKeyConfig *keyconf)

Add default items to WM keymap.

Definition at line 116 of file BKE_screen.hh.

◆ keymapflag

int SpaceType::keymapflag

Default key-maps to add.

Definition at line 166 of file BKE_screen.hh.

Referenced by ED_area_init().

◆ listener

void(* SpaceType::listener) (const wmSpaceTypeListenerParams *params)

Listeners can react to bContext changes.

Definition at line 102 of file BKE_screen.hh.

◆ name

char SpaceType::name[BKE_ST_MAXNAME]

For menus.

Definition at line 83 of file BKE_screen.hh.

Referenced by BKE_spacetype_register(), and regions_remove_invalid().

◆ operatortypes

void(* SpaceType::operatortypes) ()

Register operator types on startup.

Definition at line 114 of file BKE_screen.hh.

◆ refresh

void(* SpaceType::refresh) (const bContext *C, ScrArea *area)

Refresh context, called after file-reads, ED_area_tag_refresh().

Definition at line 108 of file BKE_screen.hh.

Referenced by ED_area_do_refresh().

◆ regiontypes

ListBase SpaceType::regiontypes

Region type definitions.

Definition at line 161 of file BKE_screen.hh.

Referenced by BKE_regiontype_from_id(), and ~SpaceType().

◆ space_icon_get

int(* SpaceType::space_icon_get) (const ScrArea *area)

Return a custom icon, based on subtype or other reason.

Definition at line 143 of file BKE_screen.hh.

Referenced by ED_area_icon().

◆ space_name_get

blender::StringRefNull(* SpaceType::space_name_get) (const ScrArea *area)

Return a custom name, based on subtype or other reason.

Definition at line 141 of file BKE_screen.hh.

Referenced by ED_area_name().

◆ space_subtype_get

int(* SpaceType::space_subtype_get) (ScrArea *area)

Definition at line 136 of file BKE_screen.hh.

Referenced by ED_area_newspace().

◆ space_subtype_item_extend

void(* SpaceType::space_subtype_item_extend) (bContext *C, EnumPropertyItem **item, int *totitem)

Definition at line 138 of file BKE_screen.hh.

Referenced by ED_area_newspace().

◆ space_subtype_set

void(* SpaceType::space_subtype_set) (ScrArea *area, int value)

Definition at line 137 of file BKE_screen.hh.

Referenced by ED_area_newspace().

◆ spaceid

int SpaceType::spaceid

The documentation for this struct was generated from the following files: