Skip to content

Commit

Permalink
Restructure context documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
einarf committed Nov 29, 2024
1 parent 2e71480 commit fc6be94
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 760 deletions.
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ def __getattr__(cls: Any, name: Any) -> MagicMock:
"pywavefront",
"pywavefront.obj",
"trimesh",
"pygame",
"pygame._sdl2",
"pygame.display",
"pygame.event",
"pyopengltk",
"pyopengltk.OpenGLFrame",
]

sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
Expand Down
74 changes: 74 additions & 0 deletions docs/reference/context/backends.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

.. py:module:: moderngl_window
.. py:currentmodule:: moderngl_window
Window Backends
===============

pyglet
------

.. autoclass:: moderngl_window.context.pyglet.window.Window
:members:
:inherited-members:
:show-inheritance:

glfw
----

.. autoclass:: moderngl_window.context.glfw.window.Window
:members:
:inherited-members:
:show-inheritance:

sdl2
----

.. autoclass:: moderngl_window.context.sdl2.window.Window
:members:
:inherited-members:
:show-inheritance:


pygame
------

.. autoclass:: moderngl_window.context.pygame2.window.Window
:members:
:inherited-members:
:show-inheritance:


Pyside2
-------

.. autoclass:: moderngl_window.context.pyside2.window.Window
:members:
:inherited-members:
:show-inheritance:


PyQt5
-----

.. autoclass:: moderngl_window.context.pyqt5.window.Window
:members:
:inherited-members:
:show-inheritance:

tkinter
-------

.. autoclass:: moderngl_window.context.tk.window.Window
:members:
:inherited-members:
:show-inheritance:

headless
--------

.. autoclass:: moderngl_window.context.headless.window.Window
:members:
:inherited-members:
:show-inheritance:
15 changes: 15 additions & 0 deletions docs/reference/context/base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

.. py:module:: moderngl_window.context.base.window
.. py:currentmodule:: moderngl_window.context.base.window
.. autoclass:: WindowConfig
:members:
:inherited-members:
:show-inheritance:


.. autoclass:: BaseWindow
:members:
:inherited-members:
:show-inheritance:
84 changes: 0 additions & 84 deletions docs/reference/context/basewindow.rst

This file was deleted.

98 changes: 0 additions & 98 deletions docs/reference/context/glfw.window.rst

This file was deleted.

84 changes: 0 additions & 84 deletions docs/reference/context/headless.window.rst

This file was deleted.

10 changes: 2 additions & 8 deletions docs/reference/context/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,5 @@ moderngl_window.context
.. toctree::
:maxdepth: 2

windowconfig
basewindow
glfw.window
headless.window
pyglet.window
pyqt5.window
pyside2.window
sdl2.window
base
backends
Loading

0 comments on commit fc6be94

Please sign in to comment.