fixes for CW8 Mac Classic compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -138,7 +138,6 @@ extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
|
|||||||
// associate mac windows with wx counterparts
|
// associate mac windows with wx counterparts
|
||||||
|
|
||||||
wxTopLevelWindowMac* wxFindWinFromMacWindow( WXWindow inWindow ) ;
|
wxTopLevelWindowMac* wxFindWinFromMacWindow( WXWindow inWindow ) ;
|
||||||
void wxAssociateWinWithMacWindow(WXWindow inWindow, wxTopLevelWindowMac *win) ;
|
|
||||||
void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ;
|
void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1533,7 +1533,7 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
|
|||||||
::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ;
|
::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ;
|
||||||
|
|
||||||
short windowPart = ::FindWindow(ev->where, &window);
|
short windowPart = ::FindWindow(ev->where, &window);
|
||||||
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
|
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ;
|
||||||
if ( wxPendingDelete.Member(win) )
|
if ( wxPendingDelete.Member(win) )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
@@ -1707,7 +1707,7 @@ void wxApp::MacHandleMouseUpEvent( WXEVENTREF evr )
|
|||||||
break ;
|
break ;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
|
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ;
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacMouseUp( ev , windowPart ) ;
|
win->MacMouseUp( ev , windowPart ) ;
|
||||||
}
|
}
|
||||||
@@ -2025,7 +2025,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
|
|||||||
{
|
{
|
||||||
// if window is not having a focus still testing for default enter or cancel
|
// if window is not having a focus still testing for default enter or cancel
|
||||||
// TODO add the UMA version for ActiveNonFloatingWindow
|
// TODO add the UMA version for ActiveNonFloatingWindow
|
||||||
wxWindow* focus = wxFindWinFromMacWindow( FrontWindow() ) ;
|
wxWindow* focus = wxFindWinFromMacWindow( (WXWindow) FrontWindow() ) ;
|
||||||
if ( focus )
|
if ( focus )
|
||||||
{
|
{
|
||||||
if ( keyval == WXK_RETURN )
|
if ( keyval == WXK_RETURN )
|
||||||
@@ -2109,7 +2109,7 @@ void wxApp::MacHandleActivateEvent( WXEVENTREF evr )
|
|||||||
// if it is a floater we activate/deactivate the front non-floating window instead
|
// if it is a floater we activate/deactivate the front non-floating window instead
|
||||||
window = ::FrontNonFloatingWindow() ;
|
window = ::FrontNonFloatingWindow() ;
|
||||||
}
|
}
|
||||||
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
|
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ;
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacActivate( ev->when , activate ) ;
|
win->MacActivate( ev->when , activate ) ;
|
||||||
}
|
}
|
||||||
@@ -2119,7 +2119,7 @@ void wxApp::MacHandleUpdateEvent( WXEVENTREF evr )
|
|||||||
{
|
{
|
||||||
EventRecord* ev = (EventRecord*) evr ;
|
EventRecord* ev = (EventRecord*) evr ;
|
||||||
WindowRef window = (WindowRef) ev->message ;
|
WindowRef window = (WindowRef) ev->message ;
|
||||||
wxTopLevelWindowMac * win = wxFindWinFromMacWindow( window ) ;
|
wxTopLevelWindowMac * win = wxFindWinFromMacWindow( (WXWindow) window ) ;
|
||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
if ( !wxPendingDelete.Member(win) )
|
if ( !wxPendingDelete.Member(win) )
|
||||||
@@ -2177,13 +2177,13 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr )
|
|||||||
|
|
||||||
if ( oldFrontWindow )
|
if ( oldFrontWindow )
|
||||||
{
|
{
|
||||||
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( oldFrontWindow ) ;
|
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) oldFrontWindow ) ;
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacActivate( ev->when , false ) ;
|
win->MacActivate( ev->when , false ) ;
|
||||||
}
|
}
|
||||||
if ( newFrontWindow )
|
if ( newFrontWindow )
|
||||||
{
|
{
|
||||||
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( newFrontWindow ) ;
|
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) newFrontWindow ) ;
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacActivate( ev->when , true ) ;
|
win->MacActivate( ev->when , true ) ;
|
||||||
}
|
}
|
||||||
@@ -2265,7 +2265,7 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr )
|
|||||||
{
|
{
|
||||||
case inContent :
|
case inContent :
|
||||||
{
|
{
|
||||||
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
|
wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ;
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacMouseMoved( ev , windowPart ) ;
|
win->MacMouseMoved( ev , windowPart ) ;
|
||||||
else
|
else
|
||||||
|
@@ -70,7 +70,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , wxEmptyString , pos , wxSize( width , height ) ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , wxSize( width , height ) ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 ,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 ,
|
||||||
kControlBehaviorOffsetContents +
|
kControlBehaviorOffsetContents +
|
||||||
( bmap && bmap->m_bitmapType == kMacBitmapTypeIcon ?
|
( bmap && bmap->m_bitmapType == kMacBitmapTypeIcon ?
|
||||||
kControlContentCIconHandle : kControlContentPictHandle ) , 0,
|
kControlContentCIconHandle : kControlContentPictHandle ) , 0,
|
||||||
|
@@ -48,7 +48,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlPushButtonProc , (long) this ) ;
|
kControlPushButtonProc , (long) this ) ;
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
maxValue = 2 /* kControlCheckboxMixedValue */;
|
maxValue = 2 /* kControlCheckboxMixedValue */;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , maxValue,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , maxValue,
|
||||||
kControlCheckBoxProc , (long) this ) ;
|
kControlCheckBoxProc , (long) this ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
@@ -262,7 +262,7 @@ bool wxCheckListBox::Create(wxWindow *parent,
|
|||||||
long result ;
|
long result ;
|
||||||
|
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
||||||
kwxMacListWithVerticalScrollbar , 0 , 0,
|
kwxMacListWithVerticalScrollbar , 0 , 0,
|
||||||
kControlListBoxProc , (long) this ) ;
|
kControlListBoxProc , (long) this ) ;
|
||||||
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
||||||
|
@@ -67,7 +67,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 ,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 ,
|
||||||
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
|
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
|
||||||
|
|
||||||
m_macPopUpMenuHandle = NewUniqueMenu() ;
|
m_macPopUpMenuHandle = NewUniqueMenu() ;
|
||||||
|
@@ -78,7 +78,7 @@ pascal void wxMacLiveScrollbarActionProc( ControlHandle control , ControlPartCod
|
|||||||
wxControl* wx = (wxControl*) GetControlReference( control ) ;
|
wxControl* wx = (wxControl*) GetControlReference( control ) ;
|
||||||
if ( wx )
|
if ( wx )
|
||||||
{
|
{
|
||||||
wx->MacHandleControlClick( control , partCode , true /* stillDown */ ) ;
|
wx->MacHandleControlClick( (WXWidget) control , partCode , true /* stillDown */ ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -727,7 +727,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
|
|||||||
wxTheApp->s_lastMouseDown = 0 ;
|
wxTheApp->s_lastMouseDown = 0 ;
|
||||||
if ( control && controlpart != kControlNoPart )
|
if ( control && controlpart != kControlNoPart )
|
||||||
{
|
{
|
||||||
MacHandleControlClick( control , controlpart , false /* mouse not down anymore */ ) ;
|
MacHandleControlClick( (WXWidget) control , controlpart , false /* mouse not down anymore */ ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -770,7 +770,7 @@ void wxControl::DoSetWindowVariant( wxWindowVariant variant )
|
|||||||
// and make this NORMAL later, but first
|
// and make this NORMAL later, but first
|
||||||
// we have a few calculations that we must fix
|
// we have a few calculations that we must fix
|
||||||
|
|
||||||
if ( variant == wxWINDOW_VARIANT_DEFAULT )
|
if ( variant == wxWINDOW_VARIANT_NORMAL )
|
||||||
{
|
{
|
||||||
if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
|
if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
|
||||||
variant = wxWINDOW_VARIANT_NORMAL ;
|
variant = wxWINDOW_VARIANT_NORMAL ;
|
||||||
|
@@ -44,7 +44,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxDialog::Init()
|
void wxDialog::Init()
|
||||||
{
|
{
|
||||||
m_isModalStyle = false;
|
m_isModalStyle = false;
|
||||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
|
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
|
||||||
|
@@ -432,7 +432,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
|
|||||||
Point mouse, localMouse;
|
Point mouse, localMouse;
|
||||||
DragAttributes attributes;
|
DragAttributes attributes;
|
||||||
GetDragAttributes(theDrag, &attributes);
|
GetDragAttributes(theDrag, &attributes);
|
||||||
wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( theWindow ) ;
|
wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( (WXWindow) theWindow ) ;
|
||||||
|
|
||||||
KeyMap keymap;
|
KeyMap keymap;
|
||||||
GetKeys(keymap);
|
GetKeys(keymap);
|
||||||
|
@@ -45,7 +45,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style & 0xE0FFFFFF /* no borders on mac */ , validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style & 0xE0FFFFFF /* no borders on mac */ , validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range,
|
||||||
kControlProgressBarProc , (long) this ) ;
|
kControlProgressBarProc , (long) this ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
@@ -265,7 +265,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
long result ;
|
long result ;
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false ,
|
||||||
(style & wxLB_HSCROLL) ? kwxMacListWithVerticalAndHorizontalScrollbar : kwxMacListWithVerticalScrollbar ,
|
(style & wxLB_HSCROLL) ? kwxMacListWithVerticalAndHorizontalScrollbar : kwxMacListWithVerticalScrollbar ,
|
||||||
0 , 0, kControlListBoxProc , (long) this ) ;
|
0 , 0, kControlListBoxProc , (long) this ) ;
|
||||||
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag ,
|
||||||
|
@@ -195,7 +195,7 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
tabstyle = kControlTabSmallSouthProc ;
|
tabstyle = kControlTabSmallSouthProc ;
|
||||||
|
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
tabstyle , (long) this ) ;
|
tabstyle , (long) this ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
@@ -132,7 +132,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , wxStripMenuCodes(label) , pos , size ,style, val , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxStripMenuCodes(label) , pos , size ,style, val , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlGroupBoxTextTitleProc , (long) this ) ;
|
kControlGroupBoxTextTitleProc , (long) this ) ;
|
||||||
|
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
|
@@ -38,7 +38,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlRadioButtonProc , (long) this ) ;
|
kControlRadioButtonProc , (long) this ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
@@ -48,7 +48,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl(MAC_WXHWND(parent->MacGetRootWindow()) ,
|
m_macControl = (WXWidget) ::NewControl(MAC_WXHWND(parent->MacGetRootWindow()) ,
|
||||||
&bounds , title , false , 0 , 0 , 100,
|
&bounds , title , false , 0 , 0 , 100,
|
||||||
kControlScrollBarLiveProc , (long) this) ;
|
kControlScrollBarLiveProc , (long) this) ;
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, title, false,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, title, false,
|
||||||
value, minValue, maxValue, procID, (long) this);
|
value, minValue, maxValue, procID, (long) this);
|
||||||
|
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
@@ -53,7 +53,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100,
|
||||||
kControlLittleArrowsProc , (long) this ) ;
|
kControlLittleArrowsProc , (long) this ) ;
|
||||||
|
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
@@ -47,7 +47,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlGroupBoxTextTitleProc , (long) this ) ;
|
kControlGroupBoxTextTitleProc , (long) this ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
@@ -58,7 +58,7 @@ bool wxStaticLine::Create( wxWindow *parent,
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlSeparatorLineProc , (long) this ) ;
|
kControlSeparatorLineProc , (long) this ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
@@ -45,7 +45,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
|
|||||||
|
|
||||||
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlTabSmallProc , (long) this ) ;
|
kControlTabSmallProc , (long) this ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
@@ -774,7 +774,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
wxMacConvertNewlines13To10( &st ) ;
|
wxMacConvertNewlines13To10( &st ) ;
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , false , 0 , 0 , 1,
|
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , false , 0 , 0 , 1,
|
||||||
(style & wxTE_PASSWORD) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
|
(style & wxTE_PASSWORD) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
|
||||||
long size ;
|
long size ;
|
||||||
::GetControlData((ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*)((TEHandle *)&m_macTE) , &size ) ;
|
::GetControlData((ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*)((TEHandle *)&m_macTE) , &size ) ;
|
||||||
@@ -788,7 +788,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
| kControlWantsActivate | kControlHandlesTracking | kControlHasSpecialBackground
|
| kControlWantsActivate | kControlHandlesTracking | kControlHasSpecialBackground
|
||||||
| kControlGetsFocusOnClick | kControlSupportsLiveFeedback;
|
| kControlGetsFocusOnClick | kControlSupportsLiveFeedback;
|
||||||
/* create the control */
|
/* create the control */
|
||||||
m_macControl = NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", false , featurSet, 0, featurSet, kControlUserPaneProc, 0);
|
m_macControl = (WXWidget) ::NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", false , featurSet, 0, featurSet, kControlUserPaneProc, 0);
|
||||||
/* set up the mUP specific features and data */
|
/* set up the mUP specific features and data */
|
||||||
mUPOpenControl((ControlHandle) m_macControl, m_windowStyle );
|
mUPOpenControl((ControlHandle) m_macControl, m_windowStyle );
|
||||||
}
|
}
|
||||||
|
@@ -401,7 +401,7 @@ void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart ,
|
|||||||
wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ;
|
wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ;
|
||||||
if ( tool->IsButton() )
|
if ( tool->IsButton() )
|
||||||
{
|
{
|
||||||
if( tool->GetControlHandle() == control )
|
if( (WXWidget) tool->GetControlHandle() == control )
|
||||||
{
|
{
|
||||||
if ( tool->CanBeToggled() )
|
if ( tool->CanBeToggled() )
|
||||||
{
|
{
|
||||||
@@ -611,7 +611,7 @@ void wxToolBar::OnMouse( wxMouseEvent &event )
|
|||||||
wxTheApp->s_lastMouseDown = 0 ;
|
wxTheApp->s_lastMouseDown = 0 ;
|
||||||
if ( control && controlpart != kControlNoPart ) // otherwise we will get the event twice
|
if ( control && controlpart != kControlNoPart ) // otherwise we will get the event twice
|
||||||
{
|
{
|
||||||
MacHandleControlClick( control , controlpart , false /* not down anymore */ ) ;
|
MacHandleControlClick( (WXWidget) control , controlpart , false /* not down anymore */ ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -479,7 +479,8 @@ wxTopLevelWindowMac *wxFindWinFromMacWindow(WXWindow inWindowRef)
|
|||||||
return (wxTopLevelWindowMac *)node->GetData();
|
return (wxTopLevelWindowMac *)node->GetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
|
void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win);
|
||||||
|
void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win)
|
||||||
{
|
{
|
||||||
// adding NULL WindowRef is (first) surely a result of an error and
|
// adding NULL WindowRef is (first) surely a result of an error and
|
||||||
// (secondly) breaks menu command processing
|
// (secondly) breaks menu command processing
|
||||||
@@ -499,7 +500,7 @@ void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win)
|
|||||||
// wxTopLevelWindowMac creation
|
// wxTopLevelWindowMac creation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
WXHWND wxTopLevelWindowMac::s_macWindowInUpdate = NULL;
|
WXWindow wxTopLevelWindowMac::s_macWindowInUpdate = NULL;
|
||||||
wxTopLevelWindowMac *wxTopLevelWindowMac::s_macDeactivateWindow = NULL;
|
wxTopLevelWindowMac *wxTopLevelWindowMac::s_macDeactivateWindow = NULL;
|
||||||
bool wxTopLevelWindowMac::s_macWindowCompositing = FALSE;
|
bool wxTopLevelWindowMac::s_macWindowCompositing = FALSE;
|
||||||
|
|
||||||
@@ -774,7 +775,7 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxCHECK_RET( err == noErr, wxT("Mac OS error when trying to create new window") );
|
wxCHECK_RET( err == noErr, wxT("Mac OS error when trying to create new window") );
|
||||||
wxAssociateWinWithMacWindow( m_macWindow , this ) ;
|
wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ;
|
||||||
UMASetWTitle( (WindowRef)m_macWindow , title , m_font.GetEncoding() ) ;
|
UMASetWTitle( (WindowRef)m_macWindow , title , m_font.GetEncoding() ) ;
|
||||||
if ( wxTopLevelWindowMac::s_macWindowCompositing )
|
if ( wxTopLevelWindowMac::s_macWindowCompositing )
|
||||||
{
|
{
|
||||||
@@ -812,7 +813,7 @@ bool wxTopLevelWindowMac::MacEnableCompositing( bool useCompositing )
|
|||||||
return oldval;
|
return oldval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXHWND *window , wxWindowMac** rootwin)
|
void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXWindow *window , wxWindowMac** rootwin)
|
||||||
{
|
{
|
||||||
((Point*)localOrigin)->h = 0;
|
((Point*)localOrigin)->h = 0;
|
||||||
((Point*)localOrigin)->v = 0;
|
((Point*)localOrigin)->v = 0;
|
||||||
|
@@ -977,7 +977,7 @@ const wxBrush& wxWindowMac::MacGetBackgroundBrush()
|
|||||||
wxWindowMac* parent = GetParent() ;
|
wxWindowMac* parent = GetParent() ;
|
||||||
while( parent )
|
while( parent )
|
||||||
{
|
{
|
||||||
if ( parent->MacGetRootWindow() != window )
|
if ( parent->MacGetRootWindow() != (WXWindow) window )
|
||||||
{
|
{
|
||||||
// we are in a different window on the mac system
|
// we are in a different window on the mac system
|
||||||
parent = NULL ;
|
parent = NULL ;
|
||||||
@@ -1427,7 +1427,7 @@ bool wxWindowMac::MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac**
|
|||||||
{
|
{
|
||||||
wxWindowMac *child = node->GetData();
|
wxWindowMac *child = node->GetData();
|
||||||
// added the m_isShown test --dmazzoni
|
// added the m_isShown test --dmazzoni
|
||||||
if ( child->MacGetRootWindow() == window && child->m_isShown )
|
if ( child->MacGetRootWindow() == (WXWindow) window && child->m_isShown )
|
||||||
{
|
{
|
||||||
if (child->MacGetWindowFromPointSub(newPoint , outWin ))
|
if (child->MacGetWindowFromPointSub(newPoint , outWin ))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -1446,7 +1446,7 @@ bool wxWindowMac::MacGetWindowFromPoint( const wxPoint &screenpoint , wxWindowMa
|
|||||||
if ( ::FindWindow( pt , &window ) == 3 )
|
if ( ::FindWindow( pt , &window ) == 3 )
|
||||||
{
|
{
|
||||||
|
|
||||||
wxWindowMac* win = wxFindWinFromMacWindow( window ) ;
|
wxWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ;
|
||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
// No, this yields the CLIENT are, we need the whole frame. RR.
|
// No, this yields the CLIENT are, we need the whole frame. RR.
|
||||||
@@ -1531,7 +1531,7 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event)
|
|||||||
for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
|
for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
|
||||||
{
|
{
|
||||||
wxWindowMac *child = node->GetData();
|
wxWindowMac *child = node->GetData();
|
||||||
if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() )
|
if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->IsEnabled() )
|
||||||
{
|
{
|
||||||
if (child->MacDispatchMouseEvent(event))
|
if (child->MacDispatchMouseEvent(event))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -1634,7 +1634,7 @@ wxTopLevelWindowMac* wxWindowMac::MacGetTopLevelWindow() const
|
|||||||
WindowRef window = (WindowRef) MacGetRootWindow() ;
|
WindowRef window = (WindowRef) MacGetRootWindow() ;
|
||||||
if ( window )
|
if ( window )
|
||||||
{
|
{
|
||||||
win = wxFindWinFromMacWindow( window ) ;
|
win = wxFindWinFromMacWindow( (WXWindow) window ) ;
|
||||||
}
|
}
|
||||||
return win ;
|
return win ;
|
||||||
}
|
}
|
||||||
@@ -1797,7 +1797,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase)
|
|||||||
{
|
{
|
||||||
wxControl *child = wxDynamicCast( ( wxWindow*)node->GetData() , wxControl ) ;
|
wxControl *child = wxDynamicCast( ( wxWindow*)node->GetData() , wxControl ) ;
|
||||||
|
|
||||||
if ( child && child->MacGetRootWindow() == window && child->IsShown() && child->GetMacControl() )
|
if ( child && child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->GetMacControl() )
|
||||||
{
|
{
|
||||||
SetControlVisibility( (ControlHandle) child->GetMacControl() , false , false ) ;
|
SetControlVisibility( (ControlHandle) child->GetMacControl() , false , false ) ;
|
||||||
hiddenWindows.Append( child ) ;
|
hiddenWindows.Append( child ) ;
|
||||||
@@ -1832,7 +1832,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase)
|
|||||||
SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
||||||
SectRgn( childupdate , updatergn , childupdate ) ;
|
SectRgn( childupdate , updatergn , childupdate ) ;
|
||||||
OffsetRgn( childupdate , -child->m_x , -child->m_y ) ;
|
OffsetRgn( childupdate , -child->m_x , -child->m_y ) ;
|
||||||
if ( child->MacGetRootWindow() == window && child->IsShown() && !EmptyRgn( childupdate ) )
|
if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && !EmptyRgn( childupdate ) )
|
||||||
{
|
{
|
||||||
// because dialogs may also be children
|
// because dialogs may also be children
|
||||||
child->MacRedraw( childupdate , time , erase ) ;
|
child->MacRedraw( childupdate , time , erase ) ;
|
||||||
@@ -1843,7 +1843,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHWND wxWindowMac::MacGetRootWindow() const
|
WXWindow wxWindowMac::MacGetRootWindow() const
|
||||||
{
|
{
|
||||||
wxWindowMac *iter = (wxWindowMac*)this ;
|
wxWindowMac *iter = (wxWindowMac*)this ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user