From 6953da00886c52a9e1d9183e1f1f27e75843cfa4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 27 Sep 2004 19:06:39 +0000 Subject: [PATCH] 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 --- include/wx/html/helpctrl.h | 6 +++--- include/wx/html/helpdata.h | 16 +++++++------- include/wx/html/helpfrm.h | 2 +- include/wx/html/htmlcell.h | 44 +++++++++++++++++++------------------- include/wx/html/htmldefs.h | 4 ++-- include/wx/html/htmlfilt.h | 2 +- include/wx/html/htmlpars.h | 40 +++++++++++++++++----------------- include/wx/html/htmlproc.h | 12 +++++------ include/wx/html/htmltag.h | 16 +++++++------- include/wx/html/htmlwin.h | 24 ++++++++++----------- include/wx/html/htmprint.h | 26 +++++++++++----------- include/wx/html/webkit.h | 12 +++++------ include/wx/html/winpars.h | 8 +++---- 13 files changed, 106 insertions(+), 106 deletions(-) diff --git a/include/wx/html/helpctrl.h b/include/wx/html/helpctrl.h index 06e6bdc7ee..8514d2e705 100644 --- a/include/wx/html/helpctrl.h +++ b/include/wx/html/helpctrl.h @@ -35,8 +35,8 @@ public: void SetTitleFormat(const wxString& format); void SetTempDir(const wxString& path) { m_helpData.SetTempDir(path); } - 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 wxString& book_url, bool show_wait_msg = false); + bool AddBook(const wxFileName& book_file, bool show_wait_msg = false); bool Display(const wxString& x); bool Display(int id); @@ -68,7 +68,7 @@ public: virtual void SetFrameParameters(const wxString& title, const wxSize& size, const wxPoint& pos = wxDefaultPosition, - bool newFrameEachTime = FALSE); + bool newFrameEachTime = false); /// Obtains the latest settings used by the help frame and the help /// frame. virtual wxFrame *GetFrameParameters(wxSize *size = NULL, diff --git a/include/wx/html/helpdata.h b/include/wx/html/helpdata.h index 62cb773938..ff2feb6ab5 100644 --- a/include/wx/html/helpdata.h +++ b/include/wx/html/helpdata.h @@ -35,7 +35,7 @@ class WXDLLIMPEXP_HTML wxHtmlHelpData; class WXDLLIMPEXP_HTML wxHtmlBookRecord { public: - wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath, + wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath, const wxString& title, const wxString& start) { m_BookFile = bookfile; @@ -62,8 +62,8 @@ public: void SetBasePath(const wxString& path) { m_BasePath = path; } void SetStart(const wxString& start) { m_Start = start; } - // returns full filename of page (which is part of the book), - // i.e. with book's basePath prepended. If page is already absolute + // returns full filename of page (which is part of the book), + // i.e. with book's basePath prepended. If page is already absolute // path, basePath is _not_ prepended. wxString GetFullPath(const wxString &page) const; @@ -82,7 +82,7 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxHtmlBookRecord, wxHtmlBookRecArray, 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; wxHtmlHelpDataItem *parent; @@ -90,7 +90,7 @@ struct WXDLLIMPEXP_HTML wxHtmlHelpDataItem wxString name; wxString page; wxHtmlBookRecord *book; - + // returns full filename of m_Page, i.e. with book's basePath prepended wxString GetFullPath() const { return book->GetFullPath(page); } @@ -115,7 +115,7 @@ struct wxHtmlContentsItem wxChar *m_Name; wxChar *m_Page; wxHtmlBookRecord *m_Book; - + // returns full filename of m_Page, i.e. with book's basePath prepended wxString GetFullPath() const { return m_Book->GetFullPath(m_Page); } @@ -141,7 +141,7 @@ public: virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only); // Scans the stream for the keyword. - // Returns TRUE if the stream contains keyword, fALSE otherwise + // Returns true if the stream contains keyword, fALSE otherwise virtual bool Scan(const wxFSFile& file); private: @@ -243,7 +243,7 @@ protected: wxHtmlHelpDataItems m_contents; // list of all available books and pages wxHtmlHelpDataItems m_index; // list of index itesm - + #if WXWIN_COMPATIBILITY_2_4 // deprecated data structures, set only if GetContents(), GetIndex() // called diff --git a/include/wx/html/helpfrm.h b/include/wx/html/helpfrm.h index 8ab577fee1..255739841b 100644 --- a/include/wx/html/helpfrm.h +++ b/include/wx/html/helpfrm.h @@ -243,7 +243,7 @@ protected: private: void DisplayIndexItem(const wxHtmlHelpMergedIndexItem *it); wxHtmlHelpMergedIndex *m_mergedIndex; - + DECLARE_EVENT_TABLE() DECLARE_NO_COPY_CLASS(wxHtmlHelpFrame) }; diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h index 4bc6bb4f4d..046fb2085e 100644 --- a/include/wx/html/htmlcell.h +++ b/include/wx/html/htmlcell.h @@ -36,7 +36,7 @@ class WXDLLIMPEXP_HTML wxHtmlContainerCell; class WXDLLIMPEXP_HTML wxHtmlSelection { public: - wxHtmlSelection() + wxHtmlSelection() : m_fromPos(wxDefaultPosition), m_toPos(wxDefaultPosition), m_fromPrivPos(wxDefaultPosition), m_toPrivPos(wxDefaultPosition), m_fromCell(NULL), m_toCell(NULL) {} @@ -44,14 +44,14 @@ public: void Set(const wxPoint& fromPos, const wxHtmlCell *fromCell, const wxPoint& toPos, const wxHtmlCell *toCell); void Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell); - + const wxHtmlCell *GetFromCell() const { return m_fromCell; } const wxHtmlCell *GetToCell() const { return m_toCell; } - + // these values are in absolute coordinates: const wxPoint& GetFromPos() const { return m_fromPos; } const wxPoint& GetToPos() const { return m_toPos; } - + // these are From/ToCell's private data const wxPoint& GetFromPrivPos() const { return m_fromPrivPos; } const wxPoint& GetToPrivPos() const { return m_toPrivPos; } @@ -59,8 +59,8 @@ public: void SetToPrivPos(const wxPoint& pos) { m_toPrivPos = pos; } void ClearPrivPos() { m_toPrivPos = m_fromPrivPos = wxDefaultPosition; } - bool IsEmpty() const - { return m_fromPos == wxDefaultPosition && + bool IsEmpty() const + { return m_fromPos == wxDefaultPosition && m_toPos == wxDefaultPosition; } private: @@ -85,14 +85,14 @@ class WXDLLIMPEXP_HTML wxHtmlRenderingState public: wxHtmlRenderingState() : m_selState(wxHTML_SEL_OUT) {} - void SetSelectionState(wxHtmlSelectionState s) { m_selState = s; } + void SetSelectionState(wxHtmlSelectionState s) { m_selState = s; } wxHtmlSelectionState GetSelectionState() const { return m_selState; } void SetFgColour(const wxColour& c) { m_fgColour = c; } const wxColour& GetFgColour() const { return m_fgColour; } void SetBgColour(const wxColour& c) { m_bgColour = c; } const wxColour& GetBgColour() const { return m_bgColour; } - + private: wxHtmlSelectionState m_selState; wxColour m_fgColour, m_bgColour; @@ -127,12 +127,12 @@ public: void SetSelection(wxHtmlSelection *s) { m_selection = s; } wxHtmlSelection *GetSelection() const { return m_selection; } - + void SetStyle(wxHtmlRenderingStyle *style) { m_style = style; } wxHtmlRenderingStyle& GetStyle() { return *m_style; } wxHtmlRenderingState& GetState() { return m_state; } - + protected: wxHtmlSelection *m_selection; wxHtmlRenderingStyle *m_style; @@ -172,7 +172,7 @@ public: int GetPosX() const {return m_PosX;} int GetPosY() const {return m_PosY;} int GetWidth() const {return m_Width;} - + // Returns the maximum possible length of the cell. // Call Layout at least once before using GetMaxTotalWidth() virtual int GetMaxTotalWidth() const { return m_Width; } @@ -259,7 +259,7 @@ public: // Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default // is true - the cell can be split on two pages void SetCanLiveOnPagebreak(bool can) { m_CanLiveOnPagebreak = can; } - + // Can the line be broken before this cell? virtual bool IsLinebreakAllowed() const { return !IsFormattingCell(); } @@ -281,20 +281,20 @@ public: // Returns first (last) terminal cell inside this cell. It may return NULL, // but it is rare -- only if there are no terminals in the tree. - virtual wxHtmlCell *GetFirstTerminal() const + virtual wxHtmlCell *GetFirstTerminal() const { return wxConstCast(this, wxHtmlCell); } - virtual wxHtmlCell *GetLastTerminal() const + virtual wxHtmlCell *GetLastTerminal() const { return wxConstCast(this, wxHtmlCell); } // Returns cell's depth, i.e. how far under the root cell it is // (if it is the root, depth is 0) unsigned GetDepth() const; - + // Returns true if the cell appears before 'cell' in natural order of // cells (= as they are read). If cell A is (grand)parent of cell B, // then both A.IsBefore(B) and B.IsBefore(A) always return true. bool IsBefore(wxHtmlCell *cell) const; - + // Converts the cell into text representation. If sel != NULL then // only part of the cell inside the selection is converted. virtual wxString ConvertToText(wxHtmlSelection *WXUNUSED(sel)) const @@ -351,7 +351,7 @@ protected: void Split(wxDC& dc, const wxPoint& selFrom, const wxPoint& selTo, unsigned& pos1, unsigned& pos2) const; - + wxString m_Word; bool m_allowLinebreak; @@ -424,11 +424,11 @@ public: virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y, unsigned flags = wxHTML_FIND_EXACT) const; - + virtual wxHtmlCell *GetFirstTerminal() const; virtual wxHtmlCell *GetLastTerminal() const; - - + + // Removes indentation on top or bottom of the container (i.e. above or // below first/last terminal cell). For internal use only. void RemoveExtraSpacing(bool top, bool bottom); @@ -442,7 +442,7 @@ protected: wxHtmlCell *cell) const; void UpdateRenderingStatePost(wxHtmlRenderingInfo& info, wxHtmlCell *cell) const; - + protected: int m_IndentLeft, m_IndentRight, m_IndentTop, m_IndentBottom; // indentation of subcells. There is always m_Indent pixels @@ -469,7 +469,7 @@ protected: int m_MaxTotalWidth; // Maximum possible length if ignoring line wrap - + DECLARE_ABSTRACT_CLASS(wxHtmlContainerCell) DECLARE_NO_COPY_CLASS(wxHtmlContainerCell) }; diff --git a/include/wx/html/htmldefs.h b/include/wx/html/htmldefs.h index 38f74088d4..26edbeee4b 100644 --- a/include/wx/html/htmldefs.h +++ b/include/wx/html/htmldefs.h @@ -75,11 +75,11 @@ #define wxHTML_COND_ISANCHOR 1 // Finds the anchor of 'param' name (pointer to wxString). - + #define wxHTML_COND_ISIMAGEMAP 2 // Finds imagemap of 'param' name (pointer to wxString). // (used exclusively by m_image.cpp) - + #define wxHTML_COND_USER 10000 // User-defined conditions should start from this number diff --git a/include/wx/html/htmlfilt.h b/include/wx/html/htmlfilt.h index 2bb0943877..83f10d3f88 100644 --- a/include/wx/html/htmlfilt.h +++ b/include/wx/html/htmlfilt.h @@ -38,7 +38,7 @@ public: wxHtmlFilter() : wxObject() {} 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; // Reads given file and returns HTML document. diff --git a/include/wx/html/htmlpars.h b/include/wx/html/htmlpars.h index 29b41ec567..d0392418b2 100644 --- a/include/wx/html/htmlpars.h +++ b/include/wx/html/htmlpars.h @@ -57,7 +57,7 @@ public: wxFileSystem* GetFS() const { return m_FS; } // Opens file if the parser is allowed to open given URL (may be forbidden - // for security reasons) + // for security reasons) virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const; // You can simply call this method when you need parsed output. @@ -72,9 +72,9 @@ public: virtual void InitParser(const wxString& source); // This must be called after Parse(). virtual void DoneParser(); - + // May be called during parsing to immediately return from Parse(). - virtual void StopParsing() { m_stopParsing = TRUE; } + virtual void StopParsing() { m_stopParsing = true; } // Parses the m_Source from begin_pos to end_pos-1. // (in noparams version it parses whole m_Source) @@ -93,7 +93,7 @@ public: // adds handler to the list & hash table of handlers. virtual void AddTagHandler(wxHtmlTagHandler *handler); - // Forces the handler to handle additional tags (not returned by GetSupportedTags). + // Forces the handler to handle additional tags (not returned by GetSupportedTags). // The handler should already be in use by this parser. // Example: you want to parse following pseudo-html structure: // @@ -111,21 +111,21 @@ public: wxString* GetSource() {return &m_Source;} void SetSource(const wxString& src); - + // Sets HTML source and remebers current parser's state so that it can - // later be restored. This is useful for on-line modifications of + // later be restored. This is useful for on-line modifications of // HTML source (for example,
 handler replaces spaces with  
     // and newlines with 
) 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 virtual bool RestoreState(); - + // Parses HTML string 'markup' and extracts charset info from tag // if present. Returns empty string if the tag is missing. // For wxHTML's internal use. static wxString ExtractCharsetInformation(const wxString& markup); - + // Returns entity parser object, used to substitute HTML &entities; wxHtmlEntitiesParser *GetEntitiesParser() const { return m_entitiesParser; } @@ -134,7 +134,7 @@ protected: void CreateDOMTree(); void DestroyDOMTree(); void CreateDOMSubTree(wxHtmlTag *cur, - int begin_pos, int end_pos, + int begin_pos, int end_pos, wxHtmlTagsCache *cache); // Adds text to the output. @@ -159,9 +159,9 @@ protected: size_t m_CurTextPiece; wxString m_Source; - + wxHtmlParserState *m_SavedStates; - + // handlers that handle particular tags. The table is accessed by // key = tag's name. // This attribute MUST be filled by derived class otherwise it would @@ -180,10 +180,10 @@ protected: wxFileSystem *m_FS; // handlers stack used by PushTagHandler and PopTagHandler wxList *m_HandlersStack; - + // entity parse wxHtmlEntitiesParser *m_entitiesParser; - + // flag indicating that the parser should stop bool m_stopParsing; }; @@ -208,7 +208,7 @@ public: // NOTE : each _instance_ of handler is guaranteed to be called // only by one parser. This means you don't have to care about // reentrancy. - virtual void SetParser(wxHtmlParser *parser) + virtual void SetParser(wxHtmlParser *parser) { m_Parser = parser; } // Returns list of supported tags. The list is in uppercase and @@ -219,14 +219,14 @@ public: // This is hadling core method. It does all the Steps 1-3. // To process step 2, you can call ParseInner() - // returned value : TRUE if it called ParseInner(), - // FALSE etherwise + // returned value : true if it called ParseInner(), + // false etherwise virtual bool HandleTag(const wxHtmlTag& tag) = 0; protected: // parses input between beginning and ending tag. // m_Parser must be set. - void ParseInner(const wxHtmlTag& tag) + void ParseInner(const wxHtmlTag& tag) { m_Parser->DoParsing(tag.GetBeginPos(), tag.GetEndPos1()); } wxHtmlParser *m_Parser; @@ -244,11 +244,11 @@ class WXDLLIMPEXP_HTML wxHtmlEntitiesParser : public wxObject public: wxHtmlEntitiesParser(); virtual ~wxHtmlEntitiesParser(); - + // Sets encoding of output string. // Has no effect if wxUSE_WCHAR_T==0 or wxUSE_UNICODE==1 void SetEncoding(wxFontEncoding encoding); - + // Parses entities in input and replaces them with respective characters // (with respect to output encoding) wxString Parse(const wxString& input); diff --git a/include/wx/html/htmlproc.h b/include/wx/html/htmlproc.h index 7e62af2e98..440301c5b8 100644 --- a/include/wx/html/htmlproc.h +++ b/include/wx/html/htmlproc.h @@ -30,7 +30,7 @@ enum wxHTML_PRIORITY_SYSTEM = 256 // >=256 is only for wxHTML's internals }; -// Classes derived from this class serve as simple text processors for +// Classes derived from this class serve as simple text processors for // wxHtmlWindow. wxHtmlWindow runs HTML markup through all registered // processors before displaying it, thus allowing for on-the-fly // modifications of the markup. @@ -40,7 +40,7 @@ class WXDLLIMPEXP_HTML wxHtmlProcessor : public wxObject DECLARE_ABSTRACT_CLASS(wxHtmlProcessor) public: - wxHtmlProcessor() : wxObject(), m_enabled(TRUE) {} + wxHtmlProcessor() : wxObject(), m_enabled(true) {} virtual ~wxHtmlProcessor() {} // Process input text and return processed result @@ -49,12 +49,12 @@ public: // Return priority value of this processor. The higher, the sooner // is the processor applied to the text. virtual int GetPriority() const { return wxHTML_PRIORITY_DONTCARE; } - - // 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. - virtual void Enable(bool enable = TRUE) { m_enabled = enable; } + virtual void Enable(bool enable = true) { m_enabled = enable; } bool IsEnabled() const { return m_enabled; } - + protected: bool m_enabled; }; diff --git a/include/wx/html/htmltag.h b/include/wx/html/htmltag.h index 75f71ec6ee..913efff5e7 100644 --- a/include/wx/html/htmltag.h +++ b/include/wx/html/htmltag.h @@ -87,17 +87,17 @@ public: // Returns tag's name in uppercase. 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. - // Example : HasParam("SRC") returns TRUE + // Example : HasParam("SRC") returns true bool HasParam(const wxString& par) const; // Returns value of the param. Value is in uppercase unless it is // enclosed with " // Example :

