diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index 07a1e39a98..fb73241ed9 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -361,13 +361,16 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf ) #ifndef __LP64__ Rect frame; wxMacGetPictureBounds( picHandle, &frame ); - +#if wxUSE_METAFILE wxMetafile mf; mf.SetHMETAFILE( (WXHMETAFILE)m_pictHandle ); +#endif wxMemoryDC mdc; m_bitmap.Create( frame.right - frame.left, frame.bottom - frame.top ); mdc.SelectObject( m_bitmap ); +#if wxUSE_METAFILE mf.Play( &mdc ); +#endif mdc.SelectObject( wxNullBitmap ); #endif diff --git a/src/mac/carbon/filedlg.cpp b/src/mac/carbon/filedlg.cpp index cd3767ac7d..0c3a51d2af 100644 --- a/src/mac/carbon/filedlg.cpp +++ b/src/mac/carbon/filedlg.cpp @@ -11,6 +11,8 @@ #include "wx/wxprec.h" +#if wxUSE_FILEDLG + #include "wx/filedlg.h" #ifndef WX_PRECOMP @@ -428,3 +430,6 @@ int wxFileDialog::ShowModal() return (err == noErr) ? wxID_OK : wxID_CANCEL; } + +#endif // wxUSE_FILEDLG + diff --git a/src/mac/carbon/fontdlg.cpp b/src/mac/carbon/fontdlg.cpp index 180181b1ea..67b93fb6cb 100644 --- a/src/mac/carbon/fontdlg.cpp +++ b/src/mac/carbon/fontdlg.cpp @@ -20,6 +20,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_FONTDLG + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -782,4 +784,6 @@ int FontFamilyStringToInt(const wxChar *family) #endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX -#endif +#endif // wxMAC_USE_EXPERIMENTAL_FONTDIALOG + +#endif // wxUSE_FONTDLG diff --git a/src/mac/carbon/frame.cpp b/src/mac/carbon/frame.cpp index d414c78a6b..b4da3e565f 100644 --- a/src/mac/carbon/frame.cpp +++ b/src/mac/carbon/frame.cpp @@ -117,6 +117,7 @@ bool wxFrame::Enable(bool enable) return true; } +#if wxUSE_STATUSBAR wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id, const wxString& name) { @@ -141,6 +142,7 @@ void wxFrame::PositionStatusBar() m_frameStatusBar->SetSize(0, h, w, WX_MAC_STATUSBAR_HEIGHT); } } +#endif // wxUSE_STATUSBAR // Responds to colour changes, and passes event on to children. void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) @@ -148,6 +150,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); Refresh(); +#if wxUSE_STATUSBAR if ( m_frameStatusBar ) { wxSysColourChangedEvent event2; @@ -155,6 +158,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) event2.SetEventObject( m_frameStatusBar ); m_frameStatusBar->ProcessEvent(event2); } +#endif // wxUSE_STATUSBAR // Propagate the event to the non-top-level children wxWindow::OnSysColourChanged(event); @@ -356,7 +360,6 @@ void wxFrame::PositionToolBar() } #endif -#if wxUSE_TOOLBAR if (GetToolBar()) { int tx, ty, tw, th; @@ -387,8 +390,8 @@ void wxFrame::PositionToolBar() #endif } } -#endif } +#endif // wxUSE_TOOLBAR void wxFrame::PositionBars() { @@ -400,4 +403,4 @@ void wxFrame::PositionBars() #endif } -#endif + diff --git a/src/mac/carbon/statbrma.cpp b/src/mac/carbon/statbrma.cpp index ccecc33a58..9bca84cca9 100644 --- a/src/mac/carbon/statbrma.cpp +++ b/src/mac/carbon/statbrma.cpp @@ -11,6 +11,8 @@ #include "wx/wxprec.h" +#if wxUSE_STATUSBAR + #include "wx/statusbr.h" #ifndef WX_PRECOMP @@ -175,3 +177,6 @@ void wxStatusBarMac::MacHiliteChanged() Refresh(); Update(); } + +#endif // wxUSE_STATUSBAR + diff --git a/src/mac/carbon/timer.cpp b/src/mac/carbon/timer.cpp index c17eb429fc..3c576d0650 100644 --- a/src/mac/carbon/timer.cpp +++ b/src/mac/carbon/timer.cpp @@ -11,6 +11,8 @@ #include "wx/wxprec.h" +#if wxUSE_TIMER + #ifndef WX_PRECOMP #include "wx/dynarray.h" #endif @@ -215,4 +217,7 @@ void wxTimer::Stop() wxMacRemoveAllNotifiersForData( wxMacGetNotifierTable(), this ); } -#endif +#endif // wxMAC_USE_CARBON_TIMER + +#endif // wxUSE_TIMER + diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index 365edd5b60..e4eebd1086 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -53,13 +53,15 @@ private : PicHandle m_backpict ; bool m_shown ; long m_mark ; +#if wxUSE_TIMER wxMacToolTipTimer* m_timer ; - +#endif #if TARGET_CARBON wxMacCFStringHolder m_helpTextRef ; #endif } ; +#if wxUSE_TIMER class wxMacToolTipTimer : public wxTimer { public: @@ -77,6 +79,7 @@ protected: wxMacToolTip* m_tip; long m_mark ; }; +#endif // wxUSE_TIMER //----------------------------------------------------------------------------- // wxToolTip @@ -181,19 +184,22 @@ void wxToolTip::RemoveToolTips() } // --- mac specific - +#if wxUSE_TIMER wxMacToolTipTimer::wxMacToolTipTimer( wxMacToolTip *tip , int msec ) { m_tip = tip; m_mark = tip->GetMark() ; Start(msec, true); } +#endif // wxUSE_TIMER wxMacToolTip::wxMacToolTip() { m_window = NULL ; m_backpict = NULL ; +#if wxUSE_TIMER m_timer = NULL ; +#endif m_mark = 0 ; m_shown = false ; } @@ -208,21 +214,23 @@ void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& m_window =win; s_ToolTipWindowRef = m_window ; m_backpict = NULL ; - +#if wxUSE_TIMER if ( m_timer ) delete m_timer ; m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ; +#endif // wxUSE_TIMER } wxMacToolTip::~wxMacToolTip() { +#if wxUSE_TIMER if ( m_timer ) { delete m_timer ; m_timer = NULL; } - +#endif // wxUSE_TIMER if ( m_backpict ) Clear() ; } @@ -265,13 +273,13 @@ void wxToolTip::NotifyWindowDelete( WXHWND win ) void wxMacToolTip::Clear() { m_mark++ ; - +#if wxUSE_TIMER if ( m_timer ) { delete m_timer ; m_timer = NULL ; } - +#endif // wxUSE_TIMER if ( !m_shown ) return ;