1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
<HTML>
<head><title>wxStoredTree</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxstoredtree"></A><CENTER>
<A HREF="tree.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="tree3.htm#topic2"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="tree4.htm#wxtreelayout"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="tree6.htm#bibliography"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxStoredTree</H2>
<P>
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.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="tree4.htm#wxtreelayout">wxTreeLayout</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic25">wxStoredTree::wxStoredTree</A><BR>
<A HREF="#wxstoredtreeaddchild">wxStoredTree::AddChild</A><BR>
<A HREF="#wxstoredtreegetclientdata">wxStoredTree::GetClientData</A><BR>
<A HREF="#wxstoredtreegetnode">wxStoredTree::GetNode</A><BR>
<A HREF="#wxstoredtreegetnodecount">wxStoredTree::GetNodeCount</A><BR>
<A HREF="#wxstoredtreegetnumnodes">wxStoredTree::GetNumNodes</A><BR>
<A HREF="#wxstoredtreehittest">wxStoredTree::HitTest</A><BR>
<A HREF="#wxstoredtreenametoid">wxStoredTree::NameToId</A><BR>
<A HREF="#wxstoredtreesetclientdata">wxStoredTree::SetClientData</A><BR>
<P>
<HR>
<A NAME="topic25"></A>
<H3>wxStoredTree::wxStoredTree</H3>
<P>
<B></B> <B>wxStoredTree</B>(<B>int </B><I>noNodes = 200</I>)<P>
Constructor. Specify the maximum number of nodes to be allocated.<P>
<HR>
<A NAME="wxstoredtreeaddchild"></A>
<H3>wxStoredTree::AddChild</H3>
<P>
<B>long</B> <B>AddChild</B>(<B>const wxString&</B><I> name</I>, <B>const wxString&</B><I> parent = ""</I>)<P>
Adds a child with a given parent, returning the node id.<P>
<HR>
<A NAME="wxstoredtreegetclientdata"></A>
<H3>wxStoredTree::GetClientData</H3>
<P>
<B>long</B> <B>GetClientData</B>(<B>long</B><I> id</I>) <B>const</B><P>
Gets the client data for the given node.<P>
<HR>
<A NAME="wxstoredtreegetnode"></A>
<H3>wxStoredTree::GetNode</H3>
<P>
<B>wxStoredNode*</B> <B>GetNode</B>(<B>long</B><I> id</I>) <B>const</B><P>
Returns the wxStoredNode object for the given node id.<P>
<HR>
<A NAME="wxstoredtreegetnodecount"></A>
<H3>wxStoredTree::GetNodeCount</H3>
<P>
<B>int</B> <B>GetNodeCount</B>() <B>const</B><P>
Returns the current number of nodes.<P>
<HR>
<A NAME="wxstoredtreegetnumnodes"></A>
<H3>wxStoredTree::GetNumNodes</H3>
<P>
<B>int</B> <B>GetNumNodes</B>() <B>const</B><P>
Returns the maximum number of nodes.<P>
<HR>
<A NAME="wxstoredtreehittest"></A>
<H3>wxStoredTree::HitTest</H3>
<P>
<B>wxString</B> <B>HitTest</B>(<B>wxMouseEvent&</B><I> event</I>, <B>wxDC& </B><I>dc</I>)<P>
Returns a string with the node name corresponding to the position of the mouse event, or the empty string if no node
was detected.<P>
<HR>
<A NAME="wxstoredtreenametoid"></A>
<H3>wxStoredTree::NameToId</H3>
<P>
<B>long</B> <B>NameToId</B>(<B>const wxString&</B><I> name</I>)<P>
Returns the id for the given node name, or -1 if there was no such node.<P>
<HR>
<A NAME="wxstoredtreesetclientdata"></A>
<H3>wxStoredTree::SetClientData</H3>
<P>
<B>void</B> <B>SetClientData</B>(<B>long</B><I> id</I>, <B>long</B><I> clientData</I>)<P>
Sets client data for the given node.<P>
</DL>
<P>
</BODY></HTML>
|