Beispiel #1
0
	// A toggle on has occurred
	static void ToggleOn(GWidgetObject *gw, uint16_t role) {
		(void) role;
		gw->g.flags |= GBUTTON_FLG_PRESSED;
		_gwidgetUpdate((GHandle)gw);
		// Trigger the event on button down (different than for mouse/touch)
		SendButtonEvent(gw);
	}
Beispiel #2
0
	// A mouse up has occurred (it may or may not be over the button)
	static void MouseUp(GWidgetObject *gw, coord_t x, coord_t y) {
		(void) x; (void) y;
		gw->g.flags &= ~GBUTTON_FLG_PRESSED;
		_gwidgetUpdate((GHandle)gw);

		#if !GWIN_BUTTON_LAZY_RELEASE
			// If the mouse up was not over the button then cancel the event
			if (x < 0 || y < 0 || x >= gw->g.width || y >= gw->g.height)
				return;
		#endif

		SendButtonEvent(gw);
	}
Beispiel #3
0
bool wxUIActionSimulator::MouseUp(int button)
{
    SendButtonEvent(button, false);
    return true;
}
Beispiel #4
0
bool wxUIActionSimulator::MouseDown(int button)
{
    SendButtonEvent(button, true);
    return true;
}