Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_graph/space_graph.c
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | static SpaceLink *graph_create(const ScrArea *UNUSED(area), const Scene *scene) | ||||
| /* header */ | /* header */ | ||||
| region = MEM_callocN(sizeof(ARegion), "header for graphedit"); | region = MEM_callocN(sizeof(ARegion), "header for graphedit"); | ||||
| BLI_addtail(&sipo->regionbase, region); | BLI_addtail(&sipo->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 graphedit"); | |||||
| BLI_addtail(&sipo->regionbase, region); | |||||
| region->regiontype = RGN_TYPE_FOOTER; | |||||
| region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM; | |||||
| /* channels */ | /* channels */ | ||||
| region = MEM_callocN(sizeof(ARegion), "channels region for graphedit"); | region = MEM_callocN(sizeof(ARegion), "channels region for graphedit"); | ||||
| BLI_addtail(&sipo->regionbase, region); | BLI_addtail(&sipo->regionbase, region); | ||||
| region->regiontype = RGN_TYPE_CHANNELS; | region->regiontype = RGN_TYPE_CHANNELS; | ||||
| region->alignment = RGN_ALIGN_LEFT; | region->alignment = RGN_ALIGN_LEFT; | ||||
| region->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); | region->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); | ||||
| ▲ Show 20 Lines • Show All 757 Lines • ▼ Show 20 Lines | void ED_spacetype_ipo(void) | ||||
| art->prefsizey = HEADERY; | art->prefsizey = HEADERY; | ||||
| 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->listener = graph_region_listener; | art->listener = graph_region_listener; | ||||
| art->init = graph_header_region_init; | art->init = graph_header_region_init; | ||||
| art->draw = graph_header_region_draw; | art->draw = graph_header_region_draw; | ||||
| BLI_addhead(&st->regiontypes, art); | BLI_addhead(&st->regiontypes, art); | ||||
| /* regions: footer */ | |||||
| art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region"); | |||||
| art->regionid = RGN_TYPE_FOOTER; | |||||
| art->prefsizey = HEADERY; | |||||
| art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FOOTER; | |||||
| art->init = graph_header_region_init; | |||||
| art->draw = graph_header_region_draw; | |||||
| BLI_addhead(&st->regiontypes, art); | |||||
| /* regions: channels */ | /* regions: channels */ | ||||
| art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region"); | art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region"); | ||||
| art->regionid = RGN_TYPE_CHANNELS; | art->regionid = RGN_TYPE_CHANNELS; | ||||
| /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */ | /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */ | ||||
| art->prefsizex = 200 + V2D_SCROLL_WIDTH; | art->prefsizex = 200 + V2D_SCROLL_WIDTH; | ||||
| art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; | art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; | ||||
| art->listener = graph_region_listener; | art->listener = graph_region_listener; | ||||
| art->message_subscribe = graph_region_message_subscribe; | art->message_subscribe = graph_region_message_subscribe; | ||||
| Show All 23 Lines | |||||