-
Notifications
You must be signed in to change notification settings - Fork 224
/
find_item_window.h
113 lines (97 loc) · 2.96 KB
/
find_item_window.h
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
108
109
110
111
112
113
//////////////////////////////////////////////////////////////////////
// This file is part of Remere's Map Editor
//////////////////////////////////////////////////////////////////////
// Remere's Map Editor is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Remere's Map Editor is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////
#ifndef RME_FIND_ITEM_WINDOW_H_
#define RME_FIND_ITEM_WINDOW_H_
#include <wx/radiobox.h>
#include <wx/spinctrl.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
class FindDialogListBox;
class FindItemDialog : public wxDialog
{
public:
enum SearchMode {
ServerIDs = 0,
ClientIDs,
Names,
Types,
Properties,
};
enum SearchItemType {
Depot,
Mailbox,
TrashHolder,
Container,
Door,
MagicField,
Teleport,
Bed,
Key
};
FindItemDialog(wxWindow* parent, const wxString& title, bool onlyPickupables = false);
~FindItemDialog();
Brush* getResult() const { return result_brush; }
uint16_t getResultID() const { return result_id; }
SearchMode getSearchMode() const;
void setSearchMode(SearchMode mode);
private:
void EnableProperties(bool enable);
void RefreshContentsInternal();
void OnOptionChange(wxCommandEvent& event);
void OnServerIdChange(wxCommandEvent& event);
void OnClientIdChange(wxCommandEvent& event);
void OnText(wxCommandEvent& event);
void OnTypeChange(wxCommandEvent& event);
void OnPropertyChange(wxCommandEvent& event);
void OnInputTimer(wxTimerEvent& event);
void OnClickOK(wxCommandEvent& event);
void OnClickCancel(wxCommandEvent& event);
wxRadioBox* options_radio_box;
wxRadioBox* types_radio_box;
wxSpinCtrl* server_id_spin;
wxSpinCtrl* client_id_spin;
wxTextCtrl* name_text_input;
wxTimer input_timer;
wxCheckBox* unpassable;
wxCheckBox* unmovable;
wxCheckBox* block_missiles;
wxCheckBox* block_pathfinder;
wxCheckBox* readable;
wxCheckBox* writeable;
wxCheckBox* pickupable;
wxCheckBox* stackable;
wxCheckBox* rotatable;
wxCheckBox* hangable;
wxCheckBox* hook_east;
wxCheckBox* hook_south;
wxCheckBox* has_elevation;
wxCheckBox* ignore_look;
wxCheckBox* floor_change;
FindDialogListBox* items_list;
wxStdDialogButtonSizer* buttons_box_sizer;
wxButton* ok_button;
wxButton* cancel_button;
Brush* result_brush;
uint16_t result_id;
bool only_pickupables;
DECLARE_EVENT_TABLE()
};
#endif // RME_FIND_ITEM_WINDOW_H_