Commit 6b6a014e authored by David O'Toole's avatar David O'Toole

make z-sorted drawing the default

parent 43f050d5
doc/class-diagram.png

29.8 KB | W: | H:

doc/class-diagram.png

32.6 KB | W: | H:

doc/class-diagram.png
doc/class-diagram.png
doc/class-diagram.png
doc/class-diagram.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
+--------------+ +-------------+
| QBuffer | | Quadrille |
+-----------+--+ +------+------+
| |
| +------+------+
| +-------+ Node +---------+---------------+---------------+---------+------+
| | +------+------+ | | | | |
| | | | | | | |
| | | | | | | |
+--------+--+--+ +------+------+ +-----+------+ +----+------+ +---+-------+ | +----+------+
| Buffer | | Phrase | | Prompt |-+ | Text | | Halo | | | Handle |
+--------------+ +-+----+------+ +-----+------+ | +-----------+ +-----------+ | +-----------+
| | | +--------+ |
+----------+ | | +-----+------+ | |
+----+ Tree +----------+ | | Entry | +----+---------+ |
| +----+-----+ | +-----+------+ | Shell-Prompt | +-------+---+
| | | | +--------------+ | Command |
+--+--+ +----+----+ | +-----+-------+ +-----------+
| Menu| | Menubar | | | Entry |
+-----+ +---------+ | | Subclasses |
| | ... |
| | |
| +-------------+
|
+-------------+--------------+-------------+
+-------------+ +-------------+
| QBuffer | | Quadrille |
+------+------+ +------+------+
| |
| +------+------+
| +-------+ Node +---------+---------------+---------------+---------+------+----------+
| | +------+------+ | | | | | |
| | | | | | | | |
| | | | | | | | |
+------+----+--+ +------+------+ +-----+------+ +----+------+ +---+-------+ | +----+------+ |
| Buffer | | Phrase | | Prompt |-+ | Text | | Halo | | | Handle | |
+--------------+ +-+----+------+ +-----+------+ | +-----------+ +-----------+ | +-----------+ |
| | | +--------+ | |
+----------+ | | +-----+------+ | | |
+----+ Tree +----------+ | | Entry | +----+---------+ | |
| +----+-----+ | +-----+------+ | Shell-Prompt | +-------+-----+ +------+------+
| | | | +--------------+ | Command | | Button |
+--+---+ +---+-----+ | +-----+-------+ +-------+-----+ +----+--------+
| Menu | | Menubar | | | Entry | | |
+------+ +---------+ | | Subclasses | +-------+-----+ +----+--------+
| | ... | | Command | | Button |
| +-------------+ | Subclasses | | Subclasses |
| | ... | | ... |
| +-------------+ +-------------+
+-------------+--------------+-------------+
| | | |
+------+----+ +-----+-----+ +-----+-----+ +----+------+
| Titlebar | | Frame | | Modeline | | Shell |
| Titlebar | | Frame | | Modeline | | Shell |
+-----------+ +-----------+ +-----------+ +-----------+
\ No newline at end of file
|
+-----+-----+
| Dialog |
+-----+-----+
|
|
+--------------+
| Dialog |
| Subclasses |
| ... |
+--------------+
\ No newline at end of file
......@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-04-12 Wed 12:16 -->
<!-- 2017-04-12 Wed 16:47 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Xelf: The Graphical User Interface Toolkit</title>
......@@ -355,7 +355,7 @@ for the JavaScript code in this tag.
<li><a href="#orgeda495b">Data entry prompt</a></li>
<li><a href="#org897bacb">System terminal</a></li>
<li><a href="#org6c5a725">Rendering Smalltalk style controls</a></li>
<li><a href="#orgbdfe093">Layout</a></li>
<li><a href="#org1e84110">Layout</a></li>
<li><a href="#orgc8c5c02">Duplicating a node&#xa0;&#xa0;&#xa0;<span class="tag"><span class="ccl">ccl</span>&#xa0;<span class="sbcl">sbcl</span></span></a></li>
<li><a href="#org1dfda0a">Visual Lisp lists</a>
<ul>
......@@ -363,7 +363,7 @@ for the JavaScript code in this tag.
<li><a href="#org692626f">Manipulability</a></li>
<li><a href="#orgd511959">Orientation</a></li>
<li><a href="#org6b6c188">Inputs</a></li>
<li><a href="#org1e84110">Layout</a></li>
<li><a href="#org826bf0b">Layout</a></li>
<li><a href="#org896c5ce">Phrase / S-expression correspondence</a></li>
</ul>
</li>
......@@ -484,10 +484,12 @@ every BUFFER is also a NODE.)
<div class="org-src-container">
<pre class="src src-lisp"> (<span style="color: #f47321;">defclass</span> <span style="color: #83a525;">buffer</span> (node qbuffer)
((name <span style="color: #db7093;">:initform</span> nil)
(object-bag <span style="color: #db7093;">:initform</span> nil <span style="color: #db7093;">:accessor</span> object-bag <span style="color: #db7093;">:initarg</span> <span style="color: #db7093;">:object-bag</span>)
(zbuffer <span style="color: #db7093;">:initform</span> (make-array 100 <span style="color: #db7093;">:adjustable</span> t <span style="color: #db7093;">:initial-element</span> nil <span style="color: #db7093;">:fill-pointer</span> t)
<span style="color: #db7093;">:accessor</span> zbuffer
<span style="color: #db7093;">:documentation</span> <span style="color: #666666;">"Temporary array of z-sorted nodes for rendering."</span>
<span style="color: #db7093;">:initarg</span> <span style="color: #db7093;">:zbuffer</span>)
(z-sort-p <span style="color: #db7093;">:initform</span> t <span style="color: #db7093;">:initarg</span> <span style="color: #db7093;">:z-sort-p</span> <span style="color: #db7093;">:accessor</span> z-sort-p
<span style="color: #db7093;">:documentation</span> <span style="color: #666666;">"When non-nil, draw objects in correct Z-order."</span>)
(selection <span style="color: #db7093;">:initform</span> nil)
(buffer-name <span style="color: #db7093;">:initform</span> <span style="color: #8b7d7b;">"*untitled-buffer*"</span> <span style="color: #db7093;">:accessor</span> buffer-name <span style="color: #db7093;">:initarg</span> <span style="color: #db7093;">:buffer-name</span>)
(variables <span style="color: #db7093;">:initform</span> nil <span style="color: #db7093;">:accessor</span> variables <span style="color: #db7093;">:initarg</span> <span style="color: #db7093;">:variables</span>)
......@@ -1201,7 +1203,8 @@ This section is obsolete and will be removed in the future.
(draw-box 0 0 width height
<span style="color: #db7093;">:color</span> background-color)))
<span style="color: #999999; font-style: italic;">;; </span><span style="color: #7f7f7f; font-style: italic;">now draw the object layer</span>
(<span style="color: #f47321;">if</span> (shell-p self)
(<span style="color: #f47321;">if</span> (or (shell-p self)
(z-sort-p self))
(draw-object-layer-z-sorted self)
(draw-object-layer self))
<span style="color: #999999; font-style: italic;">;; </span><span style="color: #7f7f7f; font-style: italic;">draw shell</span>
......@@ -3337,9 +3340,9 @@ hybrid GUI inspired by MIT Scratch and its derivatives.
</div>
</div>
<div id="outline-container-orgbdfe093" class="outline-2">
<h2 id="orgbdfe093">Layout</h2>
<div class="outline-text-2" id="text-orgbdfe093">
<div id="outline-container-org1e84110" class="outline-2">
<h2 id="org1e84110">Layout</h2>
<div class="outline-text-2" id="text-org1e84110">
<div class="org-src-container">
<pre class="src src-lisp"> (<span style="color: #f47321;">defmethod</span> <span style="color: #9370db;">draw-ghost</span> ((self node))
(<span style="color: #f47321;">with-slots</span> (x y width height) self
......@@ -3651,9 +3654,9 @@ hybrid GUI inspired by MIT Scratch and its derivatives.
</div>
</div>
<div id="outline-container-org1e84110" class="outline-3">
<h3 id="org1e84110">Layout</h3>
<div class="outline-text-3" id="text-org1e84110">
<div id="outline-container-org826bf0b" class="outline-3">
<h3 id="org826bf0b">Layout</h3>
<div class="outline-text-3" id="text-org826bf0b">
<div class="org-src-container">
<pre class="src src-lisp"> (<span style="color: #f47321;">defmethod</span> <span style="color: #9370db;">header-height</span> ((self phrase)) 0)
......@@ -5851,7 +5854,7 @@ hybrid GUI inspired by MIT Scratch and its derivatives.
</div>
<div id="postamble" class="status">
<p class="author">Author: David O'Toole &lt;dto@xelf.me&gt;</p>
<p class="date">Created: 2017-04-12 Wed 12:16</p>
<p class="date">Created: 2017-04-12 Wed 16:47</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
......
......@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-04-12 Wed 12:31 -->
<!-- 2017-04-12 Wed 17:17 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Xelf: eXtensible Emacs-Like Facility</title>
......@@ -420,7 +420,7 @@ for the JavaScript code in this tag.
<li><a href="#org17d29ff">Using UUIDs</a></li>
<li><a href="#org2fa1643">Destroying objects</a></li>
<li><a href="#org38918ba">Bounding box method</a></li>
<li><a href="#orgfc42e9f">Layout</a></li>
<li><a href="#orgc88fdb1">Layout</a></li>
<li><a href="#org67fccd3">Geometry utilities</a></li>
<li><a href="#orgf538113">Collision geometry tests</a></li>
<li><a href="#orgf9c4525">Movement</a></li>
......@@ -457,8 +457,8 @@ for the JavaScript code in this tag.
<li><a href="#org4fe6823">Physical size and nominal size</a></li>
<li><a href="#orga631364">Size measured in OpenGL coordinate units</a></li>
<li><a href="#orgc7c3eda">Scaling output to the system window</a></li>
<li><a href="#orgdae9c7c">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></a></li>
<li><a href="#org400db1e">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></a></li>
<li><a href="#org400db1e">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></a></li>
<li><a href="#orgb7e7ed7">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></a></li>
</ul>
</li>
<li><a href="#org64777c1">Moving the camera in orthographic projection</a></li>
......@@ -498,8 +498,8 @@ for the JavaScript code in this tag.
<li><a href="#org881f6e5">Emulated vertex color&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></a></li>
<li><a href="#org36bf50a">Image objects</a>
<ul>
<li><a href="#org0561f03">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></a></li>
<li><a href="#org6dcafed">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></a></li>
<li><a href="#org6dcafed">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></a></li>
<li><a href="#org921d5df">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></a></li>
<li><a href="#orgea58629">User-level image drawing function</a></li>
</ul>
</li>
......@@ -517,7 +517,7 @@ for the JavaScript code in this tag.
<li><a href="#org07d7d83">Node wrapper class</a>
<ul>
<li><a href="#org435c738">Destruction</a></li>
<li><a href="#orgc88fdb1">Layout</a></li>
<li><a href="#org503cdb9">Layout</a></li>
<li><a href="#org6ea41cc">Making one or more nodes active&#xa0;&#xa0;&#xa0;<span class="tag"><span class="obsolete">obsolete</span></span></a></li>
<li><a href="#orgeca93d1">Automatic node sizing</a></li>
<li><a href="#org270b2a7">Scaling a node with respect to its image</a></li>
......@@ -2860,9 +2860,9 @@ structure, and the Object Database.
</div>
</div>
<div id="outline-container-orgfc42e9f" class="outline-3">
<h3 id="orgfc42e9f">Layout</h3>
<div class="outline-text-3" id="text-orgfc42e9f">
<div id="outline-container-orgc88fdb1" class="outline-3">
<h3 id="orgc88fdb1">Layout</h3>
<div class="outline-text-3" id="text-orgc88fdb1">
<div class="org-src-container">
<pre class="src src-lisp"> (<span style="color: #f47321;">defmethod</span> <span style="color: #9370db;">layout</span> ((self quadrille)) nil)
</pre>
......@@ -4071,9 +4071,9 @@ increases.
</div>
</div>
<div id="outline-container-orgdae9c7c" class="outline-4">
<h4 id="orgdae9c7c">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></h4>
<div class="outline-text-4" id="text-orgdae9c7c">
<div id="outline-container-org400db1e" class="outline-4">
<h4 id="org400db1e">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></h4>
<div class="outline-text-4" id="text-org400db1e">
<div class="org-src-container">
<pre class="src src-lisp"> #+(or linux darwin win32
(and win32 64-bit) <span style="color: #999999; font-style: italic;">;; </span><span style="color: #7f7f7f; font-style: italic;">sbcl</span>
......@@ -4096,9 +4096,9 @@ increases.
</div>
</div>
<div id="outline-container-org400db1e" class="outline-4">
<h4 id="org400db1e">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></h4>
<div class="outline-text-4" id="text-org400db1e">
<div id="outline-container-orgb7e7ed7" class="outline-4">
<h4 id="orgb7e7ed7">Orthographic projection&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></h4>
<div class="outline-text-4" id="text-orgb7e7ed7">
<div class="org-src-container">
<pre class="src src-lisp"> #+android
(<span style="color: #f47321;">defun</span> <span style="color: #9370db;">project-orthographically</span> (<span style="color: #83a525;">&amp;optional</span> (depth-test t))
......@@ -5765,9 +5765,9 @@ This is for OpenGL ES 2 on Android, and not currently documented.
</div>
</div>
<div id="outline-container-org0561f03" class="outline-3">
<h3 id="org0561f03">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></h3>
<div class="outline-text-3" id="text-org0561f03">
<div id="outline-container-org6dcafed" class="outline-3">
<h3 id="org6dcafed">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="linux">linux</span>&#xa0;<span class="mac">mac</span>&#xa0;<span class="windows">windows</span></span></h3>
<div class="outline-text-3" id="text-org6dcafed">
<div class="org-src-container">
<pre class="src src-lisp"> #+(or linux darwin win32
(and win32 64-bit) <span style="color: #999999; font-style: italic;">;; </span><span style="color: #7f7f7f; font-style: italic;">sbcl</span>
......@@ -5862,9 +5862,9 @@ This is for OpenGL ES 2 on Android, and not currently documented.
</div>
</div>
<div id="outline-container-org6dcafed" class="outline-3">
<h3 id="org6dcafed">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></h3>
<div class="outline-text-3" id="text-org6dcafed">
<div id="outline-container-org921d5df" class="outline-3">
<h3 id="org921d5df">Drawing images&#xa0;&#xa0;&#xa0;<span class="tag"><span class="android">android</span></span></h3>
<div class="outline-text-3" id="text-org921d5df">
<div class="org-src-container">
<pre class="src src-lisp"> #+android
(<span style="color: #f47321;">defun</span> <span style="color: #9370db;">ensure-arrays</span> ()
......@@ -6586,9 +6586,9 @@ subclasses.)
</div>
</div>
<div id="outline-container-orgc88fdb1" class="outline-3">
<h3 id="orgc88fdb1">Layout</h3>
<div class="outline-text-3" id="text-orgc88fdb1">
<div id="outline-container-org503cdb9" class="outline-3">
<h3 id="org503cdb9">Layout</h3>
<div class="outline-text-3" id="text-org503cdb9">
<div class="org-src-container">
<pre class="src src-lisp"> (<span style="color: #f47321;">defmethod</span> <span style="color: #9370db;">layout</span> <span style="color: #db7093;">:after</span> ((self node))
(<span style="color: #f47321;">with-slots</span> (halo) self
......@@ -8131,7 +8131,7 @@ literate source on that page. See also <a href="dictionary/WILL-OBSTRUCT-P.html"
</div>
<div id="postamble" class="status">
<p class="author">Author: David O'Toole &lt;dto@xelf.me&gt;</p>
<p class="date">Created: 2017-04-12 Wed 12:31</p>
<p class="date">Created: 2017-04-12 Wed 17:17</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
......
......@@ -11,10 +11,12 @@
;; [[file:~/xelf/gui.org::*Class%20declaration][Class declaration:1]]
(defclass buffer (node qbuffer)
((name :initform nil)
(object-bag :initform nil :accessor object-bag :initarg :object-bag)
(zbuffer :initform (make-array 100 :adjustable t :initial-element nil :fill-pointer t)
:accessor zbuffer
:documentation "Temporary array of z-sorted nodes for rendering."
:initarg :zbuffer)
(z-sort-p :initform t :initarg :z-sort-p :accessor z-sort-p
:documentation "When non-nil, draw objects in correct Z-order.")
(selection :initform nil)
(buffer-name :initform "*untitled-buffer*" :accessor buffer-name :initarg :buffer-name)
(variables :initform nil :accessor variables :initarg :variables)
......@@ -650,7 +652,8 @@
(draw-box 0 0 width height
:color background-color)))
;; now draw the object layer
(if (shell-p self)
(if (or (shell-p self)
(z-sort-p self))
(draw-object-layer-z-sorted self)
(draw-object-layer self))
;; draw shell
......
......@@ -56,10 +56,12 @@ every BUFFER is also a NODE.)
#+begin_src lisp
(defclass buffer (node qbuffer)
((name :initform nil)
(object-bag :initform nil :accessor object-bag :initarg :object-bag)
(zbuffer :initform (make-array 100 :adjustable t :initial-element nil :fill-pointer t)
:accessor zbuffer
:documentation "Temporary array of z-sorted nodes for rendering."
:initarg :zbuffer)
(z-sort-p :initform t :initarg :z-sort-p :accessor z-sort-p
:documentation "When non-nil, draw objects in correct Z-order.")
(selection :initform nil)
(buffer-name :initform "*untitled-buffer*" :accessor buffer-name :initarg :buffer-name)
(variables :initform nil :accessor variables :initarg :variables)
......@@ -674,7 +676,8 @@ This section is obsolete and will be removed in the future.
(draw-box 0 0 width height
:color background-color)))
;; now draw the object layer
(if (shell-p self)
(if (or (shell-p self)
(z-sort-p self))
(draw-object-layer-z-sorted self)
(draw-object-layer self))
;; draw shell
......
......@@ -775,7 +775,7 @@ with-timestamp
with-visual-slots
without-style-warnings
write-sexp-to-file
x y z
x
xblock
xelf
xelf-datagram-p
......@@ -783,5 +783,8 @@ xelf-object
xelf-object-p
xelfp
xnode
y
z
z-sort-p
))
* Task list
** TODO [#A] create buffer switch menu
** TODO [#A] fix data entry widget validation
** TODO [#A] make each buffer have its own command-history?
** TODO [#A] button class
** TODO [#A] checkbox
** TODO [#A] radio buttons
** TODO [#A] dropdown list
** TODO [#A] fix dialogs
** TODO [#A] fix data entry widget validation
** TODO [#A] create buffer switch menu
** TODO [#B] context-menus
** TODO [#A] fix disappearing shell prompt when clicking shell
** TODO [#A] fix dialogs properties
** TODO [#A] scrolling the buffer window
** TODO [#A] fix any move handle should move group
** TODO [#B] context-menus
** TODO [#B] fix can't drag item out of shell
** TODO [#B] command undo/redo
** TODO [#A] scrolling the buffer window
** TODO [#B] hand me a tile / reference
** TODO [#B] save-buffer
** TODO [#B] load-buffer
......@@ -30,10 +31,10 @@
** TODO [#B] (paste (get-selection (find-buffer "palette")))
** TODO [#B] recover sidebar
** TODO [#B] test multiline text edit
** TODO [#A] fix any move handle should move group
** TODO [#B] choose and export more accessor names for buffer/node slots
** TODO [#B] Document how to clear all caches
** TODO [#B] should block widgets be marked as :collision-type nil?
** TODO [#C] change :no-background to :inhibit-background-p
** TODO [#C] fix POSITION-WITHIN-PARENT error on pressing TAB
** TODO [#C] right click pop up menus
** TODO [#C] pinnable pop up menus
......@@ -380,3 +381,13 @@
:END:
*** DONE rename to define-visual-macro and with-visual-slots and define nice accessors
CLOSED: [2017-04-12 Wed 12:22]
** DONE [#A] make z-sorted drawing the default
CLOSED: [2017-04-12 Wed 16:46]
:PROPERTIES:
:ARCHIVE_TIME: 2017-04-12 Wed 16:46
:ARCHIVE_FILE: ~/xelf/tasks.org
:ARCHIVE_OLPATH: Task list
:ARCHIVE_CATEGORY: tasks
:ARCHIVE_TODO: DONE
:END:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment