ToolMap
Loading...
Searching...
No Matches
wxTreeMultiCtrl.h
1//---------------------------------------------------------------------------
2// $RCSfile$
3// $Source$
4// $Revision$
5// $Date$
6//---------------------------------------------------------------------------
7// Author: Jorgen Bodde
8// Copyright: (c) Jorgen Bodde
9// License: wxWidgets License
10//---------------------------------------------------------------------------
11
12#ifndef __WXTREEMULTICTRL_H__
13#define __WXTREEMULTICTRL_H__
14
70#ifdef __GNUG__
71#pragma interface "wxTreeMultiCtrl.cpp"
72#endif
73
74#ifndef WX_PRECOMP
75#include <wx/wx.h>
76#endif
77
78#include <wx/dynarray.h>
79
80// classes for internal tree structure
81#include "TreeMultiItemRoot.h"
82
83// Flags for wxTreeMultCtrl use
84#define wxTMC_DEFAULT_STYLE wxSIMPLE_BORDER
85
93#define wxTMC_BG_ADJUST_CNT 0x000000001
96#define wxTMC_BG_ADJUST_BTN 0x000000002
99#define wxTMC_BG_ADJUST_ALL (wxTMC_BG_ADJUST_CNT | wxTMC_BG_ADJUST_BTN)
102#define wxTMC_SPAN_WIDTH 0x000000004
106#define wxTreeMultiCtrlNameStr wxT("wxTreeMultiCtrl")
107
108#define WXTMC_GUTTER_DEFAULT 6 // gutter before and after image of [+] or [-]
109#define WXTMC_YSPACING_DEFAULT 10 // per item 10 pixels spacing extra for every item
110#define WXTMC_PIXELS_PER_UNIT 10
111
116enum {
126
174 private:
175 TreeMultiItemBase* _item;
176
177 public:
181 _item = 0;
182 };
183
184#ifndef _NO_DOXYGEN_
185
187 _item = ptr;
188 };
189
190 // Returns the TreeMultiItemBase class. This shoult *NOT* be
191 // used if you don't know what you are doing! This means never use it. */
192 TreeMultiItemBase* GetItem() const {
193 return _item;
194 };
195
196#endif // _NO_DOXYGEN_
197
201 void operator=(const wxTreeMultiItem& item) {
202 _item = item._item;
203 };
204
206 bool operator==(wxTreeMultiItem const& item) const {
207 return (this->GetItem() == item.GetItem());
208 }
209
211 bool operator!=(wxTreeMultiItem const& item) const {
212 return (this->GetItem() != item.GetItem());
213 }
214
218 wxCHECK(IsOk(), wxTreeMultiItem(0));
219 return wxTreeMultiItem(_item->GetParent());
220 };
221
241 bool IsOk() const {
242 return _item != 0;
243 };
244
249 bool IsWindowItem() const {
250 if (_item && _item->IsTreeMultiItemWindow()) return true;
251 return false;
252 };
253
260 bool IsNodeItem() const {
261 if (_item && (_item->IsTreeMultiItemNode() || _item->IsTreeMultiItemRoot())) return true;
262 return false;
263 };
264
270 bool IsRootItem() const {
271 if (_item && _item->IsTreeMultiItemRoot()) return true;
272 return false;
273 };
274
280 bool IsExpanded() const {
281 wxCHECK(_item, false);
283 wxCHECK(n, false);
284
285 return n->IsExpanded();
286 };
287
291 bool IsExcluded() {
292 wxCHECK(_item, false);
293 return _item->IsExcluded();
294 }
295
299 bool IsSelected(void) const {
300 wxCHECK(this->GetItem(), false);
301 return this->GetItem()->IsSelected();
302 }
303
307 bool IsVisible() {
308 wxCHECK(_item, false);
309 return _item->IsVisible();
310 }
311
316 wxString GetName() const {
317 wxCHECK(_item, wxEmptyString);
318 return _item->GetName();
319 }
320};
321
322WX_DECLARE_OBJARRAY(wxTreeMultiItem, wxArrayTreeMultiItem);
323
355//-------------------------------------------------------------------------------------------------------------------
356
358 private:
362 int _flags;
365 int _frontSpacing, _frontSpacingOrg;
366
368 int _topSpacing;
369
370#if (CHECKBOXVIEW)
372 bool _checkState;
373#endif
374
375 public:
376#if (CHECKBOXVIEW)
377 wxTreeMultiWindowInfo(int flags, int frontSpacing, int topSpacing, bool checkState = false)
378 : _flags(flags),
379 _frontSpacing(frontSpacing),
380 _frontSpacingOrg(frontSpacing),
381 _topSpacing(topSpacing),
382 _checkState(checkState)
383#else
384
385 wxTreeMultiWindowInfo(int flags, int frontSpacing, int topSpacing)
386 : _flags(flags),
387 _frontSpacing(frontSpacing),
388 _frontSpacingOrg(frontSpacing),
389 _topSpacing(topSpacing)
390#endif
391 {
392 // constructor
393 }
394
404 int Indent(int num = 1) {
405 if (num > 0) _frontSpacing += (_frontSpacingOrg * num);
406 return _frontSpacing;
407 };
408
415 int Outdent(int num = 1) {
416 _frontSpacing -= (_frontSpacingOrg * num);
417 if (_frontSpacing < 0) _frontSpacing = 0;
418 return _frontSpacing;
419 };
420
422 void SetFrontSpacing(int frontSpacing) {
423 _frontSpacing = frontSpacing;
424 _frontSpacingOrg = frontSpacing;
425 };
426
429 int GetFrontSpacing() const {
430 return _frontSpacing;
431 };
432
436 void SetTopSpacing(int topSpacing) {
437 _topSpacing = topSpacing;
438 if (_topSpacing < 0) _topSpacing = 0;
439 };
440
441 /* Gets top spacing currently set. */
442 int GetTopSpacing() const {
443 return _topSpacing;
444 };
445
449 int SetFlags(int flags) {
450 int tmp = _flags;
451 _flags = flags;
452 return tmp;
453 };
454
458 int GetFlags() const {
459 return _flags;
460 };
461
466 int AddFlag(int flag_mask) {
467 int tmp = _flags;
468 _flags |= flag_mask;
469 return tmp;
470 };
471
476 int RemoveFlag(int flag_mask) {
477 int tmp = _flags;
478 _flags &= ~(flag_mask);
479 return tmp;
480 };
481
482#if (CHECKBOXVIEW)
486 void SetDefaultCheckState(bool checkState = true) {
487 _checkState = checkState;
488 };
489
492 bool GetDefaultCheckState() const {
493 return _checkState;
494 };
495#endif
496};
497
498// Default info string
499#ifndef LINUX
500#define wxTreeMultiWindowInfoDefault wxTreeMultiWindowInfo(wxTMC_BG_ADJUST_CNT, 8, 0)
501#else
502#define wxTreeMultiWindowInfoDefault wxTreeMultiWindowInfo(wxTMC_BG_ADJUST_ALL, 8, 0)
503#endif
504
541class wxTreeMultiCtrl : public wxScrolledWindow {
542 DECLARE_DYNAMIC_CLASS(wxTreeMultiCtrl)
543
544
546 private:
547 TreeMultiItemRoot _root;
548
549 wxWindow* m_parent;
550
551 long _style;
552 wxBitmap *_expandBmp, *_collBmp;
553
555 int _iconDeltaY, _checkDeltaY;
556
557 /* Caption height. This is the height of the font of this window */
558 int _captionHeight;
559
562 int _gutterWidth;
563
565 int _iconWidth;
566
568 int _iconHeight;
569
571 int _maxHeight;
572
574 int _spacingY;
575
577 bool _create_called;
578
579#if (CHECKBOXVIEW)
580 wxBitmap *_checkBmp, *_uncheckBmp, *_tristateBmp;
581
583 bool _checkboxView;
584
586 int _checkHeight, _checkWidth;
587#endif
588
590 wxBrush* m_HilightBrush;
591
594 wxFont _captionFont;
595
597 wxArrayTreeMultiItem m_SelectedItems;
598
600 void DoFold(TreeMultiItemBase* item, bool expand, bool recursive);
601
604 void RedrawFromNode(TreeMultiItemNode* n);
605
607 void RedrawFromParentNode(TreeMultiItemBase* b);
608
610 void DrawCheckbox(TreeMultiItemBase* b, wxDC& dc, bool convertScrolled = false);
611
620 void RecalculateNodePositions();
621
624 int CalculateNodeDimensions(TreeMultiItemBase* b, int currentY, int level);
625
626 void DrawNode(TreeMultiItemBase* b, wxDC& dc);
627
630 void SetWindowBackgroundColour(wxWindow* wnd, const wxColour& col, int flags);
631
633 void ShowTreeMultiWindow(TreeMultiItemWindow* window, bool show = true);
634
637 void UpdateAllWindowVisibility();
638
640 void UpdateTreeMultiWindowVisibility(TreeMultiItemBase* b, bool show);
641
644 void RecalculateVirtualSize();
645
647 using wxScrolledWindow::AdjustScrollbars;
648
649 virtual void AdjustScrollbars(int x, int y);
650
652 void RecalculateVirtualSizeFromNode(const TreeMultiItemNode* node, int& x, int& y);
653
656 TreeMultiItemBase* FindNodeByPoint(TreeMultiItemBase* b, wxPoint const& pt, int& area);
657
661 wxTreeMultiItem FindWindowNode(wxWindow* wnd, TreeMultiItemNode* n = 0);
662
665 TreeMultiItemWindow* FindNextVisibleWindowItem(TreeMultiItemBase* b, int index = -1);
666
669 void AdjustIconsDeltaY();
670
672 void CalculateNodeSpanning(TreeMultiItemBase* b);
673
674#if (CHECKBOXVIEW)
676 void SetRecursiveCheckState(TreeMultiItemNode* n, bool check);
677
682 void ScanTristateCheckstates(TreeMultiItemBase* b);
683#endif
684
696 wxTreeMultiItem InsertNode(TreeMultiItemNode* ParentPtr, size_t Position, wxString const& Caption,
697 wxString const& Name);
698
706 wxTreeMultiItem InsertWindow(TreeMultiItemNode* ParentPtr, size_t Position, wxWindow* WindowPtr,
707 wxString const& Name, wxTreeMultiWindowInfo const& Info, int Flags);
708
711 private:
712 void Init();
713
714 // handlers
715 //---------
716
717 // virtual void OnDraw(wxDC& dc);
718 void OnPaint(wxPaintEvent& event);
719
720 void OnMouseClick(wxMouseEvent& event);
721
722 void OnRightMouseClick(wxMouseEvent& Event);
723
724 void OnKey(wxKeyEvent& event);
725
726 void OnSize(wxSizeEvent& event);
727
729 void RecalculateSpanSizes();
730
731 public:
736 : _create_called(false) {
737 Init();
738 }
739
744 wxTreeMultiCtrl(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
745 const wxSize& size = wxDefaultSize, long style = wxTMC_DEFAULT_STYLE,
746 const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTreeMultiCtrlNameStr)
747 : _style(style | wxTAB_TRAVERSAL),
748 _create_called(false) {
749 Create(parent, id, pos, size, style, validator, name);
750 }
751
753 virtual ~wxTreeMultiCtrl();
754
760 bool Create(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
761 const wxSize& size = wxDefaultSize, long style = wxTMC_DEFAULT_STYLE,
762 const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTreeMultiCtrlNameStr);
763
764 // accessors
765 //----------
766
775 wxTreeMultiItem AddRoot(const wxString& caption, const wxString& name = wxEmptyString);
776
782 wxTreeMultiItem AppendWindow(const wxTreeMultiItem& ParentItem, wxWindow* window = nullptr,
783 const wxString& name = wxEmptyString,
784 wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);
785
791 wxTreeMultiItem InsertWindow(wxTreeMultiItem const& ParentItem, size_t Position, wxWindow* window = nullptr,
792 wxString const& Name = wxEmptyString,
793 wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);
794
799 wxTreeMultiItem PrependWindow(wxTreeMultiItem const& ParentItem, wxWindow* window = nullptr,
800 const wxString& name = wxEmptyString,
801 wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);
802
806 wxTreeMultiItem AppendNode(wxTreeMultiItem const& ParentItem, const wxString& caption = wxEmptyString,
807 const wxString& name = wxEmptyString);
808
815 wxTreeMultiItem InsertNode(wxTreeMultiItem const& ParentItem, size_t Position, wxString const& caption,
816 wxString const& name);
817
822 wxTreeMultiItem PrependNode(wxTreeMultiItem const& ParentItem, wxString const& caption = wxEmptyString,
823 wxString const& name = wxEmptyString);
824
827 bool Delete(wxTreeMultiItem& item);
828
830 void DeleteAllItems(void) {
831 this->_root.Clear();
832 this->m_SelectedItems.Clear();
833 Refresh();
834 };
835
838 void DeleteChildren(const wxTreeMultiItem& item);
839
849 void ExpandNodes(bool recursive = false);
850
852 void CollapseNodes(bool recursive = false);
853
855 void Expand(const wxTreeMultiItem& item, bool recursive);
856
859 void Collapse(const wxTreeMultiItem& item, bool recursive);
860
863 void CollapseAndReset(const wxTreeMultiItem& item);
864
867 void Fold(const wxTreeMultiItem& item, bool expand = true) {
868 if (expand)
869 Expand(item, false);
870 else
871 Collapse(item, false);
872 };
873
884 size_t GetSelectedItemCount(void) const {
885 return this->m_SelectedItems.GetCount();
886 }
887
892
897
901 wxTreeMultiItem GetSelectedItem(size_t Index) const;
902
906 size_t GetSelectedItemIndex(wxTreeMultiItem const& Item) const;
907
917 void SelectItem(wxTreeMultiItem const& Item, bool UnselectOthers = true, bool ExpandSelection = false);
918
920 void UnselectAll(void);
921
923 void Unselect(wxTreeMultiItem const& Item);
924
938 void Exclude(const wxTreeMultiItem& item);
939
943 void Include(const wxTreeMultiItem& item);
944
948
959 wxTreeMultiItem HitTest(wxPoint const& pt, int& flags);
960
970 wxTreeMultiItem FindItem(const wxTreeMultiItem& item, const wxString& name, bool ignoreCase = false,
971 bool skipFirst = false);
972
974 wxTreeMultiItem FindItem(const wxString& name, bool ignoreCase = false) {
975 return FindItem(wxTreeMultiItem(&_root), name, ignoreCase, false);
976 };
977
983 if (item.IsNodeItem()) {
984 TreeMultiItemNode* n = (TreeMultiItemNode*)item.GetItem();
985 return n->GetNodeCount();
986 }
987
988 return -1;
989 };
990
996
1014 bool GetBooleanValue(int wndId);
1015
1024 wxString GetTextValue(int wndId);
1025
1033 void SetBooleanValue(int wndId, bool value = true);
1034
1041 void SetTextValue(int wndId, const wxString& value = wxEmptyString);
1042
1045 wxWindow* GetWindow(const wxTreeMultiItem& item) {
1046 if (item.IsWindowItem()) return ((TreeMultiItemWindow*)item.GetItem())->GetWindow();
1047 return 0;
1048 };
1049
1055 void SetSelectionValue(int wndId, int sel);
1056
1062 int GetSelectionValue(int wndId);
1063
1070 void GetSelectionValues(int wndId, wxArrayInt& sels);
1071
1072#if (CHECKBOXVIEW)
1077 int GetCheckboxState(const wxTreeMultiItem& item, bool WXUNUSED(recursive)) {
1078 wxCHECK(item.IsOk(), -1);
1079
1080 // return the checkbox state
1081 TreeMultiItemBase* b = item.GetItem();
1082 if (b->GetCheckbox()) return b->GetCheckboxState();
1083
1084 return -1;
1085 };
1086
1090 void SetCheckboxState(const wxTreeMultiItem& item, int state) {
1091 wxCHECK2(item.IsOk(), return);
1092 TreeMultiItemBase* b = item.GetItem();
1093 if (b->GetCheckbox()) b->SetCheckboxState(state);
1094 RedrawFromNode(item.GetItem()->GetParent());
1095 };
1096#endif
1097
1109 void SetSpacingY(int spacingY) {
1110 if (spacingY >= 0) {
1111 _spacingY = spacingY;
1112 RedrawFromNode(0);
1113 }
1114 };
1115
1118 int GetSpacingY() const {
1119 return _spacingY;
1120 };
1121
1122#if (CHECKBOXVIEW)
1127 void SetCheckboxView(bool value) {
1128 _checkboxView = value;
1129 };
1130
1135 bool GetCheckboxView() const {
1136 return _checkboxView;
1137 };
1138#endif
1139
1151 return wxTreeMultiItem(this->_root.First());
1152 }
1153
1156 return wxTreeMultiItem(this->_root.Last());
1157 }
1158
1160 wxTreeMultiItem GetParent(wxTreeMultiItem const& item) const;
1161
1165 wxTreeMultiItem GetFirstChild(const wxTreeMultiItem& item, int& cookie) const;
1166
1169 wxTreeMultiItem GetNextChild(const wxTreeMultiItem& item, int& cookie) const;
1170
1173 wxTreeMultiItem GetLastChild(const wxTreeMultiItem& item) const;
1174
1177
1180
1186 wxTreeMultiItem GetNext(wxTreeMultiItem const& item) const;
1187
1193 wxTreeMultiItem GetPrevious(wxTreeMultiItem const& item) const;
1194
1206 const wxFont& GetCaptionFont() const {
1207 return _captionFont;
1208 };
1209
1213 void SetCaptionFont(const wxFont& font);
1214
1216 void SetCaption(wxTreeMultiItem const& item, const wxString& caption);
1217
1221 void OnDraw(wxDC& dc);
1222
1223 private:
1224 DECLARE_EVENT_TABLE()
1225};
1226
1227#endif
Definition TreeMultiItemBase.h:30
virtual TreeMultiItemRoot * IsTreeMultiItemRoot() const
Definition TreeMultiItemBase.h:88
bool IsVisible()
Definition TreeMultiItemBase.cpp:51
bool IsSelected(void) const
Definition TreeMultiItemBase.h:169
virtual TreeMultiItemNode * IsTreeMultiItemNode() const
Definition TreeMultiItemBase.h:102
virtual TreeMultiItemWindow * IsTreeMultiItemWindow() const
Definition TreeMultiItemBase.h:95
wxString GetName() const
Definition TreeMultiItemBase.h:76
Definition TreeMultiItemNode.h:41
bool IsExpanded() const
Definition TreeMultiItemNode.h:109
Definition TreeMultiItemRoot.h:29
Definition TreeMultiItemWindow.h:27
This is the visual control, which will contain all the logic for the tree mechanism.
Definition wxTreeMultiCtrl.h:541
void DeleteAllItems(void)
Definition wxTreeMultiCtrl.h:830
wxTreeMultiItem GetNextChild(const wxTreeMultiItem &item, int &cookie) const
Definition wxTreeMultiCtrl.cpp:1627
void Fold(const wxTreeMultiItem &item, bool expand=true)
Definition wxTreeMultiCtrl.h:867
void SelectItem(wxTreeMultiItem const &Item, bool UnselectOthers=true, bool ExpandSelection=false)
Definition wxTreeMultiCtrl.cpp:436
wxTreeMultiItem GetNext(wxTreeMultiItem const &item) const
Definition wxTreeMultiCtrl.cpp:1694
void SetCaption(wxTreeMultiItem const &item, const wxString &caption)
Definition wxTreeMultiCtrl.cpp:146
wxTreeMultiItem FindItem(const wxString &name, bool ignoreCase=false)
Definition wxTreeMultiCtrl.h:974
bool Delete(wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.cpp:304
void Exclude(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.cpp:560
wxTreeMultiItem GetFocus()
Definition wxTreeMultiCtrl.cpp:928
void Expand(const wxTreeMultiItem &item, bool recursive)
Definition wxTreeMultiCtrl.cpp:362
wxWindow * GetWindow(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.h:1045
wxTreeMultiCtrl(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTMC_DEFAULT_STYLE, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxTreeMultiCtrlNameStr)
Definition wxTreeMultiCtrl.h:744
int GetChildrenCount(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.h:982
bool GetBooleanValue(int wndId)
Definition wxTreeMultiCtrl.cpp:1417
size_t GetSelectedItemIndex(wxTreeMultiItem const &Item) const
Definition wxTreeMultiCtrl.cpp:424
void Include(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.cpp:572
bool Create(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTMC_DEFAULT_STYLE, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxTreeMultiCtrlNameStr)
Definition wxTreeMultiCtrl.cpp:52
size_t GetSelectedItemCount(void) const
Definition wxTreeMultiCtrl.h:884
const wxFont & GetCaptionFont() const
Definition wxTreeMultiCtrl.h:1206
wxTreeMultiItem HitTest(wxPoint const &pt, int &flags)
Definition wxTreeMultiCtrl.cpp:853
wxTreeMultiCtrl()
Definition wxTreeMultiCtrl.h:735
wxTreeMultiItem FindItem(const wxTreeMultiItem &item, const wxString &name, bool ignoreCase=false, bool skipFirst=false)
Definition wxTreeMultiCtrl.cpp:1327
wxTreeMultiItem GetNextSibling(wxTreeMultiItem const &item) const
Definition wxTreeMultiCtrl.cpp:1653
wxTreeMultiItem GetFirstRoot(void) const
Definition wxTreeMultiCtrl.h:1150
virtual ~wxTreeMultiCtrl()
Definition wxTreeMultiCtrl.cpp:173
wxTreeMultiItem GetLastRoot(void) const
Definition wxTreeMultiCtrl.h:1155
wxTreeMultiItem AddRoot(const wxString &caption, const wxString &name=wxEmptyString)
Definition wxTreeMultiCtrl.cpp:185
wxTreeMultiItem GetParent(wxTreeMultiItem const &item) const
Definition wxTreeMultiCtrl.cpp:1602
wxTreeMultiItem GetSelectedItem(size_t Index) const
Definition wxTreeMultiCtrl.cpp:417
wxString GetTextValue(int wndId)
Definition wxTreeMultiCtrl.cpp:1488
void SetSelectionValue(int wndId, int sel)
Definition wxTreeMultiCtrl.cpp:1567
wxTreeMultiItem GetLastSelectedItem(void) const
Definition wxTreeMultiCtrl.cpp:410
void SetCaptionFont(const wxFont &font)
Definition wxTreeMultiCtrl.cpp:137
void DeleteChildren(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.cpp:334
int GetSelectionValue(int wndId)
Definition wxTreeMultiCtrl.cpp:1518
wxTreeMultiItem PrependNode(wxTreeMultiItem const &ParentItem, wxString const &caption=wxEmptyString, wxString const &name=wxEmptyString)
Definition wxTreeMultiCtrl.cpp:286
void SetSpacingY(int spacingY)
Definition wxTreeMultiCtrl.h:1109
wxTreeMultiItem GetFirstSelectedItem(void) const
Definition wxTreeMultiCtrl.cpp:403
void Unselect(wxTreeMultiItem const &Item)
Definition wxTreeMultiCtrl.cpp:521
void SetTextValue(int wndId, const wxString &value=wxEmptyString)
Definition wxTreeMultiCtrl.cpp:1467
void Collapse(const wxTreeMultiItem &item, bool recursive)
Definition wxTreeMultiCtrl.cpp:371
wxTreeMultiItem GetLastChild(const wxTreeMultiItem &item) const
Definition wxTreeMultiCtrl.cpp:1643
wxTreeMultiItem PrependWindow(wxTreeMultiItem const &ParentItem, wxWindow *window=nullptr, const wxString &name=wxEmptyString, wxTreeMultiWindowInfo const &info=wxTreeMultiWindowInfoDefault, int flags=0)
Definition wxTreeMultiCtrl.cpp:230
wxTreeMultiItem GetPrevSibling(wxTreeMultiItem const &item) const
Definition wxTreeMultiCtrl.cpp:1674
wxTreeMultiItem GetFirstChild(const wxTreeMultiItem &item, int &cookie) const
Definition wxTreeMultiCtrl.cpp:1612
void CollapseNodes(bool recursive=false)
Definition wxTreeMultiCtrl.cpp:386
wxTreeMultiItem GetPrevious(wxTreeMultiItem const &item) const
Definition wxTreeMultiCtrl.cpp:1716
void ExpandNodes(bool recursive=false)
Definition wxTreeMultiCtrl.cpp:380
wxTreeMultiItem GetExcludedParent(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.cpp:584
wxTreeMultiItem AppendNode(wxTreeMultiItem const &ParentItem, const wxString &caption=wxEmptyString, const wxString &name=wxEmptyString)
Definition wxTreeMultiCtrl.cpp:249
void UnselectAll(void)
Definition wxTreeMultiCtrl.cpp:509
int GetSpacingY() const
Definition wxTreeMultiCtrl.h:1118
wxTreeMultiItem AppendWindow(const wxTreeMultiItem &ParentItem, wxWindow *window=nullptr, const wxString &name=wxEmptyString, wxTreeMultiWindowInfo const &info=wxTreeMultiWindowInfoDefault, int flags=0)
Definition wxTreeMultiCtrl.cpp:192
void CollapseAndReset(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.cpp:392
void GetSelectionValues(int wndId, wxArrayInt &sels)
Definition wxTreeMultiCtrl.cpp:1544
void SetBooleanValue(int wndId, bool value=true)
Definition wxTreeMultiCtrl.cpp:1439
An intermediate class which is used to return as 'item' value for the wxTreeMultiCtrl....
Definition wxTreeMultiCtrl.h:173
bool IsVisible()
Definition wxTreeMultiCtrl.h:307
bool IsRootItem() const
Definition wxTreeMultiCtrl.h:270
bool IsNodeItem() const
Definition wxTreeMultiCtrl.h:260
bool IsExpanded() const
Definition wxTreeMultiCtrl.h:280
bool IsSelected(void) const
Definition wxTreeMultiCtrl.h:299
bool IsOk() const
Definition wxTreeMultiCtrl.h:241
bool operator!=(wxTreeMultiItem const &item) const
Definition wxTreeMultiCtrl.h:211
wxTreeMultiItem GetParent() const
Definition wxTreeMultiCtrl.h:217
wxTreeMultiItem()
Definition wxTreeMultiCtrl.h:180
bool operator==(wxTreeMultiItem const &item) const
Definition wxTreeMultiCtrl.h:206
wxString GetName() const
Definition wxTreeMultiCtrl.h:316
bool IsWindowItem() const
Definition wxTreeMultiCtrl.h:249
bool IsExcluded()
Definition wxTreeMultiCtrl.h:291
void operator=(const wxTreeMultiItem &item)
Definition wxTreeMultiCtrl.h:201
This class contains information for every Window node to be added.
Definition wxTreeMultiCtrl.h:357
void SetTopSpacing(int topSpacing)
Definition wxTreeMultiCtrl.h:436
int Outdent(int num=1)
Definition wxTreeMultiCtrl.h:415
int SetFlags(int flags)
Definition wxTreeMultiCtrl.h:449
int RemoveFlag(int flag_mask)
Definition wxTreeMultiCtrl.h:476
int AddFlag(int flag_mask)
Definition wxTreeMultiCtrl.h:466
void SetFrontSpacing(int frontSpacing)
Definition wxTreeMultiCtrl.h:422
int GetFlags() const
Definition wxTreeMultiCtrl.h:458
int GetFrontSpacing() const
Definition wxTreeMultiCtrl.h:429
int Indent(int num=1)
Definition wxTreeMultiCtrl.h:404
@ wxTMC_HITTEST_CAPTION
wxCoord was found on a caption of a Node or Root item
Definition wxTreeMultiCtrl.h:122
@ wxTMC_HITTEST_WINDOW
wxCoord was found inside a window, or behind it, on a Window node
Definition wxTreeMultiCtrl.h:120
@ wxTMC_HITTEST_CHECKBOX
wxCoord was found on a checkbox (only when item really has a checkbox)
Definition wxTreeMultiCtrl.h:124
@ wxTMC_HITTEST_GUTTER
wxCoord was found in the gutter of the node (in front of the [+])
Definition wxTreeMultiCtrl.h:118