From 4414cc1db82e420d6d0b0bd3a3cf23be9a205d87 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Sun, 12 Jul 1998 09:21:16 +0000
Subject: [PATCH] Added wxTreeLayout for wxWindows 2.0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 utils/wxtree/docs/back.gif     | Bin 0 -> 225 bytes
 utils/wxtree/docs/books.gif    | Bin 0 -> 433 bytes
 utils/wxtree/docs/classes.tex  | 304 +++++++++++++++++++++++
 utils/wxtree/docs/contents.gif | Bin 0 -> 231 bytes
 utils/wxtree/docs/forward.gif  | Bin 0 -> 164 bytes
 utils/wxtree/docs/tex2rtf.ini  |  28 +++
 utils/wxtree/docs/tree.bib     |   8 +
 utils/wxtree/docs/treetst.bmp  | Bin 0 -> 14982 bytes
 utils/wxtree/docs/treetst.gif  | Bin 0 -> 2490 bytes
 utils/wxtree/docs/up.gif       | Bin 0 -> 137 bytes
 utils/wxtree/docs/wxtree.tex   |  73 ++++++
 utils/wxtree/lib/dummy         |   1 +
 utils/wxtree/src/makefile.b32  |  71 ++++++
 utils/wxtree/src/makefile.bcc  |  96 +++++++
 utils/wxtree/src/makefile.dos  | 118 +++++++++
 utils/wxtree/src/makefile.g95  |  48 ++++
 utils/wxtree/src/makefile.nt   | 133 ++++++++++
 utils/wxtree/src/makefile.sc   |  73 ++++++
 utils/wxtree/src/makefile.unx  | 133 ++++++++++
 utils/wxtree/src/makefile.wat  |  49 ++++
 utils/wxtree/src/mondrian.ico  | Bin 0 -> 766 bytes
 utils/wxtree/src/test.cpp      | 200 +++++++++++++++
 utils/wxtree/src/test.def      |   8 +
 utils/wxtree/src/test.h        |  54 ++++
 utils/wxtree/src/test.rc       |   3 +
 utils/wxtree/src/wxtree.cpp    | 440 +++++++++++++++++++++++++++++++++
 utils/wxtree/src/wxtree.h      | 135 ++++++++++
 27 files changed, 1975 insertions(+)
 create mode 100644 utils/wxtree/docs/back.gif
 create mode 100644 utils/wxtree/docs/books.gif
 create mode 100644 utils/wxtree/docs/classes.tex
 create mode 100644 utils/wxtree/docs/contents.gif
 create mode 100644 utils/wxtree/docs/forward.gif
 create mode 100644 utils/wxtree/docs/tex2rtf.ini
 create mode 100644 utils/wxtree/docs/tree.bib
 create mode 100644 utils/wxtree/docs/treetst.bmp
 create mode 100644 utils/wxtree/docs/treetst.gif
 create mode 100644 utils/wxtree/docs/up.gif
 create mode 100644 utils/wxtree/docs/wxtree.tex
 create mode 100644 utils/wxtree/lib/dummy
 create mode 100644 utils/wxtree/src/makefile.b32
 create mode 100644 utils/wxtree/src/makefile.bcc
 create mode 100644 utils/wxtree/src/makefile.dos
 create mode 100644 utils/wxtree/src/makefile.g95
 create mode 100644 utils/wxtree/src/makefile.nt
 create mode 100644 utils/wxtree/src/makefile.sc
 create mode 100644 utils/wxtree/src/makefile.unx
 create mode 100644 utils/wxtree/src/makefile.wat
 create mode 100644 utils/wxtree/src/mondrian.ico
 create mode 100644 utils/wxtree/src/test.cpp
 create mode 100644 utils/wxtree/src/test.def
 create mode 100644 utils/wxtree/src/test.h
 create mode 100644 utils/wxtree/src/test.rc
 create mode 100644 utils/wxtree/src/wxtree.cpp
 create mode 100644 utils/wxtree/src/wxtree.h

