1 Application
2 Autosave
3 Canvas
4 Color Model
5 Color Prefs
6 Color
7 Comment Box
8 Editor Snip
9 Editor
10 Exit
11 Finder
12 Frame
13 Group
14 GUI Utilities
15 Handler
16 Icon
17 Keymap
18 Menu
19 Mode
20 Number Snip
21 Panel
22 Pasteboard
23 Path Utils
24 Preferences
25 Preferences, Textual
26 Scheme
27 Text
28 Test
29 Version
Index
On this page:
canvas: basic<%>
canvas: basic-mixin
canvas: color<%>
canvas: color-mixin
canvas: delegate<%>
canvas: delegate-mixin
on-superwindow-show
canvas: info<%>
canvas: info-mixin
on-focus
set-editor
canvas: wide-snip<%>
recalc-snips
add-wide-snip
add-tall-snip
canvas: wide-snip-mixin
on-size
canvas: basic%
canvas: color%
canvas: info%
canvas: delegate%
canvas: wide-snip%
Version: 4.0.2

 

3 Canvas

canvas:basic<%> : interface?

  implements: 

editor-canvas%

canvas:basic-mixin : (class? . -> . class?)

  argument extends/implements: 

editor-canvas%

  result implements: 

canvas:basic<%>

canvas:color<%> : interface?

  implements: 

canvas:basic<%>

\index{background color} Mixins that implement this interface initialize the background color of the canvas to the value of the \index{’framework:basic-canvas-background} 'framework:basic-canvas-background preference. Adds a callback so that when that preference is modified, the background color changes.

canvas:color-mixin : (class? . -> . class?)

  argument extends/implements: 

canvas:basic<%>

  result implements: 

canvas:color<%>

canvas:delegate<%> : interface?

  implements: 

canvas:basic<%>

This class is part of the delegate window implementation.

canvas:delegate-mixin : (class? . -> . class?)

  argument extends/implements: 

canvas:basic<%>

  result implements: 

canvas:delegate<%>

Provides an implementation of canvas:delegate<%>.

(send a-canvas:delegate on-superwindow-show shown?)  void

  shown? : boolean

Overrides on-superwindow-show in window<%>.

Notifies the delegate window when the original window is visible. When invisible, the blue highlighting is erased.

canvas:info<%> : interface?

  implements: 

canvas:basic<%>

canvas:info-mixin : (class? . -> . class?)

  argument extends/implements: 

canvas:basic<%>

  result implements: 

canvas:info<%>

(send a-canvas:info on-focus)  void

Overrides on-focus in editor-canvas%.

sets the canvas that the frame displays info about.

(send a-canvas:info set-editor)  void

Overrides set-editor in editor-canvas%.

Calls update-info to update the frame’s info panel.

canvas:wide-snip<%> : interface?

  implements: 

canvas:basic<%>

Any canvas% that matches this interface will automatically resize selected snips when it’s size changes. Use add-tall-snip and add-wide-snip to specify which snips should be resized.

(send a-canvas:wide-snip recalc-snips)  void

Recalculates the sizes of the wide snips.

(send a-canvas:wide-snip add-wide-snip snip)  void

  snip : (instance snip%)

Snips passed to this method will be resized when the canvas’s size changes. Their width will be set so they take up all of the space from their lefts to the right edge of the canvas.

(send a-canvas:wide-snip add-tall-snip snip)  void

  snip : (instance snip%)

Snips passed to this method will be resized when the canvas’s size changes. Their height will be set so they take up all of the space from their tops to the bottom of the canvas.

canvas:wide-snip-mixin : (class? . -> . class?)

  argument extends/implements: 

canvas:basic<%>

  result implements: 

canvas:wide-snip<%>

This canvas maintains a list of wide and tall snips and adjusts their heights and widths when the canvas’s size changes.

The result of this mixin uses the same initialization arguments as the mixin’s argument.

(send a-canvas:wide-snip on-size

 

width

 

 

 

 

 

 

height)

 

 

void

  width : (integer-in 0 10000)

  height : (integer-in 0 10000)

Overrides on-size in editor-canvas%.

Adjusts the sizes of the marked snips.

See add-wide-snip and add-tall-snip.

canvas:basic% : class?

  superclass: (canvas:basic-mixin editor-canvas%)

canvas:color% : class?

  superclass: (canvas:color-mixin canvas:basic%)

canvas:info% : class?

  superclass: (canvas:info-mixin canvas:basic%)

canvas:delegate% : class?

  superclass: (canvas:delegate-mixin canvas:basic%)

canvas:wide-snip% : class?

  superclass: (canvas:wide-snip-mixin canvas:basic%)