+ // Set find values.
+ m_findFlags = wxWEBVIEW_FIND_DEFAULT;
+ m_findText = wxEmptyString;
+ m_findCount = 0;
+
+ // Create panel for find toolbar.
+ wxPanel* panel = new wxPanel(this);
+ topsizer->Add(panel, wxSizerFlags().Expand());
+
+ // Create sizer for panel.
+ wxBoxSizer* panel_sizer = new wxBoxSizer(wxVERTICAL);
+ panel->SetSizer(panel_sizer);
+
+ // Create the find toolbar.
+ m_find_toolbar = new wxToolBar(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL|wxTB_TEXT|wxTB_HORZ_LAYOUT);
+ m_find_toolbar->Hide();
+ panel_sizer->Add(m_find_toolbar, wxSizerFlags().Expand());
+
+ // Create find control.
+ m_find_ctrl = new wxTextCtrl(m_find_toolbar, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(140,-1), wxTE_PROCESS_ENTER);
+
+
+ //Find options menu
+ wxMenu* findmenu = new wxMenu;
+ m_find_toolbar_wrap = findmenu->AppendCheckItem(wxID_ANY,"Wrap");
+ m_find_toolbar_matchcase = findmenu->AppendCheckItem(wxID_ANY,"Match Case");
+ m_find_toolbar_wholeword = findmenu->AppendCheckItem(wxID_ANY,"Entire Word");
+ m_find_toolbar_highlight = findmenu->AppendCheckItem(wxID_ANY,"Highlight");
+ // Add find toolbar tools.
+ m_find_toolbar->SetToolSeparation(7);
+ m_find_toolbar_done = m_find_toolbar->AddTool(wxID_ANY, "Close", wxArtProvider::GetBitmap(wxART_CROSS_MARK));
+ m_find_toolbar->AddSeparator();
+ m_find_toolbar->AddControl(m_find_ctrl, "Find");
+ m_find_toolbar->AddSeparator();
+ m_find_toolbar_next = m_find_toolbar->AddTool(wxID_ANY, "Next", wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_TOOLBAR, wxSize(16,16)));
+ m_find_toolbar_previous = m_find_toolbar->AddTool(wxID_ANY, "Previous", wxArtProvider::GetBitmap(wxART_GO_UP, wxART_TOOLBAR, wxSize(16,16)));
+ m_find_toolbar->AddSeparator();
+ m_find_toolbar_options = m_find_toolbar->AddTool(wxID_ANY, "Options", wxArtProvider::GetBitmap(wxART_PLUS, wxART_TOOLBAR, wxSize(16,16)), "", wxITEM_DROPDOWN);
+ m_find_toolbar_options->SetDropdownMenu(findmenu);
+ m_find_toolbar->Realize();
+