]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes for compiling with more stuff disabled in setup.h (patch 889211)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2004 14:26:00 +0000 (14:26 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2004 14:26:00 +0000 (14:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/appcmn.cpp
src/generic/htmllbox.cpp
src/generic/logg.cpp
src/generic/wizard.cpp
src/msw/accel.cpp
src/msw/cursor.cpp
src/msw/nativdlg.cpp
src/msw/ole/dataobj.cpp

index 769a9d18b5e4be5e8a9a39852a4d2809af0b4347..1255c30938d3d6499a47d5367995d0817c8620e9 100644 (file)
@@ -465,7 +465,12 @@ void wxAppBase::OnIdle(wxIdleEvent& WXUNUSED(event))
 
 wxLog *wxGUIAppTraitsBase::CreateLogTarget()
 {
+#if wxUSE_LOGGUI
     return new wxLogGui;
+#else
+    // wem ust have something!
+    return new wxLogStderr;
+#endif
 }
 
 #endif // wxUSE_LOG
index 4bbcf8399baff505f4368e88e452d4da4eb6752a..91be6e7ac756d2dd420cee12483872011d9e2535 100644 (file)
@@ -28,6 +28,8 @@
     #include "wx/dcclient.h"
 #endif //WX_PRECOMP
 
+#if wxUSE_HTML
+
 #include "wx/htmllbox.h"
 
 #include "wx/html/htmlcell.h"
@@ -315,3 +317,4 @@ wxCoord wxHtmlListBox::OnMeasureItem(size_t n) const
     return cell->GetHeight() + cell->GetDescent() + 4;
 }
 
+#endif
index eb5e17745cf06451b174dcd27fcccec8343439a6..5871419db7989df252cf728b443de301799d24db 100644 (file)
@@ -224,6 +224,8 @@ void wxLogStatus(wxFrame *pFrame, const wxChar *szFormat, ...)
 // wxLogGui implementation (FIXME MT-unsafe)
 // ----------------------------------------------------------------------------
 
+#if wxUSE_LOGGUI
+
 wxLogGui::wxLogGui()
 {
     Clear();
@@ -420,6 +422,8 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
     }
 }
 
+#endif   // wxUSE_LOGGUI
+
 // ----------------------------------------------------------------------------
 // wxLogWindow and wxLogFrame implementation
 // ----------------------------------------------------------------------------
index bb0e6c60482ea23c386b885b2a9ccefe74fe6c05..bd75dd976025bd9f3e6679be7f6492b6f9118809 100644 (file)
@@ -309,6 +309,7 @@ void wxWizard::AddBitmapRow(wxBoxSizer *mainColumn)
         wxEXPAND // No border, (mostly useless) horizontal stretching
     );
 
+#if wxUSE_STATBMP
     if ( m_bitmap.Ok() )
     {
         m_statbmp = new wxStaticBitmap(this, -1, m_bitmap);
@@ -324,6 +325,7 @@ void wxWizard::AddBitmapRow(wxBoxSizer *mainColumn)
             wxEXPAND // No border, (mostly useless) vertical stretching
         );
     }
+#endif
 
     // Added to m_sizerBmpAndPage in FinishLayout
     m_sizerPage = new wxWizardSizer(this);
@@ -555,6 +557,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
         bmpIsDefault = FALSE;
     }
 
+#if wxUSE_STATBMP
     // change the bitmap if:
     // 1) a default bitmap was selected in constructor
     // 2) this page was constructed with a bitmap
@@ -568,6 +571,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
             bmp = m_page->GetBitmap();
         m_statbmp->SetBitmap(bmp);
     }
+#endif
 
     // and update the buttons state
     m_btnPrev->Enable(HasPrevPage(m_page));
index 563ce9929ce8b148886ac22311929672dc8deba2..b25c03c146069bac93d02046fe1019f8547704b1 100644 (file)
@@ -26,6 +26,8 @@
 
 #include "wx/accel.h"
 
+#if wxUSE_ACCEL
+
 #include "wx/msw/private.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
@@ -166,3 +168,4 @@ bool wxAcceleratorTable::Translate(wxWindow *window, WXMSG *wxmsg) const
     return Ok() && ::TranslateAccelerator(GetHwndOf(window), GetHaccel(), msg);
 }
 
+#endif
index 6333efd1879a61f74b76b62b48c5e3aadb9e153e..bd27803b409b3af552df65d922d5ea929c02193b 100644 (file)
@@ -172,6 +172,7 @@ wxCursor::wxCursor()
 {
 }
 
