Fixed Windows DLL link problems with wxHtmlProcessor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kendall Bennett 2001-05-03 20:34:23 +00:00
parent 26ffe1fdba
commit bfb9ee966d
2 changed files with 17 additions and 18 deletions

View File

@ -27,8 +27,7 @@
#include "wx/filesys.h" #include "wx/filesys.h"
#include "wx/html/htmlfilt.h" #include "wx/html/htmlfilt.h"
class WXDLLEXPORT wxHtmlProcessor; class wxHtmlProcessor;
class wxHtmlWinModule; class wxHtmlWinModule;
class wxHtmlHistoryArray; class wxHtmlHistoryArray;
class wxHtmlProcessorList; class wxHtmlProcessorList;
@ -52,7 +51,7 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
public: public:
wxHtmlWindow() : wxScrolledWindow() {}; wxHtmlWindow() : wxScrolledWindow() {};
wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, wxHtmlWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxHW_SCROLLBAR_AUTO, long style = wxHW_SCROLLBAR_AUTO,
const wxString& name = "htmlWindow"); const wxString& name = "htmlWindow");
@ -130,7 +129,7 @@ public:
// Returns a pointer to the parser. // Returns a pointer to the parser.
wxHtmlWinParser *GetParser() const { return m_Parser; } wxHtmlWinParser *GetParser() const { return m_Parser; }
// Adds HTML processor to this instance of wxHtmlWindow: // Adds HTML processor to this instance of wxHtmlWindow:
void AddProcessor(wxHtmlProcessor *processor); void AddProcessor(wxHtmlProcessor *processor);
// Adds HTML processor to wxHtmlWindow class as whole: // Adds HTML processor to wxHtmlWindow class as whole:
@ -143,7 +142,7 @@ protected:
// Return value : TRUE if anchor exists, FALSE otherwise // Return value : TRUE if anchor exists, FALSE otherwise
bool ScrollToAnchor(const wxString& anchor); bool ScrollToAnchor(const wxString& anchor);
// Prepares layout (= fill m_PosX, m_PosY for fragments) based on // Prepares layout (= fill m_PosX, m_PosY for fragments) based on
// actual size of window. This method also setup scrollbars // actual size of window. This method also setup scrollbars
void CreateLayout(); void CreateLayout();
@ -210,10 +209,10 @@ private:
int m_HistoryPos; int m_HistoryPos;
// if this FLAG is false, items are not added to history // if this FLAG is false, items are not added to history
bool m_HistoryOn; bool m_HistoryOn;
// html processors array: // html processors array:
wxHtmlProcessorList *m_Processors; wxHtmlProcessorList *m_Processors;
static wxHtmlProcessorList *m_SharedProcessors; static wxHtmlProcessorList *m_SharedProcessors;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };

View File

