Build fix for 2.6 compatibility off.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: scrolbar.cpp
|
// Name: src/os2/scrolbar.cpp
|
||||||
// Purpose: wxScrollBar
|
// Purpose: wxScrollBar
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/defs.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/utils.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/scrolbar.h"
|
#include "wx/scrolbar.h"
|
||||||
@@ -23,17 +22,16 @@
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
|
||||||
|
|
||||||
// Scrollbar
|
// Scrollbar
|
||||||
bool wxScrollBar::Create (
|
bool wxScrollBar::Create(wxWindow* pParent,
|
||||||
wxWindow* pParent
|
wxWindowID vId,
|
||||||
, wxWindowID vId
|
const wxPoint& rPos,
|
||||||
, const wxPoint& rPos
|
const wxSize& rSize,
|
||||||
, const wxSize& rSize
|
long lStyle,
|
||||||
, long lStyle
|
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
, const wxValidator& rValidator
|
const wxValidator& rValidator,
|
||||||
#endif
|
#endif
|
||||||
, const wxString& rsName
|
const wxString& rsName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int nX = rPos.x;
|
int nX = rPos.x;
|
||||||
int nY = rPos.y;
|
int nY = rPos.y;
|
||||||
@@ -41,7 +39,8 @@ bool wxScrollBar::Create (
|
|||||||
int nHeight = rSize.y;
|
int nHeight = rSize.y;
|
||||||
|
|
||||||
if (!pParent)
|
if (!pParent)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
pParent->AddChild(this);
|
pParent->AddChild(this);
|
||||||
SetName(rsName);
|
SetName(rsName);
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
@@ -50,19 +49,19 @@ bool wxScrollBar::Create (
|
|||||||
SetBackgroundColour(pParent->GetBackgroundColour()) ;
|
SetBackgroundColour(pParent->GetBackgroundColour()) ;
|
||||||
SetForegroundColour(pParent->GetForegroundColour()) ;
|
SetForegroundColour(pParent->GetForegroundColour()) ;
|
||||||
|
|
||||||
if (vId == -1L)
|
if (vId == wxID_ANY)
|
||||||
m_windowId = (int)NewControlId();
|
m_windowId = (int)NewControlId();
|
||||||
else
|
else
|
||||||
m_windowId = vId;
|
m_windowId = vId;
|
||||||
|
|
||||||
if (nWidth == -1)
|
if (nWidth == wxDefaultCoord)
|
||||||
{
|
{
|
||||||
if (lStyle & wxHORIZONTAL)
|
if (lStyle & wxHORIZONTAL)
|
||||||
nWidth = 140;
|
nWidth = 140;
|
||||||
else
|
else
|
||||||
nWidth = 14;
|
nWidth = 14;
|
||||||
}
|
}
|
||||||
if (nHeight == -1)
|
if (nHeight == wxDefaultCoord)
|
||||||
{
|
{
|
||||||
if (lStyle & wxVERTICAL)
|
if (lStyle & wxVERTICAL)
|
||||||
nHeight = 140;
|
nHeight = 140;
|
||||||
@@ -111,7 +110,7 @@ bool wxScrollBar::Create (
|
|||||||
,nWidth
|
,nWidth
|
||||||
,nHeight
|
,nHeight
|
||||||
);
|
);
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxScrollBar::Create
|
} // end of wxScrollBar::Create
|
||||||
|
|
||||||
wxScrollBar::~wxScrollBar()
|
wxScrollBar::~wxScrollBar()
|
||||||
@@ -191,7 +190,7 @@ bool wxScrollBar::OS2OnScroll ( int WXUNUSED(nOrientation),
|
|||||||
|
|
||||||
case SB_ENDSCROLL:
|
case SB_ENDSCROLL:
|
||||||
nScrollInc = 0;
|
nScrollInc = 0;
|
||||||
vScrollEvent = wxEVT_SCROLL_ENDSCROLL;
|
vScrollEvent = wxEVT_SCROLL_CHANGED;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -208,7 +207,7 @@ bool wxScrollBar::OS2OnScroll ( int WXUNUSED(nOrientation),
|
|||||||
SetThumbPosition(nPosition);
|
SetThumbPosition(nPosition);
|
||||||
}
|
}
|
||||||
else if ( vScrollEvent != wxEVT_SCROLL_THUMBRELEASE &&
|
else if ( vScrollEvent != wxEVT_SCROLL_THUMBRELEASE &&
|
||||||
vScrollEvent != wxEVT_SCROLL_ENDSCROLL
|
vScrollEvent != wxEVT_SCROLL_CHANGED
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user