removed/replaced include 'wx/wx.h'

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-05 18:48:48 +00:00
parent 2734d68772
commit 04dbb6467b
41 changed files with 587 additions and 625 deletions

View File

@@ -31,13 +31,8 @@ limitation)
#if wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS #if wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
#ifndef WXPRECOMP
#include "wx/wx.h"
#endif
#include "wx/filesys.h" #include "wx/filesys.h"
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// wxInternetFSHandler // wxInternetFSHandler
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

View File

@@ -19,14 +19,11 @@
#if wxUSE_FILESYSTEM #if wxUSE_FILESYSTEM
#ifndef WXPRECOMP
#include "wx/wx.h"
#endif
#include "wx/filesys.h" #include "wx/filesys.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/image.h" #include "wx/image.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#endif #endif
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

View File

@@ -20,11 +20,6 @@
#if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
#ifndef WXPRECOMP
#include "wx/wx.h"
#endif
#include "wx/filesys.h" #include "wx/filesys.h"
class WXDLLEXPORT wxHashTableLong; class WXDLLEXPORT wxHashTableLong;

View File

@@ -16,15 +16,7 @@
#pragma interface "filedlgg.h" #pragma interface "filedlgg.h"
#endif #endif
#include "wx/defs.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/checkbox.h"
#include "wx/listctrl.h"
#include "wx/textctrl.h"
#include "wx/choice.h"
#include "wx/checkbox.h"
#include "wx/stattext.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// data // data
@@ -37,91 +29,14 @@ WXDLLEXPORT_DATA(extern const wxChar *)wxFileSelectorDefaultWildcardStr;
// classes // classes
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class wxCheckBox;
class wxChoice;
class wxFileData; class wxFileData;
class wxFileCtrl; class wxFileCtrl;
class wxFileDialog; class wxFileDialog;
class wxListEvent;
//----------------------------------------------------------------------------- class wxStaticText;
// wxFileData class wxTextCtrl;
//-----------------------------------------------------------------------------
class wxFileData : public wxObject
{
private:
wxString m_name;
wxString m_fileName;
long m_size;
int m_hour;
int m_minute;
int m_year;
int m_month;
int m_day;
wxString m_permissions;
bool m_isDir;
bool m_isLink;
bool m_isExe;
public:
wxFileData() { }
wxFileData( const wxString &name, const wxString &fname );
wxString GetName() const;
wxString GetFullName() const;
wxString GetHint() const;
wxString GetEntry( int num );
bool IsDir();
bool IsLink();
bool IsExe();
long GetSize();
void MakeItem( wxListItem &item );
void SetNewName( const wxString &name, const wxString &fname );
private:
DECLARE_DYNAMIC_CLASS(wxFileData);
};
//-----------------------------------------------------------------------------
// wxFileCtrl
//-----------------------------------------------------------------------------
class wxFileCtrl : public wxListCtrl
{
private:
wxString m_dirName;
bool m_showHidden;
wxString m_wild;
public:
wxFileCtrl();
wxFileCtrl( wxWindow *win,
wxWindowID id,
const wxString &dirName,
const wxString &wild,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxLC_LIST,
const wxValidator &validator = wxDefaultValidator,
const wxString &name = wxT("filelist") );
void ChangeToListMode();
void ChangeToReportMode();
void ChangeToIconMode();
void ShowHidden( bool show = TRUE );
long Add( wxFileData *fd, wxListItem &item );
void Update();
virtual void StatusbarText( wxChar *WXUNUSED(text) ) {};
void MakeDir();
void GoToParentDir();
void GoToHomeDir();
void GoToDir( const wxString &dir );
void SetWild( const wxString &wild );
void GetDir( wxString &dir );
void OnListDeleteItem( wxListEvent &event );
void OnListDeleteAllItems( wxListEvent &event );
void OnListEndLabelEdit( wxListEvent &event );
private:
DECLARE_DYNAMIC_CLASS(wxFileCtrl);
DECLARE_EVENT_TABLE()
};
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// File selector // File selector
@@ -139,7 +54,7 @@ public:
const wxString& wildCard = wxFileSelectorDefaultWildcardStr, const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
long style = 0, long style = 0,
const wxPoint& pos = wxDefaultPosition); const wxPoint& pos = wxDefaultPosition);
~wxFileDialog(); virtual ~wxFileDialog();
void SetMessage(const wxString& message) { m_message = message; } void SetMessage(const wxString& message) { m_message = message; }
void SetPath(const wxString& path); void SetPath(const wxString& path);

View File

@@ -16,8 +16,7 @@
#pragma interface "helpxlp.h" #pragma interface "helpxlp.h"
#endif #endif
#include <stdio.h> #include "wx/defs.h"
#include "wx/wx.h"
#if wxUSE_HELP #if wxUSE_HELP

View File

@@ -205,10 +205,7 @@ public:
// mainWindow is sized to whatever's left over. This function for backward // mainWindow is sized to whatever's left over. This function for backward
// compatibility; use LayoutWindow. // compatibility; use LayoutWindow.
bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = (wxWindow*) NULL) bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = (wxWindow*) NULL);
{
return LayoutWindow(frame, mainWindow);
}
// mainWindow is sized to whatever's left over. // mainWindow is sized to whatever's left over.
bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL); bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL);

View File

