]> git.saurik.com Git - wxWidgets.git/commitdiff
added a few #ifdefs needed to build a smaller library (patch 751523)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 Jun 2003 13:00:55 +0000 (13:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 Jun 2003 13:00:55 +0000 (13:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/dragimgg.h
include/wx/msw/dragimag.h
include/wx/tbarsmpl.h
src/common/prntbase.cpp
src/common/timercmn.cpp
src/generic/dragimgg.cpp
src/generic/tbarsmpl.cpp
src/msw/dc.cpp
src/msw/dragimag.cpp
src/msw/popupwin.cpp
src/msw/statbr95.cpp

index cbfa4afb43ce4ab9f91d7580ab086c3b5999a1bf..6b2ec08dc89335ef4c2bd5377cebdb9a5299f461 100644 (file)
@@ -156,19 +156,24 @@ public:
         Create(str, cursor, cursorHotspot);
     }
 
+#if wxUSE_TREECTRL
     wxGenericDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
     {
         Init();
 
         Create(treeCtrl, id);
     }
+#endif
 
+#if wxUSE_LISTCTRL
     wxGenericDragImage(const wxListCtrl& listCtrl, long id)
     {
         Init();
 
         Create(listCtrl, id);
     }
+#endif
+
     ~wxGenericDragImage();
 
     // Attributes
@@ -213,11 +218,15 @@ public:
         return Create(str, cursor);
     }
 
+#if wxUSE_TREECTRL
     // Create a drag image for the given tree control item
     bool Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
+#endif
 
+#if wxUSE_LISTCTRL
     // Create a drag image for the given list control item
     bool Create(const wxListCtrl& listCtrl, long id);
+#endif
 
     // Begin drag. hotspot is the location of the drag position relative to the upper-left
     // corner of the image.
index 49b745c8363fc07472aeb35bb16ed5138e94c76c..90477b6ab4f376407ee11fa41762dc29b4832312 100644 (file)
@@ -154,19 +154,23 @@ public:
         Create(str, cursor, cursorHotspot);
     }
 
+#if wxUSE_TREECTRL
     wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
     {
         Init();
 
         Create(treeCtrl, id);
     }
+#endif
 
+#if wxUSE_LISTCTRL
     wxDragImage(const wxListCtrl& listCtrl, long id)
     {
         Init();
 
         Create(listCtrl, id);
     }
+#endif
 
     ~wxDragImage();
 
@@ -200,11 +204,15 @@ public:
         return Create(str, cursor);
     }
 
+#if wxUSE_TREECTRL
     // Create a drag image for the given tree control item
     bool Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
+#endif
 
+#if wxUSE_LISTCTRL
     // Create a drag image for the given list control item
     bool Create(const wxListCtrl& listCtrl, long id);
+#endif
 
     // Begin drag. hotspot is the location of the drag position relative to the upper-left
     // corner of the image.
index 3c602d915411ff2e22e91247f57843bcb91b895e..7d689840228221383a3f7a6ccce869c5c9616469 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "wx/tbarbase.h"
 
-#if wxUSE_TOOLBAR_SIMPLE
+#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_SIMPLE
 
 class WXDLLEXPORT wxMemoryDC;
 
index fc2df6a7057e1c968aaf934fbecb31d4588668e2..4f5860323fb3c54ff39c4aabd6522399fa81f44d 100644 (file)
@@ -547,7 +547,9 @@ void wxPreviewFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 
 void wxPreviewFrame::Initialize()
 {
+#if wxUSE_STATUSBAR
     CreateStatusBar();
+#endif
     CreateCanvas();
     CreateControlBar();
 
@@ -780,14 +782,16 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
 
     memoryDC.SelectObject(wxNullBitmap);
 
-    wxChar buf[200];
+#if wxUSE_STATUSBAR
+    wxString status;
     if (m_maxPage != 0)
-        wxSprintf(buf, _("Page %d of %d"), pageNum, m_maxPage);
+               status = wxString::Format(_("Page %d of %d"), pageNum, m_maxPage);
     else
-        wxSprintf(buf, _("Page %d"), pageNum);
+               status = wxString::Format(_("Page %d"), pageNum);
 
     if (m_previewFrame)
-        m_previewFrame->SetStatusText(buf);
+        m_previewFrame->SetStatusText(status);
+#endif
 
     return TRUE;
 }
index 767ce02e29216e4c5bd343cf775889839187a6d9..b6e7e918dd3b551f6459bc6615057057f1f70c20 100644 (file)
@@ -163,7 +163,7 @@ bool wxTimerBase::Start(int milliseconds, bool oneShot)
 // wxStopWatch
 // ----------------------------------------------------------------------------
 