@ -130,7 +130,7 @@ void wxHtmlWindow::SetFonts(wxString normal_face, wxString fixed_face, const int
m_Parser->SetFonts(normal_face, fixed_face, sizes); m_Parser->SetFonts(normal_face, fixed_face, sizes);
// fonts changed => contents invalid, so reload the page: // fonts changed => contents invalid, so reload the page:
SetPage(wxT("<html><body></body></html>")); SetPage(wxT("<html><body></body></html>"));
if (!op.IsEmpty()) LoadPage(op); if (!op.IsEmpty()) LoadPage(op);
} }
@ -182,7 +182,7 @@ bool wxHtmlWindow::SetPage(const wxString& source)
m_Cell->SetIndent(m_Borders, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS); m_Cell->SetIndent(m_Borders, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS);
m_Cell->SetAlignHor(wxHTML_ALIGN_CENTER); m_Cell->SetAlignHor(wxHTML_ALIGN_CENTER);
CreateLayout(); CreateLayout();
if (m_tmpCanDrawLocks == 0) if (m_tmpCanDrawLocks == 0)
Refresh(); Refresh();
return TRUE; return TRUE;
} }
@ -409,7 +409,7 @@ void wxHtmlWindow::ReadCustomization(wxConfigBase *cfg, wxString path)
m_Borders = cfg->Read(wxT("wxHtmlWindow/Borders"), m_Borders); m_Borders = cfg->Read(wxT("wxHtmlWindow/Borders"), m_Borders);
p_fff = cfg->Read(wxT("wxHtmlWindow/FontFaceFixed"), m_Parser->m_FontFaceFixed); p_fff = cfg->Read(wxT("wxHtmlWindow/FontFaceFixed"), m_Parser->m_FontFaceFixed);
p_ffn = cfg->Read(wxT("wxHtmlWindow/FontFaceNormal"), m_Parser->m_FontFaceNormal); p_ffn = cfg->Read(wxT("wxHtmlWindow/FontFaceNormal"), m_Parser->m_FontFaceNormal);
for (int i = 0; i < 7; i++) for (int i = 0; i < 7; i++)
{ {
tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i); tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i);
p_fontsizes[i] = cfg->Read(tmp, m_Parser->m_FontsSizes[i]); p_fontsizes[i] = cfg->Read(tmp, m_Parser->m_FontsSizes[i]);
@ -436,7 +436,7 @@ void wxHtmlWindow::WriteCustomization(wxConfigBase *cfg, wxString path)
cfg->Write(wxT("wxHtmlWindow/Borders"), (long) m_Borders); cfg->Write(wxT("wxHtmlWindow/Borders"), (long) m_Borders);
cfg->Write(wxT("wxHtmlWindow/FontFaceFixed"), m_Parser->m_FontFaceFixed); cfg->Write(wxT("wxHtmlWindow/FontFaceFixed"), m_Parser->m_FontFaceFixed);
cfg->Write(wxT("wxHtmlWindow/FontFaceNormal"), m_Parser->m_FontFaceNormal); cfg->Write(wxT("wxHtmlWindow/FontFaceNormal"), m_Parser->m_FontFaceNormal);
for (int i = 0; i < 7; i++) for (int i = 0; i < 7; i++)
{ {
tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i); tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i);
cfg->Write(tmp, (long) m_Parser->m_FontsSizes[i]); cfg->Write(tmp, (long) m_Parser->m_FontsSizes[i]);
@ -529,10 +529,10 @@ void wxHtmlWindow::AddProcessor(wxHtmlProcessor *processor)
m_Processors->DeleteContents(TRUE); m_Processors->DeleteContents(TRUE);
} }
wxHtmlProcessorList::Node *node; wxHtmlProcessorList::Node *node;
for (node = m_Processors->GetFirst(); node; node = node->GetNext()) for (node = m_Processors->GetFirst(); node; node = node->GetNext())
{ {
if (processor->GetPriority() > node->GetData()->GetPriority()) if (processor->GetPriority() > node->GetData()->GetPriority())
{ {
m_Processors->Insert(node, processor); m_Processors->Insert(node, processor);
break; break;
@ -548,10 +548,10 @@ void wxHtmlWindow::AddProcessor(wxHtmlProcessor *processor)
m_SharedProcessors->DeleteContents(TRUE); m_SharedProcessors->DeleteContents(TRUE);
} }
wxHtmlProcessorList::Node *node; wxHtmlProcessorList::Node *node;
for (node = m_SharedProcessors->GetFirst(); node; node = node->GetNext()) for (node = m_SharedProcessors->GetFirst(); node; node = node->GetNext())
{ {
if (processor->GetPriority() > node->GetData()->GetPriority()) if (processor->GetPriority() > node->GetData()->GetPriority())
{ {
m_SharedProcessors->Insert(node, processor); m_SharedProcessors->Insert(node, processor);
break; break;
@ -573,10 +573,10 @@ void wxHtmlWindow::CleanUpStatics()
m_DefaultFilter = NULL; m_DefaultFilter = NULL;
m_Filters.DeleteContents(TRUE); m_Filters.DeleteContents(TRUE);
m_Filters.Clear(); m_Filters.Clear();
delete m_SharedProcessors; delete m_SharedProcessors;
m_SharedProcessors = NULL; m_SharedProcessors = NULL;
delete s_cur_hand; delete s_cur_hand;
delete s_cur_arrow; delete s_cur_arrow;
} }
@ -696,7 +696,7 @@ void wxHtmlWindow::OnIdle(wxIdleEvent& WXUNUSED(event))
} }
IMPLEMENT_ABSTRACT_CLASS(wxHtmlProcessor,wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxHtmlWindow,wxScrolledWindow) IMPLEMENT_DYNAMIC_CLASS(wxHtmlWindow,wxScrolledWindow)