Remove all mentions of wxGauge shadow width and bezel face.

The shadow width was only used by wxMotif and bezel face not used at all since
a very, very long time, so just remove these methods from the ports which still
had them (just doing nothing) and remove support of the corresponding XRC
attributes.
This commit is contained in:
Vadim Zeitlin
2015-04-20 18:43:43 +02:00
parent 13946f977d
commit 6d92f45385
9 changed files with 15 additions and 105 deletions

View File

@@ -1045,9 +1045,9 @@ objects. If sizer child is used, it sets
@row3col{value, integer, @row3col{value, integer,
Initial value of the control (default: 0).} Initial value of the control (default: 0).}
@row3col{shadow, @ref overview_xrcformat_type_dimension, @row3col{shadow, @ref overview_xrcformat_type_dimension,
Rendered shadow size (default: none; ignored by most platforms).} Ignored, preserved only for compatibility.}
@row3col{bezel, @ref overview_xrcformat_type_dimension, @row3col{bezel, @ref overview_xrcformat_type_dimension,
Rendered bezel size (default: none; ignored by most platforms).} Ignored, preserved only for compatibility.}
@endTable @endTable
@subsubsection xrc_wxgenericdirctrl wxGenericDirCtrl @subsubsection xrc_wxgenericdirctrl wxGenericDirCtrl

View File

@@ -80,16 +80,22 @@ public:
// simple accessors // simple accessors
bool IsVertical() const { return HasFlag(wxGA_VERTICAL); } bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
// appearance params (not implemented for most ports)
virtual void SetShadowWidth(int w);
virtual int GetShadowWidth() const;
virtual void SetBezelFace(int w);
virtual int GetBezelFace() const;
// overridden base class virtuals // overridden base class virtuals
virtual bool AcceptsFocus() const wxOVERRIDE { return false; } virtual bool AcceptsFocus() const wxOVERRIDE { return false; }
// Deprecated methods not doing anything since a long time.
wxDEPRECATED_MSG("Remove calls to this method, it doesn't do anything")
void SetShadowWidth(int WXUNUSED(w)) { }
wxDEPRECATED_MSG("Remove calls to this method, it always returns 0")
int GetShadowWidth() const { return 0; }
wxDEPRECATED_MSG("Remove calls to this method, it doesn't do anything")
void SetBezelFace(int WXUNUSED(w)) { }
wxDEPRECATED_MSG("Remove calls to this method, it always returns 0")
int GetBezelFace() const { return 0; }
protected: protected:
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; } virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }

View File

@@ -40,11 +40,6 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr ); const wxString& name = wxGaugeNameStr );
void SetShadowWidth( int WXUNUSED(w) ) { }
void SetBezelFace( int WXUNUSED(w) ) { }
int GetShadowWidth() const { return 0; }
int GetBezelFace() const { return 0; }
// determinate mode API // determinate mode API
void SetRange( int r ); void SetRange( int r );
void SetValue( int pos ); void SetValue( int pos );

View File

@@ -40,12 +40,8 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr ); const wxString& name = wxGaugeNameStr );
void SetShadowWidth( int WXUNUSED(w) ) { }
void SetBezelFace( int WXUNUSED(w) ) { }
void SetRange( int r ); void SetRange( int r );
void SetValue( int pos ); void SetValue( int pos );
int GetShadowWidth() const { return 0; }
int GetBezelFace() const { return 0; }
int GetRange() const; int GetRange() const;
int GetValue() const; int GetValue() const;

View File

@@ -38,11 +38,9 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr); const wxString& name = wxGaugeNameStr);
void SetShadowWidth(int w);
void SetRange(int r); void SetRange(int r);
void SetValue(int pos); void SetValue(int pos);
int GetShadowWidth() const ;
int GetRange() const ; int GetRange() const ;
int GetValue() const ; int GetValue() const ;

View File

