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
#ifndef WXPRECOMP
#include "wx/wx.h"
#endif
#include "wx/filesys.h"
//--------------------------------------------------------------------------------
// wxInternetFSHandler
//--------------------------------------------------------------------------------

View File

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

View File

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

View File

@@ -16,15 +16,7 @@
#pragma interface "filedlgg.h"
#endif
#include "wx/defs.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
@@ -37,91 +29,14 @@ WXDLLEXPORT_DATA(extern const wxChar *)wxFileSelectorDefaultWildcardStr;
// classes
//-----------------------------------------------------------------------------
class wxCheckBox;
class wxChoice;
class wxFileData;
class wxFileCtrl;
class wxFileDialog;
//-----------------------------------------------------------------------------
// 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()
};
class wxListEvent;
class wxStaticText;
class wxTextCtrl;
//-------------------------------------------------------------------------
// File selector
@@ -139,7 +54,7 @@ public:
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
long style = 0,
const wxPoint& pos = wxDefaultPosition);
~wxFileDialog();
virtual ~wxFileDialog();
void SetMessage(const wxString& message) { m_message = message; }
void SetPath(const wxString& path);

View File

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

View File

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

View File

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

View File

@@ -23,30 +23,11 @@ I STRONGLY recommend reading and understanding these macros!!
#define _WX_M_TEMPL_H_
#include "wx/defs.h"
#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"
#define TAG_HANDLER_BEGIN(name,tags) \
class HTML_Handler_##name : public wxHtmlWinTagHandler \
{ \

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -26,10 +26,16 @@
#error wxFileDialog currently only supports unix
#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/debug.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/listctrl.h"
#include "wx/msgdlg.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
@@ -63,6 +69,88 @@
#include "wx/generic/deffile.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
// ----------------------------------------------------------------------------

View File

@@ -24,7 +24,8 @@
#endif
#ifndef WX_PRECOMP
#include "wx/mdi.h"
#include "wx/frame.h"
#include "wx/mdi.h"
#endif
#include "wx/laywin.h"
@@ -219,6 +220,11 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
#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.
bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow)
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -20,7 +20,6 @@
#endif
#ifndef WXPRECOMP
#include "wx/wx.h"
#endif
#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
#ifndef WXPRECOMP
#include <wx/wx.h>
#endif
#include <wx/notebook.h>
#include <wx/imaglist.h>
#include <wx/treectrl.h>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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