Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area.c
| Show First 20 Lines • Show All 499 Lines • ▼ Show 20 Lines | void ED_region_do_draw(bContext *C, ARegion *ar) | ||||
| ar->do_draw |= RGN_DRAWING; | ar->do_draw |= RGN_DRAWING; | ||||
| /* note; this sets state, so we can use wmOrtho and friends */ | /* note; this sets state, so we can use wmOrtho and friends */ | ||||
| wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad); | wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad); | ||||
| wmOrtho2_region_pixelspace(ar); | wmOrtho2_region_pixelspace(ar); | ||||
| UI_SetTheme(sa ? sa->spacetype : 0, at->regionid); | UI_SetTheme(sa ? sa->spacetype : 0, at->regionid); | ||||
| #ifdef WITH_IM_OVERTHESPOT | |||||
| /* input method might need to be activate/deactivate for unusual reason | |||||
| * (e.g. change space type in active region, change screen, toggle fullscreen, etc.) */ | |||||
| if (CTX_wm_screen(C)->subwinactive == ar->swinid) { | |||||
| if (!(at->im_begin && at->im_begin(C, ar))) | |||||
| WM_window_IM_end(win); | |||||
| } | |||||
| #endif | |||||
| /* optional header info instead? */ | /* optional header info instead? */ | ||||
| if (ar->headerstr) { | if (ar->headerstr) { | ||||
| UI_ThemeClearColor(TH_HEADER); | UI_ThemeClearColor(TH_HEADER); | ||||
| glClear(GL_COLOR_BUFFER_BIT); | glClear(GL_COLOR_BUFFER_BIT); | ||||
| UI_ThemeColor(TH_TEXT); | UI_ThemeColor(TH_TEXT); | ||||
| BLF_draw_default(UI_UNIT_X, 0.4f * UI_UNIT_Y, 0.0f, ar->headerstr, BLF_DRAW_STR_DUMMY_MAX); | BLF_draw_default(UI_UNIT_X, 0.4f * UI_UNIT_Y, 0.0f, ar->headerstr, BLF_DRAW_STR_DUMMY_MAX); | ||||
| } | } | ||||
| Show All 25 Lines | if (sa) { | ||||
| /* disable emboss when the area is full, | /* disable emboss when the area is full, | ||||
| * unless we need to see division between regions (quad-split for eg) */ | * unless we need to see division between regions (quad-split for eg) */ | ||||
| if (((win->screen->state == SCREENFULL) && (ar->alignment == RGN_ALIGN_NONE)) == 0) { | if (((win->screen->state == SCREENFULL) && (ar->alignment == RGN_ALIGN_NONE)) == 0) { | ||||
| region_draw_emboss(ar, &ar->winrct); | region_draw_emboss(ar, &ar->winrct); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #ifdef WITH_IM_OVERTHESPOT | |||||
| bool ED_region_generic_im_begin(const bContext *C, ARegion *UNUSED(ar)) | |||||
| { | |||||
| WM_window_IM_begin(CTX_wm_window(C)); | |||||
| return true; | |||||
| } | |||||
| #endif | |||||
| /* ********************************** | /* ********************************** | ||||
| * maybe silly, but let's try for now | * maybe silly, but let's try for now | ||||
| * to keep these tags protected | * to keep these tags protected | ||||
| * ********************************** */ | * ********************************** */ | ||||
| void ED_region_tag_redraw(ARegion *ar) | void ED_region_tag_redraw(ARegion *ar) | ||||
| { | { | ||||
| /* don't tag redraw while drawing, it shouldn't happen normally | /* don't tag redraw while drawing, it shouldn't happen normally | ||||
| ▲ Show 20 Lines • Show All 1,919 Lines • Show Last 20 Lines | |||||