On this page:
frame: basic<%>
get-area-container%
get-area-container
get-menu-bar%
make-root-area-container
close
editing-this-file?
get-filename
make-visible
frame: basic-mixin
show
can-exit?
on-exit
on-superwindow-show
on-drop-file
after-new-child
frame: size-pref<%>
frame: size-pref-mixin
on-size
frame: register-group<%>
frame: register-group-mixin
can-close?
on-close
on-activate
frame: status-line<%>
open-status-line
close-status-line
update-status-line
frame: status-line-mixin
make-root-area-container
frame: info<%>
determine-width
lock-status-changed
update-info
set-info-canvas
get-info-canvas
get-info-editor
get-info-panel
show-info
hide-info
is-info-hidden?
frame: info-mixin
make-root-area-container
on-close
frame: text-info<%>
set-macro-recording
overwrite-status-changed
anchor-status-changed
editor-position-changed
frame: text-info-mixin
on-close
update-info
frame: pasteboard-info<%>
frame: pasteboard-info-mixin
frame: standard-menus<%>
on-close
get-menu%
get-menu-item%
get-checkable-menu-item%
get-file-menu
get-edit-menu
get-help-menu
file-menu: get-new-item
file-menu: create-new?
file-menu: new-callback
file-menu: new-on-demand
file-menu: new-string
file-menu: new-help-string
file-menu: between-new-and-open
file-menu: get-open-item
file-menu: create-open?
file-menu: open-callback
file-menu: open-on-demand
file-menu: open-string
file-menu: open-help-string
file-menu: get-open-recent-item
file-menu: create-open-recent?
file-menu: open-recent-callback
file-menu: open-recent-on-demand
file-menu: open-recent-string
file-menu: open-recent-help-string
file-menu: between-open-and-revert
file-menu: get-revert-item
file-menu: create-revert?
file-menu: revert-callback
file-menu: revert-on-demand
file-menu: revert-string
file-menu: revert-help-string
file-menu: between-revert-and-save
file-menu: get-save-item
file-menu: create-save?
file-menu: save-callback
file-menu: save-on-demand
file-menu: save-string
file-menu: save-help-string
file-menu: get-save-as-item
file-menu: create-save-as?
file-menu: save-as-callback
file-menu: save-as-on-demand
file-menu: save-as-string
file-menu: save-as-help-string
file-menu: between-save-as-and-print
file-menu: get-print-item
file-menu: create-print?
file-menu: print-callback
file-menu: print-on-demand
file-menu: print-string
file-menu: print-help-string
file-menu: between-print-and-close
file-menu: get-close-item
file-menu: create-close?
file-menu: close-callback
file-menu: close-on-demand
file-menu: close-string
file-menu: close-help-string
file-menu: between-close-and-quit
file-menu: get-quit-item
file-menu: create-quit?
file-menu: quit-callback
file-menu: quit-on-demand
file-menu: quit-string
file-menu: quit-help-string
file-menu: after-quit
edit-menu: get-undo-item
edit-menu: create-undo?
edit-menu: undo-callback
edit-menu: undo-on-demand
edit-menu: undo-string
edit-menu: undo-help-string
edit-menu: get-redo-item
edit-menu: create-redo?
edit-menu: redo-callback
edit-menu: redo-on-demand
edit-menu: redo-string
edit-menu: redo-help-string
edit-menu: between-redo-and-cut
edit-menu: get-cut-item
edit-menu: create-cut?
edit-menu: cut-callback
edit-menu: cut-on-demand
edit-menu: cut-string
edit-menu: cut-help-string
edit-menu: between-cut-and-copy
edit-menu: get-copy-item
edit-menu: create-copy?
edit-menu: copy-callback
edit-menu: copy-on-demand
edit-menu: copy-string
edit-menu: copy-help-string
edit-menu: between-copy-and-paste
edit-menu: get-paste-item
edit-menu: create-paste?
edit-menu: paste-callback
edit-menu: paste-on-demand
edit-menu: paste-string
edit-menu: paste-help-string
edit-menu: between-paste-and-clear
edit-menu: get-clear-item
edit-menu: create-clear?
edit-menu: clear-callback
edit-menu: clear-on-demand
edit-menu: clear-string
edit-menu: clear-help-string
edit-menu: between-clear-and-select-all
edit-menu: get-select-all-item
edit-menu: create-select-all?
edit-menu: select-all-callback
edit-menu: select-all-on-demand
edit-menu: select-all-string
edit-menu: select-all-help-string
edit-menu: between-select-all-and-find
edit-menu: get-find-item
edit-menu: create-find?
edit-menu: find-callback
edit-menu: find-on-demand
edit-menu: find-string
edit-menu: find-help-string
edit-menu: get-find-next-item
edit-menu: create-find-next?
edit-menu: find-next-callback
edit-menu: find-next-on-demand
edit-menu: find-next-string
edit-menu: find-next-help-string
edit-menu: get-find-previous-item
edit-menu: create-find-previous?
edit-menu: find-previous-callback
edit-menu: find-previous-on-demand
edit-menu: find-previous-string
edit-menu: find-previous-help-string
edit-menu: get-show/ hide-replace-item
edit-menu: create-show/ hide-replace?
edit-menu: show/ hide-replace-callback
edit-menu: show/ hide-replace-on-demand
edit-menu: show/ hide-replace-string
edit-menu: show/ hide-replace-help-string
edit-menu: get-replace-item
edit-menu: create-replace?
edit-menu: replace-callback
edit-menu: replace-on-demand
edit-menu: replace-string
edit-menu: replace-help-string
edit-menu: get-replace-all-item
edit-menu: create-replace-all?
edit-menu: replace-all-callback
edit-menu: replace-all-on-demand
edit-menu: replace-all-string
edit-menu: replace-all-help-string
edit-menu: get-find-case-sensitive-item
edit-menu: create-find-case-sensitive?
edit-menu: find-case-sensitive-callback
edit-menu: find-case-sensitive-on-demand
edit-menu: find-case-sensitive-string
edit-menu: find-case-sensitive-help-string
edit-menu: between-find-and-preferences
edit-menu: get-preferences-item
edit-menu: create-preferences?
edit-menu: preferences-callback
edit-menu: preferences-on-demand
edit-menu: preferences-string
edit-menu: preferences-help-string
edit-menu: after-preferences
help-menu: before-about
help-menu: get-about-item
help-menu: create-about?
help-menu: about-callback
help-menu: about-on-demand
help-menu: about-string
help-menu: about-help-string
help-menu: after-about
frame: standard-menus-mixin
on-close
frame: editor<%>
get-entire-label
get-label-prefix
set-label-prefix
get-canvas%
get-canvas<%>
get-editor%
get-editor<%>
make-editor
revert
save
save-as
get-canvas
get-editor
frame: editor-mixin
get-filename
editing-this-file?
on-close
can-close?
get-label
set-label
file-menu: open-callback
file-menu: revert-on-demand
file-menu: revert-callback
file-menu: create-revert?
file-menu: save-callback
file-menu: create-save?
file-menu: save-as-callback
file-menu: create-save-as?
file-menu: print-callback
file-menu: create-print?
file-menu: between-save-as-and-print
edit-menu: between-select-all-and-find
help-menu: about-callback
help-menu: about-string
help-menu: create-about?
frame: open-here<%>
get-open-here-editor
open-here
frame: open-here-mixin
file-menu: new-on-demand
file-menu: new-callback
file-menu: open-on-demand
on-close
on-activate
frame: text<%>
frame: text-mixin
get-editor<%>
frame: pasteboard<%>
frame: pasteboard-mixin
get-editor<%>
frame: delegate<%>
get-delegated-text
delegated-text-shown?
hide-delegated-text
show-delegated-text
delegate-moved
frame: delegate-mixin
make-root-area-container
get-editor<%>
get-editor%
frame: searchable<%>
search
search-replace
replace-all
get-text-to-search
set-text-to-search
search-hidden?
hide-search
unhide-search
get-case-sensitive-search?
search-hits-changed
frame: searchable-mixin
edit-menu: find-callback
edit-menu: create-find?
edit-menu: find-again-callback
edit-menu: create-find-again?
edit-menu: find-again-backwards-callback
edit-menu: create-find-again-backwards?
edit-menu: replace-all-callback
edit-menu: replace-all-on-demand
edit-menu: create-replace-all?
edit-menu: find-case-sensitive-callback
edit-menu: find-case-sensitive-on-demand
edit-menu: create-find-case-sensitive?
make-root-area-container
on-close
frame: searchable-text<%>
frame: searchable-text-mixin
get-text-to-search
get-editor<%>
get-editor%
frame: basic%
frame: size-pref%
frame: info%
frame: text-info%
frame: pasteboard-info%
frame: status-line%
frame: standard-menus%
frame: editor%
frame: open-here%
frame: text%
frame: searchable%
frame: delegate%
frame: pasteboard%
frame: setup-size-pref
frame: add-snip-menu-items
frame: reorder-menus
frame: remove-empty-menus
Version: 4.1.3.3

