From a9711a4deb97504db860a136df11077fbc56eeee Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sun, 20 Jul 2003 19:27:14 +0000 Subject: [PATCH] Compilation fixes for !WXWIN_COMPATIBILITY_2_4. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/filedlg.h | 1 + include/wx/motif/menu.h | 1 + include/wx/treebase.h | 9 +++++++++ src/common/ctrlsub.cpp | 1 + src/common/lboxcmn.cpp | 1 + src/motif/checklst.cpp | 1 + 6 files changed, 14 insertions(+) diff --git a/include/wx/filedlg.h b/include/wx/filedlg.h index f151ca9993..8d59f7fb70 100644 --- a/include/wx/filedlg.h +++ b/include/wx/filedlg.h @@ -19,6 +19,7 @@ #endif #include "wx/dialog.h" +#include "wx/arrstr.h" //---------------------------------------------------------------------------- // wxFileDialog data diff --git a/include/wx/motif/menu.h b/include/wx/motif/menu.h index 9db851bab5..e130a1257b 100644 --- a/include/wx/motif/menu.h +++ b/include/wx/motif/menu.h @@ -18,6 +18,7 @@ #include "wx/colour.h" #include "wx/font.h" +#include "wx/arrstr.h" class wxFrame; diff --git a/include/wx/treebase.h b/include/wx/treebase.h index 8ef315f836..b9331b92a6 100644 --- a/include/wx/treebase.h +++ b/include/wx/treebase.h @@ -38,6 +38,7 @@ typedef void *wxTreeItemIdValue; class WXDLLEXPORT wxTreeItemId { + friend bool operator==(const wxTreeItemId&, const wxTreeItemId&); public: // ctors // 0 is invalid value for HTREEITEM @@ -63,8 +64,16 @@ public: #endif // WXWIN_COMPATIBILITY_2_4 wxTreeItemIdValue m_pItem; + bool operator!() const { return !IsOk(); } + operator bool() const { return IsOk(); } + }; +inline bool operator==(const wxTreeItemId& i1, const wxTreeItemId& i2) +{ + return i1.m_pItem == i2.m_pItem; +} + // ---------------------------------------------------------------------------- // wxTreeItemData is some (arbitrary) user class associated with some item. The // main advantage of having this class (compared to old untyped interface) is diff --git a/src/common/ctrlsub.cpp b/src/common/ctrlsub.cpp index 975812f8d4..93de1562da 100644 --- a/src/common/ctrlsub.cpp +++ b/src/common/ctrlsub.cpp @@ -32,6 +32,7 @@ #ifndef WX_PRECOMP #include "wx/ctrlsub.h" + #include "wx/arrstr.h" #endif // ============================================================================ diff --git a/src/common/lboxcmn.cpp b/src/common/lboxcmn.cpp index 429aa9e5ff..671c54c39a 100644 --- a/src/common/lboxcmn.cpp +++ b/src/common/lboxcmn.cpp @@ -33,6 +33,7 @@ #ifndef WX_PRECOMP #include "wx/listbox.h" #include "wx/dynarray.h" + #include "wx/arrstr.h" #endif // ============================================================================ diff --git a/src/motif/checklst.cpp b/src/motif/checklst.cpp index 7546ec3927..b86a9863bd 100644 --- a/src/motif/checklst.cpp +++ b/src/motif/checklst.cpp @@ -20,6 +20,7 @@ #include "wx/defs.h" #include "wx/checklst.h" +#include "wx/arrstr.h" // ============================================================================ // implementation -- 2.45.2