Peter Ward avatar Peter Ward committed b442986

split out the layout engine parts

Comments (0)

Files changed (4)

docs/handlers.rst

+Handlers
+~~~~~~~~
+Handlers must be an object which specifies a ``layout`` method which takes a
+theme object, which must have a ``templates`` attribute. If none of the required
+templates are given in the ``templates`` attribute, then the handler should
+raise a ``NotImplemented`` exception. Handlers may warn if some templates that
+the handler can use are not given. Handlers should specify what templates can be
+used as a list of strings in ``Handler.templates``. If the handler cannot render
+for any reason, it should raise a ``Handler.CannotRender`` exception.
+
+.. automodule:: shinypress.handler
+    :members:
+
 
 This section describes the interaction between handlers and themes.
 
+.. toctree::
+
+    primitives
+    handlers
+    themes
+
 Usage
 ~~~~~
 
         for template, blocks in slide_layouts:
             theme.render(ctx, template, blocks)
             surf.show_page()
-
-Primitives
-~~~~~~~~~~
-
-.. module:: shinypress.render
-
-Got an image? Let’s render that for you:
-
-.. autofunction:: render_image
-
-Oh, you have some text instead? Well, let’s do that, then:
-
-.. autofunction:: render_text
-.. autoclass:: HAlignment
-.. autoclass:: VAlignment
-
-And there’s also a utility function useful for scaling content, used by those functions above.
-
-.. autofunction:: scale
-.. autoclass:: ScalingMode
-
-Handlers
-~~~~~~~~
-Handlers must be an object which specifies a ``layout`` method which takes a
-theme object, which must have a ``templates`` attribute. If none of the required
-templates are given in the ``templates`` attribute, then the handler should
-raise a ``NotImplemented`` exception. Handlers may warn if some templates that
-the handler can use are not given. Handlers should specify what templates can be
-used as a list of strings in ``Handler.templates``. If the handler cannot render
-for any reason, it should raise a ``Handler.CannotRender`` exception.
-
-.. automodule:: shinypress.handler
-    :members:
-
-Themes
-~~~~~~
-
-Themes are responsible for deciding where the handlers should draw their blocks.
-
-.. automodule:: shinypress.theme
-    :members:
-

docs/primitives.rst

+Primitives
+~~~~~~~~~~
+
+.. module:: shinypress.render
+
+Got an image? Let’s render that for you:
+
+.. autofunction:: render_image
+
+Oh, you have some text instead? Well, let’s do that, then:
+
+.. autofunction:: render_text
+.. autoclass:: HAlignment
+.. autoclass:: VAlignment
+
+And there’s also a utility function useful for scaling content, used by those functions above.
+
+.. autofunction:: scale
+.. autoclass:: ScalingMode
+
+Themes
+~~~~~~
+
+Themes are responsible for deciding where the handlers should draw their blocks.
+
+.. automodule:: shinypress.theme
+    :members:
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.