1 #include <wx/srchctrl.h>
3 #include <wx/checkbox.h>
4 #include <wx/listctrl.h>
30 SearchDialog( wxWindow* parent, wxWindowID
id = wxID_ANY,
const wxString& title = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxSize( 503,395 ),
long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
36 SearchDialog::SearchDialog( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) : wxDialog( parent, id, title, pos, size, style )
42 this->SetForegroundColour( wxColor(ColorRed[8],ColorGreen[8],ColorBlue[8]) );
43 this->SetBackgroundColour( wxColor(ColorRed[7],ColorGreen[7],ColorBlue[7]) );
45 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
48 SBSizer1 =
new wxBoxSizer( wxVERTICAL );
50 SearchCtrl =
new wxSearchCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
55 SBSizer1->Add(
SearchCtrl, 0, wxALL|wxEXPAND, 5 );
57 wxGridSizer* SGSizer1;
58 SGSizer1 =
new wxGridSizer( 0, 3, 0, 0 );
60 SearchBatches =
new wxCheckBox(
this, wxID_ANY,
l(
"Batches"), wxDefaultPosition, wxDefaultSize, 0 );
64 SearchEggs =
new wxCheckBox(
this, wxID_ANY,
l(
"Advanced Data"), wxDefaultPosition, wxDefaultSize, 0 );
68 SearchSchedules =
new wxCheckBox(
this, wxID_ANY,
l(
"Schedules"), wxDefaultPosition, wxDefaultSize, 0 );
72 SearchGroups =
new wxCheckBox(
this, wxID_ANY,
l(
"Groups"), wxDefaultPosition, wxDefaultSize, 0 );
76 SearchSettings =
new wxCheckBox(
this, wxID_ANY,
l(
"Settings"), wxDefaultPosition, wxDefaultSize, 0 );
80 SearchReminders =
new wxCheckBox(
this, wxID_ANY,
l(
"Reminders"), wxDefaultPosition, wxDefaultSize, 0 );
85 SBSizer1->Add( SGSizer1, 0, wxEXPAND, 5 );
87 SearchList =
new wxListCtrl(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
88 SBSizer1->Add(
SearchList, 1, wxALL|wxEXPAND, 5 );
90 SearchClose =
new wxButton(
this, wxID_ANY,
l(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
97 this->SetSizer( SBSizer1 );
100 this->Centre( wxBOTH );
131 SearchList->InsertColumn(0,
l(
"Location" ), wxLIST_FORMAT_LEFT, 225);
132 SearchList->InsertColumn(1,
l(
"String" ), wxLIST_FORMAT_LEFT, 225);
135 for(
int A = 0; A < Results.
GetCount(); A++) {
136 SearchList->InsertItem(A, wxString::Format(wxT(
"%s"),Results.
GetKey(A).c_str()));
std::string l(std::string Text)
A Helper Function For HK_Language.
HK_KeyValue Search(string Value, bool SearchBatch, bool SearchAdv)
Returned HK_KeyValue's Key Holds Name And Value Holds String Where Match Was Found.
A Key and Value Type Storage.
string GetKey(int Selection)
Returns The Selected Key As A String.
void Add(string Key, string Value)
Adds A Key And Value;.
vector< int > GetIntArray(int Selection)
Returns The Selected Value As An Array Of Integers.
int GetCount()
Return The Amount Of Setting Keys Stored.
string GetValue(int Selection)
Returns The Selected Setting Value As A String.
HK_KeyValue Search(string Value)
Returns A HK_KeyValue Object With Matches To Value.
HK_KeyValue Search(string Prefix, string Value)
Returned HK_KeyValue's Key Holds Name And Value Holds String Where Match Was Found.
~SearchDialog()
Deconstructor.
SearchDialog(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(503, 395), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * SearchSchedules
void OnClose(wxCommandEvent &)
Closes Dialog.
wxCheckBox * SearchBatches
wxSearchCtrl * SearchCtrl
wxCheckBox * SearchSettings
wxCheckBox * SearchGroups
void OnSearch(wxCommandEvent &evt)
Searches For Matches Then Shows Them In SearchList.
wxCheckBox * SearchReminders