]> git.saurik.com Git - wxWidgets.git/commitdiff
wxUSE_XXX related fixes
authorRyan Norton <wxprojects@comcast.net>
Fri, 18 Feb 2005 04:43:47 +0000 (04:43 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 18 Feb 2005 04:43:47 +0000 (04:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

24 files changed:
include/wx/mac/carbon/dcprint.h
include/wx/mac/carbon/tabctrl.h
src/common/cmndata.cpp
src/generic/vlbox.cpp
src/mac/carbon/app.cpp
src/mac/carbon/bitmap.cpp
src/mac/carbon/bmpbuttn.cpp
src/mac/carbon/checkbox.cpp
src/mac/carbon/clipbrd.cpp
src/mac/carbon/combobox.cpp
src/mac/carbon/dataobj.cpp
src/mac/carbon/dcprint.cpp
src/mac/carbon/dirdlg.cpp
src/mac/carbon/fontenum.cpp
src/mac/carbon/listbox.cpp
src/mac/carbon/mdi.cpp
src/mac/carbon/notebmac.cpp
src/mac/carbon/printdlg.cpp
src/mac/carbon/printmac.cpp
src/mac/carbon/radiobox.cpp
src/mac/carbon/radiobut.cpp
src/mac/carbon/statbmp.cpp
src/mac/carbon/statbox.cpp
src/mac/carbon/toplevel.cpp

index dfc39d45594e37ecbe6c77b4074b4d859b4b51e8..2165191bfdc6debfe8eb44c9561483e46e9f0c1f 100644 (file)
@@ -24,9 +24,9 @@ class wxNativePrinterDC ;
 class WXDLLEXPORT wxPrinterDC: public wxDC
 {
  public:
+#if wxUSE_PRINTING_ARCHITECTURE
   DECLARE_CLASS(wxPrinterDC)
 
-#if wxUSE_PRINTING_ARCHITECTURE
   // Create a printer DC
   wxPrinterDC(const wxPrintData& printdata );
   ~wxPrinterDC();
index 3eedfea99ebf9888e080958683134657f2306511..dab9e3995d400a61ed622cf68127da4e973784f3 100644 (file)
@@ -16,6 +16,8 @@
 #pragma interface "tabctrl.h"
 #endif
 
+#include "wx/control.h"
+
 class wxImageList;
 
 /*
index 1896239b729e5a026bffd03c7a24d0b52120e26a..171f85d13009034170a1148e5b00952f3b524ef7 100644 (file)
     #endif
 #endif // MSW
 
-#ifdef __WXMAC__
+    #if wxUSE_PRINTING_ARCHITECTURE
+
+#if defined(__WXMAC__)
     #include "wx/mac/private/print.h"
 #endif
 
-    #if wxUSE_PRINTING_ARCHITECTURE
         IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
         IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject)
         IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject)
index b7175edf6c886d0bc97a05424828b113fecb5a12..ebe2ad77c2450ac73ffaede5d6a8a8b6a29e2000 100644 (file)
@@ -24,6 +24,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_LISTBOX
+
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
     #include "wx/dcclient.h"
@@ -623,3 +625,5 @@ wxVListBox::GetClassDefaultAttributes(wxWindowVariant variant)
 {
     return wxListBox::GetClassDefaultAttributes(variant);
 }
+
+#endif
\ No newline at end of file
index efd5093945b99995030ff5d1217d2bf18df450bd..6dc7ffd402eade0447e830563e057237c0f988c3 100644 (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
 //----------------------------------------------------------------------
 
 void wxApp::MacOpenFile(const wxString & fileName )
 {
+#if wxUSE_DOC_VIEW_ARCHITECTURE
     wxDocManager* dm = wxDocManager::GetDocumentManager() ;
     if ( dm )
         dm->CreateDocument(fileName , wxDOC_SILENT ) ;
+#endif
 }
 
+
 void wxApp::MacPrintFile(const wxString & fileName )
 {
+#if wxUSE_DOC_VIEW_ARCHITECTURE
+
+#if wxUSE_PRINTING_ARCHITECTURE
     wxDocManager* dm = wxDocManager::GetDocumentManager() ;
     if ( dm )
     {
@@ -303,8 +310,13 @@ void wxApp::MacPrintFile(const wxString & fileName )
             }
         }
     }
+#endif //print
+
+#endif //docview
 }
 
+
+
 void wxApp::MacNewFile()
 {
 }
index 02788c2c8ef3f6d2d3cfcee9036df709830737dc..96f0be423e457a50578c61291ceab2e2d99b3bb8 100644 (file)
@@ -1025,11 +1025,15 @@ int wxBitmap::GetDepth() const
    return M_BITMAPDATA->GetDepth();
 }
 
+#if WXWIN_COMPATIBILITY_2_4
+
 int wxBitmap::GetQuality() const
 {
     return 0;
 }
 
+#endif
+
 wxMask *wxBitmap::GetMask() const
 {
    wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") );
@@ -1068,10 +1072,14 @@ void wxBitmap::SetDepth(int d)
     M_BITMAPDATA->SetDepth(d);
 }
 
+#if WXWIN_COMPATIBILITY_2_4
+
 void wxBitmap::SetQuality(int WXUNUSED(quality))
 {
 }
 
+#endif
+
 void wxBitmap::SetOk(bool isOk)
 {
     if (!M_BITMAPDATA)
@@ -1299,9 +1307,11 @@ public:
 };
 IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
 
+
 bool  wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
           int desiredWidth, int desiredHeight)
 {
+#if wxUSE_METAFILE
     Str255 theName ;
     wxMacStringToPascal( name , theName ) ;
 
@@ -1317,9 +1327,11 @@ bool  wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
         dc.SelectObject( wxNullBitmap ) ;
         return TRUE ;
     }
+#endif //wxUSE_METAFILE
     return FALSE ;
 }
 
+
 void wxBitmap::InitStandardHandlers()
 {
     AddHandler(new wxPICTResourceHandler) ;
index 9d944f40b56fee5104dba5897d1825921ff05ba3..84fb35b64ff542115e4f442731e010a4fc8a0a74 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_BMPBUTTON
+
 #include "wx/window.h"
 #include "wx/bmpbuttn.h"
 
@@ -108,3 +110,5 @@ wxSize wxBitmapButton::DoGetBestSize() const
     }
     return best;
 }
+
+#endif
index c8f2f6eda4d43b4fcb5ef0d4e2b7aac5ed488b45..b8ad8a5169b26c3c7f55d4f04bd1a11f82748694 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_CHECKBOX
+
 #include "wx/checkbox.h"
 
 #if !USE_SHARED_LIBRARY
@@ -178,4 +180,4 @@ bool wxBitmapCheckBox::GetValue() const
     return FALSE;
 }
 
-
+#endif
index be0973dd389f72f4bad7ae158fa3f0a800ccf8f0..cda81e29bb5844522846aff0eb45e5de09431361 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_CLIPBOARD
+
 #include "wx/app.h"
 #include "wx/frame.h"
 #include "wx/bitmap.h"
@@ -401,3 +403,5 @@ bool wxClipboard::GetData( wxDataObject& data )
     delete[] array ;
     return transferred ;
 }
+
+#endif
index 535a468371d3c0d1e40a4b0a6a05f841c47bd320..110daa1c21545afef76e1f5df17d90e329eb95cd 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_COMBOBOX
+
 #include "wx/combobox.h"
 #include "wx/button.h"
 #include "wx/menu.h"
@@ -645,3 +647,4 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
     return noErr ;
 }
 
+#endif
index 33e738e0b98df5a000c8b0ad641da0545b084991..ae340be2c558e6d6293975db3cad080fa4a9bc23 100644 (file)
@@ -24,6 +24,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_DATAOBJ
+
 #ifndef WX_PRECOMP
 #include "wx/intl.h"
 #endif
@@ -331,3 +333,5 @@ bool wxBitmapDataObject::SetData(
     
     return m_bitmap.Ok();
 }
+
+#endif
\ No newline at end of file
index d4f91089879ffad423338f63e73f5d5195a4c365..414680e1d0206b706bf96e2acb2a52f6ae9310ef 100644 (file)
@@ -16,6 +16,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_PRINTING_ARCHITECTURE
+
 #ifdef __BORLANDC__
 #pragma hdrstop
 #endif
@@ -449,4 +451,4 @@ void wxPrinterDC::DoGetSize(int *width, int *height) const
         * height = m_nativePrinterDC->GetMaxY() ;
 }
 
-
+#endif
index 259eba0f112401556289b8bf3e49cc76c083eb40..96cbb64de2e8ce0ab35855c93b96427bbcde8ddf 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_DIRDLG
+
 #include "wx/utils.h"
 #include "wx/dialog.h"
 #include "wx/dirdlg.h"
@@ -118,3 +120,4 @@ int wxDirDialog::ShowModal()
     return wxID_CANCEL;
 }
 
+#endif
index 9b48a9fbf2b8f9ba5f819fcf48cc419dcca2287a..ea743eee90ab62aefcd8265724d3158758412c6d 100644 (file)
@@ -24,6 +24,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_FONTMAP
+
 #ifdef __BORLANDC__
   #pragma hdrstop
 #endif
@@ -171,3 +173,5 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
 
     return TRUE;
 }
+
+#endif
index 6e387a01da004003067160c5c703d3e189832ee6..b897ec3b41b4d74b3837efbfe51130e8aada2209 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_LISTBOX
+
 #include "wx/app.h"
 #include "wx/listbox.h"
 #include "wx/button.h"
@@ -902,3 +904,5 @@ void wxListBox::OnChar(wxKeyEvent& event)
 
 #endif // !TARGET_API_MAC_OSX
 
+#endif
+
index c6c11f32c6eddaf9ddc8398155ac3f564a588968..c9798d0151ef1f629fd280c800793a55b26773e6 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_MDI
+
 #include "wx/mdi.h"
 #include "wx/menu.h"
 #include "wx/settings.h"
@@ -394,3 +396,5 @@ void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
 {
 }
 
+#endif
+
index 752b676d79249779fa996b720cbba8891b8f73cf..f6e54f85228c0b9828cb7e795ecd3a609f1d657b 100644 (file)
@@ -22,6 +22,8 @@
 // ----------------------------------------------------------------------------
 #include "wx/wxprec.h"
 
+#if wxUSE_NOTEBOOK
+
 #include "wx/app.h"
 #include "wx/string.h"
 #include "wx/log.h"
@@ -547,3 +549,5 @@ wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
     return status ;
 }
 
+#endif
+
index e39c6dd1337aed4285389da5bf46e8e8a496b335..e44d56bb1966d650ee3b48ff02ed1b7e1f97b994 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_PRINTING_ARCHITECTURE
+
 #include "wx/object.h"
 #include "wx/printdlg.h"
 #include "wx/mac/printdlg.h"
@@ -125,3 +127,5 @@ int wxMacPageSetupDialog::ShowModal()
     return result;
 }
 
+#endif
+
index 834d523ccf5616e65210ae22c0d328d13e2d213a..f7238e84ce68a9501149e89bbe747d6905a77083 100644 (file)
@@ -16,6 +16,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_PRINTING_ARCHITECTURE
+
 #ifdef __BORLANDC__
 #pragma hdrstop
 #endif
@@ -779,3 +781,5 @@ void wxMacPrintPreview::DetermineScaling(void)
     
     m_previewScale = 1 ;
 }
+
+#endif
index 247071078253268ffdb6e064750a256779800ba5..e69336b952e8001440d41b73b4161b70eddfa91a 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_RADIOBOX
+
 #include "wx/arrstr.h"
 
 #include "wx/radiobox.h"
@@ -580,7 +582,7 @@ int wxRadioBox::GetColumnCount() const
     }
 }
 
-
+#endif
 
 
 
index 6819f25a91347fd0e96f28a8347c6561f460ccfa..d3c41879403ca8349293597cbf8b535a21eec909 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_RADIOBTN
+
 #include "wx/radiobut.h"
 
 #if !USE_SHARED_LIBRARY
@@ -154,3 +156,5 @@ wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)
           return(cycle);
       }
 }  
+
+#endif
index cb22a96bed3bc6d1a7d6ea3a3fb68c2969983ec1..1ebe5ec7658216c81a06f34d59fc288783b6ed1b 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_STATBMP
+
 #include "wx/statbmp.h"
 #include "wx/dcclient.h"
 
@@ -81,3 +83,5 @@ wxSize wxStaticBitmap::DoGetBestSize() const
     return DoGetSizeFromClientSize( wxSize(16, 16) ); 
 }
 
+#endif
+
index c2d3460d412562abdefae490e5f5f1429d3f8db4..23b359dcb223a55ef200137d48a9be1e1411be77 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/wxprec.h"
 
+#if wxUSE_STATBOX
+
 #include "wx/statbox.h"
 #include "wx/mac/uma.h"
 
@@ -51,3 +53,5 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
     
     return TRUE;
 }
+
+#endif
\ No newline at end of file
index d4f3e31c9712b8ece44f3b536cca021f038aa468..fac851267e03578afc61cb285e52b68c93bc09b2 100644 (file)
@@ -36,6 +36,7 @@
     #include "wx/log.h"
     #include "wx/intl.h"
     #include "wx/settings.h"
+    #include "wx/control.h"
 #endif //WX_PRECOMP
 
 #include "wx/mac/uma.h"
@@ -449,6 +450,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
                 currentMouseWindow = wxFindControlFromMacControl( control ) ;
                 if ( currentMouseWindow == NULL && cEvent.GetKind() == kEventMouseMoved )
                 {
+#if wxUSE_TOOLBAR
                        // for wxToolBar to function we have to send certaint events to it
                        // instead of its children (wxToolBarTools)     
                     ControlRef parent ;
@@ -456,6 +458,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
                     wxWindow *wxParent = wxFindControlFromMacControl( parent ) ;
                     if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) )
                         currentMouseWindow = wxParent ;
+#endif
                 }
             }
         }