wxUSE_XXX related fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2005-02-18 04:43:47 +00:00
parent 3136b08220
commit 179e085f05
24 changed files with 100 additions and 6 deletions

View File

@@ -24,9 +24,9 @@ class wxNativePrinterDC ;
class WXDLLEXPORT wxPrinterDC: public wxDC class WXDLLEXPORT wxPrinterDC: public wxDC
{ {
public: public:
#if wxUSE_PRINTING_ARCHITECTURE
DECLARE_CLASS(wxPrinterDC) DECLARE_CLASS(wxPrinterDC)
#if wxUSE_PRINTING_ARCHITECTURE
// Create a printer DC // Create a printer DC
wxPrinterDC(const wxPrintData& printdata ); wxPrinterDC(const wxPrintData& printdata );
~wxPrinterDC(); ~wxPrinterDC();

View File

@@ -16,6 +16,8 @@
#pragma interface "tabctrl.h" #pragma interface "tabctrl.h"
#endif #endif
#include "wx/control.h"
class wxImageList; class wxImageList;
/* /*

View File

@@ -63,11 +63,12 @@
#endif #endif
#endif // MSW #endif // MSW
#ifdef __WXMAC__ #if wxUSE_PRINTING_ARCHITECTURE
#if defined(__WXMAC__)
#include "wx/mac/private/print.h" #include "wx/mac/private/print.h"
#endif #endif
#if wxUSE_PRINTING_ARCHITECTURE
IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject)

View File

@@ -24,6 +24,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_LISTBOX
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -623,3 +625,5 @@ wxVListBox::GetClassDefaultAttributes(wxWindowVariant variant)
{ {
return wxListBox::GetClassDefaultAttributes(variant); return wxListBox::GetClassDefaultAttributes(variant);
} }
#endif

View File

@@ -266,19 +266,26 @@ short wxApp::MacHandleAERApp(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Support Routines linking the Mac...File Calls to the Document Manager // Support Routines linking the Mac...File Calls to the Document Manager
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void wxApp::MacOpenFile(const wxString & fileName ) void wxApp::MacOpenFile(const wxString & fileName )
{ {
#if wxUSE_DOC_VIEW_ARCHITECTURE
wxDocManager* dm = wxDocManager::GetDocumentManager() ; wxDocManager* dm = wxDocManager::GetDocumentManager() ;
if ( dm ) if ( dm )
dm->CreateDocument(fileName , wxDOC_SILENT ) ; dm->CreateDocument(fileName , wxDOC_SILENT ) ;
#endif
} }
void wxApp::MacPrintFile(const wxString & fileName ) void wxApp::MacPrintFile(const wxString & fileName )
{ {
#if wxUSE_DOC_VIEW_ARCHITECTURE
#if wxUSE_PRINTING_ARCHITECTURE
wxDocManager* dm = wxDocManager::GetDocumentManager() ; wxDocManager* dm = wxDocManager::GetDocumentManager() ;
if ( dm ) if ( dm )
{ {
@@ -303,8 +310,13 @@ void wxApp::MacPrintFile(const wxString & fileName )
} }
} }
} }
#endif //print
#endif //docview
} }
void wxApp::MacNewFile() void wxApp::MacNewFile()
{ {
} }

View File

@@ -1025,11 +1025,15 @@ int wxBitmap::GetDepth() const
return M_BITMAPDATA->GetDepth(); return M_BITMAPDATA->GetDepth();
} }
#if WXWIN_COMPATIBILITY_2_4
int wxBitmap::GetQuality() const int wxBitmap::GetQuality() const
{ {
return 0; return 0;
} }
#endif
wxMask *wxBitmap::GetMask() const wxMask *wxBitmap::GetMask() const
{ {
wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") ); wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") );
@@ -1068,10 +1072,14 @@ void wxBitmap::SetDepth(int d)
M_BITMAPDATA->SetDepth(d); M_BITMAPDATA->SetDepth(d);
} }
#if WXWIN_COMPATIBILITY_2_4
void wxBitmap::SetQuality(int WXUNUSED(quality)) void wxBitmap::SetQuality(int WXUNUSED(quality))
{ {
} }
#endif
void wxBitmap::SetOk(bool isOk) void wxBitmap::SetOk(bool isOk)
{ {
if (!M_BITMAPDATA) if (!M_BITMAPDATA)
@@ -1299,9 +1307,11 @@ public:
}; };
IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler) IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight) int desiredWidth, int desiredHeight)
{ {
#if wxUSE_METAFILE
Str255 theName ; Str255 theName ;
wxMacStringToPascal( name , theName ) ; wxMacStringToPascal( name , theName ) ;
@@ -1317,9 +1327,11 @@ bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
dc.SelectObject( wxNullBitmap ) ; dc.SelectObject( wxNullBitmap ) ;
return TRUE ; return TRUE ;
} }
#endif //wxUSE_METAFILE
return FALSE ; return FALSE ;
} }
void wxBitmap::InitStandardHandlers() void wxBitmap::InitStandardHandlers()
{ {
AddHandler(new wxPICTResourceHandler) ; AddHandler(new wxPICTResourceHandler) ;

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_BMPBUTTON
#include "wx/window.h" #include "wx/window.h"
#include "wx/bmpbuttn.h" #include "wx/bmpbuttn.h"
@@ -108,3 +110,5 @@ wxSize wxBitmapButton::DoGetBestSize() const
} }
return best; return best;
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_CHECKBOX
#include "wx/checkbox.h" #include "wx/checkbox.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
@@ -178,4 +180,4 @@ bool wxBitmapCheckBox::GetValue() const
return FALSE; return FALSE;
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_CLIPBOARD
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
@@ -401,3 +403,5 @@ bool wxClipboard::GetData( wxDataObject& data )
delete[] array ; delete[] array ;
return transferred ; return transferred ;
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_COMBOBOX
#include "wx/combobox.h" #include "wx/combobox.h"
#include "wx/button.h" #include "wx/button.h"
#include "wx/menu.h" #include "wx/menu.h"
@@ -645,3 +647,4 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
return noErr ; return noErr ;
} }
#endif

View File

@@ -24,6 +24,8 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_DATAOBJ
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#endif #endif
@@ -331,3 +333,5 @@ bool wxBitmapDataObject::SetData(
return m_bitmap.Ok(); return m_bitmap.Ok();
} }
#endif

View File

@@ -16,6 +16,8 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_PRINTING_ARCHITECTURE
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
@@ -449,4 +451,4 @@ void wxPrinterDC::DoGetSize(int *width, int *height) const
* height = m_nativePrinterDC->GetMaxY() ; * height = m_nativePrinterDC->GetMaxY() ;
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_DIRDLG
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/dirdlg.h" #include "wx/dirdlg.h"
@@ -118,3 +120,4 @@ int wxDirDialog::ShowModal()
return wxID_CANCEL; return wxID_CANCEL;
} }
#endif

View File

@@ -24,6 +24,8 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_FONTMAP
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
@@ -171,3 +173,5 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
return TRUE; return TRUE;
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_LISTBOX
#include "wx/app.h" #include "wx/app.h"
#include "wx/listbox.h" #include "wx/listbox.h"
#include "wx/button.h" #include "wx/button.h"
@@ -902,3 +904,5 @@ void wxListBox::OnChar(wxKeyEvent& event)
#endif // !TARGET_API_MAC_OSX #endif // !TARGET_API_MAC_OSX
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_MDI
#include "wx/mdi.h" #include "wx/mdi.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/settings.h" #include "wx/settings.h"
@@ -394,3 +396,5 @@ void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
{ {
} }
#endif

View File

@@ -22,6 +22,8 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_NOTEBOOK
#include "wx/app.h" #include "wx/app.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h" #include "wx/log.h"
@@ -547,3 +549,5 @@ wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
return status ; return status ;
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/object.h" #include "wx/object.h"
#include "wx/printdlg.h" #include "wx/printdlg.h"
#include "wx/mac/printdlg.h" #include "wx/mac/printdlg.h"
@@ -125,3 +127,5 @@ int wxMacPageSetupDialog::ShowModal()
return result; return result;
} }
#endif

View File

@@ -16,6 +16,8 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_PRINTING_ARCHITECTURE
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
@@ -779,3 +781,5 @@ void wxMacPrintPreview::DetermineScaling(void)
m_previewScale = 1 ; m_previewScale = 1 ;
} }
#endif

View File

@@ -20,6 +20,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_RADIOBOX
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/radiobox.h" #include "wx/radiobox.h"
@@ -580,7 +582,7 @@ int wxRadioBox::GetColumnCount() const
} }
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_RADIOBTN
#include "wx/radiobut.h" #include "wx/radiobut.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
@@ -154,3 +156,5 @@ wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)
return(cycle); return(cycle);
} }
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_STATBMP
#include "wx/statbmp.h" #include "wx/statbmp.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -81,3 +83,5 @@ wxSize wxStaticBitmap::DoGetBestSize() const
return DoGetSizeFromClientSize( wxSize(16, 16) ); return DoGetSizeFromClientSize( wxSize(16, 16) );
} }
#endif

View File

@@ -15,6 +15,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_STATBOX
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -51,3 +53,5 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
return TRUE; return TRUE;
} }
#endif

View File

@@ -36,6 +36,7 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/control.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -449,6 +450,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
currentMouseWindow = wxFindControlFromMacControl( control ) ; currentMouseWindow = wxFindControlFromMacControl( control ) ;
if ( currentMouseWindow == NULL && cEvent.GetKind() == kEventMouseMoved ) if ( currentMouseWindow == NULL && cEvent.GetKind() == kEventMouseMoved )
{ {
#if wxUSE_TOOLBAR
// for wxToolBar to function we have to send certaint events to it // for wxToolBar to function we have to send certaint events to it
// instead of its children (wxToolBarTools) // instead of its children (wxToolBarTools)
ControlRef parent ; ControlRef parent ;
@@ -456,6 +458,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
wxWindow *wxParent = wxFindControlFromMacControl( parent ) ; wxWindow *wxParent = wxFindControlFromMacControl( parent ) ;
if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) ) if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) )
currentMouseWindow = wxParent ; currentMouseWindow = wxParent ;
#endif
} }
} }
} }