diff options
Diffstat (limited to 'apps/win_main.c')
-rw-r--r-- | apps/win_main.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/apps/win_main.c b/apps/win_main.c index fc772aa7..da97b011 100644 --- a/apps/win_main.c +++ b/apps/win_main.c @@ -463,6 +463,17 @@ void windrawstring(pdfapp_t *app, int x, int y, char *s) TextOutA(hdc, x, y - 12, s, strlen(s)); } +void winblitsearch() +{ + if (gapp.isediting) + { + char buf[sizeof(gapp.search) + 50]; + sprintf(buf, "Search: %s", gapp.search); + windrawrect(&gapp, 0, 0, gapp.winw, 30); + windrawstring(&gapp, 10, 20, buf); + } +} + void winblit() { int x0 = gapp.panx; @@ -544,13 +555,7 @@ void winblit() r.bottom = y1; FillRect(hdc, &r, shbrush); - if (gapp.isediting) - { - char buf[sizeof(gapp.search) + 50]; - sprintf(buf, "Search: %s", gapp.search); - windrawrect(&gapp, 0, 0, gapp.winw, 30); - windrawstring(&gapp, 10, 20, buf); - } + winblitsearch(); } void winresize(pdfapp_t *app, int w, int h) @@ -567,6 +572,13 @@ void winrepaint(pdfapp_t *app) InvalidateRect(hwndview, NULL, 0); } +void winrepaintsearch(pdfapp_t *app) +{ + // TODO: invalidate only search area and + // call only search redraw routine. + InvalidateRect(hwndview, NULL, 0); +} + /* * Event handling */ |