GNU TeXmacsUser manualReferenceAboutEnglish
Manipulating TeXmacs views
(view-list)
(list of all 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.

(current-view)
(current view)

Return the current view or #f. The underlying glued routine (current-view-url) returns (url-none) if there is no current view.

(buffer->views buf)
(views on a buffer)

Return the list of all views on the buffer buf.

(view->buffer vw)
(buffer to which the view is attached)

This routine returns the buffer to which the view vw is attached.

(view->window vw)
(window to which the view 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)

(view-recent buf)
(get view on buffer)

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).

(view-delete vw)
(delete a view)

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.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".