2222
2323@defproc[(slide [#:title title (or/c #f string? pict?) #f ]
2424 [#:name name (or/c #f string?) title]
25+ [#:aspect aspect aspect? #f ]
2526 [#:layout layout (or/c 'auto 'center 'top 'tall ) 'auto ]
2627 [#:gap-size sep-gap-size real? (current-gap-size)]
2728 [#:inset inset slide-inset? (make-slide-inset 0 0 0 0 )]
@@ -69,7 +70,9 @@ after @racket[secs] seconds, and manual advancing skips this slide.
6970
7071If @racket[condense?] is true, then in condense mode (as specified by
7172the @Flag{c} command-line flag), the slide is not created and
72- registered.}
73+ registered.
74+
75+ @history[#:changed "1.5 " @elem{Added the @racket[#:aspect ] argument.}]}
7376
7477
7578@defproc[(t [str string?]) pict?]{
@@ -106,7 +109,8 @@ The normal way to make serif text. Returns @racket[(text str 'roman
106109
107110Creates title text. Returns @racket[((current-titlet) str)].}
108111
109- @defproc[(para [#:width width real? (current-para-width)]
112+ @defproc[(para [#:aspect aspect aspect? #f ]
113+ [#:width width real? ((get-current-para-width #:aspect aspect))]
110114 [#:align align (or/c 'left 'center 'right ) 'left ]
111115 [#:fill? fill? any/c #t ]
112116 [#:decode? decode? any/c #t ]
@@ -144,10 +148,13 @@ The @racket[align] argument specifies how to align lines within the
144148paragraph.
145149
146150See the spacing between lines is determined by the
147- @racket[current-line-sep] parameter.}
151+ @racket[current-line-sep] parameter.
152+
153+ @history[#:changed "1.5 " @elem{Added the @racket[#:aspect ] argument.}]}
148154
149155
150- @defproc[(item [#:width width real? (current-para-width)]
156+ @defproc[(item [#:aspect aspect aspect? #f ]
157+ [#:width width real? ((get-current-para-width #:aspect aspect))]
151158 [#:gap-size sep-gap-size real? (current-gap-size)]
152159 [#:bullet blt pict? (scale bullet (/ sep-gap-size gap-size))]
153160 [#:align align (or/c 'left 'center 'right ) 'left ]
@@ -161,10 +168,13 @@ Like @racket[para], but with @racket[blt] followed by @racket[(/
161168sep-gap-size 2 )] space appended horizontally to the resulting paragraph,
162169aligned with the top line. The paragraph width of @racket[blt] plus
163170@racket[(/ sep-gap-size 2 )] is subtracted from the maximum width of the
164- paragraph.}
171+ paragraph.
165172
173+ @history[#:changed "1.5 " @elem{Added the @racket[#:aspect ] argument.}]}
166174
167- @defproc[(subitem [#:width width real? (current-para-width)]
175+
176+ @defproc[(subitem [#:aspect aspect aspect? #f ]
177+ [#:width width real? ((get-current-para-width #:aspect aspect))]
168178 [#:gap-size sep-gap-size real? (current-gap-size)]
169179 [#:bullet blt pict? (scale o-bullet (/ sep-gap-size gap-size))]
170180 [#:align align (or/c 'left 'center 'right ) 'left ]
@@ -177,7 +187,9 @@ paragraph.}
177187Like @racket[item], but an additional @racket[(* 2 sep-gap-size)] is
178188subtracted from the paragraph width and added as space to the left of
179189the pict. Also, @racket[o-bullet] is the default bullet, instead of
180- @racket[bullet].}
190+ @racket[bullet].
191+
192+ @history[#:changed "1.5 " @elem{Added the @racket[#:aspect ] argument.}]}
181193
182194
183195@defproc[(clickback [pict pict?] [thunk (-> any )])
@@ -199,12 +211,17 @@ must be a procedure that is called when the window is removed (because
199211the slide changes, for example).}
200212
201213
202- @defproc[(size-in-pixels [pict pict?]) pict?]{
214+ @defproc[(size-in-pixels [pict pict?]
215+ [#:aspect aspect aspect? #f ])
216+ pict?]{
203217
204218Scales @racket[pict] so that it is displayed on the screen as
205219@racket[(pict-width pict)] pixels wide and @racket[(pict-height pict)]
206220pixels tall. The result is @racket[pict] when using a 1024 by 768
207- display.}
221+ display with a fullscreen aspect or when using a 1360 by 766
222+ display with a widescreen aspect.
223+
224+ @history[#:changed "1.5 " @elem{Added the @racket[#:aspect ] argument.}]}
208225
209226
210227@defproc[(pict->pre-render-pict [pict pict?]) pict?]{
@@ -220,7 +237,8 @@ to reduce drawing times for for large bitmaps or complex drawings.
220237 [title (or/c string? pict?)]
221238 [subitems (or/c #f null?
222239 (symbol? . -> . pict?))]
223- ... )
240+ ...
241+ [#:aspect aspect aspect? #f ])
224242 (symbol? . -> . void?)]{
225243
226244Returns a function that takes a symbol and generates an outline
@@ -245,7 +263,9 @@ trio of arguments defines a section for the outline:
245263 should be a function that takes a symbol (the same one passed
246264 to the outline maker) and produces a pict.}
247265
248- ]}
266+ ]
267+
268+ @history[#:changed "1.5 " @elem{Added the @racket[#:aspect ] argument.}]}
249269
250270@defproc[(comment [text (or/c string? pict?)] ... )
251271 comment?]{
@@ -364,6 +384,20 @@ this function with @racket[#t] enables new slides to start a new slideshow.
364384
365385@section{Constants and Layout Variables}
366386
387+ @defproc[(aspect? [v any/c]) boolean?]{
388+
389+ Return @racket[#t ] if @racket[v] is @racket['fullscreen ],
390+ @racket['widescreen ], or @racket[#f ], otherwise returns @racket[#f ].
391+
392+ A symbolic @racket[v] selects a specific aspect, while @racket[#f ] as
393+ an aspect corresponds to a user-selected aspect through the
394+ @DFlag{widescreen} or @DFlag{fullscreen} flag.
395+
396+ See also @seclink["aspect " ].
397+
398+ @history[#:added "1.5 " ]}
399+
400+
367401@defthing[gap-size 24 ]{
368402
369403A width commonly used for layout.}
@@ -399,32 +433,56 @@ It's implementation is:
399433 (blank 0 gap-size)))]
400434}
401435
436+ @deftogether[(
437+ @defidform[client-w]
438+ @defproc[(get-client-w [#:aspect aspect aspect? #f ]) exact-nonnegative-integer?]
439+ )]{
402440
403- @defidform[client-w]{
441+ Produces the width of the display area, minus @racket[margin]s for a
442+ given @racket[aspect], where @racket[client-w] is equivalent to
443+ @racket[(get-client-w)]. The result changes if the margin is adjusted
444+ via @racket[set-margin!].
404445
405- Produces the width of the display area, minus @racket[margin]s. The
406- result of the form changes if the margin is adjusted via
407- @racket[set-margin!].}
446+ @history[#:changed "1.5 " @elem{Added @racket[get-client-w].}]}
408447
409448
410- @defidform[client-h]{
449+ @deftogether[(
450+ @defidform[client-h]
451+ @defproc[(get-client-h [#:aspect aspect aspect? #f ]) exact-nonnegative-integer?]
452+ )]{
411453
412- Produces the height of the display area, minus @racket[margin]s, but
413- including the title area). The result of the form changes if the
414- margin is adjusted via @racket[set-margin!].}
454+ Produces the height of the display area, minus @racket[margin]s for a
455+ given @racket[aspect], where @racket[client-h] is equivalent to
456+ @racket[(get-client-h)]. The result changes if the margin is adjusted
457+ via @racket[set-margin!].
415458
459+ @history[#:changed "1.5 " @elem{Added @racket[get-client-h].}]}
416460
417- @defidform[full-page]{
461+
462+ @deftogether[(
463+ @defidform[full-page]
464+ @defproc[(get-full-page [#:aspect aspect aspect? #f ]) pict?]
465+ )]{
418466
419467Produces an empty pict that is the same size as the client area, which
420- is like @racket[(blank client-w client-h)].}
468+ is like @racket[(blank client-w client-h)]. The @racket[full-page]
469+ form is equivalent to @racket[(get-full-page)].
470+
471+ @history[#:changed "1.5 " @elem{Added @racket[get-full-page].}]}
421472
422473
423- @defidform[titleless-page]{
474+ @deftogether[(
475+ @defidform[titleless-page]
476+ @defproc[(get-titleless-page [#:aspect aspect aspect? #f ]) pict?]
477+ )]{
424478
425479Produces an empty pict that is the same size as the client area minus
426480the title area in @racket['top ] layout mode, which is like
427- @racket[(blank client-w (- client-h title-h (* 2 gap-size)))].}
481+ @racket[(blank client-w (- client-h title-h (* 2 gap-size)))]. The
482+ @racket[titleless-page] form is equivalent to
483+ @racket[(get-titleless-page)].
484+
485+ @history[#:changed "1.5 " @elem{Added @racket[get-titleless-page].}]}
428486
429487
430488@defidform[margin]{
@@ -485,10 +543,18 @@ Parameter that controls the amount of space used between lines by
485543@racket[para], @racket[item], and @racket[subitem].}
486544
487545
488- @defparam[current-para-width n exact-nonnegative-integer?]{
546+ @deftogether[(
547+ @defparam[current-para-width n exact-nonnegative-integer?]
548+ @defproc[(get-current-para-width (#:aspect aspect aspect? #f ))
549+ (parameter/c exact-nonnegative-integer?)]
550+ )]{
489551
490552Parameter that controls the width of a pict created by
491- @racket[para], @racket[item], and @racket[subitem].}
553+ @racket[para], @racket[item], and @racket[subitem]. The value
554+ of @racket[current-para-width] is the same as
555+ @racket[(get-current-para-width)].
556+
557+ @history[#:changed "1.5 " @elem{Added @racket[get-current-para-width].}]}
492558
493559
494560@defparam[current-title-color color (or/c string? (is-a?/c color%))]{
0 commit comments