added missing wxUSE_XXX checks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-10 23:59:42 +00:00
parent a59bbda13f
commit 28fcfbfe09
4 changed files with 32 additions and 3 deletions

View File

@@ -23,6 +23,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_BUTTON
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/button.h" #include "wx/button.h"
#include "wx/toplevel.h" #include "wx/toplevel.h"
@@ -42,3 +44,4 @@ wxWindow *wxButtonBase::SetDefault()
return tlw->SetDefaultItem(this); return tlw->SetDefaultItem(this);
} }
#endif // wxUSE_BUTTON

View File

@@ -119,6 +119,8 @@ static void gtk_toolbar_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidge
// InsertChild for wxFrame // InsertChild for wxFrame
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_TOOLBAR
/* Callback for wxFrame. This very strange beast has to be used because /* Callback for wxFrame. This very strange beast has to be used because
* C++ has no virtual methods in a constructor. We have to emulate a * C++ has no virtual methods in a constructor. We have to emulate a
* virtual function here as wxWidgets requires different ways to insert * virtual function here as wxWidgets requires different ways to insert
@@ -152,9 +154,11 @@ static void wxInsertChildInFrame(wxWindow* parent, wxWindow* child)
parent); parent);
} }
} }
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR_NATIVE
} }
#endif // wxUSE_TOOLBAR
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxFrame creation // wxFrame creation
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -242,7 +246,21 @@ bool wxFrame::ShowFullScreen(bool show, long style)
return false; return false;
wxWindow* const bar[] = { wxWindow* const bar[] = {
m_frameMenuBar, m_frameToolBar, m_frameStatusBar #if wxUSE_MENUS
m_frameMenuBar,
#else
NULL,
#endif
#if wxUSE_TOOLBAR
m_frameToolBar,
#else
NULL,
#endif
#if wxUSE_STATUSBAR
m_frameStatusBar,
#else
NULL,
#endif
}; };
const long fsNoBar[] = { const long fsNoBar[] = {
wxFULLSCREEN_NOMENUBAR, wxFULLSCREEN_NOTOOLBAR, wxFULLSCREEN_NOSTATUSBAR wxFULLSCREEN_NOMENUBAR, wxFULLSCREEN_NOTOOLBAR, wxFULLSCREEN_NOSTATUSBAR

View File

@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/menu.cpp // Name: src/gtk/menu.cpp
// Purpose: // Purpose: implementation of wxMenuBar and wxMenu classes for wxGTK
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
@@ -10,6 +10,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_MENUS
#include "wx/menu.h" #include "wx/menu.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
@@ -1792,3 +1794,5 @@ bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key)
} }
#endif // __WXGTK20__ #endif // __WXGTK20__
#endif // wxUSE_MENUS

View File

@@ -10,6 +10,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_TEXTCTRL
#include "wx/textctrl.h" #include "wx/textctrl.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
@@ -1989,3 +1991,5 @@ wxTextCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
{ {
return GetDefaultAttributesFromGTKWidget(gtk_entry_new, true); return GetDefaultAttributesFromGTKWidget(gtk_entry_new, true);
} }
#endif // wxUSE_TEXTCTRL