Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_action/space_action.c
| Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | static SpaceLink *action_create(const ScrArea *area, const Scene *scene) | ||||
| /* header */ | /* header */ | ||||
| region = MEM_callocN(sizeof(ARegion), "header for action"); | region = MEM_callocN(sizeof(ARegion), "header for action"); | ||||
| BLI_addtail(&saction->regionbase, region); | BLI_addtail(&saction->regionbase, region); | ||||
| region->regiontype = RGN_TYPE_HEADER; | region->regiontype = RGN_TYPE_HEADER; | ||||
| region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP; | region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP; | ||||
| /* footer */ | |||||
| region = MEM_callocN(sizeof(ARegion), "footer for action"); | |||||
| BLI_addtail(&saction->regionbase, region); | |||||
| region->regiontype = RGN_TYPE_FOOTER; | |||||
| region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM; | |||||
| /* channel list region */ | /* channel list region */ | ||||
| region = MEM_callocN(sizeof(ARegion), "channel region for action"); | region = MEM_callocN(sizeof(ARegion), "channel region for action"); | ||||
| BLI_addtail(&saction->regionbase, region); | BLI_addtail(&saction->regionbase, region); | ||||
| region->regiontype = RGN_TYPE_CHANNELS; | region->regiontype = RGN_TYPE_CHANNELS; | ||||
| region->alignment = RGN_ALIGN_LEFT; | region->alignment = RGN_ALIGN_LEFT; | ||||
| /* only need to set scroll settings, as this will use 'listview' v2d configuration */ | /* only need to set scroll settings, as this will use 'listview' v2d configuration */ | ||||
| region->v2d.scroll = V2D_SCROLL_BOTTOM; | region->v2d.scroll = V2D_SCROLL_BOTTOM; | ||||
| ▲ Show 20 Lines • Show All 789 Lines • ▼ Show 20 Lines | void ED_spacetype_action(void) | ||||
| art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; | art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; | ||||
| art->init = action_header_region_init; | art->init = action_header_region_init; | ||||
| art->draw = action_header_region_draw; | art->draw = action_header_region_draw; | ||||
| art->listener = action_header_region_listener; | art->listener = action_header_region_listener; | ||||
| BLI_addhead(&st->regiontypes, art); | BLI_addhead(&st->regiontypes, art); | ||||
| /* regions: footer */ | |||||
| art = MEM_callocN(sizeof(ARegionType), "spacetype action region"); | |||||
| art->regionid = RGN_TYPE_FOOTER; | |||||
| art->prefsizey = HEADERY; | |||||
| art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FOOTER; | |||||
| art->init = action_header_region_init; | |||||
| art->draw = action_header_region_draw; | |||||
| BLI_addhead(&st->regiontypes, art); | |||||
| /* regions: channels */ | /* regions: channels */ | ||||
| art = MEM_callocN(sizeof(ARegionType), "spacetype action region"); | art = MEM_callocN(sizeof(ARegionType), "spacetype action region"); | ||||
| art->regionid = RGN_TYPE_CHANNELS; | art->regionid = RGN_TYPE_CHANNELS; | ||||
| art->prefsizex = 200; | art->prefsizex = 200; | ||||
| art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; | art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; | ||||
| art->init = action_channel_region_init; | art->init = action_channel_region_init; | ||||
| art->draw = action_channel_region_draw; | art->draw = action_channel_region_draw; | ||||
| Show All 20 Lines | |||||