itemselection.h
来自「wowmodelview魔兽世界的模型查看工具。下了看看吧」· C头文件 代码 · 共 103 行
H
103 行
#ifndef ITEMSELECTION_H#define ITEMSELECTION_H#include "wx/wxprec.h"#ifdef __BORLANDC__ #pragma hdrstop#endif#ifndef WX_PRECOMP #include "wx/wx.h"#endif// wx#include "wx/regex.h"#include "wx/choicdlg.h"// stl#include <vector>class CharControl;class ChoiceDialog : public wxSingleChoiceDialog { CharControl *cc; int type; DECLARE_EVENT_TABLE()public: ChoiceDialog(CharControl *dest, int type, wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices);
virtual void OnClick(wxCommandEvent &event); virtual int GetSelection() const { return m_selection; } void EndModal(int retCode) { SetReturnCode(retCode); Hide(); }};class FilteredChoiceDialog: public ChoiceDialog {protected: wxTextCtrl* m_pattern; const wxArrayString* m_choices; std::vector<int> m_indices; // filtered index -> orig inndex DECLARE_EVENT_TABLE() wxRegEx filter;public: enum{ ID_FILTER_TEXT = 1000, ID_FILTER_BUTTON, ID_FILTER_CLEAR }; bool keepFirst; FilteredChoiceDialog(CharControl *dest, int type, wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices); virtual void OnFilter(wxCommandEvent& event); virtual int GetSelection() const { return m_indices[m_selection]; } virtual void InitFilter(); virtual void DoFilter(); virtual bool FilterFunc(int index);};class CategoryChoiceDialog: public FilteredChoiceDialog {protected: const std::vector<int> &m_cats; wxCheckListBox *m_catlist; int numcats; DECLARE_EVENT_TABLE()public: enum { ID_CAT_LIST = 1100 }; CategoryChoiceDialog(CharControl *dest, int type, wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, const std::vector<int> &cats, const wxArrayString& catnames, bool helpmsg = true); void Check(int index, bool state = true); void OnCheck(wxCommandEvent &e); void OnCheckDoubleClick(wxCommandEvent &e); bool FilterFunc(int index);};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?