Make wxPenInfoBase constructor protected
This class is never supposed to be created directly.
This commit is contained in:
@@ -69,17 +69,6 @@ template <class T>
|
|||||||
class wxPenInfoBase
|
class wxPenInfoBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPenInfoBase(const wxColour& colour, wxPenStyle style)
|
|
||||||
{
|
|
||||||
m_nb_dashes = 0;
|
|
||||||
m_dash = NULL;
|
|
||||||
m_join = wxJOIN_ROUND;
|
|
||||||
m_cap = wxCAP_ROUND;
|
|
||||||
|
|
||||||
m_colour = colour;
|
|
||||||
m_style = style;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setters for the various attributes. All of them return the object itself
|
// Setters for the various attributes. All of them return the object itself
|
||||||
// so that the calls to them could be chained.
|
// so that the calls to them could be chained.
|
||||||
|
|
||||||
@@ -113,6 +102,18 @@ public:
|
|||||||
|
|
||||||
bool IsTransparent() const { return m_style == wxPENSTYLE_TRANSPARENT; }
|
bool IsTransparent() const { return m_style == wxPENSTYLE_TRANSPARENT; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxPenInfoBase(const wxColour& colour, wxPenStyle style)
|
||||||
|
{
|
||||||
|
m_nb_dashes = 0;
|
||||||
|
m_dash = NULL;
|
||||||
|
m_join = wxJOIN_ROUND;
|
||||||
|
m_cap = wxCAP_ROUND;
|
||||||
|
|
||||||
|
m_colour = colour;
|
||||||
|
m_style = style;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Helper to return this object itself cast to its real type T.
|
// Helper to return this object itself cast to its real type T.
|
||||||
T& This() { return static_cast<T&>(*this); }
|
T& This() { return static_cast<T&>(*this); }
|
||||||
|
Reference in New Issue
Block a user