projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixing effects of my lack of English skills: GetImagesCount back to GetImageCount
[wxWidgets.git]
/
src
/
mac
/
scrolbar.cpp
diff --git
a/src/mac/scrolbar.cpp
b/src/mac/scrolbar.cpp
index a432b3e9b122d7542304fc72e50333712a16c4c8..51c01e4cefec4ea31db117e7dd7faedcbc50ad80 100644
(file)
--- a/
src/mac/scrolbar.cpp
+++ b/
src/mac/scrolbar.cpp
@@
-13,6
+13,8
@@
#pragma implementation "scrolbar.h"
#endif
#pragma implementation "scrolbar.h"
#endif
+#include "wx/defs.h"
+
#include "wx/scrolbar.h"
#include "wx/mac/uma.h"
#include "wx/scrolbar.h"
#include "wx/mac/uma.h"
@@
-41,7
+43,7
@@
bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
- m_macControl =
UMANewControl( parent->GetMac
RootWindow() , &bounds , title , true , 0 , 0 , 100,
+ m_macControl =
::NewControl( parent->MacGet
RootWindow() , &bounds , title , true , 0 , 0 , 100,
kControlScrollBarLiveProc , (long) this ) ;
wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ;
kControlScrollBarLiveProc , (long) this ) ;
wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ;
@@
-82,9
+84,10
@@
void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
if ( UMAGetAppearanceVersion() >= 0x0110 )
{
if ( UMAGetAppearanceVersion() >= 0x0110 )
{
-#if UMA_USE_8_6
+ if ( SetControlViewSize != (void*) kUnresolvedCFragSymbolAddress )
+ {
SetControlViewSize( m_macControl , m_pageSize ) ;
SetControlViewSize( m_macControl , m_pageSize ) ;
-#endif
+ }
}
Refresh() ;
}
}
Refresh() ;
}
@@
-111,19
+114,19
@@
void wxScrollBar::MacHandleControlClick( ControlHandle control , SInt16 controlp
switch( controlpart )
{
case kControlUpButtonPart :
switch( controlpart )
{
case kControlUpButtonPart :
- nScrollInc = -
1
;
+ nScrollInc = -
m_pageSize
;
scrollEvent = wxEVT_SCROLL_LINEUP;
break ;
case kControlDownButtonPart :
scrollEvent = wxEVT_SCROLL_LINEUP;
break ;
case kControlDownButtonPart :
- nScrollInc =
1
;
+ nScrollInc =
m_pageSize
;
scrollEvent = wxEVT_SCROLL_LINEDOWN;
break ;
case kControlPageUpPart :
scrollEvent = wxEVT_SCROLL_LINEDOWN;
break ;
case kControlPageUpPart :
- nScrollInc = -m_
page
Size;
+ nScrollInc = -m_
view
Size;
scrollEvent = wxEVT_SCROLL_PAGEUP;
break ;
case kControlPageDownPart :
scrollEvent = wxEVT_SCROLL_PAGEUP;
break ;
case kControlPageDownPart :
- nScrollInc = m_
page
Size;
+ nScrollInc = m_
view
Size;
scrollEvent = wxEVT_SCROLL_PAGEDOWN;
break ;
case kControlIndicatorPart :
scrollEvent = wxEVT_SCROLL_PAGEDOWN;
break ;
case kControlIndicatorPart :
@@
-152,6
+155,13
@@
void wxScrollBar::MacHandleControlClick( ControlHandle control , SInt16 controlp
}
event.SetPosition(new_pos);
event.SetEventObject( this );
}
event.SetPosition(new_pos);
event.SetEventObject( this );
- GetEventHandler()->ProcessEvent(event);
+ wxWindow* window = GetParent() ;
+ if (window && window->MacIsWindowScrollbar(this) )
+ {
+ // this is hardcoded
+ window->MacOnScroll(event);
+ }
+ else
+ GetEventHandler()->ProcessEvent(event);
}
}