parent
3b09f9c356
commit
663ddab7a7
|
|
@ -12,9 +12,9 @@
|
|||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('../../..'))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
|
@ -69,7 +69,7 @@ language = None
|
|||
exclude_patterns = []
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = None
|
||||
pygments_style = 'colorful'
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -6,11 +6,32 @@
|
|||
Welcome to Joy VUI's documentation!
|
||||
===================================
|
||||
|
||||
.. image:: _static/Joy-VUI-screenshot.PNG
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
|
||||
.. automodule:: joy.vui.core
|
||||
:members:
|
||||
|
||||
|
||||
.. automodule:: joy.vui.display
|
||||
:members:
|
||||
|
||||
|
||||
.. automodule:: joy.vui.viewer
|
||||
:members:
|
||||
|
||||
|
||||
.. automodule:: joy.vui.text_viewer
|
||||
:members:
|
||||
|
||||
|
||||
.. automodule:: joy.vui.stack_viewer
|
||||
:members:
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
|
|
|||
|
|
@ -17,6 +17,14 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Thun. If not see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
'''
|
||||
|
||||
Core
|
||||
=====================
|
||||
|
||||
|
||||
A Module docstring yo.
|
||||
'''
|
||||
from sys import stderr
|
||||
from traceback import format_exc
|
||||
import pygame
|
||||
|
|
@ -39,8 +47,9 @@ MOUSE_EVENTS = frozenset({
|
|||
pygame.MOUSEBUTTONDOWN,
|
||||
pygame.MOUSEBUTTONUP
|
||||
})
|
||||
# AM I DOCSY?
|
||||
|
||||
|
||||
# What about *moi?*
|
||||
ARROW_KEYS = frozenset({
|
||||
pygame.K_UP,
|
||||
pygame.K_DOWN,
|
||||
|
|
@ -68,6 +77,7 @@ SUCCESS = 1
|
|||
|
||||
|
||||
class Message(object):
|
||||
'''Message class.'''
|
||||
|
||||
def __init__(self, sender):
|
||||
self.sender = sender
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@
|
|||
# along with Thun. If not see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
'''
|
||||
|
||||
Display
|
||||
=================
|
||||
|
||||
This module implements a simple visual display system modeled on Oberon.
|
||||
|
||||
Refer to Chapter 4 of the Project Oberon book for more information.
|
||||
|
|
@ -355,7 +359,7 @@ class Track(Viewer):
|
|||
return self, y
|
||||
|
||||
def open_viewer(self, y, class_):
|
||||
'''Open and return a viewer of class_ at y.'''
|
||||
'''Open and return a viewer of class at y.'''
|
||||
# Todo: if y coincides with some other viewer's y replace it.
|
||||
viewer, viewer_y = self.viewer_at(y)
|
||||
h = viewer.split(viewer_y)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Thun. If not see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
'''
|
||||
|
||||
Stack Viewer
|
||||
=================
|
||||
|
||||
'''
|
||||
from joy.utils.stack import expression_to_string, iter_stack
|
||||
from joy.vui import core, text_viewer
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Thun. If not see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
'''
|
||||
|
||||
Text Viewer
|
||||
=================
|
||||
|
||||
'''
|
||||
import string
|
||||
import pygame
|
||||
from joy.utils.stack import expression_to_string
|
||||
|
|
|
|||
|
|
@ -17,11 +17,20 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with joy.py. If not see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
'''
|
||||
|
||||
Viewer
|
||||
=================
|
||||
|
||||
'''
|
||||
import pygame
|
||||
from joy.vui.core import BACKGROUND, FOREGROUND
|
||||
|
||||
|
||||
class Viewer(object):
|
||||
'''
|
||||
Base Viewer class
|
||||
'''
|
||||
|
||||
MINIMUM_HEIGHT = 11
|
||||
|
||||
|
|
@ -97,6 +106,10 @@ class Viewer(object):
|
|||
|
||||
class MenuViewer(Viewer):
|
||||
|
||||
'''
|
||||
MenuViewer class
|
||||
'''
|
||||
|
||||
MINIMUM_HEIGHT = 26
|
||||
|
||||
def __init__(self, surface):
|
||||
|
|
|
|||
Loading…
Reference in New Issue