1. some more of "#if wxUSE_XXX" here and there

2. Makefile fixes for Cygwin compilation


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-13 22:54:04 +00:00
parent a9b5e89f5f
commit d427503c36
19 changed files with 306 additions and 231 deletions

View File

@@ -60,22 +60,6 @@ enum
wxCONFIG_USE_RELATIVE_PATH = 4
};
// ----------------------------------------------------------------------------
// various helper global functions
// ----------------------------------------------------------------------------
/*
Replace environment variables ($SOMETHING) with their values. The format is
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally.
*/
extern wxString wxExpandEnvVars(const wxString &sz);
/*
Split path into parts removing '..' in progress
*/
extern void wxSplitPath(wxArrayString& aParts, const wxChar *sz);
// ----------------------------------------------------------------------------
// abstract base class wxConfigBase which defines the interface for derived
// classes
@@ -311,9 +295,23 @@ private:
#define sm_classwxConfig sm_classwxFileConfig
#endif
#endif
#endif // wxUSE_CONFIG
// wxUSE_CONFIG
// ----------------------------------------------------------------------------
// various helper global functions (defined even if !wxUSE_CONFIG)
// ----------------------------------------------------------------------------
/*
Replace environment variables ($SOMETHING) with their values. The format is
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally.
*/
extern wxString wxExpandEnvVars(const wxString &sz);
/*
Split path into parts removing '..' in progress
*/
extern void wxSplitPath(wxArrayString& aParts, const wxChar *sz);
#endif
// _WX_CONFIG_H_

View File

@@ -16,6 +16,8 @@
#pragma interface "dcprint.h"
#endif
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/dc.h"
#include "wx/cmndata.h"
@@ -49,6 +51,8 @@ protected:
// Gets an HDC for the specified printer configuration
WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& data);
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif
// _WX_DCPRINT_H_

View File

@@ -85,6 +85,7 @@ public:
virtual void SetIcon(const wxIcon& icon);
// Toolbar
#if wxUSE_TOOLBAR
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
wxWindowID id = -1,
const wxString& name = wxToolBarNameStr);
@@ -95,7 +96,9 @@ public:
virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
virtual void PositionToolBar();
#endif // wxUSE_TOOLBAR
#if wxUSE_STATUSBAR
// Status bar
virtual wxStatusBar* CreateStatusBar(int number = 1,
long style = wxST_SIZEGRIP,
@@ -121,6 +124,7 @@ public:
// TODO: should this go into a wxFrameworkSettings class perhaps?
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
static bool UsesNativeStatusBar() { return m_useNativeStatusBar; };
#endif // wxUSE_STATUSBAR
// Iconize
virtual void Iconize(bool iconize);
@@ -191,13 +195,19 @@ protected:
long MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
wxMenuBar * m_frameMenuBar;
wxStatusBar * m_frameStatusBar;
wxIcon m_icon;
bool m_iconized;
WXHICON m_defaultIcon;
wxToolBar * m_frameToolBar;
#if wxUSE_STATUSBAR
wxStatusBar * m_frameStatusBar;
static bool m_useNativeStatusBar;
#endif // wxUSE_STATUSBAR
#if wxUSE_TOOLBAR
wxToolBar * m_frameToolBar;
#endif // wxUSE_TOOLBAR
private:
#if wxUSE_TOOLTIPS

View File

@@ -126,8 +126,10 @@ public:
void Attach(wxMenuBar *menubar);
void Detach();
#if wxUSE_ACCEL
size_t GetAccelCount() const { return m_accelKeyCodes.GetCount(); }
size_t CopyAccels(wxAcceleratorEntry *accels) const;
#endif // wxUSE_ACCEL
#ifdef WXWIN_COMPATIBILITY
void Callback(const wxFunction func) { m_callback = func; }
@@ -160,8 +162,10 @@ private:
wxWindow *m_pInvokingWindow;
void* m_clientData;
#if wxUSE_ACCEL
// the accelerators data
wxArrayInt m_accelKeyCodes, m_accelFlags, m_accelIds;
#endif // wxUSE_ACCEL
};
// ----------------------------------------------------------------------------
@@ -246,8 +250,11 @@ public:
// attach to a frame
void Attach(wxFrame *frame);
#if wxUSE_ACCEL
// get the accel table for the menus
const wxAcceleratorTable& GetAccelTable() const { return m_accelTable; }
#endif // wxUSE_ACCEL
// get the menu handle
WXHMENU GetHMenu() const { return m_hMenu; }
@@ -266,8 +273,10 @@ protected:
wxFrame *m_menuBarFrame;
WXHMENU m_hMenu;
#if wxUSE_ACCEL
// the accelerator table for all accelerators in all our menus
wxAcceleratorTable m_accelTable;
#endif // wxUSE_ACCEL
};
#endif // _WX_MENU_H_

View File

@@ -16,6 +16,8 @@
#pragma interface "printdlg.h"
#endif
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/dialog.h"
#include "wx/cmndata.h"
@@ -68,5 +70,7 @@ private:
wxWindow* m_dialogParent;
};
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif
// _WX_PRINTDLG_H_

View File

@@ -20,6 +20,7 @@
#include "wx/msw/winundef.h"
class WXDLLEXPORT wxFont;
class WXDLLEXPORT wxWindow;
// ---------------------------------------------------------------------------
// private constants

View File

@@ -179,6 +179,8 @@
#define wxUSE_ACCEL 1
#define wxUSE_SASH 1
#define wxUSE_TEXTDLG 1
#define wxUSE_TOOLBAR 1
#define wxUSE_STATUSBAR 1
/*
* Finer detail

View File

@@ -6,7 +6,7 @@
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TBAR95_H_
@@ -16,7 +16,7 @@
#pragma interface "tbar95.h"
#endif
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR
#if wxUSE_TOOLBAR
#include "wx/tbarbase.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
@@ -89,6 +89,7 @@ protected:
DECLARE_EVENT_TABLE()
};
#endif // wxUSE_TOOL/BUTTONBAR
#endif // wxUSE_TOOLBAR
#endif
// _WX_TBAR95_H_

View File

@@ -15,6 +15,7 @@
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#ifdef __GNUG__
#pragma interface "treectrl.h"
#endif
@@ -23,6 +24,12 @@
#include "wx/event.h"
#include "wx/textctrl.h"
#ifdef __GNUWIN32__
// Cygwin windows.h defines these identifiers
#undef GetFirstChild
#undef GetNextSibling
#endif // Cygwin
// the type for "untyped" data
typedef long wxDataType;

View File

@@ -17,6 +17,9 @@
#endif
#include "wx/defs.h"
#if wxUSE_PRINTING_ARCHITECTURE
#include "wx/event.h"
#include "wx/cmndata.h"
#include "wx/panel.h"
@@ -367,5 +370,7 @@ private:
DECLARE_EVENT_TABLE()
};
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif
// _WX_PRNTBASEH__