Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## new-text-editor

Arguments: window

This function is used by the File | New menu-item of the default menu-bar that may be interactively attached to a form. In the IDE, it demonstrates a typical "New" command for creating a text editor but this function is not available in a runtime image. A custom application that implements a "New" command will need to supply its own code for such a command instead, but it may be useful to model after the default menu-bar's example. Here is the code for the new-text-editor example (note: this code changed, adding values for the width and height arguments, between release 6.2 and release 7.0):

    (in-package :cg)
    (defmethod new-text-editor ((window basic-pane))
      ;; Called by the default "New" menu-item added to a form.
      (make-window (gensym-sequential-name :editor)
        :device 'text-edit-window
        :parent window
        :width (floor (interior-width window) 1.2)
        :height (floor (interior-height window) 1.2)))

See also save-text-file, save-as-text-file, and open-text-file.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version