Source cleaning: whitespaces, tabs, -1/wxID_ANY, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,8 +35,8 @@ public:
|
|||||||
|
|
||||||
void SetTitleFormat(const wxString& format);
|
void SetTitleFormat(const wxString& format);
|
||||||
void SetTempDir(const wxString& path) { m_helpData.SetTempDir(path); }
|
void SetTempDir(const wxString& path) { m_helpData.SetTempDir(path); }
|
||||||
bool AddBook(const wxString& book_url, bool show_wait_msg = FALSE);
|
bool AddBook(const wxString& book_url, bool show_wait_msg = false);
|
||||||
bool AddBook(const wxFileName& book_file, bool show_wait_msg = FALSE);
|
bool AddBook(const wxFileName& book_file, bool show_wait_msg = false);
|
||||||
|
|
||||||
bool Display(const wxString& x);
|
bool Display(const wxString& x);
|
||||||
bool Display(int id);
|
bool Display(int id);
|
||||||
@@ -68,7 +68,7 @@ public:
|
|||||||
virtual void SetFrameParameters(const wxString& title,
|
virtual void SetFrameParameters(const wxString& title,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
bool newFrameEachTime = FALSE);
|
bool newFrameEachTime = false);
|
||||||
/// Obtains the latest settings used by the help frame and the help
|
/// Obtains the latest settings used by the help frame and the help
|
||||||
/// frame.
|
/// frame.
|
||||||
virtual wxFrame *GetFrameParameters(wxSize *size = NULL,
|
virtual wxFrame *GetFrameParameters(wxSize *size = NULL,
|
||||||
|
@@ -82,7 +82,7 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxHtmlBookRecord, wxHtmlBookRecArray,
|
|||||||
|
|
||||||
struct WXDLLIMPEXP_HTML wxHtmlHelpDataItem
|
struct WXDLLIMPEXP_HTML wxHtmlHelpDataItem
|
||||||
{
|
{
|
||||||
wxHtmlHelpDataItem() : level(0), parent(NULL), id(-1), book(NULL) {}
|
wxHtmlHelpDataItem() : level(0), parent(NULL), id(wxID_ANY), book(NULL) {}
|
||||||
|
|
||||||
short int level;
|
short int level;
|
||||||
wxHtmlHelpDataItem *parent;
|
wxHtmlHelpDataItem *parent;
|
||||||
@@ -141,7 +141,7 @@ public:
|
|||||||
virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only);
|
virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only);
|
||||||
|
|
||||||
// Scans the stream for the keyword.
|
// Scans the stream for the keyword.
|
||||||
// Returns TRUE if the stream contains keyword, fALSE otherwise
|
// Returns true if the stream contains keyword, fALSE otherwise
|
||||||
virtual bool Scan(const wxFSFile& file);
|
virtual bool Scan(const wxFSFile& file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -38,7 +38,7 @@ public:
|
|||||||
wxHtmlFilter() : wxObject() {}
|
wxHtmlFilter() : wxObject() {}
|
||||||
virtual ~wxHtmlFilter() {}
|
virtual ~wxHtmlFilter() {}
|
||||||
|
|
||||||
// returns TRUE if this filter is able to open&read given file
|
// returns true if this filter is able to open&read given file
|
||||||
virtual bool CanRead(const wxFSFile& file) const = 0;
|
virtual bool CanRead(const wxFSFile& file) const = 0;
|
||||||
|
|
||||||
// Reads given file and returns HTML document.
|
// Reads given file and returns HTML document.
|
||||||
|
@@ -74,7 +74,7 @@ public:
|
|||||||
virtual void DoneParser();
|
virtual void DoneParser();
|
||||||
|
|
||||||
// May be called during parsing to immediately return from Parse().
|
// May be called during parsing to immediately return from Parse().
|
||||||
virtual void StopParsing() { m_stopParsing = TRUE; }
|
virtual void StopParsing() { m_stopParsing = true; }
|
||||||
|
|
||||||
// Parses the m_Source from begin_pos to end_pos-1.
|
// Parses the m_Source from begin_pos to end_pos-1.
|
||||||
// (in noparams version it parses whole m_Source)
|
// (in noparams version it parses whole m_Source)
|
||||||
@@ -117,7 +117,7 @@ public:
|
|||||||
// HTML source (for example, <pre> handler replaces spaces with
|
// HTML source (for example, <pre> handler replaces spaces with
|
||||||
// and newlines with <br>)
|
// and newlines with <br>)
|
||||||
virtual void SetSourceAndSaveState(const wxString& src);
|
virtual void SetSourceAndSaveState(const wxString& src);
|
||||||
// Restores parser's state from stack or returns FALSE if the stack is
|
// Restores parser's state from stack or returns false if the stack is
|
||||||
// empty
|
// empty
|
||||||
virtual bool RestoreState();
|
virtual bool RestoreState();
|
||||||
|
|
||||||
@@ -219,8 +219,8 @@ public:
|
|||||||
|
|
||||||
// This is hadling core method. It does all the Steps 1-3.
|
// This is hadling core method. It does all the Steps 1-3.
|
||||||
// To process step 2, you can call ParseInner()
|
// To process step 2, you can call ParseInner()
|
||||||
// returned value : TRUE if it called ParseInner(),
|
// returned value : true if it called ParseInner(),
|
||||||
// FALSE etherwise
|
// false etherwise
|
||||||
virtual bool HandleTag(const wxHtmlTag& tag) = 0;
|
virtual bool HandleTag(const wxHtmlTag& tag) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -40,7 +40,7 @@ class WXDLLIMPEXP_HTML wxHtmlProcessor : public wxObject
|
|||||||
DECLARE_ABSTRACT_CLASS(wxHtmlProcessor)
|
DECLARE_ABSTRACT_CLASS(wxHtmlProcessor)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxHtmlProcessor() : wxObject(), m_enabled(TRUE) {}
|
wxHtmlProcessor() : wxObject(), m_enabled(true) {}
|
||||||
virtual ~wxHtmlProcessor() {}
|
virtual ~wxHtmlProcessor() {}
|
||||||
|
|
||||||
// Process input text and return processed result
|
// Process input text and return processed result
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
// Enable/disable the processor. wxHtmlWindow won't use a disabled
|
// Enable/disable the processor. wxHtmlWindow won't use a disabled
|
||||||
// processor even if it is in its processors queue.
|
// processor even if it is in its processors queue.
|
||||||
virtual void Enable(bool enable = TRUE) { m_enabled = enable; }
|
virtual void Enable(bool enable = true) { m_enabled = enable; }
|
||||||
bool IsEnabled() const { return m_enabled; }
|
bool IsEnabled() const { return m_enabled; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -87,17 +87,17 @@ public:
|
|||||||
// Returns tag's name in uppercase.
|
// Returns tag's name in uppercase.
|
||||||
inline wxString GetName() const {return m_Name;}
|
inline wxString GetName() const {return m_Name;}
|
||||||
|
|
||||||
// Returns TRUE if the tag has given parameter. Parameter
|
// Returns true if the tag has given parameter. Parameter
|
||||||
// should always be in uppercase.
|
// should always be in uppercase.
|
||||||
// Example : <IMG SRC="test.jpg"> HasParam("SRC") returns TRUE
|
// Example : <IMG SRC="test.jpg"> HasParam("SRC") returns true
|
||||||
bool HasParam(const wxString& par) const;
|
bool HasParam(const wxString& par) const;
|
||||||
|
|
||||||
// Returns value of the param. Value is in uppercase unless it is
|
// Returns value of the param. Value is in uppercase unless it is
|
||||||
// enclosed with "
|
// enclosed with "
|
||||||
// Example : <P align=right> GetParam("ALIGN") returns (RIGHT)
|
// Example : <P align=right> GetParam("ALIGN") returns (RIGHT)
|
||||||
// <P IMG SRC="WhaT.jpg"> GetParam("SRC") returns (WhaT.jpg)
|
// <P IMG SRC="WhaT.jpg"> GetParam("SRC") returns (WhaT.jpg)
|
||||||
// (or ("WhaT.jpg") if with_commas == TRUE)
|
// (or ("WhaT.jpg") if with_commas == true)
|
||||||
wxString GetParam(const wxString& par, bool with_commas = FALSE) const;
|
wxString GetParam(const wxString& par, bool with_commas = false) const;
|
||||||
|
|
||||||
// Convenience functions:
|
// Convenience functions:
|
||||||
bool GetParamAsColour(const wxString& par, wxColour *clr) const;
|
bool GetParamAsColour(const wxString& par, wxColour *clr) const;
|
||||||
@@ -105,7 +105,7 @@ public:
|
|||||||
|
|
||||||
// Scans param like scanf() functions family does.
|
// Scans param like scanf() functions family does.
|
||||||
// Example : ScanParam("COLOR", "\"#%X\"", &clr);
|
// Example : ScanParam("COLOR", "\"#%X\"", &clr);
|
||||||
// This is always with with_commas=FALSE
|
// This is always with with_commas=false
|
||||||
// Returns number of scanned values
|
// Returns number of scanned values
|
||||||
// (like sscanf() does)
|
// (like sscanf() does)
|
||||||
// NOTE: unlike scanf family, this function only accepts
|
// NOTE: unlike scanf family, this function only accepts
|
||||||
@@ -116,12 +116,12 @@ public:
|
|||||||
wxString GetAllParams() const;
|
wxString GetAllParams() const;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_2
|
#if WXWIN_COMPATIBILITY_2_2
|
||||||
// return TRUE if this is ending tag (</something>) or FALSE
|
// return true if this is ending tag (</something>) or false
|
||||||
// if it isn't (<something>)
|
// if it isn't (<something>)
|
||||||
inline bool IsEnding() const {return FALSE;}
|
inline bool IsEnding() const {return false;}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// return TRUE if this there is matching ending tag
|
// return true if this there is matching ending tag
|
||||||
inline bool HasEnding() const {return m_End1 >= 0;}
|
inline bool HasEnding() const {return m_End1 >= 0;}
|
||||||
|
|
||||||
// returns beginning position of _internal_ block of text
|
// returns beginning position of _internal_ block of text
|
||||||
|
@@ -68,7 +68,7 @@ class WXDLLIMPEXP_HTML wxHtmlWindow : public wxScrolledWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
wxHtmlWindow() { Init(); }
|
wxHtmlWindow() { Init(); }
|
||||||
wxHtmlWindow(wxWindow *parent, wxWindowID id = -1,
|
wxHtmlWindow(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxHW_DEFAULT_STYLE,
|
long style = wxHW_DEFAULT_STYLE,
|
||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
}
|
}
|
||||||
~wxHtmlWindow();
|
~wxHtmlWindow();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id = -1,
|
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||||
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,
|
||||||
@@ -88,7 +88,7 @@ public:
|
|||||||
// Set HTML page and display it. !! source is HTML document itself,
|
// Set HTML page and display it. !! source is HTML document itself,
|
||||||
// it is NOT address/filename of HTML document. If you want to
|
// it is NOT address/filename of HTML document. If you want to
|
||||||
// specify document location, use LoadPage() istead
|
// specify document location, use LoadPage() istead
|
||||||
// Return value : FALSE if an error occured, TRUE otherwise
|
// Return value : false if an error occured, true otherwise
|
||||||
bool SetPage(const wxString& source);
|
bool SetPage(const wxString& source);
|
||||||
|
|
||||||
// Append to current page
|
// Append to current page
|
||||||
@@ -147,7 +147,7 @@ public:
|
|||||||
virtual void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
|
virtual void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
|
||||||
|
|
||||||
// Goes to previous/next page (in browsing history)
|
// Goes to previous/next page (in browsing history)
|
||||||
// Returns TRUE if successful, FALSE otherwise
|
// Returns true if successful, false otherwise
|
||||||
bool HistoryBack();
|
bool HistoryBack();
|
||||||
bool HistoryForward();
|
bool HistoryForward();
|
||||||
bool HistoryCanBack();
|
bool HistoryCanBack();
|
||||||
@@ -192,7 +192,7 @@ public:
|
|||||||
|
|
||||||
// Called when wxHtmlWindow wants to fetch data from an URL (e.g. when
|
// Called when wxHtmlWindow wants to fetch data from an URL (e.g. when
|
||||||
// loading a page or loading an image). The data are downloaded if and only if
|
// loading a page or loading an image). The data are downloaded if and only if
|
||||||
// OnOpeningURL returns TRUE. If OnOpeningURL returns wxHTML_REDIRECT,
|
// OnOpeningURL returns true. If OnOpeningURL returns wxHTML_REDIRECT,
|
||||||
// it must set *redirect to the new URL
|
// it must set *redirect to the new URL
|
||||||
virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType WXUNUSED(type),
|
virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType WXUNUSED(type),
|
||||||
const wxString& WXUNUSED(url),
|
const wxString& WXUNUSED(url),
|
||||||
@@ -221,7 +221,7 @@ protected:
|
|||||||
// Scrolls to anchor of this name. (Anchor is #news
|
// Scrolls to anchor of this name. (Anchor is #news
|
||||||
// or #features etc. it is part of address sometimes:
|
// or #features etc. it is part of address sometimes:
|
||||||
// http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/index.html#news)
|
// http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/index.html#news)
|
||||||
// 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
|
||||||
@@ -328,7 +328,7 @@ private:
|
|||||||
wxHtmlCell *m_tmpSelFromCell;
|
wxHtmlCell *m_tmpSelFromCell;
|
||||||
|
|
||||||
// a flag indicated if mouse moved
|
// a flag indicated if mouse moved
|
||||||
// (if TRUE we will try to change cursor in last call to OnIdle)
|
// (if true we will try to change cursor in last call to OnIdle)
|
||||||
bool m_tmpMouseMoved;
|
bool m_tmpMouseMoved;
|
||||||
// contains last link name
|
// contains last link name
|
||||||
wxHtmlLinkInfo *m_tmpLastLink;
|
wxHtmlLinkInfo *m_tmpLastLink;
|
||||||
|
@@ -52,9 +52,9 @@ public:
|
|||||||
// Sets the text to be displayed.
|
// Sets the text to be displayed.
|
||||||
// Basepath is base directory (html string would be stored there if it was in
|
// Basepath is base directory (html string would be stored there if it was in
|
||||||
// file). It is used to determine path for loading images, for example.
|
// file). It is used to determine path for loading images, for example.
|
||||||
// isdir is FALSE if basepath is filename, TRUE if it is directory name
|
// isdir is false if basepath is filename, true if it is directory name
|
||||||
// (see wxFileSystem for detailed explanation)
|
// (see wxFileSystem for detailed explanation)
|
||||||
void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = TRUE);
|
void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true);
|
||||||
|
|
||||||
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||||
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
|
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
|
||||||
@@ -123,13 +123,13 @@ public:
|
|||||||
wxHtmlPrintout(const wxString& title = wxT("Printout"));
|
wxHtmlPrintout(const wxString& title = wxT("Printout"));
|
||||||
~wxHtmlPrintout();
|
~wxHtmlPrintout();
|
||||||
|
|
||||||
void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = TRUE);
|
void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = true);
|
||||||
// prepares the class for printing this html document.
|
// prepares the class for printing this html document.
|
||||||
// Must be called before using the class, in fact just after constructor
|
// Must be called before using the class, in fact just after constructor
|
||||||
//
|
//
|
||||||
// basepath is base directory (html string would be stored there if it was in
|
// basepath is base directory (html string would be stored there if it was in
|
||||||
// file). It is used to determine path for loading images, for example.
|
// file). It is used to determine path for loading images, for example.
|
||||||
// isdir is FALSE if basepath is filename, TRUE if it is directory name
|
// isdir is false if basepath is filename, true if it is directory name
|
||||||
// (see wxFileSystem for detailed explanation)
|
// (see wxFileSystem for detailed explanation)
|
||||||
|
|
||||||
void SetHtmlFile(const wxString &htmlfile);
|
void SetHtmlFile(const wxString &htmlfile);
|
||||||
|
@@ -118,13 +118,13 @@ protected:
|
|||||||
typedef void (wxEvtHandler::*wxWebKitStateChangedEventFunction)(wxWebKitStateChangedEvent&);
|
typedef void (wxEvtHandler::*wxWebKitStateChangedEventFunction)(wxWebKitStateChangedEvent&);
|
||||||
|
|
||||||
BEGIN_DECLARE_EVENT_TYPES()
|
BEGIN_DECLARE_EVENT_TYPES()
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_WEBKIT_STATE_CHANGED, -1)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_WEBKIT_STATE_CHANGED, wxID_ANY)
|
||||||
END_DECLARE_EVENT_TYPES()
|
END_DECLARE_EVENT_TYPES()
|
||||||
|
|
||||||
#define EVT_WEBKIT_STATE_CHANGED(func) \
|
#define EVT_WEBKIT_STATE_CHANGED(func) \
|
||||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \
|
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \
|
||||||
-1, \
|
wxID_ANY, \
|
||||||
-1, \
|
wxID_ANY, \
|
||||||
(wxObjectEventFunction) \
|
(wxObjectEventFunction) \
|
||||||
(wxWebKitStateChangedEventFunction) & func, \
|
(wxWebKitStateChangedEventFunction) & func, \
|
||||||
(wxObject *) NULL ),
|
(wxObject *) NULL ),
|
||||||
|
@@ -154,7 +154,7 @@ private:
|
|||||||
wxHtmlContainerCell *m_Container;
|
wxHtmlContainerCell *m_Container;
|
||||||
// current container. See Open/CloseContainer for details.
|
// current container. See Open/CloseContainer for details.
|
||||||
|
|
||||||
int m_FontBold, m_FontItalic, m_FontUnderlined, m_FontFixed; // this is not TRUE,FALSE but 1,0, we need it for indexing
|
int m_FontBold, m_FontItalic, m_FontUnderlined, m_FontFixed; // this is not true,false but 1,0, we need it for indexing
|
||||||
int m_FontSize; /* -2 to +4, 0 is default */
|
int m_FontSize; /* -2 to +4, 0 is default */
|
||||||
wxColour m_LinkColor;
|
wxColour m_LinkColor;
|
||||||
wxColour m_ActualColor;
|
wxColour m_ActualColor;
|
||||||
@@ -162,7 +162,7 @@ private:
|
|||||||
wxHtmlLinkInfo m_Link;
|
wxHtmlLinkInfo m_Link;
|
||||||
// actual hypertext link or empty string
|
// actual hypertext link or empty string
|
||||||
bool m_UseLink;
|
bool m_UseLink;
|
||||||
// TRUE if m_Link is not empty
|
// true if m_Link is not empty
|
||||||
long m_CharHeight, m_CharWidth;
|
long m_CharHeight, m_CharWidth;
|
||||||
// average height of normal-sized text
|
// average height of normal-sized text
|
||||||
int m_Align;
|
int m_Align;
|
||||||
|
Reference in New Issue
Block a user