-#if wxUSE_LONGLONG
+#if wxUSE_STOPWATCH && wxUSE_LONGLONG
 
 void wxStopWatch::Start(long t)
 {
@@ -404,5 +404,5 @@ wxLongLong wxGetLocalTimeMillis()
 #endif // time functions
 }
 
-#endif // wxUSE_LONGLONG
+#endif // #if wxUSE_STOPWATCH && wxUSE_LONGLONG
 
index 8e89afe82318693ad26a052c3238ceaa5629a62e..9d6ae54d2991c8f6e88d7abc39c0634e22181e9b 100644 (file)
@@ -172,19 +172,23 @@ bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor)
     return Create(bitmap, cursor);
 }
 
+#if wxUSE_TREECTRL
 // Create a drag image for the given tree control item
 bool wxGenericDragImage::Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
 {
     wxString str = treeCtrl.GetItemText(id);
     return Create(str);
 }
+#endif
 
+#if wxUSE_LISTCTRL
 // Create a drag image for the given list control item
 bool wxGenericDragImage::Create(const wxListCtrl& listCtrl, long id)
 {
     wxString str = listCtrl.GetItemText(id);
     return Create(str);
 }
+#endif
 
 // Begin drag
 bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
index 33d24e417864825d729f618c6c5f30c117cf791c..f6dbd31a5543567f486e2aef5bfdfcac5c4a455e 100644 (file)
@@ -28,7 +28,7 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_TOOLBAR_SIMPLE
+#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_SIMPLE
 
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
index 190526870a23c07916285f508b3ae16736b253b2..8caa96a2e7df9b950a12eac3346d7e5de65b9a66 100644 (file)
@@ -2280,7 +2280,7 @@ static bool AlphaBlt(HDC hdcDst,
     wxASSERT_MSG( hdcDst && hdcSrc, _T("AlphaBlt(): invalid HDC") );
 
     // do we have AlphaBlend() and company in the headers?
-#ifdef AC_SRC_OVER
+#if defined(AC_SRC_OVER) && wxUSE_DYNLIB_CLASS
     // yes, now try to see if we have it during run-time
     typedef BOOL (WINAPI *AlphaBlend_t)(HDC,int,int,int,int,
                                         HDC,int,int,int,int,
index a1dfb5b4b9fba2995aa1254d587e8a8648f4cffa..7bb4c4def18ceb84482684bc6748bf2702892018 100644 (file)
@@ -237,6 +237,7 @@ bool wxDragImage::Create(const wxString& str, const wxCursor& cursor)
     return Create(wxBitmap(image), cursor);
 }
 
+#if wxUSE_TREECTRL
 // Create a drag image for the given tree control item
 bool wxDragImage::Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
 {
@@ -245,7 +246,9 @@ bool wxDragImage::Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
     m_hImageList = (WXHIMAGELIST) TreeView_CreateDragImage((HWND) treeCtrl.GetHWND(), (HTREEITEM) (WXHTREEITEM) id);
     return TRUE;
 }
+#endif
 
+#if wxUSE_LISTCTRL
 // Create a drag image for the given list control item
 bool wxDragImage::Create(const wxListCtrl& listCtrl, long id)
 {
@@ -256,6 +259,7 @@ bool wxDragImage::Create(const wxListCtrl& listCtrl, long id)
     m_hImageList = (WXHIMAGELIST) ListView_CreateDragImage((HWND) listCtrl.GetHWND(), id, & pt);
     return TRUE;
 }
+#endif
 
 // Begin drag
 bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen, wxRect* rect)
index a9c0676ae3968e9e4cc4ce54f0b770bbf076def1..7e44f08a0e3b2798e3795d8e1ae98e96d4e370c5 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef WX_PRECOMP
 #endif //WX_PRECOMP
 
+#if wxUSE_POPUPWIN
+
 #include "wx/popupwin.h"
 
 #include "wx/msw/private.h"     // for GetDesktopWindow()
@@ -85,3 +87,4 @@ WXHWND wxPopupWindow::MSWGetParent() const
     return (WXHWND)::GetDesktopWindow();
 }
 
+#endif // #if wxUSE_POPUPWIN
index 3205e849714a776441700e92e69682b02e73dde0..d28a6b8ae85c9c5a8f4583087472fbb7992cd26b 100644 (file)
@@ -27,7 +27,7 @@
   #include "wx/dcclient.h"
 #endif
 
-#if defined(__WIN95__) && wxUSE_NATIVE_STATUSBAR
+#if wxUSE_STATUSBAR && defined(__WIN95__) && wxUSE_NATIVE_STATUSBAR
 
 #include "wx/intl.h"
 #include "wx/log.h"