Merge branch 'master' of git://factorcode.org/git/factor

db4
John Benediktsson 2008-12-22 17:36:41 -08:00
commit 3ecd9e49b7
18 changed files with 168 additions and 28 deletions

View File

@ -0,0 +1,48 @@
USING: kernel multiline parser sequences splitting help.markup ;
IN: easy-help
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: Description:
".." parse-multiline-string
string-lines
1 tail
[ dup " " head? [ 4 tail ] [ ] if ] map
[ dup "" = [ drop { $nl } ] [ ] if ] map
\ $description prefix
parsed
; parsing
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: Example:
{ $heading "Example" } parsed
".." parse-multiline-string
string-lines
[ dup " " head? [ 4 tail ] [ ] if ] map
[ "" = not ] filter
! \ $example prefix
\ $code prefix
parsed
; parsing
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: Summary:
".." parse-multiline-string
string-lines
1 tail
[ dup " " head? [ 4 tail ] [ ] if ] map
[ dup "" = [ drop { $nl } ] [ ] if ] map
{ $heading "Summary" } prefix
parsed
; parsing

View File

@ -1,19 +1,39 @@
USING: io io.encodings.ascii io.files io.files.temp io.launcher USING: io io.encodings.ascii io.files io.files.temp io.launcher
locals math.parser sequences sequences.deep ; locals math.parser sequences sequences.deep
help.syntax
easy-help ;
IN: size-of IN: size-of
! Use 'size-of' to find out the size in bytes of a C type. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! The 'headers' argument is a list of header files to use. You may DEFER: size-of
! pass 'f' to only use 'stdio.h'.
! HELP: size-of
! Examples:
! Description:
! f "int" size-of .
! Use 'size-of' to find out the size in bytes of a C type.
! { "X11/Xlib.h" } "XAnyEvent" size-of .
The 'headers' argument is a list of header files to use. You may
pass 'f' to only use 'stdio.h'. ..
Example:
! Find the size of 'int'
f "int" size-of . ..
Example:
! Find the size of the 'XAnyEvent' struct from Xlib.h
{ "X11/Xlib.h" } "XAnyEvent" size-of . ..
;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
:: size-of ( HEADERS TYPE -- n ) :: size-of ( HEADERS TYPE -- n )

View File

@ -1,25 +1,38 @@
USING: kernel quotations arrays sequences math math.ranges fry USING: kernel quotations arrays sequences math math.ranges fry
opengl opengl.gl ui.render ui.gadgets.cartesian processing.shapes opengl opengl.gl ui.render ui.gadgets.cartesian processing.shapes
accessors ; accessors
help.syntax
easy-help ;
IN: ui.gadgets.plot IN: ui.gadgets.plot
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Examples: ARTICLE: "ui.gadgets.plot" "Plot Gadget"
!
! <plot> [ sin ] add-function gadget. Summary:
!
! <plot> A simple gadget for ploting two dimentional functions.
! [ sin ] red function boa add-function
! [ cos ] blue function boa add-function Use the arrow keys to move around.
! gadget.
! Use 'a' and 'z' keys to zoom in and out. ..
!
! Use the arrow keys to move around. Example:
!
! Use 'a' and 'z' keys to zoom in and out. <plot> [ sin ] add-function gadget. ..
Example:
<plot>
[ sin ] red function boa add-function
[ cos ] blue function boa add-function
gadget. ..
;
ABOUT: "ui.gadgets.plot"
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -1,8 +1,35 @@
USING: kernel namespaces opengl ui.render ui.gadgets accessors ; USING: kernel namespaces opengl ui.render ui.gadgets accessors
help.syntax
easy-help ;
IN: ui.gadgets.slate IN: ui.gadgets.slate
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ARTICLE: "slate" "Slate Gadget"
Summary:
A gadget with an 'action' slot which should be set to a callable. ..
Example:
! Load the right vocabs for the examples
USING: processing.shapes ui.gadgets.slate ; ..
Example:
[ { { 10 10 } { 50 30 } { 10 50 } } polygon fill-mode ] <slate>
gadget. ..
;
ABOUT: "slate"
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
TUPLE: slate < gadget action pdim graft ungraft ; TUPLE: slate < gadget action pdim graft ungraft ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -1,10 +1,42 @@
USING: kernel sequences math math.order USING: kernel sequences math math.order
ui.gadgets ui.gadgets.tracks ui.gestures ui.gadgets ui.gadgets.tracks ui.gestures accessors fry
bake.fry accessors ; help.syntax
easy-help ;
IN: ui.gadgets.tiling IN: ui.gadgets.tiling
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ARTICLE: "ui.gadgets.tiling" "Tiling Layout Gadgets"
Summary:
A gadget which tiles it's children.
A tiling gadget may contain any number of children, but only a
fixed number is displayed at one time. How many are displayed can
be controlled via Control-[ and Control-].
The focus may be switched with Alt-Left and Alt-Right.
The focused child may be moved via Shift-Alt-Left and
Shift-Alt-Right. ..
Example:
<tiling-shelf>
"resource:" directory-files
[ [ drop ] <bevel-button> tiling-add ]
each
"Files" open-window ..
;
ABOUT: "ui.gadgets.tiling"
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
TUPLE: tiling < track gadgets tiles first focused ; TUPLE: tiling < track gadgets tiles first focused ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!