Unused parameters markup.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2004-08-05 16:46:32 +00:00
parent 77f5549a2b
commit d95de15439
3 changed files with 45 additions and 39 deletions

View File

@ -66,7 +66,7 @@ END_EVENT_TABLE()
wxControl::~wxControl()
{
m_isBeingDeleted = TRUE;
m_isBeingDeleted = true;
}
// ----------------------------------------------------------------------------
@ -82,13 +82,13 @@ bool wxControl::Create(wxWindow *parent,
const wxString& name)
{
if ( !wxWindow::Create(parent, id, pos, size, style, name) )
return FALSE;
return false;
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
return TRUE;
return true;
}
bool wxControl::MSWCreateControl(const wxChar *classname,
@ -126,10 +126,10 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
}
// choose the position for the control
int x = pos.x == -1 ? 0 : pos.x,
y = pos.y == -1 ? 0 : pos.y,
w = size.x == -1 ? 0 : size.x,
h = size.y == -1 ? 0 : size.y;
int x = pos.x == wxDefaultCoord ? 0 : pos.x,
y = pos.y == wxDefaultCoord ? 0 : pos.y,
w = size.x == wxDefaultCoord ? 0 : size.x,
h = size.y == wxDefaultCoord ? 0 : size.y;
// ... and adjust it to account for a possible parent frames toolbar
AdjustForParentClientOrigin(x, y);
@ -152,14 +152,14 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
wxLogDebug(wxT("Failed to create a control of class '%s'"), classname);
wxFAIL_MSG(_T("something is very wrong, CreateWindowEx failed"));
return FALSE;
return false;
}
#if wxUSE_CTL3D
if ( want3D )
{
Ctl3dSubclassCtl(GetHwnd());
m_useCtl3D = TRUE;
m_useCtl3D = true;
}
#endif // wxUSE_CTL3D
@ -174,7 +174,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
// set the size now if no initial size specified
SetInitialBestSize(size);
return TRUE;
return true;
}
// ----------------------------------------------------------------------------
@ -236,6 +236,25 @@ wxControl::GetCompositeControlsDefaultAttributes(wxWindowVariant WXUNUSED(varian
return attrs;
}
// This is a helper for all wxControls derived from UPDOWN native control.
// In wxMSW it was only wxSpinCtrl derived from wxSpinButton but in
// Smartphones this happens also for native wxTextCtrl, wxChoice and others.
wxSize wxControl::GetBestSpinerSize(bool is_vertical)
{
if (is_vertical)
{
// vertical control
return wxSize(GetSystemMetrics(SM_CXVSCROLL),
2*GetSystemMetrics(SM_CYVSCROLL));
}
else
{
// horizontal control
return wxSize(2*GetSystemMetrics(SM_CXHSCROLL),
GetSystemMetrics(SM_CYHSCROLL));
}
}
// ----------------------------------------------------------------------------
// message handling
// ----------------------------------------------------------------------------
@ -360,7 +379,7 @@ WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED
//
// Call this repeatedly for several wnds to find the overall size
// of the widget.
// Call it initially with -1 for all values in rect.
// Call it initially with wxDefaultCoord for all values in rect.
// Keep calling for other widgets, and rect will be modified
// to calculate largest bounding rectangle.
void wxFindMaxSize(WXHWND wnd, RECT *rect)

View File

@ -112,13 +112,13 @@ void GSocketGUIFunctionsTableNull::OnExit()
{}
bool GSocketGUIFunctionsTableNull::CanUseEventLoop()
{ return false; }
bool GSocketGUIFunctionsTableNull::Init_Socket(GSocket *socket)
bool GSocketGUIFunctionsTableNull::Init_Socket(GSocket *WXUNUSED(socket))
{ return true; }
void GSocketGUIFunctionsTableNull::Destroy_Socket(GSocket *socket)
void GSocketGUIFunctionsTableNull::Destroy_Socket(GSocket *WXUNUSED(socket))
{}
void GSocketGUIFunctionsTableNull::Enable_Events(GSocket *socket)
void GSocketGUIFunctionsTableNull::Enable_Events(GSocket *WXUNUSED(socket))
{}
void GSocketGUIFunctionsTableNull::Disable_Events(GSocket *socket)
void GSocketGUIFunctionsTableNull::Disable_Events(GSocket *WXUNUSED(socket))
{}
/* Global initialisers */

View File

@ -99,9 +99,9 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h")
wxBEGIN_PROPERTIES_TABLE(wxSpinButton)
wxEVENT_RANGE_PROPERTY( Spin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent )
wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Min , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Min , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY_FLAGS( WindowStyle , wxSpinButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
@ -127,7 +127,7 @@ bool wxSpinButton::Create(wxWindow *parent,
const wxString& name)
{
// basic initialization
m_windowId = (id == -1) ? NewControlId() : id;
m_windowId = (id == wxID_ANY) ? NewControlId() : id;
SetName(name);
@ -186,7 +186,7 @@ bool wxSpinButton::Create(wxWindow *parent,
{
wxLogLastError(wxT("CreateUpDownControl"));
return FALSE;
return false;
}
if ( parent )
@ -198,7 +198,7 @@ bool wxSpinButton::Create(wxWindow *parent,
SetBestSize(size);
return TRUE;
return true;
}
wxSpinButton::~wxSpinButton()
@ -211,18 +211,7 @@ wxSpinButton::~wxSpinButton()
wxSize wxSpinButton::DoGetBestSize() const
{
if ( (GetWindowStyle() & wxSP_VERTICAL) != 0 )
{
// vertical control
return wxSize(GetSystemMetrics(SM_CXVSCROLL),
2*GetSystemMetrics(SM_CYVSCROLL));
}
else
{
// horizontal control
return wxSize(2*GetSystemMetrics(SM_CXHSCROLL),
GetSystemMetrics(SM_CYHSCROLL));
}
return GetBestSpinerSize( (GetWindowStyle() & wxSP_VERTICAL) != 0 );
}
// ----------------------------------------------------------------------------
@ -286,7 +275,7 @@ bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
if ( wParam != SB_THUMBPOSITION )
{
// probable SB_ENDSCROLL - we don't react to it
return FALSE;
return false;
}
wxSpinEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId);
@ -301,7 +290,7 @@ bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *
NM_UPDOWN *lpnmud = (NM_UPDOWN *)lParam;
if (lpnmud->hdr.hwndFrom != GetHwnd()) // make sure it is the right control
return FALSE;
return false;
wxSpinEvent event(lpnmud->iDelta > 0 ? wxEVT_SCROLL_LINEUP
: wxEVT_SCROLL_LINEDOWN,
@ -319,11 +308,9 @@ bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *
bool wxSpinButton::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD WXUNUSED(id))
{
// No command messages
return FALSE;
return false;
}
#endif // __WIN95__
#endif
// wxUSE_SPINCTN
#endif // wxUSE_SPINBTN