}
- m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , "\p" , true , 0 , 0 , 1,
+ m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , true , 0 , 0 , 1,
( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
MacPostControlCreate() ;
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
(*teH)->lineHeight = -1 ;
}
value = wxMacMakeMacStringFromPC( st ) ;
else
value = st ;
- ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
+ ::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
return TRUE;
}
wxString wxTextCtrl::GetValue() const
{
Size actualsize;
- ::GetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
+ ::GetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
wxBuffer[actualsize] = 0 ;
if( wxApp::s_macDefaultEncodingIsPC )
return wxMacMakePCStringFromMac( wxBuffer ) ;
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
*from = (**teH).selStart;
*to = (**teH).selEnd;
value = wxMacMakeMacStringFromPC( st ) ;
else
value = st ;
- ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
- WindowRef window = MacGetRootWindow() ;
- if ( window )
- {
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
- if ( win )
- {
- wxMacDrawingHelper help( win ) ;
- // the mac control manager always assumes to have the origin at 0,0
- SetOrigin( 0 , 0 ) ;
-
- bool hasTabBehind = false ;
- wxWindow* parent = GetParent() ;
- while ( parent )
- {
- if( parent->IsTopLevel() )
- {
-// ::SetThemeWindowBackground( win->MacGetRootWindow() , kThemeBrushDialogBackgroundActive , false ) ;
- break ;
- }
-
- if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
- {
- if ( ((wxControl*)parent)->GetMacControl() )
- SetUpControlBackground( ((wxControl*)parent)->GetMacControl() , -1 , true ) ;
- break ;
- }
-
- parent = parent->GetParent() ;
- }
-
- UMADrawControl( m_macControl ) ;
-// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
- }
- }
+ ::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
+ MacRedrawControl() ;
}
// Clipboard operations
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TECopy( teH ) ;
ClearCurrentScrap();
TEToScrap() ;
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TECut( teH ) ;
ClearCurrentScrap();
TEToScrap() ;
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TEFromScrap() ;
TEPaste( teH ) ;
- WindowRef window = MacGetRootWindow() ;
- if ( window )
- {
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
- if ( win )
- {
- wxMacDrawingHelper help( win ) ;
- // the mac control manager always assumes to have the origin at 0,0
- SetOrigin( 0 , 0 ) ;
-
- bool hasTabBehind = false ;
- wxWindow* parent = GetParent() ;
- while ( parent )
- {
- if( parent->IsTopLevel() )
- {
-// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ;
- break ;
- }
-
- if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
- {
- if ( ((wxControl*)parent)->GetMacControl() )
- SetUpControlBackground( ((wxControl*)parent)->GetMacControl() , -1 , true ) ;
- break ;
- }
-
- parent = parent->GetParent() ;
- }
-
- UMADrawControl( m_macControl ) ;
-// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
- }
- }
+ MacRedrawControl() ;
}
}
void wxTextCtrl::SetEditable(bool editable)
{
if ( editable )
- UMAActivateControl( m_macControl ) ;
+ UMAActivateControl( (ControlHandle) m_macControl ) ;
else
- UMADeactivateControl( m_macControl ) ;
+ UMADeactivateControl( (ControlHandle) m_macControl ) ;
}
void wxTextCtrl::SetInsertionPoint(long pos)
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
-// ::GetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+// ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection , &size ) ;
return (**teH).selStart ;
}
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
-// ::GetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection , &size ) ;
+// ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection , &size ) ;
return (**teH).teLength ;
}
selection.selStart = from ;
selection.selEnd = to ;
- ::SetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::SetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TESetSelect( from , to , teH ) ;
TEDelete( teH ) ;
TEInsert( value , value.Length() , teH ) ;
selection.selStart = from ;
selection.selEnd = to ;
- ::SetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::SetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TEDelete( teH ) ;
Refresh() ;
}
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
selection.selStart = from ;
selection.selEnd = to ;
- ::SetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
+ ::SetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
TESetSelect( selection.selStart , selection.selEnd , teH ) ;
}
wxBuffer[text.Length() ] = 0 ;
// wxMacConvertNewlines( wxBuffer , wxBuffer ) ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TEInsert( wxBuffer , strlen( wxBuffer) , teH ) ;
Refresh() ;
void wxTextCtrl::Clear()
{
- ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 0 , (char*) ((const char*)NULL) ) ;
+ ::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 0 , (char*) ((const char*)NULL) ) ;
Refresh() ;
}
int wxTextCtrl::GetNumberOfLines() const
{
Size actualsize;
- ::GetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
+ ::GetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
int count = 1;
for (int i = 0; i < actualsize; i++)
int wxTextCtrl::GetLineLength(long lineNo) const
{
Size actualsize;
- ::GetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
+ ::GetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
// Find line first
int count = 0;
wxString wxTextCtrl::GetLineText(long lineNo) const
{
Size actualsize;
- ::GetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
+ ::GetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
// Find line first
int count = 0;
break;
}
- EventRecord *ev = wxTheApp->MacGetCurrentEvent();
+ EventRecord *ev = (EventRecord*) wxTheApp->MacGetCurrentEvent();
short keychar = short(ev->message & charCodeMask);
if (!eat_key)
{
short keycode = short(ev->message & keyCodeMask) >> 8 ;
- ::HandleControlKey( m_macControl , keycode , keychar , ev->modifiers );
+ ::HandleControlKey( (ControlHandle) m_macControl , keycode , keychar , ev->modifiers );
}
if ( keychar >= 0x20 ||
key_event.KeyCode() == WXK_RETURN ||
if ( style & wxTE_PASSWORD )
{
- m_macControl = ::NewControl( parent->MacGetRootWindow() , &bounds , "\p" , true , 0 , 0 , 1,
+ m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , true , 0 , 0 , 1,
kControlEditTextPasswordProc , (long) this ) ;
}
else
if ( style & wxTE_PASSWORD )
{
- ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
+ ::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
}
else
{
STPTextPaneVars **tpvars;
/* set up locals */
- tpvars = (STPTextPaneVars **) GetControlReference(m_macControl);
+ tpvars = (STPTextPaneVars **) GetControlReference( (ControlHandle) m_macControl);
/* set the text in the record */
TXNSetData( (**tpvars).fTXNRec, kTXNTextData, (const char*)value, value.Length(),
kTXNStartOffset, kTXNEndOffset);
Size actualsize;
if ( m_windowStyle & wxTE_PASSWORD )
{
- ::GetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
+ ::GetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
}
else
{
STPTextPaneVars **tpvars;
OSStatus err;
/* set up locals */
- tpvars = (STPTextPaneVars **) GetControlReference(m_macControl);
+ tpvars = (STPTextPaneVars **) GetControlReference( (ControlHandle) m_macControl);
/* extract the text from the record */
Handle theText ;
err = TXNGetDataEncoded( (**tpvars).fTXNRec, kTXNStartOffset, kTXNEndOffset, &theText , kTXNTextData );
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
*from = (**teH).selStart;
*to = (**teH).selEnd;
STPTextPaneVars **tpvars;
/* set up locals */
- tpvars = (STPTextPaneVars **) GetControlReference(m_macControl);
+ tpvars = (STPTextPaneVars **) GetControlReference( (ControlHandle) m_macControl);
TXNGetSelection( (**tpvars).fTXNRec , (TXNOffset*) from , (TXNOffset*) to ) ;
value = st ;
if ( m_windowStyle & wxTE_PASSWORD )
{
- ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
+ ::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
}
else
{
STPTextPaneVars **tpvars;
/* set up locals */
- tpvars = (STPTextPaneVars **) GetControlReference(m_macControl);
+ tpvars = (STPTextPaneVars **) GetControlReference( (ControlHandle) m_macControl);
/* set the text in the record */
TXNSetData( (**tpvars).fTXNRec, kTXNTextData, (const char*)value, value.Length(),
kTXNStartOffset, kTXNEndOffset);
}
- WindowRef window = MacGetRootWindow() ;
- if ( window )
- {
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
- if ( win )
- {
- wxMacDrawingHelper help( win ) ;
- // the mac control manager always assumes to have the origin at 0,0
- SetOrigin( 0 , 0 ) ;
-
- bool hasTabBehind = false ;
- wxWindow* parent = GetParent() ;
- while ( parent )
- {
- if( parent->MacGetWindowData() )
- {
- UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ;
- break ;
- }
-
- if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
- {
- if ( ((wxControl*)parent)->GetMacControl() )
- SetUpControlBackground( ((wxControl*)parent)->GetMacControl() , -1 , true ) ;
- break ;
- }
-
- parent = parent->GetParent() ;
- }
-
- UMADrawControl( m_macControl ) ;
- UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
- }
- }
+ MacRedrawControl() ;
}
// Clipboard operations
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TECopy( teH ) ;
ClearCurrentScrap();
TEToScrap() ;
}
else
{
- mUPDoEditCommand( m_macControl , kmUPCopy ) ;
+ mUPDoEditCommand( (ControlHandle) m_macControl , kmUPCopy ) ;
}
}
}
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TECut( teH ) ;
ClearCurrentScrap();
TEToScrap() ;
}
else
{
- mUPDoEditCommand( m_macControl , kmUPCut ) ;
+ mUPDoEditCommand( (ControlHandle) m_macControl , kmUPCut ) ;
}
}
}
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TEFromScrap() ;
TEPaste( teH ) ;
- WindowRef window = MacGetRootWindow() ;
- if ( window )
- {
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
- if ( win )
- {
- wxMacDrawingHelper help( win ) ;
- // the mac control manager always assumes to have the origin at 0,0
- SetOrigin( 0 , 0 ) ;
-
- bool hasTabBehind = false ;
- wxWindow* parent = GetParent() ;
- while ( parent )
- {
- if( parent->MacGetWindowData() )
- {
- ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ;
- break ;
- }
-
- if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
- {
- if ( ((wxControl*)parent)->GetMacControl() )
- SetUpControlBackground( ((wxControl*)parent)->GetMacControl() , -1 , true ) ;
- break ;
- }
-
- parent = parent->GetParent() ;
- }
-
- UMADrawControl( m_macControl ) ;
- ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
- }
- }
+ MacRedrawControl() ;
}
else
{
- mUPDoEditCommand( m_macControl , kmUPPaste ) ;
+ mUPDoEditCommand( (ControlHandle) m_macControl , kmUPPaste ) ;
}
}
}
void wxTextCtrl::SetEditable(bool editable)
{
if ( editable )
- UMAActivateControl( m_macControl ) ;
+ UMAActivateControl( (ControlHandle) m_macControl ) ;
else
- UMADeactivateControl( m_macControl ) ;
+ UMADeactivateControl( (ControlHandle) m_macControl ) ;
}
void wxTextCtrl::SetInsertionPoint(long pos)
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
-// ::GetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection , &size ) ;
+// ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection , &size ) ;
return (**teH).teLength ;
}
else
{
- STPTextPaneVars** tpvars = (STPTextPaneVars **) GetControlReference(m_macControl);
+ STPTextPaneVars** tpvars = (STPTextPaneVars **) GetControlReference( (ControlHandle) m_macControl);
int actualsize = 0 ;
Handle theText ;
selection.selStart = from ;
selection.selEnd = to ;
- ::SetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::SetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TESetSelect( from , to , teH ) ;
TEDelete( teH ) ;
TEInsert( value , value.Length() , teH ) ;
selection.selStart = from ;
selection.selEnd = to ;
- ::SetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::SetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TEDelete( teH ) ;
}
else
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
selection.selStart = from ;
selection.selEnd = to ;
- ::SetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
+ ::SetControlData( (ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
TESetSelect( selection.selStart , selection.selEnd , teH ) ;
}
else
{
STPTextPaneVars **tpvars;
/* set up our locals */
- tpvars = (STPTextPaneVars **) GetControlReference(m_macControl);
+ tpvars = (STPTextPaneVars **) GetControlReference( (ControlHandle) m_macControl);
/* and our drawing environment as the operation
may force a redraw in the text area. */
SetPort((**tpvars).fDrawingEnvironment);
TEHandle teH ;
long size ;
- ::GetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
+ ::GetControlData( (ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TEInsert( value , value.Length() , teH ) ;
}
else
{
STPTextPaneVars **tpvars;
/* set up locals */
- tpvars = (STPTextPaneVars **) GetControlReference(m_macControl);
+ tpvars = (STPTextPaneVars **) GetControlReference( (ControlHandle) m_macControl);
/* set the text in the record */
TXNSetData( (**tpvars).fTXNRec, kTXNTextData, (const char*)value, value.Length(),
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
if ( m_windowStyle & wxTE_PASSWORD )
{
- ::SetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 0 , (char*) ((const char*)NULL) ) ;
+ ::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 0 , (char*) ((const char*)NULL) ) ;
}
else
{
- mUPDoEditCommand( m_macControl , kmUPClear) ;
+ mUPDoEditCommand( (ControlHandle) m_macControl , kmUPClear) ;
}
Refresh() ;
}
short keychar ;
keychar = short(ev->message & charCodeMask);
keycode = short(ev->message & keyCodeMask) >> 8 ;
- UMAHandleControlKey( m_macControl , keycode , keychar , ev->modifiers ) ;
+ UMAHandleControlKey( (ControlHandle) m_macControl , keycode , keychar , ev->modifiers ) ;
if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN || event.KeyCode() == WXK_DELETE || event.KeyCode() == WXK_BACK)
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);