texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] New features for menus in TeXmacs 1.0.0.11


From: Joris van der Hoeven
Subject: [Texmacs-dev] New features for menus in TeXmacs 1.0.0.11
Date: Mon, 29 Jul 2002 12:06:55 +0200 (MET DST)

I finished implementing the logic for additional menu decorations.
Here follows a small discription on how to use the new features:


1. The '...' menu item attribute
--------------------------------

This can be added if more information is needed from the user.
Example:

    ("load" ... "F2" (choose-file "Load file" "" 'load-buffer))


2. The 'when' primitive
-----------------------

Similar to 'if', but in case of #f, the menu items are in dark grey.
Example:

    (when (selection-active-any?)
          ("copy" "E-c" (copy "primary"))
          ("cut" "E-x" (cut "primary")))


3. The 'check' menu item attribute
----------------------------------

This can be used in order to mark a menu item
in the case when some condition is satisfied.
For instance:

    (-> "header"
        ("on" (check "*" (visible-header?)) (show-header #t))
        ("off" (check "*" (not (visible-header?))) (show-header #f)))

Three types of checkmarks are used:

  *  for mutually exclusive items.
  o  for mutually exclusive environment settings.
  v  for toggles.

Notice that the above example should be rewritten as a toggle.


4. Implicit rules
-----------------

A certain number of check attributes are set automatically
as a function of the command which is executed. This is so for

  make-with
  make-line-with
  init-env
  init-default

More can be added later when needed, although this list should
be kept as small as possible.

In particular, the o-check should never be set manually.


Layout issues
-------------

Notice that a better layout has to be implemented for checkmarks.
At the moment, we append *, o or v before the menu item text,
but this should be improved by using pixmaps and by using indentation.
But the logic is already there.


Some work for David?
--------------------

Maybe David is willing to take care of the following issues,
since he pressed me to implement the additional features :^)

* Capitalize the *first* letters of all menu entry texts.
  Capitalization of other letters will be done automatically
  if this is set as an option (not implemented yet).

* Add ... wherever needed.

* Put * and v checkmarks whereever needed and use toggling
  whenever appropriate. You might wish to write some additional
  routines like (toggle-view-header), which you may put in
  the preamble of main-menu.scm; I will move them to
  an appropriate place.

* Use 'when' whenever really appropriate; if you need some extra routines,
  please put them in main-menu.scm as above. Please keep this kind of
  changes to a minimum. In particular, don't change the existing 'if's
  to 'when's; this will be done later when appropriate.

* Please do *not* make other changes; since we are in the middle of
  a big reorganization, so things should be done in the right order.

Note: please perform these changes shortly after the 1.0.0.11 release.
Note: be careful that there are a few menus which are outside progs/menu.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]