Specification: This method is called when the break button is clicked and this tab is the active tab.
Default implementation: By default, breaks any evaluation that may be happening at this point.Specification: This method is called to determine if it is okay to close this tab.
Default implementation: Calls the definitions text’s and interactions text’s can-close? method.Disables the Run button, and the Run menu item and locks the interactions window, and the definitions window.Enables the Run button, and the Run menu item and unlocks (via the lock method) the interactions window and the definitions window.This text is initially the top half of the DrRacket window and contains the users program.This is the directory that the file is saved in, or the directory DrRacket started up in, if the file has not been saved.Indicates if evaluation is currently enabled in this tab. Evaluation is typically disabled when some evaluation is already running (in another thread).Returns the frame that this tab is inside.This text is initially the bottom half of the DrRacket window and contains the users interactions with the REPL.Indicates if this tab is the currently active tab.Indicates if the running message in the bottom right of DrRacket’s frame should be “running” or “not running” when this frame is active.Specification: This method is called when the tab is closed.
(send a-drracket:unit:tab set-breakables thread custodian) → void? thread : (or/c thread? false/c) custodian : (or/c custodian? false/c)
(make-object drracket:unit:tab%) → (is-a?/c drracket:unit:tab%)Clears any error highlighting.
|drracket:unit:program-editor-mixin : (class? . -> . class?)|
Calls the super method.
Resets an error highlighting.Calls the super method.
Resets an error highlighting.
(new drracket:unit:interactions-canvas% ...superclass-args...) → (is-a?/c drracket:unit:interactions-canvas%)Passes all arguments to super-init.
|drracket:unit:frame% : class?|
Passes all arguments to super-init.Passes all arguments to super-init.Overrides <method not found>.Adds the “Show Definitions”, “Show Interactions” and “Show Contour” menu items.Specification: This method is called when the user clicks on the break button or chooses the break menu item.
Default implementation: Breaks the user’s evaluation started by the Run button (or possibly a queued callback in the user’s eventspace).Loads this file into this already created frame. In normal DrRacket use, this method is only called if this is the first frame opened and no editing has occurred. It should be safe to call this at anytime, however.Adds the "Split" and "Collapse" menu items.Specification: This method is called when the user clicks on the Run button or chooses the Run menu item.
Default implementation: It calls ensure-rep-shown and then it calls do-many-text-evals passing in the result of get-interactions-text and its entire range, unless the first two characters are #! in which case, it skips the first line.Calls the super method and adds a separator-menu-item% to the menu.Adds a menu item for printing the interactions.Adds a submenu that contains various save options:
save definitions as text
save interactions as
save interactions as text
and adds a separator item.returns "Definitions"Returns "Definitions".Returns "Definitions".Returns the break button. Mostly used for test suites.This panel goes along the top of the DrRacket window and has buttons for important actions the user frequently executes.
A tool can add a button to this panel to make some new functionality easily accessible to the user.
See also mrlib’s switchable-button%.Returns the result of get-definitions-canvas.Returns the result of drracket:get/extend:get-definitions-canvas.
(send a-drracket:unit:frame get-definitions/interactions-panel-parent) → (is-a?/c vertical-panel%) (send a-drracket:unit:frame get-definitions/interactions-panel-parent) → void?Specification: This method is provided so that tools can add area-container<%>s to the DrRacket frame. Override this method so that it returns a child of the super-classes’s result and insert new children in between.
Default implementation: First case:
Returns the result of get-area-container
Second case:Returns the result of get-definitions-text.Returns the result of drracket:get/extend:get-definitions-text.Returns the Run button. Mostly used for test suites.returns the text that is active in the last canvas passed to make-searchable
(send a-drracket:unit:frame make-searchable canvas) → void? canvas : (is-a?/c drracket:unit:interactions-canvas%)stores the canvas, until get-text-to-search is called.
Calls the super method.Updates the preferences for the window width and height so next time a DrRacket window is opened, it will be this width and height.Specification: determines if the definitions window has not been modified. Used in conjunction with change-to-file.
Default implementation: Returns #t if the buffer is empty, it has not been saved and it is unmodified.This method hides or shows the save button, based on the modified? argument.
If the save button has not been created yet, it remembers the modified? argument as an initial visibility for the save button.
This method is called by the set-modified method.Updates the save message on the DrRacket frame. This method is called by the set-filename method.Overrides <method not found>.Updates the interactions, definitions, and contour menu items based on the contents of the windows.
Returns the language-specific menu. This menu is called the Racket menu in the Racket language but is, in general, controlled by the 'drscheme:language-menu-title capability (see drracket:language:register-capability for details on capabilities).Ensures that the definitions window is visible.Makes sure the rep is hidden (by making the definitions window visible).Shows the interactions windowReturns the currently active tab.Returns a string naming the file in the ith tab or, if the file is not saved, something like “Untitled”.Returns the number of open tabs in the frame.Opens a new tab in this frame. If filename is a path-string?, It loads that file in the definitions window of the new tab.Closes the current tab, making some other tab visible. If there is only one tab open, this method does nothing.This canvas is the canvas containing the get-definitions-text. It is initially the top half of the DrRacket window.
This canvas defaults to a drracket:unit:definitions-canvas% object, but if you change the drracket:get/extend:extend-definitions-canvas procedure, it will use the class in the parameter to create the canvas.Specification: Returns the Insert menu.
(send a-drracket:unit:frame get-interactions-canvas) → (instanceof (derivedfrom drracket:unit:interactions-canvas%))This canvas is the canvas containing the get-interactions-text. It is initially the bottom half of the DrRacket window.Returns the list of tabs in this frame.
(send a-drracket:unit:frame on-tab-change from-tab to-tab) → void? from-tab : (is-a?/c drracket:unit:tab<%>) to-tab : (is-a?/c drracket:unit:tab<%>)Specification: Called after a new tab becomes the selected tab in the frame.
Default implementation: The from-tab argument is the previously selected tab, and the to-tab argument is the newly selected tab.
(send a-drracket:unit:frame register-capability-menu-item key menu) → void? key : symbol menu : (is-a? menu%)Registers the menu item that was most recently added as being controlled by the capability key. This means that the (boolean) value of the capability determines if the menu item is present in the menu (the capability is checked when the menus are cliked on).
This assumes that the menu items in this menu are not moved around, except by the this capability. If they are, things can go funny (i.e., no good checks are in place).
Note that the capability must be registered separately, via drracket:language:register-capability.Registers the toolbar button tb. This is required so that the toolbar buttons properly switch orientation when the toolbar’s position is moved.
(send a-drracket:unit:frame register-toolbar-buttons tbs) → void? tbs : (listof (is-a?/c switchable-button%))Simultaneously registers the toolbar buttons tbs. This is required so that the toolbar buttons properly switch orientation when the toolbar’s position is moved.Unregisters the toolbar button tb. Use this method to ensure that the button is not referenced by this frame and thus can be gc’d.
|drracket:unit:definitions-text% : class?|
Passes all arguments to super-init.Overrides <method not found>.Calls update-save-message.Overrides <method not found>.Calls update-save-button.
(send a-drracket:unit:definitions-text after-set-next-settings language-settings) → void? language-settings : language-settingsSpecification: Called when the next settings changes. See also get-next-settings.
Default implementation:Augment this method to be notified when DrRacket is changing the buffer to insert metadata. The metadata is only inserted during saving, so tools that track changes to DrRacket will need to ignore changes that occur after this method is called, and before end-metadata-changes is called.
A call to begin-metadata-changes will always be followed with a call to end-metadata-changes (ie, the calls cannot be nested).Called when the changes to insert metadata are done, and the editor is back to its state at the time of the call to begin-metadata-changes.
A call to begin-metadata-changes will always be followed with a call to end-metadata-changes (ie, the calls cannot be nested).This method returns the language-settings that will be used when the user next clicks Run in this DrRacket window.Returns an identifier that can be used as a port’s name when the editor is not saved. (If it is saved, the filename of the editor should be used.)Returns the editor’s enclosing tab.Indicates if the name of a port (which is also saved in the source field of an exception record) matches this editor.Specification: This method, when called, puts this DrRacket window in a state such that interactions submitted to the REPL will trigger a yellow warning message. The state is reset when the program is next Run.
Default implementation: Records msg and uses it the next time the user submits an interaction (unless the Runs first).
(send a-drracket:unit:definitions-text set-next-settings language-settings [ update-prefs?]) → void? language-settings : language-settings update-prefs? : any/c = #tChanges the language settings for this window. If update-prefs? is a true value, the preference is changed, which affects newly created windows.
|(drracket:unit:add-to-program-editor-mixin mixin) → void?|
|mixin : ((subclass?/c text%) . -> . (subclass?/c text%))|
|→ (is-a?/c drracket:unit:frame%)|
|→ (is-a?/c drracket:unit:frame%)|
|filename : (or/c string? false/c)|