From 11d6556c2d6dc784d124e2a447288e54e042916b Mon Sep 17 00:00:00 2001 From: Joris van der Hoeven Date: Mon, 23 Apr 2012 12:22:28 +0000 Subject: [PATCH] Start documentation of buffer, view and window management API --- devel/scheme/buffer/buffer-api.en.tm | 120 +++++++++++++++++++++ devel/scheme/buffer/buffer-convert.en.tm | 16 +++ devel/scheme/buffer/buffer-intro.en.tm | 18 ++++ devel/scheme/buffer/scheme-buffering.en.tm | 32 ++++++ devel/scheme/buffer/view-api.en.tm | 63 +++++++++++ devel/scheme/buffer/window-api.en.tm | 74 +++++++++++++ devel/scheme/scheme.en.tm | 10 +- 7 files changed, 329 insertions(+), 4 deletions(-) create mode 100644 devel/scheme/buffer/buffer-api.en.tm create mode 100644 devel/scheme/buffer/buffer-convert.en.tm create mode 100644 devel/scheme/buffer/buffer-intro.en.tm create mode 100644 devel/scheme/buffer/scheme-buffering.en.tm create mode 100644 devel/scheme/buffer/view-api.en.tm create mode 100644 devel/scheme/buffer/window-api.en.tm diff --git a/devel/scheme/buffer/buffer-api.en.tm b/devel/scheme/buffer/buffer-api.en.tm new file mode 100644 index 0000000..13e3eb5 --- /dev/null +++ b/devel/scheme/buffer/buffer-api.en.tm @@ -0,0 +1,120 @@ + + + + +<\body> + buffers> + + + + <\explain> + + <|explain> + This routine returns the list of all open buffers. + + + <\explain> + + <|explain> + Return the current view. The program may abort if there exists no current + buffer. + + + <\explain> + buffer )> + <|explain> + Return the buffer which contains a certain path , or . + + + <\explain> + buffer )> + <|explain> + Return the buffer which contains a certain tree , or . + + + <\explain> + views )> + <|explain> + This routine returns the list of views on the buffer . + + + <\explain> + windows )> + <|explain> + This routine returns the list of windows in which the buffer + is currently being displayed. + + + <\explain> + + <|explain> + Create a new buffer and returns its URL. + + + <\explain> + )> + <|explain> + Give a new name to the buffer . + + + <\explain> + )> + <|explain> + Switch the editor's focus to the buffer . + + + + + + + <\explain> + )> + <|explain> + Retrieve the buffer from disk (or elsewhere). Returns + on error and otherwise. + + + <\explain> + )> + <|explain> + Save the buffer to disk (or elsewhere). Returns on + error and otherwise. + + + <\explain> + + )> + <|explain> + Export the buffer to , using the format + . Returns on error and otherwise. + + + <\explain> + )> + <|explain> + Import a tree from the URL , using the format . + + + <\explain> + + )> + <|explain> + Export a tree to the URL , using the format . + + + + + + \ No newline at end of file diff --git a/devel/scheme/buffer/buffer-convert.en.tm b/devel/scheme/buffer/buffer-convert.en.tm new file mode 100644 index 0000000..1d5381d --- /dev/null +++ b/devel/scheme/buffer/buffer-convert.en.tm @@ -0,0 +1,16 @@ + + + + +<\body> + + + + + + \ No newline at end of file diff --git a/devel/scheme/buffer/buffer-intro.en.tm b/devel/scheme/buffer/buffer-intro.en.tm new file mode 100644 index 0000000..da1ba32 --- /dev/null +++ b/devel/scheme/buffer/buffer-intro.en.tm @@ -0,0 +1,18 @@ + + + + +<\body> + + + \; + + + + + \ No newline at end of file diff --git a/devel/scheme/buffer/scheme-buffering.en.tm b/devel/scheme/buffer/scheme-buffering.en.tm new file mode 100644 index 0000000..937c8ec --- /dev/null +++ b/devel/scheme/buffer/scheme-buffering.en.tm @@ -0,0 +1,32 @@ + + + + +<\body> + buffers and views> + + <\traverse> + + + buffers|buffer-api.en.tm> + + views|view-api.en.tm> + + windows|window-api.en.tm> + + + + + + + +<\initial> + <\collection> + + + \ No newline at end of file diff --git a/devel/scheme/buffer/view-api.en.tm b/devel/scheme/buffer/view-api.en.tm new file mode 100644 index 0000000..24203c0 --- /dev/null +++ b/devel/scheme/buffer/view-api.en.tm @@ -0,0 +1,63 @@ + + + + +<\body> + views> + + <\explain> + + <|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> + Return the current view or . + + + <\explain> + buffer )> + <|explain> + This routine returns the buffer to which the view is + attached. + + + <\explain> + window )> + <|explain> + This routine returns the window in which the view is being + displayed or . + + + <\explain> + )> + + )> + + )> + <|explain> + All three routines return a view on the buffer . In the case + of , we systematically create a new view. The routine + first attempts to find an existing view on + which is not attached to a window; if no such view exists, + then a new one is created. The last routine 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. + + + + + + \ No newline at end of file diff --git a/devel/scheme/buffer/window-api.en.tm b/devel/scheme/buffer/window-api.en.tm new file mode 100644 index 0000000..025e730 --- /dev/null +++ b/devel/scheme/buffer/window-api.en.tm @@ -0,0 +1,74 @@ + + + + +<\body> + windows> + + <\explain> + windows> + <|explain> + This routine returns the list of all windows. + + + <\explain> + + <|explain> + Return the current window. The program may abort if there exists no + current window. + + + <\explain> + buffer )> + <|explain> + This routine returns the buffer which is currently being displayed in the + window . Warning: in the future, when a window will be + allowed to contain multiple buffers, this routine might be replaced by + buffers>. + + + <\explain> + view )> + <|explain> + This routine returns the view which is currently being displayed in the + window . Warning: in the future, when a window will be + allowed to contain multiple views, this routine might be replaced by + views>. + + + <\explain> + + )> + <|explain> + Display the buffer in the window . + + + <\explain> + )> + <|explain> + Display the view in the window . The program + may abort if the view was already attached to another window. + + + <\explain> + )> + <|explain> + Set th current focus to the window . The current + implementation is still a bit bugged and only correct if you want to + execute a sequence of commands under the assumption that + carries the focus and if you return the focus to the original window at + the end. + + + + + + \ No newline at end of file diff --git a/devel/scheme/scheme.en.tm b/devel/scheme/scheme.en.tm index 675f3ef..45e2dc2 100644 --- a/devel/scheme/scheme.en.tm +++ b/devel/scheme/scheme.en.tm @@ -1,4 +1,4 @@ - + @@ -15,11 +15,13 @@ + buffers and views|buffer/scheme-buffering.en.tm> + - - + + bibliography styles|bibliography/bibliography.en.tm>