@@ -16,8 +16,12 @@
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_HTML #if wxUSE_HTML
#include "wx/object.h"
class WXDLLEXPORT wxColour;
class WXDLLEXPORT wxHtmlEntitiesParser; class WXDLLEXPORT wxHtmlEntitiesParser;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -23,30 +23,11 @@ I STRONGLY recommend reading and understanding these macros!!
#define _WX_M_TEMPL_H_ #define _WX_M_TEMPL_H_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_HTML #if wxUSE_HTML
#ifdef __GNUG__
#pragma interface "m_templ.h"
#pragma implementation
#endif
#include <wx/wxprec.h>
#ifdef __BORDLANDC__
#pragma hdrstop
#endif
#ifndef WXPRECOMP
#include <wx/wx.h>
#endif
#include "wx/html/winpars.h" #include "wx/html/winpars.h"
#define TAG_HANDLER_BEGIN(name,tags) \ #define TAG_HANDLER_BEGIN(name,tags) \
class HTML_Handler_##name : public wxHtmlWinTagHandler \ class HTML_Handler_##name : public wxHtmlWinTagHandler \
{ \ { \

View File

@@ -37,7 +37,6 @@ limitation)
#if wxUSE_FILESYSTEM && wxUSE_FS_INET #if wxUSE_FILESYSTEM && wxUSE_FS_INET
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/wfstream.h" #include "wx/wfstream.h"

View File

@@ -20,7 +20,8 @@
#if wxUSE_FILESYSTEM && wxUSE_STREAMS #if wxUSE_FILESYSTEM && wxUSE_STREAMS
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/filesys.h" #include "wx/filesys.h"

View File

@@ -22,7 +22,8 @@
#if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_ZIPSTREAM #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_ZIPSTREAM
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/hash.h" #include "wx/hash.h"

View File

@@ -31,7 +31,6 @@
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/frame.h" #include "wx/frame.h"

View File

@@ -21,8 +21,6 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/setup.h"
#include "wx/defs.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#if wxUSE_PRINTING_ARCHITECTURE #if wxUSE_PRINTING_ARCHITECTURE

View File

@@ -26,10 +26,16 @@
#error wxFileDialog currently only supports unix #error wxFileDialog currently only supports unix
#endif #endif
#include "wx/checkbox.h"
#include "wx/textctrl.h"
#include "wx/choice.h"
#include "wx/checkbox.h"
#include "wx/stattext.h"
#include "wx/filedlg.h" #include "wx/filedlg.h"
#include "wx/debug.h" #include "wx/debug.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/listctrl.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/sizer.h" #include "wx/sizer.h"
#include "wx/bmpbuttn.h" #include "wx/bmpbuttn.h"
@@ -63,6 +69,88 @@
#include "wx/generic/deffile.xpm" #include "wx/generic/deffile.xpm"
#include "wx/generic/exefile.xpm" #include "wx/generic/exefile.xpm"
//-----------------------------------------------------------------------------
// wxFileData
//-----------------------------------------------------------------------------
class wxFileData : public wxObject
{
private:
wxString m_name;
wxString m_fileName;
long m_size;
int m_hour;
int m_minute;
int m_year;
int m_month;
int m_day;
wxString m_permissions;
bool m_isDir;
bool m_isLink;
bool m_isExe;
public:
wxFileData() { }
wxFileData( const wxString &name, const wxString &fname );
wxString GetName() const;
wxString GetFullName() const;
wxString GetHint() const;
wxString GetEntry( int num );
bool IsDir();
bool IsLink();
bool IsExe();
long GetSize();
void MakeItem( wxListItem &item );
void SetNewName( const wxString &name, const wxString &fname );
private:
DECLARE_DYNAMIC_CLASS(wxFileData);
};
//-----------------------------------------------------------------------------
// wxFileCtrl
//-----------------------------------------------------------------------------
class wxFileCtrl : public wxListCtrl
{
private:
wxString m_dirName;
bool m_showHidden;
wxString m_wild;
public:
wxFileCtrl();
wxFileCtrl( wxWindow *win,
wxWindowID id,
const wxString &dirName,
const wxString &wild,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxLC_LIST,
const wxValidator &validator = wxDefaultValidator,
const wxString &name = wxT("filelist") );
void ChangeToListMode();
void ChangeToReportMode();
void ChangeToIconMode();
void ShowHidden( bool show = TRUE );
long Add( wxFileData *fd, wxListItem &item );
void Update();
virtual void StatusbarText( wxChar *WXUNUSED(text) ) {};
void MakeDir();
void GoToParentDir();
void GoToHomeDir();
void GoToDir( const wxString &dir );
void SetWild( const wxString &wild );
void GetDir( wxString &dir );
void OnListDeleteItem( wxListEvent &event );
void OnListDeleteAllItems( wxListEvent &event );
void OnListEndLabelEdit( wxListEvent &event );
private:
DECLARE_DYNAMIC_CLASS(wxFileCtrl);
DECLARE_EVENT_TABLE()
};
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// private classes - icons list management // private classes - icons list management
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -24,7 +24,8 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/mdi.h" #include "wx/frame.h"
#include "wx/mdi.h"
#endif #endif
#include "wx/laywin.h" #include "wx/laywin.h"
@@ -219,6 +220,11 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
#endif // wxUSE_MDI_ARCHITECTURE #endif // wxUSE_MDI_ARCHITECTURE
bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow)
{
return LayoutWindow(frame, mainWindow);
}
// Layout algorithm for any window. mainWindow gets what's left over. // Layout algorithm for any window. mainWindow gets what's left over.
bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow) bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow)
{ {

View File

@@ -28,8 +28,6 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/defs.h"
#if wxUSE_PRINTING_ARCHITECTURE #if wxUSE_PRINTING_ARCHITECTURE
#ifndef WX_PRECOMP #ifndef WX_PRECOMP

View File

@@ -23,7 +23,6 @@
#if wxUSE_PROPSHEET #if wxUSE_PROPSHEET
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/debug.h" #include "wx/debug.h"

View File

@@ -23,7 +23,6 @@
#if wxUSE_PROPSHEET #if wxUSE_PROPSHEET
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/propform.h" #include "wx/propform.h"

View File

@@ -25,13 +25,14 @@
#if wxUSE_SASH #if wxUSE_SASH
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/dialog.h"
#include "wx/frame.h"
#include "wx/settings.h"
#endif #endif
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include "wx/string.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#include "wx/sashwin.h" #include "wx/sashwin.h"
#include "wx/laywin.h" #include "wx/laywin.h"

View File

@@ -6,7 +6,7 @@
// Created: 28/6/2000 // Created: 28/6/2000
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -23,7 +23,6 @@
#if wxUSE_SPLASH #if wxUSE_SPLASH
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/splash.h" #include "wx/splash.h"

View File

@@ -25,7 +25,8 @@
#if wxUSE_HTML && wxUSE_STREAMS #if wxUSE_HTML && wxUSE_STREAMS
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/html/helpdata.h" #include "wx/html/helpdata.h"
@@ -94,8 +95,8 @@ class HP_TagHandler : public wxHtmlTagHandler
public: public:
HP_TagHandler(wxHtmlBookRecord *b) : wxHtmlTagHandler() HP_TagHandler(wxHtmlBookRecord *b) : wxHtmlTagHandler()
{ m_Book = b; m_Items = NULL; m_ItemsCnt = 0; m_Name = m_Page = wxEmptyString; { m_Book = b; m_Items = NULL; m_ItemsCnt = 0; m_Name = m_Page = wxEmptyString;
m_Level = 0; m_ID = -1; } m_Level = 0; m_ID = -1; }
wxString GetSupportedTags() { return wxT("UL,OBJECT,PARAM"); } wxString GetSupportedTags() { return wxT("UL,OBJECT,PARAM"); }
bool HandleTag(const wxHtmlTag& tag); bool HandleTag(const wxHtmlTag& tag);
void WriteOut(wxHtmlContentsItem*& array, int& size); void WriteOut(wxHtmlContentsItem*& array, int& size);
@@ -127,10 +128,10 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag)
or or
<OBJECT type="text/sitemap"> <OBJECT type="text/sitemap">
<param name="Name" value="main page"> <param name="Name" value="main page">
<param name="Local" value="another.htm"> <param name="Local" value="another.htm">
</OBJECT> </OBJECT>
We're interested in the latter. !m_Page.IsEmpty() is valid We're interested in the latter. !m_Page.IsEmpty() is valid
condition because text/site properties does not contain Local param condition because text/site properties does not contain Local param
@@ -220,7 +221,7 @@ wxHtmlHelpData::~wxHtmlHelpData()
if (m_Contents) if (m_Contents)
{ {
for (i = 0; i < m_ContentsCnt; i++) for (i = 0; i < m_ContentsCnt; i++)
{ {
delete[] m_Contents[i].m_Page; delete[] m_Contents[i].m_Page;
delete[] m_Contents[i].m_Name; delete[] m_Contents[i].m_Name;
} }
@@ -229,7 +230,7 @@ wxHtmlHelpData::~wxHtmlHelpData()
if (m_Index) if (m_Index)
{ {
for (i = 0; i < m_IndexCnt; i++) for (i = 0; i < m_IndexCnt; i++)
{ {
delete[] m_Index[i].m_Page; delete[] m_Index[i].m_Page;
delete[] m_Index[i].m_Name; delete[] m_Index[i].m_Name;
} }
@@ -624,7 +625,7 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
{ {
f = fsys.OpenFile(m_BookRecords[i].GetFullPath(x)); f = fsys.OpenFile(m_BookRecords[i].GetFullPath(x));
if (f) if (f)
{ {
url = m_BookRecords[i].GetFullPath(x); url = m_BookRecords[i].GetFullPath(x);
delete f; delete f;
return url; return url;
@@ -637,7 +638,7 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
for (i = 0; i < cnt; i++) for (i = 0; i < cnt; i++)
{ {
if (m_BookRecords[i].GetTitle() == x) if (m_BookRecords[i].GetTitle() == x)
{ {
url = m_BookRecords[i].GetFullPath(m_BookRecords[i].GetStart()); url = m_BookRecords[i].GetFullPath(m_BookRecords[i].GetStart());
return url; return url;
} }
@@ -649,7 +650,7 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
for (i = 0; i < cnt; i++) for (i = 0; i < cnt; i++)
{ {
if (wxStrcmp(m_Contents[i].m_Name, x) == 0) if (wxStrcmp(m_Contents[i].m_Name, x) == 0)
{ {
url = m_Contents[i].GetFullPath(); url = m_Contents[i].GetFullPath();
return url; return url;
} }
@@ -662,7 +663,7 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
for (i = 0; i < cnt; i++) for (i = 0; i < cnt; i++)
{ {
if (wxStrcmp(m_Index[i].m_Name, x) == 0) if (wxStrcmp(m_Index[i].m_Name, x) == 0)
{ {
url = m_Index[i].GetFullPath(); url = m_Index[i].GetFullPath();
return url; return url;
} }
@@ -679,7 +680,7 @@ wxString wxHtmlHelpData::FindPageById(int id)
for (i = 0; i < m_ContentsCnt; i++) for (i = 0; i < m_ContentsCnt; i++)
{ {
if (m_Contents[i].m_ID == id) if (m_Contents[i].m_ID == id)
{ {
url = m_Contents[i].GetFullPath(); url = m_Contents[i].GetFullPath();
return url; return url;
} }
@@ -705,7 +706,7 @@ wxHtmlSearchStatus::wxHtmlSearchStatus(wxHtmlHelpData* data, const wxString& key
int i, cnt = data->m_BookRecords.GetCount(); int i, cnt = data->m_BookRecords.GetCount();
for (i = 0; i < cnt; i++) for (i = 0; i < cnt; i++)
if (data->m_BookRecords[i].GetTitle() == book) if (data->m_BookRecords[i].GetTitle() == book)
{ {
bookr = &(data->m_BookRecords[i]); bookr = &(data->m_BookRecords[i]);
m_CurIndex = bookr->GetContentsStart(); m_CurIndex = bookr->GetContentsStart();
m_MaxIndex = bookr->GetContentsEnd(); m_MaxIndex = bookr->GetContentsEnd();
@@ -795,11 +796,11 @@ void wxSearchEngine::LookFor(const wxString& keyword, bool case_sensitive, bool
if (!m_CaseSensitive) if (!m_CaseSensitive)
{ {
for (int i = wxStrlen(m_Keyword) - 1; i >= 0; i--) for (int i = wxStrlen(m_Keyword) - 1; i >= 0; i--)
{ {
if ((m_Keyword[i] >= wxT('A')) && (m_Keyword[i] <= wxT('Z'))) if ((m_Keyword[i] >= wxT('A')) && (m_Keyword[i] <= wxT('Z')))
m_Keyword[i] += wxT('a') - wxT('A'); m_Keyword[i] += wxT('a') - wxT('A');
} }
} }
} }
@@ -825,7 +826,7 @@ bool wxSearchEngine::Scan(wxInputStream *stream)
if (m_WholeWords) if (m_WholeWords)
{ {
for (i = 0; i < lng - wrd; i++) for (i = 0; i < lng - wrd; i++)
{ {
if (WHITESPACE(buf[i])) continue; if (WHITESPACE(buf[i])) continue;
j = 0; j = 0;
while ((j < wrd) && (buf[i + j] == m_Keyword[j])) j++; while ((j < wrd) && (buf[i + j] == m_Keyword[j])) j++;
@@ -836,7 +837,7 @@ bool wxSearchEngine::Scan(wxInputStream *stream)
else else
{ {
for (i = 0; i < lng - wrd; i++) for (i = 0; i < lng - wrd; i++)
{ {
j = 0; j = 0;
while ((j < wrd) && (buf[i + j] == m_Keyword[j])) j++; while ((j < wrd) && (buf[i + j] == m_Keyword[j])) j++;
if (j == wrd) { found = TRUE; break; } if (j == wrd) { found = TRUE; break; }

View File

@@ -22,7 +22,9 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/brush.h"
#include "wx/colour.h"
#include "wx/dc.h"
#endif #endif
#include "wx/html/htmlcell.h" #include "wx/html/htmlcell.h"

View File

@@ -22,7 +22,8 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/log.h"
#include "wx/intl.h"
#endif #endif
#include "wx/html/htmlfilt.h" #include "wx/html/htmlfilt.h"

View File

@@ -20,7 +20,6 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/html/htmlfilter.h" #include "wx/html/htmlfilter.h"

View File

@@ -23,10 +23,8 @@ file is only left to point out the problem and will be removed r.s.n.
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include <wx/wx.h>
#endif #endif
#include <wx/notebook.h> #include <wx/notebook.h>
#include <wx/imaglist.h> #include <wx/imaglist.h>
#include <wx/treectrl.h> #include <wx/treectrl.h>

View File

@@ -22,7 +22,8 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/log.h"
#include "wx/intl.h"
#endif #endif
#include "wx/tokenzr.h" #include "wx/tokenzr.h"

View File

@@ -22,7 +22,6 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/html/htmltag.h" #include "wx/html/htmltag.h"

View File

@@ -23,15 +23,18 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/dcclient.h"
#include "wx/frame.h"
#endif #endif
#include "wx/html/htmlwin.h" #include "wx/html/htmlwin.h"
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
#include "wx/html/htmlproc.h" #include "wx/html/htmlproc.h"
#include "wx/log.h"
#include "wx/arrimpl.cpp"
#include "wx/list.h" #include "wx/list.h"
#include "wx/arrimpl.cpp"
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -23,7 +23,8 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/log.h"
#include "wx/intl.h"
#endif #endif
#if wxUSE_HTML && wxUSE_PRINTING_ARCHITECTURE && wxUSE_STREAMS #if wxUSE_HTML && wxUSE_PRINTING_ARCHITECTURE && wxUSE_STREAMS

View File

@@ -22,10 +22,8 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h" #include "wx/html/m_templ.h"
@@ -44,9 +42,9 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD")
if (tag.GetName() == wxT("DL")) if (tag.GetName() == wxT("DL"))
{ {
if (m_WParser->GetContainer()->GetFirstCell() != NULL) if (m_WParser->GetContainer()->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
} }
@@ -55,7 +53,7 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD")
ParseInner(tag); ParseInner(tag);
if (m_WParser->GetContainer()->GetFirstCell() != NULL) if (m_WParser->GetContainer()->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
} }
@@ -63,11 +61,10 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD")
return TRUE; return TRUE;
} }
else if (tag.GetName() == wxT("DT")) else if (tag.GetName() == wxT("DT"))
{ {
if (!tag.IsEnding()) if (!tag.IsEnding())
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
c = m_WParser->OpenContainer(); c = m_WParser->OpenContainer();
c->SetAlignHor(wxHTML_ALIGN_LEFT); c->SetAlignHor(wxHTML_ALIGN_LEFT);
@@ -75,9 +72,8 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD")
} }
return FALSE; return FALSE;
} }
else if (!tag.IsEnding()) // "DD" else if (!tag.IsEnding()) // "DD"
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
c = m_WParser->OpenContainer(); c = m_WParser->OpenContainer();
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT); c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT);

View File

@@ -21,7 +21,6 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
@@ -44,21 +43,21 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
wxString oldface = m_WParser->GetFontFace(); wxString oldface = m_WParser->GetFontFace();
if (tag.HasParam(wxT("COLOR"))) if (tag.HasParam(wxT("COLOR")))
{ {
wxColour clr; wxColour clr;
if (tag.GetParamAsColour(wxT("COLOR"), &clr)) if (tag.GetParamAsColour(wxT("COLOR"), &clr))
{ {
m_WParser->SetActualColor(clr); m_WParser->SetActualColor(clr);
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr)); m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr));
} }
} }
if (tag.HasParam(wxT("SIZE"))) if (tag.HasParam(wxT("SIZE")))
{ {
int tmp = 0; int tmp = 0;
wxChar c = tag.GetParam(wxT("SIZE")).GetChar(0); wxChar c = tag.GetParam(wxT("SIZE")).GetChar(0);
if (tag.GetParamAsInt(wxT("SIZE"), &tmp)) if (tag.GetParamAsInt(wxT("SIZE"), &tmp))
{ {
if (c == wxT('+') || c == wxT('-')) if (c == wxT('+') || c == wxT('-'))
m_WParser->SetFontSize(oldsize+tmp); m_WParser->SetFontSize(oldsize+tmp);
else else
@@ -69,9 +68,9 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
} }
if (tag.HasParam(wxT("FACE"))) if (tag.HasParam(wxT("FACE")))
{ {
if (m_Faces.GetCount() == 0) if (m_Faces.GetCount() == 0)
{ {
wxFontEnumerator enu; wxFontEnumerator enu;
enu.EnumerateFacenames(); enu.EnumerateFacenames();
m_Faces = *enu.GetFacenames(); m_Faces = *enu.GetFacenames();
@@ -80,30 +79,30 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
int index; int index;
while (tk.HasMoreTokens()) while (tk.HasMoreTokens())
{ {
if ((index = m_Faces.Index(tk.GetNextToken())) != wxNOT_FOUND) if ((index = m_Faces.Index(tk.GetNextToken())) != wxNOT_FOUND)
{ {
m_WParser->SetFontFace(m_Faces[index]); m_WParser->SetFontFace(m_Faces[index]);
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont())); m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
break; break;
} }
} }
} }
ParseInner(tag); ParseInner(tag);
if (oldface != m_WParser->GetFontFace()) if (oldface != m_WParser->GetFontFace())
{ {
m_WParser->SetFontFace(oldface); m_WParser->SetFontFace(oldface);
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont())); m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
} }
if (oldsize != m_WParser->GetFontSize()) if (oldsize != m_WParser->GetFontSize())
{ {
m_WParser->SetFontSize(oldsize); m_WParser->SetFontSize(oldsize);
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont())); m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
} }
if (oldclr != m_WParser->GetActualColor()) if (oldclr != m_WParser->GetActualColor())
{ {
m_WParser->SetActualColor(oldclr); m_WParser->SetActualColor(oldclr);
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr)); m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr));
} }
@@ -232,7 +231,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
else if (tag.GetName() == wxT("H3")) else if (tag.GetName() == wxT("H3"))
m_WParser->SetFontSize(5); m_WParser->SetFontSize(5);
else if (tag.GetName() == wxT("H4")) else if (tag.GetName() == wxT("H4"))
{ {
m_WParser->SetFontSize(5); m_WParser->SetFontSize(5);
m_WParser->SetFontItalic(TRUE); m_WParser->SetFontItalic(TRUE);
m_WParser->SetFontBold(FALSE); m_WParser->SetFontBold(FALSE);
@@ -240,7 +239,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
else if (tag.GetName() == wxT("H5")) else if (tag.GetName() == wxT("H5"))
m_WParser->SetFontSize(4); m_WParser->SetFontSize(4);
else if (tag.GetName() == wxT("H6")) else if (tag.GetName() == wxT("H6"))
{ {
m_WParser->SetFontSize(4); m_WParser->SetFontSize(4);
m_WParser->SetFontItalic(TRUE); m_WParser->SetFontItalic(TRUE);
m_WParser->SetFontBold(FALSE); m_WParser->SetFontBold(FALSE);
@@ -248,7 +247,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
c = m_WParser->GetContainer(); c = m_WParser->GetContainer();
if (c->GetFirstCell()) if (c->GetFirstCell())
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
c = m_WParser->GetContainer(); c = m_WParser->GetContainer();

View File

@@ -21,11 +21,11 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/brush.h"
#include "wx/pen.h"
#include "wx/dc.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h" #include "wx/html/m_templ.h"

View File

@@ -21,13 +21,12 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/dc.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h" #include "wx/html/m_templ.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
@@ -94,7 +93,7 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
r = coords[ 2 ]; r = coords[ 2 ];
b = coords[ 3 ]; b = coords[ 3 ];
if (x >= l && x <= r && y >= t && y <= b) if (x >= l && x <= r && y >= t && y <= b)
{ {
return m_Link; return m_Link;
} }
break; break;
@@ -109,7 +108,7 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
r = coords[ 2 ]; r = coords[ 2 ];
d = sqrt( (double) (((x - l) * (x - l)) + ((y - t) * (y - t))) ); d = sqrt( (double) (((x - l) * (x - l)) + ((y - t) * (y - t))) );
if (d < (double)r) if (d < (double)r)
{ {
return m_Link; return m_Link;
} }
} }
@@ -117,7 +116,7 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
case POLY: case POLY:
{ {
if (coords.GetCount() >= 6) if (coords.GetCount() >= 6)
{ {
int intersects = 0; int intersects = 0;
int wherex = x; int wherex = x;
int wherey = y; int wherey = y;
@@ -129,13 +128,13 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
int pointer = 1; int pointer = 1;
if ((yval >= wherey) != (coords[pointer] >= wherey)) if ((yval >= wherey) != (coords[pointer] >= wherey))
{ {
if ((xval >= wherex) == (coords[0] >= wherex)) if ((xval >= wherex) == (coords[0] >= wherex))
{ {
intersects += (xval >= wherex) ? 1 : 0; intersects += (xval >= wherex) ? 1 : 0;
} }
else else
{ {
intersects += ((xval - (yval - wherey) * intersects += ((xval - (yval - wherey) *
(coords[0] - xval) / (coords[0] - xval) /
(coords[pointer] - yval)) >= wherex) ? 1 : 0; (coords[pointer] - yval)) >= wherex) ? 1 : 0;
@@ -143,48 +142,48 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
} }
while (pointer < end) while (pointer < end)
{ {
yval = coords[pointer]; yval = coords[pointer];
pointer += 2; pointer += 2;
if (yval >= wherey) if (yval >= wherey)
{ {
while ((pointer < end) && (coords[pointer] >= wherey)) while ((pointer < end) && (coords[pointer] >= wherey))
{ {
pointer += 2; pointer += 2;
} }
if (pointer >= end) if (pointer >= end)
{ {
break; break;
} }
if ((coords[pointer - 3] >= wherex) == if ((coords[pointer - 3] >= wherex) ==
(coords[pointer - 1] >= wherex)) { (coords[pointer - 1] >= wherex)) {
intersects += (coords[pointer - 3] >= wherex) ? 1 : 0; intersects += (coords[pointer - 3] >= wherex) ? 1 : 0;
} }
else else
{ {
intersects += intersects +=
((coords[pointer - 3] - (coords[pointer - 2] - wherey) * ((coords[pointer - 3] - (coords[pointer - 2] - wherey) *
(coords[pointer - 1] - coords[pointer - 3]) / (coords[pointer - 1] - coords[pointer - 3]) /
(coords[pointer] - coords[pointer - 2])) >= wherex) ? 1 : 0; (coords[pointer] - coords[pointer - 2])) >= wherex) ? 1 : 0;
} }
} }
else else
{ {
while ((pointer < end) && (coords[pointer] < wherey)) while ((pointer < end) && (coords[pointer] < wherey))
{ {
pointer += 2; pointer += 2;
} }
if (pointer >= end) if (pointer >= end)
{ {
break; break;
} }
if ((coords[pointer - 3] >= wherex) == if ((coords[pointer - 3] >= wherex) ==
(coords[pointer - 1] >= wherex)) (coords[pointer - 1] >= wherex))
{ {
intersects += (coords[pointer - 3] >= wherex) ? 1 : 0; intersects += (coords[pointer - 3] >= wherex) ? 1 : 0;
} }
else else
{ {
intersects += intersects +=
((coords[pointer - 3] - (coords[pointer - 2] - wherey) * ((coords[pointer - 3] - (coords[pointer - 2] - wherey) *
(coords[pointer - 1] - coords[pointer - 3]) / (coords[pointer - 1] - coords[pointer - 3]) /
@@ -193,7 +192,7 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
} }
} }
if ((intersects & 1) != 0) if ((intersects & 1) != 0)
{ {
return m_Link; return m_Link;
} }
} }
@@ -309,11 +308,11 @@ wxHtmlImageCell::wxHtmlImageCell(wxFSFile *input, int w, int h, double scale, in
m_Height = (int)(scale * (double)bh); m_Height = (int)(scale * (double)bh);
if ((bw != ww) || (bh != hh)) if ((bw != ww) || (bh != hh))
{ {
wxImage img2 = img->Scale(bw, bh); wxImage img2 = img->Scale(bw, bh);
m_Image = new wxBitmap(img2.ConvertToBitmap()); m_Image = new wxBitmap(img2.ConvertToBitmap());
} }
else else
m_Image = new wxBitmap(img->ConvertToBitmap()); m_Image = new wxBitmap(img->ConvertToBitmap());
delete img; delete img;
} }
@@ -363,14 +362,14 @@ wxHtmlLinkInfo *wxHtmlImageCell::GetLink( int x, int y ) const
wxHtmlContainerCell *p, *op; wxHtmlContainerCell *p, *op;
op = p = GetParent(); op = p = GetParent();
while (p) while (p)
{ {
op = p; op = p;
p = p->GetParent(); p = p->GetParent();
} }
p = op; p = op;
wxHtmlCell *cell = (wxHtmlCell*)p->Find( wxHTML_COND_ISIMAGEMAP, (const void*)(&m_MapName)); wxHtmlCell *cell = (wxHtmlCell*)p->Find( wxHTML_COND_ISIMAGEMAP, (const void*)(&m_MapName));
if (!cell) if (!cell)
{ {
((wxString&)m_MapName).Clear(); ((wxString&)m_MapName).Clear();
return wxHtmlCell::GetLink( x, y ); return wxHtmlCell::GetLink( x, y );
} }
@@ -394,9 +393,9 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
TAG_HANDLER_PROC(tag) TAG_HANDLER_PROC(tag)
{ {
if (tag.GetName() == wxT("IMG")) if (tag.GetName() == wxT("IMG"))
{ {
if (tag.HasParam(wxT("SRC"))) if (tag.HasParam(wxT("SRC")))
{ {
int w = -1, h = -1; int w = -1, h = -1;
int al; int al;
wxFSFile *str; wxFSFile *str;
@@ -410,7 +409,7 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
tag.GetParamAsInt(wxT("HEIGHT"), &h); tag.GetParamAsInt(wxT("HEIGHT"), &h);
al = wxHTML_ALIGN_BOTTOM; al = wxHTML_ALIGN_BOTTOM;
if (tag.HasParam(wxT("ALIGN"))) if (tag.HasParam(wxT("ALIGN")))
{ {
wxString alstr = tag.GetParam(wxT("ALIGN")); wxString alstr = tag.GetParam(wxT("ALIGN"));
alstr.MakeUpper(); // for the case alignment was in ".." alstr.MakeUpper(); // for the case alignment was in ".."
if (alstr == wxT("TEXTTOP")) if (alstr == wxT("TEXTTOP"))
@@ -419,16 +418,16 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
al = wxHTML_ALIGN_CENTER; al = wxHTML_ALIGN_CENTER;
} }
if (tag.HasParam(wxT("USEMAP"))) if (tag.HasParam(wxT("USEMAP")))
{ {
mn = tag.GetParam( wxT("USEMAP") ); mn = tag.GetParam( wxT("USEMAP") );
if (mn.GetChar(0) == wxT('#')) if (mn.GetChar(0) == wxT('#'))
{ {
mn = mn.Mid( 1 ); mn = mn.Mid( 1 );
} }
} }
wxHtmlImageCell *cel = NULL; wxHtmlImageCell *cel = NULL;
if (str) if (str)
{ {
cel = new wxHtmlImageCell(str, w, h, m_WParser->GetPixelScale(), al, mn); cel = new wxHtmlImageCell(str, w, h, m_WParser->GetPixelScale(), al, mn);
cel->SetLink(m_WParser->GetLink()); cel->SetLink(m_WParser->GetLink());
m_WParser->GetContainer()->InsertCell(cel); m_WParser->GetContainer()->InsertCell(cel);
@@ -437,11 +436,11 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
} }
} }
if (tag.GetName() == wxT("MAP")) if (tag.GetName() == wxT("MAP"))
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
if (tag.HasParam(wxT("NAME"))) if (tag.HasParam(wxT("NAME")))
{ {
wxString tmp = tag.GetParam(wxT("NAME")); wxString tmp = tag.GetParam(wxT("NAME"));
wxHtmlImageMapCell *cel = new wxHtmlImageMapCell( tmp ); wxHtmlImageMapCell *cel = new wxHtmlImageMapCell( tmp );
m_WParser->GetContainer()->InsertCell( cel ); m_WParser->GetContainer()->InsertCell( cel );
@@ -451,31 +450,31 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
m_WParser->OpenContainer(); m_WParser->OpenContainer();
} }
if (tag.GetName() == wxT("AREA")) if (tag.GetName() == wxT("AREA"))
{ {
if (tag.HasParam(wxT("SHAPE"))) if (tag.HasParam(wxT("SHAPE")))
{ {
wxString tmp = tag.GetParam(wxT("SHAPE")); wxString tmp = tag.GetParam(wxT("SHAPE"));
wxString coords = wxEmptyString; wxString coords = wxEmptyString;
tmp.MakeUpper(); tmp.MakeUpper();
wxHtmlImageMapAreaCell *cel = NULL; wxHtmlImageMapAreaCell *cel = NULL;
if (tag.HasParam(wxT("COORDS"))) if (tag.HasParam(wxT("COORDS")))
{ {
coords = tag.GetParam(wxT("COORDS")); coords = tag.GetParam(wxT("COORDS"));
} }
if (tmp == wxT("POLY")) if (tmp == wxT("POLY"))
{ {
cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::POLY, coords, m_WParser->GetPixelScale() ); cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::POLY, coords, m_WParser->GetPixelScale() );
} }
else if (tmp == wxT("CIRCLE")) else if (tmp == wxT("CIRCLE"))
{ {
cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::CIRCLE, coords, m_WParser->GetPixelScale() ); cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::CIRCLE, coords, m_WParser->GetPixelScale() );
} }
else if (tmp == wxT("RECT")) else if (tmp == wxT("RECT"))
{ {
cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::RECT, coords, m_WParser->GetPixelScale() ); cel = new wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::RECT, coords, m_WParser->GetPixelScale() );
} }
if (cel != NULL && tag.HasParam(wxT("HREF"))) if (cel != NULL && tag.HasParam(wxT("HREF")))
{ {
wxString tmp = tag.GetParam(wxT("HREF")); wxString tmp = tag.GetParam(wxT("HREF"));
wxString target = wxEmptyString; wxString target = wxEmptyString;
if (tag.HasParam(wxT("TARGET"))) target = tag.GetParam(wxT("TARGET")); if (tag.HasParam(wxT("TARGET"))) target = tag.GetParam(wxT("TARGET"));

View File

@@ -20,7 +20,6 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
@@ -37,7 +36,7 @@ TAG_HANDLER_BEGIN(P, "P")
TAG_HANDLER_PROC(tag) TAG_HANDLER_PROC(tag)
{ {
if (m_WParser->GetContainer()->GetFirstCell() != NULL) if (m_WParser->GetContainer()->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
} }
@@ -78,7 +77,7 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER")
m_WParser->SetAlign(wxHTML_ALIGN_CENTER); m_WParser->SetAlign(wxHTML_ALIGN_CENTER);
if (c->GetFirstCell() != NULL) if (c->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
} }
@@ -86,12 +85,12 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER")
c->SetAlignHor(wxHTML_ALIGN_CENTER); c->SetAlignHor(wxHTML_ALIGN_CENTER);
if (tag.HasEnding()) if (tag.HasEnding())
{ {
ParseInner(tag); ParseInner(tag);
m_WParser->SetAlign(old); m_WParser->SetAlign(old);
if (c->GetFirstCell() != NULL) if (c->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
} }
@@ -114,7 +113,7 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
int old = m_WParser->GetAlign(); int old = m_WParser->GetAlign();
wxHtmlContainerCell *c = m_WParser->GetContainer(); wxHtmlContainerCell *c = m_WParser->GetContainer();
if (c->GetFirstCell() != NULL) if (c->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
c = m_WParser->GetContainer(); c = m_WParser->GetContainer();
@@ -122,7 +121,7 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
m_WParser->SetAlign(c->GetAlignHor()); m_WParser->SetAlign(c->GetAlignHor());
} }
else else
{ {
c->SetAlign(tag); c->SetAlign(tag);
m_WParser->SetAlign(c->GetAlignHor()); m_WParser->SetAlign(c->GetAlignHor());
} }
@@ -131,7 +130,7 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
m_WParser->SetAlign(old); m_WParser->SetAlign(old);
if (c->GetFirstCell() != NULL) if (c->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
} }
@@ -151,10 +150,10 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
TAG_HANDLER_PROC(tag) TAG_HANDLER_PROC(tag)
{ {
if (m_WParser->GetWindow()) if (m_WParser->GetWindow())
{ {
wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow()); wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
if (wfr) if (wfr)
{ {
wxString title = ""; wxString title = "";
wxString *src = m_WParser->GetSource(); wxString *src = m_WParser->GetSource();
@@ -177,7 +176,7 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
wxColour clr; wxColour clr;
if (tag.GetParamAsColour(wxT("TEXT"), &clr)) if (tag.GetParamAsColour(wxT("TEXT"), &clr))
{ {
m_WParser->SetActualColor(clr); m_WParser->SetActualColor(clr);
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr)); m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr));
} }
@@ -186,7 +185,7 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
m_WParser->SetLinkColor(clr); m_WParser->SetLinkColor(clr);
if (tag.GetParamAsColour(wxT("BGCOLOR"), &clr)) if (tag.GetParamAsColour(wxT("BGCOLOR"), &clr))
{ {
m_WParser->GetContainer()->InsertCell( m_WParser->GetContainer()->InsertCell(
new wxHtmlColourCell(clr, wxHTML_CLR_BACKGROUND)); new wxHtmlColourCell(clr, wxHTML_CLR_BACKGROUND));
if (m_WParser->GetWindow() != NULL) if (m_WParser->GetWindow() != NULL)
@@ -208,12 +207,12 @@ TAG_HANDLER_BEGIN(BLOCKQUOTE, "BLOCKQUOTE")
m_WParser->CloseContainer(); m_WParser->CloseContainer();
c = m_WParser->OpenContainer(); c = m_WParser->OpenContainer();
if (c->GetAlignHor() == wxHTML_ALIGN_RIGHT) if (c->GetAlignHor() == wxHTML_ALIGN_RIGHT)
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_RIGHT); c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_RIGHT);
else else
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT); c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT);
c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP); c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
m_WParser->OpenContainer(); m_WParser->OpenContainer();
ParseInner(tag); ParseInner(tag);
c = m_WParser->CloseContainer(); c = m_WParser->CloseContainer();

View File

@@ -21,10 +21,8 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h" #include "wx/html/m_templ.h"
@@ -55,12 +53,12 @@ TAG_HANDLER_BEGIN(A, "A")
TAG_HANDLER_PROC(tag) TAG_HANDLER_PROC(tag)
{ {
if (tag.HasParam("NAME")) if (tag.HasParam("NAME"))
{ {
m_WParser->GetContainer()->InsertCell(new wxHtmlAnchorCell(tag.GetParam("NAME"))); m_WParser->GetContainer()->InsertCell(new wxHtmlAnchorCell(tag.GetParam("NAME")));
} }
if (tag.HasParam("HREF")) if (tag.HasParam("HREF"))
{ {
wxHtmlLinkInfo oldlnk = m_WParser->GetLink(); wxHtmlLinkInfo oldlnk = m_WParser->GetLink();
wxColour oldclr = m_WParser->GetActualColor(); wxColour oldclr = m_WParser->GetActualColor();
int oldund = m_WParser->GetFontUnderlined(); int oldund = m_WParser->GetFontUnderlined();

View File

@@ -21,10 +21,10 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/brush.h"
#include "wx/dc.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h" #include "wx/html/m_templ.h"
@@ -87,9 +87,9 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
// List Item: // List Item:
if (tag.GetName() == wxT("LI")) if (tag.GetName() == wxT("LI"))
{ {
if (!tag.IsEnding()) if (!tag.IsEnding())
{ {
m_WParser->GetContainer()->SetIndent(0, wxHTML_INDENT_TOP); m_WParser->GetContainer()->SetIndent(0, wxHTML_INDENT_TOP);
// this is to prevent indetation in <li><p> case // this is to prevent indetation in <li><p> case
m_WParser->CloseContainer(); m_WParser->CloseContainer();
@@ -101,7 +101,7 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
if (m_Numbering == 0) if (m_Numbering == 0)
c->InsertCell(new wxHtmlListmarkCell(m_WParser->GetDC(), m_WParser->GetActualColor())); c->InsertCell(new wxHtmlListmarkCell(m_WParser->GetDC(), m_WParser->GetActualColor()));
else else
{ {
wxString mark; wxString mark;
mark.Printf(wxT("%i."), m_Numbering); mark.Printf(wxT("%i."), m_Numbering);
c->InsertCell(new wxHtmlWordCell(mark, *(m_WParser->GetDC()))); c->InsertCell(new wxHtmlWordCell(mark, *(m_WParser->GetDC())));
@@ -121,7 +121,7 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
// Begin of List (not-numbered): "UL", "OL" // Begin of List (not-numbered): "UL", "OL"
else else
{ {
int oldnum = m_Numbering; int oldnum = m_Numbering;
if (tag.GetName() == wxT("UL")) m_Numbering = 0; if (tag.GetName() == wxT("UL")) m_Numbering = 0;
@@ -129,7 +129,7 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
c = m_WParser->GetContainer(); c = m_WParser->GetContainer();
if (c->GetFirstCell() != NULL) if (c->GetFirstCell() != NULL)
{ {
m_WParser->CloseContainer(); m_WParser->CloseContainer();
m_WParser->OpenContainer(); m_WParser->OpenContainer();
c = m_WParser->GetContainer(); c = m_WParser->GetContainer();

View File

@@ -22,7 +22,6 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/fontmap.h" #include "wx/fontmap.h"

View File

@@ -20,10 +20,8 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h" #include "wx/html/m_templ.h"

View File

@@ -20,7 +20,6 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h"
#endif #endif

View File

@@ -23,13 +23,11 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include <wx/wx.h>
#endif #endif
#include "wx/html/helpdata.h" #include "wx/html/helpdata.h"
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// wxSearchEngine // wxSearchEngine
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

View File

@@ -22,7 +22,8 @@
#endif #endif
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/intl.h"
#include "wx/dc.h"
#endif #endif
#include "wx/html/htmldefs.h" #include "wx/html/htmldefs.h"