Table snip Library
_Table snip_ Library
====================
A MrEd snip for tabular data.
Data
====
No structs - just lists.
Exceptions
==========
No exceptions.
Functions
=========
No functions
Classes
=========
table-snip% : class?
superclass: snip%
An table-snip% is a snip that can display a table. When the table cannot be found, a default table is drawn.
(new table-snip%
(table '(("c"))) ;optional
(hmargin 1) ; spacing between content and border ;optional
(vmargin 1) ; ;optional
(grid-width 1) ; 1 for border , 0 for no border, >1 reserved for thicker grids ;optional
)
example: test/tests.ss
#lang scheme/gui
(require "../table-snip.ss")
;;;;;;;;;;;;;;;;
(define f (instantiate frame% ("example" #f 500 300) ))
(define c (new editor-canvas% [parent f]))
(define p (new pasteboard%))
(send c set-editor p)
(send f show #t)
(send p insert (new table-snip% (grid-width 0) (table '(("c")))) 10 80)
(send p insert (new table-snip% (grid-width 1) (table '(("c ")))) 10 100)
(send p insert (new table-snip% (grid-width 0) (table '(("c ")))) 10 120)
(send p insert (new table-snip% (grid-width 1) (table '(("c ")))) 10 140)
(send p insert (new table-snip% (grid-width 0) (table '(("c ")))) 10 160)
(send p insert (new table-snip%) 100 100)