#define wxSTDCALL
#endif /* platform */
-/* LINKAGEMODE mode is empty for everyting except OS/2 */
+/* LINKAGEMODE mode is empty for everything except OS/2 */
#ifndef LINKAGEMODE
#define LINKAGEMODE
#endif /* LINKAGEMODE */
m(==,x,y,z) m(!=,x,y,z) m(>=,x,y,z) m(<=,x,y,z) m(>,x,y,z) m(<,x,y,z)
/*
- This is only used with wxDEFINE_COMPARISON_REV: it passes both the normal
- and the reversed comparison operators to the macro.
+ These are only used with wxDEFINE_COMPARISON_[BY_]REV: they pass both the
+ normal and the reversed comparison operators to the macro.
*/
+#define wxFOR_ALL_COMPARISONS_2_REV(m, x, y) \
+ m(==,x,y,==) m(!=,x,y,!=) m(>=,x,y,<=) \
+ m(<=,x,y,>=) m(>,x,y,<) m(<,x,y,>)
+
#define wxFOR_ALL_COMPARISONS_3_REV(m, x, y, z) \
m(==,x,y,z,==) m(!=,x,y,z,!=) m(>=,x,y,z,<=) \
m(<=,x,y,z,>=) m(>,x,y,z,<) m(<,x,y,z,>)
#define wxDEFINE_COMPARISON_REV(op, T1, T2, cmp, oprev) \
inline bool operator op(T2 y, T1 x) { return cmp(x, y, oprev); }
+#define wxDEFINE_COMPARISON_BY_REV(op, T1, T2, oprev) \
+ inline bool operator op(T1 x, T2 y) { return y oprev x; }
+
/*
Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given
types in the specified order. The implementation is provided by the cmp
#define wxDEFINE_COMPARISONS(T1, T2, cmp) \
wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON, T1, T2, cmp)
+/*
+ Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given
+ types in the specified order, implemented in terms of existing operators
+ for the reverse order.
+ */
+#define wxDEFINE_COMPARISONS_BY_REV(T1, T2) \
+ wxFOR_ALL_COMPARISONS_2_REV(wxDEFINE_COMPARISON_BY_REV, T1, T2)
+
/*
This macro allows to define all 12 comparison operators (6 operators for
both orders of arguments) for the given types using the provided "cmp"
/* GDI descriptions */
/* ---------------------------------------------------------------------------- */
+// Hatch styles used by both pen and brush styles.
+//
+// NB: Do not use these constants directly, they're for internal use only, use
+// wxBRUSHSTYLE_XXX_HATCH and wxPENSTYLE_XXX_HATCH instead.
+enum wxHatchStyle
+{
+ wxHATCHSTYLE_INVALID = -1,
+
+ /*
+ The value of the first style is chosen to fit with
+ wxDeprecatedGUIConstants values below, don't change it.
+ */
+ wxHATCHSTYLE_FIRST = 111,
+ wxHATCHSTYLE_BDIAGONAL = wxHATCHSTYLE_FIRST,
+ wxHATCHSTYLE_CROSSDIAG,
+ wxHATCHSTYLE_FDIAGONAL,
+ wxHATCHSTYLE_CROSS,
+ wxHATCHSTYLE_HORIZONTAL,
+ wxHATCHSTYLE_VERTICAL,
+ wxHATCHSTYLE_LAST = wxHATCHSTYLE_VERTICAL
+};
+
/*
WARNING: the following styles are deprecated; use the
wxFontFamily, wxFontStyle, wxFontWeight, wxBrushStyle,
/* drawn with a Pen, and without any Brush -- and it can be stippled. */
wxSTIPPLE = 110,
- wxBDIAGONAL_HATCH, /* In wxWidgets < 2.6 use WX_HATCH macro */
- wxCROSSDIAG_HATCH, /* to verify these wx*_HATCH are in style */
- wxFDIAGONAL_HATCH, /* of wxBrush. In wxWidgets >= 2.6 use */
- wxCROSS_HATCH, /* wxBrush::IsHatch() instead. */
- wxHORIZONTAL_HATCH,
- wxVERTICAL_HATCH,
- wxFIRST_HATCH = wxBDIAGONAL_HATCH,
- wxLAST_HATCH = wxVERTICAL_HATCH
+ wxBDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL,
+ wxCROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG,
+ wxFDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL,
+ wxCROSS_HATCH = wxHATCHSTYLE_CROSS,
+ wxHORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL,
+ wxVERTICAL_HATCH = wxHATCHSTYLE_VERTICAL,
+ wxFIRST_HATCH = wxHATCHSTYLE_FIRST,
+ wxLAST_HATCH = wxHATCHSTYLE_LAST
};
#endif
/* --------------------------------------------------------------------------- */
/* macros that enable wxWidgets apps to be compiled in absence of the */
-/* sytem headers, although some platform specific types are used in the */
+/* system headers, although some platform specific types are used in the */
/* platform specific (implementation) parts of the headers */
/* --------------------------------------------------------------------------- */
+#ifdef __DARWIN__
+#define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref;
+#define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref;
+#endif
+
#ifdef __WXMAC__
#define WX_OPAQUE_TYPE( name ) struct wxOpaque##name
/* typedef const struct __CFString * CFStringRef; */
-#define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref;
-#define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref;
-
DECLARE_WXOSX_OPAQUE_CONST_CFREF( CFString )
typedef struct __CFString * CFMutableStringRef;
typedef unsigned long GdkAtom;
#endif
-#if !defined(__WXGTK30__)
+#if !defined(__WXGTK3__)
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkFont GdkFont;
typedef struct _GdkGC GdkGC;
typedef struct _GdkRegion GdkRegion;
#endif
-#if defined(__WXGTK30__)
+#if defined(__WXGTK3__)
typedef struct _GdkWindow GdkWindow;
#elif defined(__WXGTK20__)
typedef struct _GdkDrawable GdkWindow;