fixes for compiling with more stuff disabled in setup.h (patch 889211)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-02-07 14:26:00 +00:00
parent bad79f58af
commit 461dae941d
8 changed files with 53 additions and 5 deletions

View 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

View 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

View 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
// ----------------------------------------------------------------------------

View 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));

View 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

View 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),

View 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 "));

View 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