root/cafu/trunk/CaWE/DialogInsp-EntityTree.hpp

Revision 457, 4.0 KB (checked in by Carsten, 4 months ago)

Using UltraEdit's multi-line search-and-replace-in-files feature, replaced


^#ifndef _(CAFU|CF|CFS|CA)_(.*)_$
^#define _\1_\2_$

with

#ifndef CAFU_\2_INCLUDED
#define CAFU_\2_INCLUDED

and


^#ifndef _(.*)_HPP_$
^#define _\1_HPP_$

with

#ifndef CAFU_\1_HPP_INCLUDED
#define CAFU_\1_HPP_INCLUDED

Closes #91.

Line 
1/*
2=================================================================================
3This file is part of Cafu, the open-source game engine and graphics engine
4for multiplayer, cross-platform, real-time 3D action.
5Copyright (C) 2002-2012 Carsten Fuchs Software.
6
7Cafu is free software: you can redistribute it and/or modify it under the terms
8of the GNU General Public License as published by the Free Software Foundation,
9either version 3 of the License, or (at your option) any later version.
10
11Cafu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Cafu. If not, see <http://www.gnu.org/licenses/>.
17
18For support and more information about Cafu, visit us at <http://www.cafu.de>.
19=================================================================================
20*/
21
22#ifndef CAFU_DIALOG_INSP_ENTITY_TREE_HPP_INCLUDED
23#define CAFU_DIALOG_INSP_ENTITY_TREE_HPP_INCLUDED
24
25#include "ObserverPattern.hpp"
26#include "wx/panel.h"
27
28
29class wxCheckBox;
30class wxComboBox;
31class wxNotebook;
32class wxListBox;
33class wxTextCtrl;
34class MapDocumentT;
35
36
37class InspDlgEntityTreeT : public wxPanel, public ObserverT
38{
39    public:
40
41    InspDlgEntityTreeT(wxNotebook* Parent_, MapDocumentT* MapDoc_);
42    ~InspDlgEntityTreeT();
43
44    // Implementation of the ObserverT interface.
45    void NotifySubjectChanged_Selection(SubjectT* Subject, const ArrayT<MapElementT*>& OldSelection, const ArrayT<MapElementT*>& NewSelection);
46    void NotifySubjectChanged_Created(const ArrayT<MapElementT*>& MapElements);
47    void NotifySubjectChanged_Deleted(SubjectT* Subject, const ArrayT<MapElementT*>& MapElements);
48    void NotifySubjectChanged_Modified(SubjectT* Subject, const ArrayT<MapElementT*>& MapElements, MapElemModDetailE Detail, const wxString& Key);
49    void NotifySubjectChanged_Modified(SubjectT* Subject, const ArrayT<MapElementT*>& MapElements, MapElemModDetailE Detail);
50    void NotifySubjectDies(SubjectT* dyingSubject);
51
52
53    private:
54
55    MapDocumentT* MapDoc;
56    bool          IsRecursiveSelfNotify;    ///< Did we trigger the current call to NotifySubjectChanged() ourselves?
57
58    wxListBox*    EntityListBox;
59    wxCheckBox*   ShowSolidEntitiesCheckBox;
60    wxCheckBox*   ShowPointEntitiesCheckBox;
61    wxCheckBox*   ShowHiddenEntitiesCheckBox;
62    wxCheckBox*   FilterByPropCheckBox;
63    wxCheckBox*   FilterByPropExactCheckBox;
64    wxCheckBox*   FilterByClassCheckBox;
65    wxTextCtrl*   FilterKeyText;
66    wxTextCtrl*   FilterValueText;
67    wxComboBox*   FilterClassComboBox;
68
69    // Helper functions.
70    wxSizer* EntityReportInit(wxWindow* parent, bool call_fit, bool set_sizer);
71    void     UpdateEntityListBox();
72
73    // Event handlers.
74    void OnCheckbox_ShowSolidEntities(wxCommandEvent& Event);
75    void OnCheckbox_ShowPointEntities(wxCommandEvent& Event);
76    void OnCheckbox_ShowHiddenEntities(wxCommandEvent& Event);
77    void OnCheckbox_FilterByProp(wxCommandEvent& Event);
78    void OnCheckbox_FilterByPropExact(wxCommandEvent& Event);
79    void OnCheckbox_FilterByClass(wxCommandEvent& Event);
80    void OnText_FilterKeyChanged(wxCommandEvent& Event);
81    void OnText_FilterValueChanged(wxCommandEvent& Event);
82    void OnComboBox_FilterClass_SelectionChanged(wxCommandEvent& Event);
83    void OnComboBox_FilterClass_TextChanged(wxCommandEvent& Event);
84    void OnListBox_SelectionChanged(wxCommandEvent& Event);
85
86    // IDs for the controls in whose events we are interested.
87    enum
88    {
89        ID_CHECKBOX_ShowSolidEntities=wxID_HIGHEST+1,
90        ID_CHECKBOX_ShowPointEntities,
91        ID_CHECKBOX_ShowHiddenEntities,
92        ID_CHECKBOX_FilterByProp,
93        ID_CHECKBOX_FilterByPropExact,
94        ID_CHECKBOX_FilterByClass,
95        ID_TEXT_FilterKey,
96        ID_TEXT_FilterValue,
97        ID_COMBOBOX_FilterClass,
98        ID_LISTBOX_Entities
99    };
100
101    DECLARE_EVENT_TABLE()
102};
103
104#endif
Note: See TracBrowser for help on using the browser.