12 Frame
| frame:basic<%> : interface? | ||
|
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?) | ||
| ||
|
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