Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
d8d19e9a
Commit
d8d19e9a
authored
May 23, 2013
by
Dave Cooper
Browse files
updated drawing example with typeset-block
parent
5cc60a14
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
d8d19e9a
...
...
@@ -2,8 +2,10 @@
# Ignore any file named foo.txt.
*.fasl
*.xfasl
*.dx64fsl
bin
*~
#*#
.DS_Store
*.aux
...
...
base/source/genworks.lisp
View file @
d8d19e9a
...
...
@@ -327,8 +327,10 @@
#-
allegro
(
warn
"Find out how to retitle relevant windows in currently running lisp.~%"
)
#+
(
and
allegro
mswindows
)
(
defun
set-window-titles
()
;;a(excl:console-control :title "Genworks Gendl™ Console")
(
retitle-emacs
))
(
excl:console-control
:title
"Genworks Gendl™ Console"
)
;;(retitle-emacs)
)
#-
(
and
allegro
mswindows
)
(
defun
set-window-titles
())
...
...
documentation/training/g102/examples/source/drawing.lisp
View file @
d8d19e9a
...
...
@@ -5,6 +5,7 @@
:hidden-objects
((
robot-assembly
:type
'robot:assembly
)
(
text-block
:type
'robot-text-block
:margins
(
twice
(
twice
(
the
text-view
left-margin
)))
:width
(
the
text-view
width
)
:length
(
the
text-view
length
)
:robot-width
(
the
robot-assembly
height
)
...
...
@@ -12,11 +13,11 @@
:arm-angle-left
(
the
robot-assembly
arm-angle-left
)
:head-angle
(
the
robot-assembly
head-angle
)
:body-angle
(
the
robot-assembly
body-angle
)))
:objects
((
text-view
:type
'base-view
:left-margin
0
:front-margin
0
;;
:left-margin 0
;;
:front-margin 0
:border-box?
t
:objects
(
list
(
the
text-block
))
:length
(
half
(
the
length
))
...
...
@@ -83,25 +84,25 @@
))
(
define-object
robot-text-block
(
typeset-block
)
:input-slots
(
robot-width
robot-length
body-angle
arm-angle-left
head-angle
)
(
robot-width
robot-length
body-angle
arm-angle-left
head-angle
margins
)
:functions
((
content
()
(
tt:compile-text
(
:font
"Helvetica"
:font-size
12.0
)
(
tt:vspace
100
)
(
tt:paragraph
()
"Robot Data"
)
(
tt:table
(
:col-widths
(
list
220
(
-
(
the
width
)
220
)))
(
dolist
(
slot
(
list
:robot-width
:robot-length
:body-angle
:arm-angle-left
:head-angle
))
(
tt:row
()
(
tt:cell
(
:background-color
"#00FF00"
)
(
tt:put-string
(
format
nil
"~a"
(
string-capitalize
slot
))))
(
tt:cell
()
(
tt:paragraph
(
:h-align
:center
)
(
tt:put-string
(
format
nil
"~a"
(
the
(
evaluate
slot
)))))))))))))
(
let
((
width
(
-
(
the
width
)
(
the
margins
))))
(
tt:table
(
:col-widths
(
list
(
*
2/3
width
)
(
*
1/3
width
)))
(
dolist
(
slot
(
list
:robot-width
:robot-length
:body-angle
:arm-angle-left
:head-angle
))
(
tt:row
()
(
tt:cell
(
:background-color
"#00FF00"
)
(
tt:put-string
(
format
nil
"~a"
(
string-capitalize
slot
))))
(
tt:cell
()
(
tt:paragraph
(
:h-align
:center
)
(
tt:put-string
(
format
nil
"~a"
(
the
(
evaluate
slot
))))))))))))))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment