projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved the cleanup code to an EVT_WINDOW_DESTROY handler.
[wxWidgets.git]
/
src
/
mac
/
slider.cpp
diff --git
a/src/mac/slider.cpp
b/src/mac/slider.cpp
index 459a15c76b7820119de7b3058bbf0837044c8dbe..f76b09fc6857e22c36db4c69a2b7b62b46735ba6 100644
(file)
--- a/
src/mac/slider.cpp
+++ b/
src/mac/slider.cpp
@@
-84,12
+84,12
@@
bool wxSlider::Create(wxWindow *parent, wxWindowID id,
}
}
- m_macControl = ::NewControl(
parent->GetMacRootWindow(
), &bounds, title, false,
+ m_macControl = ::NewControl(
MAC_WXHWND(parent->MacGetRootWindow()
), &bounds, title, false,
value, minValue, maxValue, procID, (long) this);
value, minValue, maxValue, procID, (long) this);
- wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ;
+ wxASSERT_MSG(
(ControlHandle)
m_macControl != NULL , "No valid mac control" ) ;
- ::SetControlAction( m_macControl , wxMacLiveScrollbarActionUPP ) ;
+ ::SetControlAction(
(ControlHandle)
m_macControl , wxMacLiveScrollbarActionUPP ) ;
if(style & wxSL_LABELS)
{
if(style & wxSL_LABELS)
{
@@
-127,7
+127,7
@@
wxSlider::~wxSlider()
int wxSlider::GetValue() const
{
int wxSlider::GetValue() const
{
- return GetControlValue( m_macControl) ;
+ return GetControlValue(
(ControlHandle)
m_macControl) ;
}
void wxSlider::SetValue(int value)
}
void wxSlider::SetValue(int value)
@@
-136,7
+136,7
@@
void wxSlider::SetValue(int value)
valuestring.Printf( "%d" , value ) ;
if ( m_macValueStatic )
m_macValueStatic->SetLabel( valuestring ) ;
valuestring.Printf( "%d" , value ) ;
if ( m_macValueStatic )
m_macValueStatic->SetLabel( valuestring ) ;
- SetControlValue( m_macControl , value ) ;
+ SetControlValue(
(ControlHandle)
m_macControl , value ) ;
}
void wxSlider::SetRange(int minValue, int maxValue)
}
void wxSlider::SetRange(int minValue, int maxValue)
@@
-146,8
+146,8
@@
void wxSlider::SetRange(int minValue, int maxValue)
m_rangeMin = minValue;
m_rangeMax = maxValue;
m_rangeMin = minValue;
m_rangeMax = maxValue;
- SetControlMinimum(m_macControl, m_rangeMin);
- SetControlMaximum(m_macControl, m_rangeMax);
+ SetControlMinimum(
(ControlHandle)
m_macControl, m_rangeMin);
+ SetControlMaximum(
(ControlHandle)
m_macControl, m_rangeMax);
if(m_macMinimumStatic) {
value.Printf("%d", m_rangeMin);
if(m_macMinimumStatic) {
value.Printf("%d", m_rangeMin);
@@
-239,9
+239,9
@@
void wxSlider::Command (wxCommandEvent & event)
ProcessCommand (event);
}
ProcessCommand (event);
}
-void wxSlider::MacHandleControlClick(
ControlHandle control , S
Int16 controlpart )
+void wxSlider::MacHandleControlClick(
WXWidget control , wx
Int16 controlpart )
{
{
- SInt16 value = ::GetControlValue( m_macControl ) ;
+ SInt16 value = ::GetControlValue(
(ControlHandle)
m_macControl ) ;
SetValue( value ) ;
SetValue( value ) ;
@@
-372,7
+372,7
@@
void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart
GetParent()->MacClientToRootWindow(&mac_x, &mac_y);
}
GetParent()->MacClientToRootWindow(&mac_x, &mac_y);
}
- GetControlBounds(m_macControl, &oldbounds);
+ GetControlBounds(
(ControlHandle)
m_macControl, &oldbounds);
oldbounds.right = oldbounds.left + m_width;
oldbounds.bottom = oldbounds.top + m_height;
oldbounds.right = oldbounds.left + m_width;
oldbounds.bottom = oldbounds.top + m_height;
@@
-408,7
+408,7
@@
void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart
// Update window at old and new positions
SetRect(&newbounds, m_x, m_y, m_x + m_width, m_y + m_height);
// Update window at old and new positions
SetRect(&newbounds, m_x, m_y, m_x + m_width, m_y + m_height);
- WindowRef rootwindow =
GetMac
RootWindow();
+ WindowRef rootwindow =
(WindowRef) MacGet
RootWindow();
InvalWindowRect( rootwindow , &oldbounds );
InvalWindowRect( rootwindow , &newbounds );
InvalWindowRect( rootwindow , &oldbounds );
InvalWindowRect( rootwindow , &newbounds );
@@
-485,6
+485,6
@@
void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart
if(GetParent()) {
GetParent()->MacClientToRootWindow(&x, &y);
}
if(GetParent()) {
GetParent()->MacClientToRootWindow(&x, &y);
}
- UMAMoveControl(m_macControl, x, y);
- UMASizeControl(m_macControl, width - xborder, height - yborder);
+ UMAMoveControl(
(ControlHandle)
m_macControl, x, y);
+ UMASizeControl(
(ControlHandle)
m_macControl, width - xborder, height - yborder);
}
\ No newline at end of file
}
\ No newline at end of file