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:
parent
923c4c091e
commit
9153766dc9
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue