NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
treelistctrl.h
Go to the documentation of this file.
1
2// Name: treelistctrl.h
3// Purpose: wxTreeListCtrl class
4// Created: 01/02/97
5// Author: Robert Roebling
6// Maintainer: Ronan Chartois (pgriddev)
7// Version: $Id: treelistctrl.h 3043 2012-07-31 19:28:14Z pgriddev $
8// Copyright: (c) 2004-2011 Robert Roebling, Julian Smart, Alberto Griggio,
9// Vadim Zeitlin, Otto Wyss, Ronan Chartois
10// Licence: wxWindows
12
13
14#ifndef TREELISTCTRL_H
15#define TREELISTCTRL_H
16
17#if defined(__GNUG__) && !defined(__APPLE__)
18 #pragma interface "treelistctrl.h"
19#endif
20
21#include <wx/treectrl.h>
22#include <wx/control.h>
23#include <wx/pen.h>
24#include <wx/listctrl.h> // for wxListEvent
25#if wxUSE_XRC
26 #include "wx/xrc/xmlres.h"
27#endif
28
29
30#if wxCHECK_VERSION(2,9,0)
31namespace wxcode {
32#endif
33
34class WXDLLEXPORT wxTreeListItem;
35class WXDLLEXPORT wxTreeListHeaderWindow;
36class WXDLLEXPORT wxTreeListMainWindow;
37
38#define wxTR_COLUMN_LINES 0x1000 // put border around items
39#define wxTR_VIRTUAL 0x4000 // The application provides items text on demand.
40
41// Using this typedef removes an ambiguity when calling Remove()
42#ifdef __WXMSW__
43#if !wxCHECK_VERSION(2, 5, 0)
44typedef long wxTreeItemIdValue;
45#else
46// typedef void *wxTreeItemIdValue;
47#endif
48#endif
49
50//-----------------------------------------------------------------------------
51// wxTreeListColumnAttrs
52//-----------------------------------------------------------------------------
53
54enum {
56};
57
58class WXDLLEXPORT wxTreeListColumnInfo: public wxObject {
59
60public:
61 wxTreeListColumnInfo (const wxString &text = wxEmptyString,
62 int width = DEFAULT_COL_WIDTH,
63 int flag = wxALIGN_LEFT,
64 int image = -1,
65 bool shown = true,
66 bool edit = false) {
67 m_text = text;
68 m_width = width;
69 m_flag = flag;
70 m_image = image;
71 m_selected_image = -1;
72 m_shown = shown;
73 m_edit = edit;
74 }
75
77 m_text = other.m_text;
78 m_width = other.m_width;
79 m_flag = other.m_flag;
80 m_image = other.m_image;
81 m_selected_image = other.m_selected_image;
82 m_shown = other.m_shown;
83 m_edit = other.m_edit;
84 }
85
87
88 // get/set
89 wxString GetText() const { return m_text; }
90 wxTreeListColumnInfo& SetText (const wxString& text) { m_text = text; return *this; }
91
92 int GetWidth() const { return m_shown ? m_width : 0; }
93 wxTreeListColumnInfo& SetWidth (int width) { m_width = width; return *this; }
94
95 int GetAlignment() const { return m_flag; }
96 wxTreeListColumnInfo& SetAlignment (int flag) { m_flag = flag; return *this; }
97
98 int GetImage() const { return m_image; }
99 wxTreeListColumnInfo& SetImage (int image) { m_image = image; return *this; }
100
101 int GetSelectedImage() const { return m_selected_image; }
102 wxTreeListColumnInfo& SetSelectedImage (int image) { m_selected_image = image; return *this; }
103
104 bool IsEditable() const { return m_edit; }
106 { m_edit = edit; return *this; }
107
108 bool IsShown() const { return m_shown; }
109 wxTreeListColumnInfo& SetShown(bool shown) { m_shown = shown; return *this; }
110
111private:
112 wxString m_text;
118 bool m_edit;
119};
120
121//----------------------------------------------------------------------------
122// wxTreeListCtrl - the multicolumn tree control
123//----------------------------------------------------------------------------
124
125// modes for navigation
126const int wxTL_MODE_NAV_FULLTREE = 0x0000; // default
127const int wxTL_MODE_NAV_EXPANDED = 0x0001;
128const int wxTL_MODE_NAV_VISIBLE = 0x0002;
129const int wxTL_MODE_NAV_LEVEL = 0x0004;
130
131// modes for FindItem
132const int wxTL_MODE_FIND_EXACT = 0x0000; // default
133const int wxTL_MODE_FIND_PARTIAL = 0x0010;
134const int wxTL_MODE_FIND_NOCASE = 0x0020;
135
136// additional flag for HitTest
138extern WXDLLEXPORT const wxChar* wxTreeListCtrlNameStr;
139
140
141class WXDLLEXPORT wxTreeListCtrl : public wxControl
142{
145friend class wxTreeListItem;
146public:
147
148 // ---------- creation ----------
149
151 : m_header_win(0), m_main_win(0), m_headerHeight(0)
152 {}
153
154 wxTreeListCtrl(wxWindow *parent, wxWindowID id = -1,
155 const wxPoint& pos = wxDefaultPosition,
156 const wxSize& size = wxDefaultSize,
157 long style = wxTR_DEFAULT_STYLE,
158 const wxValidator &validator = wxDefaultValidator,
159 const wxString& name = wxTreeListCtrlNameStr )
160 : m_header_win(0), m_main_win(0), m_headerHeight(0)
161 {
162 Create(parent, id, pos, size, style, validator, name);
163 }
164
165 virtual ~wxTreeListCtrl() {}
166
167 bool Create(wxWindow *parent, wxWindowID id = -1,
168 const wxPoint& pos = wxDefaultPosition,
169 const wxSize& size = wxDefaultSize,
170 long style = wxTR_DEFAULT_STYLE,
171 const wxValidator &validator = wxDefaultValidator,
172 const wxString& name = wxTreeListCtrlNameStr );
173
174 void Refresh(bool erase=TRUE, const wxRect* rect=NULL);
175 void SetFocus();
176
177
178 // ---------- general methods ----------
179
180 // get the total number of items in the control
181 size_t GetCount() const;
182
183 // indent is the number of pixels the children are indented relative to
184 // the parents position. SetIndent() also redraws the control
185 // immediately.
186 unsigned int GetIndent() const;
187 void SetIndent(unsigned int indent);
188
189 // line spacing is the space above and below the text on each line
190 unsigned int GetLineSpacing() const;
191 void SetLineSpacing(unsigned int spacing);
192
193 // image list: these functions allow to associate an image list with
194 // the control and retrieve it. Note that when assigned with
195 // SetImageList, the control does _not_ delete
196 // the associated image list when it's deleted in order to allow image
197 // lists to be shared between different controls. If you use
198 // AssignImageList, the control _does_ delete the image list.
199 //
200 // The normal image list is for the icons which correspond to the
201 // normal tree item state (whether it is selected or not).
202 // Additionally, the application might choose to show a state icon
203 // which corresponds to an app-defined item state (for example,
204 // checked/unchecked) which are taken from the state image list.
205 wxImageList *GetImageList() const;
206 wxImageList *GetStateImageList() const;
207 wxImageList *GetButtonsImageList() const;
208
209 void SetImageList(wxImageList *imageList);
210 void SetStateImageList(wxImageList *imageList);
211 void SetButtonsImageList(wxImageList *imageList);
212 void AssignImageList(wxImageList *imageList);
213 void AssignStateImageList(wxImageList *imageList);
214 void AssignButtonsImageList(wxImageList *imageList);
215
216 void SetToolTip(const wxString& tip);
217 void SetToolTip (wxToolTip *tip);
218 void SetItemToolTip(const wxTreeItemId& item, const wxString &tip);
219
220 // ---------- Functions to work with columns ----------
221
222 // adds a column
223 void AddColumn (const wxString& text,
224 int width = DEFAULT_COL_WIDTH,
225 int flag = wxALIGN_LEFT,
226 int image = -1,
227 bool shown = true,
228 bool edit = false) {
229 AddColumn (wxTreeListColumnInfo (text, width, flag, image, shown, edit));
230 }
231 void AddColumn (const wxTreeListColumnInfo& colInfo);
232
233 // inserts a column before the given one
234 void InsertColumn (int before,
235 const wxString& text,
236 int width = DEFAULT_COL_WIDTH,
237 int flag = wxALIGN_LEFT,
238 int image = -1,
239 bool shown = true,
240 bool edit = false) {
241 InsertColumn (before,
242 wxTreeListColumnInfo (text, width, flag, image, shown, edit));
243 }
244 void InsertColumn (int before, const wxTreeListColumnInfo& colInfo);
245
246 // deletes the given column - does not delete the corresponding column
247 void RemoveColumn (int column);
248
249 // returns the number of columns in the ctrl
250 int GetColumnCount() const;
251
252 // tells which column is the "main" one, i.e. the "threaded" one
253 void SetMainColumn (int column);
254 int GetMainColumn() const;
255
256 void SetColumn (int column, const wxTreeListColumnInfo& colInfo);
257 wxTreeListColumnInfo GetColumn (int column);
258 const wxTreeListColumnInfo& GetColumn (int column) const;
259
260 void SetColumnText (int column, const wxString& text);
261 wxString GetColumnText (int column) const;
262
263 void SetColumnWidth (int column, int width);
264 int GetColumnWidth (int column) const;
265
266 void SetColumnAlignment (int column, int flag);
267 int GetColumnAlignment (int column) const;
268
269 void SetColumnImage (int column, int image);
270 int GetColumnImage (int column) const;
271
272 void SetColumnShown (int column, bool shown = true);
273 bool IsColumnShown (int column) const;
274
275 void SetColumnEditable (int column, bool edit = true);
276 bool IsColumnEditable (int column) const;
277
278 // ---------- Functions to work with items. ----------
279
280 // accessors (most properties have a default at row/item level)
281 // ---------
282
283 wxString GetItemText (const wxTreeItemId& item) const { return GetItemText (item, GetMainColumn()); };
284 wxString GetItemText (const wxTreeItemId& item, int column) const;
285
286 int GetItemImage (const wxTreeItemId& item, wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
287 int GetItemImage (const wxTreeItemId& item, int column) const;
288
289 wxTreeItemData *GetItemData (const wxTreeItemId& item) const;
290 wxTreeItemData *GetItemData (const wxTreeItemId& item, int column) const;
291
292 bool GetItemBold (const wxTreeItemId& item) const;
293 bool GetItemBold (const wxTreeItemId& item, int column) const;
294
295 wxColour GetItemTextColour (const wxTreeItemId& item) const;
296 wxColour GetItemTextColour (const wxTreeItemId& item, int column) const;
297
298 wxColour GetItemBackgroundColour (const wxTreeItemId& item) const;
299 wxColour GetItemBackgroundColour (const wxTreeItemId& item, int column) const;
300
301 wxFont GetItemFont (const wxTreeItemId& item) const;
302 wxFont GetItemFont (const wxTreeItemId& item, int column) const;
303
304 // modifiers (most properties have a default at row/item level)
305 // ---------
306
307 void SetItemText (const wxTreeItemId& item, const wxString& text);
308 void SetItemText (const wxTreeItemId& item, int column, const wxString& text);
309
310 // the which parameter is ignored for all columns but the main one
311 void SetItemImage (const wxTreeItemId& item, int image, wxTreeItemIcon which = wxTreeItemIcon_Normal);
312 void SetItemImage (const wxTreeItemId& item, int column, int image);
313
314 void SetItemData (const wxTreeItemId& item, wxTreeItemData *data);
315 void SetItemData (const wxTreeItemId& item, int column, wxTreeItemData *data);
316
317 void SetItemBold (const wxTreeItemId& item, bool bold = true);
318 void SetItemBold (const wxTreeItemId& item, int column, bool bold = true);
319
320 void SetItemTextColour (const wxTreeItemId& item, const wxColour& colour);
321 void SetItemTextColour (const wxTreeItemId& item, int column, const wxColour& colour);
322
323 void SetItemBackgroundColour (const wxTreeItemId& item, const wxColour& colour);
324 void SetItemBackgroundColour (const wxTreeItemId& item, int column, const wxColour& colour);
325
326 // font should be of the same height for all items
327 void SetItemFont (const wxTreeItemId& item, const wxFont& font);
328 void SetItemFont (const wxTreeItemId& item, int column, const wxFont& font);
329
330 // force appearance of [+] button near the item. This is useful to
331 // allow the user to expand the items which don't have any children now
332 // - but instead add them only when needed, thus minimizing memory
333 // usage and loading time.
334 void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
335
336 // item status inquiries
337 // ---------------------
338
339 // is the item visible (it might be outside the view or not expanded)?
340 bool IsVisible (const wxTreeItemId& item, bool fullRow = false, bool within = true) const;
341 // does the item has any children?
342 bool HasChildren (const wxTreeItemId& item) const;
343 // is the item expanded (only makes sense if HasChildren())?
344 bool IsExpanded (const wxTreeItemId& item) const;
345 // is this item currently selected (the same as has focus)?
346 bool IsSelected (const wxTreeItemId& item) const;
347 // is item text in bold font?
348 bool IsBold (const wxTreeItemId& item) const { return IsBold(item, GetMainColumn()); };
349 bool IsBold (const wxTreeItemId& item, int column) const { return GetItemBold(item, column); };
350 // does the layout include space for a button?
351
352
353 // set the window font
354 virtual bool SetFont ( const wxFont &font );
355
356 // set the styles.
357 void SetWindowStyle (const long styles);
358 long GetWindowStyle() const;
359 long GetWindowStyleFlag () const { return GetWindowStyle(); }
360
361 // number of children
362 // ------------------
363
364 // if 'recursively' is FALSE, only immediate children count, otherwise
365 // the returned number is the number of all items in this branch
366 size_t GetChildrenCount (const wxTreeItemId& item, bool recursively = true);
367
368 // navigation
369 // ----------
370
371 // wxTreeItemId.IsOk() will return FALSE if there is no such item
372
373 // get the root tree item
374 wxTreeItemId GetRootItem() const;
375
376 // get the item currently selected (may return NULL if no selection)
377 wxTreeItemId GetSelection() const;
378
379 // get the items currently selected, return the number of such item
380 size_t GetSelections (wxArrayTreeItemIds&) const;
381
382 // get the parent of this item (may return NULL if root)
383 wxTreeItemId GetItemParent (const wxTreeItemId& item) const;
384
385 // for this enumeration function you must pass in a "cookie" parameter
386 // which is opaque for the application but is necessary for the library
387 // to make these functions reentrant (i.e. allow more than one
388 // enumeration on one and the same object simultaneously). Of course,
389 // the "cookie" passed to GetFirstChild() and GetNextChild() should be
390 // the same!
391
392 // get child of this item
393#if !wxCHECK_VERSION(2, 5, 0)
394 wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const;
395 wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
396 wxTreeItemId GetPrevChild(const wxTreeItemId& item, long& cookie) const;
397 wxTreeItemId GetLastChild(const wxTreeItemId& item, long& cookie) const;
398#else
399 wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
400 wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
401 wxTreeItemId GetPrevChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
402 wxTreeItemId GetLastChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
403#endif
404
405 // get sibling of this item
406 wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
407 wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
408
409 // get item in the full tree (currently only for internal use)
410 wxTreeItemId GetNext(const wxTreeItemId& item) const;
411 wxTreeItemId GetPrev(const wxTreeItemId& item) const;
412
413 // get expanded item, see IsExpanded()
414 wxTreeItemId GetFirstExpandedItem() const;
415 wxTreeItemId GetNextExpanded(const wxTreeItemId& item) const;
416 wxTreeItemId GetPrevExpanded(const wxTreeItemId& item) const;
417
418 // get visible item, see IsVisible()
419 wxTreeItemId GetFirstVisibleItem( bool fullRow = false) const;
420 wxTreeItemId GetFirstVisible( bool fullRow = false, bool within = true) const;
421 wxTreeItemId GetNextVisible (const wxTreeItemId& item, bool fullRow = false, bool within = true) const;
422 wxTreeItemId GetPrevVisible (const wxTreeItemId& item, bool fullRow = false, bool within = true) const;
423 wxTreeItemId GetLastVisible ( bool fullRow = false, bool within = true) const;
424
425 // operations
426 // ----------
427
428 // add the root node to the tree
429 wxTreeItemId AddRoot (const wxString& text,
430 int image = -1, int selectedImage = -1,
431 wxTreeItemData *data = NULL);
432
433 // insert a new item in as the first child of the parent
434 wxTreeItemId PrependItem (const wxTreeItemId& parent,
435 const wxString& text,
436 int image = -1, int selectedImage = -1,
437 wxTreeItemData *data = NULL);
438
439 // insert a new item after a given one
440 wxTreeItemId InsertItem (const wxTreeItemId& parent,
441 const wxTreeItemId& idPrevious,
442 const wxString& text,
443 int image = -1, int selectedImage = -1,
444 wxTreeItemData *data = NULL);
445
446 // insert a new item before the one with the given index
447 wxTreeItemId InsertItem (const wxTreeItemId& parent,
448 size_t index,
449 const wxString& text,
450 int image = -1, int selectedImage = -1,
451 wxTreeItemData *data = NULL);
452
453 // insert a new item in as the last child of the parent
454 wxTreeItemId AppendItem (const wxTreeItemId& parent,
455 const wxString& text,
456 int image = -1, int selectedImage = -1,
457 wxTreeItemData *data = NULL);
458
459 // delete this item (except root) + children and associated data if any
460 void Delete (const wxTreeItemId& item);
461 // delete all children (but don't delete the item itself)
462 void DeleteChildren (const wxTreeItemId& item);
463 // delete the root and all its children from the tree
464 void DeleteRoot();
465
466 // change item's parent (return previous parent)
467 void SetItemParent(const wxTreeItemId& parent, const wxTreeItemId& item);
468
469 // expand this item
470 void Expand (const wxTreeItemId& item);
471 // expand this item and all subitems recursively
472 void ExpandAll (const wxTreeItemId& item);
473 // collapse the item without removing its children
474 void Collapse (const wxTreeItemId& item);
475 // collapse the item and remove all children
476 void CollapseAndReset(const wxTreeItemId& item); //? TODO ???
477 // toggles the current state
478 void Toggle (const wxTreeItemId& item);
479
480 // set cursor item (indicated by black rectangle)
481 void SetCurrentItem(const wxTreeItemId& item = (wxTreeItemId*)NULL);
482
483 // remove the selection from currently selected item (if any)
484 void Unselect();
485 void UnselectAll();
486 // select this item - return true if selection was allowed (no veto)
487 bool SelectItem (const wxTreeItemId& item,
488 const wxTreeItemId& last = (wxTreeItemId*)NULL,
489 bool unselect_others = true);
490 // select all items in the expanded tree
491 void SelectAll();
492 // make sure this item is visible (expanding the parent item and/or
493 // scrolling to this item if necessary)
494 void EnsureVisible (const wxTreeItemId& item);
495 // scroll to this item (but don't expand its parent)
496 void ScrollTo (const wxTreeItemId& item);
497
498 // The first function is more portable (because easier to implement
499 // on other platforms), but the second one returns some extra info.
500 wxTreeItemId HitTest (const wxPoint& point)
501 { int flags; int column; return HitTest (point, flags, column); }
502 wxTreeItemId HitTest (const wxPoint& point, int& flags)
503 { int column; return HitTest (point, flags, column); }
504 wxTreeItemId HitTest (const wxPoint& point, int& flags, int& column);
505
506 // get the bounding rectangle of the item (or of its label only)
507 bool GetBoundingRect (const wxTreeItemId& item, wxRect& rect,
508 bool textOnly = false) const;
509
510 // Start editing the item label: this (temporarily) replaces the item
511 // with a one line edit control. The item will be selected if it hadn't
512 // been before.
513 void EditLabel (const wxTreeItemId& item)
514 { EditLabel (item, GetMainColumn()); }
515 // edit item's label of the given column
516 void EditLabel (const wxTreeItemId& item, int column);
517 void EndEdit(bool isCancelled);
518
519 // virtual mode
520 virtual wxString OnGetItemText( wxTreeItemData* item, long column ) const;
521
522 // sorting
523 // this function is called to compare 2 items and should return -1, 0
524 // or +1 if the first item is less than, equal to or greater than the
525 // second one. The base class version performs alphabetic comparaison
526 // of item labels (GetText)
527 virtual int OnCompareItems (const wxTreeItemId& item1, const wxTreeItemId& item2);
528 virtual int OnCompareItems (const wxTreeItemId& item1, const wxTreeItemId& item2, int column);
529 // sort the children of this item using OnCompareItems
530 // NB: this function is not reentrant and not MT-safe (TODO)!
531 void SortChildren(const wxTreeItemId& item, int column = -1, bool reverseOrder = false);
532
533 // searching (by column only)
534 wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int mode = 0) { return FindItem(item, -1, str, mode); };
535 wxTreeItemId FindItem (const wxTreeItemId& item, int column, const wxString& str, int mode = 0);
536
537 // overridden base class virtuals
538 virtual bool SetBackgroundColour (const wxColour& colour);
539 virtual bool SetForegroundColour (const wxColour& colour);
540
541 // drop over item
542 void SetDragItem (const wxTreeItemId& item = (wxTreeItemId*)NULL);
543
544
545 virtual wxSize DoGetBestSize() const;
546
547protected:
548 // header window, responsible for column visualization and manipulation
550 { return m_header_win; }
551 wxTreeListHeaderWindow* m_header_win; // future cleanup: make private or remove GetHeaderWindow()
552
553 // main window, the "true" tree ctrl
555 { return m_main_win; }
556 wxTreeListMainWindow* m_main_win; // future cleanup: make private or remove GetMainWindow()
557
558 int GetHeaderHeight() const { return m_headerHeight; }
559
560 void CalculateAndSetHeaderHeight();
561 void DoHeaderLayout();
562 void OnSize(wxSizeEvent& event);
563
564private:
566
567 DECLARE_EVENT_TABLE()
568 DECLARE_DYNAMIC_CLASS(wxTreeListCtrl)
569};
570
571
572//----------------------------------------------------------------------------
573// wxTreeListCtrlXmlHandler - XRC support for wxTreeListCtrl
574//----------------------------------------------------------------------------
575
576#if wxUSE_XRC
577
578class WXDLLIMPEXP_XRC wxTreeListCtrlXmlHandler : public wxXmlResourceHandler {
579 DECLARE_DYNAMIC_CLASS(wxTreeListCtrlXmlHandler)
580public:
581 wxTreeListCtrlXmlHandler();
582 virtual wxObject *DoCreateResource();
583 virtual bool CanHandle(wxXmlNode *node);
584};
585
586#endif /* wxUSE_XRC */
587
588#if wxCHECK_VERSION(2,9,0)
589} // namespace wxcode
590#endif
591
592
594#endif /* TREELISTCTRL_H */
595
bool IsShown() const
Definition: treelistctrl.h:108
wxTreeListColumnInfo & SetAlignment(int flag)
Definition: treelistctrl.h:96
int GetWidth() const
Definition: treelistctrl.h:92
wxTreeListColumnInfo & SetWidth(int width)
Definition: treelistctrl.h:93
int GetSelectedImage() const
Definition: treelistctrl.h:101
wxTreeListColumnInfo(const wxTreeListColumnInfo &other)
Definition: treelistctrl.h:76
wxTreeListColumnInfo & SetSelectedImage(int image)
Definition: treelistctrl.h:102
wxTreeListColumnInfo & SetEditable(bool edit)
Definition: treelistctrl.h:105
wxTreeListColumnInfo & SetImage(int image)
Definition: treelistctrl.h:99
bool IsEditable() const
Definition: treelistctrl.h:104
wxString GetText() const
Definition: treelistctrl.h:89
wxTreeListColumnInfo(const wxString &text=wxEmptyString, int width=DEFAULT_COL_WIDTH, int flag=wxALIGN_LEFT, int image=-1, bool shown=true, bool edit=false)
Definition: treelistctrl.h:61
int GetAlignment() const
Definition: treelistctrl.h:95
int GetImage() const
Definition: treelistctrl.h:98
wxTreeListColumnInfo & SetText(const wxString &text)
Definition: treelistctrl.h:90
wxTreeListColumnInfo & SetShown(bool shown)
Definition: treelistctrl.h:109
void EditLabel(const wxTreeItemId &item)
Definition: treelistctrl.h:513
void InsertColumn(int before, const wxString &text, int width=DEFAULT_COL_WIDTH, int flag=wxALIGN_LEFT, int image=-1, bool shown=true, bool edit=false)
Definition: treelistctrl.h:234
wxTreeListMainWindow * GetMainWindow() const
Definition: treelistctrl.h:554
wxTreeItemId HitTest(const wxPoint &point)
Definition: treelistctrl.h:500
wxTreeItemId FindItem(const wxTreeItemId &item, const wxString &str, int mode=0)
Definition: treelistctrl.h:534
int GetHeaderHeight() const
Definition: treelistctrl.h:558
wxString GetItemText(const wxTreeItemId &item) const
Definition: treelistctrl.h:283
wxTreeListHeaderWindow * GetHeaderWindow() const
Definition: treelistctrl.h:549
wxTreeItemId HitTest(const wxPoint &point, int &flags)
Definition: treelistctrl.h:502
void AddColumn(const wxString &text, int width=DEFAULT_COL_WIDTH, int flag=wxALIGN_LEFT, int image=-1, bool shown=true, bool edit=false)
Definition: treelistctrl.h:223
bool IsBold(const wxTreeItemId &item, int column) const
Definition: treelistctrl.h:349
virtual ~wxTreeListCtrl()
Definition: treelistctrl.h:165
long GetWindowStyleFlag() const
Definition: treelistctrl.h:359
wxTreeListMainWindow * m_main_win
Definition: treelistctrl.h:556
wxTreeListCtrl(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTR_DEFAULT_STYLE, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxTreeListCtrlNameStr)
Definition: treelistctrl.h:154
bool IsBold(const wxTreeItemId &item) const
Definition: treelistctrl.h:348
void SetItemText(const wxTreeItemId &item, const wxString &text)
wxTreeListHeaderWindow * m_header_win
Definition: treelistctrl.h:551
size_t GetChildrenCount(bool recursively=true) const
bool IsExpanded() const
void SetItemParent(wxTreeListItem *parent)
bool HasChildren() const
wxTreeListItem * GetItemParent() const
bool IsSelected() const
wxTreeListItem * HitTest(const wxPoint &point, const wxTreeListMainWindow *, int &flags, int &column, int level)
void SetToolTip(const wxString &tip)
CONSTDATA date::last_spec last
Definition: date.h:1989
#define TRUE
Definition: resampler.cpp:38
char name[32]
Definition: resampler.cpp:371
const int wxTL_MODE_NAV_VISIBLE
Definition: treelistctrl.h:128
const int wxTL_MODE_NAV_LEVEL
Definition: treelistctrl.h:129
const int wxTL_MODE_FIND_EXACT
Definition: treelistctrl.h:132
const int wxTL_MODE_FIND_NOCASE
Definition: treelistctrl.h:134
const int wxTREE_HITTEST_ONITEMCOLUMN
Definition: treelistctrl.h:137
const int wxTL_MODE_NAV_EXPANDED
Definition: treelistctrl.h:127
const int wxTL_MODE_NAV_FULLTREE
Definition: treelistctrl.h:126
WXDLLEXPORT const wxChar * wxTreeListCtrlNameStr
const int wxTL_MODE_FIND_PARTIAL
Definition: treelistctrl.h:133
@ DEFAULT_COL_WIDTH
Definition: treelistctrl.h:55