Added a checkbox for testing uiArea keystroke ignoring. This will be for migrating the Windows keyboard code to using message filters, so we can clean up dialog handling.

This commit is contained in:
Pietro Gagliardi 2015-11-27 11:49:06 -05:00
parent 923c4c091e
commit 9153766dc9
1 changed files with 5 additions and 1 deletions

View File

@ -5,6 +5,7 @@ static uiArea *area;
static uiCombobox *which;
static uiSpinbox *hamount;
static uiSpinbox *vamount;
static uiCheckbox *swallowKeys;
struct handler {
uiAreaHandler ah;
@ -70,7 +71,7 @@ static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
(int) e->Modifier,
(int) e->Modifiers,
e->Up);
return 0;
return uiCheckboxChecked(swallowKeys);
}
static void onAmountChanged(uiSpinbox *s, void *data)
@ -130,5 +131,8 @@ uiBox *makePage6(void)
uiBoxAppend(hbox, uiControl(vamount), 0);
uiBoxAppend(page6, uiControl(hbox), 0);
swallowKeys = uiNewCheckbox("Consider key events handled");
uiBoxAppend(page6, uiControl(swallowKeys), 0);
return page6;
}