- // search list panel?
- if (style & wxHF_SEARCH) {
- wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_SEARCHPAGE);
-
- wxLayoutConstraints *b1 = new wxLayoutConstraints;
- m_SearchText = new wxTextCtrl(dummy, wxID_HTML_SEARCHTEXT);
- b1 -> top.SameAs (dummy, wxTop, 10);
- b1 -> left.SameAs (dummy, wxLeft, 10);
- b1 -> right.SameAs (dummy, wxRight, 10);
- b1 -> height.AsIs();
- m_SearchText -> SetConstraints(b1);
-
- wxLayoutConstraints *b2 = new wxLayoutConstraints;
- m_SearchButton = new wxButton(dummy, wxID_HTML_SEARCHBUTTON, _("Search"));
- b2 -> top.Below (m_SearchText, 10);
- b2 -> left.SameAs (dummy, wxLeft, 10);
- b2 -> width.AsIs();
- b2 -> height.AsIs();
- m_SearchButton -> SetConstraints(b2);
-
- wxLayoutConstraints *b4 = new wxLayoutConstraints;
- m_SearchChoice = new wxChoice(dummy, wxID_HTML_SEARCHCHOICE, wxDefaultPosition,
- wxDefaultSize);
- b4 -> top.Below (m_SearchText, 10);
- b4 -> left.SameAs (m_SearchButton, wxRight, 10);
- b4 -> right.SameAs (dummy, wxRight, 10);
- b4 -> height.AsIs();
- m_SearchChoice -> SetConstraints(b4);
-
- wxLayoutConstraints *b3 = new wxLayoutConstraints;
- m_SearchList = new wxListBox(dummy, wxID_HTML_SEARCHLIST, wxDefaultPosition, wxDefaultSize, 0);
- b3 -> top.Below (m_SearchButton, 10);
- b3 -> left.SameAs (dummy, wxLeft, 0);
- b3 -> right.SameAs (dummy, wxRight, 0);
- b3 -> bottom.SameAs (dummy, wxBottom, 0);
- m_SearchList -> SetConstraints(b3);
-
- dummy -> SetAutoLayout(TRUE);
- dummy -> Layout();
- m_NavigPan -> AddPage(dummy, _("Search"));
- m_SearchPage = notebook_page++;
- }
- m_HtmlWin -> Show(TRUE);
-
- //RefreshLists();
-
- // showtime
- if (m_NavigPan && m_Splitter) {
- m_Splitter -> SetMinimumPaneSize(20);
- if (m_Cfg.navig_on)
- m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
- else {
- m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
- m_Splitter -> Unsplit();
- }
- if (m_Cfg.navig_on) {
- m_NavigPan -> Show(TRUE);
- m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
- }
- else {
- m_NavigPan -> Show(FALSE);
- m_Splitter -> Initialize(m_HtmlWin);
- }
- }
- return TRUE;
-}