Code::Blocks  SVN r11506
cbtreectrl.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef CBTREECTRL_H
7 #define CBTREECTRL_H
8 
9 #include <wx/treectrl.h>
10 
11 class ProjectFile;
12 class wxKeyEvent;
13 class wxMouseEvent;
14 class wxTreeItemId;
15 class wxWindow;
16 
17 /*
18  This is a "proxy" wxTreeCtrl descendant handles several usage limitations.
19 */
21 {
22  public:
23  cbTreeCtrl();
24  cbTreeCtrl(wxWindow* parent, int id);
25  void SetCompareFunction(const int ptvs);
26 /*
27  GetPrevVisible appears to be faulty, so override.
28 */
29  wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const override;
30  protected:
31 #ifndef __WXMSW__
32 /*
33  Under wxGTK, wxTreeCtrl is not sending an EVT_COMMAND_RIGHT_CLICK
34  event when right-clicking on the client area.
35 */
36  void OnRightClick(wxMouseEvent& event);
37 #endif // !__WXMSW__
38 /*
39  Under all platforms there is no reaction when pressing "ENTER".
40  Expected would be e.g. to open the file in an editor.
41 */
42  void OnKeyDown(wxKeyEvent& event);
43 
44  static int filesSort(const ProjectFile* arg1, const ProjectFile* arg2);
45  static int filesSortNameOnly(const ProjectFile* arg1, const ProjectFile* arg2);
46  int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) override;
47  int (*Compare)(const ProjectFile* arg1, const ProjectFile* arg2);
48 
49  DECLARE_DYNAMIC_CLASS(cbTreeCtrl)
50  DECLARE_EVENT_TABLE()
51 };
52 
53 #endif // CBTREECTRL_H
virtual int OnCompareItems(const wxTreeItemId &item1, const wxTreeItemId &item2)
Represents a file in a Code::Blocks project.
Definition: projectfile.h:39
#define DLLIMPORT
Definition: settings.h:16
#define arg2
Definition: sqvm.cpp:459
#define arg1
Definition: sqvm.cpp:457
virtual wxTreeItemId GetPrevVisible(const wxTreeItemId &item) const