diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2011-09-04 04:08:29 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2011-09-04 12:35:13 +0200 |
commit | f6b4b3586cef63c68cc3a436ffdf32edb8f144cf (patch) | |
tree | 333dd6320d4e538af8388eaf178df1d608c75bad /apps/win_main.c | |
parent | 1e96e8e23581dc44e04d5133891f477bc9a6c5d6 (diff) | |
download | mupdf-f6b4b3586cef63c68cc3a436ffdf32edb8f144cf.tar.xz |
Repaint only viewer search area when editing search string.
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 */ |