File: classlist.h

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (107 lines) | stat: -rw-r--r-- 3,670 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
////////////////////////////////////////////////////
// Name:        classlist.h
// Purpose:     ClassListDialog definition
// Author:      Francesco Montorsi
// Modified by: 
// Created:     03/06/2007 14:49:55
// Copyright:   (c) 2007 Francesco Montorsi
// Licence:     wxWindows licence
////////////////////////////////////////////////////

#ifndef _CLASSLIST_H_
#define _CLASSLIST_H_


// ----------------------------------------------------------------------------
// includes
// ----------------------------------------------------------------------------

#include "wx/choicebk.h"
#include "wx/treectrl.h"

// ----------------------------------------------------------------------------
// IDs
// ----------------------------------------------------------------------------

#define ID_LISTMODE 10006
#define ID_LISTBOX 10003
#define ID_PANEL 10007
#define ID_TREECTRL 10008
#define ID_TEXTCTRL 10004
#define ID_SHOW_ONLY_XTI 10005
#define ID_SHOW_PROPERTIES_RECURSIVELY 10002
#define SYMBOL_CLASSLISTDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_CLASSLISTDIALOG_TITLE _("wxWidgets class list")
#define SYMBOL_CLASSLISTDIALOG_IDNAME wxID_ANY
#define SYMBOL_CLASSLISTDIALOG_SIZE wxSize(400, 300)
#define SYMBOL_CLASSLISTDIALOG_POSITION wxDefaultPosition


// ----------------------------------------------------------------------------
// ClassListDialog
// ----------------------------------------------------------------------------

class ClassListDialog: public wxDialog
{    
    // we explicitly don't want to use the following macro:
    //     wxDECLARE_DYNAMIC_CLASS( ClassListDialog );
    // as otherwise the ClassListDialog class would appear in the list
    // shown by this dialog!
    wxDECLARE_EVENT_TABLE();

public:
    // Constructors
    ClassListDialog();
    ClassListDialog( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME, 
                       const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE, 
                       const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION, 
                       const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE, 
                       long style = SYMBOL_CLASSLISTDIALOG_STYLE );

    // Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME, 
                 const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE, 
                 const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION, 
                 const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE, 
                 long style = SYMBOL_CLASSLISTDIALOG_STYLE );

    // Destructor
    ~ClassListDialog();

public:     // misc

    void Init();
    void CreateControls();
    void InitControls();

    void UpdateClassInfo(const wxString &itemName);
    void UpdateFilterText();
    bool IsToDiscard(const wxString &classname) const;

    int AddClassesWithParent(const wxClassInfo *parent, const wxTreeItemId &id);

public:     // event handlers

    void OnListboxSelected( wxCommandEvent& event );
    void OnTreectrlSelChanged( wxTreeEvent& event );
    void OnChoiceBookPageChange( wxChoicebookEvent& event );
    void OnShowOnlyXTICheckbox( wxCommandEvent& event );
    void OnShowRecursiveInfoCheckbox( wxCommandEvent& event );

    // Should we show tooltips?
    static bool ShowToolTips();

protected:
    wxChoicebook* m_pChoiceBook;
    wxStaticText* m_pClassCountText;
    wxListBox* m_pRawListBox;
    wxTreeCtrl* m_pParentTreeCtrl;
    wxListBox* m_pSizeListBox;
    wxTextCtrl* m_pTextCtrl;

    int m_nTotalCount;   // number of classes in wxXTI system
    int m_nCount;       // number of shown classes
};

#endif
    // _CLASSLIST_H_