diff --git a/utils/wxtree/docs/back.gif b/utils/wxtree/docs/back.gif
new file mode 100644
index 0000000000000000000000000000000000000000..8a61076d3ba74bdedc1d24f60c3d1f5a361a6cee
GIT binary patch
literal 225
zcmV<703QEGNk%v~VLt#E0Pz3-zrVld=jU&4Z(9HWEC2ui06zd20008IjE||y?GK}z
zNf>~$-n{z{YJwGn=81mem9{RpmcUHc_KoNIPRH~B4DyD9p%LJl6@Sa4^Epcbno6kk
zD5XxT&EQg7><X(t<v2<zGtFvpm%NS3x723V`)<ec-&(({)sqHiQ-=rlS4S8Ibd!~%
zh!dt38EIxWIOn%1Dfj2b8T!~6YUzo%W;uEjc(%yY2)pMhb!7`xd#gK?yX%Y7`zwsb
bGHgs7FrvK7-0b`e9qpVfU2T0WT>t<(Iwfoo

literal 0
HcmV?d00001

diff --git a/utils/wxtree/docs/books.gif b/utils/wxtree/docs/books.gif
new file mode 100644
index 0000000000000000000000000000000000000000..26ff394df62cbdb103908648614173654ec6d7eb
GIT binary patch
literal 433
zcmZ?wbhEHb)Mn6T*vtR|`@wiWnA#8I?caakz=4K_hW|kE{|x`Z6p#k8fI#sl3nK#q
zJA)2LC&&y2mVX~kc&^@S@%pT_yTXfJi2|GDp6e!c+BKZ&%hNhxEdIWs;JKB{`SQ<<
zPEHBjEDpTA+u5C@f_Kd_OY(VT@*wQ`^@ZOn?o==|n=f}d-eJDgYH!-kgw~pQIm^yJ
zXXjvP=CI1BsxGLD%W7s3YHF40W?)U_XRRqLV(6RR*epGzV`f*;yy>Y6CaJQe#!Z{C
zG>UD-^ymfsl8Zb1&6`&m_|BiWyJ*Ao%}m=4ZI5W$CBCQ1cE#btXOFO~5xrb_#{Jx*
zoonY*JxIO&=++(K#Sd;geEISGLb2|JE2D3|`n+=W_r6@~gZ$Dxn*aVxe61F6#H#M4
z+#(G(M&FGcoR<~PT+2yhbBbrNeE0fzVUh`tc%sLY@Sv%-ybAJtM`mzESx;fke0N#G
zhwFr(q4BvrDU)5js(vjKIV-p&b=Q1{zHc=TUM!ikY^BWIkV&5=g{jIH2eop2JLI}4
V)i6YMM%m#@+X@~Z>t$fD1^{??#6$o9

literal 0
HcmV?d00001

diff --git a/utils/wxtree/docs/classes.tex b/utils/wxtree/docs/classes.tex
new file mode 100644
index 0000000000..98b9e89ee2
--- /dev/null
+++ b/utils/wxtree/docs/classes.tex
@@ -0,0 +1,304 @@
+\chapter{wxTreeLayout Class Reference}
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}
+
+\section{\class{wxTreeLayout}}\label{wxtreelayout}
+
+This abstract class is used for drawing a tree. You must derive a new
+class from this, and define member functions to access the data that
+wxTreeLayout needs.
+
+Nodes are identified by long integer identifiers. The derived class
+communicates the actual tree structure to wxTreeLayout by defining \helprefn{wxTreeLayout::GetChildren}{getchildren}\rtfsp
+and \helprefn{wxTreeLayout::GetNodeParent}{getnodeparent} functions.
+
+The application should call \helprefn{DoLayout}{dolayout} to do the tree
+layout. Depending on how the derived class has been defined, either
+\rtfsp\helprefn{wxTreeLayout::Draw}{draw} must be called (for example by the OnPaint member
+of a wxScrolledWindow) or the application-defined drawing code should be called
+as normal.
+
+For example, if you have an image drawing system already defined, you
+may want wxTreeLayout to position existing node images in that system. So you
+just need a way for wxTreeLayout to set the node image positions according to
+the layout algorithm, and the rest will be done by your own image drawing
+system.
+
+\wxheading{Derived from}
+
+wxObject
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxTreeLayout::wxTreeLayout}
+
+\func{}{wxTreeLayout}{\void}
+
+Constructor.
+
+\membersection{wxTreeLayout::ActivateNode}\label{activatenode}
+
+\func{void}{ActivateNode}{\param{long}{ id}, \param{bool }{active}}
+
+Define this so wxTreeLayout can turn nodes on and off for drawing purposes
+(not all nodes may be connected in the tree). See also \helprefn{NodeActive}{nodeactive}.
+
+\membersection{wxTreeLayout::CalcLayout}
+
+\func{void}{CalcLayout}{\param{long}{ id}, \param{int}{ level}}
+
+Private function for laying out a branch.
+
+\membersection{wxTreeLayout::DoLayout}\label{dolayout}
+
+\func{void}{DoLayout}{\param{wxDC\&}{ dc}, \param{long}{ topNode = -1}}
+
+Calculates the layout for the tree, optionally specifying the top node.
+
+\membersection{wxTreeLayout::Draw}\label{draw}
+
+\func{void}{Draw}{\param{wxDC\&}{ dc}}
+
+Call this to let wxTreeLayout draw the tree itself, once the layout has been
+calculated with \helprefn{DoLayout}{dolayout}.
+
+\membersection{wxTreeLayout::DrawBranch}
+
+\func{void}{DrawBranch}{\param{long}{ from}, \param{long}{ to}, \param{wxDC\&}{ dc}}
+
+Defined by wxTreeLayout to draw an arc between two nodes.
+
+\membersection{wxTreeLayout::DrawBranches}
+
+\func{void}{DrawBranches}{\param{wxDC\&}{ dc}}
+
+Defined by wxTreeLayout to draw the arcs between nodes.
+
+\membersection{wxTreeLayout::DrawNode}
+
+\func{void}{DrawNode}{\param{long}{ id}, \param{wxDC\&}{ dc}}
+
+Defined by wxTreeLayout to draw a node.
+
+\membersection{wxTreeLayout::DrawNodes}
+
+\func{void}{DrawNodes}{\param{wxDC\&}{ dc}}
+
+Defined by wxTreeLayout to draw the nodes.
+
+\membersection{wxTreeLayout::GetChildren}\label{getchildren}
+
+\func{void}{GetChildren}{\param{long}{ id}, \param{wxList \&}{list}}
+
+Must be defined to return the children of node {\it id} in the given list
+of integers.
+
+\membersection{wxTreeLayout::GetNextNode}\label{getnextnode}
+
+\func{long}{GetNextNode}{\param{long}{ id}}
+
+Must be defined to return the next node after {\it id}, so that wxTreeLayout can
+iterate through all relevant nodes. The ordering is not important.
+The function should return -1 if there are no more nodes.
+
+\membersection{wxTreeLayout::GetNodeName}
+
+\constfunc{wxString}{GetNodeName}{\param{long}{ id}}
+
+May optionally be defined to get a node's name (for example if leaving
+the drawing to wxTreeLayout).
+
+\membersection{wxTreeLayout::GetNodeSize}
+
+\constfunc{void}{GetNodeSize}{\param{long}{ id}, \param{long*}{ x}, \param{long*}{ y}}
+
+Can be defined to indicate a node's size, or left to wxTreeLayout to use the
+name as an indication of size.
+
+\membersection{wxTreeLayout::GetNodeParent}\label{getnodeparent}
+
+\constfunc{long}{GetNodeParent}{\param{long}{ id}}
+
+Must be defined to return the parent node of {\it id}.
+The function should return -1 if there is no parent.
+
+\membersection{wxTreeLayout::GetNodeX}
+
+\constfunc{long}{GetNodeX}{\param{long}{ id}}
+
+Must be defined to return the current X position of the node. Note that
+coordinates are assumed to be at the top-left of the node so some conversion
+may be necessary for your application.
+
+\membersection{wxTreeLayout::GetNodeY}
+
+\constfunc{long}{GetNodeY}{\param{long}{ id}}
+
+Must be defined to return the current Y position of the node. Note that
+coordinates are assumed to be at the top-left of the node so some conversion
+may be necessary for your application.
+
+\membersection{wxTreeLayout::GetLeftMargin}
+
+\constfunc{long}{GetLeftMargin}{\void}
+
+Gets the left margin set with \helprefn{SetMargins}{setmargins}.
+
+\membersection{wxTreeLayout::GetOrientation}
+
+\constfunc{bool}{GetOrientation}{\void}
+
+Gets the orientation: TRUE means top-to-bottom, FALSE means left-to-right (the default).
+
+\membersection{wxTreeLayout::GetTopMargin}
+
+\constfunc{long}{GetTopMargin}{\void}
+
+Gets the top margin set with \helprefn{SetMargins}{setmargins}.
+
+\membersection{wxTreeLayout::GetTopNode}
+
+\constfunc{long}{GetTopNode}{\void}
+
+wxTreeLayout calls this to get the top of the tree. Don't redefine this; call
+\rtfsp\helprefn{SetTopNode}{settopnode} instead before calling \helprefn{DoLayout}{dolayout}.
+
+\membersection{wxTreeLayout::GetXSpacing}
+
+\constfunc{long}{GetXSpacing}{\void}
+
+Gets the horizontal spacing between nodes.
+
+\membersection{wxTreeLayout::GetYSpacing}
+
+\constfunc{long}{GetYSpacing}{\void}
+
+Gets the vertical spacing between nodes.
+
+\membersection{wxTreeLayout::Initialize}
+
+\func{void}{Initialize}{\void}
+
+Initializes wxTreeLayout. Call from application or overridden {\bf Initialize}
+or constructor.
+
+\membersection{wxTreeLayout::NodeActive}\label{nodeactive}
+
+\func{bool}{NodeActive}{\param{long}{ id}}
+
+Define this so wxTreeLayout can know which nodes are to be drawn (not all
+nodes may be connected in the tree). See also \helprefn{ActivateNode}{activatenode}.
+
+\membersection{wxTreeLayout::SetNodeName}
+
+\func{void}{SetNodeName}{\param{long}{ id}, \param{const wxString\& }{ name}}
+
+May optionally be defined to set a node's name.
+
+\membersection{wxTreeLayout::SetNodeX}
+
+\func{void}{SetNodeX}{\param{long}{ id}, \param{long}{ x}}
+
+Must be defined to set the current X position of the node. Note that
+coordinates are assumed to be at the top-left of the node so some conversion
+may be necessary for your application.
+
+\membersection{wxTreeLayout::SetNodeY}
+
+\func{void}{SetNodeY}{\param{long}{ id}, \param{long}{ y}}
+
+Must be defined to set the current Y position of the node. Note that
+coordinates are assumed to be at the top-left of the node so some conversion
+may be necessary for your application.
+
+\membersection{wxTreeLayout::SetOrientation}
+
+\func{void}{SetOrientation}{\param{bool}{ orientation}}
+
+Sets the tree orientation: TRUE means top-to-bottom, FALSE means left-to-right (the default).
+
+\membersection{wxTreeLayout::SetTopNode}\label{settopnode}
+
+\func{void}{SetTopNode}{\param{long}{ id}}
+
+Call this to identify the top of the tree to wxTreeLayout.
+
+\membersection{wxTreeLayout::SetSpacing}
+
+\func{void}{SetSpacing}{\param{long}{ x}, \param{long}{ y}}
+
+Sets the horizontal and vertical spacing between nodes in the tree.
+
+\membersection{wxTreeLayout::SetMargins}\label{setmargins}
+
+\func{void}{SetMargins}{\param{long}{ x}, \param{long}{ y}}
+
+Sets the left and top margins of the whole tree.
+
+\section{\class{wxStoredTree}}\label{wxstoredtree}
+
+wxStoredTree provides storage for node labels, position and client data. It also provides hit-testing
+(which node a mouse event occurred on). It is usually a more convenient class to use than wxTreeLayout.
+
+\wxheading{Derived from}
+
+\helpref{wxTreeLayout}{wxtreelayout}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxStoredTree::wxStoredTree}
+
+\func{}{wxStoredTree}{\param{int }{noNodes = 200}}
+
+Constructor. Specify the maximum number of nodes to be allocated.
+
+\membersection{wxStoredTree::AddChild}\label{wxstoredtreeaddchild}
+
+\func{long}{AddChild}{\param{const wxString\&}{ name}, \param{const wxString\&}{ parent = ""}}
+
+Adds a child with a given parent, returning the node id.
+
+\membersection{wxStoredTree::GetClientData}\label{wxstoredtreegetclientdata}
+
+\constfunc{long}{GetClientData}{\param{long}{ id}}
+
+Gets the client data for the given node.
+
+\membersection{wxStoredTree::GetNode}\label{wxstoredtreegetnode}
+
+\constfunc{wxStoredNode*}{GetNode}{\param{long}{ id}}
+
+Returns the wxStoredNode object for the given node id.
+
+\membersection{wxStoredTree::GetNodeCount}\label{wxstoredtreegetnodecount}
+
+\constfunc{int}{GetNodeCount}{\void}
+
+Returns the current number of nodes.
+
+\membersection{wxStoredTree::GetNumNodes}\label{wxstoredtreegetnumnodes}
+
+\constfunc{int}{GetNumNodes}{\void}
+
+Returns the maximum number of nodes.
+
+\membersection{wxStoredTree::HitTest}\label{wxstoredtreehittest}
+
+\func{wxString}{HitTest}{\param{wxMouseEvent\&}{ event}, \param{wxDC\& }{dc}}
+
+Returns a string with the node name corresponding to the position of the mouse event, or the empty string if no node
+was detected.
+
+\membersection{wxStoredTree::NameToId}\label{wxstoredtreenametoid}
+
+\func{long}{NameToId}{\param{const wxString\&}{ name}}
+
+Returns the id for the given node name, or -1 if there was no such node.
+
+\membersection{wxStoredTree::SetClientData}\label{wxstoredtreesetclientdata}
+
+\func{void}{SetClientData}{\param{long}{ id}, \param{long}{ clientData}}
+
+Sets client data for the given node.
+
+
diff --git a/utils/wxtree/docs/contents.gif b/utils/wxtree/docs/contents.gif
new file mode 100644
index 0000000000000000000000000000000000000000..3dddfa3dd5f0c652e8b27cd6c29e1fdd49ced5a8
GIT binary patch
literal 231
zcmV<D02u#ANk%v~VL<>G0Pz3-zrVld=jU&4Z(9HWEC2ui06_p40008OjE||y?GK}z
zO&EZ)-n{z{a)K3v=81;mmA0<AmhVhw@iyc`&3|{61I~6YqK~98Vw5OmQ-xfDbjF=-
z8N_A**6fx0#r(KaDON}}o43Sv(iTm3lx}qOEl<})aVL6>S4Fj_r^UyThZDG{h6k9m
zHI_(7spd!5_$SH6m{<Auh$$AQ#YFX|N5^T`76u^M6AJ<hP-}aOo2$Fa+xtrD8!SAm
hOG|u=TnwDd%p5ZU9W6agU2T1B9e};f-Q8UP06VhvYa0Ln

