mirror of https://github.com/texmacs/doc.git
Start documentation of buffer, view and window management API
This commit is contained in:
parent
4214b446cb
commit
11d6556c2d
|
@ -0,0 +1,120 @@
|
|||
<TeXmacs|1.0.7.15>
|
||||
|
||||
<style|tmdoc>
|
||||
|
||||
<\body>
|
||||
<tmdoc-title|Manipulating <TeXmacs> buffers>
|
||||
|
||||
<paragraph|Basic buffer management>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-list)><explain-synopsis|list of all buffers>
|
||||
<|explain>
|
||||
This routine returns the list of all open buffers.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(current-buffer)><explain-synopsis|current buffer>
|
||||
<|explain>
|
||||
Return the current view. The program may abort if there exists no current
|
||||
buffer.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(path-\<gtr\>buffer <scm-arg|p>)><explain-synopsis|buffer which
|
||||
contains a certain path>
|
||||
<|explain>
|
||||
Return the buffer which contains a certain path <scm-arg|p>, or <scm|#f>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(tree-\<gtr\>buffer <scm-arg|t>)><explain-synopsis|buffer which
|
||||
contains a certain tree>
|
||||
<|explain>
|
||||
Return the buffer which contains a certain tree <scm-arg|t>, or <scm|#f>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-\<gtr\>views <scm-arg|buf>)><explain-synopsis|list of views
|
||||
on a buffer>
|
||||
<|explain>
|
||||
This routine returns the list of views on the buffer <scm-arg|buf>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-\<gtr\>windows <scm-arg|buf>)><explain-synopsis|list of
|
||||
windows containing buffer>
|
||||
<|explain>
|
||||
This routine returns the list of windows in which the buffer
|
||||
<scm-arg|buf> is currently being displayed.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-new)><explain-synopsis|create a new buffer>
|
||||
<|explain>
|
||||
Create a new buffer and returns its URL.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-rename <scm-arg|buf> <scm-arg|new-name>)><explain-synopsis|create
|
||||
a new buffer>
|
||||
<|explain>
|
||||
Give a new name <scm-arg|new-name> to the buffer <scm-arg|buf>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(switch-to-buffer <scm-arg|buf>)><explain-synopsis|switch the
|
||||
editor's focus>
|
||||
<|explain>
|
||||
Switch the editor's focus to the buffer <scm-arg|buf>.
|
||||
</explain>
|
||||
|
||||
<paragraph|Information associated to buffers>
|
||||
|
||||
<paragraph|Synchronizing with the external world>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-load <scm-arg|buf>)><explain-synopsis|load buffer>
|
||||
<|explain>
|
||||
Retrieve the buffer <scm-arg|buf> from disk (or elsewhere). Returns
|
||||
<scm|#t> on error and <scm|#f> otherwise.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-save <scm-arg|buf>)><explain-synopsis|save buffer>
|
||||
<|explain>
|
||||
Save the buffer <scm-arg|buf> to disk (or elsewhere). Returns <scm|#t> on
|
||||
error and <scm|#f> otherwise.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(buffer-export <scm-arg|buf> <scm-arg|dest>
|
||||
<scm-arg|fm>)><explain-synopsis|export buffer>
|
||||
<|explain>
|
||||
Export the buffer <scm-arg|buf> to <scm-arg|dest>, using the format
|
||||
<scm-arg|fm>. Returns <scm|#t> on error and <scm|#f> otherwise.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(tree-import <scm-arg|src> <scm-arg|fm>)><explain-synopsis|import a
|
||||
tree>
|
||||
<|explain>
|
||||
Import a tree from the URL <scm-arg|src>, using the format <scm-arg|fm>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(tree-export <scm-arg|t> <scm-arg|dest>
|
||||
<scm-arg|fm>)><explain-synopsis|export a tree>
|
||||
<|explain>
|
||||
Export a tree to the URL <scm-arg|dest>, using the format <scm-arg|fm>.
|
||||
</explain>
|
||||
|
||||
<tmdoc-copyright|2012|Joris van der Hoeven>
|
||||
|
||||
<tmdoc-license|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".>
|
||||
</body>
|
|
@ -0,0 +1,16 @@
|
|||
<TeXmacs|1.0.7.15>
|
||||
|
||||
<style|tmdoc>
|
||||
|
||||
<\body>
|
||||
<tmdoc-title|Links between buffers, views and windows>
|
||||
|
||||
<tmdoc-copyright|2012|Joris van der Hoeven>
|
||||
|
||||
<tmdoc-license|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".>
|
||||
</body>
|
|
@ -0,0 +1,18 @@
|
|||
<TeXmacs|1.0.7.15>
|
||||
|
||||
<style|tmdoc>
|
||||
|
||||
<\body>
|
||||
<tmdoc-title|Introduction>
|
||||
|
||||
\;
|
||||
|
||||
<tmdoc-copyright|2012|Joris van der Hoeven>
|
||||
|
||||
<tmdoc-license|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".>
|
||||
</body>
|
|
@ -0,0 +1,32 @@
|
|||
<TeXmacs|1.0.7.15>
|
||||
|
||||
<style|tmdoc>
|
||||
|
||||
<\body>
|
||||
<tmdoc-title|<TeXmacs> buffers and views>
|
||||
|
||||
<\traverse>
|
||||
<branch|Introduction|buffer-intro.en.tm>
|
||||
|
||||
<branch|Manipulating <TeXmacs> buffers|buffer-api.en.tm>
|
||||
|
||||
<branch|Manipulating <TeXmacs> views|view-api.en.tm>
|
||||
|
||||
<branch|Manipulating <TeXmacs> windows|window-api.en.tm>
|
||||
</traverse>
|
||||
|
||||
<tmdoc-copyright|2012|Joris van der Hoeven>
|
||||
|
||||
<tmdoc-license|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".>
|
||||
</body>
|
||||
|
||||
<\initial>
|
||||
<\collection>
|
||||
<associate|language|english>
|
||||
</collection>
|
||||
</initial>
|
|
@ -0,0 +1,63 @@
|
|||
<TeXmacs|1.0.7.15>
|
||||
|
||||
<style|tmdoc>
|
||||
|
||||
<\body>
|
||||
<tmdoc-title|Manipulating <TeXmacs> views>
|
||||
|
||||
<\explain>
|
||||
<scm|(view-list)><explain-synopsis|list of all views>
|
||||
<|explain>
|
||||
This routine returns the list of all available views, sorted by inverse
|
||||
chronologial order. That is, views which were selected more recently will
|
||||
occur earlier in the list.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(current-view)><explain-synopsis|current view>
|
||||
<|explain>
|
||||
Return the current view or <scm|#f>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(view-\<gtr\>buffer <scm-arg|vw>)><explain-synopsis|buffer to which
|
||||
the view is attached>
|
||||
<|explain>
|
||||
This routine returns the buffer to which the view <scm-arg|vw> is
|
||||
attached.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(view-\<gtr\>window <scm-arg|vw>)><explain-synopsis|window to which
|
||||
the view is attached>
|
||||
<|explain>
|
||||
This routine returns the window in which the view <scm-arg|vw> is being
|
||||
displayed or <scm|#f>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(view-new <scm-arg|buf>)>
|
||||
|
||||
<scm|(view-passive <scm-arg|buf>)>
|
||||
|
||||
<scm|(view-recent <scm-arg|buf>)><explain-synopsis|get view on buffer>
|
||||
<|explain>
|
||||
All three routines return a view on the buffer <scm-arg|buf>. In the case
|
||||
of <scm|view-new>, we systematically create a new view. The routine
|
||||
<scm|view-passive> first attempts to find an existing view on
|
||||
<scm-arg|buf> which is not attached to a window; if no such view exists,
|
||||
then a new one is created. The last routine <scm|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.
|
||||
</explain>
|
||||
|
||||
<tmdoc-copyright|2012|Joris van der Hoeven>
|
||||
|
||||
<tmdoc-license|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".>
|
||||
</body>
|
|
@ -0,0 +1,74 @@
|
|||
<TeXmacs|1.0.7.15>
|
||||
|
||||
<style|tmdoc>
|
||||
|
||||
<\body>
|
||||
<tmdoc-title|Manipulating <TeXmacs> windows>
|
||||
|
||||
<\explain>
|
||||
<scm|(window-list)><explain-synopsis|list of all <TeXmacs> windows>
|
||||
<|explain>
|
||||
This routine returns the list of all <TeXmacs> windows.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(current-window)><explain-synopsis|current window>
|
||||
<|explain>
|
||||
Return the current window. The program may abort if there exists no
|
||||
current window.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(window-\<gtr\>buffer <scm-arg|win>)><explain-synopsis|buffer
|
||||
displayed in window>
|
||||
<|explain>
|
||||
This routine returns the buffer which is currently being displayed in the
|
||||
window <scm-arg|win>. Warning: in the future, when a window will be
|
||||
allowed to contain multiple buffers, this routine might be replaced by
|
||||
<scm|window-\<gtr\>buffers>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(window-\<gtr\>view <scm-arg|win>)><explain-synopsis|view displayed
|
||||
in window>
|
||||
<|explain>
|
||||
This routine returns the view which is currently being displayed in the
|
||||
window <scm-arg|win>. Warning: in the future, when a window will be
|
||||
allowed to contain multiple views, this routine might be replaced by
|
||||
<scm|window-\<gtr\>views>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(window-set-buffer <scm-arg|win>
|
||||
<scm-arg|buf>)><explain-synopsis|show buffer in window>
|
||||
<|explain>
|
||||
Display the buffer <scm-arg|buf> in the window <scm-arg|win>.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(window-set-view <scm-arg|win> <scm-arg|vw>)><explain-synopsis|show
|
||||
view in window>
|
||||
<|explain>
|
||||
Display the view <scm-arg|vw> in the window <scm-arg|win>. The program
|
||||
may abort if the view was already attached to another window.
|
||||
</explain>
|
||||
|
||||
<\explain>
|
||||
<scm|(window-focus <scm-arg|win>)><explain-synopsis|focus window>
|
||||
<|explain>
|
||||
Set th current focus to the window <scm-arg|win>. The current
|
||||
implementation is still a bit bugged and only correct if you want to
|
||||
execute a sequence of commands under the assumption that <scm-arg|win>
|
||||
carries the focus and if you return the focus to the original window at
|
||||
the end.
|
||||
</explain>
|
||||
|
||||
<tmdoc-copyright|2012|Joris van der Hoeven>
|
||||
|
||||
<tmdoc-license|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".>
|
||||
</body>
|
|
@ -1,4 +1,4 @@
|
|||
<TeXmacs|1.0.7.14>
|
||||
<TeXmacs|1.0.7.15>
|
||||
|
||||
<style|tmdoc>
|
||||
|
||||
|
@ -15,11 +15,13 @@
|
|||
<branch|Programming routines for editing
|
||||
documents|edit/scheme-edit.en.tm>
|
||||
|
||||
<branch|<TeXmacs> buffers and views|buffer/scheme-buffering.en.tm>
|
||||
|
||||
<branch|Scheme interface for the graphical
|
||||
mode|graphics/scheme-graphics.en.tm>
|
||||
|
||||
<branch|Customizing and extending the graphical
|
||||
user interface|gui/scheme-gui.en.tm>
|
||||
|
||||
<branch|Customizing and extending the graphical user
|
||||
interface|gui/scheme-gui.en.tm>
|
||||
|
||||
<branch|Writing <TeXmacs> bibliography
|
||||
styles|bibliography/bibliography.en.tm>
|
||||
|
|
Loading…
Reference in New Issue