1 #ifndef __KONST_UI_TREE_H_
2 #define __KONST_UI_TREE_H_
8 #include "conscommon.h"
9 #include "abstractui.h"
12 __KTOOL_BEGIN_NAMESPACE
14 class treeview
: public abstractuicontrol
{
17 int id
, parentid
, color
;
22 bool operator == (const int aid
);
23 bool operator == (const void *aref
);
24 bool operator != (const int aid
);
25 bool operator != (const void *aref
);
28 int bgcolor
, selectcolor
, nodecolor
, leafcolor
, idseq
;
30 vector
<treeviewnode
> items
;
31 vector
<treeviewnode
> nestlevel
;
32 vector
<treeviewnode
> refdeps
;
36 void genmenu(int parent
);
44 treeview(int nx1
, int ny1
, int nx2
, int ny2
, int nbgcolor
, int nselectcolor
, int nnodecolor
, int nleafcolor
);
45 treeview(int nbgcolor
, int nselectcolor
, int nnodecolor
, int nleafcolor
);
51 int addnode(int parent
, int color
, void *ref
, const string
&text
);
52 int addnode(int parent
, int color
, int ref
, const string
&text
);
53 int addnode(const string
&text
);
55 int addnodef(int parent
, int color
, void *ref
, const char *fmt
, ...);
56 int addnodef(int parent
, int color
, int ref
, const char *fmt
, ...);
57 int addnodef(const char *fmt
, ...);
59 int addleaf(int parent
, int color
, void *ref
, const string
&text
);
60 int addleaf(int parent
, int color
, int ref
, const string
&text
);
61 int addleaf(const string
&text
);
63 int addleaff(int parent
, int color
, void *ref
, const char *fmt
, ...);
64 int addleaff(int parent
, int color
, int ref
, const char *fmt
, ...);
65 int addleaff(const char *fmt
, ...);
67 void opennode(int mpos
);
68 void closenode(int mpos
);
74 bool isnodeopen(int id
);
76 int getparent(int id
);
85 void setcoords(int nx1
, int ny1
, int nx2
, int ny2
);
90 #ifdef __KTOOL_USE_NAMESPACES
92 using ktool::treeview
;