// KeyDown void PopupTextView::KeyDown(const char* bytes, int32 numBytes) { bool handled = true; if (numBytes > 0) { switch (bytes[0]) { case B_ESCAPE: // revert any typing changes RevertChanges(); break; case B_TAB: { // skip BTextView implementation BView::KeyDown(bytes, numBytes); int32 next = modifiers() & B_SHIFT_KEY ? -1 : 1; ApplyChanges(next); break; } case B_RETURN: ApplyChanges(); break; default: handled = false; break; } } if (!handled) BTextView::KeyDown(bytes, numBytes); }
void InputTextView::KeyDown(const char* bytes, int32 numBytes) { bool handled = true; if (numBytes > 0) { switch (bytes[0]) { case B_ESCAPE: // revert any typing changes RevertChanges(); break; case B_TAB: // skip BTextView implementation BView::KeyDown(bytes, numBytes); // fall through case B_RETURN: ApplyChanges(); break; default: handled = false; break; } } if (!handled) BTextView::KeyDown(bytes, numBytes); }
void FPlatformerOptions::DiscardSettings() { RevertChanges(); }