// Purpose: wxHtmlHelpWindow
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
// Purpose: wxHtmlHelpWindow
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
#include "wx/html/helpfrm.h"
#include "wx/html/helpdlg.h"
#include "wx/html/helpctrl.h"
#include "wx/html/helpfrm.h"
#include "wx/html/helpdlg.h"
#include "wx/html/helpctrl.h"
public:
wxHtmlHelpHashData(int index, wxTreeItemId id) : wxObject()
{ m_Index = index; m_Id = id;}
public:
wxHtmlHelpHashData(int index, wxTreeItemId id) : wxObject()
{ m_Index = index; m_Id = id;}
// The sizer for the whole top-level window.
wxSizer *topWindowSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(topWindowSizer);
// The sizer for the whole top-level window.
wxSizer *topWindowSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(topWindowSizer);
- wxToolBar *toolBar = new wxToolBar(this, -1, wxDefaultPosition, wxDefaultSize,
+ wxToolBar *toolBar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxNO_BORDER | wxTB_HORIZONTAL |
wxTB_DOCKABLE | wxTB_NODIVIDER |
(helpStyle & wxHF_FLAT_TOOLBAR ? wxTB_FLAT : 0));
wxNO_BORDER | wxTB_HORIZONTAL |
wxTB_DOCKABLE | wxTB_NODIVIDER |
(helpStyle & wxHF_FLAT_TOOLBAR ? wxTB_FLAT : 0));
- wxFontEnumerator enu;
- enu.EnumerateFacenames(wxFONTENCODING_SYSTEM, true /*enum fixed width only*/);
- m_FixedFonts = new wxArrayString;
- *m_FixedFonts = *enu.GetFacenames();
+ m_FixedFonts = new wxArrayString(
+ wxFontEnumerator::GetFacenames(wxFONTENCODING_SYSTEM,
+ true /*enum fixed width only*/));
- m_Bookmarks->Delete(m_Bookmarks->GetSelection());
+ pos = m_Bookmarks->GetSelection();
+ wxASSERT_MSG( pos != wxNOT_FOUND , wxT("Unknown bookmark position") ) ;
+ m_Bookmarks->Delete((unsigned int)pos);
cnttext.Printf(_("%i of %i"), displ, cnt);
m_IndexCountInfo->SetLabel(cnttext);
cnttext.Printf(_("%i of %i"), displ, cnt);
m_IndexCountInfo->SetLabel(cnttext);
- wxString sr = m_Bookmarks->GetStringSelection();
-
- if (sr != wxEmptyString && sr != _("(bookmarks)"))
+ wxString str = m_Bookmarks->GetStringSelection();
+ int idx = m_BookmarksNames.Index(str);
+ if (!str.empty() && str != _("(bookmarks)") && idx != wxNOT_FOUND)