12 Frame

frame:basic<%> : interface?
  implements: frame%

Classes matching this interface support the basic frame% functionality required by the framework.

(send a-frame:basic get-area-container%)
  (is-a?/c area-container<%>)

The class that this method returns is used to create the area-container<%> in this frame.

(send a-frame:basic get-area-container)
  (instance (is-a?/c area-container<%>))

This returns the main area-container<%> in the frame

(send a-frame:basic get-menu-bar%)  (subclass?/c menu-bar%)

The result of this method is used to create the initial menu bar for this frame.

Return menu-bar%.

(send a-frame:basic make-root-area-container class 
  parent) 
  (instance (is-a?/c area-container<%>))
  class : (is-a?/c area-container<%>)
  parent : (instance (is-a?/c area-container<%>))

Override this method to insert a panel in between the panel used by the clients of this frame and the frame itself. For example, to insert a status line panel override this method with something like this:

  (class ...
    ...
   (rename [super-make-root-area-container
            make-root-area-container])
   (field
     [status-panel #f])
   (define/override (make-root-area-container cls parent)
     (set! status-panel
           (super-make-root-area-container vertical-panel% parent))
     (let ([root (make-object cls status-panel)])
  
        ; ... add other children to status-panel ...
  
        root))
    ...)

In this example, status-panel will contain a root panel for the other classes, and whatever panels are needed to display status information.

The searching frame is implemented using this method.

Calls make-object with class and parent.

(send a-frame:basic close)  void

This method closes the frame by calling the can-close?, on-close, and show methods.

It’s implementation is:

  (inherit can-close? on-close)
  (public
    [show
      (lambda ()
        (when (can-close?)
          (on-close)
          (show #f)))])
(send a-frame:basic editing-this-file? filename)  boolean?
  filename : path

Indicates if this frame contains this buffer (and can edit that file).

Returns #f.

(send a-frame:basic get-filename [temp])  (union |#f| path)
  temp : (union |#f| (box boolean?)) = |#f|

This returns the filename that the frame is currently being saved as, or #f if there is no appropriate filename.

Defaultly returns #f.

If temp is a box, it is filled with #t or #f, depending if the filename is a temporary filename.

(send a-frame:basic make-visible filename)  void
  filename : string

Makes the file named by filename visible (intended for use with tabbed editing).

frame:basic-mixin : (class? . -> . class?)
  argument extends/implements: frame%
  result implements: frame:basic<%>

This mixin provides the basic functionality that the framework expects. It helps manage the list of frames in the group:% object returned by group:get-the-frame-group.

Do not give panel%s or control<%>s this frame as parent. Instead, use the result of the get-area-container method.

This mixin also creates a menu bar for the frame, as the frame is initialized. It uses the class returned by get-menu-bar%. It only passes the frame as an initialization argument. In addition, it creates the windows menu in the menu bar.

See also frame:reorder-menus.

(sen