ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0

ide variables


*ide-is-in-js-mode*

Variable, ide package

The value of this variable will be true in the IDE if the IDE itself is running in a web browser, or nil if it is running as a standalone desktop Windows application.


*ide-is-running*

Variable, ide package

The value of this variable is true if the IDE is currently running.

The value is set to t at the very end of IDE startup, so a process that calls start-ide can know that the IDE has finished starting up when this variable has been set to true.

See About IDE startup in cgide.html for more information on IDE startup.


*ide-startup-hook*

Variable, ide package

The value of this variable is a list of functions and/or function names that are called when the IDE has finished starting up. Values may be pushed onto this list in order to customize the initial state of the IDE.

The default value is nil, in which case nothing extra is done. Otherwise the value should be a list where each member is either a function object or a symbol that names a function. funcall will be called on each member of this list (in the order of the list) in the "Listener 1" thread just after it loads the startup.cl file (if one exists in the main allegro directory). Each function should take no required arguments (since no arguments will be passed to them).

Functions could be pushed onto this list in a running base lisp that was started up without the IDE, so that they will be called if and when start-ide is later called to start up the IDE. Functions could also be pushed onto the list in the startup.cl file, since that file is loaded before the \*ide-startup-hook\* functions are called.

Though the startup.cl file is typically the more convenient hook for customizing the startup of the IDE, \*ide-startup-hook\* may be more suitable in some cases. In particular, startup.cl does not work by itself for setting the initial package of the initial IDE listener --- see the special note at the end of About IDE startup in cgide.html.

A warning is printed to the Listener 1 pane if the value of this variable is not a list, or if any of its members is neither a function object nor a symbol that names a function.

See exit-tests for customizing the exiting of the IDE.

See About IDE startup in cgide.html.


*ide-system*

variable, ide package

An object that contains a variety of global IDE values. This object is exported for passing to a few exported functions that access it. In particular, the expression

(cg:configuration ide:*ide-system*)

returns the IDE configuration object that stores various IDE options that are saved into the prefs.cl file. See ide-configuration.

Other exported *ide-system* accessors include exit-tests and ide-evaluator-listener.

Common Graphics has a similar object called *system* for storing some of its global values.


*lisp-message-window*

Variable, ide package

A variable that may be bound to a window in order to make development environment status-bar messages display in the status-bar of that window.

Initial value is nil, which means to display status-bar messages in the status-bar of the selected window if it has a status-bar, and otherwise into the Project Window's status-bar.


*selected-object*

Variable, ide package

This variable holds the value that was returned by the most recent invocation of the IDE's Tools menu | Return Selected Object command. Typically you would evaluate the symbol \* just after using the command to access the returned value, but \*selected-object\* allows you to access the value when it is no longer held in *, **, or *** (since those variables are modified with each evaluation in the listener).

The symbol \*selected-object\* will also appear in an IDE Listener's drop-down history for any invocation of Tools menu | Return Selected Object. The reason is that this command works by first setting the value of *selected-object* to be the value returned by a call to selected-object in the currently selected window, and then doing a top-level evaluation on the symbol \*selected-object\*, just as if you had evaluated that symbol in the listener.


*starting-ide*

Variable, ide package

Use of this variable is deprecated in favor of the more generally useful variable *ide-is-running*.
(It is currently still set as described though.)

A thread that calls start-ide can know that the IDE has finished starting up when this variable has been set to nil sometime after start-ide returns.

The function start-ide sets this variable to t and then returns a new "IDE GUI" thread. The IDE GUI thread proceeds to start up the IDE, and then sets this variable to nil when the IDE is fully up.

See About IDE startup in cgide.html for more information on IDE startup.


*text-edit-comtab*

Variable, ide package

This variable holds the comtab (command table) that defines the editing keystrokes that are available in the IDE's source code editor.

An IDE user could enhance the editor by calling set-event-function on the value of \*text-edit-comtab\* to add additional commands. And since the override-menu-bars property of this comtab is true, any added comtab keychords that conflict with IDE menu-bar shortcuts will override the IDE menu-bar commands when the editor is selected.

When a different comtab for the editor is selected by calling (setf editor-mode) or by using the Options Dialog, the \*text-edit-comtab\* comtab will inherit from a different internal comtab containing built-in commands, but will still contain any commands that were added to it directly by calling set-event-function.

Example

Here is an example that would define control-shift-M and control-shift-N in the IDE editor to scroll either down or up (respectively) by four lines and then position the text cursor at the beginning of a line of text in the middle of the editor pane. When the editor is selected, these new comtab bindings will override the shortcuts for the Form | Add Menu Bar command and the File | New Form command on the IDE menu-bar.

(in-package :cg-user)

(set-event-function
 *text-edit-comtab* '(control-key shift-key #\M)
 (lambda (editor-pane)
   (scroll-and-move editor-pane 4)))

(set-event-function
 *text-edit-comtab* '(control-key shift-key #\N)
 (lambda (editor-pane)
   (scroll-and-move editor-pane -4)))

(defun scroll-and-move (editor-pane increment)
  (set-first-visible-line editor-pane increment t)
  (set-selection
   editor-pane
   (char-from-line-number
    editor-pane
    (+ (first-visible-line editor-pane)
       (floor (interior-height editor-pane)
              (* 2 (line-height editor-pane)))))))

Copyright (c) 2023, Franz Inc. Lafayette, CA., USA. All rights reserved.

ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0