merged 2.4 branch into the trunk

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-12-04 14:11:26 +00:00
parent 59a944cb63
commit 2b5f62a0b2
1057 changed files with 37805 additions and 24034 deletions

View File

@@ -67,7 +67,6 @@ See mod_*.cpp and htmlwin.cpp for example :-)
FORCE_LINK(m_hline) \
FORCE_LINK(m_links) \
FORCE_LINK(m_tables) \
FORCE_LINK(m_meta) \
FORCE_LINK(m_style)

View File

@@ -57,7 +57,7 @@ public:
virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize(file); }
virtual bool Initialize(const wxString& file);
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
virtual bool LoadFile(const wxString& file = "");
virtual bool LoadFile(const wxString& file = wxT(""));
virtual bool DisplaySection(int sectionNo);
virtual bool DisplaySection(const wxString& section) { return Display(section); }
virtual bool DisplayBlock(long blockNo) { return DisplaySection(blockNo); }

View File

@@ -93,23 +93,23 @@ struct wxHtmlContentsItem
};
//------------------------------------------------------------------------------
// wxSearchEngine
// wxHtmlSearchEngine
// This class takes input streams and scans them for occurence
// of keyword(s)
//------------------------------------------------------------------------------
class WXDLLEXPORT wxSearchEngine : public wxObject
class WXDLLEXPORT wxHtmlSearchEngine : public wxObject
{
public:
wxSearchEngine() : wxObject() {m_Keyword = NULL; }
~wxSearchEngine() {if (m_Keyword) delete[] m_Keyword; }
wxHtmlSearchEngine() : wxObject() {m_Keyword = NULL; }
~wxHtmlSearchEngine() {if (m_Keyword) delete[] m_Keyword; }
// Sets the keyword we will be searching for
virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only);
// Scans the stream for the keyword.
// Returns TRUE if the stream contains keyword, fALSE otherwise
virtual bool Scan(wxInputStream *stream);
virtual bool Scan(const wxFSFile& file);
private:
wxChar *m_Keyword;
@@ -139,7 +139,7 @@ public:
private:
wxHtmlHelpData* m_Data;
wxSearchEngine m_Engine;
wxHtmlSearchEngine m_Engine;
wxString m_Keyword, m_Name;
wxChar *m_LastPage;
wxHtmlContentsItem* m_ContentsItem;

View File

@@ -33,7 +33,9 @@
#include "wx/stattext.h"
#include "wx/html/htmlwin.h"
#include "wx/html/htmprint.h"
class WXDLLEXPORT wxButton;
class WXDLLEXPORT wxTextCtrl;
// style flags for the Help Frame

View File

@@ -219,6 +219,9 @@ public:
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align; m_LastLayout = -1;}
void SetBackgroundColour(const wxColour& clr) {m_UseBkColour = TRUE; m_BkColour = clr;}
// returns background colour (of wxNullColour if none set), so that widgets can
// adapt to it:
wxColour GetBackgroundColour();
void SetBorder(const wxColour& clr1, const wxColour& clr2) {m_UseBorder = TRUE; m_BorderColour1 = clr1, m_BorderColour2 = clr2;}
virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const;
virtual const wxHtmlCell* Find(int condition, const void* param) const;

View File

@@ -65,6 +65,20 @@ public:
virtual wxString ReadFile(const wxFSFile& file) const;
};
//--------------------------------------------------------------------------------
// wxHtmlFilterHTML
// filter for text/html
//--------------------------------------------------------------------------------
class wxHtmlFilterHTML : public wxHtmlFilter
{
DECLARE_DYNAMIC_CLASS(wxHtmlFilterHTML)
public:
virtual bool CanRead(const wxFSFile& file) const;
virtual wxString ReadFile(const wxFSFile& file) const;
};
#endif // wxUSE_HTML

View File

@@ -72,6 +72,9 @@ public:
virtual void InitParser(const wxString& source);
// This must be called after Parse().
virtual void DoneParser();
// May be called during parsing to immediately return from Parse().
virtual void StopParsing() { m_stopParsing = TRUE; }
// Parses the m_Source from begin_pos to end_pos-1.
// (in noparams version it parses whole m_Source)
@@ -117,6 +120,11 @@ public:
// Restores parser's state from stack or returns FALSE if the stack is
// empty
virtual bool RestoreState();
// Parses HTML string 'markup' and extracts charset info from <meta> tag
// if present. Returns empty string if the tag is missing.
// For wxHTML's internal use.
static wxString ExtractCharsetInformation(const wxString& markup);
protected:
// DOM structure
@@ -173,6 +181,9 @@ protected:
// entity parse
wxHtmlEntitiesParser *m_entitiesParser;
// flag indicating that the parser should stop
bool m_stopParsing;
};
@@ -242,7 +253,11 @@ public:
wxChar GetEntityChar(const wxString& entity);
// Returns character that represents given Unicode code
#if wxUSE_UNICODE
wxChar GetCharForCode(unsigned code) { return (wxChar)code; }
#else
wxChar GetCharForCode(unsigned code);
#endif
protected:
#if wxUSE_WCHAR_T && !wxUSE_UNICODE

View File

@@ -98,7 +98,7 @@ enum {
class WXDLLEXPORT wxHtmlPrintout : public wxPrintout
{
public:
wxHtmlPrintout(const wxString& title = "Printout");
wxHtmlPrintout(const wxString& title = wxT("Printout"));
~wxHtmlPrintout();
void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = TRUE);
@@ -176,7 +176,7 @@ private:
class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject
{
public:
wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame *parent_frame = NULL);
wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxFrame *parent_frame = NULL);
~wxHtmlEasyPrinting();
bool PreviewFile(const wxString &htmlfile);

View File

@@ -32,7 +32,7 @@ I STRONGLY recommend reading and understanding these macros!!
class HTML_Handler_##name : public wxHtmlWinTagHandler \
{ \
public: \
wxString GetSupportedTags() {return tags;}
wxString GetSupportedTags() {return wxT(tags);}

View File

@@ -117,10 +117,12 @@ public:
const wxHtmlLinkInfo& GetLink() const { return m_Link; }
void SetLink(const wxHtmlLinkInfo& link);
#if !wxUSE_UNICODE
void SetInputEncoding(wxFontEncoding enc);
wxFontEncoding GetInputEncoding() const { return m_InputEnc; }
wxFontEncoding GetOutputEncoding() const { return m_OutputEnc; }
wxEncodingConverter *GetEncodingConverter() const { return m_EncConv; }
#endif
// creates font depending on m_Font* members.
virtual wxFont* CreateCurrentFont();
@@ -161,7 +163,9 @@ private:
wxFont* m_FontsTable[2][2][2][2][7];
wxString m_FontsFacesTable[2][2][2][2][7];
#if !wxUSE_UNICODE
wxFontEncoding m_FontsEncTable[2][2][2][2][7];
#endif
// table of loaded fonts. 1st four indexes are 0 or 1, depending on on/off
// state of these flags (from left to right):
// [bold][italic][underlined][fixed_size]
@@ -172,9 +176,11 @@ private:
wxString m_FontFaceFixed, m_FontFaceNormal;
// html font sizes and faces of fixed and proportional fonts
#if !wxUSE_UNICODE
wxFontEncoding m_InputEnc, m_OutputEnc;
// I/O font encodings
wxEncodingConverter *m_EncConv;
#endif
};