Browse Source

docs

master
Odilitime 2 years ago
parent
commit
4718a0620d
2 changed files with 64 additions and 0 deletions
  1. 10
    0
      doc/framework.txt
  2. 54
    0
      doc/ntrml.txt

+ 10
- 0
doc/framework.txt View File

@@ -0,0 +1,10 @@
The Netrunner framework can be used to build cross-platform applications besides a browser. The framework provides:
- renders (glfw/opengl, framebuffer, textual)
- UI widgets
- parsers (images, markup, scripting)
- networking protocols (http, https, etc)

The app class loads an interface defined in NTRML, our UI mark-up language that defines an interface.

An app is a collection of windows. Each window has a collection of UI components and a set of callbacks. Browser extends the app class to configure the app class into a web browser.


+ 54
- 0
doc/ntrml.txt View File

@@ -0,0 +1,54 @@
The NTRML (NeTRunner Markup Language) is a way to define a User Interface built with the NeTRunner framework. NTRML mimics HTML to provide some familiarity to those already familiar with HTML.

Colors are defined with an 8 hexadecimal digits. First 2 are Red, next 2 are Green, next 2 are Blue and the final 2 are Alpha. An Red of FF is bright red. An alpha of FF is opaque.

If a tag is marked positional below, then it supports the following attributes:

You only can use 2 of the following 3 to position and size your component:
height (optional) - height in pixels or percentage
top (optional) - top in pixels or percentage
bottom (optional) - bottom in pixels or percentage

You only can use 2 of the following 3 to position and size your component:
width (optional) - width in pixels or percentage
left (optional) - left in pixels or percentage
right (optional) - right in pixels or percentage

TAGS

body - wraps around everything to provide some default values
body.color - set default text color
body.bgcolor - set default background color

layer - we draw back to front. This gives you a way to order your controls.

img - renders an image
img.name - label for debugging
img.src - filename to load (currently only pnm/pam supported)
img is positional

tabSelector - where to place the tab selector
tabSelector.color - set text color
tabSelector.hover - set hover color
tabSelector is positional

box - renders a box shape
box.color - shape color
box.hover - hover color
box.onclick - functionality if clicked
box is positional

input - an input box control
input.color - text color
input.bgcolor - background color
input.onclick - functionality if clicked
input.fontSize - font size in pixels
input is positional

font - renders text
font.src - font to use (ttf supported)
font.family - will eventually support web-safe fonts
font.size - text size in pixels
font.color - set default text color
font.bgcolor - set default background color
font is positional

Loading…
Cancel
Save