GetParam("ALIGN") returns (RIGHT) //

GetParam("SRC") returns (WhaT.jpg) - // (or ("WhaT.jpg") if with_commas == TRUE) - wxString GetParam(const wxString& par, bool with_commas = FALSE) const; + // (or ("WhaT.jpg") if with_commas == true) + wxString GetParam(const wxString& par, bool with_commas = false) const; // Convenience functions: bool GetParamAsColour(const wxString& par, wxColour *clr) const; @@ -105,7 +105,7 @@ public: // Scans param like scanf() functions family does. // Example : ScanParam("COLOR", "\"#%X\"", &clr); - // This is always with with_commas=FALSE + // This is always with with_commas=false // Returns number of scanned values // (like sscanf() does) // NOTE: unlike scanf family, this function only accepts @@ -116,12 +116,12 @@ public: wxString GetAllParams() const; #if WXWIN_COMPATIBILITY_2_2 - // return TRUE if this is ending tag () or FALSE + // return true if this is ending tag () or false // if it isn't () - inline bool IsEnding() const {return FALSE;} + inline bool IsEnding() const {return false;} #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;} // returns beginning position of _internal_ block of text diff --git a/include/wx/html/htmlwin.h b/include/wx/html/htmlwin.h index f2cee731bb..fd0ea89b1a 100644 --- a/include/wx/html/htmlwin.h +++ b/include/wx/html/htmlwin.h @@ -68,7 +68,7 @@ class WXDLLIMPEXP_HTML wxHtmlWindow : public wxScrolledWindow public: wxHtmlWindow() { Init(); } - wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, + wxHtmlWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_DEFAULT_STYLE, @@ -79,7 +79,7 @@ public: } ~wxHtmlWindow(); - bool Create(wxWindow *parent, wxWindowID id = -1, + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, @@ -88,7 +88,7 @@ public: // Set HTML page and display it. !! source is HTML document itself, // it is NOT address/filename of HTML document. If you want to // 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); // Append to current page @@ -135,7 +135,7 @@ public: void SetStandardFonts(int size = -1, const wxString& normal_face = wxEmptyString, const wxString& fixed_face = wxEmptyString); - + // Sets space between text and window borders. void SetBorders(int b) {m_Borders = b;} @@ -147,7 +147,7 @@ public: virtual void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString); // Goes to previous/next page (in browsing history) - // Returns TRUE if successful, FALSE otherwise + // Returns true if successful, false otherwise bool HistoryBack(); bool HistoryForward(); bool HistoryCanBack(); @@ -192,19 +192,19 @@ public: // 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 - // OnOpeningURL returns TRUE. If OnOpeningURL returns wxHTML_REDIRECT, + // OnOpeningURL returns true. If OnOpeningURL returns wxHTML_REDIRECT, // it must set *redirect to the new URL virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType WXUNUSED(type), const wxString& WXUNUSED(url), wxString *WXUNUSED(redirect)) const { return wxHTML_OPEN; } - + #if wxUSE_CLIPBOARD // Helper functions to select parts of page: void SelectWord(const wxPoint& pos); void SelectLine(const wxPoint& pos); void SelectAll(); - + // Convert selection to text: wxString SelectionToText() { return DoSelectionToText(m_selection); } @@ -214,14 +214,14 @@ public: virtual void ApplyParentThemeBackground(const wxColour& WXUNUSED(bg)) { /* do nothing */ } - + protected: void Init(); // Scrolls to anchor of this name. (Anchor is #news // or #features etc. it is part of address sometimes: // 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); // Prepares layout (= fill m_PosX, m_PosY for fragments) based on @@ -272,7 +272,7 @@ protected: protected: wxString DoSelectionToText(wxHtmlSelection *sel); - + // This is pointer to the first cell in parsed data. (Note: the first cell // is usually top one = all other cells are sub-cells of this one) wxHtmlContainerCell *m_Cell; @@ -328,7 +328,7 @@ private: wxHtmlCell *m_tmpSelFromCell; // 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; // contains last link name wxHtmlLinkInfo *m_tmpLastLink; diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index 393e4da0e3..c3f7b61f60 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -30,7 +30,7 @@ //-------------------------------------------------------------------------------- // wxHtmlDCRenderer -// This class is capable of rendering HTML into specified +// This class is capable of rendering HTML into specified // portion of DC //-------------------------------------------------------------------------------- @@ -52,9 +52,9 @@ public: // Sets the text to be displayed. // 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. - // 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) - 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). void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL); @@ -123,13 +123,13 @@ public: wxHtmlPrintout(const wxString& title = wxT("Printout")); ~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. // 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 // 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) void SetHtmlFile(const wxString &htmlfile); @@ -154,12 +154,12 @@ public: const wxString& normal_face = wxEmptyString, const wxString& fixed_face = wxEmptyString); - void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, + void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, float spaces = 5); // sets margins in milimeters. Defaults to 1 inch for margins and 0.5cm for space // between text and header and/or footer - // wxPrintout stuff: + // wxPrintout stuff: bool OnPrintPage(int page); bool HasPage(int page); void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); @@ -206,12 +206,12 @@ private: //-------------------------------------------------------------------------------- // wxHtmlEasyPrinting -// This class provides very simple interface to printing +// This class provides very simple interface to printing // architecture. It allows you to print HTML documents only -// with very few commands. +// with very few commands. // // Note : do not create this class on stack only. -// You should create an instance on app startup and +// You should create an instance on app startup and // use this instance for all printing. Why? The class // stores page&printer settings in it. //-------------------------------------------------------------------------------- @@ -254,10 +254,10 @@ public: void SetStandardFonts(int size = -1, const wxString& normal_face = wxEmptyString, const wxString& fixed_face = wxEmptyString); - + wxPrintData *GetPrintData(); wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;} - // return page setting data objects. + // return page setting data objects. // (You can set their parameters.) protected: @@ -279,7 +279,7 @@ private: FontMode_Standard }; FontMode m_fontMode; - + wxString m_Headers[2], m_Footers[2]; wxWindow *m_ParentWindow; diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h index 55bf86fac9..a5258f1e99 100755 --- a/include/wx/html/webkit.h +++ b/include/wx/html/webkit.h @@ -55,14 +55,14 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("webkitctrl")); virtual ~wxWebKitCtrl(); - + void LoadURL(const wxString &url); - + bool CanGoBack(); bool CanGoForward(); bool GoBack(); bool GoForward(); - void Reload(); + void Reload(); void Stop(); bool CanGetPageSource(); wxString GetPageSource(); @@ -118,13 +118,13 @@ protected: typedef void (wxEvtHandler::*wxWebKitStateChangedEventFunction)(wxWebKitStateChangedEvent&); 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() #define EVT_WEBKIT_STATE_CHANGED(func) \ DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \ - -1, \ - -1, \ + wxID_ANY, \ + wxID_ANY, \ (wxObjectEventFunction) \ (wxWebKitStateChangedEventFunction) & func, \ (wxObject *) NULL ), diff --git a/include/wx/html/winpars.h b/include/wx/html/winpars.h index fd60faf187..1ebf7092fa 100644 --- a/include/wx/html/winpars.h +++ b/include/wx/html/winpars.h @@ -77,7 +77,7 @@ public: void SetStandardFonts(int size = -1, const wxString& normal_face = wxEmptyString, const wxString& fixed_face = wxEmptyString); - + // Adds tags module. see wxHtmlTagsModule for details. static void AddModule(wxHtmlTagsModule *module); @@ -154,7 +154,7 @@ private: wxHtmlContainerCell *m_Container; // 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 */ wxColour m_LinkColor; wxColour m_ActualColor; @@ -162,7 +162,7 @@ private: wxHtmlLinkInfo m_Link; // actual hypertext link or empty string bool m_UseLink; - // TRUE if m_Link is not empty + // true if m_Link is not empty long m_CharHeight, m_CharWidth; // average height of normal-sized text int m_Align; @@ -190,7 +190,7 @@ private: #endif wxHtmlWordCell *m_lastWordCell; - + DECLARE_NO_COPY_CLASS(wxHtmlWinParser) }; -- 2.47.2