@@ -122,15 +122,6 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr); const wxString& name = wxGaugeNameStr);
/**
Returns the width of the 3D bezel face.
@remarks This method is not implemented (returns 0) for most platforms.
@see SetBezelFace()
*/
int GetBezelFace() const;
/** /**
Returns the maximum position of the gauge. Returns the maximum position of the gauge.
@@ -138,15 +129,6 @@ public:
*/ */
int GetRange() const; int GetRange() const;
/**
Returns the 3D shadow margin width.
@remarks This method is not implemented (returns 0) for most platforms.
@see SetShadowWidth()
*/
int GetShadowWidth() const;
/** /**
Returns the current position of the gauge. Returns the current position of the gauge.
@@ -170,16 +152,6 @@ public:
*/ */
virtual void Pulse(); virtual void Pulse();
/**
Sets the 3D bezel face width.
@remarks This method is not implemented (doesn't do anything) for most
platforms.
@see GetBezelFace()
*/
void SetBezelFace(int width);
/** /**
Sets the range (maximum value) of the gauge. This function makes the Sets the range (maximum value) of the gauge. This function makes the
gauge switch to determinate mode, if it's not already. gauge switch to determinate mode, if it's not already.
@@ -192,14 +164,6 @@ public:
*/ */
void SetRange(int range); void SetRange(int range);
/**
Sets the 3D shadow width.
@remarks This method is not implemented (doesn't do anything) for most
platforms.
*/
void SetShadowWidth(int width);
/** /**
Sets the position of the gauge. The @a pos must be between 0 and the Sets the position of the gauge. The @a pos must be between 0 and the
gauge range as returned by GetRange(), inclusive. gauge range as returned by GetRange(), inclusive.

View File

@@ -89,10 +89,6 @@ wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) wxT("Helpstring"), wxT("group"))
wxPROPERTY( Range, int, SetRange, GetRange, 0, 0 /*flags*/, \ wxPROPERTY( Range, int, SetRange, GetRange, 0, 0 /*flags*/, \
wxT("Helpstring"), wxT("group")) wxT("Helpstring"), wxT("group"))
wxPROPERTY( ShadowWidth, int, SetShadowWidth, GetShadowWidth, \
0, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY( BezelFace, int, SetBezelFace, GetBezelFace, \
0, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
wxPROPERTY_FLAGS( WindowStyle, wxGaugeStyle, long, SetWindowStyleFlag, \ wxPROPERTY_FLAGS( WindowStyle, wxGaugeStyle, long, SetWindowStyleFlag, \
GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
@@ -203,27 +199,4 @@ void wxGaugeBase::Pulse()
#endif #endif
} }
// ----------------------------------------------------------------------------
// wxGauge appearance params
// ----------------------------------------------------------------------------
void wxGaugeBase::SetShadowWidth(int WXUNUSED(w))
{
}
int wxGaugeBase::GetShadowWidth() const
{
return 0;
}
void wxGaugeBase::SetBezelFace(int WXUNUSED(w))
{
}
int wxGaugeBase::GetBezelFace() const
{
return 0;
}
#endif // wxUSE_GAUGE #endif // wxUSE_GAUGE

View File

@@ -156,13 +156,6 @@ wxSize wxGauge::DoGetBestSize() const
return wxSize( 18, 100 ); return wxSize( 18, 100 );
} }
void wxGauge::SetShadowWidth(int w)
{
if (w == 0)
w = 1;
XtVaSetValues((Widget) m_mainWidget, XmNshadowThickness, w, NULL);
}
void wxGauge::SetRange(int r) void wxGauge::SetRange(int r)
{ {
XtVaSetValues((Widget) m_mainWidget, XmNmaximum, r, NULL); XtVaSetValues((Widget) m_mainWidget, XmNmaximum, r, NULL);
@@ -173,13 +166,6 @@ void wxGauge::SetValue(int pos)
XtVaSetValues((Widget) m_mainWidget, XmNvalue, pos, NULL); XtVaSetValues((Widget) m_mainWidget, XmNvalue, pos, NULL);
} }
int wxGauge::GetShadowWidth() const
{
Dimension w;
XtVaGetValues((Widget) m_mainWidget, XmNshadowThickness, &w, NULL);
return (int)w;
}
int wxGauge::GetRange() const int wxGauge::GetRange() const
{ {
int r; int r;

View File

@@ -51,14 +51,6 @@ wxObject *wxGaugeXmlHandler::DoCreateResource()
{ {
control->SetValue(GetLong(wxT("value"))); control->SetValue(GetLong(wxT("value")));
} }
if( HasParam(wxT("shadow")))
{
control->SetShadowWidth(GetDimension(wxT("shadow")));
}
if( HasParam(wxT("bezel")))
{
control->SetBezelFace(GetDimension(wxT("bezel")));
}
SetupWindow(control); SetupWindow(control);