fix more unused parameters and variables warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1547,6 +1547,8 @@ WXHBITMAP wxBitmap::GetHBITMAP(WXHBITMAP* mask) const
|
|||||||
#if !wxMAC_USE_CORE_GRAPHICS
|
#if !wxMAC_USE_CORE_GRAPHICS
|
||||||
return WXHBITMAP(M_BITMAPDATA->GetHBITMAP((GWorldPtr*)mask));
|
return WXHBITMAP(M_BITMAPDATA->GetHBITMAP((GWorldPtr*)mask));
|
||||||
#else
|
#else
|
||||||
|
wxUnusedVar(mask);
|
||||||
|
|
||||||
return WXHBITMAP(M_BITMAPDATA->GetBitmapContext());
|
return WXHBITMAP(M_BITMAPDATA->GetBitmapContext());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -34,11 +34,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
// the trace mask we use with wxLogTrace() - call
|
|
||||||
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
|
|
||||||
// (there will be a *lot* of them!)
|
|
||||||
static const wxChar *TRACE_CLIPBOARD = wxT("clipboard");
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
|
||||||
|
|
||||||
wxClipboard::wxClipboard()
|
wxClipboard::wxClipboard()
|
||||||
|
@@ -195,7 +195,7 @@ wxBitmap wxWindowDC::DoGetAsBitmap(const wxRect *subrect) const
|
|||||||
// call this method when a Blit is performed with it as a source.
|
// call this method when a Blit is performed with it as a source.
|
||||||
if (!m_window)
|
if (!m_window)
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
|
|
||||||
ControlRef handle = (ControlRef) m_window->GetHandle();
|
ControlRef handle = (ControlRef) m_window->GetHandle();
|
||||||
if ( !handle )
|
if ( !handle )
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
@@ -226,7 +226,6 @@ wxBitmap wxWindowDC::DoGetAsBitmap(const wxRect *subrect) const
|
|||||||
wxBitmap bmp = wxBitmap(width, height, 32);
|
wxBitmap bmp = wxBitmap(width, height, 32);
|
||||||
wxAlphaPixelData pixData(bmp, wxPoint(0,0), wxSize(width, height));
|
wxAlphaPixelData pixData(bmp, wxPoint(0,0), wxSize(width, height));
|
||||||
|
|
||||||
pixData.UseAlpha();
|
|
||||||
wxAlphaPixelData::Iterator p(pixData);
|
wxAlphaPixelData::Iterator p(pixData);
|
||||||
for (int y=0; y<height; y++) {
|
for (int y=0; y<height; y++) {
|
||||||
wxAlphaPixelData::Iterator rowStart = p;
|
wxAlphaPixelData::Iterator rowStart = p;
|
||||||
|
@@ -212,11 +212,13 @@ wxDropSource::~wxDropSource()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus wxMacPromiseKeeper( PasteboardRef inPasteboard, PasteboardItemID inItem, CFStringRef inFlavorType,
|
OSStatus wxMacPromiseKeeper(PasteboardRef WXUNUSED(inPasteboard),
|
||||||
void *inContext )
|
PasteboardItemID WXUNUSED(inItem),
|
||||||
|
CFStringRef WXUNUSED(inFlavorType),
|
||||||
|
void * WXUNUSED(inContext))
|
||||||
{
|
{
|
||||||
OSStatus err = noErr;
|
OSStatus err = noErr;
|
||||||
|
|
||||||
// we might add promises here later, inContext is the wxDropSource*
|
// we might add promises here later, inContext is the wxDropSource*
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
@@ -233,37 +235,37 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
|
|||||||
RgnHandle dragRegion;
|
RgnHandle dragRegion;
|
||||||
OSStatus err = noErr;
|
OSStatus err = noErr;
|
||||||
PasteboardRef pasteboard;
|
PasteboardRef pasteboard;
|
||||||
|
|
||||||
// add data to drag
|
// add data to drag
|
||||||
|
|
||||||
err = PasteboardCreate( kPasteboardUniqueName, &pasteboard );
|
err = PasteboardCreate( kPasteboardUniqueName, &pasteboard );
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
|
|
||||||
// we add a dummy promise keeper because of strange messages when linking against carbon debug
|
// we add a dummy promise keeper because of strange messages when linking against carbon debug
|
||||||
err = PasteboardSetPromiseKeeper( pasteboard, wxMacPromiseKeeper, this );
|
err = PasteboardSetPromiseKeeper( pasteboard, wxMacPromiseKeeper, this );
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
CFRelease( pasteboard );
|
CFRelease( pasteboard );
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = PasteboardClear( pasteboard );
|
err = PasteboardClear( pasteboard );
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
CFRelease( pasteboard );
|
CFRelease( pasteboard );
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
}
|
}
|
||||||
PasteboardSynchronize( pasteboard );
|
PasteboardSynchronize( pasteboard );
|
||||||
|
|
||||||
m_data->AddToPasteboard( pasteboard, 1 );
|
m_data->AddToPasteboard( pasteboard, 1 );
|
||||||
|
|
||||||
if (NewDragWithPasteboard( pasteboard , &theDrag) != noErr)
|
if (NewDragWithPasteboard( pasteboard , &theDrag) != noErr)
|
||||||
{
|
{
|
||||||
CFRelease( pasteboard );
|
CFRelease( pasteboard );
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
dragRegion = NewRgn();
|
dragRegion = NewRgn();
|
||||||
RgnHandle tempRgn = NewRgn();
|
RgnHandle tempRgn = NewRgn();
|
||||||
|
|
||||||
@@ -298,7 +300,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
|
|||||||
gTrackingGlobals.m_flags = flags;
|
gTrackingGlobals.m_flags = flags;
|
||||||
|
|
||||||
err = TrackDrag( theDrag, &rec, dragRegion );
|
err = TrackDrag( theDrag, &rec, dragRegion );
|
||||||
|
|
||||||
DisposeRgn( dragRegion );
|
DisposeRgn( dragRegion );
|
||||||
DisposeDrag( theDrag );
|
DisposeDrag( theDrag );
|
||||||
CFRelease( pasteboard );
|
CFRelease( pasteboard );
|
||||||
|
@@ -574,7 +574,9 @@ wxInt32 wxMenu::MacHandleCommandProcess( wxMenuItem* item, int id, wxWindow* tar
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxInt32 wxMenu::MacHandleCommandUpdateStatus( wxMenuItem* item, int id, wxWindow* targetWindow )
|
wxInt32 wxMenu::MacHandleCommandUpdateStatus(wxMenuItem* WXUNUSED(item),
|
||||||
|
int id,
|
||||||
|
wxWindow* targetWindow)
|
||||||
{
|
{
|
||||||
OSStatus result = eventNotHandledErr ;
|
OSStatus result = eventNotHandledErr ;
|
||||||
wxUpdateUIEvent event(id);
|
wxUpdateUIEvent event(id);
|
||||||
@@ -611,7 +613,7 @@ wxInt32 wxMenu::MacHandleCommandUpdateStatus( wxMenuItem* item, int id, wxWindow
|
|||||||
{
|
{
|
||||||
processed = targetWindow->GetEventHandler()->ProcessEvent(event);
|
processed = targetWindow->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( processed )
|
if ( processed )
|
||||||
{
|
{
|
||||||
// if anything changed, update the changed attribute
|
// if anything changed, update the changed attribute
|
||||||
|
@@ -40,15 +40,15 @@ class wxMetafileRefData: public wxGDIRefData
|
|||||||
public:
|
public:
|
||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
// creates a metafile from memory, assumes ownership
|
// creates a metafile from memory, assumes ownership
|
||||||
wxMetafileRefData(CFDataRef data);
|
wxMetafileRefData(CFDataRef data);
|
||||||
#else
|
#else
|
||||||
// creates a metafile from memory, assumes ownership
|
// creates a metafile from memory, assumes ownership
|
||||||
wxMetafileRefData(PicHandle data);
|
wxMetafileRefData(PicHandle data);
|
||||||
#endif
|
#endif
|
||||||
// prepares a recording metafile
|
// prepares a recording metafile
|
||||||
wxMetafileRefData( int width, int height);
|
wxMetafileRefData( int width, int height);
|
||||||
// prepares a metafile to be read from a file (if filename is not empty)
|
// prepares a metafile to be read from a file (if filename is not empty)
|
||||||
wxMetafileRefData( const wxString& filename);
|
wxMetafileRefData( const wxString& filename);
|
||||||
virtual ~wxMetafileRefData();
|
virtual ~wxMetafileRefData();
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
@@ -188,7 +188,7 @@ void wxMetafileRefData::Close()
|
|||||||
|
|
||||||
CGContextRelease(m_context);
|
CGContextRelease(m_context);
|
||||||
m_context = NULL;
|
m_context = NULL;
|
||||||
|
|
||||||
UpdateDocumentFromData();
|
UpdateDocumentFromData();
|
||||||
#else
|
#else
|
||||||
ClosePicture();
|
ClosePicture();
|
||||||
@@ -196,7 +196,7 @@ void wxMetafileRefData::Close()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
void wxMetafileRefData::UpdateDocumentFromData()
|
void wxMetafileRefData::UpdateDocumentFromData()
|
||||||
{
|
{
|
||||||
wxCFRef<CGDataProviderRef> provider(UMACGDataProviderCreateWithCFData(m_data));
|
wxCFRef<CGDataProviderRef> provider(UMACGDataProviderCreateWithCFData(m_data));
|
||||||
m_pdfDoc.reset(CGPDFDocumentCreateWithProvider(provider));
|
m_pdfDoc.reset(CGPDFDocumentCreateWithProvider(provider));
|
||||||
@@ -204,8 +204,8 @@ void wxMetafileRefData::UpdateDocumentFromData()
|
|||||||
{
|
{
|
||||||
CGPDFPageRef page = CGPDFDocumentGetPage( m_pdfDoc, 1 );
|
CGPDFPageRef page = CGPDFDocumentGetPage( m_pdfDoc, 1 );
|
||||||
CGRect rect = CGPDFPageGetBoxRect ( page, kCGPDFMediaBox);
|
CGRect rect = CGPDFPageGetBoxRect ( page, kCGPDFMediaBox);
|
||||||
m_width = rect.size.width;
|
m_width = wx_static_cast(int, rect.size.width);
|
||||||
m_height = rect.size.height;
|
m_height = wx_static_cast(int, rect.size.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -283,7 +283,8 @@ void wxMetafile::SetPICT(void* pictHandle)
|
|||||||
wxCFRef<CGDataProviderRef> provider(UMACGDataProviderCreateWithCFData(data));
|
wxCFRef<CGDataProviderRef> provider(UMACGDataProviderCreateWithCFData(data));
|
||||||
QDPictRef pictRef = QDPictCreateWithProvider(provider);
|
QDPictRef pictRef = QDPictCreateWithProvider(provider);
|
||||||
CGRect rect = QDPictGetBounds(pictRef);
|
CGRect rect = QDPictGetBounds(pictRef);
|
||||||
m_refData = new wxMetafileRefData( rect.size.width, rect.size.height );
|
m_refData = new wxMetafileRefData(wx_static_cast(int, rect.size.width),
|
||||||
|
wx_static_cast(int, rect.size.height));
|
||||||
QDPictDrawToCGContext( ((wxMetafileRefData*) m_refData)->GetContext(), rect, pictRef );
|
QDPictDrawToCGContext( ((wxMetafileRefData*) m_refData)->GetContext(), rect, pictRef );
|
||||||
CFRelease( data );
|
CFRelease( data );
|
||||||
QDPictRelease( pictRef );
|
QDPictRelease( pictRef );
|
||||||
@@ -413,14 +414,14 @@ bool wxMetafileDataObject::GetDataHere(void *buf) const
|
|||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
wxMetafileRefData* refData = M_METAFILEREFDATA(m_metafile);
|
wxMetafileRefData* refData = M_METAFILEREFDATA(m_metafile);
|
||||||
if ( refData )
|
if ( refData )
|
||||||
{
|
{
|
||||||
CFIndex length = refData->GetData().GetLength();
|
CFIndex length = refData->GetData().GetLength();
|
||||||
if ( length > 0 )
|
if ( length > 0 )
|
||||||
{
|
{
|
||||||
result = true ;
|
result = true ;
|
||||||
refData->GetData().GetBytes(CFRangeMake(0,length), (UInt8 *) buf);
|
refData->GetData().GetBytes(CFRangeMake(0,length), (UInt8 *) buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Handle pictH = (Handle)(*((wxMetafile*)&m_metafile)).GetHMETAFILE();
|
Handle pictH = (Handle)(*((wxMetafile*)&m_metafile)).GetHMETAFILE();
|
||||||
result = (pictH != NULL);
|
result = (pictH != NULL);
|
||||||
|
@@ -1760,11 +1760,11 @@ void wxMacMLTEControl::AdjustCreationAttributes(const wxColour &background,
|
|||||||
| kTXNSupportFontCommandProcessing
|
| kTXNSupportFontCommandProcessing
|
||||||
| kTXNSupportFontCommandUpdating;
|
| kTXNSupportFontCommandUpdating;
|
||||||
|
|
||||||
// only spell check when not read-only
|
// only spell check when not read-only
|
||||||
// use system options for the default
|
// use system options for the default
|
||||||
bool checkSpelling = false ;
|
bool checkSpelling = false ;
|
||||||
if ( !(m_windowStyle & wxTE_READONLY) )
|
if ( !(m_windowStyle & wxTE_READONLY) )
|
||||||
{
|
{
|
||||||
#if wxUSE_SYSTEM_OPTIONS
|
#if wxUSE_SYSTEM_OPTIONS
|
||||||
if ( wxSystemOptions::HasOption( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) && (wxSystemOptions::GetOptionInt( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) == 1) )
|
if ( wxSystemOptions::HasOption( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) && (wxSystemOptions::GetOptionInt( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) == 1) )
|
||||||
{
|
{
|
||||||
@@ -1772,11 +1772,11 @@ void wxMacMLTEControl::AdjustCreationAttributes(const wxColour &background,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( checkSpelling )
|
if ( checkSpelling )
|
||||||
options |=
|
options |=
|
||||||
kTXNSupportSpellCheckCommandProcessing
|
kTXNSupportSpellCheckCommandProcessing
|
||||||
| kTXNSupportSpellCheckCommandUpdating;
|
| kTXNSupportSpellCheckCommandUpdating;
|
||||||
|
|
||||||
TXNSetCommandEventSupport( m_txn , options ) ;
|
TXNSetCommandEventSupport( m_txn , options ) ;
|
||||||
}
|
}
|
||||||
@@ -1794,6 +1794,11 @@ void wxMacMLTEControl::SetBackground( const wxBrush &brush )
|
|||||||
TXNSetBackground( m_txn , &tback );
|
TXNSetBackground( m_txn , &tback );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int wxConvertToTXN(int x)
|
||||||
|
{
|
||||||
|
return wx_static_cast(int, x / 254.0 * 72 + 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , long to )
|
void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , long to )
|
||||||
{
|
{
|
||||||
TXNTypeAttributes typeAttr[4] ;
|
TXNTypeAttributes typeAttr[4] ;
|
||||||
@@ -1804,9 +1809,9 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo
|
|||||||
TXNControlTag controlTags[4];
|
TXNControlTag controlTags[4];
|
||||||
TXNControlData controlData[4];
|
TXNControlData controlData[4];
|
||||||
size_t controlAttrCount = 0;
|
size_t controlAttrCount = 0;
|
||||||
|
|
||||||
TXNTab* tabs = NULL;
|
TXNTab* tabs = NULL;
|
||||||
|
|
||||||
bool relayout = false;
|
bool relayout = false;
|
||||||
|
|
||||||
if ( style.HasFont() )
|
if ( style.HasFont() )
|
||||||
@@ -1829,12 +1834,12 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo
|
|||||||
typeAttr[typeAttrCount].data.dataPtr = (void*) &color ;
|
typeAttr[typeAttrCount].data.dataPtr = (void*) &color ;
|
||||||
typeAttrCount++ ;
|
typeAttrCount++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( style.HasAlignment() )
|
if ( style.HasAlignment() )
|
||||||
{
|
{
|
||||||
wxASSERT( controlAttrCount < WXSIZEOF(controlTags) );
|
wxASSERT( controlAttrCount < WXSIZEOF(controlTags) );
|
||||||
SInt32 align;
|
SInt32 align;
|
||||||
|
|
||||||
switch ( style.GetAlignment() )
|
switch ( style.GetAlignment() )
|
||||||
{
|
{
|
||||||
case wxTEXT_ALIGNMENT_LEFT:
|
case wxTEXT_ALIGNMENT_LEFT:
|
||||||
@@ -1848,13 +1853,13 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo
|
|||||||
break;
|
break;
|
||||||
case wxTEXT_ALIGNMENT_JUSTIFIED:
|
case wxTEXT_ALIGNMENT_JUSTIFIED:
|
||||||
align = kTXNFullJust;
|
align = kTXNFullJust;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
case wxTEXT_ALIGNMENT_DEFAULT:
|
case wxTEXT_ALIGNMENT_DEFAULT:
|
||||||
align = kTXNFlushDefault;
|
align = kTXNFlushDefault;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
controlTags[controlAttrCount] = kTXNJustificationTag ;
|
controlTags[controlAttrCount] = kTXNJustificationTag ;
|
||||||
controlData[controlAttrCount].sValue = align ;
|
controlData[controlAttrCount].sValue = align ;
|
||||||
controlAttrCount++ ;
|
controlAttrCount++ ;
|
||||||
@@ -1869,29 +1874,29 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo
|
|||||||
&controlTags[controlAttrCount], &controlData[controlAttrCount]) );
|
&controlTags[controlAttrCount], &controlData[controlAttrCount]) );
|
||||||
if ( style.HasLeftIndent() )
|
if ( style.HasLeftIndent() )
|
||||||
{
|
{
|
||||||
margins.leftMargin = style.GetLeftIndent() / 254.0 * 72 + 0.5;
|
margins.leftMargin = wxConvertToTXN(style.GetLeftIndent());
|
||||||
}
|
}
|
||||||
if ( style.HasRightIndent() )
|
if ( style.HasRightIndent() )
|
||||||
{
|
{
|
||||||
margins.rightMargin = style.GetRightIndent() / 254.0 * 72 + 0.5;
|
margins.rightMargin = wxConvertToTXN(style.GetRightIndent());
|
||||||
}
|
}
|
||||||
controlAttrCount++ ;
|
controlAttrCount++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( style.HasTabs() )
|
if ( style.HasTabs() )
|
||||||
{
|
{
|
||||||
const wxArrayInt& tabarray = style.GetTabs();
|
const wxArrayInt& tabarray = style.GetTabs();
|
||||||
// unfortunately Mac only applies a tab distance, not individually different tabs
|
// unfortunately Mac only applies a tab distance, not individually different tabs
|
||||||
controlTags[controlAttrCount] = kTXNTabSettingsTag;
|
controlTags[controlAttrCount] = kTXNTabSettingsTag;
|
||||||
if ( tabarray.size() > 0 )
|
if ( tabarray.size() > 0 )
|
||||||
controlData[controlAttrCount].tabValue.value = tabarray[0] / 254.0 * 72 + 0.5;
|
controlData[controlAttrCount].tabValue.value = wxConvertToTXN(tabarray[0]);
|
||||||
else
|
else
|
||||||
controlData[controlAttrCount].tabValue.value = 72 ;
|
controlData[controlAttrCount].tabValue.value = 72 ;
|
||||||
|
|
||||||
controlData[controlAttrCount].tabValue.tabType = kTXNLeftTab;
|
controlData[controlAttrCount].tabValue.tabType = kTXNLeftTab;
|
||||||
controlAttrCount++ ;
|
controlAttrCount++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// unfortunately the relayout is not automatic
|
// unfortunately the relayout is not automatic
|
||||||
if ( controlAttrCount > 0 )
|
if ( controlAttrCount > 0 )
|
||||||
{
|
{
|
||||||
@@ -1899,18 +1904,18 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo
|
|||||||
controlTags, controlData) );
|
controlTags, controlData) );
|
||||||
relayout = true;
|
relayout = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( typeAttrCount > 0 )
|
if ( typeAttrCount > 0 )
|
||||||
{
|
{
|
||||||
verify_noerr( TXNSetTypeAttributes( m_txn , typeAttrCount, typeAttr, from , to ) );
|
verify_noerr( TXNSetTypeAttributes( m_txn , typeAttrCount, typeAttr, from , to ) );
|
||||||
relayout = true;
|
relayout = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( tabs != NULL )
|
if ( tabs != NULL )
|
||||||
{
|
{
|
||||||
delete[] tabs;
|
delete[] tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( relayout )
|
if ( relayout )
|
||||||
{
|
{
|
||||||
TXNRecalcTextLayout( m_txn );
|
TXNRecalcTextLayout( m_txn );
|
||||||
@@ -3095,7 +3100,7 @@ bool wxMacMLTEHIViewControl::HasFocus() const
|
|||||||
ControlRef control ;
|
ControlRef control ;
|
||||||
if ( GetUserFocusWindow() == NULL )
|
if ( GetUserFocusWindow() == NULL )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
GetKeyboardFocus( GetUserFocusWindow() , &control ) ;
|
GetKeyboardFocus( GetUserFocusWindow() , &control ) ;
|
||||||
return control == m_textView ;
|
return control == m_textView ;
|
||||||
}
|
}
|
||||||
|
@@ -140,7 +140,7 @@ void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem , bool enable)
|
|||||||
void UMAAppendSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , SInt16 id )
|
void UMAAppendSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , SInt16 id )
|
||||||
{
|
{
|
||||||
AppendMenuItemTextWithCFString( menu,
|
AppendMenuItemTextWithCFString( menu,
|
||||||
CFSTR("A"), 0, 0,NULL);
|
CFSTR("A"), 0, 0,NULL);
|
||||||
UMASetMenuItemText( menu, (SInt16) ::CountMenuItems(menu), title , encoding );
|
UMASetMenuItemText( menu, (SInt16) ::CountMenuItems(menu), title , encoding );
|
||||||
SetMenuItemHierarchicalID( menu , CountMenuItems( menu ) , id ) ;
|
SetMenuItemHierarchicalID( menu , CountMenuItems( menu ) , id ) ;
|
||||||
}
|
}
|
||||||
@@ -148,8 +148,8 @@ void UMAAppendSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding
|
|||||||
void UMAInsertSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuItemIndex item , SInt16 id )
|
void UMAInsertSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuItemIndex item , SInt16 id )
|
||||||
{
|
{
|
||||||
InsertMenuItemTextWithCFString( menu,
|
InsertMenuItemTextWithCFString( menu,
|
||||||
CFSTR("A"), item, 0, 0);
|
CFSTR("A"), item, 0, 0);
|
||||||
|
|
||||||
UMASetMenuItemText( menu, item+1, title , encoding );
|
UMASetMenuItemText( menu, item+1, title , encoding );
|
||||||
SetMenuItemHierarchicalID( menu , item+1 , id ) ;
|
SetMenuItemHierarchicalID( menu , item+1 , id ) ;
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn
|
|||||||
void UMAAppendMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , wxAcceleratorEntry *entry )
|
void UMAAppendMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , wxAcceleratorEntry *entry )
|
||||||
{
|
{
|
||||||
AppendMenuItemTextWithCFString( menu,
|
AppendMenuItemTextWithCFString( menu,
|
||||||
CFSTR("A"), 0, 0,NULL);
|
CFSTR("A"), 0, 0,NULL);
|
||||||
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
||||||
ChangeMenuItemAttributes( menu , ::CountMenuItems(menu), kMenuItemAttrIgnoreMeta , 0 ) ;
|
ChangeMenuItemAttributes( menu , ::CountMenuItems(menu), kMenuItemAttrIgnoreMeta , 0 ) ;
|
||||||
UMASetMenuItemText(menu, (SInt16) ::CountMenuItems(menu), title , encoding );
|
UMASetMenuItemText(menu, (SInt16) ::CountMenuItems(menu), title , encoding );
|
||||||
@@ -305,7 +305,7 @@ void UMAAppendMenuItem( MenuRef menu , const wxString& title, wxFontEncoding enc
|
|||||||
void UMAInsertMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry )
|
void UMAInsertMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry )
|
||||||
{
|
{
|
||||||
InsertMenuItemTextWithCFString( menu,
|
InsertMenuItemTextWithCFString( menu,
|
||||||
CFSTR("A"), item, 0, 0);
|
CFSTR("A"), item, 0, 0);
|
||||||
|
|
||||||
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
||||||
ChangeMenuItemAttributes( menu , item+1, kMenuItemAttrIgnoreMeta , 0 ) ;
|
ChangeMenuItemAttributes( menu , item+1, kMenuItemAttrIgnoreMeta , 0 ) ;
|
||||||
@@ -584,7 +584,9 @@ size_t UMAPutBytesCFRefCallback( void *info, const void *bytes, size_t count )
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMAReleaseCFDataProviderCallback( void *info, const void *data, size_t count )
|
void UMAReleaseCFDataProviderCallback(void *info,
|
||||||
|
const void *WXUNUSED(data),
|
||||||
|
size_t WXUNUSED(count))
|
||||||
{
|
{
|
||||||
if ( info )
|
if ( info )
|
||||||
CFRelease( (CFDataRef) info );
|
CFRelease( (CFDataRef) info );
|
||||||
@@ -600,7 +602,7 @@ CGDataProviderRef UMACGDataProviderCreateWithCFData( CFDataRef data )
|
|||||||
{
|
{
|
||||||
if ( data == NULL )
|
if ( data == NULL )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||||
if( &CGDataProviderCreateWithCFData != NULL )
|
if( &CGDataProviderCreateWithCFData != NULL )
|
||||||
{
|
{
|
||||||
@@ -622,7 +624,7 @@ CGDataConsumerRef UMACGDataConsumerCreateWithCFData( CFMutableDataRef data )
|
|||||||
{
|
{
|
||||||
if ( data == NULL )
|
if ( data == NULL )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||||
if( &CGDataConsumerCreateWithCFData != NULL )
|
if( &CGDataConsumerCreateWithCFData != NULL )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user