Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_console/space_console.c
| Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | |||||
| /* ************* end drop *********** */ | /* ************* end drop *********** */ | ||||
| static void console_main_region_draw(const bContext *C, ARegion *region) | static void console_main_region_draw(const bContext *C, ARegion *region) | ||||
| { | { | ||||
| /* draw entirely, view changes should be handled here */ | /* draw entirely, view changes should be handled here */ | ||||
| SpaceConsole *sc = CTX_wm_space_console(C); | SpaceConsole *sc = CTX_wm_space_console(C); | ||||
| View2D *v2d = ®ion->v2d; | View2D *v2d = ®ion->v2d; | ||||
| View2DScrollers *scrollers; | |||||
| if (BLI_listbase_is_empty(&sc->scrollback)) { | if (BLI_listbase_is_empty(&sc->scrollback)) { | ||||
| WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL); | WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL); | ||||
| } | } | ||||
| /* clear and setup matrix */ | /* clear and setup matrix */ | ||||
| UI_ThemeClearColor(TH_BACK); | UI_ThemeClearColor(TH_BACK); | ||||
| GPU_clear(GPU_COLOR_BIT); | GPU_clear(GPU_COLOR_BIT); | ||||
| /* worlks best with no view2d matrix set */ | /* worlks best with no view2d matrix set */ | ||||
| UI_view2d_view_ortho(v2d); | UI_view2d_view_ortho(v2d); | ||||
| /* data... */ | /* data... */ | ||||
| console_history_verify(C); /* make sure we have some command line */ | console_history_verify(C); /* make sure we have some command line */ | ||||
| console_textview_main(sc, region); | console_textview_main(sc, region); | ||||
| /* reset view matrix */ | /* reset view matrix */ | ||||
| UI_view2d_view_restore(C); | UI_view2d_view_restore(C); | ||||
| /* scrollers */ | /* scrollers */ | ||||
| scrollers = UI_view2d_scrollers_calc(v2d, NULL); | UI_view2d_scrollers_draw(v2d, NULL); | ||||
| UI_view2d_scrollers_draw(v2d, scrollers); | |||||
| UI_view2d_scrollers_free(scrollers); | |||||
| } | } | ||||
| static void console_operatortypes(void) | static void console_operatortypes(void) | ||||
| { | { | ||||
| /* console_ops.c */ | /* console_ops.c */ | ||||
| WM_operatortype_append(CONSOLE_OT_move); | WM_operatortype_append(CONSOLE_OT_move); | ||||
| WM_operatortype_append(CONSOLE_OT_delete); | WM_operatortype_append(CONSOLE_OT_delete); | ||||
| WM_operatortype_append(CONSOLE_OT_insert); | WM_operatortype_append(CONSOLE_OT_insert); | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||