Added uiAreaQueueRedrawAll() and implemented on all platforms. NOW we can focus exclusively on the test suite.

This commit is contained in:
Pietro Gagliardi 2015-10-09 15:27:57 -04:00
parent db1026f003
commit 7075bea0f5
5 changed files with 20 additions and 1 deletions

View File

@ -688,6 +688,11 @@ void uiAreaUpdateScroll(uiArea *a)
*/
}
void uiAreaQueueRedrawAll(uiArea *a)
{
[a->view setNeedsDisplay:YES];
}
uiArea *uiNewArea(uiAreaHandler *ah)
{
uiArea *a;

View File

@ -85,7 +85,7 @@ static void shouldntHappen(uiCombobox *c, void *data)
static void redraw(uiCombobox *c, void *data)
{
// TODO
uiAreaQueueRedrawAll(area);
}
uiBox *makePage6(void)

2
ui.h
View File

@ -267,6 +267,8 @@ struct uiAreaHandler {
_UI_EXTERN uintmax_t uiMenuItemType(void);
#define uiArea(this) ((uiArea *) uiIsA((this), uiAreaType(), 1))
_UI_EXTERN void uiAreaUpdateScroll(uiArea *a);
// TODO uiAreaQueueRedraw()
_UI_EXTERN void uiAreaQueueRedrawAll(uiArea *a);
_UI_EXTERN uiArea *uiNewArea(uiAreaHandler *ah);
struct uiAreaDrawParams {

View File

@ -568,6 +568,11 @@ void uiAreaUpdateScroll(uiArea *a)
updateScroll(a->area);
}
void uiAreaQueueRedrawAll(uiArea *a)
{
gtk_widget_queue_draw(a->areaWidget);
}
uiArea *uiNewArea(uiAreaHandler *ah)
{
uiArea *a;

View File

@ -695,6 +695,13 @@ void uiAreaUpdateScroll(uiArea *a)
vscrollby(a, 0);
}
void uiAreaQueueRedrawAll(uiArea *a)
{
// don't erase the background; we do that ourselves in doPaint()
if (InvalidateRect(a->hwnd, NULL, FALSE) == 0)
logLastError("error queueing uiArea redraw in uiAreaQueueRedrawAll()");
}
uiArea *uiNewArea(uiAreaHandler *ah)
{
uiArea *a;