![]() |
Manipulating TeXmacs views | ![]() |
This routine returns the list of all available views, sorted by inverse chronological order. That is, views which were selected more recently will occur earlier in the list.
Return the current view or #f. The underlying glued routine (current-view-url) returns (url-none) if there is no current view.
Return the list of all views on the buffer buf.
This routine returns the buffer to which the view vw is attached.
This routine returns the window in which the view vw is being displayed or #f. The glued variant view->window-url returns (url-none) instead of #f.
(view-new buf)
(view-passive buf)
All three routines return a view on the buffer buf. In the case of view-new, we systematically create a new view. The routine view-passive first attempts to find an existing view on buf which is not attached to a window; if no such view exists, then a new one is created. The last routine view-recent returns the most recent existing view, with a preference for the current view, or another visible view. Again, a new view is created if no suitable recent view exists. The routines view-new and view-passive create the buffer buf if it does not exist yet (view-passive attempts to load it from disk).
Delete the view vw. The view should not be displayed in a window.
The C++ counterparts of these routines can be found in
Texmacs/Data/new_view.cpp
; see views and the current view for more details.