add some #if wxUSE_XXX (patch 1581470)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e4164aa980
commit
72c1ba98f2
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user