kivydk 0.0.3.dev2__tar.gz → 0.0.6.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {kivydk-0.0.3.dev2 → kivydk-0.0.6.dev1}/LICENSE +20 -20
  2. kivydk-0.0.6.dev1/MANIFEST.in +9 -0
  3. {kivydk-0.0.3.dev2/src/kivydk.egg-info → kivydk-0.0.6.dev1}/PKG-INFO +5 -2
  4. kivydk-0.0.6.dev1/kivydk/__ref/__init__.py +16 -0
  5. kivydk-0.0.6.dev1/kivydk/__ref/window.py +15 -0
  6. kivydk-0.0.6.dev1/kivydk/__ref/window_adapter.py +98 -0
  7. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/_version.py +2 -2
  8. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/LICENSE.txt +93 -93
  9. kivydk-0.0.6.dev1/kivydk/debug.py +74 -0
  10. kivydk-0.0.6.dev1/kivydk/examples/ButtonIcon.py +114 -0
  11. kivydk-0.0.6.dev1/kivydk/examples/debug_objects.py +255 -0
  12. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/behavior/click.py +7 -17
  13. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/behavior/hover.py +14 -27
  14. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/widgets/line_number.py +74 -103
  15. {kivydk-0.0.3.dev2 → kivydk-0.0.6.dev1/kivydk.egg-info}/PKG-INFO +5 -2
  16. kivydk-0.0.6.dev1/kivydk.egg-info/SOURCES.txt +50 -0
  17. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk.egg-info/requires.txt +2 -1
  18. {kivydk-0.0.3.dev2 → kivydk-0.0.6.dev1}/pyproject.toml +23 -5
  19. kivydk-0.0.3.dev2/MANIFEST.in +0 -1
  20. kivydk-0.0.3.dev2/src/kivydk.egg-info/SOURCES.txt +0 -44
  21. {kivydk-0.0.3.dev2 → kivydk-0.0.6.dev1}/README.md +0 -0
  22. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/__init__.py +0 -0
  23. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/core/__init__.py +0 -0
  24. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/core/mapping/__init__.py +0 -0
  25. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/core/mapping/cursors.py +0 -0
  26. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/core/mapping/icons.py +0 -0
  27. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/core/resources/__init__.py +0 -0
  28. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/core/resources/fonts.py +0 -0
  29. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-Bold.otf +0 -0
  30. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-Bold.ttf +0 -0
  31. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-BoldItalic.otf +0 -0
  32. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-BoldItalic.ttf +0 -0
  33. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-Italic.otf +0 -0
  34. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-Italic.ttf +0 -0
  35. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-Regular.otf +0 -0
  36. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/JetBrainsMono/JetBrainsMono-Regular.ttf +0 -0
  37. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/MaterialIcons/LICENSE.txt +0 -0
  38. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/MaterialIcons/MaterialIcons-Filled.ttf +0 -0
  39. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/MaterialIcons/MaterialIcons-Outlined.otf +0 -0
  40. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/MaterialIcons/MaterialIcons-Round.otf +0 -0
  41. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/MaterialIcons/MaterialIcons-Sharp.otf +0 -0
  42. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/MaterialIcons/MaterialIcons-TwoTone.otf +0 -0
  43. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/data/fonts/materialdesignicons-webfont.ttf +0 -0
  44. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/logger.py +0 -0
  45. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/tools/monkey/event.py +0 -0
  46. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/tools/monkey/patch.py +0 -0
  47. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/__init__.py +0 -0
  48. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/behavior/__init__.py +0 -0
  49. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/manager/__init__.py +0 -0
  50. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/manager/hover.py +0 -0
  51. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk/uix/widgets/__init__.py +0 -0
  52. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk.egg-info/dependency_links.txt +0 -0
  53. {kivydk-0.0.3.dev2/src → kivydk-0.0.6.dev1}/kivydk.egg-info/top_level.txt +0 -0
  54. {kivydk-0.0.3.dev2 → kivydk-0.0.6.dev1}/setup.cfg +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Afanase Ioan (ASI)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Afanase Ioan (ASI)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
