Logo Search packages:      
Sourcecode: xchm version File versions

CHMSearchPanel::CHMSearchPanel ( wxWindow *  parent,
wxTreeCtrl *  topics,
CHMHtmlWindow html 
)

Initialized the search panel.

Parameters:
parent Parent widget.
topics A wxTreeCtrl* that will be iterated over recursively in order to figure out which files from the archive to be searched.
html The widget that can load a html page found as a result of searching.

Definition at line 34 of file chmsearchpanel.cpp.

References GetConfig().

      : wxPanel(parent), _tcl(topics), _text(NULL), _partial(NULL), 
        _titles(NULL), _search(NULL), _results(NULL), _html(html)
{
      wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
        SetAutoLayout(TRUE);
        SetSizer(sizer);

      _text = new wxTextCtrl(this, ID_SearchText, wxEmptyString, 
                         wxDefaultPosition, wxDefaultSize, 
                         wxTE_PROCESS_ENTER);

      _partial = new wxCheckBox(this, -1, _("Get partial matches"));
      _titles = new wxCheckBox(this, -1, _("Search titles only"));      
      _search = new wxButton(this, ID_SearchButton, _("Search"));

#if wxUSE_TOOLTIPS
      _partial->SetToolTip(_("Allow partial matches."));
      _titles->SetToolTip(_("Only search in the contents' titles."));
      _search->SetToolTip(_("Search contents for occurences of"
                        " the specified text."));
#endif
      _results = new CHMListCtrl(this, html, ID_Results);

        sizer->Add(_text, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 2);
        sizer->Add(_partial, 0, wxLEFT | wxRIGHT | wxTOP, 10);
        sizer->Add(_titles, 0, wxLEFT | wxRIGHT, 10);
      sizer->Add(_search, 0, wxALL, 10);
        sizer->Add(_results, 1, wxALL | wxEXPAND, 2);

      GetConfig();
}


Generated by  Doxygen 1.6.0   Back to index