[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: probleme avec editor-view
- Subject: Re: probleme avec editor-view
- From: jmi@columbo.inria.fr (Janet Bertot)
- Date: 15 Sep 93 08:41:21 GMT
For the benefit of all our users, i'll paraphrase Jean-Pierre problems
in english, taking into account what he has told me in additional e-mail.
----------------------
In article <56335@sophia.inria.fr>, Jean-Pierre.Jacquot@loria.fr (Jean-Pierre Jacquot) writes:
=> i've had several problems with redisplaying the ctedit and editor-view objects.
=> The situation is as follows:
=> i've two trees that contain cross references (these are "paths" stored as
=> annotations in each tree). Each tree is in a separate window, both trees'
=> root are in the same formalism. What i want is when i click in one tree
=> i get the nearest reference and highlight that as the current selection in
=> other tree. (This is to be done using the mouse-event-list associated with
=> the ctedit.)
=> The brunt of the problem is that although the two trees are in the same
=> formalism the mouse-event-list must be different (since the selection is
=> mechanism is slightly different), and for one of the trees i don't want
=> the standard formalism decorations. That is, i don't want one window to
=> use the {L}:set-environment function. This window is just for visualization
=> (no editing)
=> [stuff deleted saying how he was trying to remake a ctview from scratch
=> but had lots of display problems]
----------------------
Two points to consider to solve this type of problem.
1) make-ctview and make-clipview functions were done to allow you to create
easily editor-views that resemble the default editors of Centaur.
Both functions allow you to change many of the default values.
The arguments are:
(name tree w h pprinter pgwidth printlevel mouse-event-list)
which can be (), if you want the default value.
NB: you can change the mouse-event-list! :-) Probably your best bet!
NB2: the clipview frame only contains the kill-button, the Display
and Selection pulldown. Thus, no edition, no reading files.
If you want the clipview frame, use make-clipview.
2) If all that you want is that the window does not receive the language
decorations (done by your {L}:set-environment function).
This is controlled by what we call a manager. When you call any
of the make-view family of functions, i.e., make-ctview, make-clipview,
or make-ctedit-view, the current manager decides what sort of events
will be listened to. The normal/default assumes you'll want to listen
to changes in the tree and update the frame accordingly.
However, you can get around this by embedding your "make-*view" as
follows:
(with ((current-manager #:gfxobj:look:clview:manager))
(make-* ......)
)
NB: we've three managers
#:gfxobj:look:ctview:manager ;; the standard one update frame
;; using set-environment
#:gfxobj:look:clview:manager ;; the one for the clipview
;; windows where you just look
;; the clipview doesn't change decorations
#:gfxobj:look:ctview:plain-manager ;; like the standard one
;; you can read/edit files
;; but never change the frame
We must provide high-level convenience functions so feel free to ask if
if you need more info, more primitives, etc.
--janet
PS: This, in fact, did solve his problem, he chose to use the clipview manager.