/////////////////////////////////////////////////////////////////////////////
-// Name: helpext.cpp
-// Purpose: an external help controller for wxWindows
+// Name: helpwxht.cpp
+// Purpose: A help controller using the wxHTML classes
// Author: Karsten Ballueder
// Modified by:
// Created: 04/01/98
# include "wx/list.h"
# include "wx/intl.h"
# include "wx/layout.h"
+# include "wx/combobox.h"
#endif
#include "wx/helpbase.h"
#include <stdio.h>
#include <ctype.h>
+#ifndef __MWERKS__
#include <sys/stat.h>
+#endif
-#ifndef __WINDOWS__
+#if !defined(__WINDOWS__) && !defined(__OS2__)
# include <unistd.h>
#endif
delete [] src;
return doc;
}
-
+
virtual bool CanRead(const wxFSFile& file) const
{
wxString filename = file.GetLocation();
wxButton *btn_contents = new wxButton(this, m_IdContents, _("Contents"));
m_combo = new wxComboBox(this, m_IdCombo);
wxButton *btn_search = new wxButton(this, m_IdSearch, _("Search"));
-
+
m_filter = new wxForceHtmlFilter;
wxLayoutConstraints *c;
c->top.SameAs(this, wxTop, 2*LAYOUT_Y_MARGIN);
c->height.AsIs();
btn_fwd->SetConstraints(c);
-
+
c = new wxLayoutConstraints;
c->left.SameAs(btn_fwd, wxRight, 2*LAYOUT_X_MARGIN);
c->width.Absolute(BUTTON_WIDTH);
m_htmlwin->SetConstraints(c);
SetAutoLayout(TRUE);
CreateStatusBar();
-
+
m_htmlwin->SetRelatedFrame(this, title);
m_htmlwin->SetRelatedStatusBar(0);
m_htmlwin->AddFilter(m_filter);
+#ifdef __WXMOTIF__
+ // Motif needs a nudge to get it to resize properly
+ // when shown
+ wxSizeEvent event(size, GetId());
+ GetEventHandler()->ProcessEvent(event);
+#endif
+
Show(TRUE);
}
}
void
-wxHelpFrame::OnClose(wxCloseEvent &ev)
+wxHelpFrame::OnClose(wxCloseEvent &WXUNUSED(ev))
{
wxASSERT(m_controller);
m_controller->m_Frame = NULL;