fix typos and update MSW code to use new wxPENSTYLE_* enum values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,7 +31,7 @@ enum wxPenStyle
|
|||||||
wxPENSTYLE_LONG_DASH = wxLONG_DASH,
|
wxPENSTYLE_LONG_DASH = wxLONG_DASH,
|
||||||
wxPENSTYLE_SHORT_DASH = wxSHORT_DASH,
|
wxPENSTYLE_SHORT_DASH = wxSHORT_DASH,
|
||||||
wxPENSTYLE_DOT_DASH = wxDOT_DASH,
|
wxPENSTYLE_DOT_DASH = wxDOT_DASH,
|
||||||
wxPENSTYLE_USER_DOT = wxUSER_DASH,
|
wxPENSTYLE_USER_DASH = wxUSER_DASH,
|
||||||
|
|
||||||
wxPENSTYLE_TRANSPARENT = wxTRANSPARENT,
|
wxPENSTYLE_TRANSPARENT = wxTRANSPARENT,
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ enum wxPenStyle
|
|||||||
wxPENSTYLE_LONG_DASH,
|
wxPENSTYLE_LONG_DASH,
|
||||||
wxPENSTYLE_SHORT_DASH,
|
wxPENSTYLE_SHORT_DASH,
|
||||||
wxPENSTYLE_DOT_DASH,
|
wxPENSTYLE_DOT_DASH,
|
||||||
wxPENSTYLE_USER_DOT,
|
wxPENSTYLE_USER_DASH,
|
||||||
|
|
||||||
wxPENSTYLE_TRANSPARENT,
|
wxPENSTYLE_TRANSPARENT,
|
||||||
|
|
||||||
|
@@ -799,7 +799,7 @@ wxFont *wxFontList::FindOrCreateFont(int pointSize,
|
|||||||
font->GetWeight () == weight &&
|
font->GetWeight () == weight &&
|
||||||
font->GetUnderlined () == underline )
|
font->GetUnderlined () == underline )
|
||||||
{
|
{
|
||||||
wxFontFamily fontFamily = font->GetFamily();
|
wxFontFamily fontFamily = (wxFontFamily)font->GetFamily();
|
||||||
|
|
||||||
#if defined(__WXGTK__)
|
#if defined(__WXGTK__)
|
||||||
// under GTK the default family is wxSWISS, so looking for a font
|
// under GTK the default family is wxSWISS, so looking for a font
|
||||||
|
@@ -90,7 +90,7 @@ public:
|
|||||||
{
|
{
|
||||||
Free();
|
Free();
|
||||||
|
|
||||||
m_style = wxSTIPPLE;
|
m_style = wxPENSTYLE_STIPPLE;
|
||||||
m_stipple = stipple;
|
m_stipple = stipple;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ wxPenRefData::wxPenRefData()
|
|||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
m_style = wxSOLID;
|
m_style = wxPENSTYLE_SOLID;
|
||||||
m_width = 1;
|
m_width = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ wxPenRefData::wxPenRefData(const wxBitmap& stipple, int width)
|
|||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
m_style = wxSTIPPLE;
|
m_style = wxPENSTYLE_STIPPLE;
|
||||||
m_width = width;
|
m_width = width;
|
||||||
|
|
||||||
m_stipple = stipple;
|
m_stipple = stipple;
|
||||||
@@ -210,11 +210,11 @@ static int ConvertPenStyle(wxPenStyle style)
|
|||||||
{
|
{
|
||||||
switch ( style )
|
switch ( style )
|
||||||
{
|
{
|
||||||
case wxSHORT_DASH:
|
case wxPENSTYLE_SHORT_DASH:
|
||||||
case wxLONG_DASH:
|
case wxPENSTYLE_LONG_DASH:
|
||||||
return PS_DASH;
|
return PS_DASH;
|
||||||
|
|
||||||
case wxTRANSPARENT:
|
case wxPENSTYLE_TRANSPARENT:
|
||||||
return PS_NULL;
|
return PS_NULL;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -222,23 +222,23 @@ static int ConvertPenStyle(wxPenStyle style)
|
|||||||
// fall through
|
// fall through
|
||||||
|
|
||||||
#ifdef wxHAVE_EXT_CREATE_PEN
|
#ifdef wxHAVE_EXT_CREATE_PEN
|
||||||
case wxDOT:
|
case wxPENSTYLE_DOT:
|
||||||
return PS_DOT;
|
return PS_DOT;
|
||||||
|
|
||||||
case wxDOT_DASH:
|
case wxPENSTYLE_DOT_DASH:
|
||||||
return PS_DASHDOT;
|
return PS_DASHDOT;
|
||||||
|
|
||||||
case wxUSER_DASH:
|
case wxPENSTYLE_USER_DASH:
|
||||||
return PS_USERSTYLE;
|
return PS_USERSTYLE;
|
||||||
|
|
||||||
case wxSTIPPLE:
|
case wxPENSTYLE_STIPPLE:
|
||||||
case wxBDIAGONAL_HATCH:
|
case wxPENSTYLE_BDIAGONAL_HATCH:
|
||||||
case wxCROSSDIAG_HATCH:
|
case wxPENSTYLE_CROSSDIAG_HATCH:
|
||||||
case wxFDIAGONAL_HATCH:
|
case wxPENSTYLE_FDIAGONAL_HATCH:
|
||||||
case wxCROSS_HATCH:
|
case wxPENSTYLE_CROSS_HATCH:
|
||||||
case wxHORIZONTAL_HATCH:
|
case wxPENSTYLE_HORIZONTAL_HATCH:
|
||||||
case wxVERTICAL_HATCH:
|
case wxPENSTYLE_VERTICAL_HATCH:
|
||||||
case wxSOLID:
|
case wxPENSTYLE_SOLID:
|
||||||
#endif // wxHAVE_EXT_CREATE_PEN
|
#endif // wxHAVE_EXT_CREATE_PEN
|
||||||
|
|
||||||
return PS_SOLID;
|
return PS_SOLID;
|
||||||
@@ -292,7 +292,7 @@ bool wxPenRefData::Alloc()
|
|||||||
if ( m_hPen )
|
if ( m_hPen )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( m_style == wxTRANSPARENT )
|
if ( m_style == wxPENSTYLE_TRANSPARENT )
|
||||||
{
|
{
|
||||||
m_hPen = (HPEN)::GetStockObject(NULL_PEN);
|
m_hPen = (HPEN)::GetStockObject(NULL_PEN);
|
||||||
return true;
|
return true;
|
||||||
@@ -336,37 +336,37 @@ bool wxPenRefData::Alloc()
|
|||||||
LOGBRUSH lb;
|
LOGBRUSH lb;
|
||||||
switch( m_style )
|
switch( m_style )
|
||||||
{
|
{
|
||||||
case wxSTIPPLE:
|
case wxPENSTYLE_STIPPLE:
|
||||||
lb.lbStyle = BS_PATTERN;
|
lb.lbStyle = BS_PATTERN;
|
||||||
lb.lbHatch = wxPtrToUInt(m_stipple.GetHBITMAP());
|
lb.lbHatch = wxPtrToUInt(m_stipple.GetHBITMAP());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxBDIAGONAL_HATCH:
|
case wxPENSTYLE_BDIAGONAL_HATCH:
|
||||||
lb.lbStyle = BS_HATCHED;
|
lb.lbStyle = BS_HATCHED;
|
||||||
lb.lbHatch = HS_BDIAGONAL;
|
lb.lbHatch = HS_BDIAGONAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxCROSSDIAG_HATCH:
|
case wxPENSTYLE_CROSSDIAG_HATCH:
|
||||||
lb.lbStyle = BS_HATCHED;
|
lb.lbStyle = BS_HATCHED;
|
||||||
lb.lbHatch = HS_DIAGCROSS;
|
lb.lbHatch = HS_DIAGCROSS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxFDIAGONAL_HATCH:
|
case wxPENSTYLE_FDIAGONAL_HATCH:
|
||||||
lb.lbStyle = BS_HATCHED;
|
lb.lbStyle = BS_HATCHED;
|
||||||
lb.lbHatch = HS_FDIAGONAL;
|
lb.lbHatch = HS_FDIAGONAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxCROSS_HATCH:
|
case wxPENSTYLE_CROSS_HATCH:
|
||||||
lb.lbStyle = BS_HATCHED;
|
lb.lbStyle = BS_HATCHED;
|
||||||
lb.lbHatch = HS_CROSS;
|
lb.lbHatch = HS_CROSS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxHORIZONTAL_HATCH:
|
case wxPENSTYLE_HORIZONTAL_HATCH:
|
||||||
lb.lbStyle = BS_HATCHED;
|
lb.lbStyle = BS_HATCHED;
|
||||||
lb.lbHatch = HS_HORIZONTAL;
|
lb.lbHatch = HS_HORIZONTAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxVERTICAL_HATCH:
|
case wxPENSTYLE_VERTICAL_HATCH:
|
||||||
lb.lbStyle = BS_HATCHED;
|
lb.lbStyle = BS_HATCHED;
|
||||||
lb.lbHatch = HS_VERTICAL;
|
lb.lbHatch = HS_VERTICAL;
|
||||||
break;
|
break;
|
||||||
@@ -384,7 +384,7 @@ bool wxPenRefData::Alloc()
|
|||||||
lb.lbColor = col;
|
lb.lbColor = col;
|
||||||
|
|
||||||
DWORD *dash;
|
DWORD *dash;
|
||||||
if ( m_style == wxUSER_DASH && m_nbDash && m_dash )
|
if ( m_style == wxPENSTYLE_USER_DASH && m_nbDash && m_dash )
|
||||||
{
|
{
|
||||||
dash = new DWORD[m_nbDash];
|
dash = new DWORD[m_nbDash];
|
||||||
int rw = m_width > 1 ? m_width : 1;
|
int rw = m_width > 1 ? m_width : 1;
|
||||||
@@ -430,14 +430,14 @@ WXHPEN wxPenRefData::GetHPEN() const
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
|
||||||
|
|
||||||
wxPen::wxPen(const wxColour& col, int width, int style)
|
wxPen::wxPen(const wxColour& col, int width, wxPenStyle style)
|
||||||
{
|
{
|
||||||
m_refData = new wxPenRefData(col, width, style);
|
m_refData = new wxPenRefData(col, width, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
|
wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
|
||||||
{
|
{
|
||||||
m_refData = new wxPenRefData(col, width, (wxPenStyle)style);
|
m_refData = new wxPenRefData(colour, width, (wxPenStyle)style);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::wxPen(const wxBitmap& stipple, int width)
|
wxPen::wxPen(const wxBitmap& stipple, int width)
|
||||||
@@ -550,17 +550,17 @@ int wxPen::GetWidth() const
|
|||||||
|
|
||||||
wxPenStyle wxPen::GetStyle() const
|
wxPenStyle wxPen::GetStyle() const
|
||||||
{
|
{
|
||||||
return m_refData ? M_PENDATA->GetStyle() : 0;
|
return m_refData ? M_PENDATA->GetStyle() : wxPENSTYLE_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPenJoin wxPen::GetJoin() const
|
wxPenJoin wxPen::GetJoin() const
|
||||||
{
|
{
|
||||||
return m_refData ? M_PENDATA->GetJoin() : 0;
|
return m_refData ? M_PENDATA->GetJoin() : wxJOIN_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPenCap wxPen::GetCap() const
|
wxPenCap wxPen::GetCap() const
|
||||||
{
|
{
|
||||||
return m_refData ? M_PENDATA->GetCap() : 0;
|
return m_refData ? M_PENDATA->GetCap() : wxCAP_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPen::GetDashes(wxDash** ptr) const
|
int wxPen::GetDashes(wxDash** ptr) const
|
||||||
|
Reference in New Issue
Block a user