wxMac Unicode support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -116,7 +116,7 @@ bool wxApp::s_macSupportPCMenuShortcuts = true ;
|
|||||||
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
||||||
long wxApp::s_macPreferencesMenuItemId = 0 ;
|
long wxApp::s_macPreferencesMenuItemId = 0 ;
|
||||||
long wxApp::s_macExitMenuItemId = wxID_EXIT ;
|
long wxApp::s_macExitMenuItemId = wxID_EXIT ;
|
||||||
wxString wxApp::s_macHelpMenuTitleName = "&Help" ;
|
wxString wxApp::s_macHelpMenuTitleName = wxT("&Help") ;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Core Apple Event Support
|
// Core Apple Event Support
|
||||||
@@ -538,7 +538,8 @@ bool wxApp::Initialize()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
wxMacSetupConverters() ;
|
||||||
|
|
||||||
s_macCursorRgn = ::NewRgn() ;
|
s_macCursorRgn = ::NewRgn() ;
|
||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
wxClassInfo::InitializeClasses();
|
||||||
@@ -719,7 +720,8 @@ void wxApp::CleanUp()
|
|||||||
// __wxterminate in Mach-O shared libraries
|
// __wxterminate in Mach-O shared libraries
|
||||||
wxStAppResource::CloseSharedLibraryResource();
|
wxStAppResource::CloseSharedLibraryResource();
|
||||||
#endif
|
#endif
|
||||||
|
wxMacCleanupConverters() ;
|
||||||
|
|
||||||
UMACleanupToolbox() ;
|
UMACleanupToolbox() ;
|
||||||
if (s_macCursorRgn) {
|
if (s_macCursorRgn) {
|
||||||
::DisposeRgn((RgnHandle)s_macCursorRgn);
|
::DisposeRgn((RgnHandle)s_macCursorRgn);
|
||||||
@@ -961,7 +963,17 @@ int wxEntry( int argc, char *argv[] , bool enterLoop )
|
|||||||
// we could try to get the open apple events here to adjust argc and argv better
|
// we could try to get the open apple events here to adjust argc and argv better
|
||||||
|
|
||||||
wxTheApp->argc = argc;
|
wxTheApp->argc = argc;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxTheApp->argv = new wxChar*[argc+1];
|
||||||
|
int mb_argc ;
|
||||||
|
for ( mb_argc = 0; mb_argc < argc; mb_argc++ )
|
||||||
|
{
|
||||||
|
wxTheApp->argv[mb_argc] = wxStrdup(wxConvLocal.cMB2WX(argv[mb_argc]));
|
||||||
|
}
|
||||||
|
wxTheApp->argv[mb_argc] = (wxChar *)NULL;
|
||||||
|
#else
|
||||||
wxTheApp->argv = argv;
|
wxTheApp->argv = argv;
|
||||||
|
#endif
|
||||||
|
|
||||||
// GUI-specific initialization, such as creating an app context.
|
// GUI-specific initialization, such as creating an app context.
|
||||||
wxEntryInitGui();
|
wxEntryInitGui();
|
||||||
|
@@ -694,7 +694,7 @@ bool wxBitmap::LoadFile(const wxString& filename, wxBitmapType type)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wxLogWarning("no bitmap handler for type %d defined.", type);
|
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,7 +707,7 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int
|
|||||||
wxBitmapHandler *handler = FindHandler(type);
|
wxBitmapHandler *handler = FindHandler(type);
|
||||||
|
|
||||||
if ( handler == NULL ) {
|
if ( handler == NULL ) {
|
||||||
wxLogWarning("no bitmap handler for type %d defined.", type);
|
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -944,7 +944,7 @@ bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type,
|
|||||||
return image.SaveFile(filename, type);
|
return image.SaveFile(filename, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogWarning("no bitmap handler for type %d defined.", type);
|
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1282,8 +1282,8 @@ class WXDLLEXPORT wxPICTResourceHandler: public wxBitmapHandler
|
|||||||
public:
|
public:
|
||||||
inline wxPICTResourceHandler()
|
inline wxPICTResourceHandler()
|
||||||
{
|
{
|
||||||
m_name = "Macintosh Pict resource";
|
m_name = wxT("Macintosh Pict resource");
|
||||||
m_extension = "";
|
m_extension = wxEmptyString;
|
||||||
m_type = wxBITMAP_TYPE_PICT_RESOURCE;
|
m_type = wxBITMAP_TYPE_PICT_RESOURCE;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1296,14 +1296,8 @@ bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
|
|||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
Str255 theName ;
|
Str255 theName ;
|
||||||
|
wxMacStringToPascal( name , theName ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) theName , name ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) theName , name ) ;
|
|
||||||
c2pstr( (char *)theName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PicHandle thePict = (PicHandle ) GetNamedResource( 'PICT' , theName ) ;
|
PicHandle thePict = (PicHandle ) GetNamedResource( 'PICT' , theName ) ;
|
||||||
if ( thePict )
|
if ( thePict )
|
||||||
{
|
{
|
||||||
|
@@ -58,14 +58,14 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
|||||||
if ( m_bmpNormal.Ok() )
|
if ( m_bmpNormal.Ok() )
|
||||||
bmap = (wxBitmapRefData*) ( m_bmpNormal.GetRefData()) ;
|
bmap = (wxBitmapRefData*) ( m_bmpNormal.GetRefData()) ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::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,
|
||||||
(( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevelProc : kControlBevelButtonNormalBevelProc ), (long) this ) ;
|
(( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevelProc : kControlBevelButtonNormalBevelProc ), (long) this ) ;
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
ControlButtonContentInfo info ;
|
ControlButtonContentInfo info ;
|
||||||
wxMacCreateBitmapButton( &info , m_bmpNormal ) ;
|
wxMacCreateBitmapButton( &info , m_bmpNormal ) ;
|
||||||
|
@@ -47,7 +47,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlPushButtonProc , (long) this ) ;
|
kControlPushButtonProc , (long) this ) ;
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@ bool wxApp::s_macSupportPCMenuShortcuts = true ;
|
|||||||
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
||||||
long wxApp::s_macPreferencesMenuItemId = 0 ;
|
long wxApp::s_macPreferencesMenuItemId = 0 ;
|
||||||
long wxApp::s_macExitMenuItemId = wxID_EXIT ;
|
long wxApp::s_macExitMenuItemId = wxID_EXIT ;
|
||||||
wxString wxApp::s_macHelpMenuTitleName = "&Help" ;
|
wxString wxApp::s_macHelpMenuTitleName = wxT("&Help") ;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Core Apple Event Support
|
// Core Apple Event Support
|
||||||
@@ -538,7 +538,8 @@ bool wxApp::Initialize()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
wxMacSetupConverters() ;
|
||||||
|
|
||||||
s_macCursorRgn = ::NewRgn() ;
|
s_macCursorRgn = ::NewRgn() ;
|
||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
wxClassInfo::InitializeClasses();
|
||||||
@@ -719,7 +720,8 @@ void wxApp::CleanUp()
|
|||||||
// __wxterminate in Mach-O shared libraries
|
// __wxterminate in Mach-O shared libraries
|
||||||
wxStAppResource::CloseSharedLibraryResource();
|
wxStAppResource::CloseSharedLibraryResource();
|
||||||
#endif
|
#endif
|
||||||
|
wxMacCleanupConverters() ;
|
||||||
|
|
||||||
UMACleanupToolbox() ;
|
UMACleanupToolbox() ;
|
||||||
if (s_macCursorRgn) {
|
if (s_macCursorRgn) {
|
||||||
::DisposeRgn((RgnHandle)s_macCursorRgn);
|
::DisposeRgn((RgnHandle)s_macCursorRgn);
|
||||||
@@ -961,7 +963,17 @@ int wxEntry( int argc, char *argv[] , bool enterLoop )
|
|||||||
// we could try to get the open apple events here to adjust argc and argv better
|
// we could try to get the open apple events here to adjust argc and argv better
|
||||||
|
|
||||||
wxTheApp->argc = argc;
|
wxTheApp->argc = argc;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxTheApp->argv = new wxChar*[argc+1];
|
||||||
|
int mb_argc ;
|
||||||
|
for ( mb_argc = 0; mb_argc < argc; mb_argc++ )
|
||||||
|
{
|
||||||
|
wxTheApp->argv[mb_argc] = wxStrdup(wxConvLocal.cMB2WX(argv[mb_argc]));
|
||||||
|
}
|
||||||
|
wxTheApp->argv[mb_argc] = (wxChar *)NULL;
|
||||||
|
#else
|
||||||
wxTheApp->argv = argv;
|
wxTheApp->argv = argv;
|
||||||
|
#endif
|
||||||
|
|
||||||
// GUI-specific initialization, such as creating an app context.
|
// GUI-specific initialization, such as creating an app context.
|
||||||
wxEntryInitGui();
|
wxEntryInitGui();
|
||||||
|
@@ -694,7 +694,7 @@ bool wxBitmap::LoadFile(const wxString& filename, wxBitmapType type)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wxLogWarning("no bitmap handler for type %d defined.", type);
|
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,7 +707,7 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int
|
|||||||
wxBitmapHandler *handler = FindHandler(type);
|
wxBitmapHandler *handler = FindHandler(type);
|
||||||
|
|
||||||
if ( handler == NULL ) {
|
if ( handler == NULL ) {
|
||||||
wxLogWarning("no bitmap handler for type %d defined.", type);
|
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -944,7 +944,7 @@ bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type,
|
|||||||
return image.SaveFile(filename, type);
|
return image.SaveFile(filename, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogWarning("no bitmap handler for type %d defined.", type);
|
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1282,8 +1282,8 @@ class WXDLLEXPORT wxPICTResourceHandler: public wxBitmapHandler
|
|||||||
public:
|
public:
|
||||||
inline wxPICTResourceHandler()
|
inline wxPICTResourceHandler()
|
||||||
{
|
{
|
||||||
m_name = "Macintosh Pict resource";
|
m_name = wxT("Macintosh Pict resource");
|
||||||
m_extension = "";
|
m_extension = wxEmptyString;
|
||||||
m_type = wxBITMAP_TYPE_PICT_RESOURCE;
|
m_type = wxBITMAP_TYPE_PICT_RESOURCE;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1296,14 +1296,8 @@ bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
|
|||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
Str255 theName ;
|
Str255 theName ;
|
||||||
|
wxMacStringToPascal( name , theName ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) theName , name ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) theName , name ) ;
|
|
||||||
c2pstr( (char *)theName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PicHandle thePict = (PicHandle ) GetNamedResource( 'PICT' , theName ) ;
|
PicHandle thePict = (PicHandle ) GetNamedResource( 'PICT' , theName ) ;
|
||||||
if ( thePict )
|
if ( thePict )
|
||||||
{
|
{
|
||||||
|
@@ -58,14 +58,14 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
|||||||
if ( m_bmpNormal.Ok() )
|
if ( m_bmpNormal.Ok() )
|
||||||
bmap = (wxBitmapRefData*) ( m_bmpNormal.GetRefData()) ;
|
bmap = (wxBitmapRefData*) ( m_bmpNormal.GetRefData()) ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::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,
|
||||||
(( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevelProc : kControlBevelButtonNormalBevelProc ), (long) this ) ;
|
(( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevelProc : kControlBevelButtonNormalBevelProc ), (long) this ) ;
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
ControlButtonContentInfo info ;
|
ControlButtonContentInfo info ;
|
||||||
wxMacCreateBitmapButton( &info , m_bmpNormal ) ;
|
wxMacCreateBitmapButton( &info , m_bmpNormal ) ;
|
||||||
|
@@ -47,7 +47,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
|
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlPushButtonProc , (long) this ) ;
|
kControlPushButtonProc , (long) this ) ;
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
|
||||||
|
@@ -211,7 +211,7 @@ bool wxCheckListBox::Create(wxWindow *parent,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
ListDefSpec listDef;
|
ListDefSpec listDef;
|
||||||
listDef.defType = kListDefUserProcType;
|
listDef.defType = kListDefUserProcType;
|
||||||
|
@@ -49,7 +49,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 ,
|
||||||
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
|
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ wxString wxChoice::GetString(int n) const
|
|||||||
void wxChoice::DoSetItemClientData( int n, void* clientData )
|
void wxChoice::DoSetItemClientData( int n, void* clientData )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( n >= 0 && (size_t)n < m_datas.GetCount(),
|
wxCHECK_RET( n >= 0 && (size_t)n < m_datas.GetCount(),
|
||||||
"invalid index in wxChoice::SetClientData" );
|
wxT("invalid index in wxChoice::SetClientData") );
|
||||||
|
|
||||||
m_datas[n] = (char*) clientData ;
|
m_datas[n] = (char*) clientData ;
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
|
|||||||
void *wxChoice::DoGetItemClientData(int n) const
|
void *wxChoice::DoGetItemClientData(int n) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
|
wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
|
||||||
"invalid index in wxChoice::GetClientData" );
|
wxT("invalid index in wxChoice::GetClientData") );
|
||||||
return (void *)m_datas[n];
|
return (void *)m_datas[n];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,6 +55,8 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
|
|
||||||
case wxDF_TEXT:
|
case wxDF_TEXT:
|
||||||
break;
|
break;
|
||||||
|
case wxDF_UNICODETEXT:
|
||||||
|
break;
|
||||||
case wxDF_BITMAP :
|
case wxDF_BITMAP :
|
||||||
case wxDF_METAFILE :
|
case wxDF_METAFILE :
|
||||||
break ;
|
break ;
|
||||||
@@ -77,15 +79,21 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
{
|
{
|
||||||
if (( err = GetScrapFlavorSize( scrapRef, dataFormat.GetFormatId(), &byteCount )) == noErr)
|
if (( err = GetScrapFlavorSize( scrapRef, dataFormat.GetFormatId(), &byteCount )) == noErr)
|
||||||
{
|
{
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
Size allocSize = byteCount ;
|
||||||
byteCount++ ;
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
|
allocSize += 1 ;
|
||||||
|
else if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
|
allocSize += 2 ;
|
||||||
|
|
||||||
data = new char[ byteCount ] ;
|
data = new char[ allocSize ] ;
|
||||||
|
|
||||||
if (( err = GetScrapFlavorData( scrapRef, dataFormat.GetFormatId(), &byteCount , data )) == noErr )
|
if (( err = GetScrapFlavorData( scrapRef, dataFormat.GetFormatId(), &byteCount , data )) == noErr )
|
||||||
{
|
{
|
||||||
*len = byteCount ;
|
*len = allocSize ;
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
((char*)data)[byteCount] = 0 ;
|
((char*)data)[byteCount] = 0 ;
|
||||||
|
if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
|
((wxChar*)data)[byteCount/2] = 0 ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -105,14 +113,19 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
if ( GetHandleSize( datahandle ) > 0 )
|
if ( GetHandleSize( datahandle ) > 0 )
|
||||||
{
|
{
|
||||||
byteCount = GetHandleSize( datahandle ) ;
|
byteCount = GetHandleSize( datahandle ) ;
|
||||||
|
Size allocSize = byteCount ;
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
data = new char[ byteCount + 1] ;
|
allocSize += 1 ;
|
||||||
else
|
else if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
data = new char[ byteCount ] ;
|
allocSize += 2 ;
|
||||||
|
|
||||||
|
data = new char[ allocSize ] ;
|
||||||
|
|
||||||
memcpy( (char*) data , (char*) *datahandle , byteCount ) ;
|
memcpy( (char*) data , (char*) *datahandle , byteCount ) ;
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
((char*)data)[byteCount] = 0 ;
|
((char*)data)[byteCount] = 0 ;
|
||||||
|
if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
|
((wxChar*)data)[byteCount/2] = 0 ;
|
||||||
*len = byteCount ;
|
*len = byteCount ;
|
||||||
}
|
}
|
||||||
DisposeHandle( datahandle ) ;
|
DisposeHandle( datahandle ) ;
|
||||||
@@ -123,10 +136,21 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
|
|
||||||
return NULL ;
|
return NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT && wxApp::s_macDefaultEncodingIsPC )
|
if ( dataFormat.GetType() == wxDF_TEXT && wxApp::s_macDefaultEncodingIsPC )
|
||||||
{
|
{
|
||||||
wxMacConvertToPC((char*)data,(char*)data,byteCount) ;
|
wxString st = wxMacMakeStringFromCString( (char*) data ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxCharBuffer buf = st.ToAscii() ;
|
||||||
|
#else
|
||||||
|
char* buf = st ;
|
||||||
|
#endif
|
||||||
|
char* newdata = new char[strlen(buf)+1] ;
|
||||||
|
memcpy( newdata , buf , strlen(buf)+1 ) ;
|
||||||
|
delete[] ((char*) data ) ;
|
||||||
|
data = newdata ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,19 +258,19 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
{
|
{
|
||||||
wxTextDataObject* textDataObject = (wxTextDataObject*) data;
|
wxTextDataObject* textDataObject = (wxTextDataObject*) data;
|
||||||
wxString str(textDataObject->GetText());
|
wxString str(textDataObject->GetText());
|
||||||
wxString mac ;
|
wxCharBuffer buf = wxMacStringToCString( str ) ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
err = UMAPutScrap( strlen(buf) , kScrapFlavorTypeText , (void*) buf.data() ) ;
|
||||||
{
|
|
||||||
mac = wxMacMakeMacStringFromPC(textDataObject->GetText()) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mac = textDataObject->GetText() ;
|
|
||||||
}
|
|
||||||
err = UMAPutScrap( mac.Length() , 'TEXT' , (void*) mac.c_str() ) ;
|
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
case wxDF_UNICODETEXT :
|
||||||
|
{
|
||||||
|
wxTextDataObject* textDataObject = (wxTextDataObject*) data;
|
||||||
|
wxString str(textDataObject->GetText());
|
||||||
|
err = UMAPutScrap( str.Length() * sizeof(wxChar) , kScrapFlavorTypeUnicode , (void*) str.wc_str() ) ;
|
||||||
|
}
|
||||||
|
break ;
|
||||||
|
#endif
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
case wxDF_METAFILE:
|
case wxDF_METAFILE:
|
||||||
{
|
{
|
||||||
@@ -255,7 +279,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
wxMetafile metaFile = metaFileDataObject->GetMetafile();
|
wxMetafile metaFile = metaFileDataObject->GetMetafile();
|
||||||
PicHandle pict = (PicHandle) metaFile.GetHMETAFILE() ;
|
PicHandle pict = (PicHandle) metaFile.GetHMETAFILE() ;
|
||||||
HLock( (Handle) pict ) ;
|
HLock( (Handle) pict ) ;
|
||||||
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , 'PICT' , *pict ) ;
|
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , kScrapFlavorTypePicture , *pict ) ;
|
||||||
HUnlock( (Handle) pict ) ;
|
HUnlock( (Handle) pict ) ;
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
@@ -270,7 +294,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
pict = (PicHandle) bitmapDataObject->GetBitmap().GetPict( &created ) ;
|
pict = (PicHandle) bitmapDataObject->GetBitmap().GetPict( &created ) ;
|
||||||
|
|
||||||
HLock( (Handle) pict ) ;
|
HLock( (Handle) pict ) ;
|
||||||
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , 'PICT' , *pict ) ;
|
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , kScrapFlavorTypePicture , *pict ) ;
|
||||||
HUnlock( (Handle) pict ) ;
|
HUnlock( (Handle) pict ) ;
|
||||||
if ( created )
|
if ( created )
|
||||||
KillPicture( pict ) ;
|
KillPicture( pict ) ;
|
||||||
|
@@ -456,7 +456,7 @@ wxString wxComboBox::GetStringSelection() const
|
|||||||
if (sel > -1)
|
if (sel > -1)
|
||||||
return wxString(this->GetString (sel));
|
return wxString(this->GetString (sel));
|
||||||
else
|
else
|
||||||
return wxString("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxComboBox::SetStringSelection(const wxString& sel)
|
bool wxComboBox::SetStringSelection(const wxString& sel)
|
||||||
|
@@ -208,23 +208,9 @@ void wxControl::SetLabel(const wxString& title)
|
|||||||
{
|
{
|
||||||
m_label = wxStripMenuCodes(title) ;
|
m_label = wxStripMenuCodes(title) ;
|
||||||
|
|
||||||
if ( (ControlHandle) m_macControl )
|
if ( m_macControl )
|
||||||
{
|
{
|
||||||
Str255 maclabel ;
|
UMASetControlTitle( (ControlHandle) m_macControl , m_label ) ;
|
||||||
wxString label ;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
label = wxMacMakeMacStringFromPC( m_label ) ;
|
|
||||||
else
|
|
||||||
label = m_label ;
|
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) maclabel , label ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) maclabel , label ) ;
|
|
||||||
c2pstr( (char *) maclabel ) ;
|
|
||||||
#endif
|
|
||||||
::SetControlTitle( (ControlHandle) m_macControl , maclabel ) ;
|
|
||||||
}
|
}
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
}
|
}
|
||||||
@@ -311,7 +297,7 @@ void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *contro
|
|||||||
{
|
{
|
||||||
// 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
|
||||||
wxCHECK_RET( inControl != (ControlHandle) NULL, "attempt to add a NULL WindowRef to window list" );
|
wxCHECK_RET( inControl != (ControlHandle) NULL, wxT("attempt to add a NULL WindowRef to window list") );
|
||||||
|
|
||||||
if ( !wxWinMacControlList->Find((long)inControl) )
|
if ( !wxWinMacControlList->Find((long)inControl) )
|
||||||
wxWinMacControlList->Append((long)inControl, control);
|
wxWinMacControlList->Append((long)inControl, control);
|
||||||
@@ -361,7 +347,7 @@ void wxControl::MacPreControlCreate( wxWindow *parent, wxWindowID id, wxString l
|
|||||||
|
|
||||||
void wxControl::MacPostControlCreate()
|
void wxControl::MacPostControlCreate()
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
|
if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
|
||||||
{
|
{
|
||||||
@@ -438,6 +424,10 @@ void wxControl::MacPostControlCreate()
|
|||||||
|
|
||||||
SetSize(pos.x, pos.y, new_size.x, new_size.y);
|
SetSize(pos.x, pos.y, new_size.x, new_size.y);
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
UMASetControlTitle( (ControlHandle) m_macControl , wxStripMenuCodes(m_label) ) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
UMAShowControl( (ControlHandle) m_macControl ) ;
|
UMAShowControl( (ControlHandle) m_macControl ) ;
|
||||||
|
|
||||||
SetCursor( *wxSTANDARD_CURSOR ) ;
|
SetCursor( *wxSTANDARD_CURSOR ) ;
|
||||||
@@ -907,6 +897,6 @@ bool wxControl::MacCanFocus() const
|
|||||||
|
|
||||||
void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -292,13 +292,7 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
|
|||||||
if ( flags == wxBITMAP_TYPE_MACCURSOR_RESOURCE )
|
if ( flags == wxBITMAP_TYPE_MACCURSOR_RESOURCE )
|
||||||
{
|
{
|
||||||
Str255 theName ;
|
Str255 theName ;
|
||||||
|
wxMacStringToPascal( cursor_file , theName ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) theName , cursor_file ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) theName , cursor_file ) ;
|
|
||||||
c2pstr( (char *) theName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
Handle resHandle = ::GetNamedResource( 'crsr' , theName ) ;
|
Handle resHandle = ::GetNamedResource( 'crsr' , theName ) ;
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: os2/dataobj.cpp
|
// Name: mac/dataobj.cpp
|
||||||
// Purpose: implementation of wx[I]DataObject class
|
// Purpose: implementation of wxDataObject class
|
||||||
// Author: David Webster
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/21/99
|
// Created: 10/21/99
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1999 David Webster
|
// Copyright: (c) 1999 Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "wx/mstream.h"
|
#include "wx/mstream.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/mac/private.h"
|
#include "wx/mac/private.h"
|
||||||
|
#include "Scrap.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// functions
|
// functions
|
||||||
@@ -73,10 +74,12 @@ void wxDataFormat::SetType( wxDataFormatId Type )
|
|||||||
{
|
{
|
||||||
m_type = Type;
|
m_type = Type;
|
||||||
|
|
||||||
if (m_type == wxDF_TEXT)
|
if (m_type == wxDF_TEXT )
|
||||||
m_format = 'TEXT';
|
m_format = kScrapFlavorTypeText;
|
||||||
|
else if (m_type == wxDF_UNICODETEXT )
|
||||||
|
m_format = kScrapFlavorTypeUnicode ;
|
||||||
else if (m_type == wxDF_BITMAP || m_type == wxDF_METAFILE )
|
else if (m_type == wxDF_BITMAP || m_type == wxDF_METAFILE )
|
||||||
m_format = 'PICT';
|
m_format = kScrapFlavorTypePicture;
|
||||||
else if (m_type == wxDF_FILENAME)
|
else if (m_type == wxDF_FILENAME)
|
||||||
m_format = kDragFlavorTypeHFS ;
|
m_format = kDragFlavorTypeHFS ;
|
||||||
else
|
else
|
||||||
@@ -92,18 +95,23 @@ wxDataFormatId wxDataFormat::GetType() const
|
|||||||
|
|
||||||
wxString wxDataFormat::GetId() const
|
wxString wxDataFormat::GetId() const
|
||||||
{
|
{
|
||||||
wxString sRet(""); // TODO: to name of ( m_format ) );
|
char text[5] ;
|
||||||
return sRet;
|
strncpy( text , (char*) m_format , 4 ) ;
|
||||||
|
text[4] = 0 ;
|
||||||
|
return wxString::FromAscii( text ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataFormat::SetId( NativeFormat format )
|
void wxDataFormat::SetId( NativeFormat format )
|
||||||
{
|
{
|
||||||
m_format = format;
|
m_format = format;
|
||||||
|
|
||||||
if (m_format == 'TEXT')
|
if (m_format == kScrapFlavorTypeText)
|
||||||
m_type = wxDF_TEXT;
|
m_type = wxDF_TEXT;
|
||||||
else
|
else
|
||||||
if (m_format == 'PICT')
|
if (m_format == kScrapFlavorTypeUnicode )
|
||||||
|
m_type = wxDF_UNICODETEXT;
|
||||||
|
else
|
||||||
|
if (m_format == kScrapFlavorTypePicture)
|
||||||
m_type = wxDF_BITMAP;
|
m_type = wxDF_BITMAP;
|
||||||
else
|
else
|
||||||
if (m_format == kDragFlavorTypeHFS )
|
if (m_format == kDragFlavorTypeHFS )
|
||||||
@@ -201,9 +209,7 @@ bool wxFileDataObject::SetData(
|
|||||||
{
|
{
|
||||||
m_filenames.Empty();
|
m_filenames.Empty();
|
||||||
|
|
||||||
wxString sFile( (const char *)pBuf); /* char, not wxChar */
|
AddFile(wxString::FromAscii((char*)pBuf));
|
||||||
|
|
||||||
AddFile(sFile);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -1111,7 +1111,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
|||||||
}
|
}
|
||||||
if ( mode == kUnsupportedMode )
|
if ( mode == kUnsupportedMode )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("unsupported blitting mode" );
|
wxFAIL_MSG(wxT("unsupported blitting mode" ));
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
CGrafPtr sourcePort = (CGrafPtr) source->m_macPort ;
|
CGrafPtr sourcePort = (CGrafPtr) source->m_macPort ;
|
||||||
@@ -1295,17 +1295,10 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
|||||||
}
|
}
|
||||||
if ( str.Length() == 0 )
|
if ( str.Length() == 0 )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
wxMacPortSetter helper(this) ;
|
wxMacPortSetter helper(this) ;
|
||||||
MacInstallFont() ;
|
MacInstallFont() ;
|
||||||
wxString text ;
|
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
text = wxMacMakeMacStringFromPC( str ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text = str ;
|
|
||||||
}
|
|
||||||
wxFontRefData * font = (wxFontRefData*) m_font.GetRefData() ;
|
wxFontRefData * font = (wxFontRefData*) m_font.GetRefData() ;
|
||||||
if ( 0 )
|
if ( 0 )
|
||||||
{
|
{
|
||||||
@@ -1314,23 +1307,30 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
|||||||
m_macAliasWasEnabled = true ;
|
m_macAliasWasEnabled = true ;
|
||||||
}
|
}
|
||||||
OSStatus status = noErr ;
|
OSStatus status = noErr ;
|
||||||
|
ATSUTextLayout atsuLayout ;
|
||||||
|
UniCharCount chars = str.Length() ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.Length() , str.Length() , 1 ,
|
||||||
|
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
|
||||||
|
#else
|
||||||
TECObjectRef ec;
|
TECObjectRef ec;
|
||||||
status = TECCreateConverter(&ec, kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
status = TECCreateConverter(&ec,
|
||||||
wxASSERT_MSG( status == noErr , "couldn't start converter" ) ;
|
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||||
|
|
||||||
|
wxASSERT_MSG( status == noErr , wxT("couldn't start converter") ) ;
|
||||||
ByteCount byteOutLen ;
|
ByteCount byteOutLen ;
|
||||||
ByteCount byteInLen = text.Length() ;
|
ByteCount byteInLen = str.Length() ;
|
||||||
ByteCount byteBufferLen = byteInLen *2 ;
|
ByteCount byteBufferLen = byteInLen *2 ;
|
||||||
char* buf = new char[byteBufferLen] ;
|
char* buf = new char[byteBufferLen] ;
|
||||||
status = TECConvertText(ec, (ConstTextPtr)text.c_str() , byteInLen, &byteInLen,
|
status = TECConvertText(ec, (ConstTextPtr)str.c_str() , byteInLen, &byteInLen,
|
||||||
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
||||||
wxASSERT_MSG( status == noErr , "couldn't convert text" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't convert text") ) ;
|
||||||
status = TECDisposeConverter(ec);
|
status = TECDisposeConverter(ec);
|
||||||
wxASSERT_MSG( status == noErr , "couldn't dispose converter" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't dispose converter") ) ;
|
||||||
ATSUTextLayout atsuLayout ;
|
|
||||||
UniCharCount chars = byteOutLen / 2 ;
|
|
||||||
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) buf , 0 , byteOutLen / 2 , byteOutLen / 2 , 1 ,
|
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) buf , 0 , byteOutLen / 2 , byteOutLen / 2 , 1 ,
|
||||||
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
|
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
|
||||||
wxASSERT_MSG( status == noErr , "couldn't create the layout of the rotated text" );
|
#endif
|
||||||
|
wxASSERT_MSG( status == noErr , wxT("couldn't create the layout of the rotated text") );
|
||||||
int iAngle = int( angle );
|
int iAngle = int( angle );
|
||||||
int drawX = XLOG2DEVMAC(x) ;
|
int drawX = XLOG2DEVMAC(x) ;
|
||||||
int drawY = YLOG2DEVMAC(y) ;
|
int drawY = YLOG2DEVMAC(y) ;
|
||||||
@@ -1366,16 +1366,19 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
|||||||
drawY += cos(angle/RAD2DEG) * FixedToInt(ascent) ;
|
drawY += cos(angle/RAD2DEG) * FixedToInt(ascent) ;
|
||||||
status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||||
IntToFixed(drawX) , IntToFixed(drawY) );
|
IntToFixed(drawX) , IntToFixed(drawY) );
|
||||||
wxASSERT_MSG( status == noErr , "couldn't draw the rotated text" );
|
wxASSERT_MSG( status == noErr , wxT("couldn't draw the rotated text") );
|
||||||
Rect rect ;
|
Rect rect ;
|
||||||
status = ::ATSUMeasureTextImage( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
status = ::ATSUMeasureTextImage( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||||
IntToFixed(drawX) , IntToFixed(drawY) , &rect );
|
IntToFixed(drawX) , IntToFixed(drawY) , &rect );
|
||||||
wxASSERT_MSG( status == noErr , "couldn't measure the rotated text" );
|
wxASSERT_MSG( status == noErr , wxT("couldn't measure the rotated text") );
|
||||||
OffsetRect( &rect , -m_macLocalOrigin.x , -m_macLocalOrigin.y ) ;
|
OffsetRect( &rect , -m_macLocalOrigin.x , -m_macLocalOrigin.y ) ;
|
||||||
CalcBoundingBox(XDEV2LOG(rect.left), YDEV2LOG(rect.top) );
|
CalcBoundingBox(XDEV2LOG(rect.left), YDEV2LOG(rect.top) );
|
||||||
CalcBoundingBox(XDEV2LOG(rect.right), YDEV2LOG(rect.bottom) );
|
CalcBoundingBox(XDEV2LOG(rect.right), YDEV2LOG(rect.bottom) );
|
||||||
::ATSUDisposeTextLayout(atsuLayout);
|
::ATSUDisposeTextLayout(atsuLayout);
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
#else
|
||||||
delete[] buf ;
|
delete[] buf ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||||
@@ -1411,33 +1414,22 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
{
|
{
|
||||||
::TextMode( srcCopy ) ;
|
::TextMode( srcCopy ) ;
|
||||||
}
|
}
|
||||||
const char *text = NULL ;
|
int length = strtext.Length() ;
|
||||||
int length = 0 ;
|
|
||||||
wxString macText ;
|
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
macText = wxMacMakeMacStringFromPC( strtext ) ;
|
|
||||||
text = macText ;
|
|
||||||
length = macText.Length() ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text = strtext ;
|
|
||||||
length = strtext.Length() ;
|
|
||||||
}
|
|
||||||
int laststop = 0 ;
|
int laststop = 0 ;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
int line = 0 ;
|
int line = 0 ;
|
||||||
{
|
{
|
||||||
while( i < length )
|
while( i < length )
|
||||||
{
|
{
|
||||||
if( text[i] == 13 || text[i] == 10)
|
if( strtext[i] == 13 || strtext[i] == 10)
|
||||||
{
|
{
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
if ( m_backgroundMode != wxTRANSPARENT )
|
if ( m_backgroundMode != wxTRANSPARENT )
|
||||||
{
|
{
|
||||||
Point bounds={0,0} ;
|
Point bounds={0,0} ;
|
||||||
@@ -1460,13 +1452,13 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
&frame,
|
&frame,
|
||||||
teJustLeft,
|
teJustLeft,
|
||||||
nil );
|
nil );
|
||||||
CFRelease( mString ) ;
|
|
||||||
line++ ;
|
line++ ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
|
::DrawText( text , 0 , strlen(text) ) ;
|
||||||
line++ ;
|
line++ ;
|
||||||
::MoveTo( xx , yy + line*(fi.descent + fi.ascent + fi.leading) );
|
::MoveTo( xx , yy + line*(fi.descent + fi.ascent + fi.leading) );
|
||||||
}
|
}
|
||||||
@@ -1474,11 +1466,12 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
}
|
}
|
||||||
i++ ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||||
CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
|
|
||||||
if ( m_backgroundMode != wxTRANSPARENT )
|
if ( m_backgroundMode != wxTRANSPARENT )
|
||||||
{
|
{
|
||||||
@@ -1502,13 +1495,13 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
&frame,
|
&frame,
|
||||||
teJustLeft,
|
teJustLeft,
|
||||||
nil );
|
nil );
|
||||||
CFRelease( mString ) ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
}
|
::DrawText( text , 0 , strlen(text) ) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
::TextMode( srcOr ) ;
|
::TextMode( srcOr ) ;
|
||||||
}
|
}
|
||||||
@@ -1519,7 +1512,7 @@ bool wxDC::CanGetTextExtent() const
|
|||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
|
void wxDC::DoGetTextExtent( const wxString &strtext, wxCoord *width, wxCoord *height,
|
||||||
wxCoord *descent, wxCoord *externalLeading ,
|
wxCoord *descent, wxCoord *externalLeading ,
|
||||||
wxFont *theFont ) const
|
wxFont *theFont ) const
|
||||||
{
|
{
|
||||||
@@ -1545,8 +1538,9 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
*descent =YDEV2LOGREL( fi.descent );
|
*descent =YDEV2LOGREL( fi.descent );
|
||||||
if ( externalLeading )
|
if ( externalLeading )
|
||||||
*externalLeading = YDEV2LOGREL( fi.leading ) ;
|
*externalLeading = YDEV2LOGREL( fi.leading ) ;
|
||||||
|
int length = strtext.Length() ;
|
||||||
|
/*
|
||||||
const char *text = NULL ;
|
const char *text = NULL ;
|
||||||
int length = 0 ;
|
|
||||||
wxString macText ;
|
wxString macText ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||||
{
|
{
|
||||||
@@ -1559,6 +1553,7 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
text = string ;
|
text = string ;
|
||||||
length = string.Length() ;
|
length = string.Length() ;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
int laststop = 0 ;
|
int laststop = 0 ;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
int curwidth = 0 ;
|
int curwidth = 0 ;
|
||||||
@@ -1567,8 +1562,9 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
*width = 0 ;
|
*width = 0 ;
|
||||||
while( i < length )
|
while( i < length )
|
||||||
{
|
{
|
||||||
if( text[i] == 13 || text[i] == 10)
|
if( strtext[i] == 13 || strtext[i] == 10)
|
||||||
{
|
{
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
if ( height )
|
if ( height )
|
||||||
*height += YDEV2LOGREL( fi.descent + fi.ascent + fi.leading ) ;
|
*height += YDEV2LOGREL( fi.descent + fi.ascent + fi.leading ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
@@ -1576,20 +1572,20 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
{
|
{
|
||||||
Point bounds={0,0} ;
|
Point bounds={0,0} ;
|
||||||
SInt16 baseline ;
|
SInt16 baseline ;
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
::GetThemeTextDimensions( mString,
|
::GetThemeTextDimensions( mString,
|
||||||
kThemeCurrentPortFont,
|
kThemeCurrentPortFont,
|
||||||
kThemeStateActive,
|
kThemeStateActive,
|
||||||
false,
|
false,
|
||||||
&bounds,
|
&bounds,
|
||||||
&baseline );
|
&baseline );
|
||||||
CFRelease( mString ) ;
|
|
||||||
curwidth = bounds.h ;
|
curwidth = bounds.h ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
curwidth = ::TextWidth( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
|
curwidth = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
}
|
}
|
||||||
if ( curwidth > *width )
|
if ( curwidth > *width )
|
||||||
*width = XDEV2LOGREL( curwidth ) ;
|
*width = XDEV2LOGREL( curwidth ) ;
|
||||||
@@ -1598,25 +1594,26 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
i++ ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useGetThemeText )
|
if ( useGetThemeText )
|
||||||
{
|
{
|
||||||
Point bounds={0,0} ;
|
Point bounds={0,0} ;
|
||||||
SInt16 baseline ;
|
SInt16 baseline ;
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
::GetThemeTextDimensions( mString,
|
::GetThemeTextDimensions( mString,
|
||||||
kThemeCurrentPortFont,
|
kThemeCurrentPortFont,
|
||||||
kThemeStateActive,
|
kThemeStateActive,
|
||||||
false,
|
false,
|
||||||
&bounds,
|
&bounds,
|
||||||
&baseline );
|
&baseline );
|
||||||
CFRelease( mString ) ;
|
|
||||||
curwidth = bounds.h ;
|
curwidth = bounds.h ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
curwidth = ::TextWidth( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
|
curwidth = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
}
|
}
|
||||||
if ( curwidth > *width )
|
if ( curwidth > *width )
|
||||||
*width = XDEV2LOGREL( curwidth ) ;
|
*width = XDEV2LOGREL( curwidth ) ;
|
||||||
@@ -1773,7 +1770,7 @@ void wxDC::MacInstallFont() const
|
|||||||
Style qdStyle = font->m_macFontStyle ;
|
Style qdStyle = font->m_macFontStyle ;
|
||||||
ATSUFontID atsuFont = font->m_macATSUFontID ;
|
ATSUFontID atsuFont = font->m_macATSUFontID ;
|
||||||
status = ::ATSUCreateStyle(&(ATSUStyle)m_macATSUIStyle) ;
|
status = ::ATSUCreateStyle(&(ATSUStyle)m_macATSUIStyle) ;
|
||||||
wxASSERT_MSG( status == noErr , "couldn't create ATSU style" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't create ATSU style") ) ;
|
||||||
ATSUAttributeTag atsuTags[] =
|
ATSUAttributeTag atsuTags[] =
|
||||||
{
|
{
|
||||||
kATSUFontTag ,
|
kATSUFontTag ,
|
||||||
@@ -1819,7 +1816,7 @@ void wxDC::MacInstallFont() const
|
|||||||
} ;
|
} ;
|
||||||
status = ::ATSUSetAttributes((ATSUStyle)m_macATSUIStyle, sizeof(atsuTags)/sizeof(ATSUAttributeTag),
|
status = ::ATSUSetAttributes((ATSUStyle)m_macATSUIStyle, sizeof(atsuTags)/sizeof(ATSUAttributeTag),
|
||||||
atsuTags, atsuSizes, atsuValues);
|
atsuTags, atsuSizes, atsuValues);
|
||||||
wxASSERT_MSG( status == noErr , "couldn't set create ATSU style" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't set create ATSU style") ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pattern gHatchPatterns[] =
|
Pattern gHatchPatterns[] =
|
||||||
|
@@ -62,8 +62,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
|
|||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease( m_macPrintSessionPort ) ;
|
PMRelease( m_macPrintSessionPort ) ;
|
||||||
@@ -88,8 +88,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
UMAPrClose(NULL) ;
|
UMAPrClose(NULL) ;
|
||||||
m_ok = FALSE;
|
m_ok = FALSE;
|
||||||
@@ -150,8 +150,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
|
|||||||
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease(&m_macPrintSessionPort) ;
|
PMRelease(&m_macPrintSessionPort) ;
|
||||||
@@ -234,8 +234,8 @@ bool wxPrinterDC::StartDoc( const wxString& WXUNUSED(message) )
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err )
|
if ( err )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
UMAPrClose(NULL) ;
|
UMAPrClose(NULL) ;
|
||||||
m_ok = FALSE;
|
m_ok = FALSE;
|
||||||
@@ -258,8 +258,8 @@ bool wxPrinterDC::StartDoc( const wxString& WXUNUSED(message) )
|
|||||||
if ( err != noErr || m_macPrintSessionPort == kPMNoReference )
|
if ( err != noErr || m_macPrintSessionPort == kPMNoReference )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease(&m_macPrintSessionPort) ;
|
PMRelease(&m_macPrintSessionPort) ;
|
||||||
@@ -280,8 +280,8 @@ bool wxPrinterDC::StartDoc( const wxString& WXUNUSED(message) )
|
|||||||
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease(&m_macPrintSessionPort) ;
|
PMRelease(&m_macPrintSessionPort) ;
|
||||||
@@ -321,8 +321,8 @@ void wxPrinterDC::EndDoc(void)
|
|||||||
#endif
|
#endif
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,8 +363,8 @@ void wxPrinterDC::StartPage(void)
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
::PrClosePage( (TPPrPort) m_macPrintSessionPort ) ;
|
::PrClosePage( (TPPrPort) m_macPrintSessionPort ) ;
|
||||||
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
||||||
@@ -382,8 +382,8 @@ void wxPrinterDC::StartPage(void)
|
|||||||
#endif
|
#endif
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if PM_USE_SESSION_APIS
|
#if PM_USE_SESSION_APIS
|
||||||
PMSessionEndPage((PMPrintSession)m_macPrintSessionPort);
|
PMSessionEndPage((PMPrintSession)m_macPrintSessionPort);
|
||||||
@@ -421,8 +421,8 @@ void wxPrinterDC::EndPage(void)
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld") , err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
||||||
::UMAPrClose(NULL) ;
|
::UMAPrClose(NULL) ;
|
||||||
@@ -437,8 +437,8 @@ void wxPrinterDC::EndPage(void)
|
|||||||
#endif
|
#endif
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if PM_USE_SESSION_APIS
|
#if PM_USE_SESSION_APIS
|
||||||
PMSessionEndDocument((PMPrintSession)m_macPrintSessionPort);
|
PMSessionEndDocument((PMPrintSession)m_macPrintSessionPort);
|
||||||
|
@@ -40,7 +40,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent,
|
|||||||
const wxSize& WXUNUSED(size),
|
const wxSize& WXUNUSED(size),
|
||||||
const wxString& WXUNUSED(name))
|
const wxString& WXUNUSED(name))
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( NavServicesAvailable() , "Navigation Services are not running" ) ;
|
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
|
||||||
m_message = message;
|
m_message = message;
|
||||||
m_dialogStyle = style;
|
m_dialogStyle = style;
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
@@ -92,7 +92,7 @@ int wxDirDialog::ShowModal()
|
|||||||
0L); // User Data
|
0L); // User Data
|
||||||
|
|
||||||
if ( (err != noErr) && (err != userCanceledErr) ) {
|
if ( (err != noErr) && (err != userCanceledErr) ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ int wxDirDialog::ShowModal()
|
|||||||
|
|
||||||
OSErr err = ::AECoerceDesc( &mNavReply.selection , typeFSS, &specDesc);
|
OSErr err = ::AECoerceDesc( &mNavReply.selection , typeFSS, &specDesc);
|
||||||
if ( err != noErr ) {
|
if ( err != noErr ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
folderInfo = **(FSSpec**) specDesc.dataHandle;
|
folderInfo = **(FSSpec**) specDesc.dataHandle;
|
||||||
@@ -130,7 +130,7 @@ int wxDirDialog::ShowModal()
|
|||||||
|
|
||||||
err = ::PBGetCatInfoSync(&thePB);
|
err = ::PBGetCatInfoSync(&thePB);
|
||||||
if ( err != noErr ) {
|
if ( err != noErr ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
// Create cannonical FSSpec
|
// Create cannonical FSSpec
|
||||||
|
@@ -133,7 +133,7 @@ wxDirData::wxDirData(const wxString& dirname)
|
|||||||
|
|
||||||
err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
||||||
#endif
|
#endif
|
||||||
wxASSERT_MSG( (err == noErr) || (err == nsvErr) , "Error accessing directory " + m_dirname) ;
|
wxASSERT_MSG( (err == noErr) || (err == nsvErr) , wxT("Error accessing directory " + m_dirname)) ;
|
||||||
|
|
||||||
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
||||||
m_index = 0 ;
|
m_index = 0 ;
|
||||||
@@ -153,9 +153,6 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
if ( !m_isDir )
|
if ( !m_isDir )
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
char c_name[256] ;
|
|
||||||
#endif
|
|
||||||
wxString result;
|
wxString result;
|
||||||
|
|
||||||
short err = noErr ;
|
short err = noErr ;
|
||||||
@@ -169,18 +166,12 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
p2cstrcpy( c_name, m_name ) ;
|
|
||||||
strcpy( (char *)m_name, c_name);
|
|
||||||
#else
|
|
||||||
p2cstr( m_name ) ;
|
|
||||||
#endif
|
|
||||||
// its hidden but we don't want it
|
// its hidden but we don't want it
|
||||||
if ( ( m_CPB.hFileInfo.ioFlFndrInfo.fdFlags & kIsInvisible ) && !(m_flags & wxDIR_HIDDEN) )
|
if ( ( m_CPB.hFileInfo.ioFlFndrInfo.fdFlags & kIsInvisible ) && !(m_flags & wxDIR_HIDDEN) )
|
||||||
continue ;
|
continue ;
|
||||||
#ifdef __DARWIN__
|
#ifdef __DARWIN__
|
||||||
// under X, names that start with '.' are hidden
|
// under X, names that start with '.' are hidden
|
||||||
if ( ( m_name[0] == '.' ) && !(m_flags & wxDIR_HIDDEN) )
|
if ( ( m_name[1] == '.' ) && !(m_flags & wxDIR_HIDDEN) )
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
@@ -196,18 +187,18 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
if ( ( m_CPB.dirInfo.ioFlAttrib & ioDirMask) == 0 && !(m_flags & wxDIR_FILES ) )
|
if ( ( m_CPB.dirInfo.ioFlAttrib & ioDirMask) == 0 && !(m_flags & wxDIR_FILES ) )
|
||||||
continue ;
|
continue ;
|
||||||
|
|
||||||
wxString file( m_name ) ;
|
wxString file = wxMacMakeStringFromPascal( m_name ) ;
|
||||||
if ( m_filespec.IsEmpty() || m_filespec == "*.*" || m_filespec == "*" )
|
if ( m_filespec.IsEmpty() || m_filespec == wxT("*.*") || m_filespec == wxT("*") )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else if ( m_filespec.Length() > 1 && m_filespec.Left(1) =="*" )
|
else if ( m_filespec.Length() > 1 && m_filespec.Left(1) == wxT("*") )
|
||||||
{
|
{
|
||||||
if ( file.Right( m_filespec.Length() - 1 ).Upper() != m_filespec.Mid(1).Upper() )
|
if ( file.Right( m_filespec.Length() - 1 ).Upper() != m_filespec.Mid(1).Upper() )
|
||||||
{
|
{
|
||||||
continue ;
|
continue ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( m_filespec.Length() > 1 && m_filespec.Right(1) == "*" )
|
else if ( m_filespec.Length() > 1 && m_filespec.Right(1) == wxT("*") )
|
||||||
{
|
{
|
||||||
if ( file.Left( m_filespec.Length() - 1 ).Upper() != m_filespec.Left( m_filespec.Length() - 1 ).Upper() )
|
if ( file.Left( m_filespec.Length() - 1 ).Upper() != m_filespec.Left( m_filespec.Length() - 1 ).Upper() )
|
||||||
{
|
{
|
||||||
@@ -226,7 +217,7 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
*filename = (char*) m_name ;
|
*filename = wxMacMakeStringFromPascal( m_name ) ;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -205,12 +205,9 @@ bool wxDropTarget::GetData()
|
|||||||
GetFlavorData((DragReference)m_currentDrag, theItem, theType, (void*) theData, &dataSize, 0L);
|
GetFlavorData((DragReference)m_currentDrag, theItem, theType, (void*) theData, &dataSize, 0L);
|
||||||
if( theType == 'TEXT' )
|
if( theType == 'TEXT' )
|
||||||
{
|
{
|
||||||
theData[dataSize]=0 ;
|
theData[dataSize]=0 ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
wxString convert = wxMacMakeStringFromCString( theData ) ;
|
||||||
{
|
m_dataObject->SetData( format, convert.Length() * sizeof(wxChar), (const wxChar*) convert );
|
||||||
wxMacConvertToPC((char*)theData,(char*)theData,dataSize) ;
|
|
||||||
}
|
|
||||||
m_dataObject->SetData( format, dataSize, theData );
|
|
||||||
}
|
}
|
||||||
else if ( theType == kDragFlavorTypeHFS )
|
else if ( theType == kDragFlavorTypeHFS )
|
||||||
{
|
{
|
||||||
@@ -303,11 +300,10 @@ wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags))
|
|||||||
if ( type == 'TEXT' )
|
if ( type == 'TEXT' )
|
||||||
{
|
{
|
||||||
dataSize-- ;
|
dataSize-- ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
dataPtr[ dataSize ] = 0 ;
|
||||||
{
|
wxString st( (wxChar*) dataPtr ) ;
|
||||||
wxMacConvertFromPC((char*)dataPtr,(char*)dataPtr,dataSize) ;
|
wxCharBuffer buf = wxMacStringToCString( st ) ;
|
||||||
}
|
AddDragItemFlavor(theDrag, theItem, type , buf.data(), strlen(buf), 0);
|
||||||
AddDragItemFlavor(theDrag, theItem, type , dataPtr, dataSize, 0);
|
|
||||||
}
|
}
|
||||||
else if (type == kDragFlavorTypeHFS )
|
else if (type == kDragFlavorTypeHFS )
|
||||||
{
|
{
|
||||||
|
@@ -104,13 +104,12 @@ NavEventProc(
|
|||||||
Str255 filename ;
|
Str255 filename ;
|
||||||
// get the current filename
|
// get the current filename
|
||||||
NavCustomControl(ioParams->context, kNavCtlGetEditFileName, &filename);
|
NavCustomControl(ioParams->context, kNavCtlGetEditFileName, &filename);
|
||||||
CopyPascalStringToC( filename , (char*) filename ) ;
|
wxString sfilename = wxMacMakeStringFromPascal( filename ) ;
|
||||||
wxString sfilename( filename ) ;
|
|
||||||
int pos = sfilename.Find('.',TRUE) ;
|
int pos = sfilename.Find('.',TRUE) ;
|
||||||
if ( pos != wxNOT_FOUND )
|
if ( pos != wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
sfilename = sfilename.Left(pos+1)+extension ;
|
sfilename = sfilename.Left(pos+1)+extension ;
|
||||||
CopyCStringToPascal( sfilename.c_str() , filename ) ;
|
wxMacStringToPascal( sfilename , filename ) ;
|
||||||
NavCustomControl(ioParams->context, kNavCtlSetEditFileName, &filename);
|
NavCustomControl(ioParams->context, kNavCtlSetEditFileName, &filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,11 +117,11 @@ NavEventProc(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * gfilters[] =
|
const wxChar * gfilters[] =
|
||||||
{
|
{
|
||||||
"*.TXT" ,
|
wxT("*.TXT") ,
|
||||||
"*.TIF" ,
|
wxT("*.TIF") ,
|
||||||
"*.JPG" ,
|
wxT("*.JPG") ,
|
||||||
|
|
||||||
NULL
|
NULL
|
||||||
} ;
|
} ;
|
||||||
@@ -162,7 +161,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
++filterIndex ;
|
++filterIndex ;
|
||||||
}
|
}
|
||||||
isName = !isName ;
|
isName = !isName ;
|
||||||
current = "" ;
|
current = wxEmptyString ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -172,7 +171,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
// we allow for compatibility reason to have a single filter expression (like *.*) without
|
// we allow for compatibility reason to have a single filter expression (like *.*) without
|
||||||
// an explanatory text, in that case the first part is name and extension at the same time
|
// an explanatory text, in that case the first part is name and extension at the same time
|
||||||
|
|
||||||
wxASSERT_MSG( filterIndex == 0 || !isName , "incorrect format of format string" ) ;
|
wxASSERT_MSG( filterIndex == 0 || !isName , wxT("incorrect format of format string") ) ;
|
||||||
if ( current.IsEmpty() )
|
if ( current.IsEmpty() )
|
||||||
myData->extensions.Add( myData->name[filterIndex] ) ;
|
myData->extensions.Add( myData->name[filterIndex] ) ;
|
||||||
else
|
else
|
||||||
@@ -189,7 +188,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
int j ;
|
int j ;
|
||||||
for ( j = 0 ; gfilters[j] ; j++ )
|
for ( j = 0 ; gfilters[j] ; j++ )
|
||||||
{
|
{
|
||||||
if ( strcmp( myData->extensions[i] , gfilters[j] ) == 0 )
|
if ( myData->extensions[i] == gfilters[j] )
|
||||||
{
|
{
|
||||||
myData->filtermactypes.Add( gfiltersmac[j] ) ;
|
myData->filtermactypes.Add( gfiltersmac[j] ) ;
|
||||||
break ;
|
break ;
|
||||||
@@ -205,6 +204,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
|
|
||||||
static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecPtr data)
|
static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecPtr data)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Str255 filename ;
|
Str255 filename ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
@@ -214,20 +214,22 @@ static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecP
|
|||||||
p2cstr( filename ) ;
|
p2cstr( filename ) ;
|
||||||
#endif
|
#endif
|
||||||
wxString file(filename) ;
|
wxString file(filename) ;
|
||||||
|
*/
|
||||||
|
wxString file = wxMacMakeStringFromPascal( name ) ;
|
||||||
file.MakeUpper() ;
|
file.MakeUpper() ;
|
||||||
|
|
||||||
if ( data->extensions.GetCount() > 0 )
|
if ( data->extensions.GetCount() > 0 )
|
||||||
{
|
{
|
||||||
//for ( int i = 0 ; i < data->numfilters ; ++i )
|
//for ( int i = 0 ; i < data->numfilters ; ++i )
|
||||||
int i = data->currentfilter ;
|
int i = data->currentfilter ;
|
||||||
if ( data->extensions[i].Right(2) == ".*" )
|
if ( data->extensions[i].Right(2) == wxT(".*") )
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
{
|
{
|
||||||
if ( type == (OSType)data->filtermactypes[i] )
|
if ( type == (OSType)data->filtermactypes[i] )
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
wxStringTokenizer tokenizer( data->extensions[i] , ";" ) ;
|
wxStringTokenizer tokenizer( data->extensions[i] , wxT(";") ) ;
|
||||||
while( tokenizer.HasMoreTokens() )
|
while( tokenizer.HasMoreTokens() )
|
||||||
{
|
{
|
||||||
wxString extension = tokenizer.GetNextToken() ;
|
wxString extension = tokenizer.GetNextToken() ;
|
||||||
@@ -272,17 +274,17 @@ static pascal Boolean CrossPlatformFileFilter(CInfoPBPtr myCInfoPBPtr, void *dat
|
|||||||
|
|
||||||
// end wxmac
|
// end wxmac
|
||||||
|
|
||||||
wxString wxFileSelector(const char *title,
|
wxString wxFileSelector(const wxChar *title,
|
||||||
const char *defaultDir, const char *defaultFileName,
|
const wxChar *defaultDir, const wxChar *defaultFileName,
|
||||||
const char *defaultExtension, const char *filter, int flags,
|
const wxChar *defaultExtension, const wxChar *filter, int flags,
|
||||||
wxWindow *parent, int x, int y)
|
wxWindow *parent, int x, int y)
|
||||||
{
|
{
|
||||||
// If there's a default extension specified but no filter, we create a suitable
|
// If there's a default extension specified but no filter, we create a suitable
|
||||||
// filter.
|
// filter.
|
||||||
|
|
||||||
wxString filter2("");
|
wxString filter2;
|
||||||
if ( defaultExtension && !filter )
|
if ( defaultExtension && !filter )
|
||||||
filter2 = wxString("*.") + wxString(defaultExtension) ;
|
filter2 = wxString(wxT("*.")) + wxString(defaultExtension) ;
|
||||||
else if ( filter )
|
else if ( filter )
|
||||||
filter2 = filter;
|
filter2 = filter;
|
||||||
|
|
||||||
@@ -290,13 +292,13 @@ wxString wxFileSelector(const char *title,
|
|||||||
if (defaultDir)
|
if (defaultDir)
|
||||||
defaultDirString = defaultDir;
|
defaultDirString = defaultDir;
|
||||||
else
|
else
|
||||||
defaultDirString = "";
|
defaultDirString = wxEmptyString ;
|
||||||
|
|
||||||
wxString defaultFilenameString;
|
wxString defaultFilenameString;
|
||||||
if (defaultFileName)
|
if (defaultFileName)
|
||||||
defaultFilenameString = defaultFileName;
|
defaultFilenameString = defaultFileName;
|
||||||
else
|
else
|
||||||
defaultFilenameString = "";
|
defaultFilenameString = wxEmptyString;
|
||||||
|
|
||||||
wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y));
|
wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y));
|
||||||
|
|
||||||
@@ -308,19 +310,19 @@ wxString wxFileSelector(const char *title,
|
|||||||
return wxGetEmptyString();
|
return wxGetEmptyString();
|
||||||
}
|
}
|
||||||
|
|
||||||
WXDLLEXPORT wxString wxFileSelectorEx(const char *title,
|
WXDLLEXPORT wxString wxFileSelectorEx(const wxChar *title,
|
||||||
const char *defaultDir,
|
const wxChar *defaultDir,
|
||||||
const char *defaultFileName,
|
const wxChar *defaultFileName,
|
||||||
int* defaultFilterIndex,
|
int* defaultFilterIndex,
|
||||||
const char *filter,
|
const wxChar *filter,
|
||||||
int flags,
|
int flags,
|
||||||
wxWindow* parent,
|
wxWindow* parent,
|
||||||
int x,
|
int x,
|
||||||
int y)
|
int y)
|
||||||
|
|
||||||
{
|
{
|
||||||
wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "",
|
wxFileDialog fileDialog(parent, title ? title : wxT(""), defaultDir ? defaultDir : wxT(""),
|
||||||
defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y));
|
defaultFileName ? defaultFileName : wxT(""), filter ? filter : wxT(""), flags, wxPoint(x, y));
|
||||||
|
|
||||||
if ( fileDialog.ShowModal() == wxID_OK )
|
if ( fileDialog.ShowModal() == wxID_OK )
|
||||||
{
|
{
|
||||||
@@ -335,18 +337,17 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
|||||||
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
|
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
|
||||||
long style, const wxPoint& pos)
|
long style, const wxPoint& pos)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( NavServicesAvailable() , "Navigation Services are not running" ) ;
|
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
|
||||||
m_message = message;
|
m_message = message;
|
||||||
m_dialogStyle = style;
|
m_dialogStyle = style;
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
m_path = "";
|
m_path = wxT("");
|
||||||
m_fileName = defaultFileName;
|
m_fileName = defaultFileName;
|
||||||
m_dir = defaultDir;
|
m_dir = defaultDir;
|
||||||
m_wildCard = wildCard;
|
m_wildCard = wildCard;
|
||||||
m_filterIndex = 0;
|
m_filterIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pascal Boolean CrossPlatformFilterCallback (
|
pascal Boolean CrossPlatformFilterCallback (
|
||||||
AEDesc *theItem,
|
AEDesc *theItem,
|
||||||
void *info,
|
void *info,
|
||||||
@@ -417,19 +418,8 @@ int wxFileDialog::ShowModal()
|
|||||||
mNavOptions.dialogOptionFlags &= ~kNavSelectDefaultLocation;
|
mNavOptions.dialogOptionFlags &= ~kNavSelectDefaultLocation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
wxMacStringToPascal( m_message , (StringPtr)mNavOptions.message ) ;
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( m_fileName , (StringPtr)mNavOptions.savedFileName ) ;
|
||||||
c2pstrcpy((StringPtr)mNavOptions.message, m_message) ;
|
|
||||||
#else
|
|
||||||
strcpy((char *)mNavOptions.message, m_message) ;
|
|
||||||
c2pstr((char *)mNavOptions.message ) ;
|
|
||||||
#endif
|
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy((StringPtr)mNavOptions.savedFileName, m_fileName) ;
|
|
||||||
#else
|
|
||||||
strcpy((char *)mNavOptions.savedFileName, m_fileName) ;
|
|
||||||
c2pstr((char *)mNavOptions.savedFileName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// zero all data
|
// zero all data
|
||||||
|
|
||||||
@@ -450,12 +440,7 @@ int wxFileDialog::ShowModal()
|
|||||||
(*mNavOptions.popupExtension)[i].version = kNavMenuItemSpecVersion ;
|
(*mNavOptions.popupExtension)[i].version = kNavMenuItemSpecVersion ;
|
||||||
(*mNavOptions.popupExtension)[i].menuCreator = 'WXNG' ;
|
(*mNavOptions.popupExtension)[i].menuCreator = 'WXNG' ;
|
||||||
(*mNavOptions.popupExtension)[i].menuType = i ;
|
(*mNavOptions.popupExtension)[i].menuType = i ;
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( myData.name[i] , (StringPtr)(*mNavOptions.popupExtension)[i].menuItemName ) ;
|
||||||
c2pstrcpy((StringPtr)(*mNavOptions.popupExtension)[i].menuItemName, myData.name[i]) ;
|
|
||||||
#else
|
|
||||||
strcpy((char *)(*mNavOptions.popupExtension)[i].menuItemName, myData.name[i]) ;
|
|
||||||
c2pstr((char *)(*mNavOptions.popupExtension)[i].menuItemName ) ;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( m_dialogStyle & wxSAVE )
|
if ( m_dialogStyle & wxSAVE )
|
||||||
@@ -519,7 +504,7 @@ int wxFileDialog::ShowModal()
|
|||||||
{
|
{
|
||||||
OSErr err = ::AEGetNthDesc( &mNavReply.selection , i , typeFSS, &keyWord , &specDesc);
|
OSErr err = ::AEGetNthDesc( &mNavReply.selection , i , typeFSS, &keyWord , &specDesc);
|
||||||
if ( err != noErr ) {
|
if ( err != noErr ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
outFileSpec = **(FSSpec**) specDesc.dataHandle;
|
outFileSpec = **(FSSpec**) specDesc.dataHandle;
|
||||||
@@ -543,28 +528,30 @@ int wxFileDialog::ShowModal()
|
|||||||
|
|
||||||
// Generic file load/save dialog
|
// Generic file load/save dialog
|
||||||
static wxString
|
static wxString
|
||||||
wxDefaultFileSelector(bool load, const char *what, const char *extension, const char *default_name, wxWindow *parent)
|
wxDefaultFileSelector(bool load, const wxChar *what, const wxChar *extension, const wxChar *default_name, wxWindow *parent)
|
||||||
{
|
{
|
||||||
char *ext = (char *)extension;
|
wxString prompt;
|
||||||
|
|
||||||
char prompt[50];
|
|
||||||
wxString str;
|
wxString str;
|
||||||
if (load)
|
if (load)
|
||||||
str = "Load %s file";
|
str = wxT("Load %s file");
|
||||||
else
|
else
|
||||||
str = "Save %s file";
|
str = wxT("Save %s file");
|
||||||
sprintf(prompt, wxGetTranslation(str), what);
|
prompt.Printf( wxGetTranslation(str), what);
|
||||||
|
|
||||||
if (*ext == '.') ext++;
|
const wxChar *ext = extension;
|
||||||
char wild[60];
|
if (*ext == wxT('.'))
|
||||||
sprintf(wild, "*.%s", ext);
|
ext++;
|
||||||
|
|
||||||
|
wxString wild;
|
||||||
|
wild.Printf(wxT("*.%s"), ext);
|
||||||
|
|
||||||
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
|
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generic file load dialog
|
// Generic file load dialog
|
||||||
wxString
|
wxString
|
||||||
wxLoadFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent)
|
wxLoadFileSelector(const wxChar *what, const wxChar *extension, const wxChar *default_name, wxWindow *parent)
|
||||||
{
|
{
|
||||||
return wxDefaultFileSelector(TRUE, what, extension, default_name, parent);
|
return wxDefaultFileSelector(TRUE, what, extension, default_name, parent);
|
||||||
}
|
}
|
||||||
@@ -572,9 +559,7 @@ wxLoadFileSelector(const char *what, const char *extension, const char *default_
|
|||||||
|
|
||||||
// Generic file save dialog
|
// Generic file save dialog
|
||||||
wxString
|
wxString
|
||||||
wxSaveFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent)
|
wxSaveFileSelector(const wxChar *what, const wxChar *extension, const wxChar *default_name, wxWindow *parent)
|
||||||
{
|
{
|
||||||
return wxDefaultFileSelector(FALSE, what, extension, default_name, parent);
|
return wxDefaultFileSelector(FALSE, what, extension, default_name, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ wxFontRefData::~wxFontRefData()
|
|||||||
|
|
||||||
void wxFontRefData::MacFindFont()
|
void wxFontRefData::MacFindFont()
|
||||||
{
|
{
|
||||||
if( m_faceName == "" )
|
if( m_faceName.Length() == 0 )
|
||||||
{
|
{
|
||||||
switch( m_family )
|
switch( m_family )
|
||||||
{
|
{
|
||||||
@@ -92,14 +92,13 @@ void wxFontRefData::MacFindFont()
|
|||||||
}
|
}
|
||||||
Str255 name ;
|
Str255 name ;
|
||||||
GetFontName( m_macFontNum , name ) ;
|
GetFontName( m_macFontNum , name ) ;
|
||||||
CopyPascalStringToC( name , (char*) name ) ;
|
m_faceName = wxMacMakeStringFromPascal( name ) ;
|
||||||
m_faceName = (char*) name ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( m_faceName == "systemfont" )
|
if ( m_faceName == wxT("systemfont") )
|
||||||
m_macFontNum = ::GetSysFont() ;
|
m_macFontNum = ::GetSysFont() ;
|
||||||
else if ( m_faceName == "applicationfont" )
|
else if ( m_faceName == wxT("applicationfont") )
|
||||||
m_macFontNum = ::GetAppFont() ;
|
m_macFontNum = ::GetAppFont() ;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -126,7 +125,7 @@ void wxFontRefData::MacFindFont()
|
|||||||
status = ATSUFindFontFromName ( (Ptr) m_faceName , strlen( m_faceName ) ,
|
status = ATSUFindFontFromName ( (Ptr) m_faceName , strlen( m_faceName ) ,
|
||||||
kFontFullName, kFontMacintoshPlatform, kFontRomanScript , kFontNoLanguage , (UInt32*)&m_macATSUFontID ) ;
|
kFontFullName, kFontMacintoshPlatform, kFontRomanScript , kFontNoLanguage , (UInt32*)&m_macATSUFontID ) ;
|
||||||
*/
|
*/
|
||||||
wxASSERT_MSG( status == noErr , "couldn't retrieve font identifier" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't retrieve font identifier") ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -40,7 +40,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
|||||||
size = wxSize( 200 , 16 ) ;
|
size = wxSize( 200 , 16 ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range,
|
||||||
kControlProgressBarProc , (long) this ) ;
|
kControlProgressBarProc , (long) this ) ;
|
||||||
|
@@ -91,7 +91,7 @@ void wxGLContext::Update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLContext::SetColour(const char *colour)
|
void wxGLContext::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
float r = 0.0;
|
float r = 0.0;
|
||||||
float g = 0.0;
|
float g = 0.0;
|
||||||
@@ -309,7 +309,7 @@ void wxGLCanvas::SetCurrent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetColour(const char *colour)
|
void wxGLCanvas::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
if (m_glContext)
|
if (m_glContext)
|
||||||
m_glContext->SetColour(colour);
|
m_glContext->SetColour(colour);
|
||||||
|
@@ -83,19 +83,19 @@ bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
|
|||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
short theId = -1 ;
|
short theId = -1 ;
|
||||||
if ( name == "wxICON_INFORMATION" )
|
if ( name == wxT("wxICON_INFORMATION") )
|
||||||
{
|
{
|
||||||
theId = kNoteIcon ;
|
theId = kNoteIcon ;
|
||||||
}
|
}
|
||||||
else if ( name == "wxICON_QUESTION" )
|
else if ( name == wxT("wxICON_QUESTION") )
|
||||||
{
|
{
|
||||||
theId = kCautionIcon ;
|
theId = kCautionIcon ;
|
||||||
}
|
}
|
||||||
else if ( name == "wxICON_WARNING" )
|
else if ( name == wxT("wxICON_WARNING") )
|
||||||
{
|
{
|
||||||
theId = kCautionIcon ;
|
theId = kCautionIcon ;
|
||||||
}
|
}
|
||||||
else if ( name == "wxICON_ERROR" )
|
else if ( name == wxT("wxICON_ERROR") )
|
||||||
{
|
{
|
||||||
theId = kStopIcon ;
|
theId = kStopIcon ;
|
||||||
}
|
}
|
||||||
@@ -103,13 +103,7 @@ bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
|
|||||||
{
|
{
|
||||||
Str255 theName ;
|
Str255 theName ;
|
||||||
OSType theType ;
|
OSType theType ;
|
||||||
|
wxMacStringToPascal( name , theName ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) theName , name ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) theName , name ) ;
|
|
||||||
c2pstr( (char *) theName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
|
Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
|
||||||
if ( resHandle != 0L )
|
if ( resHandle != 0L )
|
||||||
|
@@ -113,7 +113,7 @@ int wxJoystick::GetProductId() const
|
|||||||
wxString wxJoystick::GetProductName() const
|
wxString wxJoystick::GetProductName() const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return wxString("");
|
return wxString(wxT(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxJoystick::GetXMin() const
|
int wxJoystick::GetXMin() const
|
||||||
|
@@ -94,7 +94,7 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
|||||||
|
|
||||||
case lDrawMsg:
|
case lDrawMsg:
|
||||||
{
|
{
|
||||||
const wxString text = list->m_stringArray[cell.v] ;
|
const wxString linetext = list->m_stringArray[cell.v] ;
|
||||||
|
|
||||||
// Save the current clip region, and set the clip region to the area we are about
|
// Save the current clip region, and set the clip region to the area we are about
|
||||||
// to draw.
|
// to draw.
|
||||||
@@ -121,32 +121,27 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
{
|
||||||
|
Rect frame = { drawRect->top, drawRect->left + 4,
|
||||||
if ( useDrawThemeText )
|
drawRect->top + kwxMacListItemHeight, drawRect->right + 10000 } ;
|
||||||
{
|
CFMutableStringRef mString = CFStringCreateMutableCopy( NULL , 0 , wxMacCFStringHolder(linetext) ) ;
|
||||||
Rect frame = { drawRect->top, drawRect->left + 4,
|
::TruncateThemeText( mString , kThemeCurrentPortFont, kThemeStateActive, drawRect->right - drawRect->left , truncEnd , NULL ) ;
|
||||||
drawRect->top + kwxMacListItemHeight, drawRect->right + 10000 } ;
|
::DrawThemeTextBox( mString,
|
||||||
CFStringRef sString = CFStringCreateWithBytes( NULL , (UInt8*) text.c_str(), text.Length(), CFStringGetSystemEncoding(), false ) ;
|
kThemeCurrentPortFont,
|
||||||
CFMutableStringRef mString = CFStringCreateMutableCopy( NULL , 0 , sString ) ;
|
kThemeStateActive,
|
||||||
CFRelease( sString ) ;
|
false,
|
||||||
::TruncateThemeText( mString , kThemeCurrentPortFont, kThemeStateActive, drawRect->right - drawRect->left , truncEnd , NULL ) ;
|
&frame,
|
||||||
::DrawThemeTextBox( mString,
|
teJustLeft,
|
||||||
kThemeCurrentPortFont,
|
nil );
|
||||||
kThemeStateActive,
|
CFRelease( mString ) ;
|
||||||
false,
|
}
|
||||||
&frame,
|
#else
|
||||||
teJustLeft,
|
{
|
||||||
nil );
|
wxCharBuffer text = wxMacStringToCString( linetext ) ;
|
||||||
CFRelease( mString ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
MoveTo(drawRect->left + 4 , drawRect->top + 10 );
|
MoveTo(drawRect->left + 4 , drawRect->top + 10 );
|
||||||
DrawText(text, 0 , text.Length());
|
DrawText(text, 0 , strlen(text) );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// If the cell is hilited, do the hilite now. Paint the cell contents with the
|
// If the cell is hilited, do the hilite now. Paint the cell contents with the
|
||||||
// appropriate QuickDraw transform mode.
|
// appropriate QuickDraw transform mode.
|
||||||
|
|
||||||
@@ -213,7 +208,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
ListDefSpec listDef;
|
ListDefSpec listDef;
|
||||||
listDef.defType = kListDefUserProcType;
|
listDef.defType = kListDefUserProcType;
|
||||||
@@ -234,8 +229,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
fontSize = 9 ;
|
fontSize = 9 ;
|
||||||
fontStyle = normal ;
|
fontStyle = normal ;
|
||||||
#endif
|
#endif
|
||||||
CopyPascalStringToC( fontName , (char*) fontName ) ;
|
SetFont( wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal( fontName ) ) ) ;
|
||||||
SetFont( wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , fontName ) ) ;
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
Size asize;
|
Size asize;
|
||||||
|
|
||||||
@@ -388,15 +382,8 @@ void wxListBox::Delete(int N)
|
|||||||
int wxListBox::DoAppend(const wxString& item)
|
int wxListBox::DoAppend(const wxString& item)
|
||||||
{
|
{
|
||||||
int index = m_noItems ;
|
int index = m_noItems ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
m_stringArray.Add( item ) ;
|
||||||
{
|
m_dataArray.Add( NULL );
|
||||||
m_stringArray.Add( wxMacMakeMacStringFromPC( item ) ) ;
|
|
||||||
m_dataArray.Add( NULL );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_stringArray.Add( item ) ;
|
|
||||||
m_dataArray.Add( NULL );
|
|
||||||
}
|
|
||||||
m_noItems ++;
|
m_noItems ++;
|
||||||
DoSetItemClientData( index , NULL ) ;
|
DoSetItemClientData( index , NULL ) ;
|
||||||
MacAppend( item ) ;
|
MacAppend( item ) ;
|
||||||
@@ -451,47 +438,30 @@ bool wxListBox::HasMultipleSelection() const
|
|||||||
return (m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED);
|
return (m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListBox::FindString(const wxString& st) const
|
int wxListBox::FindString(const wxString& s) const
|
||||||
{
|
{
|
||||||
wxString s ;
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
s = wxMacMakeMacStringFromPC( st ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
s = st ;
|
|
||||||
|
|
||||||
if ( s.Right(1) == "*" )
|
if ( s.Right(1) == wxT("*") )
|
||||||
{
|
{
|
||||||
wxString search = s.Left( s.Length() - 1 ) ;
|
wxString search = s.Left( s.Length() - 1 ) ;
|
||||||
int len = search.Length() ;
|
int len = search.Length() ;
|
||||||
Str255 s1 , s2 ;
|
Str255 s1 , s2 ;
|
||||||
|
wxMacStringToPascal( search , s2 ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) s2 , search.c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s2 , search.c_str() ) ;
|
|
||||||
c2pstr( (char *) s2 ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for ( int i = 0 ; i < m_noItems ; ++ i )
|
for ( int i = 0 ; i < m_noItems ; ++ i )
|
||||||
{
|
{
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( m_stringArray[i].Left( len ) , s1 ) ;
|
||||||
c2pstrcpy( (StringPtr) s1 , m_stringArray[i].Left( len ).c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s1 , m_stringArray[i].Left( len ).c_str() ) ;
|
|
||||||
c2pstr( (char *) s1 ) ;
|
|
||||||
#endif
|
|
||||||
if ( EqualString( s1 , s2 , false , false ) )
|
if ( EqualString( s1 , s2 , false , false ) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
if ( s.Left(1) == "*" && s.Length() > 1 )
|
if ( s.Left(1) == wxT("*") && s.Length() > 1 )
|
||||||
{
|
{
|
||||||
s = st ;
|
wxString st = s ;
|
||||||
s.MakeLower() ;
|
st.MakeLower() ;
|
||||||
for ( int i = 0 ; i < m_noItems ; ++i )
|
for ( int i = 0 ; i < m_noItems ; ++i )
|
||||||
{
|
{
|
||||||
if ( GetString(i).Lower().Matches(s) )
|
if ( GetString(i).Lower().Matches(st) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -501,21 +471,12 @@ int wxListBox::FindString(const wxString& st) const
|
|||||||
{
|
{
|
||||||
Str255 s1 , s2 ;
|
Str255 s1 , s2 ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( s , s2 ) ;
|
||||||
c2pstrcpy( (StringPtr) s2 , s.c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s2 , s.c_str() ) ;
|
|
||||||
c2pstr( (char *) s2 ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for ( int i = 0 ; i < m_noItems ; ++ i )
|
for ( int i = 0 ; i < m_noItems ; ++ i )
|
||||||
{
|
{
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( m_stringArray[i] , s1 ) ;
|
||||||
c2pstrcpy( (StringPtr) s1 , m_stringArray[i].c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s1 , m_stringArray[i].c_str() ) ;
|
|
||||||
c2pstr( (char *) s1 ) ;
|
|
||||||
#endif
|
|
||||||
if ( EqualString( s1 , s2 , false , false ) )
|
if ( EqualString( s1 , s2 , false , false ) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
@@ -535,7 +496,7 @@ void wxListBox::Clear()
|
|||||||
void wxListBox::SetSelection(int N, bool select)
|
void wxListBox::SetSelection(int N, bool select)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||||
"invalid index in wxListBox::SetSelection" );
|
wxT("invalid index in wxListBox::SetSelection") );
|
||||||
MacSetSelection( N , select ) ;
|
MacSetSelection( N , select ) ;
|
||||||
GetSelections( m_selectionPreImage ) ;
|
GetSelections( m_selectionPreImage ) ;
|
||||||
}
|
}
|
||||||
@@ -543,7 +504,7 @@ void wxListBox::SetSelection(int N, bool select)
|
|||||||
bool wxListBox::IsSelected(int N) const
|
bool wxListBox::IsSelected(int N) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( N >= 0 && N < m_noItems, FALSE,
|
wxCHECK_MSG( N >= 0 && N < m_noItems, FALSE,
|
||||||
"invalid index in wxListBox::Selected" );
|
wxT("invalid index in wxListBox::Selected") );
|
||||||
|
|
||||||
return MacIsSelected( N ) ;
|
return MacIsSelected( N ) ;
|
||||||
}
|
}
|
||||||
@@ -564,7 +525,7 @@ wxClientData *wxListBox::DoGetItemClientObject(int N) const
|
|||||||
void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||||
"invalid index in wxListBox::SetClientData" );
|
wxT("invalid index in wxListBox::SetClientData") );
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
if ( m_windowStyle & wxLB_OWNERDRAW )
|
if ( m_windowStyle & wxLB_OWNERDRAW )
|
||||||
@@ -574,7 +535,7 @@ void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
|||||||
wxFAIL_MSG(wxT("Can't use client data with owner-drawn listboxes"));
|
wxFAIL_MSG(wxT("Can't use client data with owner-drawn listboxes"));
|
||||||
}
|
}
|
||||||
#endif // wxUSE_OWNER_DRAWN
|
#endif // wxUSE_OWNER_DRAWN
|
||||||
wxASSERT_MSG( m_dataArray.GetCount() >= (size_t) N , "invalid client_data array" ) ;
|
wxASSERT_MSG( m_dataArray.GetCount() >= (size_t) N , wxT("invalid client_data array") ) ;
|
||||||
|
|
||||||
if ( m_dataArray.GetCount() > (size_t) N )
|
if ( m_dataArray.GetCount() > (size_t) N )
|
||||||
{
|
{
|
||||||
@@ -606,12 +567,7 @@ int wxListBox::GetSelection() const
|
|||||||
// Find string for position
|
// Find string for position
|
||||||
wxString wxListBox::GetString(int N) const
|
wxString wxListBox::GetString(int N) const
|
||||||
{
|
{
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
return m_stringArray[N] ;
|
||||||
{
|
|
||||||
return wxMacMakePCStringFromMac( m_stringArray[N] ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return m_stringArray[N] ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||||
@@ -633,14 +589,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
|||||||
|
|
||||||
void wxListBox::SetString(int N, const wxString& s)
|
void wxListBox::SetString(int N, const wxString& s)
|
||||||
{
|
{
|
||||||
wxString str ;
|
m_stringArray[N] = s ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
str = wxMacMakeMacStringFromPC( s ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
str = s ;
|
|
||||||
m_stringArray[N] = str ;
|
|
||||||
MacSet( N , s ) ;
|
MacSet( N , s ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,7 +703,7 @@ void wxListBox::MacDelete( int N )
|
|||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::MacInsert( int n , const char * text)
|
void wxListBox::MacInsert( int n , const wxString& text)
|
||||||
{
|
{
|
||||||
Cell cell = { 0 , 0 } ;
|
Cell cell = { 0 , 0 } ;
|
||||||
cell.v = n ;
|
cell.v = n ;
|
||||||
@@ -763,7 +712,7 @@ void wxListBox::MacInsert( int n , const char * text)
|
|||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::MacAppend( const char * text)
|
void wxListBox::MacAppend( const wxString& text)
|
||||||
{
|
{
|
||||||
Cell cell = { 0 , 0 } ;
|
Cell cell = { 0 , 0 } ;
|
||||||
cell.v = (**(ListHandle)m_macList).dataBounds.bottom ;
|
cell.v = (**(ListHandle)m_macList).dataBounds.bottom ;
|
||||||
@@ -834,7 +783,7 @@ int wxListBox::MacGetSelections( wxArrayInt& aSelections ) const
|
|||||||
return no_sel ;
|
return no_sel ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::MacSet( int n , const char * text )
|
void wxListBox::MacSet( int n , const wxString& text )
|
||||||
{
|
{
|
||||||
// our implementation does not store anything in the list
|
// our implementation does not store anything in the list
|
||||||
// so we just have to redraw
|
// so we just have to redraw
|
||||||
@@ -1011,11 +960,11 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
{
|
{
|
||||||
if ( event.GetTimestamp() > m_lastTypeIn + 60 )
|
if ( event.GetTimestamp() > m_lastTypeIn + 60 )
|
||||||
{
|
{
|
||||||
m_typeIn = "" ;
|
m_typeIn = wxEmptyString ;
|
||||||
}
|
}
|
||||||
m_lastTypeIn = event.GetTimestamp() ;
|
m_lastTypeIn = event.GetTimestamp() ;
|
||||||
m_typeIn += (char) event.GetKeyCode() ;
|
m_typeIn += (char) event.GetKeyCode() ;
|
||||||
int line = FindString("*"+m_typeIn+"*") ;
|
int line = FindString(wxT("*")+m_typeIn+wxT("*")) ;
|
||||||
if ( line >= 0 )
|
if ( line >= 0 )
|
||||||
{
|
{
|
||||||
if ( GetSelection() != line )
|
if ( GetSelection() != line )
|
||||||
|
@@ -88,7 +88,7 @@ void wxMacAddEvent(
|
|||||||
short wakeUp )
|
short wakeUp )
|
||||||
{
|
{
|
||||||
wxMacNotificationEvents *e = (wxMacNotificationEvents *) table ;
|
wxMacNotificationEvents *e = (wxMacNotificationEvents *) table ;
|
||||||
wxASSERT_MSG( handler != NULL , "illegal notification proc ptr" ) ;
|
wxASSERT_MSG( handler != NULL , wxT("illegal notification proc ptr") ) ;
|
||||||
/* this should be protected eventually */
|
/* this should be protected eventually */
|
||||||
short index = e->top++ ;
|
short index = e->top++ ;
|
||||||
|
|
||||||
|
@@ -107,7 +107,7 @@ void wxMenu::Attach(wxMenuBarBase *menubar)
|
|||||||
// append a new item or submenu to the menu
|
// append a new item or submenu to the menu
|
||||||
bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( pItem != NULL, "can't append NULL item to the menu" );
|
wxASSERT_MSG( pItem != NULL, wxT("can't append NULL item to the menu") );
|
||||||
|
|
||||||
if ( pItem->IsSeparator() )
|
if ( pItem->IsSeparator() )
|
||||||
{
|
{
|
||||||
@@ -121,7 +121,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
wxMenu *pSubMenu = pItem->GetSubMenu() ;
|
wxMenu *pSubMenu = pItem->GetSubMenu() ;
|
||||||
if ( pSubMenu != NULL )
|
if ( pSubMenu != NULL )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( pSubMenu->m_hMenu != NULL , "invalid submenu added");
|
wxASSERT_MSG( pSubMenu->m_hMenu != NULL , wxT("invalid submenu added"));
|
||||||
pSubMenu->m_menuParent = this ;
|
pSubMenu->m_menuParent = this ;
|
||||||
|
|
||||||
if (wxMenuBar::MacGetInstalledMenuBar() == m_menuBar)
|
if (wxMenuBar::MacGetInstalledMenuBar() == m_menuBar)
|
||||||
@@ -140,12 +140,12 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
{
|
{
|
||||||
if ( pos == (size_t)-1 )
|
if ( pos == (size_t)-1 )
|
||||||
{
|
{
|
||||||
UMAAppendMenuItem(MAC_WXHMENU(m_hMenu), "a" );
|
UMAAppendMenuItem(MAC_WXHMENU(m_hMenu), wxT("a") );
|
||||||
pos = CountMenuItems(MAC_WXHMENU(m_hMenu)) ;
|
pos = CountMenuItems(MAC_WXHMENU(m_hMenu)) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), "a" , pos);
|
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a") , pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ;
|
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ;
|
||||||
@@ -503,7 +503,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
|
|
||||||
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
||||||
wxString message ;
|
wxString message ;
|
||||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource") );
|
||||||
::SetMenuBar( menubar ) ;
|
::SetMenuBar( menubar ) ;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
::DisposeMenuBar( menubar ) ;
|
::DisposeMenuBar( menubar ) ;
|
||||||
@@ -550,7 +550,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
int pos ;
|
int pos ;
|
||||||
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
||||||
|
|
||||||
if( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
if( m_titles[i] == wxT("?") || m_titles[i] == wxT("&?") || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
||||||
{
|
{
|
||||||
if ( mh == NULL )
|
if ( mh == NULL )
|
||||||
{
|
{
|
||||||
|
@@ -48,9 +48,9 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu,
|
|||||||
{
|
{
|
||||||
// In other languages there is no difference in naming the Exit/Quit menu item between MacOS and Windows guidelines
|
// In other languages there is no difference in naming the Exit/Quit menu item between MacOS and Windows guidelines
|
||||||
// therefore these item must not be translated
|
// therefore these item must not be translated
|
||||||
if ( wxStripMenuCodes(m_text).Upper() == "EXIT" )
|
if ( wxStripMenuCodes(m_text).Upper() == wxT("EXIT") )
|
||||||
{
|
{
|
||||||
m_text = "Quit\tCtrl+Q" ;
|
m_text =wxT("Quit\tCtrl+Q") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_radioGroup.start = -1;
|
m_radioGroup.start = -1;
|
||||||
@@ -152,7 +152,7 @@ void wxMenuItem::UncheckRadio()
|
|||||||
|
|
||||||
void wxMenuItem::Check(bool bDoCheck)
|
void wxMenuItem::Check(bool bDoCheck)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( IsCheckable(), "only checkable items may be checked" );
|
wxCHECK_RET( IsCheckable(), wxT("only checkable items may be checked") );
|
||||||
|
|
||||||
if ( m_isChecked != bDoCheck )
|
if ( m_isChecked != bDoCheck )
|
||||||
{
|
{
|
||||||
|
@@ -72,7 +72,7 @@ wxMetaFile::wxMetaFile(const wxString& file)
|
|||||||
|
|
||||||
|
|
||||||
M_METAFILEDATA->m_metafile = 0;
|
M_METAFILEDATA->m_metafile = 0;
|
||||||
wxASSERT_MSG( file.IsEmpty() , "no file based metafile support yet") ;
|
wxASSERT_MSG( file.IsEmpty() , wxT("no file based metafile support yet") ) ;
|
||||||
/*
|
/*
|
||||||
if (!file.IsNull() && (file.Cmp("") == 0))
|
if (!file.IsNull() && (file.Cmp("") == 0))
|
||||||
M_METAFILEDATA->m_metafile = (WXHANDLE) GetMetaFile(file);
|
M_METAFILEDATA->m_metafile = (WXHANDLE) GetMetaFile(file);
|
||||||
@@ -145,9 +145,9 @@ wxMetaFileDC::wxMetaFileDC(const wxString& file)
|
|||||||
m_maxX = -10000;
|
m_maxX = -10000;
|
||||||
m_maxY = -10000;
|
m_maxY = -10000;
|
||||||
|
|
||||||
wxASSERT_MSG( file.IsEmpty() , "no file based metafile support yet") ;
|
wxASSERT_MSG( file.IsEmpty() , wxT("no file based metafile support yet") ) ;
|
||||||
|
|
||||||
m_metaFile = new wxMetaFile("") ;
|
m_metaFile = new wxMetaFile(wxEmptyString) ;
|
||||||
Rect r={0,0,1000,1000} ;
|
Rect r={0,0,1000,1000} ;
|
||||||
|
|
||||||
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
||||||
@@ -167,9 +167,9 @@ wxMetaFileDC::wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, i
|
|||||||
m_maxX = -10000;
|
m_maxX = -10000;
|
||||||
m_maxY = -10000;
|
m_maxY = -10000;
|
||||||
|
|
||||||
wxASSERT_MSG( file.IsEmpty() , "no file based metafile support yet") ;
|
wxASSERT_MSG( file.IsEmpty() , wxT("no file based metafile support yet")) ;
|
||||||
|
|
||||||
m_metaFile = new wxMetaFile("") ;
|
m_metaFile = new wxMetaFile(wxEmptyString) ;
|
||||||
Rect r={yorg,xorg,yorg+yext,xorg+xext} ;
|
Rect r={yorg,xorg,yorg+yext,xorg+xext} ;
|
||||||
|
|
||||||
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
||||||
|
@@ -129,66 +129,66 @@ wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& e)
|
|||||||
{
|
{
|
||||||
wxString ext = e ;
|
wxString ext = e ;
|
||||||
ext = ext.Lower() ;
|
ext = ext.Lower() ;
|
||||||
if ( ext == "txt" )
|
if ( ext == wxT("txt") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("text/text");
|
fileType->m_impl->SetFileType(wxT("text/text"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "htm" || ext == "html" )
|
else if ( ext == wxT("htm") || ext == wxT("html") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("text/html");
|
fileType->m_impl->SetFileType(wxT("text/html"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "gif" )
|
else if ( ext == wxT("gif") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/gif");
|
fileType->m_impl->SetFileType(wxT("image/gif"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "png" )
|
else if ( ext == wxT("png" ))
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/png");
|
fileType->m_impl->SetFileType(wxT("image/png"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "jpg" || ext == "jpeg" )
|
else if ( ext == wxT("jpg" )|| ext == wxT("jpeg") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/jpeg");
|
fileType->m_impl->SetFileType(wxT("image/jpeg"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "bmp" )
|
else if ( ext == wxT("bmp") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/bmp");
|
fileType->m_impl->SetFileType(wxT("image/bmp"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "tif" || ext == "tiff" )
|
else if ( ext == wxT("tif") || ext == wxT("tiff") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/tiff");
|
fileType->m_impl->SetFileType(wxT("image/tiff"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "xpm" )
|
else if ( ext == wxT("xpm") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/xpm");
|
fileType->m_impl->SetFileType(wxT("image/xpm"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "xbm" )
|
else if ( ext == wxT("xbm") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/xbm");
|
fileType->m_impl->SetFileType(wxT("image/xbm"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
|
@@ -67,7 +67,7 @@ int wxMessageDialog::ShowModal()
|
|||||||
|
|
||||||
short result ;
|
short result ;
|
||||||
|
|
||||||
wxASSERT_MSG( ( m_dialogStyle & 0x3F ) != wxYES , "this style is not supported on mac" ) ;
|
wxASSERT_MSG( ( m_dialogStyle & 0x3F ) != wxYES , wxT("this style is not supported on mac") ) ;
|
||||||
|
|
||||||
AlertType alertType = kAlertPlainAlert ;
|
AlertType alertType = kAlertPlainAlert ;
|
||||||
if (m_dialogStyle & wxICON_EXCLAMATION)
|
if (m_dialogStyle & wxICON_EXCLAMATION)
|
||||||
@@ -83,17 +83,12 @@ int wxMessageDialog::ShowModal()
|
|||||||
if ( UMAGetSystemVersion() >= 0x1000 )
|
if ( UMAGetSystemVersion() >= 0x1000 )
|
||||||
{
|
{
|
||||||
AlertStdCFStringAlertParamRec param ;
|
AlertStdCFStringAlertParamRec param ;
|
||||||
CFStringRef cfNoString = NULL ;
|
wxMacCFStringHolder cfNoString(_("No")) ;
|
||||||
CFStringRef cfYesString = NULL ;
|
wxMacCFStringHolder cfYesString( _("Yes")) ;
|
||||||
|
|
||||||
CFStringRef cfTitle = NULL;
|
|
||||||
CFStringRef cfText = NULL;
|
|
||||||
|
|
||||||
cfTitle = wxMacCreateCFString( m_caption ) ;
|
|
||||||
cfText = wxMacCreateCFString( m_message ) ;
|
|
||||||
cfNoString = wxMacCreateCFString( _("No") ) ;
|
|
||||||
cfYesString = wxMacCreateCFString( _("Yes") ) ;
|
|
||||||
|
|
||||||
|
wxMacCFStringHolder cfTitle(m_caption);
|
||||||
|
wxMacCFStringHolder cfText(m_message);
|
||||||
|
|
||||||
param.movable = true;
|
param.movable = true;
|
||||||
param.flags = 0 ;
|
param.flags = 0 ;
|
||||||
|
|
||||||
@@ -157,32 +152,13 @@ int wxMessageDialog::ShowModal()
|
|||||||
CreateStandardAlert( alertType , cfTitle , cfText , ¶m , &alertRef ) ;
|
CreateStandardAlert( alertType , cfTitle , cfText , ¶m , &alertRef ) ;
|
||||||
RunStandardAlert( alertRef , NULL , &result ) ;
|
RunStandardAlert( alertRef , NULL , &result ) ;
|
||||||
}
|
}
|
||||||
if(cfTitle != NULL)
|
if ( skipDialog )
|
||||||
CFRelease(cfTitle);
|
|
||||||
if(cfText != NULL)
|
|
||||||
CFRelease(cfText);
|
|
||||||
if(cfNoString != NULL)
|
|
||||||
CFRelease(cfNoString);
|
|
||||||
if(cfYesString != NULL)
|
|
||||||
CFRelease(cfYesString);
|
|
||||||
if ( skipDialog )
|
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
AlertStdAlertParamRec param;
|
AlertStdAlertParamRec param;
|
||||||
char cText[2048] ;
|
|
||||||
|
|
||||||
if (wxApp::s_macDefaultEncodingIsPC)
|
|
||||||
{
|
|
||||||
strcpy(cText , wxMacMakeMacStringFromPC( m_message) ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy( cText , m_message ) ;
|
|
||||||
}
|
|
||||||
wxMacConvertNewlines( cText , cText ) ;
|
|
||||||
|
|
||||||
Str255 yesPString ;
|
Str255 yesPString ;
|
||||||
Str255 noPString ;
|
Str255 noPString ;
|
||||||
@@ -192,7 +168,7 @@ int wxMessageDialog::ShowModal()
|
|||||||
wxMacStringToPascal( m_caption , pascalTitle ) ;
|
wxMacStringToPascal( m_caption , pascalTitle ) ;
|
||||||
wxMacStringToPascal( _("Yes") , yesPString ) ;
|
wxMacStringToPascal( _("Yes") , yesPString ) ;
|
||||||
wxMacStringToPascal( _("No") , noPString ) ;
|
wxMacStringToPascal( _("No") , noPString ) ;
|
||||||
CopyCStringToPascal( cText , pascalText ) ;
|
wxMacStringToPascal( m_message , pascalText ) ;
|
||||||
|
|
||||||
param.movable = true;
|
param.movable = true;
|
||||||
param.filterProc = NULL ;
|
param.filterProc = NULL ;
|
||||||
|
@@ -130,7 +130,7 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
||||||
|
|
||||||
int tabstyle = kControlTabSmallNorthProc ;
|
int tabstyle = kControlTabSmallNorthProc ;
|
||||||
if ( HasFlag(wxNB_LEFT) )
|
if ( HasFlag(wxNB_LEFT) )
|
||||||
@@ -360,12 +360,8 @@ void wxNotebook::MacSetupTabs()
|
|||||||
page = m_pages[ii];
|
page = m_pages[ii];
|
||||||
info.version = 0;
|
info.version = 0;
|
||||||
info.iconSuiteID = 0;
|
info.iconSuiteID = 0;
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( page->GetLabel() , info.name ) ;
|
||||||
c2pstrcpy( (StringPtr) info.name , page->GetLabel() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) info.name , page->GetLabel() ) ;
|
|
||||||
c2pstr( (char *) info.name ) ;
|
|
||||||
#endif
|
|
||||||
SetControlData( (ControlHandle) m_macControl, ii+1, kControlTabInfoTag,
|
SetControlData( (ControlHandle) m_macControl, ii+1, kControlTabInfoTag,
|
||||||
sizeof( ControlTabInfoRec) , (char*) &info ) ;
|
sizeof( ControlTabInfoRec) , (char*) &info ) ;
|
||||||
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
||||||
@@ -488,7 +484,7 @@ bool wxNotebook::DoPhase(int /* nPhase */)
|
|||||||
|
|
||||||
void wxNotebook::Command(wxCommandEvent& event)
|
void wxNotebook::Command(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("wxNotebook::Command not implemented");
|
wxFAIL_MSG(wxT("wxNotebook::Command not implemented"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -57,7 +57,7 @@ extern void wxMacDestroyGWorld( GWorldPtr gw ) ;
|
|||||||
void
|
void
|
||||||
ima_png_error(png_struct *png_ptr, char *message)
|
ima_png_error(png_struct *png_ptr, char *message)
|
||||||
{
|
{
|
||||||
wxMessageBox(message, "PNG error");
|
wxMessageBox(wxString::FromAscii(message), wxT("PNG error"));
|
||||||
longjmp(png_ptr->jmpbuf, 1);
|
longjmp(png_ptr->jmpbuf, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -819,8 +819,9 @@ bool wxPNGReader::SaveXPM(char *filename, char *name)
|
|||||||
strcpy(nameStr, name);
|
strcpy(nameStr, name);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(nameStr, filename);
|
wxString str = wxString::FromAscii(filename) ;
|
||||||
wxStripExtension(nameStr);
|
wxStripExtension( str ) ;
|
||||||
|
strcpy(nameStr, str.ToAscii() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetDepth() > 4 )
|
if ( GetDepth() > 4 )
|
||||||
@@ -888,7 +889,7 @@ bool wxPNGFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long fla
|
|||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
wxPNGReader reader;
|
wxPNGReader reader;
|
||||||
if (reader.ReadFile((char*) (const char*) name))
|
if (reader.ReadFile( (char*)(const char*) name.ToAscii() ) )
|
||||||
{
|
{
|
||||||
return reader.InstantiateBitmap(bitmap);
|
return reader.InstantiateBitmap(bitmap);
|
||||||
}
|
}
|
||||||
|
@@ -97,8 +97,8 @@ int wxPrintDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxT(""), wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
::UMAPrClose(NULL) ;
|
::UMAPrClose(NULL) ;
|
||||||
@@ -179,8 +179,8 @@ int wxPrintDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
if ((err != noErr) && (err != kPMCancel))
|
if ((err != noErr) && (err != kPMCancel))
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -245,8 +245,8 @@ int wxPageSetupDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
::UMAPrClose(NULL) ;
|
::UMAPrClose(NULL) ;
|
||||||
@@ -301,8 +301,8 @@ int wxPageSetupDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
if ((err != noErr) && (err != kPMCancel))
|
if ((err != noErr) && (err != kPMCancel))
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@@ -144,7 +144,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
|
|||||||
if (!win)
|
if (!win)
|
||||||
{
|
{
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
wxMessageBox("Sorry, could not create an abort dialog.", "Print Error", wxOK, parent);
|
wxMessageBox(wxT("Sorry, could not create an abort dialog."), wxT("Print Error"), wxOK, parent);
|
||||||
delete dc;
|
delete dc;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -162,7 +162,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
|
|||||||
if (!printout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))
|
if (!printout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))
|
||||||
{
|
{
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
wxMessageBox("Could not start printing.", "Print Error", wxOK, parent);
|
wxMessageBox(wxT("Could not start printing."), wxT("Print Error"), wxOK, parent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sm_abortIt)
|
if (sm_abortIt)
|
||||||
|
@@ -203,7 +203,7 @@ wxString wxRadioBox::GetString(int item) const
|
|||||||
wxRadioButton *current;
|
wxRadioButton *current;
|
||||||
|
|
||||||
if ((item < 0) || (item >= m_noItems))
|
if ((item < 0) || (item >= m_noItems))
|
||||||
return wxString("");
|
return wxEmptyString;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
current = m_radioButtonCycle;
|
current = m_radioButtonCycle;
|
||||||
@@ -409,7 +409,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
int totWidth,totHeight;
|
int totWidth,totHeight;
|
||||||
|
|
||||||
SetFont(GetParent()->GetFont());
|
SetFont(GetParent()->GetFont());
|
||||||
GetTextExtent(wxString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight);
|
GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight);
|
||||||
charWidth/=52;
|
charWidth/=52;
|
||||||
|
|
||||||
maxWidth=-1;
|
maxWidth=-1;
|
||||||
@@ -490,7 +490,7 @@ wxSize wxRadioBox::DoGetBestSize() const
|
|||||||
int totWidth, totHeight;
|
int totWidth, totHeight;
|
||||||
|
|
||||||
wxFont font = GetParent()->GetFont();
|
wxFont font = GetParent()->GetFont();
|
||||||
GetTextExtent(wxString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
|
GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
|
||||||
&charWidth, &charHeight, NULL, NULL, &font);
|
&charWidth, &charHeight, NULL, NULL, &font);
|
||||||
charWidth /= 52;
|
charWidth /= 52;
|
||||||
|
|
||||||
|
@@ -46,12 +46,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 , true , 0 , 0 , 100,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , true , 0 , 0 , 100,
|
||||||
kControlScrollBarLiveProc , (long) this ) ;
|
kControlScrollBarLiveProc , (long) this ) ;
|
||||||
|
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_pageSize = (int)((maxValue-minValue)/10);
|
m_pageSize = (int)((maxValue-minValue)/10);
|
||||||
|
|
||||||
MacPreControlCreate( parent, id, "", pos, size, style,
|
MacPreControlCreate( parent, id, wxEmptyString, pos, size, style,
|
||||||
validator, name, &bounds, title );
|
validator, name, &bounds, title );
|
||||||
|
|
||||||
procID = kControlSliderProc + kControlSliderLiveFeedback;
|
procID = kControlSliderProc + kControlSliderLiveFeedback;
|
||||||
@@ -86,15 +86,15 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()), &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( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
||||||
|
|
||||||
if(style & wxSL_LABELS)
|
if(style & wxSL_LABELS)
|
||||||
{
|
{
|
||||||
m_macMinimumStatic = new wxStaticText( this, -1, "" );
|
m_macMinimumStatic = new wxStaticText( this, -1, wxEmptyString );
|
||||||
m_macMaximumStatic = new wxStaticText( this, -1, "" );
|
m_macMaximumStatic = new wxStaticText( this, -1, wxEmptyString );
|
||||||
m_macValueStatic = new wxStaticText( this, -1, "" );
|
m_macValueStatic = new wxStaticText( this, -1, wxEmptyString );
|
||||||
SetRange(minValue, maxValue);
|
SetRange(minValue, maxValue);
|
||||||
SetValue(value);
|
SetValue(value);
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ int wxSlider::GetValue() const
|
|||||||
void wxSlider::SetValue(int value)
|
void wxSlider::SetValue(int value)
|
||||||
{
|
{
|
||||||
wxString valuestring ;
|
wxString valuestring ;
|
||||||
valuestring.Printf( "%d" , value ) ;
|
valuestring.Printf( wxT("%d") , value ) ;
|
||||||
if ( m_macValueStatic )
|
if ( m_macValueStatic )
|
||||||
m_macValueStatic->SetLabel( valuestring ) ;
|
m_macValueStatic->SetLabel( valuestring ) ;
|
||||||
SetControl32BitValue( (ControlHandle) m_macControl , value ) ;
|
SetControl32BitValue( (ControlHandle) m_macControl , value ) ;
|
||||||
@@ -149,11 +149,11 @@ void wxSlider::SetRange(int minValue, int maxValue)
|
|||||||
SetControl32BitMaximum( (ControlHandle) m_macControl, m_rangeMax);
|
SetControl32BitMaximum( (ControlHandle) m_macControl, m_rangeMax);
|
||||||
|
|
||||||
if(m_macMinimumStatic) {
|
if(m_macMinimumStatic) {
|
||||||
value.Printf("%d", m_rangeMin);
|
value.Printf(wxT("%d"), m_rangeMin);
|
||||||
m_macMinimumStatic->SetLabel(value);
|
m_macMinimumStatic->SetLabel(value);
|
||||||
}
|
}
|
||||||
if(m_macMaximumStatic) {
|
if(m_macMaximumStatic) {
|
||||||
value.Printf("%d", m_rangeMax);
|
value.Printf(wxT("%d"), m_rangeMax);
|
||||||
m_macMaximumStatic->SetLabel(value);
|
m_macMaximumStatic->SetLabel(value);
|
||||||
}
|
}
|
||||||
SetValue(m_rangeMin);
|
SetValue(m_rangeMin);
|
||||||
@@ -283,9 +283,9 @@ wxSize wxSlider::DoGetBestSize() const
|
|||||||
int ht, wd;
|
int ht, wd;
|
||||||
|
|
||||||
// Get maximum text label width and height
|
// Get maximum text label width and height
|
||||||
text.Printf("%d", m_rangeMin);
|
text.Printf(wxT("%d"), m_rangeMin);
|
||||||
GetTextExtent(text, &textwidth, &textheight);
|
GetTextExtent(text, &textwidth, &textheight);
|
||||||
text.Printf("%d", m_rangeMax);
|
text.Printf(wxT("%d"), m_rangeMax);
|
||||||
GetTextExtent(text, &wd, &ht);
|
GetTextExtent(text, &wd, &ht);
|
||||||
if(ht > textheight) {
|
if(ht > textheight) {
|
||||||
textheight = ht;
|
textheight = ht;
|
||||||
@@ -356,9 +356,9 @@ void wxSlider::MacUpdateDimensions()
|
|||||||
int ht;
|
int ht;
|
||||||
|
|
||||||
// Get maximum text label width and height
|
// Get maximum text label width and height
|
||||||
text.Printf("%d", m_rangeMin);
|
text.Printf(wxT("%d"), m_rangeMin);
|
||||||
GetTextExtent(text, &minValWidth, &textheight);
|
GetTextExtent(text, &minValWidth, &textheight);
|
||||||
text.Printf("%d", m_rangeMax);
|
text.Printf(wxT("%d"), m_rangeMax);
|
||||||
GetTextExtent(text, &maxValWidth, &ht);
|
GetTextExtent(text, &maxValWidth, &ht);
|
||||||
if(ht > textheight) {
|
if(ht > textheight) {
|
||||||
textheight = ht;
|
textheight = ht;
|
||||||
|
@@ -47,12 +47,12 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100,
|
||||||
kControlLittleArrowsProc , (long) this ) ;
|
kControlLittleArrowsProc , (long) this ) ;
|
||||||
|
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ bool wxStaticLine::Create( wxWindow *parent,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlSeparatorLineProc , (long) this ) ;
|
kControlSeparatorLineProc , (long) this ) ;
|
||||||
|
@@ -59,7 +59,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxString punct = " ,.-;:!?";
|
const wxString punct = wxT(" ,.-;:!?");
|
||||||
|
|
||||||
void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
||||||
{
|
{
|
||||||
@@ -68,7 +68,7 @@ void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
|||||||
if (paragraph.Length() == 0)
|
if (paragraph.Length() == 0)
|
||||||
{
|
{
|
||||||
// empty line
|
// empty line
|
||||||
dc.GetTextExtent( "H", &width, &height );
|
dc.GetTextExtent( wxT("H"), &width, &height );
|
||||||
y += height;
|
y += height;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -127,7 +127,7 @@ void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dc.DrawText( paragraph, pos , y) ;
|
dc.DrawText( paragraph, pos , y) ;
|
||||||
paragraph="";
|
paragraph=wxEmptyString;
|
||||||
y += height ;
|
y += height ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
if (text[i] == 13 || text[i] == 10)
|
if (text[i] == 13 || text[i] == 10)
|
||||||
{
|
{
|
||||||
DrawParagraph(dc, paragraph,y);
|
DrawParagraph(dc, paragraph,y);
|
||||||
paragraph = "" ;
|
paragraph = wxEmptyString ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -39,7 +39,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
|
|||||||
|
|
||||||
m_imageList = NULL;
|
m_imageList = NULL;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlTabSmallProc , (long) this ) ;
|
kControlTabSmallProc , (long) this ) ;
|
||||||
@@ -115,7 +115,7 @@ int wxTabCtrl::GetRowCount() const
|
|||||||
wxString wxTabCtrl::GetItemText(int item) const
|
wxString wxTabCtrl::GetItemText(int item) const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return wxString("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the item image
|
// Get the item image
|
||||||
|
@@ -593,6 +593,7 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
|
|||||||
kTXNStartOffset,
|
kTXNStartOffset,
|
||||||
kTXNEndOffset);
|
kTXNEndOffset);
|
||||||
/* set the field's background */
|
/* set the field's background */
|
||||||
|
|
||||||
tback.bgType = kTXNBackgroundTypeRGB;
|
tback.bgType = kTXNBackgroundTypeRGB;
|
||||||
tback.bg.color = rgbWhite;
|
tback.bg.color = rgbWhite;
|
||||||
TXNSetBackground( varsp->fTXNRec, &tback);
|
TXNSetBackground( varsp->fTXNRec, &tback);
|
||||||
@@ -701,7 +702,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
mySize.y += 2 * m_macVerticalBorder ;
|
mySize.y += 2 * m_macVerticalBorder ;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
MacPreControlCreate( parent , id , "" , pos , mySize ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , mySize ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
if ( m_windowStyle & wxTE_MULTILINE )
|
if ( m_windowStyle & wxTE_MULTILINE )
|
||||||
{
|
{
|
||||||
@@ -738,16 +739,10 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
|
||||||
wxString value ;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
value = wxMacMakeMacStringFromPC( st ) ;
|
|
||||||
else
|
|
||||||
value = st ;
|
|
||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , strlen(text) , text ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -755,9 +750,15 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
/* set up locals */
|
/* set up locals */
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference((ControlHandle) m_macControl);
|
tpvars = (STPTextPaneVars **) GetControlReference((ControlHandle) m_macControl);
|
||||||
/* set the text in the record */
|
/* set the text in the record */
|
||||||
TXNSetData( (**tpvars).fTXNRec, kTXNTextData, (void*)value.c_str(), value.Length(),
|
|
||||||
kTXNStartOffset, kTXNEndOffset);
|
|
||||||
m_macTXN = (**tpvars).fTXNRec ;
|
m_macTXN = (**tpvars).fTXNRec ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN) , kTXNUnicodeTextData, (void*)st.wc_str(), st.Length() * 2,
|
||||||
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN) , kTXNTextData, (void*)text.data(), strlen( text ) ,
|
||||||
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#endif
|
||||||
m_macTXNvars = tpvars ;
|
m_macTXNvars = tpvars ;
|
||||||
m_macUsesTXN = true ;
|
m_macUsesTXN = true ;
|
||||||
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
||||||
@@ -777,23 +778,41 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
err = ::GetControlDataSize((ControlHandle) m_macControl, 0,
|
err = ::GetControlDataSize((ControlHandle) m_macControl, 0,
|
||||||
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag, &actualSize ) ;
|
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag, &actualSize ) ;
|
||||||
|
|
||||||
if ( err )
|
if ( err )
|
||||||
return wxEmptyString ;
|
return wxEmptyString ;
|
||||||
|
|
||||||
if ( actualSize > 0 )
|
if ( actualSize > 0 )
|
||||||
{
|
{
|
||||||
wxChar *ptr = result.GetWriteBuf(actualSize) ;
|
wxCharBuffer buf(actualSize) ;
|
||||||
|
|
||||||
::GetControlData( (ControlHandle) m_macControl, 0,
|
::GetControlData( (ControlHandle) m_macControl, 0,
|
||||||
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag,
|
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag,
|
||||||
actualSize , ptr , &actualSize ) ;
|
actualSize , buf.data() , &actualSize ) ;
|
||||||
ptr[actualSize] = 0 ;
|
result = wxMacMakeStringFromCString( buf ) ;
|
||||||
result.UngetWriteBuf(actualSize) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
Handle theText ;
|
||||||
|
err = TXNGetDataEncoded( ((TXNObject) m_macTXN), kTXNStartOffset, kTXNEndOffset, &theText , kTXNUnicodeTextData );
|
||||||
|
// all done
|
||||||
|
if ( err )
|
||||||
|
{
|
||||||
|
actualSize = 0 ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
actualSize = GetHandleSize( theText ) ;
|
||||||
|
if ( actualSize > 0 )
|
||||||
|
{
|
||||||
|
wxChar *ptr = result.GetWriteBuf(actualSize*sizeof(wxChar)) ;
|
||||||
|
wxStrncpy( ptr , (wxChar*) *theText , actualSize ) ;
|
||||||
|
ptr[actualSize] = 0 ;
|
||||||
|
result.UngetWriteBuf( actualSize ) ;
|
||||||
|
}
|
||||||
|
DisposeHandle( theText ) ;
|
||||||
|
}
|
||||||
|
#else
|
||||||
Handle theText ;
|
Handle theText ;
|
||||||
err = TXNGetDataEncoded( ((TXNObject) m_macTXN), kTXNStartOffset, kTXNEndOffset, &theText , kTXNTextData );
|
err = TXNGetDataEncoded( ((TXNObject) m_macTXN), kTXNStartOffset, kTXNEndOffset, &theText , kTXNTextData );
|
||||||
// all done
|
// all done
|
||||||
@@ -804,18 +823,18 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
actualSize = GetHandleSize( theText ) ;
|
actualSize = GetHandleSize( theText ) ;
|
||||||
if ( actualSize > 0 )
|
if ( actualSize > 0 )
|
||||||
{
|
{
|
||||||
wxChar *ptr = result.GetWriteBuf(actualSize) ;
|
HLock( theText ) ;
|
||||||
strncpy( ptr , *theText , actualSize ) ;
|
result = wxMacMakeStringFromCString( *theText , actualSize ) ;
|
||||||
ptr[actualSize] = 0 ;
|
HUnlock( theText ) ;
|
||||||
result.UngetWriteBuf( actualSize ) ;
|
|
||||||
}
|
}
|
||||||
DisposeHandle( theText ) ;
|
DisposeHandle( theText ) ;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxMacMakeStringFromMacString( result ) ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::GetSelection(long* from, long* to) const
|
void wxTextCtrl::GetSelection(long* from, long* to) const
|
||||||
@@ -833,28 +852,24 @@ void wxTextCtrl::GetSelection(long* from, long* to) const
|
|||||||
|
|
||||||
void wxTextCtrl::SetValue(const wxString& st)
|
void wxTextCtrl::SetValue(const wxString& st)
|
||||||
{
|
{
|
||||||
wxString value;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
value = wxMacMakeMacStringFromPC( st ) ;
|
|
||||||
// value.Replace( "\n", "\r" ); TODO this should be handled by the conversion
|
|
||||||
}
|
|
||||||
else
|
|
||||||
value = st;
|
|
||||||
|
|
||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
::SetControlData((ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , strlen(text) , text ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool formerEditable = IsEditable() ;
|
bool formerEditable = IsEditable() ;
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
SetEditable(true) ;
|
SetEditable(true) ;
|
||||||
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)value.c_str(), value.Length(),
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNUnicodeTextData, (void*)st.wc_str(), st.Length() * 2 ,
|
||||||
kTXNStartOffset, kTXNEndOffset);
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)text.data(), strlen( text ) ,
|
||||||
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#endif
|
||||||
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
||||||
TXNShowSelection( (TXNObject) m_macTXN, kTXNShowStart);
|
TXNShowSelection( (TXNObject) m_macTXN, kTXNShowStart);
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
@@ -884,7 +899,7 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
|
|||||||
if ( style.HasFont() )
|
if ( style.HasFont() )
|
||||||
{
|
{
|
||||||
const wxFont &font = style.GetFont() ;
|
const wxFont &font = style.GetFont() ;
|
||||||
CopyCStringToPascal( font.GetFaceName().c_str() , fontName ) ;
|
wxMacStringToPascal( font.GetFaceName() , fontName ) ;
|
||||||
fontSize = font.GetPointSize() ;
|
fontSize = font.GetPointSize() ;
|
||||||
if ( font.GetUnderlined() )
|
if ( font.GetUnderlined() )
|
||||||
fontStyle |= underline ;
|
fontStyle |= underline ;
|
||||||
@@ -918,7 +933,7 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
|
|||||||
{
|
{
|
||||||
OSStatus status = TXNSetTypeAttributes ((TXNObject)m_macTXN, attrCounter , typeAttr,
|
OSStatus status = TXNSetTypeAttributes ((TXNObject)m_macTXN, attrCounter , typeAttr,
|
||||||
start,end);
|
start,end);
|
||||||
wxASSERT_MSG( status == noErr , "Couldn't set text attributes" ) ;
|
wxASSERT_MSG( status == noErr , wxT("Couldn't set text attributes") ) ;
|
||||||
}
|
}
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
SetEditable(formerEditable) ;
|
SetEditable(formerEditable) ;
|
||||||
@@ -1140,8 +1155,13 @@ void wxTextCtrl::Replace(long from, long to, const wxString& value)
|
|||||||
SetEditable(true) ;
|
SetEditable(true) ;
|
||||||
TXNSetSelection( ((TXNObject) m_macTXN) , from , to ) ;
|
TXNSetSelection( ((TXNObject) m_macTXN) , from , to ) ;
|
||||||
TXNClear( ((TXNObject) m_macTXN) ) ;
|
TXNClear( ((TXNObject) m_macTXN) ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNUnicodeTextData, (void*)value.wc_str(), value.Length() * 2 ,
|
||||||
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#else
|
||||||
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)value.c_str(), value.Length(),
|
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)value.c_str(), value.Length(),
|
||||||
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#endif
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
SetEditable( formerEditable ) ;
|
SetEditable( formerEditable ) ;
|
||||||
}
|
}
|
||||||
@@ -1208,20 +1228,12 @@ bool wxTextCtrl::LoadFile(const wxString& file)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::WriteText(const wxString& text)
|
void wxTextCtrl::WriteText(const wxString& st)
|
||||||
{
|
{
|
||||||
wxString value ;
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
value = wxMacMakeMacStringFromPC( text ) ;
|
|
||||||
// value.Replace( "\n", "\r" ); // TODO this should be handled by the conversion
|
|
||||||
}
|
|
||||||
else
|
|
||||||
value = text ;
|
|
||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
TEInsert( value , value.Length() , ((TEHandle) m_macTE) ) ;
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TEInsert( text , strlen(text) , ((TEHandle) m_macTE) ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1230,8 +1242,14 @@ void wxTextCtrl::WriteText(const wxString& text)
|
|||||||
SetEditable(true) ;
|
SetEditable(true) ;
|
||||||
long start , end , dummy ;
|
long start , end , dummy ;
|
||||||
GetSelection( &start , &dummy ) ;
|
GetSelection( &start , &dummy ) ;
|
||||||
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*) (const char*)value, value.Length(),
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNUnicodeTextData, (void*)st.wc_str(), st.Length() * 2 ,
|
||||||
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)text.data(), strlen( text ) ,
|
||||||
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#endif
|
||||||
GetSelection( &dummy , &end ) ;
|
GetSelection( &dummy , &end ) ;
|
||||||
SetStyle( start , end , GetDefaultStyle() ) ;
|
SetStyle( start , end , GetDefaultStyle() ) ;
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
@@ -1415,7 +1433,7 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
|
|||||||
if (count == lineNo)
|
if (count == lineNo)
|
||||||
{
|
{
|
||||||
// Add chars in line then
|
// Add chars in line then
|
||||||
wxString tmp("");
|
wxString tmp;
|
||||||
|
|
||||||
for (size_t j = i; j < content.Length(); j++)
|
for (size_t j = i; j < content.Length(); j++)
|
||||||
{
|
{
|
||||||
@@ -1429,7 +1447,7 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
|
|||||||
}
|
}
|
||||||
if (content[i] == '\r') count++;
|
if (content[i] == '\r') count++;
|
||||||
}
|
}
|
||||||
return "" ;
|
return wxEmptyString ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -852,7 +852,7 @@ bool wxThreadModule::OnInit()
|
|||||||
#endif
|
#endif
|
||||||
if ( !hasThreadManager )
|
if ( !hasThreadManager )
|
||||||
{
|
{
|
||||||
wxMessageBox( "Error" , "Thread Support is not available on this System" , wxOK ) ;
|
wxMessageBox( wxT("Error") , wxT("Thread Support is not available on this System") , wxOK ) ;
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -255,7 +255,7 @@ bool wxToolBar::Realize()
|
|||||||
::SetControlFontStyle( m_macToolHandle , &controlstyle ) ;
|
::SetControlFontStyle( m_macToolHandle , &controlstyle ) ;
|
||||||
*/
|
*/
|
||||||
ControlHandle container = (ControlHandle) GetParent()->MacGetContainerForEmbedding() ;
|
ControlHandle container = (ControlHandle) GetParent()->MacGetContainerForEmbedding() ;
|
||||||
wxASSERT_MSG( container != NULL , "No valid mac container control" ) ;
|
wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
|
||||||
::EmbedControl( m_macToolHandle , container ) ;
|
::EmbedControl( m_macToolHandle , container ) ;
|
||||||
|
|
||||||
if ( GetWindowStyleFlag() & wxTB_VERTICAL )
|
if ( GetWindowStyleFlag() & wxTB_VERTICAL )
|
||||||
@@ -507,7 +507,7 @@ wxString wxToolBar::MacGetToolTipString( wxPoint &pt )
|
|||||||
{
|
{
|
||||||
return tool->GetShortHelp() ;
|
return tool->GetShortHelp() ;
|
||||||
}
|
}
|
||||||
return "" ;
|
return wxEmptyString ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
|
void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
|
||||||
|
@@ -35,7 +35,7 @@ class wxMacToolTip
|
|||||||
wxMacToolTip( ) ;
|
wxMacToolTip( ) ;
|
||||||
~wxMacToolTip() ;
|
~wxMacToolTip() ;
|
||||||
|
|
||||||
void Setup( WindowRef window , wxString text , wxPoint localPosition ) ;
|
void Setup( WindowRef window , const wxString& text , wxPoint localPosition ) ;
|
||||||
long GetMark() { return m_mark ; }
|
long GetMark() { return m_mark ; }
|
||||||
void Draw() ;
|
void Draw() ;
|
||||||
void Clear() ;
|
void Clear() ;
|
||||||
@@ -50,8 +50,8 @@ class wxMacToolTip
|
|||||||
bool m_shown ;
|
bool m_shown ;
|
||||||
long m_mark ;
|
long m_mark ;
|
||||||
wxMacToolTipTimer* m_timer ;
|
wxMacToolTipTimer* m_timer ;
|
||||||
#ifdef TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef m_helpTextRef ;
|
wxMacCFStringHolder m_helpTextRef ;
|
||||||
#endif
|
#endif
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -186,18 +186,14 @@ wxMacToolTip::wxMacToolTip()
|
|||||||
m_mark = 0 ;
|
m_mark = 0 ;
|
||||||
m_shown = false ;
|
m_shown = false ;
|
||||||
m_timer = NULL ;
|
m_timer = NULL ;
|
||||||
m_helpTextRef = NULL ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacToolTip::Setup( WindowRef win , wxString text , wxPoint localPosition )
|
void wxMacToolTip::Setup( WindowRef win , const wxString& text , wxPoint localPosition )
|
||||||
{
|
{
|
||||||
m_mark++ ;
|
m_mark++ ;
|
||||||
Clear() ;
|
Clear() ;
|
||||||
m_position = localPosition ;
|
m_position = localPosition ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
m_label = text ;
|
||||||
m_label = wxMacMakeMacStringFromPC( text ) ;
|
|
||||||
else
|
|
||||||
m_label = text ;
|
|
||||||
m_window =win;
|
m_window =win;
|
||||||
s_ToolTipWindowRef = m_window ;
|
s_ToolTipWindowRef = m_window ;
|
||||||
m_backpict = NULL ;
|
m_backpict = NULL ;
|
||||||
@@ -228,209 +224,147 @@ void wxMacToolTip::Draw()
|
|||||||
{
|
{
|
||||||
m_shown = true ;
|
m_shown = true ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( HMDisplayTag != (void*) kUnresolvedCFragSymbolAddress )
|
HMHelpContentRec tag ;
|
||||||
|
tag.version = kMacHelpVersion;
|
||||||
|
SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ;
|
||||||
|
GrafPtr port ;
|
||||||
|
GetPort( &port ) ;
|
||||||
|
SetPortWindowPort(m_window) ;
|
||||||
|
LocalToGlobal( (Point *) &tag.absHotRect.top );
|
||||||
|
LocalToGlobal( (Point *) &tag.absHotRect.bottom );
|
||||||
|
SetPort( port );
|
||||||
|
m_helpTextRef = m_label ;
|
||||||
|
tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
|
||||||
|
tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
|
||||||
|
tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ;
|
||||||
|
tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ;
|
||||||
|
tag.tagSide = kHMDefaultSide;
|
||||||
|
HMDisplayTag( &tag );
|
||||||
|
#else
|
||||||
|
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
||||||
|
FontFamilyID fontId ;
|
||||||
|
Str255 fontName ;
|
||||||
|
SInt16 fontSize ;
|
||||||
|
Style fontStyle ;
|
||||||
|
GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
||||||
|
GetFNum( fontName, &fontId );
|
||||||
|
|
||||||
|
TextFont( fontId ) ;
|
||||||
|
TextSize( fontSize ) ;
|
||||||
|
TextFace( fontStyle ) ;
|
||||||
|
FontInfo fontInfo;
|
||||||
|
::GetFontInfo(&fontInfo);
|
||||||
|
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
||||||
|
short height = 0 ;
|
||||||
|
// short width = TextWidth( m_label , 0 ,m_label.Length() ) ;
|
||||||
|
|
||||||
|
int i = 0 ;
|
||||||
|
int length = m_label.Length() ;
|
||||||
|
int width = 0 ;
|
||||||
|
int thiswidth = 0 ;
|
||||||
|
int laststop = 0 ;
|
||||||
|
wxCharBuffer text = wxMacStringToCString( m_label ) ;
|
||||||
|
|
||||||
|
while( i < length )
|
||||||
{
|
{
|
||||||
HMHelpContentRec tag ;
|
if( text[i] == 13 || text[i] == 10)
|
||||||
tag.version = kMacHelpVersion;
|
|
||||||
SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ;
|
|
||||||
GrafPtr port ;
|
|
||||||
GetPort( &port ) ;
|
|
||||||
SetPortWindowPort(m_window) ;
|
|
||||||
LocalToGlobal( (Point *) &tag.absHotRect.top );
|
|
||||||
LocalToGlobal( (Point *) &tag.absHotRect.bottom );
|
|
||||||
SetPort( port );
|
|
||||||
if( m_helpTextRef )
|
|
||||||
{
|
|
||||||
CFRelease( m_helpTextRef ) ;
|
|
||||||
m_helpTextRef = NULL ;
|
|
||||||
}
|
|
||||||
m_helpTextRef = wxMacCreateCFString(m_label) ;
|
|
||||||
tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
|
|
||||||
tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
|
|
||||||
tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ;
|
|
||||||
tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ;
|
|
||||||
tag.tagSide = kHMDefaultSide;
|
|
||||||
HMDisplayTag( &tag );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
|
||||||
#if TARGET_CARBON
|
|
||||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FontFamilyID fontId ;
|
|
||||||
Str255 fontName ;
|
|
||||||
SInt16 fontSize ;
|
|
||||||
Style fontStyle ;
|
|
||||||
GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
|
||||||
GetFNum( fontName, &fontId );
|
|
||||||
|
|
||||||
TextFont( fontId ) ;
|
|
||||||
TextSize( fontSize ) ;
|
|
||||||
TextFace( fontStyle ) ;
|
|
||||||
FontInfo fontInfo;
|
|
||||||
::GetFontInfo(&fontInfo);
|
|
||||||
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
|
||||||
short height = 0 ;
|
|
||||||
// short width = TextWidth( m_label , 0 ,m_label.Length() ) ;
|
|
||||||
|
|
||||||
int i = 0 ;
|
|
||||||
int length = m_label.Length() ;
|
|
||||||
int width = 0 ;
|
|
||||||
int thiswidth = 0 ;
|
|
||||||
int laststop = 0 ;
|
|
||||||
const char *text = m_label ;
|
|
||||||
while( i < length )
|
|
||||||
{
|
|
||||||
if( text[i] == 13 || text[i] == 10)
|
|
||||||
{
|
|
||||||
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
|
||||||
if ( thiswidth > width )
|
|
||||||
width = thiswidth ;
|
|
||||||
|
|
||||||
height += lineh ;
|
|
||||||
laststop = i+1 ;
|
|
||||||
}
|
|
||||||
i++ ;
|
|
||||||
}
|
|
||||||
if ( i - laststop > 0 )
|
|
||||||
{
|
{
|
||||||
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
||||||
if ( thiswidth > width )
|
if ( thiswidth > width )
|
||||||
width = thiswidth ;
|
width = thiswidth ;
|
||||||
|
|
||||||
height += lineh ;
|
height += lineh ;
|
||||||
|
laststop = i+1 ;
|
||||||
}
|
}
|
||||||
|
i++ ;
|
||||||
|
}
|
||||||
m_rect.left = m_position.x + kTipOffset;
|
if ( i - laststop > 0 )
|
||||||
m_rect.top = m_position.y + kTipOffset;
|
{
|
||||||
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
if ( thiswidth > width )
|
||||||
if ( useDrawThemeText )
|
width = thiswidth ;
|
||||||
m_rect.right += kTipBorder ;
|
height += lineh ;
|
||||||
#endif
|
}
|
||||||
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
|
||||||
Rect r ;
|
m_rect.left = m_position.x + kTipOffset;
|
||||||
GetPortBounds( GetWindowPort( m_window ) , &r ) ;
|
m_rect.top = m_position.y + kTipOffset;
|
||||||
if ( m_rect.top < 0 )
|
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
||||||
{
|
|
||||||
m_rect.bottom += -m_rect.top ;
|
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
||||||
m_rect.top = 0 ;
|
Rect r ;
|
||||||
}
|
GetPortBounds( GetWindowPort( m_window ) , &r ) ;
|
||||||
if ( m_rect.left < 0 )
|
if ( m_rect.top < 0 )
|
||||||
{
|
{
|
||||||
m_rect.right += -m_rect.left ;
|
m_rect.bottom += -m_rect.top ;
|
||||||
m_rect.left = 0 ;
|
m_rect.top = 0 ;
|
||||||
}
|
}
|
||||||
if ( m_rect.right > r.right )
|
if ( m_rect.left < 0 )
|
||||||
{
|
{
|
||||||
m_rect.left -= (m_rect.right - r.right ) ;
|
m_rect.right += -m_rect.left ;
|
||||||
m_rect.right = r.right ;
|
m_rect.left = 0 ;
|
||||||
}
|
}
|
||||||
if ( m_rect.bottom > r.bottom )
|
if ( m_rect.right > r.right )
|
||||||
{
|
{
|
||||||
m_rect.top -= (m_rect.bottom - r.bottom) ;
|
m_rect.left -= (m_rect.right - r.right ) ;
|
||||||
m_rect.bottom = r.bottom ;
|
m_rect.right = r.right ;
|
||||||
}
|
}
|
||||||
ClipRect( &m_rect ) ;
|
if ( m_rect.bottom > r.bottom )
|
||||||
BackColor( whiteColor ) ;
|
{
|
||||||
ForeColor(blackColor ) ;
|
m_rect.top -= (m_rect.bottom - r.bottom) ;
|
||||||
GWorldPtr port ;
|
m_rect.bottom = r.bottom ;
|
||||||
NewGWorld( &port , wxDisplayDepth() , &m_rect , NULL , NULL , 0 ) ;
|
}
|
||||||
CGrafPtr origPort ;
|
ClipRect( &m_rect ) ;
|
||||||
GDHandle origDevice ;
|
BackColor( whiteColor ) ;
|
||||||
|
ForeColor(blackColor ) ;
|
||||||
GetGWorld( &origPort , &origDevice ) ;
|
GWorldPtr port ;
|
||||||
SetGWorld( port , NULL ) ;
|
NewGWorld( &port , wxDisplayDepth() , &m_rect , NULL , NULL , 0 ) ;
|
||||||
|
CGrafPtr origPort ;
|
||||||
m_backpict = OpenPicture(&m_rect);
|
GDHandle origDevice ;
|
||||||
|
|
||||||
CopyBits(GetPortBitMapForCopyBits(GetWindowPort(m_window)),
|
GetGWorld( &origPort , &origDevice ) ;
|
||||||
GetPortBitMapForCopyBits(port),
|
SetGWorld( port , NULL ) ;
|
||||||
&m_rect,
|
|
||||||
&m_rect,
|
m_backpict = OpenPicture(&m_rect);
|
||||||
srcCopy,
|
|
||||||
NULL);
|
CopyBits(GetPortBitMapForCopyBits(GetWindowPort(m_window)),
|
||||||
ClosePicture();
|
GetPortBitMapForCopyBits(port),
|
||||||
SetGWorld( origPort , origDevice ) ;
|
&m_rect,
|
||||||
DisposeGWorld( port ) ;
|
&m_rect,
|
||||||
PenNormal() ;
|
srcCopy,
|
||||||
|
NULL);
|
||||||
RGBColor tooltipbackground = { 0xFFFF , 0xFFFF , 0xC000 } ;
|
ClosePicture();
|
||||||
BackColor( whiteColor ) ;
|
SetGWorld( origPort , origDevice ) ;
|
||||||
RGBForeColor( &tooltipbackground ) ;
|
DisposeGWorld( port ) ;
|
||||||
|
PenNormal() ;
|
||||||
PaintRect( &m_rect ) ;
|
|
||||||
ForeColor(blackColor ) ;
|
RGBColor tooltipbackground = { 0xFFFF , 0xFFFF , 0xC000 } ;
|
||||||
FrameRect( &m_rect ) ;
|
BackColor( whiteColor ) ;
|
||||||
SetThemeTextColor(kThemeTextColorNotification,wxDisplayDepth(),true) ;
|
RGBForeColor( &tooltipbackground ) ;
|
||||||
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder);
|
|
||||||
|
PaintRect( &m_rect ) ;
|
||||||
i = 0 ;
|
ForeColor(blackColor ) ;
|
||||||
laststop = 0 ;
|
FrameRect( &m_rect ) ;
|
||||||
height = 0 ;
|
SetThemeTextColor(kThemeTextColorNotification,wxDisplayDepth(),true) ;
|
||||||
|
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder);
|
||||||
while( i < length )
|
|
||||||
{
|
i = 0 ;
|
||||||
if( text[i] == 13 || text[i] == 10)
|
laststop = 0 ;
|
||||||
{
|
height = 0 ;
|
||||||
#if TARGET_CARBON
|
|
||||||
if ( useDrawThemeText )
|
while( i < length )
|
||||||
{
|
{
|
||||||
Rect frame ;
|
if( text[i] == 13 || text[i] == 10)
|
||||||
frame.top = m_rect.top + kTipBorder + height ;
|
|
||||||
frame.left = m_rect.left + kTipBorder ;
|
|
||||||
frame.bottom = frame.top + 1000 ;
|
|
||||||
frame.right = frame.left + 1000 ;
|
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
|
||||||
::DrawThemeTextBox( mString,
|
|
||||||
kThemeCurrentPortFont,
|
|
||||||
kThemeStateActive,
|
|
||||||
true,
|
|
||||||
&frame,
|
|
||||||
teJustLeft,
|
|
||||||
nil );
|
|
||||||
CFRelease( mString ) ;
|
|
||||||
height += lineh ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
|
||||||
height += lineh ;
|
|
||||||
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder + height );
|
|
||||||
}
|
|
||||||
laststop = i+1 ;
|
|
||||||
}
|
|
||||||
i++ ;
|
|
||||||
}
|
|
||||||
#if TARGET_CARBON
|
|
||||||
if ( useDrawThemeText )
|
|
||||||
{
|
|
||||||
Rect frame ;
|
|
||||||
frame.top = m_rect.top + kTipBorder + height ;
|
|
||||||
frame.left = m_rect.left + kTipBorder ;
|
|
||||||
frame.bottom = frame.top + 1000 ;
|
|
||||||
frame.right = frame.left + 1000 ;
|
|
||||||
CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ;
|
|
||||||
::DrawThemeTextBox( mString,
|
|
||||||
kThemeCurrentPortFont,
|
|
||||||
kThemeStateActive,
|
|
||||||
true,
|
|
||||||
&frame,
|
|
||||||
teJustLeft,
|
|
||||||
nil );
|
|
||||||
CFRelease( mString ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
|
height += lineh ;
|
||||||
|
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder + height );
|
||||||
|
laststop = i+1 ;
|
||||||
}
|
}
|
||||||
::TextMode( srcOr ) ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
|
::TextMode( srcOr ) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,11 +388,7 @@ void wxMacToolTip::Clear()
|
|||||||
return ;
|
return ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
HMHideTag() ;
|
HMHideTag() ;
|
||||||
if( m_helpTextRef )
|
m_helpTextRef.Release() ;
|
||||||
{
|
|
||||||
CFRelease( m_helpTextRef ) ;
|
|
||||||
m_helpTextRef = NULL ;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if ( m_window == s_ToolTipWindowRef && m_backpict )
|
if ( m_window == s_ToolTipWindowRef && m_backpict )
|
||||||
{
|
{
|
||||||
|
@@ -362,7 +362,7 @@ void wxAssociateWinWithMacWindow(WXWindow 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
|
||||||
wxCHECK_RET( inWindowRef != (WindowRef) NULL, "attempt to add a NULL WindowRef to window list" );
|
wxCHECK_RET( inWindowRef != (WindowRef) NULL, wxT("attempt to add a NULL WindowRef to window list") );
|
||||||
|
|
||||||
if ( !wxWinMacWindowList->Find((long)inWindowRef) )
|
if ( !wxWinMacWindowList->Find((long)inWindowRef) )
|
||||||
wxWinMacWindowList->Append((long)inWindowRef, win);
|
wxWinMacWindowList->Append((long)inWindowRef, win);
|
||||||
@@ -592,12 +592,7 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
|
|||||||
|
|
||||||
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
|
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
|
||||||
wxAssociateWinWithMacWindow( m_macWindow , this ) ;
|
wxAssociateWinWithMacWindow( m_macWindow , this ) ;
|
||||||
wxString label ;
|
UMASetWTitle( (WindowRef)m_macWindow , title ) ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
label = wxMacMakeMacStringFromPC( title ) ;
|
|
||||||
else
|
|
||||||
label = title ;
|
|
||||||
UMASetWTitleC( (WindowRef)m_macWindow , label ) ;
|
|
||||||
::CreateRootControl( (WindowRef)m_macWindow , (ControlHandle*)&m_macRootControl ) ;
|
::CreateRootControl( (WindowRef)m_macWindow , (ControlHandle*)&m_macRootControl ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;
|
InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;
|
||||||
@@ -836,15 +831,7 @@ void wxTopLevelWindowMac::MacKeyDown( WXEVENTREF ev )
|
|||||||
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
||||||
{
|
{
|
||||||
wxWindow::SetTitle( title ) ;
|
wxWindow::SetTitle( title ) ;
|
||||||
|
UMASetWTitle( (WindowRef)m_macWindow , title ) ;
|
||||||
wxString label ;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
label = wxMacMakeMacStringFromPC( m_label ) ;
|
|
||||||
else
|
|
||||||
label = m_label ;
|
|
||||||
|
|
||||||
UMASetWTitleC( (WindowRef)m_macWindow , label ) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTopLevelWindowMac::Show(bool show)
|
bool wxTopLevelWindowMac::Show(bool show)
|
||||||
|
@@ -189,10 +189,8 @@ MenuRef UMANewMenu( SInt16 id , const wxString& title )
|
|||||||
wxString str = wxStripMenuCodes( title ) ;
|
wxString str = wxStripMenuCodes( title ) ;
|
||||||
MenuRef menu ;
|
MenuRef menu ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef cfs = wxMacCreateCFString( str ) ;
|
|
||||||
CreateNewMenu( id , 0 , &menu ) ;
|
CreateNewMenu( id , 0 , &menu ) ;
|
||||||
SetMenuTitleWithCFString( menu , cfs ) ;
|
SetMenuTitleWithCFString( menu , wxMacCFStringHolder(str) ) ;
|
||||||
CFRelease( cfs ) ;
|
|
||||||
#else
|
#else
|
||||||
Str255 ptitle ;
|
Str255 ptitle ;
|
||||||
wxMacStringToPascal( str , ptitle ) ;
|
wxMacStringToPascal( str , ptitle ) ;
|
||||||
@@ -205,9 +203,7 @@ void UMASetMenuTitle( MenuRef menu , const wxString& title )
|
|||||||
{
|
{
|
||||||
wxString str = wxStripMenuCodes( title ) ;
|
wxString str = wxStripMenuCodes( title ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef cfs = wxMacCreateCFString( str ) ;
|
SetMenuTitleWithCFString( menu , wxMacCFStringHolder(str) ) ;
|
||||||
SetMenuTitleWithCFString( menu , cfs ) ;
|
|
||||||
CFRelease( cfs ) ;
|
|
||||||
#else
|
#else
|
||||||
Str255 ptitle ;
|
Str255 ptitle ;
|
||||||
wxMacStringToPascal( str , ptitle ) ;
|
wxMacStringToPascal( str , ptitle ) ;
|
||||||
@@ -219,9 +215,7 @@ void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& tit
|
|||||||
{
|
{
|
||||||
wxString str = wxStripMenuCodes( title ) ;
|
wxString str = wxStripMenuCodes( title ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef cfs = wxMacCreateCFString( str ) ;
|
SetMenuItemTextWithCFString( menu , item , wxMacCFStringHolder(str) ) ;
|
||||||
SetMenuItemTextWithCFString( menu , item , cfs ) ;
|
|
||||||
CFRelease( cfs ) ;
|
|
||||||
#else
|
#else
|
||||||
Str255 ptitle ;
|
Str255 ptitle ;
|
||||||
wxMacStringToPascal( str , ptitle ) ;
|
wxMacStringToPascal( str , ptitle ) ;
|
||||||
@@ -558,17 +552,15 @@ void UMADisposeWindow( WindowRef inWindowRef )
|
|||||||
DisposeWindow( inWindowRef ) ;
|
DisposeWindow( inWindowRef ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMASetWTitleC( WindowRef inWindowRef , const char *title )
|
void UMASetWTitle( WindowRef inWindowRef , const wxString& title )
|
||||||
{
|
{
|
||||||
Str255 ptitle ;
|
|
||||||
strncpy( (char*)ptitle , title , 96 ) ;
|
|
||||||
ptitle[96] = 0 ;
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
c2pstrcpy( ptitle, (char *)ptitle ) ;
|
SetWindowTitleWithCFString( inWindowRef , wxMacCFStringHolder(title) ) ;
|
||||||
#else
|
#else
|
||||||
c2pstr( (char*)ptitle ) ;
|
Str255 ptitle ;
|
||||||
#endif
|
wxMacStringToPascal( title , ptitle ) ;
|
||||||
SetWTitle( inWindowRef , ptitle ) ;
|
SetWTitle( inWindowRef , ptitle ) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMAGetWTitleC( WindowRef inWindowRef , char *title )
|
void UMAGetWTitleC( WindowRef inWindowRef , char *title )
|
||||||
@@ -583,6 +575,17 @@ void UMAGetWTitleC( WindowRef inWindowRef , char *title )
|
|||||||
|
|
||||||
// appearance additions
|
// appearance additions
|
||||||
|
|
||||||
|
void UMASetControlTitle( ControlHandle inControl , const wxString& title )
|
||||||
|
{
|
||||||
|
#if TARGET_CARBON
|
||||||
|
SetControlTitleWithCFString( inControl , wxMacCFStringHolder(title) ) ;
|
||||||
|
#else
|
||||||
|
Str255 ptitle ;
|
||||||
|
wxMacStringToPascal( title , ptitle ) ;
|
||||||
|
SetControlTitle( inControl , ptitle ) ;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void UMAActivateControl( ControlHandle inControl )
|
void UMAActivateControl( ControlHandle inControl )
|
||||||
{
|
{
|
||||||
// we have to add the control after again to the update rgn
|
// we have to add the control after again to the update rgn
|
||||||
@@ -795,7 +798,7 @@ void wxMacPortStateHelper::Setup( GrafPtr newport )
|
|||||||
{
|
{
|
||||||
GetPort( &m_oldPort ) ;
|
GetPort( &m_oldPort ) ;
|
||||||
SetPort( newport ) ;
|
SetPort( newport ) ;
|
||||||
wxASSERT_MSG( m_clip == NULL , "Cannot call setup twice" ) ;
|
wxASSERT_MSG( m_clip == NULL , wxT("Cannot call setup twice") ) ;
|
||||||
m_clip = NewRgn() ;
|
m_clip = NewRgn() ;
|
||||||
GetClip( m_clip );
|
GetClip( m_clip );
|
||||||
m_textFont = GetPortTextFont( (CGrafPtr) newport);
|
m_textFont = GetPortTextFont( (CGrafPtr) newport);
|
||||||
|
@@ -38,6 +38,10 @@
|
|||||||
#include <Sound.h>
|
#include <Sound.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "ATSUnicode.h"
|
||||||
|
#include "TextCommon.h"
|
||||||
|
#include "TextEncodingConverter.h"
|
||||||
|
|
||||||
#ifndef __DARWIN__
|
#ifndef __DARWIN__
|
||||||
// defined in unix/utilsunx.cpp for Mac OS X
|
// defined in unix/utilsunx.cpp for Mac OS X
|
||||||
|
|
||||||
@@ -48,7 +52,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get hostname only (without domain name)
|
// Get hostname only (without domain name)
|
||||||
bool wxGetHostName(char *buf, int maxSize)
|
bool wxGetHostName(wxChar *buf, int maxSize)
|
||||||
{
|
{
|
||||||
// Gets Chooser name of user by examining a System resource.
|
// Gets Chooser name of user by examining a System resource.
|
||||||
|
|
||||||
@@ -61,13 +65,11 @@ bool wxGetHostName(char *buf, int maxSize)
|
|||||||
|
|
||||||
if (chooserName && *chooserName)
|
if (chooserName && *chooserName)
|
||||||
{
|
{
|
||||||
int length = (*chooserName)[0] ;
|
HLock( (Handle) chooserName ) ;
|
||||||
if ( length + 1 > maxSize )
|
wxString name = wxMacMakeStringFromPascal( *chooserName ) ;
|
||||||
{
|
HUnlock( (Handle) chooserName ) ;
|
||||||
length = maxSize - 1 ;
|
ReleaseResource( (Handle) chooserName ) ;
|
||||||
}
|
wxStrncpy( buf , name , maxSize - 1 ) ;
|
||||||
strncpy( buf , (char*) &(*chooserName)[1] , length ) ;
|
|
||||||
buf[length] = 0 ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
buf[0] = 0 ;
|
buf[0] = 0 ;
|
||||||
@@ -76,7 +78,7 @@ bool wxGetHostName(char *buf, int maxSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get user ID e.g. jacs
|
// Get user ID e.g. jacs
|
||||||
bool wxGetUserId(char *buf, int maxSize)
|
bool wxGetUserId(wxChar *buf, int maxSize)
|
||||||
{
|
{
|
||||||
return wxGetUserName( buf , maxSize ) ;
|
return wxGetUserName( buf , maxSize ) ;
|
||||||
}
|
}
|
||||||
@@ -88,7 +90,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get user name e.g. Stefan Csomor
|
// Get user name e.g. Stefan Csomor
|
||||||
bool wxGetUserName(char *buf, int maxSize)
|
bool wxGetUserName(wxChar *buf, int maxSize)
|
||||||
{
|
{
|
||||||
// Gets Chooser name of user by examining a System resource.
|
// Gets Chooser name of user by examining a System resource.
|
||||||
|
|
||||||
@@ -101,13 +103,11 @@ bool wxGetUserName(char *buf, int maxSize)
|
|||||||
|
|
||||||
if (chooserName && *chooserName)
|
if (chooserName && *chooserName)
|
||||||
{
|
{
|
||||||
int length = (*chooserName)[0] ;
|
HLock( (Handle) chooserName ) ;
|
||||||
if ( length + 1 > maxSize )
|
wxString name = wxMacMakeStringFromPascal( *chooserName ) ;
|
||||||
{
|
HUnlock( (Handle) chooserName ) ;
|
||||||
length = maxSize - 1 ;
|
ReleaseResource( (Handle) chooserName ) ;
|
||||||
}
|
wxStrncpy( buf , name , maxSize - 1 ) ;
|
||||||
strncpy( buf , (char*) &(*chooserName)[1] , length ) ;
|
|
||||||
buf[length] = 0 ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
buf[0] = 0 ;
|
buf[0] = 0 ;
|
||||||
@@ -250,22 +250,25 @@ bool wxWriteResource(const wxString& section, const wxString& entry, const wxStr
|
|||||||
|
|
||||||
bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file)
|
bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file)
|
||||||
{
|
{
|
||||||
char buf[50];
|
wxString buf;
|
||||||
sprintf(buf, "%.4f", value);
|
buf.Printf(wxT("%.4f"), value);
|
||||||
|
|
||||||
return wxWriteResource(section, entry, buf, file);
|
return wxWriteResource(section, entry, buf, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file)
|
bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file)
|
||||||
{
|
{
|
||||||
char buf[50];
|
wxString buf;
|
||||||
sprintf(buf, "%ld", value);
|
buf.Printf(wxT("%ld"), value);
|
||||||
|
|
||||||
return wxWriteResource(section, entry, buf, file);
|
return wxWriteResource(section, entry, buf, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file)
|
bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file)
|
||||||
{
|
{
|
||||||
char buf[50];
|
wxString buf;
|
||||||
sprintf(buf, "%d", value);
|
buf.Printf(wxT("%d"), value);
|
||||||
|
|
||||||
return wxWriteResource(section, entry, buf, file);
|
return wxWriteResource(section, entry, buf, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +372,7 @@ wxString wxMacFindFolder( short vol,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __DARWIN__
|
#ifndef __DARWIN__
|
||||||
char *wxGetUserHome (const wxString& user)
|
wxChar *wxGetUserHome (const wxString& user)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -390,7 +393,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
p = p.Mid(1,pos) ;
|
p = p.Mid(1,pos) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = p + ":" ;
|
p = p + wxT(":") ;
|
||||||
|
|
||||||
Str255 volumeName ;
|
Str255 volumeName ;
|
||||||
XVolumeParam pb ;
|
XVolumeParam pb ;
|
||||||
@@ -501,7 +504,7 @@ wxString wxGetOsDescription()
|
|||||||
// use configure generated description if available
|
// use configure generated description if available
|
||||||
return wxString("MacOS (") + WXWIN_OS_DESCRIPTION + wxString(")");
|
return wxString("MacOS (") + WXWIN_OS_DESCRIPTION + wxString(")");
|
||||||
#else
|
#else
|
||||||
return "MacOS" ; //TODO:define further
|
return wxT("MacOS") ; //TODO:define further
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,10 +596,185 @@ void wxMacConvertToPC( const char *from , char *to , int len )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxMacMakeMacStringFromPC( const char * p )
|
TECObjectRef s_TECNativeCToUnicode = NULL ;
|
||||||
|
TECObjectRef s_TECUnicodeToNativeC = NULL ;
|
||||||
|
TECObjectRef s_TECPCToNativeC = NULL ;
|
||||||
|
TECObjectRef s_TECNativeCToPC = NULL ;
|
||||||
|
void wxMacSetupConverters()
|
||||||
|
{
|
||||||
|
// if we assume errors are happening here we need low level debugging since the high level assert will use the encoders that
|
||||||
|
// are not yet setup...
|
||||||
|
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
status = TECCreateConverter(&s_TECNativeCToUnicode,
|
||||||
|
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||||
|
|
||||||
|
|
||||||
|
status = TECCreateConverter(&s_TECUnicodeToNativeC,
|
||||||
|
kTextEncodingUnicodeDefault, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||||
|
|
||||||
|
if ( !wxApp::s_macDefaultEncodingIsPC )
|
||||||
|
{
|
||||||
|
status = TECCreateConverter(&s_TECPCToNativeC,
|
||||||
|
kTextEncodingWindowsLatin1, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||||
|
|
||||||
|
|
||||||
|
status = TECCreateConverter(&s_TECNativeCToPC,
|
||||||
|
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman , kTextEncodingWindowsLatin1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxMacCleanupConverters()
|
||||||
|
{
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
status = TECDisposeConverter(s_TECNativeCToUnicode);
|
||||||
|
|
||||||
|
status = TECDisposeConverter(s_TECUnicodeToNativeC);
|
||||||
|
|
||||||
|
status = TECDisposeConverter(s_TECPCToNativeC);
|
||||||
|
|
||||||
|
status = TECDisposeConverter(s_TECNativeCToPC);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxWCharBuffer wxMacStringToWString( const wxString &from )
|
||||||
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxWCharBuffer result( from.wc_str() ) ;
|
||||||
|
#else
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = from.Length() ;
|
||||||
|
ByteCount byteBufferLen = byteInLen *2 ;
|
||||||
|
wxWCharBuffer result( from.Length() ) ;
|
||||||
|
status = TECConvertText(s_TECNativeCToUnicode, (ConstTextPtr)from.c_str() , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)result.data(), byteBufferLen, &byteOutLen);
|
||||||
|
result.data()[byteOutLen/2] = 0 ;
|
||||||
|
#endif
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacMakeStringFromCString( const char * from , int len )
|
||||||
|
{
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
wxString result ;
|
||||||
|
wxChar* buf = result.GetWriteBuf( len ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = len ;
|
||||||
|
ByteCount byteBufferLen = len *2 ;
|
||||||
|
|
||||||
|
status = TECConvertText(s_TECNativeCToUnicode, (ConstTextPtr)from , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
||||||
|
#else
|
||||||
|
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||||
|
memcpy( buf , from , len ) ;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = len ;
|
||||||
|
ByteCount byteBufferLen = byteInLen ;
|
||||||
|
|
||||||
|
status = TECConvertText(s_TECNativeCToPC, (ConstTextPtr)from , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
buf[len] = 0 ;
|
||||||
|
result.UngetWriteBuf() ;
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacMakeStringFromCString( const char * from )
|
||||||
|
{
|
||||||
|
return wxMacMakeStringFromCString( from , strlen(from) ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxCharBuffer wxMacStringToCString( const wxString &from )
|
||||||
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = from.Length() * 2 ;
|
||||||
|
ByteCount byteBufferLen = from.Length() ;
|
||||||
|
wxCharBuffer result( from.Length() ) ;
|
||||||
|
status = TECConvertText(s_TECUnicodeToNativeC , (ConstTextPtr)from.wc_str() , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)result.data(), byteBufferLen, &byteOutLen);
|
||||||
|
return result ;
|
||||||
|
#else
|
||||||
|
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||||
|
return wxCharBuffer( from.c_str() ) ;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxCharBuffer result( from.Length() ) ;
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = from.Length() ;
|
||||||
|
ByteCount byteBufferLen = byteInLen ;
|
||||||
|
|
||||||
|
status = TECConvertText(s_TECPCToNativeC, (ConstTextPtr)from.c_str() , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)result.data(), byteBufferLen, &byteOutLen);
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxMacStringToPascal( const wxString&from , StringPtr to )
|
||||||
|
{
|
||||||
|
wxCharBuffer buf = wxMacStringToCString( from ) ;
|
||||||
|
int len = strlen(buf) ;
|
||||||
|
|
||||||
|
if ( len > 255 )
|
||||||
|
len = 255 ;
|
||||||
|
to[0] = len ;
|
||||||
|
memcpy( (char*) &to[1] , buf , len ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacMakeStringFromPascal( ConstStringPtr from )
|
||||||
|
{
|
||||||
|
return wxMacMakeStringFromCString( (char*) &from[1] , from[0] ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// CFStringRefs (Carbon only)
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_CARBON
|
||||||
|
// converts this string into a carbon foundation string with optional pc 2 mac encoding
|
||||||
|
void wxMacCFStringHolder::Assign( const wxString &str )
|
||||||
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
m_cfs = CFStringCreateWithCharacters( kCFAllocatorDefault,
|
||||||
|
(const unsigned short*)str.wc_str(), str.Len() );
|
||||||
|
#else
|
||||||
|
m_cfs = CFStringCreateWithCString( kCFAllocatorSystemDefault , str.c_str() ,
|
||||||
|
wxApp::s_macDefaultEncodingIsPC ?
|
||||||
|
kCFStringEncodingWindowsLatin1 : CFStringGetSystemEncoding() ) ;
|
||||||
|
#endif
|
||||||
|
m_release = true ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacCFStringHolder::AsString()
|
||||||
{
|
{
|
||||||
wxString result ;
|
wxString result ;
|
||||||
int len = strlen ( p ) ;
|
Size len = CFStringGetLength( m_cfs ) ;
|
||||||
|
wxChar* buf = result.GetWriteBuf( len ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
CFStringGetCharacters( m_cfs , CFRangeMake( 0 , len ) , (UniChar*) buf ) ;
|
||||||
|
#else
|
||||||
|
CFStringGetCString( m_cfs , buf , len+1 , s_macDefaultEncodingIsPC ?
|
||||||
|
kCFStringEncodingWindowsLatin1 : CFStringGetSystemEncoding() ) ;
|
||||||
|
#endif
|
||||||
|
buf[len] = 0 ;
|
||||||
|
result.UngetWriteBuf() ;
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
|
wxString wxMacMakeMacStringFromPC( const wxChar * p )
|
||||||
|
{
|
||||||
|
wxString result ;
|
||||||
|
int len = wxStrlen ( p ) ;
|
||||||
if ( len > 0 )
|
if ( len > 0 )
|
||||||
{
|
{
|
||||||
wxChar* ptr = result.GetWriteBuf(len) ;
|
wxChar* ptr = result.GetWriteBuf(len) ;
|
||||||
@@ -607,10 +785,10 @@ wxString wxMacMakeMacStringFromPC( const char * p )
|
|||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxMacMakePCStringFromMac( const char * p )
|
wxString wxMacMakePCStringFromMac( const wxChar * p )
|
||||||
{
|
{
|
||||||
wxString result ;
|
wxString result ;
|
||||||
int len = strlen ( p ) ;
|
int len = wxStrlen ( p ) ;
|
||||||
if ( len > 0 )
|
if ( len > 0 )
|
||||||
{
|
{
|
||||||
wxChar* ptr = result.GetWriteBuf(len) ;
|
wxChar* ptr = result.GetWriteBuf(len) ;
|
||||||
@@ -621,7 +799,7 @@ wxString wxMacMakePCStringFromMac( const char * p )
|
|||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxMacMakeStringFromMacString( const char* from , bool mac2pcEncoding )
|
wxString wxMacMakeStringFromMacString( const wxChar* from , bool mac2pcEncoding )
|
||||||
{
|
{
|
||||||
if (mac2pcEncoding)
|
if (mac2pcEncoding)
|
||||||
{
|
{
|
||||||
@@ -652,7 +830,7 @@ wxString wxMacMakeStringFromPascal( ConstStringPtr from , bool mac2pcEncoding )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacStringToPascal( const char * from , StringPtr to , bool pc2macEncoding )
|
void wxMacStringToPascal( const wxChar * from , StringPtr to , bool pc2macEncoding )
|
||||||
{
|
{
|
||||||
if (pc2macEncoding)
|
if (pc2macEncoding)
|
||||||
{
|
{
|
||||||
@@ -663,19 +841,8 @@ void wxMacStringToPascal( const char * from , StringPtr to , bool pc2macEncoding
|
|||||||
CopyCStringToPascal( from , to ) ;
|
CopyCStringToPascal( from , to ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// CFStringRefs (Carbon only)
|
|
||||||
//
|
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
// converts this string into a carbon foundation string with optional pc 2 mac encoding
|
|
||||||
CFStringRef wxMacCreateCFString( const wxString &str , bool pc2macEncoding )
|
|
||||||
{
|
|
||||||
return CFStringCreateWithCString( kCFAllocatorSystemDefault , str.c_str() ,
|
|
||||||
pc2macEncoding ?
|
|
||||||
kCFStringEncodingWindowsLatin1 : CFStringGetSystemEncoding() ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //TARGET_CARBON
|
#endif //TARGET_CARBON
|
||||||
|
|
||||||
|
@@ -135,23 +135,18 @@ bool wxWave::Create(const wxString& fileName, bool isResource)
|
|||||||
//don't know what to do with looped, wth
|
//don't know what to do with looped, wth
|
||||||
bool wxWave::Play(bool async, bool looped) const
|
bool wxWave::Play(bool async, bool looped) const
|
||||||
{
|
{
|
||||||
char lpSnd[32];
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
if (m_isResource)
|
if (m_isResource)
|
||||||
{
|
{
|
||||||
#if TARGET_CARBON
|
Str255 snd ;
|
||||||
c2pstrcpy((unsigned char *)lpSnd, m_sndname);
|
wxMacStringToPascal( m_sndname , snd ) ;
|
||||||
#else
|
SndListHandle hSnd;
|
||||||
strcpy(lpSnd, m_sndname);
|
|
||||||
c2pstr((char *) lpSnd);
|
|
||||||
#endif
|
|
||||||
SndListHandle hSnd;
|
|
||||||
|
|
||||||
hSnd = (SndListHandle) GetNamedResource('snd ',(const unsigned char *) lpSnd);
|
hSnd = (SndListHandle) GetNamedResource('snd ', snd);
|
||||||
|
|
||||||
if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, async) == noErr))
|
if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, async) == noErr))
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -1642,7 +1642,7 @@ wxString wxWindowMac::MacGetToolTipString( wxPoint &pt )
|
|||||||
{
|
{
|
||||||
return m_tooltip->GetTip() ;
|
return m_tooltip->GetTip() ;
|
||||||
}
|
}
|
||||||
return "" ;
|
return wxEmptyString ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::Update()
|
void wxWindowMac::Update()
|
||||||
@@ -1855,13 +1855,13 @@ WXHWND wxWindowMac::MacGetRootWindow() const
|
|||||||
|
|
||||||
iter = iter->GetParent() ;
|
iter = iter->GetParent() ;
|
||||||
}
|
}
|
||||||
wxASSERT_MSG( 1 , "No valid mac root window" ) ;
|
wxASSERT_MSG( 1 , wxT("No valid mac root window") ) ;
|
||||||
return NULL ;
|
return NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::MacCreateScrollBars( long style )
|
void wxWindowMac::MacCreateScrollBars( long style )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( m_vScrollBar == NULL && m_hScrollBar == NULL , "attempt to create window twice" ) ;
|
wxASSERT_MSG( m_vScrollBar == NULL && m_hScrollBar == NULL , wxT("attempt to create window twice") ) ;
|
||||||
|
|
||||||
bool hasBoth = ( style & wxVSCROLL ) && ( style & wxHSCROLL ) ;
|
bool hasBoth = ( style & wxVSCROLL ) && ( style & wxHSCROLL ) ;
|
||||||
int adjust = hasBoth ? MAC_SCROLLBAR_SIZE - 1: 0 ;
|
int adjust = hasBoth ? MAC_SCROLLBAR_SIZE - 1: 0 ;
|
||||||
|
@@ -211,7 +211,7 @@ bool wxCheckListBox::Create(wxWindow *parent,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
ListDefSpec listDef;
|
ListDefSpec listDef;
|
||||||
listDef.defType = kListDefUserProcType;
|
listDef.defType = kListDefUserProcType;
|
||||||
|
@@ -49,7 +49,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 ,
|
||||||
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
|
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ wxString wxChoice::GetString(int n) const
|
|||||||
void wxChoice::DoSetItemClientData( int n, void* clientData )
|
void wxChoice::DoSetItemClientData( int n, void* clientData )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( n >= 0 && (size_t)n < m_datas.GetCount(),
|
wxCHECK_RET( n >= 0 && (size_t)n < m_datas.GetCount(),
|
||||||
"invalid index in wxChoice::SetClientData" );
|
wxT("invalid index in wxChoice::SetClientData") );
|
||||||
|
|
||||||
m_datas[n] = (char*) clientData ;
|
m_datas[n] = (char*) clientData ;
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
|
|||||||
void *wxChoice::DoGetItemClientData(int n) const
|
void *wxChoice::DoGetItemClientData(int n) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
|
wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
|
||||||
"invalid index in wxChoice::GetClientData" );
|
wxT("invalid index in wxChoice::GetClientData") );
|
||||||
return (void *)m_datas[n];
|
return (void *)m_datas[n];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,6 +55,8 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
|
|
||||||
case wxDF_TEXT:
|
case wxDF_TEXT:
|
||||||
break;
|
break;
|
||||||
|
case wxDF_UNICODETEXT:
|
||||||
|
break;
|
||||||
case wxDF_BITMAP :
|
case wxDF_BITMAP :
|
||||||
case wxDF_METAFILE :
|
case wxDF_METAFILE :
|
||||||
break ;
|
break ;
|
||||||
@@ -77,15 +79,21 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
{
|
{
|
||||||
if (( err = GetScrapFlavorSize( scrapRef, dataFormat.GetFormatId(), &byteCount )) == noErr)
|
if (( err = GetScrapFlavorSize( scrapRef, dataFormat.GetFormatId(), &byteCount )) == noErr)
|
||||||
{
|
{
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
Size allocSize = byteCount ;
|
||||||
byteCount++ ;
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
|
allocSize += 1 ;
|
||||||
|
else if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
|
allocSize += 2 ;
|
||||||
|
|
||||||
data = new char[ byteCount ] ;
|
data = new char[ allocSize ] ;
|
||||||
|
|
||||||
if (( err = GetScrapFlavorData( scrapRef, dataFormat.GetFormatId(), &byteCount , data )) == noErr )
|
if (( err = GetScrapFlavorData( scrapRef, dataFormat.GetFormatId(), &byteCount , data )) == noErr )
|
||||||
{
|
{
|
||||||
*len = byteCount ;
|
*len = allocSize ;
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
((char*)data)[byteCount] = 0 ;
|
((char*)data)[byteCount] = 0 ;
|
||||||
|
if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
|
((wxChar*)data)[byteCount/2] = 0 ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -105,14 +113,19 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
if ( GetHandleSize( datahandle ) > 0 )
|
if ( GetHandleSize( datahandle ) > 0 )
|
||||||
{
|
{
|
||||||
byteCount = GetHandleSize( datahandle ) ;
|
byteCount = GetHandleSize( datahandle ) ;
|
||||||
|
Size allocSize = byteCount ;
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
data = new char[ byteCount + 1] ;
|
allocSize += 1 ;
|
||||||
else
|
else if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
data = new char[ byteCount ] ;
|
allocSize += 2 ;
|
||||||
|
|
||||||
|
data = new char[ allocSize ] ;
|
||||||
|
|
||||||
memcpy( (char*) data , (char*) *datahandle , byteCount ) ;
|
memcpy( (char*) data , (char*) *datahandle , byteCount ) ;
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT )
|
if ( dataFormat.GetType() == wxDF_TEXT )
|
||||||
((char*)data)[byteCount] = 0 ;
|
((char*)data)[byteCount] = 0 ;
|
||||||
|
if ( dataFormat.GetType() == wxDF_UNICODETEXT )
|
||||||
|
((wxChar*)data)[byteCount/2] = 0 ;
|
||||||
*len = byteCount ;
|
*len = byteCount ;
|
||||||
}
|
}
|
||||||
DisposeHandle( datahandle ) ;
|
DisposeHandle( datahandle ) ;
|
||||||
@@ -123,10 +136,21 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
|
|
||||||
return NULL ;
|
return NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dataFormat.GetType() == wxDF_TEXT && wxApp::s_macDefaultEncodingIsPC )
|
if ( dataFormat.GetType() == wxDF_TEXT && wxApp::s_macDefaultEncodingIsPC )
|
||||||
{
|
{
|
||||||
wxMacConvertToPC((char*)data,(char*)data,byteCount) ;
|
wxString st = wxMacMakeStringFromCString( (char*) data ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxCharBuffer buf = st.ToAscii() ;
|
||||||
|
#else
|
||||||
|
char* buf = st ;
|
||||||
|
#endif
|
||||||
|
char* newdata = new char[strlen(buf)+1] ;
|
||||||
|
memcpy( newdata , buf , strlen(buf)+1 ) ;
|
||||||
|
delete[] ((char*) data ) ;
|
||||||
|
data = newdata ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,19 +258,19 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
{
|
{
|
||||||
wxTextDataObject* textDataObject = (wxTextDataObject*) data;
|
wxTextDataObject* textDataObject = (wxTextDataObject*) data;
|
||||||
wxString str(textDataObject->GetText());
|
wxString str(textDataObject->GetText());
|
||||||
wxString mac ;
|
wxCharBuffer buf = wxMacStringToCString( str ) ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
err = UMAPutScrap( strlen(buf) , kScrapFlavorTypeText , (void*) buf.data() ) ;
|
||||||
{
|
|
||||||
mac = wxMacMakeMacStringFromPC(textDataObject->GetText()) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mac = textDataObject->GetText() ;
|
|
||||||
}
|
|
||||||
err = UMAPutScrap( mac.Length() , 'TEXT' , (void*) mac.c_str() ) ;
|
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
case wxDF_UNICODETEXT :
|
||||||
|
{
|
||||||
|
wxTextDataObject* textDataObject = (wxTextDataObject*) data;
|
||||||
|
wxString str(textDataObject->GetText());
|
||||||
|
err = UMAPutScrap( str.Length() * sizeof(wxChar) , kScrapFlavorTypeUnicode , (void*) str.wc_str() ) ;
|
||||||
|
}
|
||||||
|
break ;
|
||||||
|
#endif
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
case wxDF_METAFILE:
|
case wxDF_METAFILE:
|
||||||
{
|
{
|
||||||
@@ -255,7 +279,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
wxMetafile metaFile = metaFileDataObject->GetMetafile();
|
wxMetafile metaFile = metaFileDataObject->GetMetafile();
|
||||||
PicHandle pict = (PicHandle) metaFile.GetHMETAFILE() ;
|
PicHandle pict = (PicHandle) metaFile.GetHMETAFILE() ;
|
||||||
HLock( (Handle) pict ) ;
|
HLock( (Handle) pict ) ;
|
||||||
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , 'PICT' , *pict ) ;
|
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , kScrapFlavorTypePicture , *pict ) ;
|
||||||
HUnlock( (Handle) pict ) ;
|
HUnlock( (Handle) pict ) ;
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
@@ -270,7 +294,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
pict = (PicHandle) bitmapDataObject->GetBitmap().GetPict( &created ) ;
|
pict = (PicHandle) bitmapDataObject->GetBitmap().GetPict( &created ) ;
|
||||||
|
|
||||||
HLock( (Handle) pict ) ;
|
HLock( (Handle) pict ) ;
|
||||||
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , 'PICT' , *pict ) ;
|
err = UMAPutScrap( GetHandleSize( (Handle) pict ) , kScrapFlavorTypePicture , *pict ) ;
|
||||||
HUnlock( (Handle) pict ) ;
|
HUnlock( (Handle) pict ) ;
|
||||||
if ( created )
|
if ( created )
|
||||||
KillPicture( pict ) ;
|
KillPicture( pict ) ;
|
||||||
|
@@ -456,7 +456,7 @@ wxString wxComboBox::GetStringSelection() const
|
|||||||
if (sel > -1)
|
if (sel > -1)
|
||||||
return wxString(this->GetString (sel));
|
return wxString(this->GetString (sel));
|
||||||
else
|
else
|
||||||
return wxString("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxComboBox::SetStringSelection(const wxString& sel)
|
bool wxComboBox::SetStringSelection(const wxString& sel)
|
||||||
|
@@ -208,23 +208,9 @@ void wxControl::SetLabel(const wxString& title)
|
|||||||
{
|
{
|
||||||
m_label = wxStripMenuCodes(title) ;
|
m_label = wxStripMenuCodes(title) ;
|
||||||
|
|
||||||
if ( (ControlHandle) m_macControl )
|
if ( m_macControl )
|
||||||
{
|
{
|
||||||
Str255 maclabel ;
|
UMASetControlTitle( (ControlHandle) m_macControl , m_label ) ;
|
||||||
wxString label ;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
label = wxMacMakeMacStringFromPC( m_label ) ;
|
|
||||||
else
|
|
||||||
label = m_label ;
|
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) maclabel , label ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) maclabel , label ) ;
|
|
||||||
c2pstr( (char *) maclabel ) ;
|
|
||||||
#endif
|
|
||||||
::SetControlTitle( (ControlHandle) m_macControl , maclabel ) ;
|
|
||||||
}
|
}
|
||||||
Refresh() ;
|
Refresh() ;
|
||||||
}
|
}
|
||||||
@@ -311,7 +297,7 @@ void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *contro
|
|||||||
{
|
{
|
||||||
// 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
|
||||||
wxCHECK_RET( inControl != (ControlHandle) NULL, "attempt to add a NULL WindowRef to window list" );
|
wxCHECK_RET( inControl != (ControlHandle) NULL, wxT("attempt to add a NULL WindowRef to window list") );
|
||||||
|
|
||||||
if ( !wxWinMacControlList->Find((long)inControl) )
|
if ( !wxWinMacControlList->Find((long)inControl) )
|
||||||
wxWinMacControlList->Append((long)inControl, control);
|
wxWinMacControlList->Append((long)inControl, control);
|
||||||
@@ -361,7 +347,7 @@ void wxControl::MacPreControlCreate( wxWindow *parent, wxWindowID id, wxString l
|
|||||||
|
|
||||||
void wxControl::MacPostControlCreate()
|
void wxControl::MacPostControlCreate()
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
|
if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
|
||||||
{
|
{
|
||||||
@@ -438,6 +424,10 @@ void wxControl::MacPostControlCreate()
|
|||||||
|
|
||||||
SetSize(pos.x, pos.y, new_size.x, new_size.y);
|
SetSize(pos.x, pos.y, new_size.x, new_size.y);
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
UMASetControlTitle( (ControlHandle) m_macControl , wxStripMenuCodes(m_label) ) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
UMAShowControl( (ControlHandle) m_macControl ) ;
|
UMAShowControl( (ControlHandle) m_macControl ) ;
|
||||||
|
|
||||||
SetCursor( *wxSTANDARD_CURSOR ) ;
|
SetCursor( *wxSTANDARD_CURSOR ) ;
|
||||||
@@ -907,6 +897,6 @@ bool wxControl::MacCanFocus() const
|
|||||||
|
|
||||||
void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -292,13 +292,7 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
|
|||||||
if ( flags == wxBITMAP_TYPE_MACCURSOR_RESOURCE )
|
if ( flags == wxBITMAP_TYPE_MACCURSOR_RESOURCE )
|
||||||
{
|
{
|
||||||
Str255 theName ;
|
Str255 theName ;
|
||||||
|
wxMacStringToPascal( cursor_file , theName ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) theName , cursor_file ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) theName , cursor_file ) ;
|
|
||||||
c2pstr( (char *) theName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxStAppResource resload ;
|
wxStAppResource resload ;
|
||||||
Handle resHandle = ::GetNamedResource( 'crsr' , theName ) ;
|
Handle resHandle = ::GetNamedResource( 'crsr' , theName ) ;
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: os2/dataobj.cpp
|
// Name: mac/dataobj.cpp
|
||||||
// Purpose: implementation of wx[I]DataObject class
|
// Purpose: implementation of wxDataObject class
|
||||||
// Author: David Webster
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/21/99
|
// Created: 10/21/99
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1999 David Webster
|
// Copyright: (c) 1999 Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "wx/mstream.h"
|
#include "wx/mstream.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/mac/private.h"
|
#include "wx/mac/private.h"
|
||||||
|
#include "Scrap.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// functions
|
// functions
|
||||||
@@ -73,10 +74,12 @@ void wxDataFormat::SetType( wxDataFormatId Type )
|
|||||||
{
|
{
|
||||||
m_type = Type;
|
m_type = Type;
|
||||||
|
|
||||||
if (m_type == wxDF_TEXT)
|
if (m_type == wxDF_TEXT )
|
||||||
m_format = 'TEXT';
|
m_format = kScrapFlavorTypeText;
|
||||||
|
else if (m_type == wxDF_UNICODETEXT )
|
||||||
|
m_format = kScrapFlavorTypeUnicode ;
|
||||||
else if (m_type == wxDF_BITMAP || m_type == wxDF_METAFILE )
|
else if (m_type == wxDF_BITMAP || m_type == wxDF_METAFILE )
|
||||||
m_format = 'PICT';
|
m_format = kScrapFlavorTypePicture;
|
||||||
else if (m_type == wxDF_FILENAME)
|
else if (m_type == wxDF_FILENAME)
|
||||||
m_format = kDragFlavorTypeHFS ;
|
m_format = kDragFlavorTypeHFS ;
|
||||||
else
|
else
|
||||||
@@ -92,18 +95,23 @@ wxDataFormatId wxDataFormat::GetType() const
|
|||||||
|
|
||||||
wxString wxDataFormat::GetId() const
|
wxString wxDataFormat::GetId() const
|
||||||
{
|
{
|
||||||
wxString sRet(""); // TODO: to name of ( m_format ) );
|
char text[5] ;
|
||||||
return sRet;
|
strncpy( text , (char*) m_format , 4 ) ;
|
||||||
|
text[4] = 0 ;
|
||||||
|
return wxString::FromAscii( text ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataFormat::SetId( NativeFormat format )
|
void wxDataFormat::SetId( NativeFormat format )
|
||||||
{
|
{
|
||||||
m_format = format;
|
m_format = format;
|
||||||
|
|
||||||
if (m_format == 'TEXT')
|
if (m_format == kScrapFlavorTypeText)
|
||||||
m_type = wxDF_TEXT;
|
m_type = wxDF_TEXT;
|
||||||
else
|
else
|
||||||
if (m_format == 'PICT')
|
if (m_format == kScrapFlavorTypeUnicode )
|
||||||
|
m_type = wxDF_UNICODETEXT;
|
||||||
|
else
|
||||||
|
if (m_format == kScrapFlavorTypePicture)
|
||||||
m_type = wxDF_BITMAP;
|
m_type = wxDF_BITMAP;
|
||||||
else
|
else
|
||||||
if (m_format == kDragFlavorTypeHFS )
|
if (m_format == kDragFlavorTypeHFS )
|
||||||
@@ -201,9 +209,7 @@ bool wxFileDataObject::SetData(
|
|||||||
{
|
{
|
||||||
m_filenames.Empty();
|
m_filenames.Empty();
|
||||||
|
|
||||||
wxString sFile( (const char *)pBuf); /* char, not wxChar */
|
AddFile(wxString::FromAscii((char*)pBuf));
|
||||||
|
|
||||||
AddFile(sFile);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
105
src/mac/dc.cpp
105
src/mac/dc.cpp
@@ -1111,7 +1111,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
|||||||
}
|
}
|
||||||
if ( mode == kUnsupportedMode )
|
if ( mode == kUnsupportedMode )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("unsupported blitting mode" );
|
wxFAIL_MSG(wxT("unsupported blitting mode" ));
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
CGrafPtr sourcePort = (CGrafPtr) source->m_macPort ;
|
CGrafPtr sourcePort = (CGrafPtr) source->m_macPort ;
|
||||||
@@ -1295,17 +1295,10 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
|||||||
}
|
}
|
||||||
if ( str.Length() == 0 )
|
if ( str.Length() == 0 )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
wxMacPortSetter helper(this) ;
|
wxMacPortSetter helper(this) ;
|
||||||
MacInstallFont() ;
|
MacInstallFont() ;
|
||||||
wxString text ;
|
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
text = wxMacMakeMacStringFromPC( str ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text = str ;
|
|
||||||
}
|
|
||||||
wxFontRefData * font = (wxFontRefData*) m_font.GetRefData() ;
|
wxFontRefData * font = (wxFontRefData*) m_font.GetRefData() ;
|
||||||
if ( 0 )
|
if ( 0 )
|
||||||
{
|
{
|
||||||
@@ -1314,23 +1307,30 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
|||||||
m_macAliasWasEnabled = true ;
|
m_macAliasWasEnabled = true ;
|
||||||
}
|
}
|
||||||
OSStatus status = noErr ;
|
OSStatus status = noErr ;
|
||||||
|
ATSUTextLayout atsuLayout ;
|
||||||
|
UniCharCount chars = str.Length() ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.Length() , str.Length() , 1 ,
|
||||||
|
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
|
||||||
|
#else
|
||||||
TECObjectRef ec;
|
TECObjectRef ec;
|
||||||
status = TECCreateConverter(&ec, kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
status = TECCreateConverter(&ec,
|
||||||
wxASSERT_MSG( status == noErr , "couldn't start converter" ) ;
|
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||||
|
|
||||||
|
wxASSERT_MSG( status == noErr , wxT("couldn't start converter") ) ;
|
||||||
ByteCount byteOutLen ;
|
ByteCount byteOutLen ;
|
||||||
ByteCount byteInLen = text.Length() ;
|
ByteCount byteInLen = str.Length() ;
|
||||||
ByteCount byteBufferLen = byteInLen *2 ;
|
ByteCount byteBufferLen = byteInLen *2 ;
|
||||||
char* buf = new char[byteBufferLen] ;
|
char* buf = new char[byteBufferLen] ;
|
||||||
status = TECConvertText(ec, (ConstTextPtr)text.c_str() , byteInLen, &byteInLen,
|
status = TECConvertText(ec, (ConstTextPtr)str.c_str() , byteInLen, &byteInLen,
|
||||||
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
||||||
wxASSERT_MSG( status == noErr , "couldn't convert text" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't convert text") ) ;
|
||||||
status = TECDisposeConverter(ec);
|
status = TECDisposeConverter(ec);
|
||||||
wxASSERT_MSG( status == noErr , "couldn't dispose converter" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't dispose converter") ) ;
|
||||||
ATSUTextLayout atsuLayout ;
|
|
||||||
UniCharCount chars = byteOutLen / 2 ;
|
|
||||||
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) buf , 0 , byteOutLen / 2 , byteOutLen / 2 , 1 ,
|
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) buf , 0 , byteOutLen / 2 , byteOutLen / 2 , 1 ,
|
||||||
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
|
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
|
||||||
wxASSERT_MSG( status == noErr , "couldn't create the layout of the rotated text" );
|
#endif
|
||||||
|
wxASSERT_MSG( status == noErr , wxT("couldn't create the layout of the rotated text") );
|
||||||
int iAngle = int( angle );
|
int iAngle = int( angle );
|
||||||
int drawX = XLOG2DEVMAC(x) ;
|
int drawX = XLOG2DEVMAC(x) ;
|
||||||
int drawY = YLOG2DEVMAC(y) ;
|
int drawY = YLOG2DEVMAC(y) ;
|
||||||
@@ -1366,16 +1366,19 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
|||||||
drawY += cos(angle/RAD2DEG) * FixedToInt(ascent) ;
|
drawY += cos(angle/RAD2DEG) * FixedToInt(ascent) ;
|
||||||
status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||||
IntToFixed(drawX) , IntToFixed(drawY) );
|
IntToFixed(drawX) , IntToFixed(drawY) );
|
||||||
wxASSERT_MSG( status == noErr , "couldn't draw the rotated text" );
|
wxASSERT_MSG( status == noErr , wxT("couldn't draw the rotated text") );
|
||||||
Rect rect ;
|
Rect rect ;
|
||||||
status = ::ATSUMeasureTextImage( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
status = ::ATSUMeasureTextImage( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||||
IntToFixed(drawX) , IntToFixed(drawY) , &rect );
|
IntToFixed(drawX) , IntToFixed(drawY) , &rect );
|
||||||
wxASSERT_MSG( status == noErr , "couldn't measure the rotated text" );
|
wxASSERT_MSG( status == noErr , wxT("couldn't measure the rotated text") );
|
||||||
OffsetRect( &rect , -m_macLocalOrigin.x , -m_macLocalOrigin.y ) ;
|
OffsetRect( &rect , -m_macLocalOrigin.x , -m_macLocalOrigin.y ) ;
|
||||||
CalcBoundingBox(XDEV2LOG(rect.left), YDEV2LOG(rect.top) );
|
CalcBoundingBox(XDEV2LOG(rect.left), YDEV2LOG(rect.top) );
|
||||||
CalcBoundingBox(XDEV2LOG(rect.right), YDEV2LOG(rect.bottom) );
|
CalcBoundingBox(XDEV2LOG(rect.right), YDEV2LOG(rect.bottom) );
|
||||||
::ATSUDisposeTextLayout(atsuLayout);
|
::ATSUDisposeTextLayout(atsuLayout);
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
#else
|
||||||
delete[] buf ;
|
delete[] buf ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||||
@@ -1411,33 +1414,22 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
{
|
{
|
||||||
::TextMode( srcCopy ) ;
|
::TextMode( srcCopy ) ;
|
||||||
}
|
}
|
||||||
const char *text = NULL ;
|
int length = strtext.Length() ;
|
||||||
int length = 0 ;
|
|
||||||
wxString macText ;
|
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
macText = wxMacMakeMacStringFromPC( strtext ) ;
|
|
||||||
text = macText ;
|
|
||||||
length = macText.Length() ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text = strtext ;
|
|
||||||
length = strtext.Length() ;
|
|
||||||
}
|
|
||||||
int laststop = 0 ;
|
int laststop = 0 ;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
int line = 0 ;
|
int line = 0 ;
|
||||||
{
|
{
|
||||||
while( i < length )
|
while( i < length )
|
||||||
{
|
{
|
||||||
if( text[i] == 13 || text[i] == 10)
|
if( strtext[i] == 13 || strtext[i] == 10)
|
||||||
{
|
{
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
if ( m_backgroundMode != wxTRANSPARENT )
|
if ( m_backgroundMode != wxTRANSPARENT )
|
||||||
{
|
{
|
||||||
Point bounds={0,0} ;
|
Point bounds={0,0} ;
|
||||||
@@ -1460,13 +1452,13 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
&frame,
|
&frame,
|
||||||
teJustLeft,
|
teJustLeft,
|
||||||
nil );
|
nil );
|
||||||
CFRelease( mString ) ;
|
|
||||||
line++ ;
|
line++ ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
|
::DrawText( text , 0 , strlen(text) ) ;
|
||||||
line++ ;
|
line++ ;
|
||||||
::MoveTo( xx , yy + line*(fi.descent + fi.ascent + fi.leading) );
|
::MoveTo( xx , yy + line*(fi.descent + fi.ascent + fi.leading) );
|
||||||
}
|
}
|
||||||
@@ -1474,11 +1466,12 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
}
|
}
|
||||||
i++ ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
||||||
CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
|
|
||||||
if ( m_backgroundMode != wxTRANSPARENT )
|
if ( m_backgroundMode != wxTRANSPARENT )
|
||||||
{
|
{
|
||||||
@@ -1502,13 +1495,13 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
&frame,
|
&frame,
|
||||||
teJustLeft,
|
teJustLeft,
|
||||||
nil );
|
nil );
|
||||||
CFRelease( mString ) ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
}
|
::DrawText( text , 0 , strlen(text) ) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
::TextMode( srcOr ) ;
|
::TextMode( srcOr ) ;
|
||||||
}
|
}
|
||||||
@@ -1519,7 +1512,7 @@ bool wxDC::CanGetTextExtent() const
|
|||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
|
void wxDC::DoGetTextExtent( const wxString &strtext, wxCoord *width, wxCoord *height,
|
||||||
wxCoord *descent, wxCoord *externalLeading ,
|
wxCoord *descent, wxCoord *externalLeading ,
|
||||||
wxFont *theFont ) const
|
wxFont *theFont ) const
|
||||||
{
|
{
|
||||||
@@ -1545,8 +1538,9 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
*descent =YDEV2LOGREL( fi.descent );
|
*descent =YDEV2LOGREL( fi.descent );
|
||||||
if ( externalLeading )
|
if ( externalLeading )
|
||||||
*externalLeading = YDEV2LOGREL( fi.leading ) ;
|
*externalLeading = YDEV2LOGREL( fi.leading ) ;
|
||||||
|
int length = strtext.Length() ;
|
||||||
|
/*
|
||||||
const char *text = NULL ;
|
const char *text = NULL ;
|
||||||
int length = 0 ;
|
|
||||||
wxString macText ;
|
wxString macText ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||||
{
|
{
|
||||||
@@ -1559,6 +1553,7 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
text = string ;
|
text = string ;
|
||||||
length = string.Length() ;
|
length = string.Length() ;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
int laststop = 0 ;
|
int laststop = 0 ;
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
int curwidth = 0 ;
|
int curwidth = 0 ;
|
||||||
@@ -1567,8 +1562,9 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
*width = 0 ;
|
*width = 0 ;
|
||||||
while( i < length )
|
while( i < length )
|
||||||
{
|
{
|
||||||
if( text[i] == 13 || text[i] == 10)
|
if( strtext[i] == 13 || strtext[i] == 10)
|
||||||
{
|
{
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
if ( height )
|
if ( height )
|
||||||
*height += YDEV2LOGREL( fi.descent + fi.ascent + fi.leading ) ;
|
*height += YDEV2LOGREL( fi.descent + fi.ascent + fi.leading ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
@@ -1576,20 +1572,20 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
{
|
{
|
||||||
Point bounds={0,0} ;
|
Point bounds={0,0} ;
|
||||||
SInt16 baseline ;
|
SInt16 baseline ;
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
::GetThemeTextDimensions( mString,
|
::GetThemeTextDimensions( mString,
|
||||||
kThemeCurrentPortFont,
|
kThemeCurrentPortFont,
|
||||||
kThemeStateActive,
|
kThemeStateActive,
|
||||||
false,
|
false,
|
||||||
&bounds,
|
&bounds,
|
||||||
&baseline );
|
&baseline );
|
||||||
CFRelease( mString ) ;
|
|
||||||
curwidth = bounds.h ;
|
curwidth = bounds.h ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
curwidth = ::TextWidth( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
|
curwidth = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
}
|
}
|
||||||
if ( curwidth > *width )
|
if ( curwidth > *width )
|
||||||
*width = XDEV2LOGREL( curwidth ) ;
|
*width = XDEV2LOGREL( curwidth ) ;
|
||||||
@@ -1598,25 +1594,26 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
|
|||||||
i++ ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString linetext = strtext.Mid( laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useGetThemeText )
|
if ( useGetThemeText )
|
||||||
{
|
{
|
||||||
Point bounds={0,0} ;
|
Point bounds={0,0} ;
|
||||||
SInt16 baseline ;
|
SInt16 baseline ;
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
wxMacCFStringHolder mString( linetext ) ;
|
||||||
::GetThemeTextDimensions( mString,
|
::GetThemeTextDimensions( mString,
|
||||||
kThemeCurrentPortFont,
|
kThemeCurrentPortFont,
|
||||||
kThemeStateActive,
|
kThemeStateActive,
|
||||||
false,
|
false,
|
||||||
&bounds,
|
&bounds,
|
||||||
&baseline );
|
&baseline );
|
||||||
CFRelease( mString ) ;
|
|
||||||
curwidth = bounds.h ;
|
curwidth = bounds.h ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
curwidth = ::TextWidth( text , laststop , i - laststop ) ;
|
wxCharBuffer text = wxMacStringToCString(linetext) ;
|
||||||
|
curwidth = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
}
|
}
|
||||||
if ( curwidth > *width )
|
if ( curwidth > *width )
|
||||||
*width = XDEV2LOGREL( curwidth ) ;
|
*width = XDEV2LOGREL( curwidth ) ;
|
||||||
@@ -1773,7 +1770,7 @@ void wxDC::MacInstallFont() const
|
|||||||
Style qdStyle = font->m_macFontStyle ;
|
Style qdStyle = font->m_macFontStyle ;
|
||||||
ATSUFontID atsuFont = font->m_macATSUFontID ;
|
ATSUFontID atsuFont = font->m_macATSUFontID ;
|
||||||
status = ::ATSUCreateStyle(&(ATSUStyle)m_macATSUIStyle) ;
|
status = ::ATSUCreateStyle(&(ATSUStyle)m_macATSUIStyle) ;
|
||||||
wxASSERT_MSG( status == noErr , "couldn't create ATSU style" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't create ATSU style") ) ;
|
||||||
ATSUAttributeTag atsuTags[] =
|
ATSUAttributeTag atsuTags[] =
|
||||||
{
|
{
|
||||||
kATSUFontTag ,
|
kATSUFontTag ,
|
||||||
@@ -1819,7 +1816,7 @@ void wxDC::MacInstallFont() const
|
|||||||
} ;
|
} ;
|
||||||
status = ::ATSUSetAttributes((ATSUStyle)m_macATSUIStyle, sizeof(atsuTags)/sizeof(ATSUAttributeTag),
|
status = ::ATSUSetAttributes((ATSUStyle)m_macATSUIStyle, sizeof(atsuTags)/sizeof(ATSUAttributeTag),
|
||||||
atsuTags, atsuSizes, atsuValues);
|
atsuTags, atsuSizes, atsuValues);
|
||||||
wxASSERT_MSG( status == noErr , "couldn't set create ATSU style" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't set create ATSU style") ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pattern gHatchPatterns[] =
|
Pattern gHatchPatterns[] =
|
||||||
|
@@ -62,8 +62,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
|
|||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease( m_macPrintSessionPort ) ;
|
PMRelease( m_macPrintSessionPort ) ;
|
||||||
@@ -88,8 +88,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
UMAPrClose(NULL) ;
|
UMAPrClose(NULL) ;
|
||||||
m_ok = FALSE;
|
m_ok = FALSE;
|
||||||
@@ -150,8 +150,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
|
|||||||
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease(&m_macPrintSessionPort) ;
|
PMRelease(&m_macPrintSessionPort) ;
|
||||||
@@ -234,8 +234,8 @@ bool wxPrinterDC::StartDoc( const wxString& WXUNUSED(message) )
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err )
|
if ( err )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
UMAPrClose(NULL) ;
|
UMAPrClose(NULL) ;
|
||||||
m_ok = FALSE;
|
m_ok = FALSE;
|
||||||
@@ -258,8 +258,8 @@ bool wxPrinterDC::StartDoc( const wxString& WXUNUSED(message) )
|
|||||||
if ( err != noErr || m_macPrintSessionPort == kPMNoReference )
|
if ( err != noErr || m_macPrintSessionPort == kPMNoReference )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease(&m_macPrintSessionPort) ;
|
PMRelease(&m_macPrintSessionPort) ;
|
||||||
@@ -280,8 +280,8 @@ bool wxPrinterDC::StartDoc( const wxString& WXUNUSED(message) )
|
|||||||
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper);
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
#if TARGET_CARBON && PM_USE_SESSION_APIS
|
||||||
PMRelease(&m_macPrintSessionPort) ;
|
PMRelease(&m_macPrintSessionPort) ;
|
||||||
@@ -321,8 +321,8 @@ void wxPrinterDC::EndDoc(void)
|
|||||||
#endif
|
#endif
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,8 +363,8 @@ void wxPrinterDC::StartPage(void)
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
::PrClosePage( (TPPrPort) m_macPrintSessionPort ) ;
|
::PrClosePage( (TPPrPort) m_macPrintSessionPort ) ;
|
||||||
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
||||||
@@ -382,8 +382,8 @@ void wxPrinterDC::StartPage(void)
|
|||||||
#endif
|
#endif
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if PM_USE_SESSION_APIS
|
#if PM_USE_SESSION_APIS
|
||||||
PMSessionEndPage((PMPrintSession)m_macPrintSessionPort);
|
PMSessionEndPage((PMPrintSession)m_macPrintSessionPort);
|
||||||
@@ -421,8 +421,8 @@ void wxPrinterDC::EndPage(void)
|
|||||||
err = PrError() ;
|
err = PrError() ;
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld") , err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ;
|
||||||
::UMAPrClose(NULL) ;
|
::UMAPrClose(NULL) ;
|
||||||
@@ -437,8 +437,8 @@ void wxPrinterDC::EndPage(void)
|
|||||||
#endif
|
#endif
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %ld", err ) ;
|
message.Printf( wxT("Print Error %ld"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
#if PM_USE_SESSION_APIS
|
#if PM_USE_SESSION_APIS
|
||||||
PMSessionEndDocument((PMPrintSession)m_macPrintSessionPort);
|
PMSessionEndDocument((PMPrintSession)m_macPrintSessionPort);
|
||||||
|
@@ -40,7 +40,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent,
|
|||||||
const wxSize& WXUNUSED(size),
|
const wxSize& WXUNUSED(size),
|
||||||
const wxString& WXUNUSED(name))
|
const wxString& WXUNUSED(name))
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( NavServicesAvailable() , "Navigation Services are not running" ) ;
|
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
|
||||||
m_message = message;
|
m_message = message;
|
||||||
m_dialogStyle = style;
|
m_dialogStyle = style;
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
@@ -92,7 +92,7 @@ int wxDirDialog::ShowModal()
|
|||||||
0L); // User Data
|
0L); // User Data
|
||||||
|
|
||||||
if ( (err != noErr) && (err != userCanceledErr) ) {
|
if ( (err != noErr) && (err != userCanceledErr) ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ int wxDirDialog::ShowModal()
|
|||||||
|
|
||||||
OSErr err = ::AECoerceDesc( &mNavReply.selection , typeFSS, &specDesc);
|
OSErr err = ::AECoerceDesc( &mNavReply.selection , typeFSS, &specDesc);
|
||||||
if ( err != noErr ) {
|
if ( err != noErr ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
folderInfo = **(FSSpec**) specDesc.dataHandle;
|
folderInfo = **(FSSpec**) specDesc.dataHandle;
|
||||||
@@ -130,7 +130,7 @@ int wxDirDialog::ShowModal()
|
|||||||
|
|
||||||
err = ::PBGetCatInfoSync(&thePB);
|
err = ::PBGetCatInfoSync(&thePB);
|
||||||
if ( err != noErr ) {
|
if ( err != noErr ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
// Create cannonical FSSpec
|
// Create cannonical FSSpec
|
||||||
|
@@ -133,7 +133,7 @@ wxDirData::wxDirData(const wxString& dirname)
|
|||||||
|
|
||||||
err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
||||||
#endif
|
#endif
|
||||||
wxASSERT_MSG( (err == noErr) || (err == nsvErr) , "Error accessing directory " + m_dirname) ;
|
wxASSERT_MSG( (err == noErr) || (err == nsvErr) , wxT("Error accessing directory " + m_dirname)) ;
|
||||||
|
|
||||||
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
||||||
m_index = 0 ;
|
m_index = 0 ;
|
||||||
@@ -153,9 +153,6 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
if ( !m_isDir )
|
if ( !m_isDir )
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
char c_name[256] ;
|
|
||||||
#endif
|
|
||||||
wxString result;
|
wxString result;
|
||||||
|
|
||||||
short err = noErr ;
|
short err = noErr ;
|
||||||
@@ -169,18 +166,12 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
p2cstrcpy( c_name, m_name ) ;
|
|
||||||
strcpy( (char *)m_name, c_name);
|
|
||||||
#else
|
|
||||||
p2cstr( m_name ) ;
|
|
||||||
#endif
|
|
||||||
// its hidden but we don't want it
|
// its hidden but we don't want it
|
||||||
if ( ( m_CPB.hFileInfo.ioFlFndrInfo.fdFlags & kIsInvisible ) && !(m_flags & wxDIR_HIDDEN) )
|
if ( ( m_CPB.hFileInfo.ioFlFndrInfo.fdFlags & kIsInvisible ) && !(m_flags & wxDIR_HIDDEN) )
|
||||||
continue ;
|
continue ;
|
||||||
#ifdef __DARWIN__
|
#ifdef __DARWIN__
|
||||||
// under X, names that start with '.' are hidden
|
// under X, names that start with '.' are hidden
|
||||||
if ( ( m_name[0] == '.' ) && !(m_flags & wxDIR_HIDDEN) )
|
if ( ( m_name[1] == '.' ) && !(m_flags & wxDIR_HIDDEN) )
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
@@ -196,18 +187,18 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
if ( ( m_CPB.dirInfo.ioFlAttrib & ioDirMask) == 0 && !(m_flags & wxDIR_FILES ) )
|
if ( ( m_CPB.dirInfo.ioFlAttrib & ioDirMask) == 0 && !(m_flags & wxDIR_FILES ) )
|
||||||
continue ;
|
continue ;
|
||||||
|
|
||||||
wxString file( m_name ) ;
|
wxString file = wxMacMakeStringFromPascal( m_name ) ;
|
||||||
if ( m_filespec.IsEmpty() || m_filespec == "*.*" || m_filespec == "*" )
|
if ( m_filespec.IsEmpty() || m_filespec == wxT("*.*") || m_filespec == wxT("*") )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else if ( m_filespec.Length() > 1 && m_filespec.Left(1) =="*" )
|
else if ( m_filespec.Length() > 1 && m_filespec.Left(1) == wxT("*") )
|
||||||
{
|
{
|
||||||
if ( file.Right( m_filespec.Length() - 1 ).Upper() != m_filespec.Mid(1).Upper() )
|
if ( file.Right( m_filespec.Length() - 1 ).Upper() != m_filespec.Mid(1).Upper() )
|
||||||
{
|
{
|
||||||
continue ;
|
continue ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( m_filespec.Length() > 1 && m_filespec.Right(1) == "*" )
|
else if ( m_filespec.Length() > 1 && m_filespec.Right(1) == wxT("*") )
|
||||||
{
|
{
|
||||||
if ( file.Left( m_filespec.Length() - 1 ).Upper() != m_filespec.Left( m_filespec.Length() - 1 ).Upper() )
|
if ( file.Left( m_filespec.Length() - 1 ).Upper() != m_filespec.Left( m_filespec.Length() - 1 ).Upper() )
|
||||||
{
|
{
|
||||||
@@ -226,7 +217,7 @@ bool wxDirData::Read(wxString *filename)
|
|||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
*filename = (char*) m_name ;
|
*filename = wxMacMakeStringFromPascal( m_name ) ;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -205,12 +205,9 @@ bool wxDropTarget::GetData()
|
|||||||
GetFlavorData((DragReference)m_currentDrag, theItem, theType, (void*) theData, &dataSize, 0L);
|
GetFlavorData((DragReference)m_currentDrag, theItem, theType, (void*) theData, &dataSize, 0L);
|
||||||
if( theType == 'TEXT' )
|
if( theType == 'TEXT' )
|
||||||
{
|
{
|
||||||
theData[dataSize]=0 ;
|
theData[dataSize]=0 ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
wxString convert = wxMacMakeStringFromCString( theData ) ;
|
||||||
{
|
m_dataObject->SetData( format, convert.Length() * sizeof(wxChar), (const wxChar*) convert );
|
||||||
wxMacConvertToPC((char*)theData,(char*)theData,dataSize) ;
|
|
||||||
}
|
|
||||||
m_dataObject->SetData( format, dataSize, theData );
|
|
||||||
}
|
}
|
||||||
else if ( theType == kDragFlavorTypeHFS )
|
else if ( theType == kDragFlavorTypeHFS )
|
||||||
{
|
{
|
||||||
@@ -303,11 +300,10 @@ wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags))
|
|||||||
if ( type == 'TEXT' )
|
if ( type == 'TEXT' )
|
||||||
{
|
{
|
||||||
dataSize-- ;
|
dataSize-- ;
|
||||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
dataPtr[ dataSize ] = 0 ;
|
||||||
{
|
wxString st( (wxChar*) dataPtr ) ;
|
||||||
wxMacConvertFromPC((char*)dataPtr,(char*)dataPtr,dataSize) ;
|
wxCharBuffer buf = wxMacStringToCString( st ) ;
|
||||||
}
|
AddDragItemFlavor(theDrag, theItem, type , buf.data(), strlen(buf), 0);
|
||||||
AddDragItemFlavor(theDrag, theItem, type , dataPtr, dataSize, 0);
|
|
||||||
}
|
}
|
||||||
else if (type == kDragFlavorTypeHFS )
|
else if (type == kDragFlavorTypeHFS )
|
||||||
{
|
{
|
||||||
|
@@ -104,13 +104,12 @@ NavEventProc(
|
|||||||
Str255 filename ;
|
Str255 filename ;
|
||||||
// get the current filename
|
// get the current filename
|
||||||
NavCustomControl(ioParams->context, kNavCtlGetEditFileName, &filename);
|
NavCustomControl(ioParams->context, kNavCtlGetEditFileName, &filename);
|
||||||
CopyPascalStringToC( filename , (char*) filename ) ;
|
wxString sfilename = wxMacMakeStringFromPascal( filename ) ;
|
||||||
wxString sfilename( filename ) ;
|
|
||||||
int pos = sfilename.Find('.',TRUE) ;
|
int pos = sfilename.Find('.',TRUE) ;
|
||||||
if ( pos != wxNOT_FOUND )
|
if ( pos != wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
sfilename = sfilename.Left(pos+1)+extension ;
|
sfilename = sfilename.Left(pos+1)+extension ;
|
||||||
CopyCStringToPascal( sfilename.c_str() , filename ) ;
|
wxMacStringToPascal( sfilename , filename ) ;
|
||||||
NavCustomControl(ioParams->context, kNavCtlSetEditFileName, &filename);
|
NavCustomControl(ioParams->context, kNavCtlSetEditFileName, &filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,11 +117,11 @@ NavEventProc(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * gfilters[] =
|
const wxChar * gfilters[] =
|
||||||
{
|
{
|
||||||
"*.TXT" ,
|
wxT("*.TXT") ,
|
||||||
"*.TIF" ,
|
wxT("*.TIF") ,
|
||||||
"*.JPG" ,
|
wxT("*.JPG") ,
|
||||||
|
|
||||||
NULL
|
NULL
|
||||||
} ;
|
} ;
|
||||||
@@ -162,7 +161,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
++filterIndex ;
|
++filterIndex ;
|
||||||
}
|
}
|
||||||
isName = !isName ;
|
isName = !isName ;
|
||||||
current = "" ;
|
current = wxEmptyString ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -172,7 +171,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
// we allow for compatibility reason to have a single filter expression (like *.*) without
|
// we allow for compatibility reason to have a single filter expression (like *.*) without
|
||||||
// an explanatory text, in that case the first part is name and extension at the same time
|
// an explanatory text, in that case the first part is name and extension at the same time
|
||||||
|
|
||||||
wxASSERT_MSG( filterIndex == 0 || !isName , "incorrect format of format string" ) ;
|
wxASSERT_MSG( filterIndex == 0 || !isName , wxT("incorrect format of format string") ) ;
|
||||||
if ( current.IsEmpty() )
|
if ( current.IsEmpty() )
|
||||||
myData->extensions.Add( myData->name[filterIndex] ) ;
|
myData->extensions.Add( myData->name[filterIndex] ) ;
|
||||||
else
|
else
|
||||||
@@ -189,7 +188,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
int j ;
|
int j ;
|
||||||
for ( j = 0 ; gfilters[j] ; j++ )
|
for ( j = 0 ; gfilters[j] ; j++ )
|
||||||
{
|
{
|
||||||
if ( strcmp( myData->extensions[i] , gfilters[j] ) == 0 )
|
if ( myData->extensions[i] == gfilters[j] )
|
||||||
{
|
{
|
||||||
myData->filtermactypes.Add( gfiltersmac[j] ) ;
|
myData->filtermactypes.Add( gfiltersmac[j] ) ;
|
||||||
break ;
|
break ;
|
||||||
@@ -205,6 +204,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
|
|||||||
|
|
||||||
static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecPtr data)
|
static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecPtr data)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Str255 filename ;
|
Str255 filename ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
@@ -214,20 +214,22 @@ static Boolean CheckFile( ConstStr255Param name , OSType type , OpenUserDataRecP
|
|||||||
p2cstr( filename ) ;
|
p2cstr( filename ) ;
|
||||||
#endif
|
#endif
|
||||||
wxString file(filename) ;
|
wxString file(filename) ;
|
||||||
|
*/
|
||||||
|
wxString file = wxMacMakeStringFromPascal( name ) ;
|
||||||
file.MakeUpper() ;
|
file.MakeUpper() ;
|
||||||
|
|
||||||
if ( data->extensions.GetCount() > 0 )
|
if ( data->extensions.GetCount() > 0 )
|
||||||
{
|
{
|
||||||
//for ( int i = 0 ; i < data->numfilters ; ++i )
|
//for ( int i = 0 ; i < data->numfilters ; ++i )
|
||||||
int i = data->currentfilter ;
|
int i = data->currentfilter ;
|
||||||
if ( data->extensions[i].Right(2) == ".*" )
|
if ( data->extensions[i].Right(2) == wxT(".*") )
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
{
|
{
|
||||||
if ( type == (OSType)data->filtermactypes[i] )
|
if ( type == (OSType)data->filtermactypes[i] )
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
wxStringTokenizer tokenizer( data->extensions[i] , ";" ) ;
|
wxStringTokenizer tokenizer( data->extensions[i] , wxT(";") ) ;
|
||||||
while( tokenizer.HasMoreTokens() )
|
while( tokenizer.HasMoreTokens() )
|
||||||
{
|
{
|
||||||
wxString extension = tokenizer.GetNextToken() ;
|
wxString extension = tokenizer.GetNextToken() ;
|
||||||
@@ -272,17 +274,17 @@ static pascal Boolean CrossPlatformFileFilter(CInfoPBPtr myCInfoPBPtr, void *dat
|
|||||||
|
|
||||||
// end wxmac
|
// end wxmac
|
||||||
|
|
||||||
wxString wxFileSelector(const char *title,
|
wxString wxFileSelector(const wxChar *title,
|
||||||
const char *defaultDir, const char *defaultFileName,
|
const wxChar *defaultDir, const wxChar *defaultFileName,
|
||||||
const char *defaultExtension, const char *filter, int flags,
|
const wxChar *defaultExtension, const wxChar *filter, int flags,
|
||||||
wxWindow *parent, int x, int y)
|
wxWindow *parent, int x, int y)
|
||||||
{
|
{
|
||||||
// If there's a default extension specified but no filter, we create a suitable
|
// If there's a default extension specified but no filter, we create a suitable
|
||||||
// filter.
|
// filter.
|
||||||
|
|
||||||
wxString filter2("");
|
wxString filter2;
|
||||||
if ( defaultExtension && !filter )
|
if ( defaultExtension && !filter )
|
||||||
filter2 = wxString("*.") + wxString(defaultExtension) ;
|
filter2 = wxString(wxT("*.")) + wxString(defaultExtension) ;
|
||||||
else if ( filter )
|
else if ( filter )
|
||||||
filter2 = filter;
|
filter2 = filter;
|
||||||
|
|
||||||
@@ -290,13 +292,13 @@ wxString wxFileSelector(const char *title,
|
|||||||
if (defaultDir)
|
if (defaultDir)
|
||||||
defaultDirString = defaultDir;
|
defaultDirString = defaultDir;
|
||||||
else
|
else
|
||||||
defaultDirString = "";
|
defaultDirString = wxEmptyString ;
|
||||||
|
|
||||||
wxString defaultFilenameString;
|
wxString defaultFilenameString;
|
||||||
if (defaultFileName)
|
if (defaultFileName)
|
||||||
defaultFilenameString = defaultFileName;
|
defaultFilenameString = defaultFileName;
|
||||||
else
|
else
|
||||||
defaultFilenameString = "";
|
defaultFilenameString = wxEmptyString;
|
||||||
|
|
||||||
wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y));
|
wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y));
|
||||||
|
|
||||||
@@ -308,19 +310,19 @@ wxString wxFileSelector(const char *title,
|
|||||||
return wxGetEmptyString();
|
return wxGetEmptyString();
|
||||||
}
|
}
|
||||||
|
|
||||||
WXDLLEXPORT wxString wxFileSelectorEx(const char *title,
|
WXDLLEXPORT wxString wxFileSelectorEx(const wxChar *title,
|
||||||
const char *defaultDir,
|
const wxChar *defaultDir,
|
||||||
const char *defaultFileName,
|
const wxChar *defaultFileName,
|
||||||
int* defaultFilterIndex,
|
int* defaultFilterIndex,
|
||||||
const char *filter,
|
const wxChar *filter,
|
||||||
int flags,
|
int flags,
|
||||||
wxWindow* parent,
|
wxWindow* parent,
|
||||||
int x,
|
int x,
|
||||||
int y)
|
int y)
|
||||||
|
|
||||||
{
|
{
|
||||||
wxFileDialog fileDialog(parent, title ? title : "", defaultDir ? defaultDir : "",
|
wxFileDialog fileDialog(parent, title ? title : wxT(""), defaultDir ? defaultDir : wxT(""),
|
||||||
defaultFileName ? defaultFileName : "", filter ? filter : "", flags, wxPoint(x, y));
|
defaultFileName ? defaultFileName : wxT(""), filter ? filter : wxT(""), flags, wxPoint(x, y));
|
||||||
|
|
||||||
if ( fileDialog.ShowModal() == wxID_OK )
|
if ( fileDialog.ShowModal() == wxID_OK )
|
||||||
{
|
{
|
||||||
@@ -335,18 +337,17 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
|||||||
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
|
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
|
||||||
long style, const wxPoint& pos)
|
long style, const wxPoint& pos)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( NavServicesAvailable() , "Navigation Services are not running" ) ;
|
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
|
||||||
m_message = message;
|
m_message = message;
|
||||||
m_dialogStyle = style;
|
m_dialogStyle = style;
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
m_path = "";
|
m_path = wxT("");
|
||||||
m_fileName = defaultFileName;
|
m_fileName = defaultFileName;
|
||||||
m_dir = defaultDir;
|
m_dir = defaultDir;
|
||||||
m_wildCard = wildCard;
|
m_wildCard = wildCard;
|
||||||
m_filterIndex = 0;
|
m_filterIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pascal Boolean CrossPlatformFilterCallback (
|
pascal Boolean CrossPlatformFilterCallback (
|
||||||
AEDesc *theItem,
|
AEDesc *theItem,
|
||||||
void *info,
|
void *info,
|
||||||
@@ -417,19 +418,8 @@ int wxFileDialog::ShowModal()
|
|||||||
mNavOptions.dialogOptionFlags &= ~kNavSelectDefaultLocation;
|
mNavOptions.dialogOptionFlags &= ~kNavSelectDefaultLocation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
wxMacStringToPascal( m_message , (StringPtr)mNavOptions.message ) ;
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( m_fileName , (StringPtr)mNavOptions.savedFileName ) ;
|
||||||
c2pstrcpy((StringPtr)mNavOptions.message, m_message) ;
|
|
||||||
#else
|
|
||||||
strcpy((char *)mNavOptions.message, m_message) ;
|
|
||||||
c2pstr((char *)mNavOptions.message ) ;
|
|
||||||
#endif
|
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy((StringPtr)mNavOptions.savedFileName, m_fileName) ;
|
|
||||||
#else
|
|
||||||
strcpy((char *)mNavOptions.savedFileName, m_fileName) ;
|
|
||||||
c2pstr((char *)mNavOptions.savedFileName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// zero all data
|
// zero all data
|
||||||
|
|
||||||
@@ -450,12 +440,7 @@ int wxFileDialog::ShowModal()
|
|||||||
(*mNavOptions.popupExtension)[i].version = kNavMenuItemSpecVersion ;
|
(*mNavOptions.popupExtension)[i].version = kNavMenuItemSpecVersion ;
|
||||||
(*mNavOptions.popupExtension)[i].menuCreator = 'WXNG' ;
|
(*mNavOptions.popupExtension)[i].menuCreator = 'WXNG' ;
|
||||||
(*mNavOptions.popupExtension)[i].menuType = i ;
|
(*mNavOptions.popupExtension)[i].menuType = i ;
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( myData.name[i] , (StringPtr)(*mNavOptions.popupExtension)[i].menuItemName ) ;
|
||||||
c2pstrcpy((StringPtr)(*mNavOptions.popupExtension)[i].menuItemName, myData.name[i]) ;
|
|
||||||
#else
|
|
||||||
strcpy((char *)(*mNavOptions.popupExtension)[i].menuItemName, myData.name[i]) ;
|
|
||||||
c2pstr((char *)(*mNavOptions.popupExtension)[i].menuItemName ) ;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( m_dialogStyle & wxSAVE )
|
if ( m_dialogStyle & wxSAVE )
|
||||||
@@ -519,7 +504,7 @@ int wxFileDialog::ShowModal()
|
|||||||
{
|
{
|
||||||
OSErr err = ::AEGetNthDesc( &mNavReply.selection , i , typeFSS, &keyWord , &specDesc);
|
OSErr err = ::AEGetNthDesc( &mNavReply.selection , i , typeFSS, &keyWord , &specDesc);
|
||||||
if ( err != noErr ) {
|
if ( err != noErr ) {
|
||||||
m_path = "" ;
|
m_path = wxT("") ;
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
outFileSpec = **(FSSpec**) specDesc.dataHandle;
|
outFileSpec = **(FSSpec**) specDesc.dataHandle;
|
||||||
@@ -543,28 +528,30 @@ int wxFileDialog::ShowModal()
|
|||||||
|
|
||||||
// Generic file load/save dialog
|
// Generic file load/save dialog
|
||||||
static wxString
|
static wxString
|
||||||
wxDefaultFileSelector(bool load, const char *what, const char *extension, const char *default_name, wxWindow *parent)
|
wxDefaultFileSelector(bool load, const wxChar *what, const wxChar *extension, const wxChar *default_name, wxWindow *parent)
|
||||||
{
|
{
|
||||||
char *ext = (char *)extension;
|
wxString prompt;
|
||||||
|
|
||||||
char prompt[50];
|
|
||||||
wxString str;
|
wxString str;
|
||||||
if (load)
|
if (load)
|
||||||
str = "Load %s file";
|
str = wxT("Load %s file");
|
||||||
else
|
else
|
||||||
str = "Save %s file";
|
str = wxT("Save %s file");
|
||||||
sprintf(prompt, wxGetTranslation(str), what);
|
prompt.Printf( wxGetTranslation(str), what);
|
||||||
|
|
||||||
if (*ext == '.') ext++;
|
const wxChar *ext = extension;
|
||||||
char wild[60];
|
if (*ext == wxT('.'))
|
||||||
sprintf(wild, "*.%s", ext);
|
ext++;
|
||||||
|
|
||||||
|
wxString wild;
|
||||||
|
wild.Printf(wxT("*.%s"), ext);
|
||||||
|
|
||||||
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
|
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generic file load dialog
|
// Generic file load dialog
|
||||||
wxString
|
wxString
|
||||||
wxLoadFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent)
|
wxLoadFileSelector(const wxChar *what, const wxChar *extension, const wxChar *default_name, wxWindow *parent)
|
||||||
{
|
{
|
||||||
return wxDefaultFileSelector(TRUE, what, extension, default_name, parent);
|
return wxDefaultFileSelector(TRUE, what, extension, default_name, parent);
|
||||||
}
|
}
|
||||||
@@ -572,9 +559,7 @@ wxLoadFileSelector(const char *what, const char *extension, const char *default_
|
|||||||
|
|
||||||
// Generic file save dialog
|
// Generic file save dialog
|
||||||
wxString
|
wxString
|
||||||
wxSaveFileSelector(const char *what, const char *extension, const char *default_name, wxWindow *parent)
|
wxSaveFileSelector(const wxChar *what, const wxChar *extension, const wxChar *default_name, wxWindow *parent)
|
||||||
{
|
{
|
||||||
return wxDefaultFileSelector(FALSE, what, extension, default_name, parent);
|
return wxDefaultFileSelector(FALSE, what, extension, default_name, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ wxFontRefData::~wxFontRefData()
|
|||||||
|
|
||||||
void wxFontRefData::MacFindFont()
|
void wxFontRefData::MacFindFont()
|
||||||
{
|
{
|
||||||
if( m_faceName == "" )
|
if( m_faceName.Length() == 0 )
|
||||||
{
|
{
|
||||||
switch( m_family )
|
switch( m_family )
|
||||||
{
|
{
|
||||||
@@ -92,14 +92,13 @@ void wxFontRefData::MacFindFont()
|
|||||||
}
|
}
|
||||||
Str255 name ;
|
Str255 name ;
|
||||||
GetFontName( m_macFontNum , name ) ;
|
GetFontName( m_macFontNum , name ) ;
|
||||||
CopyPascalStringToC( name , (char*) name ) ;
|
m_faceName = wxMacMakeStringFromPascal( name ) ;
|
||||||
m_faceName = (char*) name ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( m_faceName == "systemfont" )
|
if ( m_faceName == wxT("systemfont") )
|
||||||
m_macFontNum = ::GetSysFont() ;
|
m_macFontNum = ::GetSysFont() ;
|
||||||
else if ( m_faceName == "applicationfont" )
|
else if ( m_faceName == wxT("applicationfont") )
|
||||||
m_macFontNum = ::GetAppFont() ;
|
m_macFontNum = ::GetAppFont() ;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -126,7 +125,7 @@ void wxFontRefData::MacFindFont()
|
|||||||
status = ATSUFindFontFromName ( (Ptr) m_faceName , strlen( m_faceName ) ,
|
status = ATSUFindFontFromName ( (Ptr) m_faceName , strlen( m_faceName ) ,
|
||||||
kFontFullName, kFontMacintoshPlatform, kFontRomanScript , kFontNoLanguage , (UInt32*)&m_macATSUFontID ) ;
|
kFontFullName, kFontMacintoshPlatform, kFontRomanScript , kFontNoLanguage , (UInt32*)&m_macATSUFontID ) ;
|
||||||
*/
|
*/
|
||||||
wxASSERT_MSG( status == noErr , "couldn't retrieve font identifier" ) ;
|
wxASSERT_MSG( status == noErr , wxT("couldn't retrieve font identifier") ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -40,7 +40,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
|||||||
size = wxSize( 200 , 16 ) ;
|
size = wxSize( 200 , 16 ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range,
|
||||||
kControlProgressBarProc , (long) this ) ;
|
kControlProgressBarProc , (long) this ) ;
|
||||||
|
@@ -91,7 +91,7 @@ void wxGLContext::Update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLContext::SetColour(const char *colour)
|
void wxGLContext::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
float r = 0.0;
|
float r = 0.0;
|
||||||
float g = 0.0;
|
float g = 0.0;
|
||||||
@@ -309,7 +309,7 @@ void wxGLCanvas::SetCurrent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetColour(const char *colour)
|
void wxGLCanvas::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
if (m_glContext)
|
if (m_glContext)
|
||||||
m_glContext->SetColour(colour);
|
m_glContext->SetColour(colour);
|
||||||
|
@@ -83,19 +83,19 @@ bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
|
|||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
short theId = -1 ;
|
short theId = -1 ;
|
||||||
if ( name == "wxICON_INFORMATION" )
|
if ( name == wxT("wxICON_INFORMATION") )
|
||||||
{
|
{
|
||||||
theId = kNoteIcon ;
|
theId = kNoteIcon ;
|
||||||
}
|
}
|
||||||
else if ( name == "wxICON_QUESTION" )
|
else if ( name == wxT("wxICON_QUESTION") )
|
||||||
{
|
{
|
||||||
theId = kCautionIcon ;
|
theId = kCautionIcon ;
|
||||||
}
|
}
|
||||||
else if ( name == "wxICON_WARNING" )
|
else if ( name == wxT("wxICON_WARNING") )
|
||||||
{
|
{
|
||||||
theId = kCautionIcon ;
|
theId = kCautionIcon ;
|
||||||
}
|
}
|
||||||
else if ( name == "wxICON_ERROR" )
|
else if ( name == wxT("wxICON_ERROR") )
|
||||||
{
|
{
|
||||||
theId = kStopIcon ;
|
theId = kStopIcon ;
|
||||||
}
|
}
|
||||||
@@ -103,13 +103,7 @@ bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
|
|||||||
{
|
{
|
||||||
Str255 theName ;
|
Str255 theName ;
|
||||||
OSType theType ;
|
OSType theType ;
|
||||||
|
wxMacStringToPascal( name , theName ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) theName , name ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) theName , name ) ;
|
|
||||||
c2pstr( (char *) theName ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
|
Handle resHandle = GetNamedResource( 'cicn' , theName ) ;
|
||||||
if ( resHandle != 0L )
|
if ( resHandle != 0L )
|
||||||
|
@@ -113,7 +113,7 @@ int wxJoystick::GetProductId() const
|
|||||||
wxString wxJoystick::GetProductName() const
|
wxString wxJoystick::GetProductName() const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return wxString("");
|
return wxString(wxT(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxJoystick::GetXMin() const
|
int wxJoystick::GetXMin() const
|
||||||
|
@@ -94,7 +94,7 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
|||||||
|
|
||||||
case lDrawMsg:
|
case lDrawMsg:
|
||||||
{
|
{
|
||||||
const wxString text = list->m_stringArray[cell.v] ;
|
const wxString linetext = list->m_stringArray[cell.v] ;
|
||||||
|
|
||||||
// Save the current clip region, and set the clip region to the area we are about
|
// Save the current clip region, and set the clip region to the area we are about
|
||||||
// to draw.
|
// to draw.
|
||||||
@@ -121,32 +121,27 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
{
|
||||||
|
Rect frame = { drawRect->top, drawRect->left + 4,
|
||||||
if ( useDrawThemeText )
|
drawRect->top + kwxMacListItemHeight, drawRect->right + 10000 } ;
|
||||||
{
|
CFMutableStringRef mString = CFStringCreateMutableCopy( NULL , 0 , wxMacCFStringHolder(linetext) ) ;
|
||||||
Rect frame = { drawRect->top, drawRect->left + 4,
|
::TruncateThemeText( mString , kThemeCurrentPortFont, kThemeStateActive, drawRect->right - drawRect->left , truncEnd , NULL ) ;
|
||||||
drawRect->top + kwxMacListItemHeight, drawRect->right + 10000 } ;
|
::DrawThemeTextBox( mString,
|
||||||
CFStringRef sString = CFStringCreateWithBytes( NULL , (UInt8*) text.c_str(), text.Length(), CFStringGetSystemEncoding(), false ) ;
|
kThemeCurrentPortFont,
|
||||||
CFMutableStringRef mString = CFStringCreateMutableCopy( NULL , 0 , sString ) ;
|
kThemeStateActive,
|
||||||
CFRelease( sString ) ;
|
false,
|
||||||
::TruncateThemeText( mString , kThemeCurrentPortFont, kThemeStateActive, drawRect->right - drawRect->left , truncEnd , NULL ) ;
|
&frame,
|
||||||
::DrawThemeTextBox( mString,
|
teJustLeft,
|
||||||
kThemeCurrentPortFont,
|
nil );
|
||||||
kThemeStateActive,
|
CFRelease( mString ) ;
|
||||||
false,
|
}
|
||||||
&frame,
|
#else
|
||||||
teJustLeft,
|
{
|
||||||
nil );
|
wxCharBuffer text = wxMacStringToCString( linetext ) ;
|
||||||
CFRelease( mString ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
MoveTo(drawRect->left + 4 , drawRect->top + 10 );
|
MoveTo(drawRect->left + 4 , drawRect->top + 10 );
|
||||||
DrawText(text, 0 , text.Length());
|
DrawText(text, 0 , strlen(text) );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// If the cell is hilited, do the hilite now. Paint the cell contents with the
|
// If the cell is hilited, do the hilite now. Paint the cell contents with the
|
||||||
// appropriate QuickDraw transform mode.
|
// appropriate QuickDraw transform mode.
|
||||||
|
|
||||||
@@ -213,7 +208,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
ListDefSpec listDef;
|
ListDefSpec listDef;
|
||||||
listDef.defType = kListDefUserProcType;
|
listDef.defType = kListDefUserProcType;
|
||||||
@@ -234,8 +229,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
fontSize = 9 ;
|
fontSize = 9 ;
|
||||||
fontStyle = normal ;
|
fontStyle = normal ;
|
||||||
#endif
|
#endif
|
||||||
CopyPascalStringToC( fontName , (char*) fontName ) ;
|
SetFont( wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal( fontName ) ) ) ;
|
||||||
SetFont( wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , fontName ) ) ;
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
Size asize;
|
Size asize;
|
||||||
|
|
||||||
@@ -388,15 +382,8 @@ void wxListBox::Delete(int N)
|
|||||||
int wxListBox::DoAppend(const wxString& item)
|
int wxListBox::DoAppend(const wxString& item)
|
||||||
{
|
{
|
||||||
int index = m_noItems ;
|
int index = m_noItems ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
m_stringArray.Add( item ) ;
|
||||||
{
|
m_dataArray.Add( NULL );
|
||||||
m_stringArray.Add( wxMacMakeMacStringFromPC( item ) ) ;
|
|
||||||
m_dataArray.Add( NULL );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_stringArray.Add( item ) ;
|
|
||||||
m_dataArray.Add( NULL );
|
|
||||||
}
|
|
||||||
m_noItems ++;
|
m_noItems ++;
|
||||||
DoSetItemClientData( index , NULL ) ;
|
DoSetItemClientData( index , NULL ) ;
|
||||||
MacAppend( item ) ;
|
MacAppend( item ) ;
|
||||||
@@ -451,47 +438,30 @@ bool wxListBox::HasMultipleSelection() const
|
|||||||
return (m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED);
|
return (m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListBox::FindString(const wxString& st) const
|
int wxListBox::FindString(const wxString& s) const
|
||||||
{
|
{
|
||||||
wxString s ;
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
s = wxMacMakeMacStringFromPC( st ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
s = st ;
|
|
||||||
|
|
||||||
if ( s.Right(1) == "*" )
|
if ( s.Right(1) == wxT("*") )
|
||||||
{
|
{
|
||||||
wxString search = s.Left( s.Length() - 1 ) ;
|
wxString search = s.Left( s.Length() - 1 ) ;
|
||||||
int len = search.Length() ;
|
int len = search.Length() ;
|
||||||
Str255 s1 , s2 ;
|
Str255 s1 , s2 ;
|
||||||
|
wxMacStringToPascal( search , s2 ) ;
|
||||||
#if TARGET_CARBON
|
|
||||||
c2pstrcpy( (StringPtr) s2 , search.c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s2 , search.c_str() ) ;
|
|
||||||
c2pstr( (char *) s2 ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for ( int i = 0 ; i < m_noItems ; ++ i )
|
for ( int i = 0 ; i < m_noItems ; ++ i )
|
||||||
{
|
{
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( m_stringArray[i].Left( len ) , s1 ) ;
|
||||||
c2pstrcpy( (StringPtr) s1 , m_stringArray[i].Left( len ).c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s1 , m_stringArray[i].Left( len ).c_str() ) ;
|
|
||||||
c2pstr( (char *) s1 ) ;
|
|
||||||
#endif
|
|
||||||
if ( EqualString( s1 , s2 , false , false ) )
|
if ( EqualString( s1 , s2 , false , false ) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
if ( s.Left(1) == "*" && s.Length() > 1 )
|
if ( s.Left(1) == wxT("*") && s.Length() > 1 )
|
||||||
{
|
{
|
||||||
s = st ;
|
wxString st = s ;
|
||||||
s.MakeLower() ;
|
st.MakeLower() ;
|
||||||
for ( int i = 0 ; i < m_noItems ; ++i )
|
for ( int i = 0 ; i < m_noItems ; ++i )
|
||||||
{
|
{
|
||||||
if ( GetString(i).Lower().Matches(s) )
|
if ( GetString(i).Lower().Matches(st) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -501,21 +471,12 @@ int wxListBox::FindString(const wxString& st) const
|
|||||||
{
|
{
|
||||||
Str255 s1 , s2 ;
|
Str255 s1 , s2 ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( s , s2 ) ;
|
||||||
c2pstrcpy( (StringPtr) s2 , s.c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s2 , s.c_str() ) ;
|
|
||||||
c2pstr( (char *) s2 ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for ( int i = 0 ; i < m_noItems ; ++ i )
|
for ( int i = 0 ; i < m_noItems ; ++ i )
|
||||||
{
|
{
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( m_stringArray[i] , s1 ) ;
|
||||||
c2pstrcpy( (StringPtr) s1 , m_stringArray[i].c_str() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) s1 , m_stringArray[i].c_str() ) ;
|
|
||||||
c2pstr( (char *) s1 ) ;
|
|
||||||
#endif
|
|
||||||
if ( EqualString( s1 , s2 , false , false ) )
|
if ( EqualString( s1 , s2 , false , false ) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
@@ -535,7 +496,7 @@ void wxListBox::Clear()
|
|||||||
void wxListBox::SetSelection(int N, bool select)
|
void wxListBox::SetSelection(int N, bool select)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||||
"invalid index in wxListBox::SetSelection" );
|
wxT("invalid index in wxListBox::SetSelection") );
|
||||||
MacSetSelection( N , select ) ;
|
MacSetSelection( N , select ) ;
|
||||||
GetSelections( m_selectionPreImage ) ;
|
GetSelections( m_selectionPreImage ) ;
|
||||||
}
|
}
|
||||||
@@ -543,7 +504,7 @@ void wxListBox::SetSelection(int N, bool select)
|
|||||||
bool wxListBox::IsSelected(int N) const
|
bool wxListBox::IsSelected(int N) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( N >= 0 && N < m_noItems, FALSE,
|
wxCHECK_MSG( N >= 0 && N < m_noItems, FALSE,
|
||||||
"invalid index in wxListBox::Selected" );
|
wxT("invalid index in wxListBox::Selected") );
|
||||||
|
|
||||||
return MacIsSelected( N ) ;
|
return MacIsSelected( N ) ;
|
||||||
}
|
}
|
||||||
@@ -564,7 +525,7 @@ wxClientData *wxListBox::DoGetItemClientObject(int N) const
|
|||||||
void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( N >= 0 && N < m_noItems,
|
wxCHECK_RET( N >= 0 && N < m_noItems,
|
||||||
"invalid index in wxListBox::SetClientData" );
|
wxT("invalid index in wxListBox::SetClientData") );
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
if ( m_windowStyle & wxLB_OWNERDRAW )
|
if ( m_windowStyle & wxLB_OWNERDRAW )
|
||||||
@@ -574,7 +535,7 @@ void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
|||||||
wxFAIL_MSG(wxT("Can't use client data with owner-drawn listboxes"));
|
wxFAIL_MSG(wxT("Can't use client data with owner-drawn listboxes"));
|
||||||
}
|
}
|
||||||
#endif // wxUSE_OWNER_DRAWN
|
#endif // wxUSE_OWNER_DRAWN
|
||||||
wxASSERT_MSG( m_dataArray.GetCount() >= (size_t) N , "invalid client_data array" ) ;
|
wxASSERT_MSG( m_dataArray.GetCount() >= (size_t) N , wxT("invalid client_data array") ) ;
|
||||||
|
|
||||||
if ( m_dataArray.GetCount() > (size_t) N )
|
if ( m_dataArray.GetCount() > (size_t) N )
|
||||||
{
|
{
|
||||||
@@ -606,12 +567,7 @@ int wxListBox::GetSelection() const
|
|||||||
// Find string for position
|
// Find string for position
|
||||||
wxString wxListBox::GetString(int N) const
|
wxString wxListBox::GetString(int N) const
|
||||||
{
|
{
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
return m_stringArray[N] ;
|
||||||
{
|
|
||||||
return wxMacMakePCStringFromMac( m_stringArray[N] ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return m_stringArray[N] ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||||
@@ -633,14 +589,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
|||||||
|
|
||||||
void wxListBox::SetString(int N, const wxString& s)
|
void wxListBox::SetString(int N, const wxString& s)
|
||||||
{
|
{
|
||||||
wxString str ;
|
m_stringArray[N] = s ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
str = wxMacMakeMacStringFromPC( s ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
str = s ;
|
|
||||||
m_stringArray[N] = str ;
|
|
||||||
MacSet( N , s ) ;
|
MacSet( N , s ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,7 +703,7 @@ void wxListBox::MacDelete( int N )
|
|||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::MacInsert( int n , const char * text)
|
void wxListBox::MacInsert( int n , const wxString& text)
|
||||||
{
|
{
|
||||||
Cell cell = { 0 , 0 } ;
|
Cell cell = { 0 , 0 } ;
|
||||||
cell.v = n ;
|
cell.v = n ;
|
||||||
@@ -763,7 +712,7 @@ void wxListBox::MacInsert( int n , const char * text)
|
|||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::MacAppend( const char * text)
|
void wxListBox::MacAppend( const wxString& text)
|
||||||
{
|
{
|
||||||
Cell cell = { 0 , 0 } ;
|
Cell cell = { 0 , 0 } ;
|
||||||
cell.v = (**(ListHandle)m_macList).dataBounds.bottom ;
|
cell.v = (**(ListHandle)m_macList).dataBounds.bottom ;
|
||||||
@@ -834,7 +783,7 @@ int wxListBox::MacGetSelections( wxArrayInt& aSelections ) const
|
|||||||
return no_sel ;
|
return no_sel ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::MacSet( int n , const char * text )
|
void wxListBox::MacSet( int n , const wxString& text )
|
||||||
{
|
{
|
||||||
// our implementation does not store anything in the list
|
// our implementation does not store anything in the list
|
||||||
// so we just have to redraw
|
// so we just have to redraw
|
||||||
@@ -1011,11 +960,11 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
{
|
{
|
||||||
if ( event.GetTimestamp() > m_lastTypeIn + 60 )
|
if ( event.GetTimestamp() > m_lastTypeIn + 60 )
|
||||||
{
|
{
|
||||||
m_typeIn = "" ;
|
m_typeIn = wxEmptyString ;
|
||||||
}
|
}
|
||||||
m_lastTypeIn = event.GetTimestamp() ;
|
m_lastTypeIn = event.GetTimestamp() ;
|
||||||
m_typeIn += (char) event.GetKeyCode() ;
|
m_typeIn += (char) event.GetKeyCode() ;
|
||||||
int line = FindString("*"+m_typeIn+"*") ;
|
int line = FindString(wxT("*")+m_typeIn+wxT("*")) ;
|
||||||
if ( line >= 0 )
|
if ( line >= 0 )
|
||||||
{
|
{
|
||||||
if ( GetSelection() != line )
|
if ( GetSelection() != line )
|
||||||
|
@@ -88,7 +88,7 @@ void wxMacAddEvent(
|
|||||||
short wakeUp )
|
short wakeUp )
|
||||||
{
|
{
|
||||||
wxMacNotificationEvents *e = (wxMacNotificationEvents *) table ;
|
wxMacNotificationEvents *e = (wxMacNotificationEvents *) table ;
|
||||||
wxASSERT_MSG( handler != NULL , "illegal notification proc ptr" ) ;
|
wxASSERT_MSG( handler != NULL , wxT("illegal notification proc ptr") ) ;
|
||||||
/* this should be protected eventually */
|
/* this should be protected eventually */
|
||||||
short index = e->top++ ;
|
short index = e->top++ ;
|
||||||
|
|
||||||
|
@@ -107,7 +107,7 @@ void wxMenu::Attach(wxMenuBarBase *menubar)
|
|||||||
// append a new item or submenu to the menu
|
// append a new item or submenu to the menu
|
||||||
bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( pItem != NULL, "can't append NULL item to the menu" );
|
wxASSERT_MSG( pItem != NULL, wxT("can't append NULL item to the menu") );
|
||||||
|
|
||||||
if ( pItem->IsSeparator() )
|
if ( pItem->IsSeparator() )
|
||||||
{
|
{
|
||||||
@@ -121,7 +121,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
wxMenu *pSubMenu = pItem->GetSubMenu() ;
|
wxMenu *pSubMenu = pItem->GetSubMenu() ;
|
||||||
if ( pSubMenu != NULL )
|
if ( pSubMenu != NULL )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( pSubMenu->m_hMenu != NULL , "invalid submenu added");
|
wxASSERT_MSG( pSubMenu->m_hMenu != NULL , wxT("invalid submenu added"));
|
||||||
pSubMenu->m_menuParent = this ;
|
pSubMenu->m_menuParent = this ;
|
||||||
|
|
||||||
if (wxMenuBar::MacGetInstalledMenuBar() == m_menuBar)
|
if (wxMenuBar::MacGetInstalledMenuBar() == m_menuBar)
|
||||||
@@ -140,12 +140,12 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
{
|
{
|
||||||
if ( pos == (size_t)-1 )
|
if ( pos == (size_t)-1 )
|
||||||
{
|
{
|
||||||
UMAAppendMenuItem(MAC_WXHMENU(m_hMenu), "a" );
|
UMAAppendMenuItem(MAC_WXHMENU(m_hMenu), wxT("a") );
|
||||||
pos = CountMenuItems(MAC_WXHMENU(m_hMenu)) ;
|
pos = CountMenuItems(MAC_WXHMENU(m_hMenu)) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), "a" , pos);
|
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a") , pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ;
|
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ;
|
||||||
@@ -503,7 +503,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
|
|
||||||
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
||||||
wxString message ;
|
wxString message ;
|
||||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource") );
|
||||||
::SetMenuBar( menubar ) ;
|
::SetMenuBar( menubar ) ;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
::DisposeMenuBar( menubar ) ;
|
::DisposeMenuBar( menubar ) ;
|
||||||
@@ -550,7 +550,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
int pos ;
|
int pos ;
|
||||||
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
||||||
|
|
||||||
if( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
if( m_titles[i] == wxT("?") || m_titles[i] == wxT("&?") || m_titles[i] == wxApp::s_macHelpMenuTitleName )
|
||||||
{
|
{
|
||||||
if ( mh == NULL )
|
if ( mh == NULL )
|
||||||
{
|
{
|
||||||
|
@@ -48,9 +48,9 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu,
|
|||||||
{
|
{
|
||||||
// In other languages there is no difference in naming the Exit/Quit menu item between MacOS and Windows guidelines
|
// In other languages there is no difference in naming the Exit/Quit menu item between MacOS and Windows guidelines
|
||||||
// therefore these item must not be translated
|
// therefore these item must not be translated
|
||||||
if ( wxStripMenuCodes(m_text).Upper() == "EXIT" )
|
if ( wxStripMenuCodes(m_text).Upper() == wxT("EXIT") )
|
||||||
{
|
{
|
||||||
m_text = "Quit\tCtrl+Q" ;
|
m_text =wxT("Quit\tCtrl+Q") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_radioGroup.start = -1;
|
m_radioGroup.start = -1;
|
||||||
@@ -152,7 +152,7 @@ void wxMenuItem::UncheckRadio()
|
|||||||
|
|
||||||
void wxMenuItem::Check(bool bDoCheck)
|
void wxMenuItem::Check(bool bDoCheck)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( IsCheckable(), "only checkable items may be checked" );
|
wxCHECK_RET( IsCheckable(), wxT("only checkable items may be checked") );
|
||||||
|
|
||||||
if ( m_isChecked != bDoCheck )
|
if ( m_isChecked != bDoCheck )
|
||||||
{
|
{
|
||||||
|
@@ -72,7 +72,7 @@ wxMetaFile::wxMetaFile(const wxString& file)
|
|||||||
|
|
||||||
|
|
||||||
M_METAFILEDATA->m_metafile = 0;
|
M_METAFILEDATA->m_metafile = 0;
|
||||||
wxASSERT_MSG( file.IsEmpty() , "no file based metafile support yet") ;
|
wxASSERT_MSG( file.IsEmpty() , wxT("no file based metafile support yet") ) ;
|
||||||
/*
|
/*
|
||||||
if (!file.IsNull() && (file.Cmp("") == 0))
|
if (!file.IsNull() && (file.Cmp("") == 0))
|
||||||
M_METAFILEDATA->m_metafile = (WXHANDLE) GetMetaFile(file);
|
M_METAFILEDATA->m_metafile = (WXHANDLE) GetMetaFile(file);
|
||||||
@@ -145,9 +145,9 @@ wxMetaFileDC::wxMetaFileDC(const wxString& file)
|
|||||||
m_maxX = -10000;
|
m_maxX = -10000;
|
||||||
m_maxY = -10000;
|
m_maxY = -10000;
|
||||||
|
|
||||||
wxASSERT_MSG( file.IsEmpty() , "no file based metafile support yet") ;
|
wxASSERT_MSG( file.IsEmpty() , wxT("no file based metafile support yet") ) ;
|
||||||
|
|
||||||
m_metaFile = new wxMetaFile("") ;
|
m_metaFile = new wxMetaFile(wxEmptyString) ;
|
||||||
Rect r={0,0,1000,1000} ;
|
Rect r={0,0,1000,1000} ;
|
||||||
|
|
||||||
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
||||||
@@ -167,9 +167,9 @@ wxMetaFileDC::wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, i
|
|||||||
m_maxX = -10000;
|
m_maxX = -10000;
|
||||||
m_maxY = -10000;
|
m_maxY = -10000;
|
||||||
|
|
||||||
wxASSERT_MSG( file.IsEmpty() , "no file based metafile support yet") ;
|
wxASSERT_MSG( file.IsEmpty() , wxT("no file based metafile support yet")) ;
|
||||||
|
|
||||||
m_metaFile = new wxMetaFile("") ;
|
m_metaFile = new wxMetaFile(wxEmptyString) ;
|
||||||
Rect r={yorg,xorg,yorg+yext,xorg+xext} ;
|
Rect r={yorg,xorg,yorg+yext,xorg+xext} ;
|
||||||
|
|
||||||
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
m_metaFile->SetHMETAFILE( OpenPicture( &r ) ) ;
|
||||||
|
@@ -129,66 +129,66 @@ wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& e)
|
|||||||
{
|
{
|
||||||
wxString ext = e ;
|
wxString ext = e ;
|
||||||
ext = ext.Lower() ;
|
ext = ext.Lower() ;
|
||||||
if ( ext == "txt" )
|
if ( ext == wxT("txt") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("text/text");
|
fileType->m_impl->SetFileType(wxT("text/text"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "htm" || ext == "html" )
|
else if ( ext == wxT("htm") || ext == wxT("html") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("text/html");
|
fileType->m_impl->SetFileType(wxT("text/html"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "gif" )
|
else if ( ext == wxT("gif") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/gif");
|
fileType->m_impl->SetFileType(wxT("image/gif"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "png" )
|
else if ( ext == wxT("png" ))
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/png");
|
fileType->m_impl->SetFileType(wxT("image/png"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "jpg" || ext == "jpeg" )
|
else if ( ext == wxT("jpg" )|| ext == wxT("jpeg") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/jpeg");
|
fileType->m_impl->SetFileType(wxT("image/jpeg"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "bmp" )
|
else if ( ext == wxT("bmp") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/bmp");
|
fileType->m_impl->SetFileType(wxT("image/bmp"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "tif" || ext == "tiff" )
|
else if ( ext == wxT("tif") || ext == wxT("tiff") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/tiff");
|
fileType->m_impl->SetFileType(wxT("image/tiff"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "xpm" )
|
else if ( ext == wxT("xpm") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/xpm");
|
fileType->m_impl->SetFileType(wxT("image/xpm"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
else if ( ext == "xbm" )
|
else if ( ext == wxT("xbm") )
|
||||||
{
|
{
|
||||||
wxFileType *fileType = new wxFileType;
|
wxFileType *fileType = new wxFileType;
|
||||||
fileType->m_impl->SetFileType("image/xbm");
|
fileType->m_impl->SetFileType(wxT("image/xbm"));
|
||||||
fileType->m_impl->SetExt(ext);
|
fileType->m_impl->SetExt(ext);
|
||||||
return fileType;
|
return fileType;
|
||||||
}
|
}
|
||||||
|
@@ -67,7 +67,7 @@ int wxMessageDialog::ShowModal()
|
|||||||
|
|
||||||
short result ;
|
short result ;
|
||||||
|
|
||||||
wxASSERT_MSG( ( m_dialogStyle & 0x3F ) != wxYES , "this style is not supported on mac" ) ;
|
wxASSERT_MSG( ( m_dialogStyle & 0x3F ) != wxYES , wxT("this style is not supported on mac") ) ;
|
||||||
|
|
||||||
AlertType alertType = kAlertPlainAlert ;
|
AlertType alertType = kAlertPlainAlert ;
|
||||||
if (m_dialogStyle & wxICON_EXCLAMATION)
|
if (m_dialogStyle & wxICON_EXCLAMATION)
|
||||||
@@ -83,17 +83,12 @@ int wxMessageDialog::ShowModal()
|
|||||||
if ( UMAGetSystemVersion() >= 0x1000 )
|
if ( UMAGetSystemVersion() >= 0x1000 )
|
||||||
{
|
{
|
||||||
AlertStdCFStringAlertParamRec param ;
|
AlertStdCFStringAlertParamRec param ;
|
||||||
CFStringRef cfNoString = NULL ;
|
wxMacCFStringHolder cfNoString(_("No")) ;
|
||||||
CFStringRef cfYesString = NULL ;
|
wxMacCFStringHolder cfYesString( _("Yes")) ;
|
||||||
|
|
||||||
CFStringRef cfTitle = NULL;
|
|
||||||
CFStringRef cfText = NULL;
|
|
||||||
|
|
||||||
cfTitle = wxMacCreateCFString( m_caption ) ;
|
|
||||||
cfText = wxMacCreateCFString( m_message ) ;
|
|
||||||
cfNoString = wxMacCreateCFString( _("No") ) ;
|
|
||||||
cfYesString = wxMacCreateCFString( _("Yes") ) ;
|
|
||||||
|
|
||||||
|
wxMacCFStringHolder cfTitle(m_caption);
|
||||||
|
wxMacCFStringHolder cfText(m_message);
|
||||||
|
|
||||||
param.movable = true;
|
param.movable = true;
|
||||||
param.flags = 0 ;
|
param.flags = 0 ;
|
||||||
|
|
||||||
@@ -157,32 +152,13 @@ int wxMessageDialog::ShowModal()
|
|||||||
CreateStandardAlert( alertType , cfTitle , cfText , ¶m , &alertRef ) ;
|
CreateStandardAlert( alertType , cfTitle , cfText , ¶m , &alertRef ) ;
|
||||||
RunStandardAlert( alertRef , NULL , &result ) ;
|
RunStandardAlert( alertRef , NULL , &result ) ;
|
||||||
}
|
}
|
||||||
if(cfTitle != NULL)
|
if ( skipDialog )
|
||||||
CFRelease(cfTitle);
|
|
||||||
if(cfText != NULL)
|
|
||||||
CFRelease(cfText);
|
|
||||||
if(cfNoString != NULL)
|
|
||||||
CFRelease(cfNoString);
|
|
||||||
if(cfYesString != NULL)
|
|
||||||
CFRelease(cfYesString);
|
|
||||||
if ( skipDialog )
|
|
||||||
return wxID_CANCEL ;
|
return wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
AlertStdAlertParamRec param;
|
AlertStdAlertParamRec param;
|
||||||
char cText[2048] ;
|
|
||||||
|
|
||||||
if (wxApp::s_macDefaultEncodingIsPC)
|
|
||||||
{
|
|
||||||
strcpy(cText , wxMacMakeMacStringFromPC( m_message) ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy( cText , m_message ) ;
|
|
||||||
}
|
|
||||||
wxMacConvertNewlines( cText , cText ) ;
|
|
||||||
|
|
||||||
Str255 yesPString ;
|
Str255 yesPString ;
|
||||||
Str255 noPString ;
|
Str255 noPString ;
|
||||||
@@ -192,7 +168,7 @@ int wxMessageDialog::ShowModal()
|
|||||||
wxMacStringToPascal( m_caption , pascalTitle ) ;
|
wxMacStringToPascal( m_caption , pascalTitle ) ;
|
||||||
wxMacStringToPascal( _("Yes") , yesPString ) ;
|
wxMacStringToPascal( _("Yes") , yesPString ) ;
|
||||||
wxMacStringToPascal( _("No") , noPString ) ;
|
wxMacStringToPascal( _("No") , noPString ) ;
|
||||||
CopyCStringToPascal( cText , pascalText ) ;
|
wxMacStringToPascal( m_message , pascalText ) ;
|
||||||
|
|
||||||
param.movable = true;
|
param.movable = true;
|
||||||
param.filterProc = NULL ;
|
param.filterProc = NULL ;
|
||||||
|
@@ -130,7 +130,7 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
|
||||||
|
|
||||||
int tabstyle = kControlTabSmallNorthProc ;
|
int tabstyle = kControlTabSmallNorthProc ;
|
||||||
if ( HasFlag(wxNB_LEFT) )
|
if ( HasFlag(wxNB_LEFT) )
|
||||||
@@ -360,12 +360,8 @@ void wxNotebook::MacSetupTabs()
|
|||||||
page = m_pages[ii];
|
page = m_pages[ii];
|
||||||
info.version = 0;
|
info.version = 0;
|
||||||
info.iconSuiteID = 0;
|
info.iconSuiteID = 0;
|
||||||
#if TARGET_CARBON
|
wxMacStringToPascal( page->GetLabel() , info.name ) ;
|
||||||
c2pstrcpy( (StringPtr) info.name , page->GetLabel() ) ;
|
|
||||||
#else
|
|
||||||
strcpy( (char *) info.name , page->GetLabel() ) ;
|
|
||||||
c2pstr( (char *) info.name ) ;
|
|
||||||
#endif
|
|
||||||
SetControlData( (ControlHandle) m_macControl, ii+1, kControlTabInfoTag,
|
SetControlData( (ControlHandle) m_macControl, ii+1, kControlTabInfoTag,
|
||||||
sizeof( ControlTabInfoRec) , (char*) &info ) ;
|
sizeof( ControlTabInfoRec) , (char*) &info ) ;
|
||||||
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
||||||
@@ -488,7 +484,7 @@ bool wxNotebook::DoPhase(int /* nPhase */)
|
|||||||
|
|
||||||
void wxNotebook::Command(wxCommandEvent& event)
|
void wxNotebook::Command(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("wxNotebook::Command not implemented");
|
wxFAIL_MSG(wxT("wxNotebook::Command not implemented"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -57,7 +57,7 @@ extern void wxMacDestroyGWorld( GWorldPtr gw ) ;
|
|||||||
void
|
void
|
||||||
ima_png_error(png_struct *png_ptr, char *message)
|
ima_png_error(png_struct *png_ptr, char *message)
|
||||||
{
|
{
|
||||||
wxMessageBox(message, "PNG error");
|
wxMessageBox(wxString::FromAscii(message), wxT("PNG error"));
|
||||||
longjmp(png_ptr->jmpbuf, 1);
|
longjmp(png_ptr->jmpbuf, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -819,8 +819,9 @@ bool wxPNGReader::SaveXPM(char *filename, char *name)
|
|||||||
strcpy(nameStr, name);
|
strcpy(nameStr, name);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(nameStr, filename);
|
wxString str = wxString::FromAscii(filename) ;
|
||||||
wxStripExtension(nameStr);
|
wxStripExtension( str ) ;
|
||||||
|
strcpy(nameStr, str.ToAscii() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetDepth() > 4 )
|
if ( GetDepth() > 4 )
|
||||||
@@ -888,7 +889,7 @@ bool wxPNGFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long fla
|
|||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
wxPNGReader reader;
|
wxPNGReader reader;
|
||||||
if (reader.ReadFile((char*) (const char*) name))
|
if (reader.ReadFile( (char*)(const char*) name.ToAscii() ) )
|
||||||
{
|
{
|
||||||
return reader.InstantiateBitmap(bitmap);
|
return reader.InstantiateBitmap(bitmap);
|
||||||
}
|
}
|
||||||
|
@@ -97,8 +97,8 @@ int wxPrintDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxT(""), wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
::UMAPrClose(NULL) ;
|
::UMAPrClose(NULL) ;
|
||||||
@@ -179,8 +179,8 @@ int wxPrintDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
if ((err != noErr) && (err != kPMCancel))
|
if ((err != noErr) && (err != kPMCancel))
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -245,8 +245,8 @@ int wxPageSetupDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString , wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
::UMAPrClose(NULL) ;
|
::UMAPrClose(NULL) ;
|
||||||
@@ -301,8 +301,8 @@ int wxPageSetupDialog::ShowModal()
|
|||||||
}
|
}
|
||||||
if ((err != noErr) && (err != kPMCancel))
|
if ((err != noErr) && (err != kPMCancel))
|
||||||
{
|
{
|
||||||
message.Printf( "Print Error %d", err ) ;
|
message.Printf( wxT("Print Error %d"), err ) ;
|
||||||
wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
|
wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@@ -144,7 +144,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
|
|||||||
if (!win)
|
if (!win)
|
||||||
{
|
{
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
wxMessageBox("Sorry, could not create an abort dialog.", "Print Error", wxOK, parent);
|
wxMessageBox(wxT("Sorry, could not create an abort dialog."), wxT("Print Error"), wxOK, parent);
|
||||||
delete dc;
|
delete dc;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -162,7 +162,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
|
|||||||
if (!printout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))
|
if (!printout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))
|
||||||
{
|
{
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
wxMessageBox("Could not start printing.", "Print Error", wxOK, parent);
|
wxMessageBox(wxT("Could not start printing."), wxT("Print Error"), wxOK, parent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sm_abortIt)
|
if (sm_abortIt)
|
||||||
|
@@ -203,7 +203,7 @@ wxString wxRadioBox::GetString(int item) const
|
|||||||
wxRadioButton *current;
|
wxRadioButton *current;
|
||||||
|
|
||||||
if ((item < 0) || (item >= m_noItems))
|
if ((item < 0) || (item >= m_noItems))
|
||||||
return wxString("");
|
return wxEmptyString;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
current = m_radioButtonCycle;
|
current = m_radioButtonCycle;
|
||||||
@@ -409,7 +409,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
int totWidth,totHeight;
|
int totWidth,totHeight;
|
||||||
|
|
||||||
SetFont(GetParent()->GetFont());
|
SetFont(GetParent()->GetFont());
|
||||||
GetTextExtent(wxString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight);
|
GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight);
|
||||||
charWidth/=52;
|
charWidth/=52;
|
||||||
|
|
||||||
maxWidth=-1;
|
maxWidth=-1;
|
||||||
@@ -490,7 +490,7 @@ wxSize wxRadioBox::DoGetBestSize() const
|
|||||||
int totWidth, totHeight;
|
int totWidth, totHeight;
|
||||||
|
|
||||||
wxFont font = GetParent()->GetFont();
|
wxFont font = GetParent()->GetFont();
|
||||||
GetTextExtent(wxString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
|
GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
|
||||||
&charWidth, &charHeight, NULL, NULL, &font);
|
&charWidth, &charHeight, NULL, NULL, &font);
|
||||||
charWidth /= 52;
|
charWidth /= 52;
|
||||||
|
|
||||||
|
@@ -46,12 +46,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 , true , 0 , 0 , 100,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , true , 0 , 0 , 100,
|
||||||
kControlScrollBarLiveProc , (long) this ) ;
|
kControlScrollBarLiveProc , (long) this ) ;
|
||||||
|
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_pageSize = (int)((maxValue-minValue)/10);
|
m_pageSize = (int)((maxValue-minValue)/10);
|
||||||
|
|
||||||
MacPreControlCreate( parent, id, "", pos, size, style,
|
MacPreControlCreate( parent, id, wxEmptyString, pos, size, style,
|
||||||
validator, name, &bounds, title );
|
validator, name, &bounds, title );
|
||||||
|
|
||||||
procID = kControlSliderProc + kControlSliderLiveFeedback;
|
procID = kControlSliderProc + kControlSliderLiveFeedback;
|
||||||
@@ -86,15 +86,15 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()), &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( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
::SetControlAction( (ControlHandle) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
||||||
|
|
||||||
if(style & wxSL_LABELS)
|
if(style & wxSL_LABELS)
|
||||||
{
|
{
|
||||||
m_macMinimumStatic = new wxStaticText( this, -1, "" );
|
m_macMinimumStatic = new wxStaticText( this, -1, wxEmptyString );
|
||||||
m_macMaximumStatic = new wxStaticText( this, -1, "" );
|
m_macMaximumStatic = new wxStaticText( this, -1, wxEmptyString );
|
||||||
m_macValueStatic = new wxStaticText( this, -1, "" );
|
m_macValueStatic = new wxStaticText( this, -1, wxEmptyString );
|
||||||
SetRange(minValue, maxValue);
|
SetRange(minValue, maxValue);
|
||||||
SetValue(value);
|
SetValue(value);
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ int wxSlider::GetValue() const
|
|||||||
void wxSlider::SetValue(int value)
|
void wxSlider::SetValue(int value)
|
||||||
{
|
{
|
||||||
wxString valuestring ;
|
wxString valuestring ;
|
||||||
valuestring.Printf( "%d" , value ) ;
|
valuestring.Printf( wxT("%d") , value ) ;
|
||||||
if ( m_macValueStatic )
|
if ( m_macValueStatic )
|
||||||
m_macValueStatic->SetLabel( valuestring ) ;
|
m_macValueStatic->SetLabel( valuestring ) ;
|
||||||
SetControl32BitValue( (ControlHandle) m_macControl , value ) ;
|
SetControl32BitValue( (ControlHandle) m_macControl , value ) ;
|
||||||
@@ -149,11 +149,11 @@ void wxSlider::SetRange(int minValue, int maxValue)
|
|||||||
SetControl32BitMaximum( (ControlHandle) m_macControl, m_rangeMax);
|
SetControl32BitMaximum( (ControlHandle) m_macControl, m_rangeMax);
|
||||||
|
|
||||||
if(m_macMinimumStatic) {
|
if(m_macMinimumStatic) {
|
||||||
value.Printf("%d", m_rangeMin);
|
value.Printf(wxT("%d"), m_rangeMin);
|
||||||
m_macMinimumStatic->SetLabel(value);
|
m_macMinimumStatic->SetLabel(value);
|
||||||
}
|
}
|
||||||
if(m_macMaximumStatic) {
|
if(m_macMaximumStatic) {
|
||||||
value.Printf("%d", m_rangeMax);
|
value.Printf(wxT("%d"), m_rangeMax);
|
||||||
m_macMaximumStatic->SetLabel(value);
|
m_macMaximumStatic->SetLabel(value);
|
||||||
}
|
}
|
||||||
SetValue(m_rangeMin);
|
SetValue(m_rangeMin);
|
||||||
@@ -283,9 +283,9 @@ wxSize wxSlider::DoGetBestSize() const
|
|||||||
int ht, wd;
|
int ht, wd;
|
||||||
|
|
||||||
// Get maximum text label width and height
|
// Get maximum text label width and height
|
||||||
text.Printf("%d", m_rangeMin);
|
text.Printf(wxT("%d"), m_rangeMin);
|
||||||
GetTextExtent(text, &textwidth, &textheight);
|
GetTextExtent(text, &textwidth, &textheight);
|
||||||
text.Printf("%d", m_rangeMax);
|
text.Printf(wxT("%d"), m_rangeMax);
|
||||||
GetTextExtent(text, &wd, &ht);
|
GetTextExtent(text, &wd, &ht);
|
||||||
if(ht > textheight) {
|
if(ht > textheight) {
|
||||||
textheight = ht;
|
textheight = ht;
|
||||||
@@ -356,9 +356,9 @@ void wxSlider::MacUpdateDimensions()
|
|||||||
int ht;
|
int ht;
|
||||||
|
|
||||||
// Get maximum text label width and height
|
// Get maximum text label width and height
|
||||||
text.Printf("%d", m_rangeMin);
|
text.Printf(wxT("%d"), m_rangeMin);
|
||||||
GetTextExtent(text, &minValWidth, &textheight);
|
GetTextExtent(text, &minValWidth, &textheight);
|
||||||
text.Printf("%d", m_rangeMax);
|
text.Printf(wxT("%d"), m_rangeMax);
|
||||||
GetTextExtent(text, &maxValWidth, &ht);
|
GetTextExtent(text, &maxValWidth, &ht);
|
||||||
if(ht > textheight) {
|
if(ht > textheight) {
|
||||||
textheight = ht;
|
textheight = ht;
|
||||||
|
@@ -47,12 +47,12 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100,
|
||||||
kControlLittleArrowsProc , (long) this ) ;
|
kControlLittleArrowsProc , (long) this ) ;
|
||||||
|
|
||||||
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ;
|
wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ;
|
||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ bool wxStaticLine::Create( wxWindow *parent,
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlSeparatorLineProc , (long) this ) ;
|
kControlSeparatorLineProc , (long) this ) ;
|
||||||
|
@@ -59,7 +59,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxString punct = " ,.-;:!?";
|
const wxString punct = wxT(" ,.-;:!?");
|
||||||
|
|
||||||
void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
||||||
{
|
{
|
||||||
@@ -68,7 +68,7 @@ void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
|||||||
if (paragraph.Length() == 0)
|
if (paragraph.Length() == 0)
|
||||||
{
|
{
|
||||||
// empty line
|
// empty line
|
||||||
dc.GetTextExtent( "H", &width, &height );
|
dc.GetTextExtent( wxT("H"), &width, &height );
|
||||||
y += height;
|
y += height;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -127,7 +127,7 @@ void wxStaticText::DrawParagraph(wxDC &dc, wxString paragraph, int &y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dc.DrawText( paragraph, pos , y) ;
|
dc.DrawText( paragraph, pos , y) ;
|
||||||
paragraph="";
|
paragraph=wxEmptyString;
|
||||||
y += height ;
|
y += height ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
if (text[i] == 13 || text[i] == 10)
|
if (text[i] == 13 || text[i] == 10)
|
||||||
{
|
{
|
||||||
DrawParagraph(dc, paragraph,y);
|
DrawParagraph(dc, paragraph,y);
|
||||||
paragraph = "" ;
|
paragraph = wxEmptyString ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -39,7 +39,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
|
|||||||
|
|
||||||
m_imageList = NULL;
|
m_imageList = NULL;
|
||||||
|
|
||||||
MacPreControlCreate( parent , id , "" , 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 = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
|
||||||
kControlTabSmallProc , (long) this ) ;
|
kControlTabSmallProc , (long) this ) ;
|
||||||
@@ -115,7 +115,7 @@ int wxTabCtrl::GetRowCount() const
|
|||||||
wxString wxTabCtrl::GetItemText(int item) const
|
wxString wxTabCtrl::GetItemText(int item) const
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return wxString("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the item image
|
// Get the item image
|
||||||
|
@@ -593,6 +593,7 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
|
|||||||
kTXNStartOffset,
|
kTXNStartOffset,
|
||||||
kTXNEndOffset);
|
kTXNEndOffset);
|
||||||
/* set the field's background */
|
/* set the field's background */
|
||||||
|
|
||||||
tback.bgType = kTXNBackgroundTypeRGB;
|
tback.bgType = kTXNBackgroundTypeRGB;
|
||||||
tback.bg.color = rgbWhite;
|
tback.bg.color = rgbWhite;
|
||||||
TXNSetBackground( varsp->fTXNRec, &tback);
|
TXNSetBackground( varsp->fTXNRec, &tback);
|
||||||
@@ -701,7 +702,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
mySize.y += 2 * m_macVerticalBorder ;
|
mySize.y += 2 * m_macVerticalBorder ;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
MacPreControlCreate( parent , id , "" , pos , mySize ,style, validator , name , &bounds , title ) ;
|
MacPreControlCreate( parent , id , wxEmptyString , pos , mySize ,style, validator , name , &bounds , title ) ;
|
||||||
|
|
||||||
if ( m_windowStyle & wxTE_MULTILINE )
|
if ( m_windowStyle & wxTE_MULTILINE )
|
||||||
{
|
{
|
||||||
@@ -738,16 +739,10 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
|
||||||
wxString value ;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
value = wxMacMakeMacStringFromPC( st ) ;
|
|
||||||
else
|
|
||||||
value = st ;
|
|
||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , strlen(text) , text ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -755,9 +750,15 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
/* set up locals */
|
/* set up locals */
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference((ControlHandle) m_macControl);
|
tpvars = (STPTextPaneVars **) GetControlReference((ControlHandle) m_macControl);
|
||||||
/* set the text in the record */
|
/* set the text in the record */
|
||||||
TXNSetData( (**tpvars).fTXNRec, kTXNTextData, (void*)value.c_str(), value.Length(),
|
|
||||||
kTXNStartOffset, kTXNEndOffset);
|
|
||||||
m_macTXN = (**tpvars).fTXNRec ;
|
m_macTXN = (**tpvars).fTXNRec ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN) , kTXNUnicodeTextData, (void*)st.wc_str(), st.Length() * 2,
|
||||||
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN) , kTXNTextData, (void*)text.data(), strlen( text ) ,
|
||||||
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#endif
|
||||||
m_macTXNvars = tpvars ;
|
m_macTXNvars = tpvars ;
|
||||||
m_macUsesTXN = true ;
|
m_macUsesTXN = true ;
|
||||||
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
||||||
@@ -777,23 +778,41 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
err = ::GetControlDataSize((ControlHandle) m_macControl, 0,
|
err = ::GetControlDataSize((ControlHandle) m_macControl, 0,
|
||||||
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag, &actualSize ) ;
|
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag, &actualSize ) ;
|
||||||
|
|
||||||
if ( err )
|
if ( err )
|
||||||
return wxEmptyString ;
|
return wxEmptyString ;
|
||||||
|
|
||||||
if ( actualSize > 0 )
|
if ( actualSize > 0 )
|
||||||
{
|
{
|
||||||
wxChar *ptr = result.GetWriteBuf(actualSize) ;
|
wxCharBuffer buf(actualSize) ;
|
||||||
|
|
||||||
::GetControlData( (ControlHandle) m_macControl, 0,
|
::GetControlData( (ControlHandle) m_macControl, 0,
|
||||||
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag,
|
( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag,
|
||||||
actualSize , ptr , &actualSize ) ;
|
actualSize , buf.data() , &actualSize ) ;
|
||||||
ptr[actualSize] = 0 ;
|
result = wxMacMakeStringFromCString( buf ) ;
|
||||||
result.UngetWriteBuf(actualSize) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
Handle theText ;
|
||||||
|
err = TXNGetDataEncoded( ((TXNObject) m_macTXN), kTXNStartOffset, kTXNEndOffset, &theText , kTXNUnicodeTextData );
|
||||||
|
// all done
|
||||||
|
if ( err )
|
||||||
|
{
|
||||||
|
actualSize = 0 ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
actualSize = GetHandleSize( theText ) ;
|
||||||
|
if ( actualSize > 0 )
|
||||||
|
{
|
||||||
|
wxChar *ptr = result.GetWriteBuf(actualSize*sizeof(wxChar)) ;
|
||||||
|
wxStrncpy( ptr , (wxChar*) *theText , actualSize ) ;
|
||||||
|
ptr[actualSize] = 0 ;
|
||||||
|
result.UngetWriteBuf( actualSize ) ;
|
||||||
|
}
|
||||||
|
DisposeHandle( theText ) ;
|
||||||
|
}
|
||||||
|
#else
|
||||||
Handle theText ;
|
Handle theText ;
|
||||||
err = TXNGetDataEncoded( ((TXNObject) m_macTXN), kTXNStartOffset, kTXNEndOffset, &theText , kTXNTextData );
|
err = TXNGetDataEncoded( ((TXNObject) m_macTXN), kTXNStartOffset, kTXNEndOffset, &theText , kTXNTextData );
|
||||||
// all done
|
// all done
|
||||||
@@ -804,18 +823,18 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
actualSize = GetHandleSize( theText ) ;
|
actualSize = GetHandleSize( theText ) ;
|
||||||
if ( actualSize > 0 )
|
if ( actualSize > 0 )
|
||||||
{
|
{
|
||||||
wxChar *ptr = result.GetWriteBuf(actualSize) ;
|
HLock( theText ) ;
|
||||||
strncpy( ptr , *theText , actualSize ) ;
|
result = wxMacMakeStringFromCString( *theText , actualSize ) ;
|
||||||
ptr[actualSize] = 0 ;
|
HUnlock( theText ) ;
|
||||||
result.UngetWriteBuf( actualSize ) ;
|
|
||||||
}
|
}
|
||||||
DisposeHandle( theText ) ;
|
DisposeHandle( theText ) ;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxMacMakeStringFromMacString( result ) ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::GetSelection(long* from, long* to) const
|
void wxTextCtrl::GetSelection(long* from, long* to) const
|
||||||
@@ -833,28 +852,24 @@ void wxTextCtrl::GetSelection(long* from, long* to) const
|
|||||||
|
|
||||||
void wxTextCtrl::SetValue(const wxString& st)
|
void wxTextCtrl::SetValue(const wxString& st)
|
||||||
{
|
{
|
||||||
wxString value;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
value = wxMacMakeMacStringFromPC( st ) ;
|
|
||||||
// value.Replace( "\n", "\r" ); TODO this should be handled by the conversion
|
|
||||||
}
|
|
||||||
else
|
|
||||||
value = st;
|
|
||||||
|
|
||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
::SetControlData((ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ;
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
::SetControlData( (ControlHandle) m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , strlen(text) , text ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool formerEditable = IsEditable() ;
|
bool formerEditable = IsEditable() ;
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
SetEditable(true) ;
|
SetEditable(true) ;
|
||||||
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)value.c_str(), value.Length(),
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNUnicodeTextData, (void*)st.wc_str(), st.Length() * 2 ,
|
||||||
kTXNStartOffset, kTXNEndOffset);
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)text.data(), strlen( text ) ,
|
||||||
|
kTXNStartOffset, kTXNEndOffset);
|
||||||
|
#endif
|
||||||
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
TXNSetSelection( (TXNObject) m_macTXN, 0, 0);
|
||||||
TXNShowSelection( (TXNObject) m_macTXN, kTXNShowStart);
|
TXNShowSelection( (TXNObject) m_macTXN, kTXNShowStart);
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
@@ -884,7 +899,7 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
|
|||||||
if ( style.HasFont() )
|
if ( style.HasFont() )
|
||||||
{
|
{
|
||||||
const wxFont &font = style.GetFont() ;
|
const wxFont &font = style.GetFont() ;
|
||||||
CopyCStringToPascal( font.GetFaceName().c_str() , fontName ) ;
|
wxMacStringToPascal( font.GetFaceName() , fontName ) ;
|
||||||
fontSize = font.GetPointSize() ;
|
fontSize = font.GetPointSize() ;
|
||||||
if ( font.GetUnderlined() )
|
if ( font.GetUnderlined() )
|
||||||
fontStyle |= underline ;
|
fontStyle |= underline ;
|
||||||
@@ -918,7 +933,7 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
|
|||||||
{
|
{
|
||||||
OSStatus status = TXNSetTypeAttributes ((TXNObject)m_macTXN, attrCounter , typeAttr,
|
OSStatus status = TXNSetTypeAttributes ((TXNObject)m_macTXN, attrCounter , typeAttr,
|
||||||
start,end);
|
start,end);
|
||||||
wxASSERT_MSG( status == noErr , "Couldn't set text attributes" ) ;
|
wxASSERT_MSG( status == noErr , wxT("Couldn't set text attributes") ) ;
|
||||||
}
|
}
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
SetEditable(formerEditable) ;
|
SetEditable(formerEditable) ;
|
||||||
@@ -1140,8 +1155,13 @@ void wxTextCtrl::Replace(long from, long to, const wxString& value)
|
|||||||
SetEditable(true) ;
|
SetEditable(true) ;
|
||||||
TXNSetSelection( ((TXNObject) m_macTXN) , from , to ) ;
|
TXNSetSelection( ((TXNObject) m_macTXN) , from , to ) ;
|
||||||
TXNClear( ((TXNObject) m_macTXN) ) ;
|
TXNClear( ((TXNObject) m_macTXN) ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNUnicodeTextData, (void*)value.wc_str(), value.Length() * 2 ,
|
||||||
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#else
|
||||||
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)value.c_str(), value.Length(),
|
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)value.c_str(), value.Length(),
|
||||||
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#endif
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
SetEditable( formerEditable ) ;
|
SetEditable( formerEditable ) ;
|
||||||
}
|
}
|
||||||
@@ -1208,20 +1228,12 @@ bool wxTextCtrl::LoadFile(const wxString& file)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::WriteText(const wxString& text)
|
void wxTextCtrl::WriteText(const wxString& st)
|
||||||
{
|
{
|
||||||
wxString value ;
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
{
|
|
||||||
value = wxMacMakeMacStringFromPC( text ) ;
|
|
||||||
// value.Replace( "\n", "\r" ); // TODO this should be handled by the conversion
|
|
||||||
}
|
|
||||||
else
|
|
||||||
value = text ;
|
|
||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
TEInsert( value , value.Length() , ((TEHandle) m_macTE) ) ;
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TEInsert( text , strlen(text) , ((TEHandle) m_macTE) ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1230,8 +1242,14 @@ void wxTextCtrl::WriteText(const wxString& text)
|
|||||||
SetEditable(true) ;
|
SetEditable(true) ;
|
||||||
long start , end , dummy ;
|
long start , end , dummy ;
|
||||||
GetSelection( &start , &dummy ) ;
|
GetSelection( &start , &dummy ) ;
|
||||||
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*) (const char*)value, value.Length(),
|
#if wxUSE_UNICODE
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNUnicodeTextData, (void*)st.wc_str(), st.Length() * 2 ,
|
||||||
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( st ) ;
|
||||||
|
TXNSetData( ((TXNObject) m_macTXN), kTXNTextData, (void*)text.data(), strlen( text ) ,
|
||||||
|
kTXNUseCurrentSelection, kTXNUseCurrentSelection);
|
||||||
|
#endif
|
||||||
GetSelection( &dummy , &end ) ;
|
GetSelection( &dummy , &end ) ;
|
||||||
SetStyle( start , end , GetDefaultStyle() ) ;
|
SetStyle( start , end , GetDefaultStyle() ) ;
|
||||||
if ( !formerEditable )
|
if ( !formerEditable )
|
||||||
@@ -1415,7 +1433,7 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
|
|||||||
if (count == lineNo)
|
if (count == lineNo)
|
||||||
{
|
{
|
||||||
// Add chars in line then
|
// Add chars in line then
|
||||||
wxString tmp("");
|
wxString tmp;
|
||||||
|
|
||||||
for (size_t j = i; j < content.Length(); j++)
|
for (size_t j = i; j < content.Length(); j++)
|
||||||
{
|
{
|
||||||
@@ -1429,7 +1447,7 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
|
|||||||
}
|
}
|
||||||
if (content[i] == '\r') count++;
|
if (content[i] == '\r') count++;
|
||||||
}
|
}
|
||||||
return "" ;
|
return wxEmptyString ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -852,7 +852,7 @@ bool wxThreadModule::OnInit()
|
|||||||
#endif
|
#endif
|
||||||
if ( !hasThreadManager )
|
if ( !hasThreadManager )
|
||||||
{
|
{
|
||||||
wxMessageBox( "Error" , "Thread Support is not available on this System" , wxOK ) ;
|
wxMessageBox( wxT("Error") , wxT("Thread Support is not available on this System") , wxOK ) ;
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -255,7 +255,7 @@ bool wxToolBar::Realize()
|
|||||||
::SetControlFontStyle( m_macToolHandle , &controlstyle ) ;
|
::SetControlFontStyle( m_macToolHandle , &controlstyle ) ;
|
||||||
*/
|
*/
|
||||||
ControlHandle container = (ControlHandle) GetParent()->MacGetContainerForEmbedding() ;
|
ControlHandle container = (ControlHandle) GetParent()->MacGetContainerForEmbedding() ;
|
||||||
wxASSERT_MSG( container != NULL , "No valid mac container control" ) ;
|
wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
|
||||||
::EmbedControl( m_macToolHandle , container ) ;
|
::EmbedControl( m_macToolHandle , container ) ;
|
||||||
|
|
||||||
if ( GetWindowStyleFlag() & wxTB_VERTICAL )
|
if ( GetWindowStyleFlag() & wxTB_VERTICAL )
|
||||||
@@ -507,7 +507,7 @@ wxString wxToolBar::MacGetToolTipString( wxPoint &pt )
|
|||||||
{
|
{
|
||||||
return tool->GetShortHelp() ;
|
return tool->GetShortHelp() ;
|
||||||
}
|
}
|
||||||
return "" ;
|
return wxEmptyString ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
|
void wxToolBar::DoEnableTool(wxToolBarToolBase *t, bool enable)
|
||||||
|
@@ -35,7 +35,7 @@ class wxMacToolTip
|
|||||||
wxMacToolTip( ) ;
|
wxMacToolTip( ) ;
|
||||||
~wxMacToolTip() ;
|
~wxMacToolTip() ;
|
||||||
|
|
||||||
void Setup( WindowRef window , wxString text , wxPoint localPosition ) ;
|
void Setup( WindowRef window , const wxString& text , wxPoint localPosition ) ;
|
||||||
long GetMark() { return m_mark ; }
|
long GetMark() { return m_mark ; }
|
||||||
void Draw() ;
|
void Draw() ;
|
||||||
void Clear() ;
|
void Clear() ;
|
||||||
@@ -50,8 +50,8 @@ class wxMacToolTip
|
|||||||
bool m_shown ;
|
bool m_shown ;
|
||||||
long m_mark ;
|
long m_mark ;
|
||||||
wxMacToolTipTimer* m_timer ;
|
wxMacToolTipTimer* m_timer ;
|
||||||
#ifdef TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef m_helpTextRef ;
|
wxMacCFStringHolder m_helpTextRef ;
|
||||||
#endif
|
#endif
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -186,18 +186,14 @@ wxMacToolTip::wxMacToolTip()
|
|||||||
m_mark = 0 ;
|
m_mark = 0 ;
|
||||||
m_shown = false ;
|
m_shown = false ;
|
||||||
m_timer = NULL ;
|
m_timer = NULL ;
|
||||||
m_helpTextRef = NULL ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacToolTip::Setup( WindowRef win , wxString text , wxPoint localPosition )
|
void wxMacToolTip::Setup( WindowRef win , const wxString& text , wxPoint localPosition )
|
||||||
{
|
{
|
||||||
m_mark++ ;
|
m_mark++ ;
|
||||||
Clear() ;
|
Clear() ;
|
||||||
m_position = localPosition ;
|
m_position = localPosition ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
m_label = text ;
|
||||||
m_label = wxMacMakeMacStringFromPC( text ) ;
|
|
||||||
else
|
|
||||||
m_label = text ;
|
|
||||||
m_window =win;
|
m_window =win;
|
||||||
s_ToolTipWindowRef = m_window ;
|
s_ToolTipWindowRef = m_window ;
|
||||||
m_backpict = NULL ;
|
m_backpict = NULL ;
|
||||||
@@ -228,209 +224,147 @@ void wxMacToolTip::Draw()
|
|||||||
{
|
{
|
||||||
m_shown = true ;
|
m_shown = true ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( HMDisplayTag != (void*) kUnresolvedCFragSymbolAddress )
|
HMHelpContentRec tag ;
|
||||||
|
tag.version = kMacHelpVersion;
|
||||||
|
SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ;
|
||||||
|
GrafPtr port ;
|
||||||
|
GetPort( &port ) ;
|
||||||
|
SetPortWindowPort(m_window) ;
|
||||||
|
LocalToGlobal( (Point *) &tag.absHotRect.top );
|
||||||
|
LocalToGlobal( (Point *) &tag.absHotRect.bottom );
|
||||||
|
SetPort( port );
|
||||||
|
m_helpTextRef = m_label ;
|
||||||
|
tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
|
||||||
|
tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
|
||||||
|
tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ;
|
||||||
|
tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ;
|
||||||
|
tag.tagSide = kHMDefaultSide;
|
||||||
|
HMDisplayTag( &tag );
|
||||||
|
#else
|
||||||
|
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
||||||
|
FontFamilyID fontId ;
|
||||||
|
Str255 fontName ;
|
||||||
|
SInt16 fontSize ;
|
||||||
|
Style fontStyle ;
|
||||||
|
GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
||||||
|
GetFNum( fontName, &fontId );
|
||||||
|
|
||||||
|
TextFont( fontId ) ;
|
||||||
|
TextSize( fontSize ) ;
|
||||||
|
TextFace( fontStyle ) ;
|
||||||
|
FontInfo fontInfo;
|
||||||
|
::GetFontInfo(&fontInfo);
|
||||||
|
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
||||||
|
short height = 0 ;
|
||||||
|
// short width = TextWidth( m_label , 0 ,m_label.Length() ) ;
|
||||||
|
|
||||||
|
int i = 0 ;
|
||||||
|
int length = m_label.Length() ;
|
||||||
|
int width = 0 ;
|
||||||
|
int thiswidth = 0 ;
|
||||||
|
int laststop = 0 ;
|
||||||
|
wxCharBuffer text = wxMacStringToCString( m_label ) ;
|
||||||
|
|
||||||
|
while( i < length )
|
||||||
{
|
{
|
||||||
HMHelpContentRec tag ;
|
if( text[i] == 13 || text[i] == 10)
|
||||||
tag.version = kMacHelpVersion;
|
|
||||||
SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ;
|
|
||||||
GrafPtr port ;
|
|
||||||
GetPort( &port ) ;
|
|
||||||
SetPortWindowPort(m_window) ;
|
|
||||||
LocalToGlobal( (Point *) &tag.absHotRect.top );
|
|
||||||
LocalToGlobal( (Point *) &tag.absHotRect.bottom );
|
|
||||||
SetPort( port );
|
|
||||||
if( m_helpTextRef )
|
|
||||||
{
|
|
||||||
CFRelease( m_helpTextRef ) ;
|
|
||||||
m_helpTextRef = NULL ;
|
|
||||||
}
|
|
||||||
m_helpTextRef = wxMacCreateCFString(m_label) ;
|
|
||||||
tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
|
|
||||||
tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
|
|
||||||
tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ;
|
|
||||||
tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ;
|
|
||||||
tag.tagSide = kHMDefaultSide;
|
|
||||||
HMDisplayTag( &tag );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
|
||||||
#if TARGET_CARBON
|
|
||||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FontFamilyID fontId ;
|
|
||||||
Str255 fontName ;
|
|
||||||
SInt16 fontSize ;
|
|
||||||
Style fontStyle ;
|
|
||||||
GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
|
|
||||||
GetFNum( fontName, &fontId );
|
|
||||||
|
|
||||||
TextFont( fontId ) ;
|
|
||||||
TextSize( fontSize ) ;
|
|
||||||
TextFace( fontStyle ) ;
|
|
||||||
FontInfo fontInfo;
|
|
||||||
::GetFontInfo(&fontInfo);
|
|
||||||
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
|
||||||
short height = 0 ;
|
|
||||||
// short width = TextWidth( m_label , 0 ,m_label.Length() ) ;
|
|
||||||
|
|
||||||
int i = 0 ;
|
|
||||||
int length = m_label.Length() ;
|
|
||||||
int width = 0 ;
|
|
||||||
int thiswidth = 0 ;
|
|
||||||
int laststop = 0 ;
|
|
||||||
const char *text = m_label ;
|
|
||||||
while( i < length )
|
|
||||||
{
|
|
||||||
if( text[i] == 13 || text[i] == 10)
|
|
||||||
{
|
|
||||||
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
|
||||||
if ( thiswidth > width )
|
|
||||||
width = thiswidth ;
|
|
||||||
|
|
||||||
height += lineh ;
|
|
||||||
laststop = i+1 ;
|
|
||||||
}
|
|
||||||
i++ ;
|
|
||||||
}
|
|
||||||
if ( i - laststop > 0 )
|
|
||||||
{
|
{
|
||||||
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
||||||
if ( thiswidth > width )
|
if ( thiswidth > width )
|
||||||
width = thiswidth ;
|
width = thiswidth ;
|
||||||
|
|
||||||
height += lineh ;
|
height += lineh ;
|
||||||
|
laststop = i+1 ;
|
||||||
}
|
}
|
||||||
|
i++ ;
|
||||||
|
}
|
||||||
m_rect.left = m_position.x + kTipOffset;
|
if ( i - laststop > 0 )
|
||||||
m_rect.top = m_position.y + kTipOffset;
|
{
|
||||||
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
thiswidth = ::TextWidth( text , laststop , i - laststop ) ;
|
||||||
#if TARGET_CARBON
|
if ( thiswidth > width )
|
||||||
if ( useDrawThemeText )
|
width = thiswidth ;
|
||||||
m_rect.right += kTipBorder ;
|
height += lineh ;
|
||||||
#endif
|
}
|
||||||
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
|
||||||
Rect r ;
|
m_rect.left = m_position.x + kTipOffset;
|
||||||
GetPortBounds( GetWindowPort( m_window ) , &r ) ;
|
m_rect.top = m_position.y + kTipOffset;
|
||||||
if ( m_rect.top < 0 )
|
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
||||||
{
|
|
||||||
m_rect.bottom += -m_rect.top ;
|
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
||||||
m_rect.top = 0 ;
|
Rect r ;
|
||||||
}
|
GetPortBounds( GetWindowPort( m_window ) , &r ) ;
|
||||||
if ( m_rect.left < 0 )
|
if ( m_rect.top < 0 )
|
||||||
{
|
{
|
||||||
m_rect.right += -m_rect.left ;
|
m_rect.bottom += -m_rect.top ;
|
||||||
m_rect.left = 0 ;
|
m_rect.top = 0 ;
|
||||||
}
|
}
|
||||||
if ( m_rect.right > r.right )
|
if ( m_rect.left < 0 )
|
||||||
{
|
{
|
||||||
m_rect.left -= (m_rect.right - r.right ) ;
|
m_rect.right += -m_rect.left ;
|
||||||
m_rect.right = r.right ;
|
m_rect.left = 0 ;
|
||||||
}
|
}
|
||||||
if ( m_rect.bottom > r.bottom )
|
if ( m_rect.right > r.right )
|
||||||
{
|
{
|
||||||
m_rect.top -= (m_rect.bottom - r.bottom) ;
|
m_rect.left -= (m_rect.right - r.right ) ;
|
||||||
m_rect.bottom = r.bottom ;
|
m_rect.right = r.right ;
|
||||||
}
|
}
|
||||||
ClipRect( &m_rect ) ;
|
if ( m_rect.bottom > r.bottom )
|
||||||
BackColor( whiteColor ) ;
|
{
|
||||||
ForeColor(blackColor ) ;
|
m_rect.top -= (m_rect.bottom - r.bottom) ;
|
||||||
GWorldPtr port ;
|
m_rect.bottom = r.bottom ;
|
||||||
NewGWorld( &port , wxDisplayDepth() , &m_rect , NULL , NULL , 0 ) ;
|
}
|
||||||
CGrafPtr origPort ;
|
ClipRect( &m_rect ) ;
|
||||||
GDHandle origDevice ;
|
BackColor( whiteColor ) ;
|
||||||
|
ForeColor(blackColor ) ;
|
||||||
GetGWorld( &origPort , &origDevice ) ;
|
GWorldPtr port ;
|
||||||
SetGWorld( port , NULL ) ;
|
NewGWorld( &port , wxDisplayDepth() , &m_rect , NULL , NULL , 0 ) ;
|
||||||
|
CGrafPtr origPort ;
|
||||||
m_backpict = OpenPicture(&m_rect);
|
GDHandle origDevice ;
|
||||||
|
|
||||||
CopyBits(GetPortBitMapForCopyBits(GetWindowPort(m_window)),
|
GetGWorld( &origPort , &origDevice ) ;
|
||||||
GetPortBitMapForCopyBits(port),
|
SetGWorld( port , NULL ) ;
|
||||||
&m_rect,
|
|
||||||
&m_rect,
|
m_backpict = OpenPicture(&m_rect);
|
||||||
srcCopy,
|
|
||||||
NULL);
|
CopyBits(GetPortBitMapForCopyBits(GetWindowPort(m_window)),
|
||||||
ClosePicture();
|
GetPortBitMapForCopyBits(port),
|
||||||
SetGWorld( origPort , origDevice ) ;
|
&m_rect,
|
||||||
DisposeGWorld( port ) ;
|
&m_rect,
|
||||||
PenNormal() ;
|
srcCopy,
|
||||||
|
NULL);
|
||||||
RGBColor tooltipbackground = { 0xFFFF , 0xFFFF , 0xC000 } ;
|
ClosePicture();
|
||||||
BackColor( whiteColor ) ;
|
SetGWorld( origPort , origDevice ) ;
|
||||||
RGBForeColor( &tooltipbackground ) ;
|
DisposeGWorld( port ) ;
|
||||||
|
PenNormal() ;
|
||||||
PaintRect( &m_rect ) ;
|
|
||||||
ForeColor(blackColor ) ;
|
RGBColor tooltipbackground = { 0xFFFF , 0xFFFF , 0xC000 } ;
|
||||||
FrameRect( &m_rect ) ;
|
BackColor( whiteColor ) ;
|
||||||
SetThemeTextColor(kThemeTextColorNotification,wxDisplayDepth(),true) ;
|
RGBForeColor( &tooltipbackground ) ;
|
||||||
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder);
|
|
||||||
|
PaintRect( &m_rect ) ;
|
||||||
i = 0 ;
|
ForeColor(blackColor ) ;
|
||||||
laststop = 0 ;
|
FrameRect( &m_rect ) ;
|
||||||
height = 0 ;
|
SetThemeTextColor(kThemeTextColorNotification,wxDisplayDepth(),true) ;
|
||||||
|
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder);
|
||||||
while( i < length )
|
|
||||||
{
|
i = 0 ;
|
||||||
if( text[i] == 13 || text[i] == 10)
|
laststop = 0 ;
|
||||||
{
|
height = 0 ;
|
||||||
#if TARGET_CARBON
|
|
||||||
if ( useDrawThemeText )
|
while( i < length )
|
||||||
{
|
{
|
||||||
Rect frame ;
|
if( text[i] == 13 || text[i] == 10)
|
||||||
frame.top = m_rect.top + kTipBorder + height ;
|
|
||||||
frame.left = m_rect.left + kTipBorder ;
|
|
||||||
frame.bottom = frame.top + 1000 ;
|
|
||||||
frame.right = frame.left + 1000 ;
|
|
||||||
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
|
|
||||||
::DrawThemeTextBox( mString,
|
|
||||||
kThemeCurrentPortFont,
|
|
||||||
kThemeStateActive,
|
|
||||||
true,
|
|
||||||
&frame,
|
|
||||||
teJustLeft,
|
|
||||||
nil );
|
|
||||||
CFRelease( mString ) ;
|
|
||||||
height += lineh ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
|
||||||
height += lineh ;
|
|
||||||
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder + height );
|
|
||||||
}
|
|
||||||
laststop = i+1 ;
|
|
||||||
}
|
|
||||||
i++ ;
|
|
||||||
}
|
|
||||||
#if TARGET_CARBON
|
|
||||||
if ( useDrawThemeText )
|
|
||||||
{
|
|
||||||
Rect frame ;
|
|
||||||
frame.top = m_rect.top + kTipBorder + height ;
|
|
||||||
frame.left = m_rect.left + kTipBorder ;
|
|
||||||
frame.bottom = frame.top + 1000 ;
|
|
||||||
frame.right = frame.left + 1000 ;
|
|
||||||
CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ;
|
|
||||||
::DrawThemeTextBox( mString,
|
|
||||||
kThemeCurrentPortFont,
|
|
||||||
kThemeStateActive,
|
|
||||||
true,
|
|
||||||
&frame,
|
|
||||||
teJustLeft,
|
|
||||||
nil );
|
|
||||||
CFRelease( mString ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
|
height += lineh ;
|
||||||
|
::MoveTo( m_rect.left + kTipBorder , m_rect.top + fontInfo.ascent + kTipBorder + height );
|
||||||
|
laststop = i+1 ;
|
||||||
}
|
}
|
||||||
::TextMode( srcOr ) ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
|
::TextMode( srcOr ) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,11 +388,7 @@ void wxMacToolTip::Clear()
|
|||||||
return ;
|
return ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
HMHideTag() ;
|
HMHideTag() ;
|
||||||
if( m_helpTextRef )
|
m_helpTextRef.Release() ;
|
||||||
{
|
|
||||||
CFRelease( m_helpTextRef ) ;
|
|
||||||
m_helpTextRef = NULL ;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if ( m_window == s_ToolTipWindowRef && m_backpict )
|
if ( m_window == s_ToolTipWindowRef && m_backpict )
|
||||||
{
|
{
|
||||||
|
@@ -362,7 +362,7 @@ void wxAssociateWinWithMacWindow(WXWindow 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
|
||||||
wxCHECK_RET( inWindowRef != (WindowRef) NULL, "attempt to add a NULL WindowRef to window list" );
|
wxCHECK_RET( inWindowRef != (WindowRef) NULL, wxT("attempt to add a NULL WindowRef to window list") );
|
||||||
|
|
||||||
if ( !wxWinMacWindowList->Find((long)inWindowRef) )
|
if ( !wxWinMacWindowList->Find((long)inWindowRef) )
|
||||||
wxWinMacWindowList->Append((long)inWindowRef, win);
|
wxWinMacWindowList->Append((long)inWindowRef, win);
|
||||||
@@ -592,12 +592,7 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
|
|||||||
|
|
||||||
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
|
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
|
||||||
wxAssociateWinWithMacWindow( m_macWindow , this ) ;
|
wxAssociateWinWithMacWindow( m_macWindow , this ) ;
|
||||||
wxString label ;
|
UMASetWTitle( (WindowRef)m_macWindow , title ) ;
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
label = wxMacMakeMacStringFromPC( title ) ;
|
|
||||||
else
|
|
||||||
label = title ;
|
|
||||||
UMASetWTitleC( (WindowRef)m_macWindow , label ) ;
|
|
||||||
::CreateRootControl( (WindowRef)m_macWindow , (ControlHandle*)&m_macRootControl ) ;
|
::CreateRootControl( (WindowRef)m_macWindow , (ControlHandle*)&m_macRootControl ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;
|
InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;
|
||||||
@@ -836,15 +831,7 @@ void wxTopLevelWindowMac::MacKeyDown( WXEVENTREF ev )
|
|||||||
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
||||||
{
|
{
|
||||||
wxWindow::SetTitle( title ) ;
|
wxWindow::SetTitle( title ) ;
|
||||||
|
UMASetWTitle( (WindowRef)m_macWindow , title ) ;
|
||||||
wxString label ;
|
|
||||||
|
|
||||||
if( wxApp::s_macDefaultEncodingIsPC )
|
|
||||||
label = wxMacMakeMacStringFromPC( m_label ) ;
|
|
||||||
else
|
|
||||||
label = m_label ;
|
|
||||||
|
|
||||||
UMASetWTitleC( (WindowRef)m_macWindow , label ) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTopLevelWindowMac::Show(bool show)
|
bool wxTopLevelWindowMac::Show(bool show)
|
||||||
|
@@ -189,10 +189,8 @@ MenuRef UMANewMenu( SInt16 id , const wxString& title )
|
|||||||
wxString str = wxStripMenuCodes( title ) ;
|
wxString str = wxStripMenuCodes( title ) ;
|
||||||
MenuRef menu ;
|
MenuRef menu ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef cfs = wxMacCreateCFString( str ) ;
|
|
||||||
CreateNewMenu( id , 0 , &menu ) ;
|
CreateNewMenu( id , 0 , &menu ) ;
|
||||||
SetMenuTitleWithCFString( menu , cfs ) ;
|
SetMenuTitleWithCFString( menu , wxMacCFStringHolder(str) ) ;
|
||||||
CFRelease( cfs ) ;
|
|
||||||
#else
|
#else
|
||||||
Str255 ptitle ;
|
Str255 ptitle ;
|
||||||
wxMacStringToPascal( str , ptitle ) ;
|
wxMacStringToPascal( str , ptitle ) ;
|
||||||
@@ -205,9 +203,7 @@ void UMASetMenuTitle( MenuRef menu , const wxString& title )
|
|||||||
{
|
{
|
||||||
wxString str = wxStripMenuCodes( title ) ;
|
wxString str = wxStripMenuCodes( title ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef cfs = wxMacCreateCFString( str ) ;
|
SetMenuTitleWithCFString( menu , wxMacCFStringHolder(str) ) ;
|
||||||
SetMenuTitleWithCFString( menu , cfs ) ;
|
|
||||||
CFRelease( cfs ) ;
|
|
||||||
#else
|
#else
|
||||||
Str255 ptitle ;
|
Str255 ptitle ;
|
||||||
wxMacStringToPascal( str , ptitle ) ;
|
wxMacStringToPascal( str , ptitle ) ;
|
||||||
@@ -219,9 +215,7 @@ void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& tit
|
|||||||
{
|
{
|
||||||
wxString str = wxStripMenuCodes( title ) ;
|
wxString str = wxStripMenuCodes( title ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
CFStringRef cfs = wxMacCreateCFString( str ) ;
|
SetMenuItemTextWithCFString( menu , item , wxMacCFStringHolder(str) ) ;
|
||||||
SetMenuItemTextWithCFString( menu , item , cfs ) ;
|
|
||||||
CFRelease( cfs ) ;
|
|
||||||
#else
|
#else
|
||||||
Str255 ptitle ;
|
Str255 ptitle ;
|
||||||
wxMacStringToPascal( str , ptitle ) ;
|
wxMacStringToPascal( str , ptitle ) ;
|
||||||
@@ -558,17 +552,15 @@ void UMADisposeWindow( WindowRef inWindowRef )
|
|||||||
DisposeWindow( inWindowRef ) ;
|
DisposeWindow( inWindowRef ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMASetWTitleC( WindowRef inWindowRef , const char *title )
|
void UMASetWTitle( WindowRef inWindowRef , const wxString& title )
|
||||||
{
|
{
|
||||||
Str255 ptitle ;
|
|
||||||
strncpy( (char*)ptitle , title , 96 ) ;
|
|
||||||
ptitle[96] = 0 ;
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
c2pstrcpy( ptitle, (char *)ptitle ) ;
|
SetWindowTitleWithCFString( inWindowRef , wxMacCFStringHolder(title) ) ;
|
||||||
#else
|
#else
|
||||||
c2pstr( (char*)ptitle ) ;
|
Str255 ptitle ;
|
||||||
#endif
|
wxMacStringToPascal( title , ptitle ) ;
|
||||||
SetWTitle( inWindowRef , ptitle ) ;
|
SetWTitle( inWindowRef , ptitle ) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMAGetWTitleC( WindowRef inWindowRef , char *title )
|
void UMAGetWTitleC( WindowRef inWindowRef , char *title )
|
||||||
@@ -583,6 +575,17 @@ void UMAGetWTitleC( WindowRef inWindowRef , char *title )
|
|||||||
|
|
||||||
// appearance additions
|
// appearance additions
|
||||||
|
|
||||||
|
void UMASetControlTitle( ControlHandle inControl , const wxString& title )
|
||||||
|
{
|
||||||
|
#if TARGET_CARBON
|
||||||
|
SetControlTitleWithCFString( inControl , wxMacCFStringHolder(title) ) ;
|
||||||
|
#else
|
||||||
|
Str255 ptitle ;
|
||||||
|
wxMacStringToPascal( title , ptitle ) ;
|
||||||
|
SetControlTitle( inControl , ptitle ) ;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void UMAActivateControl( ControlHandle inControl )
|
void UMAActivateControl( ControlHandle inControl )
|
||||||
{
|
{
|
||||||
// we have to add the control after again to the update rgn
|
// we have to add the control after again to the update rgn
|
||||||
@@ -795,7 +798,7 @@ void wxMacPortStateHelper::Setup( GrafPtr newport )
|
|||||||
{
|
{
|
||||||
GetPort( &m_oldPort ) ;
|
GetPort( &m_oldPort ) ;
|
||||||
SetPort( newport ) ;
|
SetPort( newport ) ;
|
||||||
wxASSERT_MSG( m_clip == NULL , "Cannot call setup twice" ) ;
|
wxASSERT_MSG( m_clip == NULL , wxT("Cannot call setup twice") ) ;
|
||||||
m_clip = NewRgn() ;
|
m_clip = NewRgn() ;
|
||||||
GetClip( m_clip );
|
GetClip( m_clip );
|
||||||
m_textFont = GetPortTextFont( (CGrafPtr) newport);
|
m_textFont = GetPortTextFont( (CGrafPtr) newport);
|
||||||
|
@@ -38,6 +38,10 @@
|
|||||||
#include <Sound.h>
|
#include <Sound.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "ATSUnicode.h"
|
||||||
|
#include "TextCommon.h"
|
||||||
|
#include "TextEncodingConverter.h"
|
||||||
|
|
||||||
#ifndef __DARWIN__
|
#ifndef __DARWIN__
|
||||||
// defined in unix/utilsunx.cpp for Mac OS X
|
// defined in unix/utilsunx.cpp for Mac OS X
|
||||||
|
|
||||||
@@ -48,7 +52,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get hostname only (without domain name)
|
// Get hostname only (without domain name)
|
||||||
bool wxGetHostName(char *buf, int maxSize)
|
bool wxGetHostName(wxChar *buf, int maxSize)
|
||||||
{
|
{
|
||||||
// Gets Chooser name of user by examining a System resource.
|
// Gets Chooser name of user by examining a System resource.
|
||||||
|
|
||||||
@@ -61,13 +65,11 @@ bool wxGetHostName(char *buf, int maxSize)
|
|||||||
|
|
||||||
if (chooserName && *chooserName)
|
if (chooserName && *chooserName)
|
||||||
{
|
{
|
||||||
int length = (*chooserName)[0] ;
|
HLock( (Handle) chooserName ) ;
|
||||||
if ( length + 1 > maxSize )
|
wxString name = wxMacMakeStringFromPascal( *chooserName ) ;
|
||||||
{
|
HUnlock( (Handle) chooserName ) ;
|
||||||
length = maxSize - 1 ;
|
ReleaseResource( (Handle) chooserName ) ;
|
||||||
}
|
wxStrncpy( buf , name , maxSize - 1 ) ;
|
||||||
strncpy( buf , (char*) &(*chooserName)[1] , length ) ;
|
|
||||||
buf[length] = 0 ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
buf[0] = 0 ;
|
buf[0] = 0 ;
|
||||||
@@ -76,7 +78,7 @@ bool wxGetHostName(char *buf, int maxSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get user ID e.g. jacs
|
// Get user ID e.g. jacs
|
||||||
bool wxGetUserId(char *buf, int maxSize)
|
bool wxGetUserId(wxChar *buf, int maxSize)
|
||||||
{
|
{
|
||||||
return wxGetUserName( buf , maxSize ) ;
|
return wxGetUserName( buf , maxSize ) ;
|
||||||
}
|
}
|
||||||
@@ -88,7 +90,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get user name e.g. Stefan Csomor
|
// Get user name e.g. Stefan Csomor
|
||||||
bool wxGetUserName(char *buf, int maxSize)
|
bool wxGetUserName(wxChar *buf, int maxSize)
|
||||||
{
|
{
|
||||||
// Gets Chooser name of user by examining a System resource.
|
// Gets Chooser name of user by examining a System resource.
|
||||||
|
|
||||||
@@ -101,13 +103,11 @@ bool wxGetUserName(char *buf, int maxSize)
|
|||||||
|
|
||||||
if (chooserName && *chooserName)
|
if (chooserName && *chooserName)
|
||||||
{
|
{
|
||||||
int length = (*chooserName)[0] ;
|
HLock( (Handle) chooserName ) ;
|
||||||
if ( length + 1 > maxSize )
|
wxString name = wxMacMakeStringFromPascal( *chooserName ) ;
|
||||||
{
|
HUnlock( (Handle) chooserName ) ;
|
||||||
length = maxSize - 1 ;
|
ReleaseResource( (Handle) chooserName ) ;
|
||||||
}
|
wxStrncpy( buf , name , maxSize - 1 ) ;
|
||||||
strncpy( buf , (char*) &(*chooserName)[1] , length ) ;
|
|
||||||
buf[length] = 0 ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
buf[0] = 0 ;
|
buf[0] = 0 ;
|
||||||
@@ -250,22 +250,25 @@ bool wxWriteResource(const wxString& section, const wxString& entry, const wxStr
|
|||||||
|
|
||||||
bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file)
|
bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file)
|
||||||
{
|
{
|
||||||
char buf[50];
|
wxString buf;
|
||||||
sprintf(buf, "%.4f", value);
|
buf.Printf(wxT("%.4f"), value);
|
||||||
|
|
||||||
return wxWriteResource(section, entry, buf, file);
|
return wxWriteResource(section, entry, buf, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file)
|
bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file)
|
||||||
{
|
{
|
||||||
char buf[50];
|
wxString buf;
|
||||||
sprintf(buf, "%ld", value);
|
buf.Printf(wxT("%ld"), value);
|
||||||
|
|
||||||
return wxWriteResource(section, entry, buf, file);
|
return wxWriteResource(section, entry, buf, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file)
|
bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file)
|
||||||
{
|
{
|
||||||
char buf[50];
|
wxString buf;
|
||||||
sprintf(buf, "%d", value);
|
buf.Printf(wxT("%d"), value);
|
||||||
|
|
||||||
return wxWriteResource(section, entry, buf, file);
|
return wxWriteResource(section, entry, buf, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +372,7 @@ wxString wxMacFindFolder( short vol,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __DARWIN__
|
#ifndef __DARWIN__
|
||||||
char *wxGetUserHome (const wxString& user)
|
wxChar *wxGetUserHome (const wxString& user)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -390,7 +393,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
p = p.Mid(1,pos) ;
|
p = p.Mid(1,pos) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = p + ":" ;
|
p = p + wxT(":") ;
|
||||||
|
|
||||||
Str255 volumeName ;
|
Str255 volumeName ;
|
||||||
XVolumeParam pb ;
|
XVolumeParam pb ;
|
||||||
@@ -501,7 +504,7 @@ wxString wxGetOsDescription()
|
|||||||
// use configure generated description if available
|
// use configure generated description if available
|
||||||
return wxString("MacOS (") + WXWIN_OS_DESCRIPTION + wxString(")");
|
return wxString("MacOS (") + WXWIN_OS_DESCRIPTION + wxString(")");
|
||||||
#else
|
#else
|
||||||
return "MacOS" ; //TODO:define further
|
return wxT("MacOS") ; //TODO:define further
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,10 +596,185 @@ void wxMacConvertToPC( const char *from , char *to , int len )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxMacMakeMacStringFromPC( const char * p )
|
TECObjectRef s_TECNativeCToUnicode = NULL ;
|
||||||
|
TECObjectRef s_TECUnicodeToNativeC = NULL ;
|
||||||
|
TECObjectRef s_TECPCToNativeC = NULL ;
|
||||||
|
TECObjectRef s_TECNativeCToPC = NULL ;
|
||||||
|
void wxMacSetupConverters()
|
||||||
|
{
|
||||||
|
// if we assume errors are happening here we need low level debugging since the high level assert will use the encoders that
|
||||||
|
// are not yet setup...
|
||||||
|
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
status = TECCreateConverter(&s_TECNativeCToUnicode,
|
||||||
|
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||||
|
|
||||||
|
|
||||||
|
status = TECCreateConverter(&s_TECUnicodeToNativeC,
|
||||||
|
kTextEncodingUnicodeDefault, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||||
|
|
||||||
|
if ( !wxApp::s_macDefaultEncodingIsPC )
|
||||||
|
{
|
||||||
|
status = TECCreateConverter(&s_TECPCToNativeC,
|
||||||
|
kTextEncodingWindowsLatin1, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||||
|
|
||||||
|
|
||||||
|
status = TECCreateConverter(&s_TECNativeCToPC,
|
||||||
|
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman , kTextEncodingWindowsLatin1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxMacCleanupConverters()
|
||||||
|
{
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
status = TECDisposeConverter(s_TECNativeCToUnicode);
|
||||||
|
|
||||||
|
status = TECDisposeConverter(s_TECUnicodeToNativeC);
|
||||||
|
|
||||||
|
status = TECDisposeConverter(s_TECPCToNativeC);
|
||||||
|
|
||||||
|
status = TECDisposeConverter(s_TECNativeCToPC);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxWCharBuffer wxMacStringToWString( const wxString &from )
|
||||||
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxWCharBuffer result( from.wc_str() ) ;
|
||||||
|
#else
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = from.Length() ;
|
||||||
|
ByteCount byteBufferLen = byteInLen *2 ;
|
||||||
|
wxWCharBuffer result( from.Length() ) ;
|
||||||
|
status = TECConvertText(s_TECNativeCToUnicode, (ConstTextPtr)from.c_str() , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)result.data(), byteBufferLen, &byteOutLen);
|
||||||
|
result.data()[byteOutLen/2] = 0 ;
|
||||||
|
#endif
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacMakeStringFromCString( const char * from , int len )
|
||||||
|
{
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
wxString result ;
|
||||||
|
wxChar* buf = result.GetWriteBuf( len ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = len ;
|
||||||
|
ByteCount byteBufferLen = len *2 ;
|
||||||
|
|
||||||
|
status = TECConvertText(s_TECNativeCToUnicode, (ConstTextPtr)from , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
||||||
|
#else
|
||||||
|
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||||
|
memcpy( buf , from , len ) ;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = len ;
|
||||||
|
ByteCount byteBufferLen = byteInLen ;
|
||||||
|
|
||||||
|
status = TECConvertText(s_TECNativeCToPC, (ConstTextPtr)from , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)buf, byteBufferLen, &byteOutLen);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
buf[len] = 0 ;
|
||||||
|
result.UngetWriteBuf() ;
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacMakeStringFromCString( const char * from )
|
||||||
|
{
|
||||||
|
return wxMacMakeStringFromCString( from , strlen(from) ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxCharBuffer wxMacStringToCString( const wxString &from )
|
||||||
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = from.Length() * 2 ;
|
||||||
|
ByteCount byteBufferLen = from.Length() ;
|
||||||
|
wxCharBuffer result( from.Length() ) ;
|
||||||
|
status = TECConvertText(s_TECUnicodeToNativeC , (ConstTextPtr)from.wc_str() , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)result.data(), byteBufferLen, &byteOutLen);
|
||||||
|
return result ;
|
||||||
|
#else
|
||||||
|
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||||
|
return wxCharBuffer( from.c_str() ) ;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxCharBuffer result( from.Length() ) ;
|
||||||
|
OSStatus status = noErr ;
|
||||||
|
ByteCount byteOutLen ;
|
||||||
|
ByteCount byteInLen = from.Length() ;
|
||||||
|
ByteCount byteBufferLen = byteInLen ;
|
||||||
|
|
||||||
|
status = TECConvertText(s_TECPCToNativeC, (ConstTextPtr)from.c_str() , byteInLen, &byteInLen,
|
||||||
|
(TextPtr)result.data(), byteBufferLen, &byteOutLen);
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxMacStringToPascal( const wxString&from , StringPtr to )
|
||||||
|
{
|
||||||
|
wxCharBuffer buf = wxMacStringToCString( from ) ;
|
||||||
|
int len = strlen(buf) ;
|
||||||
|
|
||||||
|
if ( len > 255 )
|
||||||
|
len = 255 ;
|
||||||
|
to[0] = len ;
|
||||||
|
memcpy( (char*) &to[1] , buf , len ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacMakeStringFromPascal( ConstStringPtr from )
|
||||||
|
{
|
||||||
|
return wxMacMakeStringFromCString( (char*) &from[1] , from[0] ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// CFStringRefs (Carbon only)
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_CARBON
|
||||||
|
// converts this string into a carbon foundation string with optional pc 2 mac encoding
|
||||||
|
void wxMacCFStringHolder::Assign( const wxString &str )
|
||||||
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
m_cfs = CFStringCreateWithCharacters( kCFAllocatorDefault,
|
||||||
|
(const unsigned short*)str.wc_str(), str.Len() );
|
||||||
|
#else
|
||||||
|
m_cfs = CFStringCreateWithCString( kCFAllocatorSystemDefault , str.c_str() ,
|
||||||
|
wxApp::s_macDefaultEncodingIsPC ?
|
||||||
|
kCFStringEncodingWindowsLatin1 : CFStringGetSystemEncoding() ) ;
|
||||||
|
#endif
|
||||||
|
m_release = true ;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString wxMacCFStringHolder::AsString()
|
||||||
{
|
{
|
||||||
wxString result ;
|
wxString result ;
|
||||||
int len = strlen ( p ) ;
|
Size len = CFStringGetLength( m_cfs ) ;
|
||||||
|
wxChar* buf = result.GetWriteBuf( len ) ;
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
CFStringGetCharacters( m_cfs , CFRangeMake( 0 , len ) , (UniChar*) buf ) ;
|
||||||
|
#else
|
||||||
|
CFStringGetCString( m_cfs , buf , len+1 , s_macDefaultEncodingIsPC ?
|
||||||
|
kCFStringEncodingWindowsLatin1 : CFStringGetSystemEncoding() ) ;
|
||||||
|
#endif
|
||||||
|
buf[len] = 0 ;
|
||||||
|
result.UngetWriteBuf() ;
|
||||||
|
return result ;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
|
wxString wxMacMakeMacStringFromPC( const wxChar * p )
|
||||||
|
{
|
||||||
|
wxString result ;
|
||||||
|
int len = wxStrlen ( p ) ;
|
||||||
if ( len > 0 )
|
if ( len > 0 )
|
||||||
{
|
{
|
||||||
wxChar* ptr = result.GetWriteBuf(len) ;
|
wxChar* ptr = result.GetWriteBuf(len) ;
|
||||||
@@ -607,10 +785,10 @@ wxString wxMacMakeMacStringFromPC( const char * p )
|
|||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxMacMakePCStringFromMac( const char * p )
|
wxString wxMacMakePCStringFromMac( const wxChar * p )
|
||||||
{
|
{
|
||||||
wxString result ;
|
wxString result ;
|
||||||
int len = strlen ( p ) ;
|
int len = wxStrlen ( p ) ;
|
||||||
if ( len > 0 )
|
if ( len > 0 )
|
||||||
{
|
{
|
||||||
wxChar* ptr = result.GetWriteBuf(len) ;
|
wxChar* ptr = result.GetWriteBuf(len) ;
|
||||||
@@ -621,7 +799,7 @@ wxString wxMacMakePCStringFromMac( const char * p )
|
|||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxMacMakeStringFromMacString( const char* from , bool mac2pcEncoding )
|
wxString wxMacMakeStringFromMacString( const wxChar* from , bool mac2pcEncoding )
|
||||||
{
|
{
|
||||||
if (mac2pcEncoding)
|
if (mac2pcEncoding)
|
||||||
{
|
{
|
||||||
@@ -652,7 +830,7 @@ wxString wxMacMakeStringFromPascal( ConstStringPtr from , bool mac2pcEncoding )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacStringToPascal( const char * from , StringPtr to , bool pc2macEncoding )
|
void wxMacStringToPascal( const wxChar * from , StringPtr to , bool pc2macEncoding )
|
||||||
{
|
{
|
||||||
if (pc2macEncoding)
|
if (pc2macEncoding)
|
||||||
{
|
{
|
||||||
@@ -663,19 +841,8 @@ void wxMacStringToPascal( const char * from , StringPtr to , bool pc2macEncoding
|
|||||||
CopyCStringToPascal( from , to ) ;
|
CopyCStringToPascal( from , to ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// CFStringRefs (Carbon only)
|
|
||||||
//
|
|
||||||
|
|
||||||
#if TARGET_CARBON
|
|
||||||
// converts this string into a carbon foundation string with optional pc 2 mac encoding
|
|
||||||
CFStringRef wxMacCreateCFString( const wxString &str , bool pc2macEncoding )
|
|
||||||
{
|
|
||||||
return CFStringCreateWithCString( kCFAllocatorSystemDefault , str.c_str() ,
|
|
||||||
pc2macEncoding ?
|
|
||||||
kCFStringEncodingWindowsLatin1 : CFStringGetSystemEncoding() ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //TARGET_CARBON
|
#endif //TARGET_CARBON
|
||||||
|
|
||||||
|
@@ -135,23 +135,18 @@ bool wxWave::Create(const wxString& fileName, bool isResource)
|
|||||||
//don't know what to do with looped, wth
|
//don't know what to do with looped, wth
|
||||||
bool wxWave::Play(bool async, bool looped) const
|
bool wxWave::Play(bool async, bool looped) const
|
||||||
{
|
{
|
||||||
char lpSnd[32];
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
if (m_isResource)
|
if (m_isResource)
|
||||||
{
|
{
|
||||||
#if TARGET_CARBON
|
Str255 snd ;
|
||||||
c2pstrcpy((unsigned char *)lpSnd, m_sndname);
|
wxMacStringToPascal( m_sndname , snd ) ;
|
||||||
#else
|
SndListHandle hSnd;
|
||||||
strcpy(lpSnd, m_sndname);
|
|
||||||
c2pstr((char *) lpSnd);
|
|
||||||
#endif
|
|
||||||
SndListHandle hSnd;
|
|
||||||
|
|
||||||
hSnd = (SndListHandle) GetNamedResource('snd ',(const unsigned char *) lpSnd);
|
hSnd = (SndListHandle) GetNamedResource('snd ', snd);
|
||||||
|
|
||||||
if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, async) == noErr))
|
if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, async) == noErr))
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -1642,7 +1642,7 @@ wxString wxWindowMac::MacGetToolTipString( wxPoint &pt )
|
|||||||
{
|
{
|
||||||
return m_tooltip->GetTip() ;
|
return m_tooltip->GetTip() ;
|
||||||
}
|
}
|
||||||
return "" ;
|
return wxEmptyString ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::Update()
|
void wxWindowMac::Update()
|
||||||
@@ -1855,13 +1855,13 @@ WXHWND wxWindowMac::MacGetRootWindow() const
|
|||||||
|
|
||||||
iter = iter->GetParent() ;
|
iter = iter->GetParent() ;
|
||||||
}
|
}
|
||||||
wxASSERT_MSG( 1 , "No valid mac root window" ) ;
|
wxASSERT_MSG( 1 , wxT("No valid mac root window") ) ;
|
||||||
return NULL ;
|
return NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::MacCreateScrollBars( long style )
|
void wxWindowMac::MacCreateScrollBars( long style )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( m_vScrollBar == NULL && m_hScrollBar == NULL , "attempt to create window twice" ) ;
|
wxASSERT_MSG( m_vScrollBar == NULL && m_hScrollBar == NULL , wxT("attempt to create window twice") ) ;
|
||||||
|
|
||||||
bool hasBoth = ( style & wxVSCROLL ) && ( style & wxHSCROLL ) ;
|
bool hasBoth = ( style & wxVSCROLL ) && ( style & wxHSCROLL ) ;
|
||||||
int adjust = hasBoth ? MAC_SCROLLBAR_SIZE - 1: 0 ;
|
int adjust = hasBoth ? MAC_SCROLLBAR_SIZE - 1: 0 ;
|
||||||
|
@@ -666,7 +666,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -1765,15 +1765,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -1846,15 +1837,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -4005,15 +3987,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -4655,13 +4628,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -4718,13 +4684,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -6395,13 +6354,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -7151,7 +7103,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -8241,15 +8193,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS></FILEFLAGS>
|
<FILEFLAGS></FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -8322,15 +8265,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -10490,15 +10424,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -11133,13 +11058,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -11196,13 +11114,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -12880,13 +12791,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -13230,7 +13134,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -14058,7 +13962,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -15199,7 +15103,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -16316,15 +16220,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -16397,15 +16292,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -18530,15 +18416,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -19194,13 +19071,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -19257,13 +19127,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -20916,13 +20779,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -21672,7 +21528,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -22749,15 +22605,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -22830,15 +22677,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -24782,15 +24620,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -25427,13 +25256,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -25490,13 +25312,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -27006,13 +26821,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -27769,7 +27577,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -28859,15 +28667,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS></FILEFLAGS>
|
<FILEFLAGS></FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -28940,15 +28739,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -30887,15 +30677,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -31539,13 +31320,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -31602,13 +31376,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -33115,13 +32882,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -33542,7 +33302,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -34709,7 +34469,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -35781,15 +35541,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -35862,15 +35613,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -38066,15 +37808,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -38702,13 +38435,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -38765,13 +38491,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -40470,13 +40189,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -41246,7 +40958,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -42409,7 +42121,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -43481,15 +43193,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -43562,15 +43265,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -45766,15 +45460,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -46395,13 +46080,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -46458,13 +46136,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -48170,13 +47841,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -48936,7 +48600,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -50008,15 +49672,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -50089,15 +49744,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -52077,15 +51723,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -52722,13 +52359,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -52785,13 +52415,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -54322,13 +53945,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -55095,7 +54711,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -56167,15 +55783,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -56248,15 +55855,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -58281,15 +57879,6 @@
|
|||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
<FILE>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
<FILEKIND>Text</FILEKIND>
|
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
|
||||||
</FILE>
|
|
||||||
<FILE>
|
<FILE>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -58919,13 +58508,6 @@
|
|||||||
<PATH>:dcprint.cpp</PATH>
|
<PATH>:dcprint.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -58982,13 +58564,6 @@
|
|||||||
<PATH>:appcmn.cpp</PATH>
|
<PATH>:appcmn.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -60561,13 +60136,6 @@
|
|||||||
<PATH>:dcbuffer.cpp</PATH>
|
<PATH>:dcbuffer.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
<PATHROOT>Project</PATHROOT>
|
<PATHROOT>Project</PATHROOT>
|
||||||
@@ -61344,7 +60912,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -62517,7 +62085,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -63690,7 +63258,7 @@
|
|||||||
<!-- Settings for "FTP Panel" panel -->
|
<!-- Settings for "FTP Panel" panel -->
|
||||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0—ô0#Þ##ÞÈ</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0ÿÄ æø"²¸</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING>
|
||||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||||
@@ -64955,14 +64523,6 @@
|
|||||||
<PATH>:object.cpp</PATH>
|
<PATH>:object.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:common:</ACCESSPATH>
|
|
||||||
<PATH>:odbc.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
@@ -65435,14 +64995,6 @@
|
|||||||
<PATH>:gridctrl.cpp</PATH>
|
<PATH>:gridctrl.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:generic:</ACCESSPATH>
|
|
||||||
<PATH>:gridg.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
@@ -66023,14 +65575,6 @@
|
|||||||
<PATH>:accel.cpp</PATH>
|
<PATH>:accel.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
<FILEREF>
|
|
||||||
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
|
||||||
<PATHROOT>Project</PATHROOT>
|
|
||||||
<ACCESSPATH>:mac:</ACCESSPATH>
|
|
||||||
<PATH>:aga.cpp</PATH>
|
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
|
||||||
</FILEREF>
|
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
<TARGETNAME>wxlib PPC debug</TARGETNAME>
|
||||||
<PATHTYPE>PathRelative</PATHTYPE>
|
<PATHTYPE>PathRelative</PATHTYPE>
|
||||||
|
Reference in New Issue
Block a user