Added internal wxHatchStyle enum.

It's annoying that the same code for hatched pens and brushes can't be reused
without relying on deprecated wxXXX_HATCH constants, so add new,
non-deprecated, wxHatchStyle enum that can be used in such code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-06-30 23:41:15 +00:00
parent e269b28e8e
commit c17eafaaf1
5 changed files with 62 additions and 35 deletions

View File

@@ -2227,6 +2227,28 @@ enum wxHitTest
/* 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,
@@ -2275,14 +2297,14 @@ enum wxDeprecatedGUIConstants
/* 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