2.1 aligned-editor-canvas%
Superclass: editor-canvas%
Calls the
realign method when resized.
(->newaligned-editor-canvas% (parent_) [(editor_)] [(style_)] [(scrolls-per-page_)] [(label_)] [(wheel-step_)] [(line-count_)] [(horizontal-inset_)] [(vertical-inset_)] [(enabled_)] [(vert-margin_)] [(horiz-margin_)] [(min-width_)] [(min-height_)] [(stretchable-width_)] [(stretchable-height_)])aligned-editor-canvas%object
parent:frame%,dialog%,panel%, orpane%object
editor=#f:text%orpasteboard%object or#f
style=null: list of symbols in'(no-border control-border combo no-hscroll no-vscroll hide-hscroll hide-vscroll auto-vscroll auto-hscroll resize-corner deleted transparent)
scrolls-per-page=100: exact integer in [1, 10000]
label=#f: string (up to 200 characters) or#f
wheel-step=3: exact integer in [1, 10000] or#f
line-count=#f: exact integer in [1, 1000] or#f
horizontal-inset=5: exact integer in [0, 1000]
vertical-inset=5: exact integer in [0, 1000]
enabled=#t: boolean
vert-margin=0: exact integer in [0, 1000]
horiz-margin=0: exact integer in [0, 1000]
min-width=graphical minimum width: exact integer in [0, 10000]
min-height=graphical minimum width: exact integer in [0, 10000]
stretchable-width=#t: boolean
stretchable-height=#t: booleanIf a canvas is initialized with
#fforeditor, install an editor later withset-editor.The
stylelist can contain the following flags:'no-border-- omits a border around the canvas'control-border-- gives the canvas a border that is like atext-field%control'combo-- gives the canvas a combo button that is like acombo-field%control; this style is intended for use with'control-border,'hide-hscroll, and'hide-vscroll'no-hscroll-- disallows horizontal scrolling and hides the horizontal scrollbar'no-vscroll-- disallows vertical scrolling and hides the vertical scrollbar'hide-hscroll-- allows horizontal scrolling, but hides the horizontal scrollbar'hide-vscroll-- allows vertical scrolling, but hides the vertical scrollbar'auto-hscroll-- automatically hides the horizontal scrollbar when unneeded (unless'no-hscrollor'hide-hscrollis specified)'auto-vscroll-- automatically hides the vertical scrollbar when unneeded (unless'no-vscrollor'hide-vscrollis specified)'resize-corner-- leaves room for a resize control at the canvas's bottom right when only one scrollbar is visible'deleted-- creates the canvas as initially hidden and without affectingparent's geometry; the canvas can be made active later by callingparent'sadd-childmethod'transparent-- the canvas is ``erased'' before an update using it's parent window's background
While vertical scrolling of text editors is based on lines, horizontal scrolling and pasteboard vertical scrolling is based on a fixed number of steps per horizontal page. The
scrolls-per-pageargument sets this value.If provided, the
wheel-stepargument is passed on to thewheel-stepmethod. The default wheel step can be overridden globally though the'|MrEd:wheelStep|preference; see Preferencesmredprefs.If
line-countis not#f, it is passed on to theset-line-countmethod.If
horizontal-insetis not5, it is passed on to thehorizontal-insetmethod. Similarly, ifvertical-insetis not5, it is passed on to thevertical-insetmethod.For information about the
enabledargument, seewindow<%>. For information about thehoriz-marginandvert-marginarguments, seesubarea<%>. For information about themin-width,min-height,stretchable-width, andstretchable-heightarguments, seearea<%>.
All Methods
accept-drop-files from window<%>
allow-scroll-to-last from editor-canvas%
allow-tab-exit from editor-canvas%
call-as-primary-owner from editor-canvas%
client->screen from window<%>
enable from window<%>
focus from window<%>
force-display-focus from editor-canvas%
get-canvas-background from canvas<%>
get-client-size from window<%>
get-cursor from window<%>
get-dc from canvas<%>
get-editor from editor-canvas%
get-graphical-min-size from area<%>
get-handle from window<%>
get-height from window<%>
get-label from window<%>
get-line-count from editor-canvas%
get-parent from area<%>
get-plain-label from window<%>
get-size from window<%>
get-top-level-window from area<%>
get-width from window<%>
get-x from window<%>
get-y from window<%>
has-focus? from window<%>
horiz-margin from subarea<%>
horizontal-inset from editor-canvas%
is-enabled? from window<%>
is-shown? from window<%>
lazy-refresh from editor-canvas%
min-client-height from canvas<%>
min-client-width from canvas<%>
min-height from area<%>
min-width from area<%>
on-char from editor-canvas%
overrides on-char from canvas<%>
on-drop-file from window<%>
on-event from editor-canvas%
overrides on-event from canvas<%>
on-focus from editor-canvas%
overrides on-focus from window<%>
on-move from window<%>
on-paint from editor-canvas%
overrides on-paint from canvas<%>
on-size from editor-canvas%
overrides on-size from window<%>
on-subwindow-char from window<%>
on-subwindow-event from window<%>
on-superwindow-enable from window<%>
on-superwindow-show from window<%>
on-tab-in from canvas<%>
popup-menu from window<%>
refresh from window<%>
screen->client from window<%>
scroll-to from editor-canvas%
scroll-with-bottom-base from editor-canvas%
set-canvas-background from canvas<%>
set-cursor from window<%>
set-editor from editor-canvas%
set-label from window<%>
set-line-count from editor-canvas%
set-resize-corner from canvas<%>
show from window<%>
stretchable-height from area<%>
stretchable-width from area<%>
vert-margin from subarea<%>
vertical-inset from editor-canvas%
warp-pointer from canvas<%>
wheel-step from editor-canvas%