literal 0
HcmV?d00001

diff --git a/utils/wxtree/docs/forward.gif b/utils/wxtree/docs/forward.gif
new file mode 100644
index 0000000000000000000000000000000000000000..9c81e8c92fed7fe851ce02e7854dc26a58eae9b2
GIT binary patch
literal 164
zcmV;V09*e@Nk%v~VI=?<0Pz3-zrVld=jU&4Z(9HWEC2ui03`qz0007gjE||y?Z1Qp
zwAzdF6*A}#V%!v#-{_g@)>Q-cu3}3Ku`2^Nfa3dZ+VyHW%gtsZ`jV7k@%j8Ij}~W)
zc{NUP6)X3OWa^|{8nl?rh|gZ1@{(qofnsWu+nmFHSnaq>lB41zSVC9`a)_v*xHx0L
S5h*!IS!o$ynW>ps0028gDN7ju

literal 0
HcmV?d00001

diff --git a/utils/wxtree/docs/tex2rtf.ini b/utils/wxtree/docs/tex2rtf.ini
new file mode 100644
index 0000000000..8b55040f1f
--- /dev/null
+++ b/utils/wxtree/docs/tex2rtf.ini
@@ -0,0 +1,28 @@
+;;; Tex2RTF initialisation file
+runTwice = yes
+titleFontSize = 12
+authorFontSize = 10
+authorFontSize = 10
+chapterFontSize = 12
+sectionFontSize = 12
+subsectionFontSize = 12
+contentsDepth = 2
+headerRule = yes
+footerRule = yes
+useHeadingStyles = yes
+listItemIndent=40
+generateHPJ = no
+htmlBrowseButtons = bitmap
+winHelpContents = yes
+winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
+winHelpTitle = "wxTreeLayout Manual"
+truncateFilenames = yes
+combineSubSections = yes
+\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
+\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
+\sethotspotcolour{on}\sethotspotunderline{on}}
+\docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}}
+\wxheading [1]{{\bf \htmlignore{\fcol{blue}{#1}}\htmlonly{\fcol{red}{#1}}}}
+\const [0] {{\bf const}}
+\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
+\windowstyle [1] {{\bf #1}\index{#1}}
diff --git a/utils/wxtree/docs/tree.bib b/utils/wxtree/docs/tree.bib
new file mode 100644
index 0000000000..9793c41c47
--- /dev/null
+++ b/utils/wxtree/docs/tree.bib
@@ -0,0 +1,8 @@
+@techreport{robins87,
+author = {Robins, Gabriel},
+title = {The {ISI} grapher: a portable tool for displaying graphs pictorially (ISI/RS-87-196)},
+institution = {University of South California},
+year = {1987},
+month = {September}
+}
+
diff --git a/utils/wxtree/docs/treetst.bmp b/utils/wxtree/docs/treetst.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..fd6103035f4403bedcad1c8a8a187e75f797b821
GIT binary patch
literal 14982
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

literal 0
HcmV?d00001

diff --git a/utils/wxtree/docs/treetst.gif b/utils/wxtree/docs/treetst.gif
new file mode 100644
index 0000000000000000000000000000000000000000..e9f78419571c1da6b9befda415370027d05876d0
GIT binary patch
literal 2490
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
EJB*;*_W%F@

literal 0
HcmV?d00001

diff --git a/utils/wxtree/docs/up.gif b/utils/wxtree/docs/up.gif
new file mode 100644
index 0000000000000000000000000000000000000000..316d0d2a14b571bea2eb874efd04bfe509f53b34
GIT binary patch
literal 137
zcmV;40CxXJNk%v~VHyA!0Pz3-zrVld=jU&4Z(9HWEC2ui02%-o0007FjE||ytzv+j
zv|1owxcuhWh0?c)Avq0}dTQw^q7qBdoDA6WKJ*l>%gtCeAWZlgxpoy|ZDMRPr_m>p
rx}08pS4?)u<%PW<QBYY9oyjHh?Q62&;&M&qj?e4yfxZ7PPyhfsDH=Ws

literal 0
HcmV?d00001

diff --git a/utils/wxtree/docs/wxtree.tex b/utils/wxtree/docs/wxtree.tex
new file mode 100644
index 0000000000..bf14b0dc75
--- /dev/null
+++ b/utils/wxtree/docs/wxtree.tex
@@ -0,0 +1,73 @@
+\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
+\newcommand{\indexit}[1]{#1\index{#1}}%
+\newcommand{\pipe}[0]{$\|$\ }%
+\definecolour{black}{0}{0}{0}%
+\definecolour{cyan}{0}{255}{255}%
+\definecolour{green}{0}{255}{0}%
+\definecolour{magenta}{255}{0}{255}%
+\definecolour{red}{255}{0}{0}%
+\definecolour{blue}{0}{0}{200}%
+\definecolour{yellow}{255}{255}{0}%
+\definecolour{white}{255}{255}{255}%
+\input psbox.tex
+\parskip=10pt%
+\title{Manual for wxTreeLayout 2.0: a tree layout library for wxWindows}
+\author{Julian Smart\\Anthemion Software}
+\date{July 1998}%
+\makeindex%
+\begin{document}%
+\maketitle
+
+\pagestyle{fancyplain}
+\bibliographystyle{plain}
+\pagenumbering{roman}
+\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
+\setfooter{\thepage}{}{}{}{}{\thepage}
+\tableofcontents%
+
+\chapter{Introduction}
+\pagenumbering{arabic}%
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}
+
+This manual describes a tree-drawing class library for wxWindows. It
+provides layout of simple trees with one root node, drawn left-to-right,
+with user-defined spacing between nodes.
+
+wxTreeLayout is an abstract class that must be subclassed. The programmer
+defines various member functions which will access whatever data structures
+are appropriate for the application, and wxTreeLayout uses these when laying
+out the tree.
+
+wxStoredTree is a class derived from wxTreeLayout that may be used directly to
+draw trees on a canvas. It supplies storage for the nodes, and draws
+to a device context.
+
+\helponly{Below is the example tree generated by the program test.cc.
+
+\begin{figure}
+$$\image{11cm;0cm}{treetst.ps}$$
+\caption{Example tree}\label{exampletree}
+\end{figure}
+}
+
+\chapter{Implementation}
+\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}
+
+The algorithm is due to Gabriel Robins \cite{robins87}, a linear-time
+algorithm originally implemented in LISP for AI applications.
+
+The original algorithm has been modified so that both X and Y planes
+are calculated simultaneously, increasing efficiency slightly. The basic
+code is only a page or so long.
+
+\input classes.tex
+%
+\bibliography{tree}
+
+\addcontentsline{toc}{chapter}{Index}
+\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}
+\printindex
+\end{document}
diff --git a/utils/wxtree/lib/dummy b/utils/wxtree/lib/dummy
new file mode 100644
index 0000000000..bfdf726d49
--- /dev/null
+++ b/utils/wxtree/lib/dummy
@@ -0,0 +1 @@
+I'm just here to force the creation of a LIB directory.
diff --git a/utils/wxtree/src/makefile.b32 b/utils/wxtree/src/makefile.b32
new file mode 100644
index 0000000000..764b5fd123
--- /dev/null
+++ b/utils/wxtree/src/makefile.b32
@@ -0,0 +1,71 @@
+#
+# File:		makefile.b32
+# Author:	Patrick Halke
+# Created:	1995
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds 32bit wxtree library for 32-bit BC++
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makeb32.env
+
+WXINC = $(WXDIR)\include
+TARGET=test
+TESTOBJECTS=test.obj
+LIBTARGET= $(WXLIBDIR)\wxprop.lib
+LIBS=$(WXLIB)\wx32.lib $(LIBTARGET) cw32 import32
+
+!ifndef DEBUG
+DEBUG=0
+!endif
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v -DDEBUG=$(DEBUG)
+!else
+LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
+OPT = -O2
+DEBUG_FLAGS = -DDEBUG=$(DEBUG)
+!endif
+
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+.$(SRCSUFF).obj:
+	bcc32 $(CPPFLAGS) -c {$< }
+
+.c.obj:
+	bcc32 $(CPPFLAGS) -P- -c {$< }
+
+OBJECTS = wxtree.obj
+
+all:    $(LIBTARGET)
+
+$(LIBTARGET):	$(OBJECTS)
+	erase $(LIBTARGET)
+	tlib $(LIBTARGET) /P32 @&&!
++$(OBJECTS:.obj =.obj +)
+!
+
+wxtree.obj:	wxtree.$(SRCSUFF) wxtree.h
+
+$(TARGET).exe:	$(TESTOBJECTS) $(LIBTARGET) $(TARGET).def $(TARGET).res
+  tlink32 $(LINKFLAGS) @&&!
+c0w32.obj $(TESTOBJECTS)
+$(TARGET)
+nul
+$(LIBS) $(LIBTARGET)
+$(TARGET).def
+!
+        brc32 -K $(TARGET).res
+
+test.obj:	test.$(SRCSUFF) test.h
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+    brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
+
+clean:
+        -erase *.obj $(LIBTARGET) *.exe *.res *.map *.rws
diff --git a/utils/wxtree/src/makefile.bcc b/utils/wxtree/src/makefile.bcc
new file mode 100644
index 0000000000..df91939532
--- /dev/null
+++ b/utils/wxtree/src/makefile.bcc
@@ -0,0 +1,96 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds tree library and example (DOS).
+
+!if "$(BCCDIR)" == ""
+!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
+!endif
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+# Change WXDIR to wherever wxWindows is found
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makebcc.env
+
+WXLIB = $(WXDIR)\lib\wx.lib
+WXINC = $(WXDIR)\include
+CFG=$(WXWIN)\src\wxwin.cfg
+
+TREEDIR = $(WXDIR)\utils\wxtree
+TREELIB = $(TREEDIR)\lib\wxtree.lib
+
+WXHELPDIR = $(WXDIR)\utils\wxhelp
+TEX2RTFDIR = $(WXDIR)\utils\tex2rtf
+DOCDIR = $(WXHELPDIR)\docs
+
+# Default is to output RTF for WinHelp
+!ifndef WINHELP
+WINHELP=-winhelp
+!endif
+
+INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw
+
+LIBS=$(WXLIB) $(TREELIB) mathwl cwl import mathwl
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -O2
+DEBUG_FLAGS=
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+HEADERS = wxtree.h
+SOURCES = wxtree.$(SRCSUFF)
+OBJECTS = wxtree.obj
+
+all:    $(TREELIB)
+
+.$(SRCSUFF).obj:
+	bcc $(CPPFLAGS) $(INC) -c {$< }
+
+$(TREELIB):      $(OBJECTS)
+        erase $(TREELIB)
+        tlib /P128 @&&!
+$(TREELIB) &
++$(OBJECTS:.obj =.obj +)
+!
+
+test.obj: test.$(SRCSUFF)
+
+test.res :      test.rc $(WXDIR)\include\msw\wx.rc
+    rc /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -r test
+
+test.exe:      test.obj test.def test.res $(TREELIB)
+        tlink $(LINKFLAGS) @&&!
+c0wl.obj test.obj
+test
+nul
+$(LIBS)
+test.def
+!
+        rc -K test.res
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+		-erase ..\lib\*.lib
+
diff --git a/utils/wxtree/src/makefile.dos b/utils/wxtree/src/makefile.dos
new file mode 100644
index 0000000000..c78d0a7cfb
--- /dev/null
+++ b/utils/wxtree/src/makefile.dos
@@ -0,0 +1,118 @@
+#
+# File:		makefile.dos
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds tree library and example (DOS).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\makemsc.env
+
+TREEDIR = $(WXDIR)\utils\wxtree
+TREELIB = $(TREEDIR)\lib\wxtree.lib
+DOCDIR = $(TREEDIR)\docs
+THISDIR = $(TREEDIR)\src
+EXTRALIBS = $(TREELIB)
+INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
+DUMMY=$(WXDIR)\src\msw\dummy.obj
+
+# Default is to output RTF for WinHelp
+!ifndef RTFSTYLE
+RTFSTYLE=-winhelp
+!endif
+
+HEADERS = wxtree.h
+SOURCES = wxtree.$(SRCSUFF)
+OBJECTS = wxtree.obj
+
+all:    $(TREELIB)
+
+test:   test.exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos FINAL=$(FINAL)
+        cd $(TREEDIR)\src
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos clean
+        cd $(TREEDIR)\src
+
+$(TREELIB):      $(OBJECTS)
+        -erase $(TREELIB)
+        lib /PAGESIZE:128 @<<
+$(TREELIB)
+y
+$(OBJECTS)
+nul
+;
+<<
+
+test.exe:      $(DUMMY) $(WXLIB) $(TREELIB) test.obj test.def test.res
+        link $(LINKFLAGS) @<<
+$(DUMMY) test.obj,
+test,
+NUL,
+$(LIBS),
+test.def
+;
+<<
+        rc -31 -K test.res
+
+wxtree.obj:      wxtree.h wxtree.$(SRCSUFF) $(DUMMY)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+test.obj:      test.h wxtree.h test.$(SRCSUFF) $(DUMMY)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+test.res :      test.rc $(WXDIR)\include\msw\wx.rc
+    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw test
+
+# Making documents
+docs:   hlp xlp
+hlp:   $(DOCDIR)/wxtree.hlp
+xlp:    $(DOCDIR)/wxtree.xlp
+rtf:    $(DOCDIR)/wxtree.rtf
+
+$(DOCDIR)/wxtree.hlp:         $(DOCDIR)/wxtree.rtf $(DOCDIR)/wxtree.hpj
+        cd $(DOCDIR)
+        -erase wxtree.ph
+        hc wxtree
+        cd $(THISDIR)
+
+$(DOCDIR)/wxtree.rtf:         $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex
+        cd $(DOCDIR)
+        -wx /W tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.rtf -twice $(RTFSTYLE)
+        cd $(THISDIR)
+
+$(DOCDIR)/wxtree.xlp:         $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex
+        cd $(DOCDIR)
+        -wx /W tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.xlp -twice -xlp
+        cd $(THISDIR)
+
+cleanrtf:
+        cd $(DOCDIR)
+        -erase *.rtf
+        cd  $(THISDIR)
+
+clean:
+        -erase *.obj
+        -erase *.sbr
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.pdb
+        -erase $(TREELIB)
diff --git a/utils/wxtree/src/makefile.g95 b/utils/wxtree/src/makefile.g95
new file mode 100644
index 0000000000..a7b7f866c1
--- /dev/null
+++ b/utils/wxtree/src/makefile.g95
@@ -0,0 +1,48 @@
+#
+# File:		makefile.g95
+# Author:	Julian Smart
+# Created:	1996
+#
+# "%W% %G%"
+#
+# Makefile : Builds wxTree library and example under GNU-WIN32
+#
+WXDIR = ../../..
+include $(WXDIR)/src/makeg95.env
+
+PROPDIR = $(WXDIR)/utils/wxtree
+TREELIB = $(PROPDIR)/lib/$(LIBPREFIX)wxtree.$(LIBSUFF)
+THISDIR = $(PROPDIR)/src
+
+OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF)
+TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) $(OBJDIR)/test_resources.$(OBJSUFF)
+
+LDFLAGS =  -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib -L../lib
+LDLIBS=-lwxtree $(LIBS)
+
+all:    $(OBJDIR) $(TREELIB)
+
+test:   $(OBJDIR) test.exe
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+$(TREELIB):      $(OBJECTS)
+	rm -f $@
+	ar $(AROPTIONS) $@ $(OBJECTS)
+	$(RANLIB) $@
+
+$(OBJDIR)/test.$(OBJSUFF):		test.h test.$(SRCSUFF) $(TREELIB)
+	$(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF)
+
+test.exe: $(TESTOBJECTS)
+	$(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(TESTOBJECTS) $(LDLIBS)
+
+$(OBJDIR)/wxtree.$(OBJSUFF):      wxtree.h wxtree.$(SRCSUFF)
+	$(CC) -c $(CPPFLAGS) -o $@ wxtree.$(SRCSUFF)
+
+$(OBJDIR)/test_resources.o:  test.rc
+	$(RESCOMP) -i test.rc -o $(OBJDIR)/test_resources.o $(RESFLAGS)
+
+clean:
+	rm -f *.$(OBJSUFF) $(TREELIB) objects/test.o *.exe *.res *.map *.rsc
diff --git a/utils/wxtree/src/makefile.nt b/utils/wxtree/src/makefile.nt
new file mode 100644
index 0000000000..5e815db012
--- /dev/null
+++ b/utils/wxtree/src/makefile.nt
@@ -0,0 +1,133 @@
+#
+# File:		makefile.nt
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds wxTree class library (MS VC++).
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+# Set WXDIR for your system
+WXDIR = $(WXWIN)
+TREEDIR = $(WXDIR)\utils\wxtree
+THISDIR = $(WXDIR)\utils\wxtree\src
+EXTRALIBS=$(TREEDIR)\lib\wxtree.lib
+DOCDIR=$(WXDIR)\docs
+LOCALDOCDIR=$(WXDIR)\utils\wxtree\docs
+
+!include $(WXDIR)\src\ntwxwin.mak
+
+PROGRAM=test
+ 
+OBJECTS = wxtree.obj
+PROGOBJECTS = $(PROGRAM).obj
+LIBTARGET=$(TREEDIR)\lib\wxtree.lib
+
+all:    $(LIBTARGET)
+
+$(PROGRAM):    $(PROGRAM).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.nt clean
+        cd $(THISDIR)
+
+$(LIBTARGET): $(OBJECTS)
+	-erase $(LIBTARGET)
+	$(implib) @<<
+-out:$(LIBTARGET)
+-machine:$(CPU)
+$(OBJECTS)
+<<
+
+$(PROGRAM).exe:      $(DUMMYOBJ) $(WXLIB) $(PROGOBJECTS) $(LIBTARGET) $(PROGRAM).res
+	$(link) @<<
+-out:$(PROGRAM).exe
+$(LINKFLAGS)
+$(DUMMYOBJ) $(PROGOBJECTS) $(PROGRAM).res
+$(LIBS)
+<<
+
+wxtree.obj:      wxtree.h wxtree.$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).obj:      $(PROGRAM).h $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
+        $(cc) @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
+<<
+
+$(PROGRAM).res :      $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
+    $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
+
+
+clean:
+        -erase *.obj
+        -erase *.sbr
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.pdb
+        -erase $(LIBTARGET)
+
+DOCSOURCES=$(LOCALDOCDIR)\wxtree.tex $(LOCALDOCDIR)\classes.tex
+
+html: $(DOCDIR)\html\wxtree\tree.htm
+hlp: $(DOCDIR)\winhelp\wxtree.hlp
+pdfrtf: $(DOCDIR)\pdf\wxtree.rtf
+ps: $(WXDIR)\docs\ps\wxtree.ps
+
+$(DOCDIR)\winhelp\wxtree.hlp:         $(LOCALDOCDIR)\wxtree.rtf $(LOCALDOCDIR)\wxtree.hpj
+        cd $(LOCALDOCDIR)
+        -erase wxtree.ph
+        hc wxtree
+        move wxtree.hlp $(DOCDIR)\winhelp\wxtree.hlp
+        move wxtree.cnt $(DOCDIR)\winhelp\wxtree.cnt
+        cd $(THISDIR)
+
+$(LOCALDOCDIR)\wxtree.rtf: $(DOCSOURCES)
+        cd $(LOCALDOCDIR)
+        -start /w tex2rtf $(LOCALDOCDIR)\wxtree.tex $(LOCALDOCDIR)\wxtree.rtf -twice -winhelp
+        cd $(THISDIR)
+
+$(DOCDIR)\pdf\wxtree.rtf: $(DOCSOURCES)
+        cd $(LOCALDOCDIR)
+        -copy *.bmp $(DOCDIR)\pdf
+        -start /w tex2rtf $(LOCALDOCDIR)\wxtree.tex $(DOCDIR)\pdf\wxtree.rtf -twice -rtf
+        cd $(THISDIR)
+
+$(DOCDIR)\html\wxtree\tree.htm:         $(DOCSOURCES)
+        cd $(LOCALDOCDIR)
+        -mkdir $(DOCDIR)\html\wxtree
+        -start /w tex2rtf $(LOCALDOCDIR)\wxtree.tex $(DOCDIR)\html\wxtree\tree.htm -twice -html
+        -erase $(DOCDIR)\html\wxtree\*.con
+        -erase $(DOCDIR)\html\wxtree\*.ref
+        cd $(THISDIR)
+
+$(LOCALDOCDIR)\wxtree.dvi:	$(DOCSOURCES)
+	cd $(LOCALDOCDIR)
+        -latex wxtree
+        -latex wxtree
+        -makeindx wxtree
+        -bibtex wxtree
+        -latex wxtree
+        -latex wxtree
+        cd $(THISDIR)
+
+$(WXDIR)\docs\ps\wxtree.ps:	$(LOCALDOCDIR)\wxtree.dvi
+	cd $(LOCALDOCDIR)
+        -dvips32 -o wxtree.ps wxtree
+        move wxtree.ps $(WXDIR)\docs\ps\wxtree.ps
+        cd $(THISDIR)
+
+
diff --git a/utils/wxtree/src/makefile.sc b/utils/wxtree/src/makefile.sc
new file mode 100644
index 0000000000..a03ad23365
--- /dev/null
+++ b/utils/wxtree/src/makefile.sc
@@ -0,0 +1,73 @@
+# Symantec C++ makefile for the tree library
+# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
+
+WXDIR = $(WXWIN)
+
+WXLIB = $(WXDIR)\lib\wx.lib
+INCDIR = $(WXDIR)\include
+MSWINC = $(INCDIR)\msw
+BASEINC = $(INCDIR)\base
+
+include $(WXDIR)\src\makesc.env
+
+TREEDIR = $(WXDIR)\utils\wxtree
+TREEINC = $(TREEDIR)\src
+TREELIB = $(TREEDIR)\lib\wxtree.lib
+
+DOCDIR = $(TREEDIR)\docs
+SRCDIR = $(TREEDIR)\src
+
+# Default is to output RTF for WinHelp
+WINHELP=-winhelp
+
+INCLUDE=$(BASEINC);$(MSWINC)
+
+LIBS=$(TREELIB) $(WXLIB) libw.lib commdlg.lib shell.lib
+
+.$(SRCSUFF).obj:
+	*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
+
+.rc.res:
+	*$(RC) -r -I$(INCLUDE) $<
+
+$(TREELIB): wxtree.obj
+ 	-del $(TREELIB)
+	*lib $(TREELIB) y wxtree.obj, nul;
+
+wxtree.obj: wxtree.h wxtree.$(SRCSUFF)
+
+test.exe: test.obj test.def test.res
+	*$(CC) $(LDFLAGS) -o$@ test.obj test.def $(LIBS)
+	*$(RC) -k test.res
+
+test.obj: test.h wxtree.h test.$(SRCSUFF)
+
+# Making documents
+docs:   hlp xlp
+hlp:    $(DOCDIR)/wxtree.hlp
+xlp:    $(DOCDIR)/wxtree.xlp
+rtf:    $(DOCDIR)/wxtree.rtf
+
+$(DOCDIR)/wxtree.hlp:         $(DOCDIR)/wxtree.rtf $(DOCDIR)/wxtree.hpj
+        cd $(DOCDIR)
+        -erase wxtree.ph
+        hc wxtree
+        cd $(SRCDIR)
+
+$(DOCDIR)/wxtree.rtf:         $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex
+        cd $(DOCDIR)
+        -wx tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.rtf -twice -winhelp
+        cd $(SRCDIR)
+
+$(DOCDIR)/wxtree.xlp:         $(DOCDIR)/manual.tex $(DOCDIR)/classes.tex
+        cd $(DOCDIR)
+        -wx tex2rtf $(DOCDIR)\manual.tex $(DOCDIR)\wxtree.xlp -twice -xlp
+        cd $(SRCDIR)
+
+clean:
+        -del *.obj
+	-del *.exe
+	-del *.res
+	-del *.map
+	-del *.rws
+	-del $(TREELIB)
diff --git a/utils/wxtree/src/makefile.unx b/utils/wxtree/src/makefile.unx
new file mode 100644
index 0000000000..0d0d64162e
--- /dev/null
+++ b/utils/wxtree/src/makefile.unx
@@ -0,0 +1,133 @@
+#
+# File:		makefile.unx
+# Author:	Julian Smart
+# Created:	1993
+# Updated:	
+# Copyright:	(c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile for tree library and example (UNIX).
+# Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system.
+
+WXDIR = ../../..
+
+# All common UNIX compiler flags and options are now in
+# this central makefile.
+include $(WXDIR)/src/make.env
+
+TREEDIR = $(WXDIR)/utils/wxtree
+TREEINC = $(TREEDIR)/src
+TREELIB = $(TREEDIR)/lib/libwxtree$(GUISUFFIX).a
+
+SOURCES = tree.$(SRCSUFF)
+HEADERS = tree.h
+OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF)
+
+TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF)
+TESTPROGRAM = $(TREEDIR)/src/test$(GUISUFFIX)
+
+DOCUTILSDIR = $(WXDIR)/utils/tex2rtf/src
+
+LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(TREEDIR)/lib
+
+XVIEWLDLIBS = -lwxtree_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS)
+MOTIFLDLIBS = -lwxtree_motif -lwx_motif -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS)
+HPLDLIBS = -lwxtree_hp -lwx_hp -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS)
+# Default
+LDLIBS=$(XVIEWLDLIBS)
+
+.SUFFIXES:
+
+all:	$(OBJDIR) $(TREELIB)
+
+demo:   $(TESTPROGRAM)
+
+$(TREELIB): $(OBJECTS)
+	rm -f $@
+	ar $(AROPTIONS) $@ $(OBJECTS)
+	$(RANLIB) $@
+
+wxmotif:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif DEBUG='$(DEBUG)'
+
+wxxview:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview DEBUG='$(DEBUG)'
+
+motif:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif OPT='$(OPT)' DEBUG='$(DEBUG)'
+	$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK=
+
+xview:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)'
+	$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol OPT='$(OPT)' DEBUG='$(DEBUG)'
+
+demo_motif:
+	$(MAKE) -f makefile.unx all test_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK=
+
+demo_ol:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)'
+	$(MAKE) -f makefile.unx all test_ol GUI=-Dwx_xview OPT='$(OPT)' DEBUG='$(DEBUG)'
+
+hp:
+	$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \
+           XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \
+           LDLIBS='$(HPLDLIBS)'
+
+demo_hp:
+	$(MAKE) -f makefile.unx all test_hp GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \
+           XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \
+           LDLIBS='$(HPLDLIBS)'
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+test$(GUISUFFIX): $(OBJDIR)/test.$(OBJSUFF) $(WXLIB) $(TREELIB)
+	$(CC) $(LDFLAGS) -o test$(GUISUFFIX) $(OBJDIR)/test.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
+
+$(OBJDIR)/wxtree.$(OBJSUFF):        wxtree.$(SRCSUFF) wxtree.h
+	$(CC) -c $(CPPFLAGS) -o $@ wxtree.$(SRCSUFF)
+
+$(OBJDIR)/test.$(OBJSUFF):        test.$(SRCSUFF) test.h wxtree.h
+	$(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF)
+
+HTMLDIR=/home/hardy/html/wx/manuals
+docs:	ps xlp
+ps:	$(TREEDIR)/docs/manual.ps
+xlp:	$(TREEDIR)/docs/wxtree.xlp
+html:	$(HTMLDIR)/wxtree/wxtree_contents.html
+
+$(TREEDIR)/docs/wxtree.xlp:	$(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex
+	cd ../docs; tex2rtf manual.tex tmp.xlp -xlp -twice
+	sed -e "s/WXHELPCONTENTS/wxTree Manual/g" < $(TREEDIR)/docs/tmp.xlp > $(TREEDIR)/docs/wxtree.xlp
+	/bin/rm -f $(TREEDIR)/docs/tmp.xlp
+
+$(HTMLDIR)/wxtree/wxtree_contents.html:	$(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex
+	cd ../docs; tex2rtf manual.tex $(HTMLDIR)/wxtree/wxtree.html -html -twice
+
+$(TREEDIR)/docs/manual.dvi:	$(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex
+	cd $(TREEDIR)/docs; latex manual; latex manual; makeindex manual; bibtex manual; latex manual; latex manual
+
+$(TREEDIR)/docs/manual.ps:	$(TREEDIR)/docs/manual.dvi
+	cd $(TREEDIR)/docs; dvips -f -r < manual.dvi > manual.ps
+
+clean_motif:
+	$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
+
+clean_ol:
+	$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
+
+clean_hp:
+	$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
+
+cleanany:
+	rm -f $(OBJECTS) $(OBJDIR)/*.$(OBJSUFF) test$(GUISUFFIX) $(TREELIB) core
+
+wxclean_ol:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol
+
+wxclean_motif:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif
+
+wxclean_hp:
+	cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp
diff --git a/utils/wxtree/src/makefile.wat b/utils/wxtree/src/makefile.wat
new file mode 100644
index 0000000000..818e657eac
--- /dev/null
+++ b/utils/wxtree/src/makefile.wat
@@ -0,0 +1,49 @@
+WXDIR = ..\..\..
+
+NOPRECOMP=1
+
+!include $(WXDIR)\src\makewat.env
+
+WXLIB=$(WXDIR)\lib
+LIBTARGET = ..\lib\wxtree.lib
+IFLAGS      = -i=$(WXINC) -i=$(WXBASEINC)
+EXTRACPPFLAGS =
+NAME        = wxtree
+LNK = test.lnk
+TESTOBJECTS=test.obj
+
+OBJECTS = $(name).obj
+
+all: $(OBJECTS) $(LIBTARGET)
+
+$(LIBTARGET): $(OBJECTS)
+	*wlib /b /c /n /P=256 $(LIBTARGET) $(OBJECTS)
+
+test: test.exe
+
+test.obj:   test.$(SRCSUFF) test.h wxtree.h
+
+test.exe : $(TESTOBJECTS) test.res $(LNK) $(LIBTARGET) $(WXLIB)\wx$(LEVEL).lib
+    wlink @$(LNK)
+    $(BINDCOMMAND) test.res
+
+test.res :      test.rc $(WXDIR)\include\msw\wx.rc
+     $(RC) $(RESFLAGS1) test.rc
+
+$(LNK) : makefile.wat
+    %create $(LNK)
+    @%append $(LNK) debug all
+    @%append $(LNK) system $(LINKOPTION)
+    @%append $(LNK) $(MINDATA)
+    @%append $(LNK) $(MAXDATA)
+    @%append $(LNK) $(STACK)
+    @%append $(LNK) name test
+    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
+    @%append $(LNK) file $(LIBTARGET)
+    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
+    @for %i in ($(TESTOBJECTS)) do @%append $(LNK) file %i
+
+clean:   .SYMBOLIC
+    -erase $(LIBTARGET) *.obj *.bak *.err *.pch *.lib *.lbc *.res *.exe
+
+
diff --git a/utils/wxtree/src/mondrian.ico b/utils/wxtree/src/mondrian.ico
new file mode 100644
index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53
GIT binary patch
literal 766
zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0Z<M**w4TKL=5})Lnt5#WHKB$
zaDbtqp#doIAB-6O{|B*v7zjZ^AOa2W|NsACHyAJ}De?dRKnp(HN~rljcR;{k;{zQE
i@;}UZ|9Q?Fpp*~yJCwmWbLIrN`9Qm9%}2L?p!oo$cZ4ed

literal 0
HcmV?d00001

diff --git a/utils/wxtree/src/test.cpp b/utils/wxtree/src/test.cpp
new file mode 100644
index 0000000000..7fa625668f
--- /dev/null
+++ b/utils/wxtree/src/test.cpp
@@ -0,0 +1,200 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        test.cpp
+// Purpose:     wxTreeLayout sample
+// Author:      Julian Smart
+// Modified by: 
+// Created:     7/4/98
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Julian Smart
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include <wx/wxprec.h>
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include <wx/wx.h>
+#endif
+
+#include "wxtree.h"
+#include "test.h"
+
+wxStoredTree *myTree = NULL;
+
+// A macro needed for some compilers (AIX) that need 'main' to be defined
+// in the application itself.
+IMPLEMENT_APP(MyApp)
+
+// The `main program' equivalent, creating the windows and returning the
+// main frame
+bool MyApp::OnInit()
+{
+  // Create the main frame window
+  MyFrame* frame = new MyFrame(NULL, "Tree Test", wxPoint(-1, -1), wxSize(400, 550));
+
+  // Give it a status line
+  frame->CreateStatusBar(2);
+
+  // Give it an icon
+#ifdef __WINDOWS__
+  wxIcon icon("tree_icn");
+  frame->SetIcon(icon);
+#endif
+
+  // Make a menubar
+  wxMenu *file_menu = new wxMenu;
+  file_menu->Append(TEST_LEFT_RIGHT, "&Left to right",                "Redraw left to right");
+  file_menu->Append(TEST_TOP_BOTTOM, "&Top to bottom",                "Redraw top to bottom");
+  file_menu->AppendSeparator();
+  file_menu->Append(TEST_QUIT, "E&xit",                "Quit program");
+
+  wxMenu *help_menu = new wxMenu;
+  help_menu->Append(TEST_ABOUT, "&About",              "About Tree Test");
+
+  wxMenuBar* menu_bar = new wxMenuBar;
+
+  menu_bar->Append(file_menu, "&File");
+  menu_bar->Append(help_menu, "&Help");
+
+  // Associate the menu bar with the frame
+  frame->SetMenuBar(menu_bar);
+
+  MyCanvas *canvas = new MyCanvas(frame);
+
+  // Give it scrollbars: the virtual canvas is 20 * 50 = 1000 pixels in each direction
+  canvas->SetScrollbars(20, 20, 50, 50);
+  frame->canvas = canvas;
+
+  myTree = new wxStoredTree();
+
+  wxClientDC dc(canvas);
+  wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
+  dc.SetFont(font);
+  TreeTest(*myTree, dc);
+
+  frame->Show(TRUE);
+
+  frame->SetStatusText("Hello, tree!");
+
+  // Return the main frame window
+  return TRUE;
+}
+
+void MyApp::TreeTest(wxStoredTree& tree, wxDC& dc)
+{
+  tree.Initialize(200);
+  
+  tree.AddChild("animal");
+  tree.AddChild("mammal", "animal");
+  tree.AddChild("insect", "animal");
+  tree.AddChild("bird", "animal");
+
+  tree.AddChild("man", "mammal");
+  tree.AddChild("cat", "mammal");
+  tree.AddChild("dog", "mammal");
+  tree.AddChild("giraffe", "mammal");
+  tree.AddChild("elephant", "mammal");
+  tree.AddChild("donkey", "mammal");
+  tree.AddChild("horse", "mammal");
+
+  tree.AddChild("fido", "dog");
+  tree.AddChild("domestic cat", "cat");
+  tree.AddChild("lion", "cat");
+  tree.AddChild("tiger", "cat");
+  tree.AddChild("felix", "domestic cat");
+  tree.AddChild("socks", "domestic cat");
+
+  tree.AddChild("beetle", "insect");
+  tree.AddChild("earwig", "insect");
+  tree.AddChild("eagle", "bird");
+  tree.AddChild("bluetit", "bird");
+  tree.AddChild("sparrow", "bird");
+  tree.AddChild("blackbird", "bird");
+  tree.AddChild("emu", "bird");
+  tree.AddChild("crow", "bird");
+
+  tree.DoLayout(dc);
+}
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+  EVT_MENU(TEST_QUIT, MyFrame::OnQuit)
+  EVT_MENU(TEST_ABOUT, MyFrame::OnAbout)
+  EVT_MENU(TEST_LEFT_RIGHT, MyFrame::OnLeftRight)
+  EVT_MENU(TEST_TOP_BOTTOM, MyFrame::OnTopBottom)
+  EVT_CLOSE(MyFrame::OnCloseWindow)
+END_EVENT_TABLE()
+
+// Define my frame constructor
+MyFrame::MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size):
+  wxFrame(parent, -1, title, pos, size)
+{
+}
+
+void MyFrame::OnQuit(wxCommandEvent& event)
+{
+    Close(TRUE);
+}
+
+void MyFrame::OnLeftRight(wxCommandEvent& event)
+{
+      if (myTree)
+      {
+        myTree->SetOrientation(FALSE);
+        wxClientDC dc(canvas);
+        wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
+        dc.SetFont(font);
+        wxGetApp().TreeTest(*myTree, dc);
+        canvas->Refresh();
+      }
+}
+
+void MyFrame::OnTopBottom(wxCommandEvent& event)
+{
+      if (myTree)
+      {
+        myTree->SetOrientation(TRUE);
+        wxClientDC dc(canvas);
+        wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
+        dc.SetFont(font);
+        wxGetApp().TreeTest(*myTree, dc);
+        canvas->Refresh();
+      }
+}
+
+void MyFrame::OnAbout(wxCommandEvent& event)
+{
+      (void)wxMessageBox("wxWindows tree library demo Vsn 2.0\nAuthor: Julian Smart (c) 1998", "About tree test");
+}
+
+void MyFrame::OnCloseWindow(wxCloseEvent& event)
+{
+  Destroy();
+}
+
+BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
+    EVT_PAINT(MyCanvas::OnPaint)
+END_EVENT_TABLE()
+
+// Define a constructor for my canvas
+MyCanvas::MyCanvas(wxWindow *parent):
+ wxScrolledWindow(parent, -1)
+{
+}
+
+// Define the repainting behaviour
+void MyCanvas::OnPaint(wxPaintEvent& event)
+{
+    wxPaintDC dc(this);
+    PrepareDC(dc);
+    if (myTree)
+    {
+        wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
+        dc.SetFont(font);
+        myTree->Draw(dc);
+    }
+}
+
diff --git a/utils/wxtree/src/test.def b/utils/wxtree/src/test.def
new file mode 100644
index 0000000000..558ccc1235
--- /dev/null
+++ b/utils/wxtree/src/test.def
@@ -0,0 +1,8 @@
+NAME         Test
+DESCRIPTION  'Tree Test'
+EXETYPE      WINDOWS
+STUB         'WINSTUB.EXE'
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+HEAPSIZE     1024
+STACKSIZE    16192
diff --git a/utils/wxtree/src/test.h b/utils/wxtree/src/test.h
new file mode 100644
index 0000000000..b00660744e
--- /dev/null
+++ b/utils/wxtree/src/test.h
@@ -0,0 +1,54 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        test.h
+// Purpose:     wxTreeLayout sample
+// Author:      Julian Smart
+// Modified by: 
+// Created:     7/4/98
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Julian Smart
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// Define a new application
+class MyApp: public wxApp
+{
+  public:
+    bool OnInit();
+    void TreeTest(wxStoredTree& tree, wxDC& dc);
+};
+
+DECLARE_APP(MyApp)
+
+class MyCanvas;
+
+class MyFrame: public wxFrame
+{
+  public:
+    MyCanvas *canvas;
+    MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
+
+    void OnCloseWindow(wxCloseEvent& event);
+    void OnQuit(wxCommandEvent& event);
+    void OnAbout(wxCommandEvent& event);
+    void OnLeftRight(wxCommandEvent& event);
+    void OnTopBottom(wxCommandEvent& event);
+
+DECLARE_EVENT_TABLE()
+};
+
+// Define a new canvas which can receive some events
+class MyCanvas: public wxScrolledWindow
+{
+  public:
+    MyCanvas(wxWindow *frame);
+    void OnPaint(wxPaintEvent& event);
+    void OnEvent(wxMouseEvent& event);
+    void OnChar(wxKeyEvent& event);
+DECLARE_EVENT_TABLE()
+};
+
+#define TEST_QUIT      1
+#define TEST_ABOUT     2
+#define TEST_LEFT_RIGHT 3
+#define TEST_TOP_BOTTOM 4
+
diff --git a/utils/wxtree/src/test.rc b/utils/wxtree/src/test.rc
new file mode 100644
index 0000000000..41e6896e8e
--- /dev/null
+++ b/utils/wxtree/src/test.rc
@@ -0,0 +1,3 @@
+tree_icn ICON "mondrian.ico"
+#include "wx/msw/wx.rc"
+
diff --git a/utils/wxtree/src/wxtree.cpp b/utils/wxtree/src/wxtree.cpp
new file mode 100644
index 0000000000..70d3be26c0
--- /dev/null
+++ b/utils/wxtree/src/wxtree.cpp
@@ -0,0 +1,440 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        tree.h
+// Purpose:     wxTreeLayout class
+// Author:      Julian Smart
+// Modified by: 
+// Created:     7/4/98
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Julian Smart
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "wxtree.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include <wx/wxprec.h>
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include <wx/wx.h>
+#endif
+
+#include "wxtree.h"
+
+/*
+ * Abstract tree
+ *
+ */
+
+IMPLEMENT_ABSTRACT_CLASS(wxTreeLayout, wxObject)
+
+wxTreeLayout::wxTreeLayout()
+{
+  m_xSpacing = 16;
+  m_ySpacing = 20;
+  m_topMargin = 5;
+  m_leftMargin = 5;
+  m_orientation = FALSE;
+  m_parentNode = 0;
+}
+
+void wxTreeLayout::DoLayout(wxDC& dc, long topId)
+{
+  if (topId != -1)
+    SetTopNode(topId);
+
+  long actualTopId = GetTopNode();
+  long id = actualTopId;
+  while (id != -1)
+  {
+    SetNodeX(id, 0);
+    SetNodeY(id, 0);
+    ActivateNode(id, FALSE);
+    id = GetNextNode(id);
+  }
+  m_lastY = m_topMargin;
+  m_lastX = m_leftMargin;
+  CalcLayout(actualTopId, 0, dc);
+}
+
+void wxTreeLayout::Draw(wxDC& dc)
+{
+    dc.Clear();
+    DrawBranches(dc);
+    DrawNodes(dc);
+}
+
+void wxTreeLayout::DrawNodes(wxDC& dc)
+{  
+  long id = GetTopNode();
+  while (id != -1)
+  {
+    if (NodeActive(id))
+      DrawNode(id, dc);
+    id = GetNextNode(id);
+  }
+}
+
+void wxTreeLayout::DrawBranches(wxDC& dc)
+{  
+  long id = GetTopNode();
+  while (id != -1)
+  {
+    if (GetNodeParent(id) > -1)
+    {
+      long parent = GetNodeParent(id);
+      if (NodeActive(parent))
+        DrawBranch(parent, id, dc);
+    }
+    id = GetNextNode(id);
+  }
+}
+
+void wxTreeLayout::DrawNode(long id, wxDC& dc)
+{
+  char buf[80];
+  wxString name(GetNodeName(id));
+  if (name != "")
+    sprintf(buf, "%s", (const char*) name);
+  else
+    sprintf(buf, "<unnamed>");
+
+  long x = 80;
+  long y = 20;
+  dc.GetTextExtent(buf, &x, &y);
+  dc.DrawText(buf, GetNodeX(id), (long)(GetNodeY(id) - (y/2.0)));
+}
+
+void wxTreeLayout::DrawBranch(long from, long to, wxDC& dc)
+{
+    long w, h;
+    GetNodeSize(from, &w, &h, dc);
+    dc.DrawLine(GetNodeX(from)+w, GetNodeY(from),
+                              GetNodeX(to), GetNodeY(to));
+}
+
+void wxTreeLayout::Initialize(void)
+{
+}
+
+void wxTreeLayout::GetNodeSize(long id, long *x, long *y, wxDC& dc)
+{
+  wxString name(GetNodeName(id));
+  if (name != "")
+    dc.GetTextExtent(name, x, y);
+  else
+  {
+    *x = 70; *y = 20;
+  }
+}
+
+void wxTreeLayout::CalcLayout(long nodeId, int level, wxDC& dc)
+{
+  wxList children;
+  GetChildren(nodeId, children);
+  int n = children.Number();
+
+  if (m_orientation == FALSE)
+  {
+    // Left to right
+    // X Calculations
+    if (level == 0)
+      SetNodeX(nodeId, m_leftMargin);
+    else
+    {
+      long x = 0;
+      long y = 0;
+      long parentId = GetNodeParent(nodeId);
+      if (parentId != -1)
+        GetNodeSize(parentId, &x, &y, dc);
+      SetNodeX(nodeId, (long)(GetNodeX(parentId) + m_xSpacing + x));
+    }
+
+    wxNode *node = children.First();
+    while (node)
+    {
+      CalcLayout((long)node->Data(), level+1, dc);
+      node = node->Next();
+    }
+
+    // Y Calculations
+    long averageY;
+    ActivateNode(nodeId, TRUE);
+  
+    if (n > 0)
+    {
+      averageY = 0;
+      node = children.First();
+      while (node)
+      {
+        averageY += GetNodeY((long)node->Data());
+        node = node->Next();
+      }
+      averageY = averageY / n;
+      SetNodeY(nodeId, averageY);
+    }
+    else
+    {
+      SetNodeY(nodeId, m_lastY);
+      long x, y;
+      GetNodeSize(nodeId, &x, &y, dc);
+ 
+      m_lastY = m_lastY + y + m_ySpacing;
+    }
+  }
+  else
+  {
+    // Top to bottom
+    
+    // Y Calculations
+    if (level == 0)
+      SetNodeY(nodeId, m_topMargin);
+    else
+    {
+      long x = 0;
+      long y = 0;
+      long parentId = GetNodeParent(nodeId);
+      if (parentId != -1)
+        GetNodeSize(parentId, &x, &y, dc);
+      SetNodeY(nodeId, (long)(GetNodeY(parentId) + m_ySpacing + y));
+    }
+
+    wxNode *node = children.First();
+    while (node)
+    {
+      CalcLayout((long)node->Data(), level+1, dc);
+      node = node->Next();
+    }
+
+    // X Calculations
+    long averageX;
+    ActivateNode(nodeId, TRUE);
+  
+    if (n > 0)
+    {
+      averageX = 0;
+      node = children.First();
+      while (node)
+      {
+        averageX += GetNodeX((long)node->Data());
+        node = node->Next();
+      }
+      averageX = averageX / n;
+      SetNodeX(nodeId, averageX);
+    }
+    else
+    {
+      SetNodeX(nodeId, m_lastX);
+      long x, y;
+      GetNodeSize(nodeId, &x, &y, dc);
+ 
+      m_lastX = m_lastX + x + m_xSpacing;
+    }
+  }
+}
+
+/*
+ * Tree with storage
+ *
+ */
+
+IMPLEMENT_DYNAMIC_CLASS(wxStoredTree, wxTreeLayout)
+
+wxStoredTree::wxStoredTree(int n):wxTreeLayout()
+{
+  m_nodes = NULL;
+  m_maxNodes = 0;
+  Initialize(n);
+}
+
+wxStoredTree::~wxStoredTree(void)
+{
+  if (m_nodes)
+    delete[] m_nodes;
+}
+
+void wxStoredTree::Initialize(int n)
+{
+  m_maxNodes = n;
+  wxTreeLayout::Initialize();
+  if (m_nodes) delete[] m_nodes;
+  m_nodes = new wxStoredNode[m_maxNodes];
+  int i;
+  for (i = 0; i < n; i++)
+  {
+    m_nodes[i].m_name = "";
+    m_nodes[i].m_active = FALSE;
+    m_nodes[i].m_parentId = -1;
+    m_nodes[i].m_x = 0;
+    m_nodes[i].m_y = 0;
+  }
+  m_num = 0;
+}
+
+long wxStoredTree::AddChild(const wxString& name, const wxString& parent)
+{
+  if (m_num < (m_maxNodes -1 ))
+  {
+    long i = -1;
+    if (parent != "")
+      i = NameToId(parent);
+    else m_parentNode = m_num;
+
+    m_nodes[m_num].m_parentId = i;
+    m_nodes[m_num].m_name = name;
+    m_nodes[m_num].m_x = m_nodes[m_num].m_y = 0;
+    m_nodes[m_num].m_clientData = 0;
+    m_num ++;
+
+    return (m_num - 1);
+  }
+  else
+    return -1;
+}
+
+long wxStoredTree::NameToId(const wxString& name)
+{
+  long i;
+  for (i = 0; i < m_num; i++)
+    if (name == m_nodes[i].m_name)
+      return i;
+  return -1;
+}
+
+void wxStoredTree::GetChildren(long id, wxList& list)
+{
+  long currentId = GetTopNode();
+  while (currentId != -1)
+  {
+    if (id == GetNodeParent(currentId))
+      list.Append((wxObject *)currentId);
+    currentId = GetNextNode(currentId);
+  }
+}
+
+wxStoredNode* wxStoredTree::GetNode(long id) const
+{
+    wxASSERT(idx < m_num);
+
+    return &m_nodes[idx];
+};
+
+long wxStoredTree::GetNodeX(long id)
+{
+    wxASSERT(id < m_num);
+
+    return (long)m_nodes[id].m_x;
+}
+
+long wxStoredTree::GetNodeY(long id)
+{
+    wxASSERT(id < m_num);
+
+    return (long)m_nodes[id].m_y;
+}
+
+void wxStoredTree::SetNodeX(long id, long x)
+{
+    wxASSERT(id < m_num);
+
+    m_nodes[id].m_x = (int)x;
+}
+
+void wxStoredTree::SetNodeY(long id, long y)
+{
+    wxASSERT(id < m_num);
+
+    m_nodes[id].m_y = (int)y;
+}
+
+void wxStoredTree::SetNodeName(long id, const wxString& name)
+{
+    wxASSERT(id < m_num);
+
+    m_nodes[id].m_name = name;
+}
+
+wxString wxStoredTree::GetNodeName(long id)
+{
+    wxASSERT(id < m_num);
+
+    return m_nodes[id].m_name;
+}
+
+long wxStoredTree::GetNodeParent(long id)
+{
+  if (id != -1)
+  {
+    wxASSERT(id < m_num);
+
+    return m_nodes[id].m_parentId;
+  }
+  else
+    return -1;
+}
+
+long wxStoredTree::GetNextNode(long id)
+{
+  wxASSERT(id < m_num);
+
+  if ((id != -1) && (id < (m_num - 1)))
+    return id + 1;
+  else
+    return -1;
+}
+
+void wxStoredTree::SetClientData(long id, long clientData)
+{
+    wxASSERT(id < m_num);
+
+    m_nodes[id].m_clientData = clientData;
+}
+
+long wxStoredTree::GetClientData(long id) const
+{
+    wxASSERT(id < m_num);
+
+    return m_nodes[id].m_clientData;
+}
+
+void wxStoredTree::ActivateNode(long id, bool active)
+{
+    wxASSERT(id < m_num);
+
+    m_nodes[id].m_active = active;
+}
+
+bool wxStoredTree::NodeActive(long id)
+{
+    wxASSERT(id < m_num);
+
+    return m_nodes[id].m_active;
+}
+
+wxString wxStoredTree::HitTest(wxMouseEvent& event, wxDC& dc)
+{
+	long x, y;
+	event.Position(&x, &y);
+
+        int i;
+	for (i = 0; i < m_maxNodes; i++)
+	{
+		wxStoredNode* item = &m_nodes[i];
+
+		long width, height;
+		dc.GetTextExtent(m_nodes[i].m_name, &width, &height);
+
+		if ( (x >= (m_nodes[i].m_x-10)) && (x < (m_nodes[i].m_x + width+10)) &&
+					(y >= m_nodes[i].m_y-10) && (y < (m_nodes[i].m_y + height+10)) )
+		{
+			return m_nodes[i].m_name;
+		}
+	}
+
+	return wxString("");
+}
diff --git a/utils/wxtree/src/wxtree.h b/utils/wxtree/src/wxtree.h
new file mode 100644
index 0000000000..538e9e0891
--- /dev/null
+++ b/utils/wxtree/src/wxtree.h
@@ -0,0 +1,135 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        tree.h
+// Purpose:     wxTreeLayout class
+// Author:      Julian Smart
+// Modified by: 
+// Created:     7/4/98
+// RCS-ID:      $Id$
+// Copyright:   (c) 1998 Julian Smart
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WXTREE_H_
+#define _WXTREE_H_
+
+#ifdef __GNUG__
+#pragma interface "wxtree.h"
+#endif
+
+#include <wx/string.h>
+
+class wxTreeLayout: public wxObject
+{
+ DECLARE_ABSTRACT_CLASS(wxTreeLayout)
+
+ public:
+  wxTreeLayout();
+
+  // Redefine these
+  virtual void GetChildren(long id, wxList& list) = 0;
+  virtual long GetNextNode(long id) = 0;
+  virtual long GetNodeParent(long id) = 0;
+  virtual long GetNodeX(long id) = 0;
+  virtual long GetNodeY(long id) = 0;
+  virtual void SetNodeX(long id, long x) = 0;
+  virtual void SetNodeY(long id, long y) = 0;
+  virtual void ActivateNode(long id, bool active) = 0;
+  virtual bool NodeActive(long id) = 0;
+
+  // Optional redefinition
+  void Initialize(void);
+  inline virtual void SetNodeName(long id, const wxString& name) {}
+  inline virtual wxString GetNodeName(long id) { return wxString(""); }
+  virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
+  virtual void Draw(wxDC& dc);
+  virtual void DrawNodes(wxDC& dc);
+  virtual void DrawBranches(wxDC& dc);
+  virtual void DrawNode(long id, wxDC& dc);
+  virtual void DrawBranch(long from, long to, wxDC& dc);
+
+  // Don't redefine
+  virtual void DoLayout(wxDC& dc, long topNode = -1);
+
+  // Accessors -- don't redefine
+  inline void SetTopNode(long id) { m_parentNode = id; }
+  inline long GetTopNode(void) const { return m_parentNode; }
+  inline void SetSpacing(long x, long y) { m_xSpacing = x; m_ySpacing = y; }
+  inline long GetXSpacing(void) const { return m_xSpacing; }
+  inline long GetYSpacing(void) const { return m_ySpacing; }
+  inline void SetMargins(long x, long y) { m_leftMargin = x; m_topMargin = y; }
+  inline long GetTopMargin(void) const { return m_topMargin; }
+  inline long GetLeftMargin(void) const { return m_leftMargin; }
+
+  inline bool GetOrientation(void) const { return m_orientation; }
+  inline void SetOrientation(bool or) { m_orientation = or; }
+
+ private:
+  void CalcLayout(long node_id, int level, wxDC& dc);
+
+// Members
+
+ protected:
+  long          m_parentNode;
+  long          m_lastY;
+  long          m_lastX;
+  long          m_xSpacing;
+  long          m_ySpacing;
+  long          m_topMargin;
+  long          m_leftMargin;
+  bool          m_orientation; // TRUE for top-to-bottom, FALSE for left-to-right
+};
+
+class wxStoredNode
+{
+ public:
+  wxString      m_name;
+  long          m_x, m_y;
+  long          m_parentId;
+  bool          m_active;
+  long          m_clientData;
+};
+
+/*
+ * A version of wxTreeLayout with storage for nodes
+ */
+
+class wxStoredTree: public wxTreeLayout
+{
+ DECLARE_DYNAMIC_CLASS(wxStoredTree)
+public:
+  wxStoredTree(int noNodes = 200);
+  ~wxStoredTree(void);
+  void Initialize(int n);
+
+  wxString HitTest(wxMouseEvent& event, wxDC& dc);
+  wxStoredNode* GetNode(long id) const;
+  inline int GetNumNodes() const { return m_maxNodes; };
+  inline int GetNodeCount() const { return m_num; };
+
+  virtual void GetChildren(long id, wxList& list);
+  virtual long GetNextNode(long id);
+  virtual long GetNodeParent(long id);
+  virtual long GetNodeX(long id);
+  virtual long GetNodeY(long id);
+  virtual void SetNodeX(long id, long x);
+  virtual void SetNodeY(long id, long y);
+  virtual void SetNodeName(long id, const wxString& name);
+  virtual wxString GetNodeName(long id);
+  virtual void ActivateNode(long id, bool active);
+  virtual bool NodeActive(long id);
+  virtual void SetClientData(long id, long clientData);
+  virtual long GetClientData(long id) const;
+
+  virtual long AddChild(const wxString& name, const wxString& parent = "");
+  virtual long NameToId(const wxString& name);
+
+// Data members
+private:
+  wxStoredNode*     m_nodes;
+  int               m_num;
+  int               m_maxNodes;
+};
+
+#endif
+ // _WXTREE_H_
+  
-- 
2.45.2

