From 3f1a2697a76cb6ba9e04f8d8620decebd4e53982 Mon Sep 17 00:00:00 2001 From: Peter Badida Date: Thu, 9 Feb 2017 23:00:50 +0100 Subject: [PATCH] Add docs & versions for Window properties --- kivy/core/window/__init__.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/kivy/core/window/__init__.py b/kivy/core/window/__init__.py index 281faaf13..a24663bca 100755 --- a/kivy/core/window/__init__.py +++ b/kivy/core/window/__init__.py @@ -346,12 +346,22 @@ class WindowBase(EventDispatcher): ''' icon = StringProperty() + '''A path to the window icon. + + .. versionadded:: 1.1.2 + + :attr:`icon` is a :class:`~kivy.properties.StringProperty`. + ''' def _get_modifiers(self): return self._modifiers modifiers = AliasProperty(_get_modifiers, None) '''List of keyboard modifiers currently active. + + .. versionadded:: 1.0.9 + + :attr:`modifiers` is an :class:`~kivy.properties.AliasProperty`. ''' def _get_size(self): @@ -409,6 +419,10 @@ class WindowBase(EventDispatcher): size = AliasProperty(_get_size, _set_size, bind=('_size', )) '''Get the rotated size of the window. If :attr:`rotation` is set, then the size will change to reflect the rotation. + + .. versionadded:: 1.0.9 + + :attr:`size` is an :class:`~kivy.properties.AliasProperty`. ''' def _get_clearcolor(self): @@ -439,6 +453,10 @@ class WindowBase(EventDispatcher): .. versionchanged:: 1.7.2 The clearcolor default value is now: (0, 0, 0, 1). + .. versionadded:: 1.0.9 + + :attr:`clearcolor` is an :class:`~kivy.properties.AliasProperty` and + defaults to (0, 0, 0, 1). ''' # make some property read-only @@ -480,7 +498,9 @@ class WindowBase(EventDispatcher): center = AliasProperty(_get_center, None, bind=('width', 'height')) '''Center of the rotated window. - :attr:`center` is a :class:`~kivy.properties.AliasProperty`. + .. versionadded:: 1.0.9 + + :attr:`center` is an :class:`~kivy.properties.AliasProperty`. ''' def _get_rotation(self): @@ -502,6 +522,10 @@ class WindowBase(EventDispatcher): bind=('_rotation', )) '''Get/set the window content rotation. Can be one of 0, 90, 180, 270 degrees. + + .. versionadded:: 1.0.9 + + :attr:`rotation` is an :class:`~kivy.properties.AliasProperty`. ''' softinput_mode = OptionProperty('', options=( @@ -624,6 +648,10 @@ class WindowBase(EventDispatcher): _set_system_size, bind=('_size', )) '''Real size of the window ignoring rotation. + + .. versionadded:: 1.0.9 + + :attr:`system_size` is an :class:`~kivy.properties.AliasProperty`. ''' def _get_effective_size(self): @@ -668,6 +696,9 @@ class WindowBase(EventDispatcher): '''2d position of the mouse within the window. .. versionadded:: 1.2.0 + + :attr:`mouse_pos` is an :class:`~kivy.properties.ObjectProperty` and + defaults to [0, 0]. ''' show_cursor = BooleanProperty(True)