![]() pop ( '_drawelement', None ) if de is not None : win. ![]() pop () def clear_graphics ( self, win ): de = self. scale_for_screen ( w, h, rotation = win. push () # use same logic as WindowBase.on_motion() so we get correct # coordinates when _density != 1 w, h = win. _drawelement = de if de is not None : self. get ( '_drawelement', None ) if de is None and create : if Color is None : from aphics import Color, Ellipse with win. # def update_graphics ( self, win, create = False ): global Color, Ellipse de = self. depack ( args ) # Create automatically touch on the surface. append ( 'multitouch_sim' ) else : if not profile : profile. button = args if len ( args ) = 4 : self. extend (( 'pos', 'button' )) if len ( args ) >= 3 : self. is_touch : # don't overwrite previous profile if not profile : profile. _init_ ( * args, ** kwargs ) def depack ( self, args ): self. = ''' _all_ = ( 'MouseMotionEventProvider', ) from kivy.base import EventLoop from collections import deque from kivy.logger import Logger from import MotionEventProvider from import MotionEventFactory from import MotionEvent # late binding Color = Ellipse = None class MouseMotionEvent ( MotionEvent ): def _init_ ( self, * args, ** kwargs ): self. Accessed via the 'multitouch_sim' property. multitouch_sim Specifies whether multitouch is simulated or not. Also reflected in the :attr:`~.x`, :attr:`~.y` and :attr:`~.pos` properties. = Profile value Description - button Mouse button (one of `left`, `right`, `middle`, `scrollup` or `scrolldown`). Following is a list of the supported values for the :attr:`~.profile` property list. Dispatching can be disabled by setting :attr:`MouseMotionEventProvider.disable_hover` to ``True`` or by adding `disable_hover` in the config:: mouse = mouse,disable_hover It's also possible to enable/disable hover events at runtime with :attr:`MouseMotionEventProvider.disable_hover` property. versionchanged:: 2.1.0 Provider dispatches hover events by listening to properties/events in :class:`~`. For example:: if 'multitouch_sim' in touch.profile: touch.multitouch_sim = True. in on_touch_down/move), the touch will simulate a multi-touch event. In that case, if `multitouch_sim` is set to True before the mouse is released (e.g. If, however, `multitouch_on_demand` is added to the config:: mouse = mouse,multitouch_on_demand then `multitouch_sim` defaults to `False`. By default, `multitouch_sim` is True and multitouch will be emulated for that touch. right mouse button), a `multitouch_sim` value will be added to the touch's profile, and a `multitouch_sim` property will be added to the touch. If the touch has been initiated in the above manner (e.g. versionchanged:: 1.9.0 You can now selectively control whether a click initiated as described above will emulate multi-touch. If you want to use them for other purposes, you can disable this behavior by activating the "disable_multitouch" token:: mouse = mouse,disable_multitouch. versionadded:: 1.3.0 By default, the middle and right mouse buttons, as well as a combination of ctrl + left mouse button are used for multitouch emulation. ![]() Add this to your configuration:: mouse = mouse,disable_on_activity Using multitouch interaction with the mouse. Then, if any touches are created by another provider, the mouse event will be discarded. To avoid this behavior, you can activate the "disable_on_activity" token in the mouse configuration. The Mouse can conflict with them: a single touch can generate one event from the mouse provider and another from the multitouch provider. ''' Mouse provider implementation = On linux systems, the mouse provider can be annoying when used with another multitouch provider (hidinput or mtdev). Common definitions for a Windows provider.Auto Create Input Provider Config Entry for Available MT Hardware (linux only).Native support for Multitouch devices on Linux, using libmtdev.Native support of MultitouchSupport framework for MacBook (MaxOSX platform). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |