void ComboBox::OnPreviewMouseLeftButtonDown(suic::MouseEventArg& e) { if (_textBox->IsReadOnly()) { OnMouseLeftButtonDown(e); } }
void ComboBox::OnMouseLeftButtonDbclk(suic::MouseEventArg& e) { OnMouseLeftButtonDown(e); }
void Events::Poll() { GamePad::Clear(); Joystick::Clear(); Keyboard::Clear(); Mouse::Clear(); while (SDL_PollEvent(&mEvent)) { switch (mEvent.type) { case SDL_QUIT: OnQuit(); break; case SDL_APP_TERMINATING: OnAppTerminating(); break; case SDL_APP_LOWMEMORY: OnAppLowMemory(); break; case SDL_APP_WILLENTERBACKGROUND: OnAppWillEnterBackground(); break; case SDL_APP_DIDENTERBACKGROUND: OnAppDidEnterBackground(); break; case SDL_APP_WILLENTERFOREGROUND: OnAppWillEnterForeground(); break; case SDL_APP_DIDENTERFOREGROUND: OnAppDidEnterForeground(); break; case SDL_WINDOWEVENT: OnWindowEvent(); break; case SDL_SYSWMEVENT: OnSysWMEvent(); break; case SDL_KEYDOWN: OnKeyDown(mEvent.key.keysym.sym, mEvent.key.keysym.mod, mEvent.key.repeat); Keyboard::SetKey(mEvent.key.keysym.sym, true); break; case SDL_KEYUP: OnKeyUp(mEvent.key.keysym.sym, mEvent.key.keysym.mod, mEvent.key.repeat); Keyboard::SetKey(mEvent.key.keysym.sym, false); break; case SDL_TEXTEDITING: OnTextEditing(); break; case SDL_TEXTINPUT: OnTextInput(); break; case SDL_MOUSEMOTION: OnMouseMotion(mEvent.motion.x, mEvent.motion.y, mEvent.motion.xrel, mEvent.motion.yrel); Mouse::SetPosition(mEvent.motion.x, mEvent.motion.y); break; case SDL_MOUSEBUTTONDOWN: switch(mEvent.button.button) { case SDL_BUTTON_LEFT: OnMouseLeftButtonDown(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_RIGHT: OnMouseRightButtonDown(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_MIDDLE: OnMouseMiddleButtonDown(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_X1: OnMouseLeftButtonDown(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_X2: OnMouseLeftButtonDown(mEvent.button.x, mEvent.button.y); break; } break; case SDL_MOUSEBUTTONUP: switch(mEvent.button.button) { case SDL_BUTTON_LEFT: OnMouseLeftButtonUp(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_RIGHT: OnMouseRightButtonUp(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_MIDDLE: OnMouseMiddleButtonUp(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_X1: OnMouseLeftButtonUp(mEvent.button.x, mEvent.button.y); break; case SDL_BUTTON_X2: OnMouseLeftButtonUp(mEvent.button.x, mEvent.button.y); break; } break; case SDL_MOUSEWHEEL: OnMouseWheel(mEvent.wheel.x, mEvent.wheel.y); Mouse::SetScroll(mEvent.wheel.x, mEvent.wheel.y); break; case SDL_JOYAXISMOTION: OnJoyAxisMotion(); break; case SDL_JOYBALLMOTION: OnJoyBallMotion(); break; case SDL_JOYHATMOTION: OnJoyHatMotion(); break; case SDL_JOYBUTTONDOWN: OnJoyBallButtonDown(); break; case SDL_JOYBUTTONUP: OnJoyBallButtonUp(); break; case SDL_JOYDEVICEADDED: OnJoyDeviceAdded(); break; case SDL_JOYDEVICEREMOVED: OnJoyDeviceRemoved(); break; case SDL_CONTROLLERAXISMOTION: OnControllerAxisMotion(mEvent.caxis.axis, mEvent.caxis.value, mEvent.caxis.which); GamePad::SetAxis(mEvent.caxis.axis, mEvent.caxis.value, mEvent.caxis.which); break; case SDL_CONTROLLERBUTTONDOWN: OnControllerButtonDown(mEvent.cbutton.button, mEvent.cbutton.which); GamePad::SetButton(mEvent.cbutton.button, true, mEvent.cbutton.which); break; case SDL_CONTROLLERBUTTONUP: OnControllerButtonUp(mEvent.cbutton.button, mEvent.cbutton.which); GamePad::SetButton(mEvent.cbutton.button, false, mEvent.cbutton.which); break; case SDL_CONTROLLERDEVICEADDED: OnControllerDeviceAdded(mEvent.cdevice.which); GamePad::Add(mEvent.cdevice.which); break; case SDL_CONTROLLERDEVICEREMOVED: OnControllerDeviceRemoved(mEvent.cdevice.which); GamePad::Remove(mEvent.cdevice.which); break; case SDL_CONTROLLERDEVICEREMAPPED: OnControllerDeviceRemapped(mEvent.cdevice.which); break; case SDL_FINGERDOWN: OnFingerDown(); break; case SDL_FINGERUP: OnFingerUp(); break; case SDL_FINGERMOTION: OnFingerMotion(); break; case SDL_DOLLARGESTURE: OnDollarGesture(); break; case SDL_DOLLARRECORD: OnDollarRecord(); break; case SDL_MULTIGESTURE: OnMultiGesture(); break; case SDL_CLIPBOARDUPDATE: OnClipboardUpdate(); break; case SDL_DROPFILE: OnDropFile(); break; case SDL_USEREVENT: OnUserEvent(); break; default: OnUndefined(); break; } } }
void CheckButton::OnMouseLeftButtonDbclk(suic::MouseEventArg& e) { OnMouseLeftButtonDown(e); }