+#if wxUSE_IMAGE
 wxCursor::wxCursor(const wxImage& image)
 {
     // image has to be of the standard cursor size, otherwise we won't be able
@@ -200,6 +201,7 @@ wxCursor::wxCursor(const wxImage& image)
 
     m_refData = new wxCursorRefData(hcursor, true /* delete it later */);
 }
+#endif
 
 wxCursor::wxCursor(const char WXUNUSED(bits)[],
                    int WXUNUSED(width),
index 9c8c53505cb4a62ab78781064cac64ba4fceade6..519176b336ca6a310567111baa1c08c4272a19cb 100644 (file)
@@ -185,25 +185,32 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
     if (str == wxT("BUTTON"))
     {
         int style1 = (style & 0xFF);
+#if wxUSE_CHECKBOX
         if ((style1 == BS_3STATE) || (style1 == BS_AUTO3STATE) || (style1 == BS_AUTOCHECKBOX) ||
             (style1 == BS_CHECKBOX))
         {
             win = new wxCheckBox;
         }
-        else if ((style1 == BS_AUTORADIOBUTTON) || (style1 == BS_RADIOBUTTON))
+        else
+#endif
+#if wxUSE_RADIOBTN
+        if ((style1 == BS_AUTORADIOBUTTON) || (style1 == BS_RADIOBUTTON))
         {
             win = new wxRadioButton;
         }
+        else
+#endif
 #if wxUSE_BMPBUTTON
 #if defined(__WIN32__) && defined(BS_BITMAP)
-        else if (style & BS_BITMAP)
+        if (style & BS_BITMAP)
         {
             // TODO: how to find the bitmap?
             win = new wxBitmapButton;
             wxLogError(wxT("Have not yet implemented bitmap button as BS_BITMAP button."));
         }
+        else
 #endif
-        else if (style1 == BS_OWNERDRAW)
+        if (style1 == BS_OWNERDRAW)
         {
             // TODO: how to find the bitmap?
             // TODO: can't distinguish between bitmap button and bitmap static.
@@ -213,25 +220,34 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
             // with a switch in the drawing code. Call default proc if BS_BITMAP.
             win = new wxBitmapButton;
         }
+        else
 #endif
-        else if ((style1 == BS_PUSHBUTTON) || (style1 == BS_DEFPUSHBUTTON))
+#if wxUSE_BUTTON
+        if ((style1 == BS_PUSHBUTTON) || (style1 == BS_DEFPUSHBUTTON))
         {
             win = new wxButton;
         }
-        else if (style1 == BS_GROUPBOX)
+        else
+#endif
+#if wxUSE_STATBOX
+        if (style1 == BS_GROUPBOX)
         {
             win = new wxStaticBox;
         }
         else
+#endif
         {
             wxLogError(wxT("Don't know what kind of button this is: id = %ld"),
                        id);
         }
     }
+#if wxUSE_COMBOBOX
     else if (str == wxT("COMBOBOX"))
     {
         win = new wxComboBox;
     }
+#endif
+#if wxUSE_TEXTCTRL
     // TODO: Problem if the user creates a multiline - but not rich text - text control,
     // since wxWin assumes RichEdit control for this. Should have m_isRichText in
     // wxTextCtrl. Also, convert as much of the window style as is necessary
@@ -242,14 +258,19 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
     {
         win = new wxTextCtrl;
     }
+#endif
+#if wxUSE_LISTBOX
     else if (str == wxT("LISTBOX"))
     {
         win = new wxListBox;
     }
+#endif
+#if wxUSE_SCROLLBAR
     else if (str == wxT("SCROLLBAR"))
     {
         win = new wxScrollBar;
     }
+#endif
 #if defined(__WIN95__) && wxUSE_SPINBTN
     else if (str == wxT("MSCTLS_UPDOWN32"))
     {
@@ -263,6 +284,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
         win = new wxSlider;
     }
 #endif // wxUSE_SLIDER
+#if wxUSE_STATTEXT
     else if (str == wxT("STATIC"))
     {
         int style1 = (style & 0xFF);
@@ -285,6 +307,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
 #endif
 #endif /* wxUSE_STATBMP */
     }
+#endif
     else
     {
         wxString msg(wxT("Don't know how to convert from Windows class "));
index 6a4ef3067093f861ca6eaf076866bf11a0d1e41d..68d5aa77fa65dc51f18759c9ca712d04bc27155a 100644 (file)
@@ -1220,6 +1220,8 @@ static const wxChar *GetTymedName(DWORD tymed)
 // wxDataObject
 // ----------------------------------------------------------------------------
 
+#if wxUSE_DATAOBJ
+
 wxDataObject::wxDataObject()
 {
 }
@@ -1241,3 +1243,5 @@ const wxChar *wxDataObject::GetFormatName(wxDataFormat format)
 
 #endif
 
+#endif
+