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