From: Paul Cornett Date: Fri, 9 Oct 2009 17:39:19 +0000 (+0000) Subject: replace TRUE/FALSE with true/false X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8e6efd1fd2f6cedda23140aff17f56b26ef7c2d2 replace TRUE/FALSE with true/false git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/gtk/checkbox.h b/include/wx/gtk/checkbox.h index 3e86b4c495..5ae9c7fb47 100644 --- a/include/wx/gtk/checkbox.h +++ b/include/wx/gtk/checkbox.h @@ -7,8 +7,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GTKCHECKBOXH__ -#define __GTKCHECKBOXH__ +#ifndef _WX_GTKCHECKBOX_H_ +#define _WX_GTKCHECKBOX_H_ // ---------------------------------------------------------------------------- // wxCheckBox @@ -39,7 +39,7 @@ public: bool GetValue() const; virtual void SetLabel( const wxString& label ); - virtual bool Enable( bool enable = TRUE ); + virtual bool Enable( bool enable = true ); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); @@ -64,4 +64,4 @@ private: DECLARE_DYNAMIC_CLASS(wxCheckBox) }; -#endif // __GTKCHECKBOXH__ +#endif // _WX_GTKCHECKBOX_H_ diff --git a/include/wx/gtk/dialog.h b/include/wx/gtk/dialog.h index 5023f7db67..ef76a636a9 100644 --- a/include/wx/gtk/dialog.h +++ b/include/wx/gtk/dialog.h @@ -8,8 +8,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GTKDIALOGH__ -#define __GTKDIALOGH__ +#ifndef _WX_GTKDIALOG_H_ +#define _WX_GTKDIALOG_H_ class WXDLLIMPEXP_FWD_CORE wxGUIEventLoop; @@ -35,7 +35,7 @@ public: const wxString &name = wxDialogNameStr ); virtual ~wxDialog(); - virtual bool Show( bool show = TRUE ); + virtual bool Show( bool show = true ); virtual int ShowModal(); virtual void EndModal( int retCode ); virtual bool IsModal() const; @@ -53,4 +53,4 @@ private: DECLARE_DYNAMIC_CLASS(wxDialog) }; -#endif // __GTKDIALOGH__ +#endif // _WX_GTKDIALOG_H_ diff --git a/include/wx/gtk/tglbtn.h b/include/wx/gtk/tglbtn.h index 1b7d9d3ed4..583ba88619 100644 --- a/include/wx/gtk/tglbtn.h +++ b/include/wx/gtk/tglbtn.h @@ -65,7 +65,7 @@ public: // Set the label virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); } virtual void SetLabel(const wxBitmap& label); - bool Enable(bool enable = TRUE); + bool Enable(bool enable = true); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); @@ -123,7 +123,7 @@ public: // Set the label void SetLabel(const wxString& label); - bool Enable(bool enable = TRUE); + bool Enable(bool enable = true); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h index 2a1fea8f58..544c9d57a3 100644 --- a/include/wx/html/webkit.h +++ b/include/wx/html/webkit.h @@ -75,9 +75,9 @@ public: bool CanDecreaseTextSize(); void DecreaseTextSize(); - void Print(bool showPrompt=FALSE); + void Print(bool showPrompt = false); - void MakeEditable(bool enable=TRUE); + void MakeEditable(bool enable = true); bool IsEditable(); wxString RunScript(const wxString& javascript); diff --git a/include/wx/msw/tglbtn.h b/include/wx/msw/tglbtn.h index 803f9d8a32..0a9df04949 100644 --- a/include/wx/msw/tglbtn.h +++ b/include/wx/msw/tglbtn.h @@ -55,7 +55,7 @@ public: // Set the label virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); } virtual void SetLabel(const wxBitmap& label); - bool Enable(bool enable = TRUE); + bool Enable(bool enable = true); protected: void Init(); diff --git a/include/wx/osx/carbon/mimetype.h b/include/wx/osx/carbon/mimetype.h index 8d4c2e604f..594834ece5 100644 --- a/include/wx/osx/carbon/mimetype.h +++ b/include/wx/osx/carbon/mimetype.h @@ -91,7 +91,7 @@ public: // set an arbitrary command, ask confirmation if it already exists and // overwriteprompt is TRUE - bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE); + bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true); bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0); private: diff --git a/include/wx/osx/carbon/statbmp.h b/include/wx/osx/carbon/statbmp.h index 1a37192cfe..309d8c8a06 100644 --- a/include/wx/osx/carbon/statbmp.h +++ b/include/wx/osx/carbon/statbmp.h @@ -52,7 +52,7 @@ class WXDLLIMPEXP_CORE wxStaticBitmap: public wxStaticBitmapBase void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; } // overriden base class virtuals - virtual bool AcceptsFocus() const { return FALSE; } + virtual bool AcceptsFocus() const { return false; } protected: virtual wxSize DoGetBestSize() const; diff --git a/include/wx/osx/core/mimetype.h b/include/wx/osx/core/mimetype.h index d3bc55f5ed..4255411162 100644 --- a/include/wx/osx/core/mimetype.h +++ b/include/wx/osx/core/mimetype.h @@ -93,7 +93,7 @@ protected: wxMimeTypeCommands *entry, const wxArrayString& strExtensions, const wxString& strDesc, - bool replaceExisting = TRUE); + bool replaceExisting = true); virtual bool DoAssociation(const wxString& strType, const wxString& strIcon, wxMimeTypeCommands *entry, @@ -120,12 +120,12 @@ public: // accessors bool GetExtensions(wxArrayString& extensions); bool GetMimeType(wxString *mimeType) const - { *mimeType = m_manager->m_aTypes[m_index[0]]; return TRUE; } + { *mimeType = m_manager->m_aTypes[m_index[0]]; return true; } bool GetMimeTypes(wxArrayString& mimeTypes) const; bool GetIcon(wxIconLocation *iconLoc) const; bool GetDescription(wxString *desc) const - { *desc = m_manager->m_aDescriptions[m_index[0]]; return TRUE; } + { *desc = m_manager->m_aDescriptions[m_index[0]]; return true; } bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const @@ -155,7 +155,7 @@ public: // set an arbitrary command, ask confirmation if it already exists and // overwriteprompt is TRUE - bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE); + bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true); bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0); private: diff --git a/include/wx/osx/frame.h b/include/wx/osx/frame.h index 666fb3bf52..87cbdcca36 100644 --- a/include/wx/osx/frame.h +++ b/include/wx/osx/frame.h @@ -59,7 +59,7 @@ public: virtual wxPoint GetClientAreaOrigin() const; // override some more virtuals - virtual bool Enable(bool enable = TRUE) ; + virtual bool Enable(bool enable = true) ; // event handlers void OnActivate(wxActivateEvent& event); diff --git a/include/wx/osx/menu.h b/include/wx/osx/menu.h index 7ddd112170..56bbe5789c 100644 --- a/include/wx/osx/menu.h +++ b/include/wx/osx/menu.h @@ -137,7 +137,7 @@ public: virtual void EnableTop( size_t pos, bool flag ); virtual void SetMenuLabel( size_t pos, const wxString& label ); virtual wxString GetMenuLabel( size_t pos ) const; - virtual bool Enable( bool enable = TRUE ); + virtual bool Enable( bool enable = true ); // for virtual function hiding virtual void Enable( int itemid, bool enable ) { @@ -163,7 +163,7 @@ public: // if the menubar is modified, the display is not updated automatically, // call this function to update it (m_menuBarFrame should be !NULL) - void Refresh(bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL); + void Refresh(bool eraseBackground = true, const wxRect *rect = NULL); static void SetAutoWindowMenu( bool enable ) { s_macAutoWindowMenu = enable ; } static bool GetAutoWindowMenu() { return s_macAutoWindowMenu ; } diff --git a/include/wx/osx/metafile.h b/include/wx/osx/metafile.h index 07c93e8262..0014dcc7ae 100644 --- a/include/wx/osx/metafile.h +++ b/include/wx/osx/metafile.h @@ -133,7 +133,7 @@ private: bool WXDLLIMPEXP_CORE wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0); // Optional origin and extent -bool WXDLLIMPEXP_CORE wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = TRUE); +bool WXDLLIMPEXP_CORE wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = true); // ---------------------------------------------------------------------------- // wxMetafileDataObject is a specialization of wxDataObject for metafile data diff --git a/include/wx/osx/printmac.h b/include/wx/osx/printmac.h index 5d39109a0d..d7f168c2eb 100644 --- a/include/wx/osx/printmac.h +++ b/include/wx/osx/printmac.h @@ -28,7 +28,7 @@ class WXDLLIMPEXP_CORE wxMacPrinter: public wxPrinterBase virtual bool Print(wxWindow *parent, wxPrintout *printout, - bool prompt = TRUE); + bool prompt = true); virtual wxDC* PrintDialog(wxWindow *parent); virtual bool Setup(wxWindow *parent); diff --git a/include/wx/osx/sound.h b/include/wx/osx/sound.h index e41636b1ef..10a781caf9 100644 --- a/include/wx/osx/sound.h +++ b/include/wx/osx/sound.h @@ -44,12 +44,12 @@ class WXDLLIMPEXP_ADV wxSound : public wxSoundBase { public: wxSound(); - wxSound(const wxString& fileName, bool isResource = FALSE); + wxSound(const wxString& fileName, bool isResource = false); wxSound(int size, const wxByte* data); virtual ~wxSound(); // Create from resource or file - bool Create(const wxString& fileName, bool isResource = FALSE); + bool Create(const wxString& fileName, bool isResource = false); // Create from data bool Create(int size, const wxByte* data); diff --git a/include/wx/osx/spinctrl.h b/include/wx/osx/spinctrl.h index 04491ff269..c9bd5422a0 100644 --- a/include/wx/osx/spinctrl.h +++ b/include/wx/osx/spinctrl.h @@ -78,8 +78,8 @@ public: // implementation from now on // forward these functions to all subcontrols - virtual bool Enable(bool enable = TRUE); - virtual bool Show(bool show = TRUE); + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); // get the subcontrols wxTextCtrl *GetText() const { return m_text; } diff --git a/include/wx/osx/stattext.h b/include/wx/osx/stattext.h index fc69ab3457..3f76b748a4 100644 --- a/include/wx/osx/stattext.h +++ b/include/wx/osx/stattext.h @@ -38,7 +38,7 @@ public: void SetLabel( const wxString &str ) ; bool SetFont( const wxFont &font ); - virtual bool AcceptsFocus() const { return FALSE; } + virtual bool AcceptsFocus() const { return false; } protected : diff --git a/include/wx/protocol/protocol.h b/include/wx/protocol/protocol.h index aaf3a63bf9..6dffb30f94 100644 --- a/include/wx/protocol/protocol.h +++ b/include/wx/protocol/protocol.h @@ -142,13 +142,13 @@ public: \ #define IMPLEMENT_PROTOCOL(class, name, serv, host) \ wxProtoInfo class::g_proto_##class(name, serv, host, CLASSINFO(class)); \ -bool wxProtocolUse##class = TRUE; +bool wxProtocolUse##class = true; #define USE_PROTOCOL(class) \ extern bool wxProtocolUse##class ; \ static struct wxProtocolUserFor##class \ { \ - wxProtocolUserFor##class() { wxProtocolUse##class = TRUE; } \ + wxProtocolUserFor##class() { wxProtocolUse##class = true; } \ } wxProtocolDoUse##class; class WXDLLIMPEXP_NET wxProtoInfo : public wxObject diff --git a/include/wx/unix/mimetype.h b/include/wx/unix/mimetype.h index fdff54437c..6600216fc1 100644 --- a/include/wx/unix/mimetype.h +++ b/include/wx/unix/mimetype.h @@ -93,7 +93,7 @@ protected: wxMimeTypeCommands *entry, const wxArrayString& strExtensions, const wxString& strDesc, - bool replaceExisting = TRUE); + bool replaceExisting = true); virtual bool DoAssociation(const wxString& strType, const wxString& strIcon, wxMimeTypeCommands *entry, @@ -120,12 +120,12 @@ public: // accessors bool GetExtensions(wxArrayString& extensions); bool GetMimeType(wxString *mimeType) const - { *mimeType = m_manager->m_aTypes[m_index[0]]; return TRUE; } + { *mimeType = m_manager->m_aTypes[m_index[0]]; return true; } bool GetMimeTypes(wxArrayString& mimeTypes) const; bool GetIcon(wxIconLocation *iconLoc) const; bool GetDescription(wxString *desc) const - { *desc = m_manager->m_aDescriptions[m_index[0]]; return TRUE; } + { *desc = m_manager->m_aDescriptions[m_index[0]]; return true; } bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const @@ -155,7 +155,7 @@ public: // set an arbitrary command, ask confirmation if it already exists and // overwriteprompt is TRUE - bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE); + bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true); bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0); private: diff --git a/include/wx/unix/pipe.h b/include/wx/unix/pipe.h index d59553d154..d1a058beca 100644 --- a/include/wx/unix/pipe.h +++ b/include/wx/unix/pipe.h @@ -46,10 +46,10 @@ public: { wxLogSysError(_("Pipe creation failed")); - return FALSE; + return false; } - return TRUE; + return true; } // return TRUE if we were created successfully