texmacs-dev
[Top][All Lists]
Advanced

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

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


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] New features for menus in TeXmacs 1.0.0.11
Date: Thu, 1 Aug 2002 22:30:02 +0200 (MET DST)

On Thu, 1 Aug 2002, David Allouche wrote:

> I have started the first stage of the new menu reorganization. Of
> course I have dozens of proposals, requests, new bugs, etc... but I
> just want to talk of a few immediate problems.
> 
> First, I need several new predicates and observer functions in GUILE
>  for the enabled state of the menu items or they checkmarks:
> 
>     get-clipboard: string -> tree
>     full-screen?: -> bool
>     get-shrinking-factor: -> int
>     session-use-math-input?: -> bool
>     get-insertion-positions: -> string
> 
> I would also need predicates related to selection translation:
> 
>     selection-get-import: -> string
>     selection-get-export: -> string
> 
> But I am wondering why not move all the selection/translation related
> logic to the Scheme layer...

Yes, this should indeed be done, but we have to be careful to distinguish
between system wide settings, window related settings and
buffer related settings. So what we need is functions

buffer-set-property!: scheme_tree, scheme_tree -> void
buffer-get-property : scheme_tree -> scheme_tree
window-set-property!: scheme_tree, scheme_tree -> void
window-get-property : scheme_tree -> scheme_tree
system-set-property!: scheme_tree, scheme_tree -> void
system-get-property : scheme_tree -> scheme_tree

Notice also that we should change the way to deal with shrinking factors.
The shrinking factor should be a window related propery only and
it should be possible to set it in the user preferences too.

> More importantly, I think the current "implicit rule" mechanism is way
> to rigid. It could be simple to implement an extensible system of
> implicit rules using the following procedure properties:
> 
>   -- check-mark: "*", "v" or "o"
> 
>   -- check-test: predicate to apply to the same parameter list as the
>      procedure to which it is associated and which return the checked
>      state of the menu item.
> 
> Here too, it may be possible to do with minimal hacking in C++, but
> since widgets now have a GUILE interface, why not move the menu
> construction code (at least make_menu_item) to GUILE?

You want to do this? It should indeed be done, but that might take
a few days... In fact I already started doing this, by putting the widget
construction routines in the scheme interface.

Notice however that this is not really urgent. We might prefer to wait for
a TMGUI API which works on Windows first, in order to get some more ideas. 
It would be nice to construct other things like dialogue boxes in
a similar way.

> > * 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.
> 
> The problem is that I am not sure of what you mean here...

Please do not move menu items around, except for what is obviously needed
to transform things like View -> Footer -> on/off into checkbox entries.

> I am not pretending to mess with the actual menu layout here, just to
> do help on moving all GUI logic to GUILE.

Great, that is indeed helpful.




reply via email to

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