@@ -0,0 +1,9 @@
1
+ # Include data folder
2
+ recursive-include kivydk/data *
3
+
4
+ # Exclude documentation folder
5
+ exclude documentation/*
6
+ prune documentation
7
+
8
+ # Include only actual package
9
+ recursive-include kivydk *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kivydk
3
- Version: 0.0.3.dev2
3
+ Version: 0.0.6.dev1
4
4
  Summary: Kivy Desktop Kit — A desktop-focused UI toolkit for Kivy
5
5
  Author: ASI
6
6
  License: MIT License
@@ -24,6 +24,7 @@ License: MIT License
24
24
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
25
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
26
  SOFTWARE.
27
+ Project-URL: Documentation, https://kmcasi.github.io/KivyDK/
27
28
  Project-URL: Source, https://github.com/kmcasi/KivyDK
28
29
  Project-URL: Issues, https://github.com/kmcasi/KivyDK/issues
29
30
  Keywords: kivy,kivydk,desktop,kit,ui,uix,material
@@ -32,6 +33,7 @@ Classifier: Intended Audience :: Developers
32
33
  Classifier: Intended Audience :: End Users/Desktop
33
34
  Classifier: Intended Audience :: Information Technology
34
35
  Classifier: Intended Audience :: Science/Research
36
+ Classifier: License :: OSI Approved :: MIT License
35
37
  Classifier: Natural Language :: English
36
38
  Classifier: Operating System :: OS Independent
37
39
  Classifier: Operating System :: Microsoft :: Windows
@@ -60,7 +62,8 @@ Provides-Extra: docs
60
62
  Requires-Dist: sphinx; extra == "docs"
61
63
  Requires-Dist: sphinx-copybutton; extra == "docs"
62
64
  Requires-Dist: sphinx_design; extra == "docs"
63
- Requires-Dist: sphinx_localtoc; extra == "docs"
65
+ Requires-Dist: sphinx-doclang; extra == "docs"
66
+ Requires-Dist: sphinx-localtoc; extra == "docs"
64
67
  Requires-Dist: furo; extra == "docs"
65
68
 
66
69
  # KivyDK — Kivy Desktop Kit
@@ -0,0 +1,16 @@
1
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
2
+ #//| Copyright (c) 11 Feb 2026. All rights are reserved by ASI
3
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
4
+
5
+ #// IMPORT
6
+
7
+
8
+ #// GLOBAL VARIABLES
9
+
10
+
11
+ #// LOGIC
12
+
13
+
14
+ #// RUN
15
+ if __name__ == "__main__":
16
+ pass
@@ -0,0 +1,15 @@
1
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
2
+ #//| Copyright (c) 12 Jan 2026. All rights are reserved by ASI
3
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
4
+ __all__ = ("Window",)
5
+
6
+ #// IMPORT
7
+ from kivy.core.window import Window as WindowKivy
8
+
9
+ #// GLOBAL VARIABLES
10
+ # TODO: Need a better implementation to support also the `panda3d` library.
11
+ Window = WindowKivy
12
+ # Window = WindowPanda3D
13
+
14
+
15
+ #// LOGIC
@@ -0,0 +1,98 @@
1
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
2
+ #//| Copyright (c) 07 Jan 2026. All rights are reserved by ASI
3
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
4
+ __all__ = ("WindowAdapter", "Window")
5
+
6
+ #// IMPORT
7
+ from kivy.uix.widget import WidgetBase
8
+
9
+ from kivy.properties import NumericProperty
10
+ from kivy.properties import ReferenceListProperty, AliasProperty
11
+
12
+
13
+ #// LOGIC
14
+ # TODO: Extend this class to support all `~kivy.core.window.Window` functionality.
15
+ class WindowAdapter(WidgetBase):
16
+ """
17
+ Basically is a replacement for :class:`~kivy.core.window.Window` needs some manual assistant.
18
+
19
+ .. note::
20
+ Usefully only if a second rendering library is used, like `panda3d`.
21
+
22
+ :Events:
23
+ `on_cursor_enter`
24
+ Fired when the cursor enters the window.
25
+ `on_cursor_leave`
26
+ Fired when the cursor leaves the window.
27
+ `on_mouse_move`
28
+ Fired when the cursor move inside the window.
29
+ """
30
+
31
+ mouse_x = NumericProperty(-1)
32
+ """X position of the mouse cursor within the window.
33
+
34
+ Position is relative to the left/bottom point of the window.
35
+
36
+ :attr:`mouse_x` is a :class:`~kivy.properties.NumericProperty` and defaults to `-1`."""
37
+
38
+ mouse_y = NumericProperty(-1)
39
+ """Y position of the mouse cursor within the window.
40
+
41
+ Position is relative to the left/bottom point of the window.
42
+
43
+ :attr:`mouse_y` is a :class:`~kivy.properties.NumericProperty` and defaults to `-1`."""
44
+
45
+ mouse_pos = ReferenceListProperty(mouse_x, mouse_y)
46
+ """2d position of the mouse cursor within the window.
47
+
48
+ Position is relative to the left/bottom point of the window.
49
+
50
+ :attr:`mouse_pos` is an :class:`~kivy.properties.ReferenceListProperty` of
51
+ (:attr:`mouse_x`, :attr:`mouse_y`) properties."""
52
+
53
+ __events__ = [
54
+ "on_cursor_enter", "on_cursor_leave", "on_mouse_move"
55
+ ]
56
+
57
+ def __init__(self, **kwargs) -> None:
58
+ super(WindowAdapter, self).__init__(**kwargs)
59
+
60
+ self._focus:bool = False
61
+ self.fbind("mouse_pos", self._do_mouse_move)
62
+
63
+ def _get_focus(self) -> bool:
64
+ return self._focus
65
+
66
+ def _set_focus(self, value:bool) -> bool:
67
+ if self._focus != value:
68
+ self.dispatch(f"on_cursor_{"enter" if value else "leave"}")
69
+
70
+ self._focus = value
71
+
72
+ return True
73
+
74
+ focus = AliasProperty(_get_focus, _set_focus)
75
+ """Check whether or not the window currently has focus.
76
+
77
+ :attr:`focus` is a :class:`~kivy.properties.AliasProperty` and defaults to False."""
78
+
79
+ def _do_mouse_move(self, instance:object, mouse_pos:tuple[float, float]) -> None:
80
+ # TODO: Modifiers not properly implemented, for now is an empty list
81
+ self.dispatch("on_mouse_move", mouse_pos)
82
+ # self.dispatch("on_mouse_move", self.mouse_x, self.mouse_y, [])
83
+
84
+ def on_cursor_enter(self, *args) -> None:
85
+ """Event called when the cursor enters the window."""
86
+ pass
87
+
88
+ def on_cursor_leave(self, *args) -> None:
89
+ """Event called when the cursor leaves the window."""
90
+ pass
91
+
92
+ def on_mouse_move(self, mouse_pos:tuple[float, float]) -> None:
93
+ """Event called when the mouse is moved across the window."""
94
+ pass
95
+
96
+
97
+ #// GLOBAL VARIABLES
98
+ Window = WindowAdapter()
@@ -10,7 +10,7 @@ __all__ = (
10
10
  #//|>--------------------------------------------------------<|
11
11
  MAJOR: int = 0
12
12
  MINOR: int = 0
13
- MICRO: int = 3
13
+ MICRO: int = 6
14
14
  VERSION_STRING: str = f"{MAJOR}.{MINOR}.{MICRO}"
15
15
 
16
16
 
@@ -23,7 +23,7 @@ RELEASE: bool = False
23
23
  if not RELEASE:
24
24
  VERSION_STRING.join(f".dev{max(1, REVISION)}")
25
25
  elif REVISION:
26
- VERSION_STRING.join(f".{REVISION}")
26
+ VERSION_STRING.join(f".rev{REVISION}")
27
27
 
28
28
 
29
29
  #//| exec'd from setup.py ?
@@ -1,93 +1,93 @@
1
- Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
-
3
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
- This license is copied below, and is also available with a FAQ at:
5
- https://openfontlicense.org
6
-
7
-
8
- -----------------------------------------------------------
9
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
- -----------------------------------------------------------
11
-
12
- PREAMBLE
13
- The goals of the Open Font License (OFL) are to stimulate worldwide
14
- development of collaborative font projects, to support the font creation
15
- efforts of academic and linguistic communities, and to provide a free and
16
- open framework in which fonts may be shared and improved in partnership
17
- with others.
18
-
19
- The OFL allows the licensed fonts to be used, studied, modified and
20
- redistributed freely as long as they are not sold by themselves. The
21
- fonts, including any derivative works, can be bundled, embedded,
22
- redistributed and/or sold with any software provided that any reserved
23
- names are not used by derivative works. The fonts and derivatives,
24
- however, cannot be released under any other type of license. The
25
- requirement for fonts to remain under this license does not apply
26
- to any document created using the fonts or their derivatives.
27
-
28
- DEFINITIONS
29
- "Font Software" refers to the set of files released by the Copyright
30
- Holder(s) under this license and clearly marked as such. This may
31
- include source files, build scripts and documentation.
32
-
33
- "Reserved Font Name" refers to any names specified as such after the
34
- copyright statement(s).
35
-
36
- "Original Version" refers to the collection of Font Software components as
37
- distributed by the Copyright Holder(s).
38
-
39
- "Modified Version" refers to any derivative made by adding to, deleting,
40
- or substituting -- in part or in whole -- any of the components of the
41
- Original Version, by changing formats or by porting the Font Software to a
42
- new environment.
43
-
44
- "Author" refers to any designer, engineer, programmer, technical
45
- writer or other person who contributed to the Font Software.
46
-
47
- PERMISSION & CONDITIONS
48
- Permission is hereby granted, free of charge, to any person obtaining
49
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
- redistribute, and sell modified and unmodified copies of the Font
51
- Software, subject to the following conditions:
52
-
53
- 1) Neither the Font Software nor any of its individual components,
54
- in Original or Modified Versions, may be sold by itself.
55
-
56
- 2) Original or Modified Versions of the Font Software may be bundled,
57
- redistributed and/or sold with any software, provided that each copy
58
- contains the above copyright notice and this license. These can be
59
- included either as stand-alone text files, human-readable headers or
60
- in the appropriate machine-readable metadata fields within text or
61
- binary files as long as those fields can be easily viewed by the user.
62
-
63
- 3) No Modified Version of the Font Software may use the Reserved Font
64
- Name(s) unless explicit written permission is granted by the corresponding
65
- Copyright Holder. This restriction only applies to the primary font name as
66
- presented to the users.
67
-
68
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
- Software shall not be used to promote, endorse or advertise any
70
- Modified Version, except to acknowledge the contribution(s) of the
71
- Copyright Holder(s) and the Author(s) or with their explicit written
72
- permission.
73
-
74
- 5) The Font Software, modified or unmodified, in part or in whole,
75
- must be distributed entirely under this license, and must not be
76
- distributed under any other license. The requirement for fonts to
77
- remain under this license does not apply to any document created
78
- using the Font Software.
79
-
80
- TERMINATION
81
- This license becomes null and void if any of the above conditions are
82
- not met.
83
-
84
- DISCLAIMER
85
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
- OTHER DEALINGS IN THE FONT SOFTWARE.
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,74 @@
1
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
2
+ #//| Copyright (c) 30 Aug 2026. All rights are reserved by ASI
3
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
4
+
5
+ #// IMPORT
6
+ from kivy.app import App
7
+ from kivy.clock import Clock
8
+ from kivy.core.window import Window
9
+
10
+ from kivy.uix.boxlayout import BoxLayout
11
+ from kivy.uix.textinput import TextInput
12
+ from kivy.uix.scrollview import ScrollView
13
+
14
+ from uix.widgets.line_number import LineNumber
15
+
16
+ from kivy.properties import StringProperty, NumericProperty, ColorProperty, OptionProperty
17
+ from kivy.properties import ListProperty, VariableListProperty
18
+
19
+
20
+ #// GLOBAL VARIABLES
21
+
22
+
23
+ #// LOGIC
24
+ class Debug(App):
25
+ def __init__(self, **kwargs):
26
+ super().__init__(**kwargs)
27
+
28
+ self.layout_main = BoxLayout(orientation="horizontal")
29
+ self.scroll_view = ScrollView(scroll_type=["bars"], bar_width='11dp')
30
+
31
+ self.text_input = TextInput(size_hint=(None, None))
32
+ self.line_number = LineNumber(
33
+ self.text_input,
34
+ # width_min="42sp",
35
+ background_color=[0.3,0.3,0.3, 1.0], foreground_color=[1.0,1.0,1.0, 1.0]
36
+ )
37
+
38
+ def build(self):
39
+ self.scroll_view.add_widget(self.text_input)
40
+
41
+ self.layout_main.add_widget(self.line_number)
42
+ self.layout_main.add_widget(self.scroll_view)
43
+
44
+ self.text_input.bind(text=self._update_text_height)
45
+ Window.bind(size=self._update_size)
46
+
47
+ return self.layout_main
48
+
49
+ def on_start(self):
50
+ sturtup_text: str = ""
51
+
52
+ with open(__file__) as file:
53
+ sturtup_text = file.read()
54
+
55
+ Clock.schedule_once(lambda _:self._set_startup_text(sturtup_text), 3)
56
+
57
+ def _update_text_height(self, parent: TextInput, *_) -> None:
58
+ height = len(parent._lines_rects) * parent.line_height
59
+ height += parent.padding[1] + parent.padding[3]
60
+
61
+ parent.height = max(height, self.scroll_view.height)
62
+ parent.width = self.scroll_view.width
63
+
64
+ def _set_startup_text(self, text:str) -> None:
65
+ self.text_input.text = text
66
+
67
+ def _update_size(self, parent: Window, size: tuple[int, int]) -> None:
68
+ self.text_input.width = self.scroll_view.width = size[0] - self.line_number.width
69
+ self.scroll_view.height = size[1]
70
+
71
+
72
+ #// RUN
73
+ if __name__ == "__main__":
74
+ Debug().run()
@@ -0,0 +1,114 @@
1
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
2
+ #//| Copyright (c) 07 Jan 2026. All rights are reserved by ASI
3
+ #//|>-----------------------------------------------------------------------------------------------------------------<|
4
+
5
+ #// IMPORT
6
+ from kivy.uix.label import Label
7
+
8
+ from kivy.utils import escape_markup, get_hex_from_color
9
+ from kivy.properties import NumericProperty, StringProperty, ColorProperty, OptionProperty
10
+
11
+ from kivydk.core.mapping.icons import Icon
12
+ from kivydk.uix.behavior.hover import HoverBehavior
13
+ from kivydk.uix.behavior.click import ClickBehavior
14
+
15
+
16
+ #// LOGIC
17
+ class ButtonIcon(ClickBehavior, HoverBehavior, Label):
18
+ icon = StringProperty(Icon.CursorDefaultClickOutline)
19
+ """Icon of the button.
20
+
21
+ :attr:`icon` is a :class:`~kivy.properties.StringProperty` and defaults to
22
+ :data:`Icon.CursorDefaultClickOutline <kivydk.mapping.icons.Icon.CursorDefaultClickOutline>`."""
23
+
24
+ icon_hover = StringProperty(Icon.CursorDefaultClick, allownone=True)
25
+ """Icon of the button when hovered.
26
+
27
+ If None is provided the icon will not be changed when the cursor hover the button.
28
+
29
+ :attr:`icon_hover` is a :class:`~kivy.properties.StringProperty` and defaults to
30
+ :data:`Icon.CursorDefaultClick <kivydk.mapping.icons.Icon.CursorDefaultClick>`."""
31
+
32
+ icon_color = ColorProperty([.5, .5, .5, 1])
33
+ """Text color of the icon, in the RGBA format.
34
+
35
+ :attr:`icon_color` is a :class:`~kivy.properties.ColorProperty` and defaults to `[0.5, 0.5, 0.5, 1.0]`."""
36
+
37
+ icon_color_hover = ColorProperty([1, .5, .1, 1])
38
+ """Text color of the icon when hovered, in the RGBA format.
39
+
40
+ :attr:`icon_color` is a :class:`~kivy.properties.ColorProperty` and defaults to `[1.0, 0.5, 0.1, 1.0]`."""
41
+
42
+ icon_size = NumericProperty("24sp")
43
+ """Font size of the icon, in pixels.
44
+
45
+ :attr:`font_size` is a :class:`~kivy.properties.NumericProperty` and defaults to `24sp`."""
46
+
47
+ icon_position = OptionProperty("left", options=["left", "right"])
48
+ """Position of the icon relative to the text.
49
+
50
+ :attr:`icon_position` is an :class:`~kivy.properties.OptionProperty` and defaults to "left"."""
51
+
52
+ def __init__(self, **kwargs) -> None:
53
+ super().__init__(**kwargs)
54
+
55
+ # Some default values what are need it no mather what
56
+ self.markup = True
57
+
58
+ # Local variables
59
+ self.__text_changed_internally:bool = False
60
+ self.__icon_format:str = "[color={color}][size={size}][font=Icons]{icon}[/font][/size][/color]"
61
+ self.__cached_text:str = escape_markup(self.text)
62
+
63
+ self._update_text()
64
+
65
+ self.fbind("text", self._cache_text)
66
+
67
+ self.fbind("icon", self._update_text)
68
+ self.fbind("icon_hover", self._update_text)
69
+
70
+ self.fbind("icon_color", self._update_text)
71
+ self.fbind("icon_color_hover", self._update_text)
72
+
73
+ self.fbind("icon_size", self._update_text)
74
+ self.fbind("icon_position", self._update_text)
75
+
76
+ self.fbind("on_click", self._update_click)
77
+ self.fbind("on_hover", self._update_text)
78
+
79
+ def _update_text(self, *args) -> None:
80
+ formated_icon:str = self.__icon_format.format(
81
+ icon=self.icon_hover if (self.hovered and self.icon_hover is not None) else self.icon,
82
+ color=get_hex_from_color(self.icon_color_hover) if self.hovered else get_hex_from_color(self.icon_color),
83
+ size=int(self.icon_size)
84
+ )
85
+
86
+ if self.icon_position == "left":
87
+ self.__change_text(formated_icon, self.__cached_text)
88
+ else:
89
+ self.__change_text(self.__cached_text, formated_icon)
90
+
91
+ def _update_click(self, *args) -> None:
92
+ msg:str = "{cat} OR {dog} = {smile}&{heart}".format(
93
+ cat = self.__icon_format.format(icon=Icon.Cat, color="#FF9999", size=int(self.icon_size)),
94
+ dog = self.__icon_format.format(icon=Icon.Dog, color="#80380C", size=int(self.icon_size)),
95
+ heart = self.__icon_format.format(icon=Icon.Heart, color="#FF4C4C", size=int(self.icon_size)),
96
+ smile = self.__icon_format.format(icon=Icon.EmoticonExcited, color="#FFC77F", size=int(self.icon_size))
97
+ )
98
+
99
+ self.__change_text(msg)
100
+
101
+ def _cache_text(self, instance:object, new_text:str) -> None:
102
+ if self.__text_changed_internally:
103
+ self.__text_changed_internally = False
104
+
105
+ else:
106
+ self.__cached_text = escape_markup(new_text)
107
+ self._update_text()
108
+
109
+ def __change_text(self, *values) -> None:
110
+ """Internal function to change the text.
111
+
112
+ The main purpose is to not forget to flagg the change, otherwise the text will not render as expected."""
113
+ self.__text_changed_internally = True
114
+ self.text = "".join(values)