the library and the sample build with everything off, various wxUSE_XXX

options now really take effect (i.e. can be disabled without breaking
compilation)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-08-11 13:16:58 +00:00
parent 65ab4b2f93
commit eeb2c17a67
92 changed files with 3000 additions and 1435 deletions

2501
configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,8 @@
# FIXME we'll generate this makefile with configure later, but for now please # FIXME we'll generate this makefile with configure later, but for now please
# change it manually # change it manually
TMAKEDIR=/home/zeitlin/build/tmake #TMAKEDIR=/home/zeitlin/build/tmake
TMAKE=$(TMAKEDIR)/bin/tmake #TMAKE=$(TMAKEDIR)/bin/tmake
TMAKE=tmake
WXDIR=../../.. WXDIR=../../..
MSW_MAKEFILES_DIR=$(WXDIR)/src/msw MSW_MAKEFILES_DIR=$(WXDIR)/src/msw

View File

@@ -44,6 +44,7 @@
# P Not required for the os2Pm port # P Not required for the os2Pm port
# (unfortunately I can't use O since that is # (unfortunately I can't use O since that is
# in use already - and above I can't use P :-( ) # in use already - and above I can't use P :-( )
# L Low level GUI toolkit file, used by wxUniversal as well
# #
# WX Base header # WX Base header
# GTK GTK header # GTK GTK header
@@ -326,49 +327,49 @@ gsocket.c U B
mimetype.cpp U B mimetype.cpp U B
gsockgtk.c R gsockgtk.c R
win_gtk.c R win_gtk.c R L
accel.cpp R accel.cpp R
app.cpp R app.cpp R L
bitmap.cpp R bitmap.cpp R L
bmpbuttn.cpp R bmpbuttn.cpp R
brush.cpp R brush.cpp R L
button.cpp R button.cpp R
checkbox.cpp R checkbox.cpp R
checklst.cpp R checklst.cpp R
choice.cpp R choice.cpp R
clipbrd.cpp R clipbrd.cpp R
colour.cpp R colour.cpp R L
combobox.cpp R combobox.cpp R
control.cpp R control.cpp R
cursor.cpp R cursor.cpp R L
data.cpp R data.cpp R L
dataobj.cpp R dataobj.cpp R
dc.cpp R dc.cpp R L
dcclient.cpp R dcclient.cpp R L
dcmemory.cpp R dcmemory.cpp R L
dcscreen.cpp R dcscreen.cpp R L
dialog.cpp R dialog.cpp R L
dnd.cpp R dnd.cpp R
font.cpp R font.cpp R L
fontdlg.cpp R fontdlg.cpp R
frame.cpp R frame.cpp R L
gauge.cpp R gauge.cpp R
gdiobj.cpp R gdiobj.cpp R L
icon.cpp R icon.cpp R L
joystick.cpp R joystick.cpp R
listbox.cpp R listbox.cpp R
main.cpp R main.cpp R L
mdi.cpp R mdi.cpp R
menu.cpp R menu.cpp R
minifram.cpp R minifram.cpp R
notebook.cpp R notebook.cpp R
palette.cpp R palette.cpp R L
pen.cpp R pen.cpp R L
radiobox.cpp R radiobox.cpp R
radiobut.cpp R radiobut.cpp R
region.cpp R region.cpp R L
scrolbar.cpp R scrolbar.cpp R
settings.cpp R settings.cpp R L
slider.cpp R slider.cpp R
spinbutt.cpp R spinbutt.cpp R
spinctrl.cpp R spinctrl.cpp R
@@ -380,10 +381,10 @@ tbargtk.cpp R
textctrl.cpp R textctrl.cpp R
timer.cpp R timer.cpp R
tooltip.cpp R tooltip.cpp R
utilsgtk.cpp R utilsgtk.cpp R L
utilsres.cpp R utilsres.cpp R
wave.cpp R wave.cpp R
window.cpp R window.cpp R L
gsockmot.c X S gsockmot.c X S
accel.cpp X accel.cpp X

View File

@@ -44,7 +44,12 @@
$project{"GTK_SOURCES"} .= "gtk/" . $file . " "; $project{"GTK_SOURCES"} .= "gtk/" . $file . " ";
$project{"GUIOBJS"} .= $fileobj . " "; $project{"GUIOBJS"} .= $fileobj . " ";
$project{"GUIDEPS"} .= $filedep . " " $project{"GUIDEPS"} .= $filedep . " ";
if ( $wxGTK{$file} =~ /\bL\b/ ) {
$project{"GUI_LOWLEVEL_OBJS"} .= $fileobj . " ";
$project{"GUI_LOWLEVEL_DEPS"} .= $filedep . " ";
}
} }
foreach $file (sort keys %wxUNIX) { foreach $file (sort keys %wxUNIX) {
@@ -64,7 +69,7 @@
$project{"HTMLOBJS"} .= $fileobj . " "; $project{"HTMLOBJS"} .= $fileobj . " ";
$project{"HTMLDEPS"} .= $filedep . " " $project{"HTMLDEPS"} .= $filedep . " "
} }
#! find all our headers #! find all our headers
foreach $file (sort keys %wxWXINCLUDE) { foreach $file (sort keys %wxWXINCLUDE) {
$project{"GTK_HEADERS"} .= $file . " " $project{"GTK_HEADERS"} .= $file . " "
@@ -116,6 +121,12 @@ GUIOBJS = \
GUIDEPS = \ GUIDEPS = \
#$ ExpandList("GUIDEPS"); #$ ExpandList("GUIDEPS");
GUI_LOWLEVEL_OBJS = \
#$ ExpandList("GUI_LOWLEVEL_OBJS");
GUI_LOWLEVEL_DEPS = \
#$ ExpandList("GUI_LOWLEVEL_DEPS");
UNIXOBJS = \ UNIXOBJS = \
#$ ExpandList("UNIXOBJS"); #$ ExpandList("UNIXOBJS");

View File

@@ -198,11 +198,11 @@ public:
// object) - this log object is used by default by all wxLogXXX() // object) - this log object is used by default by all wxLogXXX()
// functions. // functions.
virtual wxLog *CreateLogTarget() virtual wxLog *CreateLogTarget()
#if wxUSE_GUI #if wxUSE_GUI && wxUSE_LOGGUI
{ return new wxLogGui; } { return new wxLogGui; }
#else // !GUI #else // !GUI
{ return new wxLogStderr; } { return new wxLogStderr; }
#endif // wxUSE_GUI #endif // wxUSE_GUI
#endif // wxUSE_LOG #endif // wxUSE_LOG
#if wxUSE_GUI #if wxUSE_GUI

View File

@@ -1,6 +1,8 @@
#ifndef _WX_BUTTON_H_BASE_ #ifndef _WX_BUTTON_H_BASE_
#define _WX_BUTTON_H_BASE_ #define _WX_BUTTON_H_BASE_
#if wxUSE_BUTTON
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/button.h" #include "wx/msw/button.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
@@ -17,5 +19,7 @@
#include "wx/stubs/button.h" #include "wx/stubs/button.h"
#endif #endif
#endif // wxUSE_BUTTON
#endif #endif
// _WX_BUTTON_H_BASE_ // _WX_BUTTON_H_BASE_

70
include/wx/chkconf.h Normal file
View File

@@ -0,0 +1,70 @@
/*
* Name: wx/chkconf.h
* Purpose: check the config settings for consistency
* Author: Vadim Zeitlin
* Modified by:
* Created: 09.08.00
* RCS-ID: $Id$
* Copyright: (c) 2000 Vadim Zeitlin <vadim@wxwindows.org>
* Licence: wxWindows license
*/
/*
this global setting determintes what should we do if the setting FOO
requires BAR and BAR is not set: we can either silently define BAR
(default, recommended) or give an error and abort (mainly useful for
developpers only)
*/
#define wxABORT_ON_CONFIG_ERROR
#if wxUSE_BUTTON || \
wxUSE_CARET || \
wxUSE_COMBOBOX || \
wxUSE_BMPBUTTON || \
wxUSE_CHECKBOX || \
wxUSE_CHECKLISTBOX || \
wxUSE_CHOICE || \
wxUSE_GAUGE || \
wxUSE_GRID || \
wxUSE_NEW_GRID || \
wxUSE_IMAGLIST || \
wxUSE_LISTBOX || \
wxUSE_LISTCTRL || \
wxUSE_NOTEBOOK || \
wxUSE_RADIOBOX || \
wxUSE_RADIOBTN || \
wxUSE_SASH || \
wxUSE_SCROLLBAR || \
wxUSE_SLIDER || \
wxUSE_SPINBTN || \
wxUSE_SPINCTRL || \
wxUSE_SPLITTER || \
wxUSE_STATBMP || \
wxUSE_STATBOX || \
wxUSE_STATLINE || \
wxUSE_STATUSBAR || \
wxUSE_TAB_DIALOG || \
wxUSE_TOOLBAR || \
wxUSE_TOOLTIPS || \
wxUSE_TREECTRL
#if !wxUSE_CONTROLS
#if wxABORT_ON_CONFIG_ERROR
#error "wxUSE_CONTROLS unset but some controls used"
#else
#undef wxUSE_CONTROLS
#define wxUSE_CONTROLS 1
#endif
#endif
#endif /* controls */
#if wxUSE_STOPWATCH
#if !wxUSE_LONGLONG
#if wxABORT_ON_CONFIG_ERROR
#error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
#else
#undef wxUSE_LONGLONG
#define wxUSE_LONGLONG 1
#endif
#endif
#endif /* wxUSE_STOPWATCH */

View File

@@ -20,6 +20,8 @@
#pragma interface "choicebase.h" #pragma interface "choicebase.h"
#endif #endif
#if wxUSE_CHOICE
#include "wx/ctrlsub.h" // the base class #include "wx/ctrlsub.h" // the base class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -74,5 +76,7 @@ public:
#include "wx/stubs/choice.h" #include "wx/stubs/choice.h"
#endif #endif
#endif // wxUSE_CHOICE
#endif #endif
// _WX_CHOICE_H_BASE_ // _WX_CHOICE_H_BASE_

View File

@@ -20,6 +20,8 @@
#pragma interface "controlbase.h" #pragma interface "controlbase.h"
#endif #endif
#if wxUSE_CONTROLS
#include "wx/window.h" // base class #include "wx/window.h" // base class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -71,5 +73,7 @@ protected:
#include "wx/stubs/control.h" #include "wx/stubs/control.h"
#endif #endif
#endif // wxUSE_CONTROLS
#endif #endif
// _WX_CONTROL_H_BASE_ // _WX_CONTROL_H_BASE_

View File

@@ -16,6 +16,8 @@
#pragma interface "controlwithitems.h" #pragma interface "controlwithitems.h"
#endif #endif
#if wxUSE_CONTROLS
#include "wx/control.h" // base class #include "wx/control.h" // base class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -93,6 +95,7 @@ protected:
wxClientDataType m_clientDataItemsType; wxClientDataType m_clientDataItemsType;
}; };
#endif // wxUSE_CONTROLS
#endif // _WX_CTRLSUB_H_BASE_ #endif // _WX_CTRLSUB_H_BASE_

View File

@@ -27,12 +27,16 @@ public:
void SetReturnCode(int returnCode) { m_returnCode = returnCode; } void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
int GetReturnCode() const { return m_returnCode; } int GetReturnCode() const { return m_returnCode; }
#if wxUSE_STATTEXT && wxUSE_TEXTCTRL
// splits text up at newlines and places the // splits text up at newlines and places the
// lines into a vertical wxBoxSizer // lines into a vertical wxBoxSizer
wxSizer *CreateTextSizer( const wxString &message ); wxSizer *CreateTextSizer( const wxString &message );
#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
#if wxUSE_BUTTON
// places buttons into a horizontal wxBoxSizer // places buttons into a horizontal wxBoxSizer
wxSizer *CreateButtonSizer( long flags ); wxSizer *CreateButtonSizer( long flags );
#endif // wxUSE_BUTTON
protected: protected:
// the return code from modal dialog // the return code from modal dialog

View File

@@ -1,6 +1,8 @@
#ifndef _WX_DIRDLG_H_BASE_ #ifndef _WX_DIRDLG_H_BASE_
#define _WX_DIRDLG_H_BASE_ #define _WX_DIRDLG_H_BASE_
#if wxUSE_DIRDLG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -29,5 +31,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#include "wx/stubs/dirdlg.h" #include "wx/stubs/dirdlg.h"
#endif #endif
#endif // wxUSE_DIRDLG
#endif #endif
// _WX_DIRDLG_H_BASE_ // _WX_DIRDLG_H_BASE_

View File

@@ -15,6 +15,9 @@
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_FONTMAP
#include "wx/object.h" #include "wx/object.h"
#include "wx/fontenc.h" #include "wx/fontenc.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
@@ -147,5 +150,6 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject
}; };
#endif // wxUSE_FONTMAP
#endif // _WX_ENCCONV_H_ #endif // _WX_ENCCONV_H_

View File

@@ -1,6 +1,8 @@
#ifndef _WX_FILEDLG_H_BASE_ #ifndef _WX_FILEDLG_H_BASE_
#define _WX_FILEDLG_H_BASE_ #define _WX_FILEDLG_H_BASE_
#if wxUSE_FILEDLG
enum enum
{ {
wxOPEN = 1, wxOPEN = 1,
@@ -27,6 +29,7 @@ enum
#include "wx/stubs/filedlg.h" #include "wx/stubs/filedlg.h"
#endif #endif
#endif // wxUSE_FILEDLG
#endif #endif
// _WX_FILEDLG_H_BASE_ // _WX_FILEDLG_H_BASE_

View File

@@ -1,6 +1,8 @@
#ifndef _WX_FONTDLG_H_BASE_ #ifndef _WX_FONTDLG_H_BASE_
#define _WX_FONTDLG_H_BASE_ #define _WX_FONTDLG_H_BASE_
#if wxUSE_FONTDLG
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/fontdlg.h" #include "wx/msw/fontdlg.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
@@ -25,5 +27,7 @@
# define sm_classwxFontDialog sm_classwxGenericFontDialog # define sm_classwxFontDialog sm_classwxGenericFontDialog
#endif #endif
#endif // wxUSE_FONTDLG
#endif #endif
// _WX_FONTDLG_H_BASE_ // _WX_FONTDLG_H_BASE_

View File

@@ -20,7 +20,10 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_FONTMAP
#include "wx/fontenc.h" // for wxFontEncoding #include "wx/fontenc.h" // for wxFontEncoding
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/fontutil.h" // for wxNativeEncodingInfo #include "wx/fontutil.h" // for wxNativeEncodingInfo
#endif // wxUSE_GUI #endif // wxUSE_GUI
@@ -185,4 +188,6 @@ protected:
// the default font mapper for wxWindows programs // the default font mapper for wxWindows programs
WXDLLEXPORT_DATA(extern wxFontMapper *) wxTheFontMapper; WXDLLEXPORT_DATA(extern wxFontMapper *) wxTheFontMapper;
#endif // wxUSE_FONTMAP
#endif // _WX_FONTMAPPER_H_ #endif // _WX_FONTMAPPER_H_

View File

@@ -101,8 +101,10 @@ public:
// menu bar functions // menu bar functions
// ------------------ // ------------------
#if wxUSE_MENUS
virtual void SetMenuBar(wxMenuBar *menubar) = 0; virtual void SetMenuBar(wxMenuBar *menubar) = 0;
virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; } virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; }
#endif // wxUSE_MENUS
// call this to simulate a menu command // call this to simulate a menu command
bool Command(int id) { return ProcessCommand(id); } bool Command(int id) { return ProcessCommand(id); }
@@ -173,9 +175,11 @@ public:
// so should be there for all platforms // so should be there for all platforms
void OnActivate(wxActivateEvent &WXUNUSED(event)) { } void OnActivate(wxActivateEvent &WXUNUSED(event)) { }
#if wxUSE_MENUS
// send wxUpdateUIEvents for all menu items (called from OnIdle()) // send wxUpdateUIEvents for all menu items (called from OnIdle())
void DoMenuUpdates(); void DoMenuUpdates();
void DoMenuUpdates(wxMenu* menu, wxWindow* focusWin); void DoMenuUpdates(wxMenu* menu, wxWindow* focusWin);
#endif // wxUSE_MENUS
protected: protected:
// the frame main menu/status/tool bars // the frame main menu/status/tool bars
@@ -185,7 +189,9 @@ protected:
// main menubar, statusbar and toolbar (if any) // main menubar, statusbar and toolbar (if any)
void DeleteAllBars(); void DeleteAllBars();
#if wxUSE_MENUS
wxMenuBar *m_frameMenuBar; wxMenuBar *m_frameMenuBar;
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
// override to update status bar position (or anything else) when // override to update status bar position (or anything else) when

View File

@@ -9,7 +9,7 @@
// Created: 21/3/2000 // Created: 21/3/2000
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DIRCTRL_H_ #ifndef _WX_DIRCTRL_H_
@@ -19,6 +19,8 @@
#pragma interface "dirctrlg.h" #pragma interface "dirctrlg.h"
#endif #endif
#if wxUSE_DIRDLG
#include "wx/treectrl.h" #include "wx/treectrl.h"
#include "wx/dirdlg.h" #include "wx/dirdlg.h"
#include "wx/choice.h" #include "wx/choice.h"
@@ -243,5 +245,7 @@ protected:
}; };
#endif // wxUSE_DIRDLG
#endif #endif
// _WX_DIRCTRLG_H_ // _WX_DIRCTRLG_H_

View File

@@ -19,6 +19,9 @@
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_GRID
#include "wx/panel.h" #include "wx/panel.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
@@ -420,5 +423,7 @@ typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
#define EVT_GRID_LABEL_LCLICK(fn) { wxEVT_GRID_LABEL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL }, #define EVT_GRID_LABEL_LCLICK(fn) { wxEVT_GRID_LABEL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
#define EVT_GRID_LABEL_RCLICK(fn) { wxEVT_GRID_LABEL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL }, #define EVT_GRID_LABEL_RCLICK(fn) { wxEVT_GRID_LABEL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
#endif // wxUSE_GRID
#endif // __GRIDH_G__ #endif // __GRIDH_G__

View File

@@ -194,8 +194,10 @@ class WXDLLEXPORT wxLayoutAlgorithm: public wxObject
public: public:
wxLayoutAlgorithm() {} wxLayoutAlgorithm() {}
#if wxUSE_MDI_ARCHITECTURE
// The MDI client window is sized to whatever's left over. // The MDI client window is sized to whatever's left over.
bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL); bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL);
#endif // wxUSE_MDI_ARCHITECTURE
// mainWindow is sized to whatever's left over. This function for backward // mainWindow is sized to whatever's left over. This function for backward
// compatibility; use LayoutWindow. // compatibility; use LayoutWindow.

View File

@@ -71,9 +71,11 @@ public:
// to the dialog via validators. // to the dialog via validators.
virtual void InitDialog(); virtual void InitDialog();
#if wxUSE_BUTTON
// a default button is activated when Enter is pressed // a default button is activated when Enter is pressed
wxButton *GetDefaultItem() const { return m_btnDefault; } wxButton *GetDefaultItem() const { return m_btnDefault; }
void SetDefaultItem(wxButton *btn) { m_btnDefault = btn; } void SetDefaultItem(wxButton *btn) { m_btnDefault = btn; }
#endif // wxUSE_BUTTON
// implementation from now on // implementation from now on
// -------------------------- // --------------------------
@@ -107,8 +109,10 @@ protected:
// the child which had the focus last time this panel was activated // the child which had the focus last time this panel was activated
wxWindow *m_winLastFocused; wxWindow *m_winLastFocused;
#if wxUSE_BUTTON
// a default button or NULL // a default button or NULL
wxButton *m_btnDefault; wxButton *m_btnDefault;
#endif // wxUSE_BUTTON
private: private:
DECLARE_DYNAMIC_CLASS(wxPanel) DECLARE_DYNAMIC_CLASS(wxPanel)

View File

@@ -16,6 +16,8 @@
#pragma interface "treectlg.h" #pragma interface "treectlg.h"
#endif #endif
#if wxUSE_TREECTRL
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/object.h" #include "wx/object.h"
@@ -426,5 +428,7 @@ public:
#endif #endif
#endif // wxUSE_TREECTRL
#endif // _GENERIC_TREECTRL_H_ #endif // _GENERIC_TREECTRL_H_

View File

@@ -69,7 +69,9 @@ public:
virtual void MakeModal(bool modal = TRUE); virtual void MakeModal(bool modal = TRUE);
virtual void Restore(); virtual void Restore();
#if wxUSE_MENUS
virtual void SetMenuBar( wxMenuBar *menuBar ); virtual void SetMenuBar( wxMenuBar *menuBar );
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
virtual void PositionStatusBar(); virtual void PositionStatusBar();

View File

@@ -86,7 +86,9 @@ public:
const wxFont *theFont = (const wxFont *) NULL) const wxFont *theFont = (const wxFont *) NULL)
const; const;
#if wxUSE_MENUS
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS
virtual void SetScrollbar( int orient, int pos, int thumbVisible, virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE ); int range, bool refresh = TRUE );

View File

@@ -69,7 +69,9 @@ public:
virtual void MakeModal(bool modal = TRUE); virtual void MakeModal(bool modal = TRUE);
virtual void Restore(); virtual void Restore();
#if wxUSE_MENUS
virtual void SetMenuBar( wxMenuBar *menuBar ); virtual void SetMenuBar( wxMenuBar *menuBar );
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
virtual void PositionStatusBar(); virtual void PositionStatusBar();

View File

@@ -86,7 +86,9 @@ public:
const wxFont *theFont = (const wxFont *) NULL) const wxFont *theFont = (const wxFont *) NULL)
const; const;
#if wxUSE_MENUS
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS
virtual void SetScrollbar( int orient, int pos, int thumbVisible, virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE ); int range, bool refresh = TRUE );

View File

@@ -16,6 +16,8 @@
#pragma interface "listctrlbase.h" #pragma interface "listctrlbase.h"
#endif #endif
#if wxUSE_LISTCTRL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// types // types
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -316,5 +318,7 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
#define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, #define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
#define EVT_LIST_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, #define EVT_LIST_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
#endif // wxUSE_LISTCTRL
#endif #endif
// _WX_LISTCTRL_H_BASE_ // _WX_LISTCTRL_H_BASE_

View File

@@ -266,6 +266,8 @@ protected:
#if wxUSE_GUI #if wxUSE_GUI
#if wxUSE_TEXTCTRL
// log everything to a text window (GUI only of course) // log everything to a text window (GUI only of course)
class WXDLLEXPORT wxLogTextCtrl : public wxLog class WXDLLEXPORT wxLogTextCtrl : public wxLog
{ {
@@ -280,9 +282,14 @@ private:
wxTextCtrl *m_pTextCtrl; wxTextCtrl *m_pTextCtrl;
}; };
#endif // wxUSE_TEXTCTRL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// GUI log target, the default one for wxWindows programs // GUI log target, the default one for wxWindows programs
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_LOGGUI
class WXDLLEXPORT wxLogGui : public wxLog class WXDLLEXPORT wxLogGui : public wxLog
{ {
public: public:
@@ -305,12 +312,17 @@ protected:
m_bWarnings; // any warnings? m_bWarnings; // any warnings?
}; };
#endif // wxUSE_LOGGUI
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// (background) log window: this class forwards all log messages to the log // (background) log window: this class forwards all log messages to the log
// target which was active when it was instantiated, but also collects them // target which was active when it was instantiated, but also collects them
// to the log window. This window has it's own menu which allows the user to // to the log window. This window has it's own menu which allows the user to
// close it, clear the log contents or save it to the file. // close it, clear the log contents or save it to the file.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_LOGWINDOW
class WXDLLEXPORT wxLogWindow : public wxLog class WXDLLEXPORT wxLogWindow : public wxLog
{ {
public: public:
@@ -364,6 +376,8 @@ private:
wxLogFrame *m_pLogFrame; // the log frame wxLogFrame *m_pLogFrame; // the log frame
}; };
#endif // wxUSE_LOGWINDOW
#endif // wxUSE_GUI #endif // wxUSE_GUI
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -26,13 +26,9 @@
// classes // classes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class wxStaticBox;
class wxNotebook;
class wxSizerItem; class wxSizerItem;
class wxSizer; class wxSizer;
class wxBoxSizer; class wxBoxSizer;
class wxStaticBoxSizer;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// wxSizerItem // wxSizerItem
@@ -69,7 +65,7 @@ public:
bool IsWindow(); bool IsWindow();
bool IsSizer(); bool IsSizer();
bool IsSpacer(); bool IsSpacer();
void SetInitSize( int x, int y ) void SetInitSize( int x, int y )
{ m_minSize.x = x; m_minSize.y = y; } { m_minSize.x = x; m_minSize.y = y; }
void SetOption( int option ) void SetOption( int option )
@@ -145,29 +141,29 @@ public:
{ DoSetMinSize( width, height ); } { DoSetMinSize( width, height ); }
void SetMinSize( wxSize size ) void SetMinSize( wxSize size )
{ DoSetMinSize( size.x, size.y ); } { DoSetMinSize( size.x, size.y ); }
/* Searches recursively */ /* Searches recursively */
bool SetItemMinSize( wxWindow *window, int width, int height ) bool SetItemMinSize( wxWindow *window, int width, int height )
{ return DoSetItemMinSize( window, width, height ); } { return DoSetItemMinSize( window, width, height ); }
bool SetItemMinSize( wxWindow *window, wxSize size ) bool SetItemMinSize( wxWindow *window, wxSize size )
{ return DoSetItemMinSize( window, size.x, size.y ); } { return DoSetItemMinSize( window, size.x, size.y ); }
/* Searches recursively */ /* Searches recursively */
bool SetItemMinSize( wxSizer *sizer, int width, int height ) bool SetItemMinSize( wxSizer *sizer, int width, int height )
{ return DoSetItemMinSize( sizer, width, height ); } { return DoSetItemMinSize( sizer, width, height ); }
bool SetItemMinSize( wxSizer *sizer, wxSize size ) bool SetItemMinSize( wxSizer *sizer, wxSize size )
{ return DoSetItemMinSize( sizer, size.x, size.y ); } { return DoSetItemMinSize( sizer, size.x, size.y ); }
bool SetItemMinSize( int pos, int width, int height ) bool SetItemMinSize( int pos, int width, int height )
{ return DoSetItemMinSize( pos, width, height ); } { return DoSetItemMinSize( pos, width, height ); }
bool SetItemMinSize( int pos, wxSize size ) bool SetItemMinSize( int pos, wxSize size )
{ return DoSetItemMinSize( pos, size.x, size.y ); } { return DoSetItemMinSize( pos, size.x, size.y ); }
wxSize GetSize() wxSize GetSize()
{ return m_size; } { return m_size; }
wxPoint GetPosition() wxPoint GetPosition()
{ return m_position; } { return m_position; }
/* Calculate the minimal size or return m_minSize if bigger. */ /* Calculate the minimal size or return m_minSize if bigger. */
wxSize GetMinSize(); wxSize GetMinSize();
@@ -191,12 +187,12 @@ protected:
wxList m_children; wxList m_children;
wxSize GetMinWindowSize( wxWindow *window ); wxSize GetMinWindowSize( wxWindow *window );
virtual void DoSetMinSize( int width, int height ); virtual void DoSetMinSize( int width, int height );
virtual bool DoSetItemMinSize( wxWindow *window, int width, int height ); virtual bool DoSetItemMinSize( wxWindow *window, int width, int height );
virtual bool DoSetItemMinSize( wxSizer *sizer, int width, int height ); virtual bool DoSetItemMinSize( wxSizer *sizer, int width, int height );
virtual bool DoSetItemMinSize( int pos, int width, int height ); virtual bool DoSetItemMinSize( int pos, int width, int height );
private: private:
DECLARE_CLASS(wxSizer); DECLARE_CLASS(wxSizer);
}; };
@@ -210,7 +206,7 @@ class WXDLLEXPORT wxGridSizer: public wxSizer
public: public:
wxGridSizer( int rows, int cols, int vgap, int hgap ); wxGridSizer( int rows, int cols, int vgap, int hgap );
wxGridSizer( int cols, int vgap = 0, int hgap = 0 ); wxGridSizer( int cols, int vgap = 0, int hgap = 0 );
void RecalcSizes(); void RecalcSizes();
wxSize CalcMin(); wxSize CalcMin();
@@ -222,15 +218,15 @@ public:
int GetRows() { return m_rows; } int GetRows() { return m_rows; }
int GetVGap() { return m_vgap; } int GetVGap() { return m_vgap; }
int GetHGap() { return m_hgap; } int GetHGap() { return m_hgap; }
protected: protected:
int m_rows; int m_rows;
int m_cols; int m_cols;
int m_vgap; int m_vgap;
int m_hgap; int m_hgap;
void SetItemBounds( wxSizerItem *item, int x, int y, int w, int h ); void SetItemBounds( wxSizerItem *item, int x, int y, int w, int h );
private: private:
DECLARE_CLASS(wxGridSizer); DECLARE_CLASS(wxGridSizer);
}; };
@@ -245,10 +241,10 @@ public:
wxFlexGridSizer( int rows, int cols, int vgap, int hgap ); wxFlexGridSizer( int rows, int cols, int vgap, int hgap );
wxFlexGridSizer( int cols, int vgap = 0, int hgap = 0 ); wxFlexGridSizer( int cols, int vgap = 0, int hgap = 0 );
~wxFlexGridSizer(); ~wxFlexGridSizer();
void RecalcSizes(); void RecalcSizes();
wxSize CalcMin(); wxSize CalcMin();
void AddGrowableRow( size_t idx ); void AddGrowableRow( size_t idx );
void RemoveGrowableRow( size_t idx ); void RemoveGrowableRow( size_t idx );
void AddGrowableCol( size_t idx ); void AddGrowableCol( size_t idx );
@@ -259,9 +255,9 @@ protected:
int *m_colWidths; int *m_colWidths;
wxArrayInt m_growableRows; wxArrayInt m_growableRows;
wxArrayInt m_growableCols; wxArrayInt m_growableCols;
void CreateArrays(); void CreateArrays();
private: private:
DECLARE_CLASS(wxFlexGridSizer); DECLARE_CLASS(wxFlexGridSizer);
}; };
@@ -288,7 +284,7 @@ protected:
int m_minHeight; int m_minHeight;
int m_fixedWidth; int m_fixedWidth;
int m_fixedHeight; int m_fixedHeight;
private: private:
DECLARE_CLASS(wxBoxSizer); DECLARE_CLASS(wxBoxSizer);
}; };
@@ -297,6 +293,10 @@ private:
// wxStaticBoxSizer // wxStaticBoxSizer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#if wxUSE_STATBOX
class WXDLLEXPORT wxStaticBox;
class WXDLLEXPORT wxStaticBoxSizer: public wxBoxSizer class WXDLLEXPORT wxStaticBoxSizer: public wxBoxSizer
{ {
public: public:
@@ -310,17 +310,21 @@ public:
protected: protected:
wxStaticBox *m_staticBox; wxStaticBox *m_staticBox;
private: private:
DECLARE_CLASS(wxStaticBoxSizer); DECLARE_CLASS(wxStaticBoxSizer);
}; };
#endif // wxUSE_STATBOX
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// wxNotebookSizer // wxNotebookSizer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#if wxUSE_NOTEBOOK #if wxUSE_NOTEBOOK
class WXDLLEXPORT wxNotebook;
class WXDLLEXPORT wxNotebookSizer: public wxSizer class WXDLLEXPORT wxNotebookSizer: public wxSizer
{ {
public: public:
@@ -334,12 +338,12 @@ public:
protected: protected:
wxNotebook *m_notebook; wxNotebook *m_notebook;
private: private:
DECLARE_CLASS(wxNotebookSizer); DECLARE_CLASS(wxNotebookSizer);
}; };
#endif #endif // wxUSE_NOTEBOOK
#endif #endif

View File

@@ -1,6 +1,8 @@
#ifndef _WX_STATTEXT_H_BASE_ #ifndef _WX_STATTEXT_H_BASE_
#define _WX_STATTEXT_H_BASE_ #define _WX_STATTEXT_H_BASE_
#if wxUSE_STATTEXT
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/stattext.h" #include "wx/msw/stattext.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
@@ -17,5 +19,7 @@
#include "wx/stubs/stattext.h" #include "wx/stubs/stattext.h"
#endif #endif
#endif // wxUSE_STATTEXT
#endif #endif
// _WX_STATTEXT_H_BASE_ // _WX_STATTEXT_H_BASE_

View File

@@ -22,6 +22,8 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_TOOLBAR
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/list.h" #include "wx/list.h"
#include "wx/control.h" #include "wx/control.h"
@@ -466,6 +468,8 @@ private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#endif // wxUSE_TOOLBAR
#endif #endif
// _WX_TBARBASE_H_ // _WX_TBARBASE_H_

View File

@@ -15,11 +15,15 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __GNUG__ #ifdef __GNUG__
#pragma interface "textctrlbase.h" #pragma interface "textctrlbase.h"
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_TEXTCTRL
#include "wx/control.h" // the base class #include "wx/control.h" // the base class
// 16-bit Borland 4.0 doesn't seem to allow multiple inheritance with wxWindow // 16-bit Borland 4.0 doesn't seem to allow multiple inheritance with wxWindow
@@ -189,5 +193,7 @@ private:
#include "wx/stubs/textctrl.h" #include "wx/stubs/textctrl.h"
#endif #endif
#endif // wxUSE_TEXTCTRL
#endif #endif
// _WX_TEXTCTRL_H_BASE_ // _WX_TEXTCTRL_H_BASE_

View File

@@ -25,14 +25,8 @@
#define wxUSE_TEXTFILE 0 #define wxUSE_TEXTFILE 0
#endif // wxUSE_FILE #endif // wxUSE_FILE
#if wxUSE_TEXTFILE
#include "wx/string.h"
#include "wx/file.h"
#include "wx/dynarray.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxTextFile // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// the line termination type // the line termination type
@@ -45,6 +39,16 @@ enum wxTextFileType
wxTextFileType_Os2 // 'CR' 'LF' wxTextFileType_Os2 // 'CR' 'LF'
}; };
#if wxUSE_TEXTFILE
#include "wx/string.h"
#include "wx/file.h"
#include "wx/dynarray.h"
// ----------------------------------------------------------------------------
// wxTextFile
// ----------------------------------------------------------------------------
WX_DEFINE_EXPORTED_ARRAY(wxTextFileType, ArrayFileType); WX_DEFINE_EXPORTED_ARRAY(wxTextFileType, ArrayFileType);
class WXDLLEXPORT wxTextFile class WXDLLEXPORT wxTextFile
@@ -184,6 +188,12 @@ private:
// copy ctor/assignment operator not implemented // copy ctor/assignment operator not implemented
wxTextFile(const wxTextFile&); wxTextFile(const wxTextFile&);
wxTextFile& operator=(const wxTextFile&); wxTextFile& operator=(const wxTextFile&);
// suppress the gcc warning: 'class defines only private constructors and
// has no friends'
#ifdef __GNUG__
friend class wxTextFileDummyFriend;
#endif // gcc
}; };
#endif // wxUSE_TEXTFILE #endif // wxUSE_TEXTFILE

View File

@@ -22,7 +22,7 @@
#include "wx/longlong.h" #include "wx/longlong.h"
#include "wx/event.h" #include "wx/event.h"
#if wxUSE_GUI #if wxUSE_GUI && wxUSE_TIMER
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxTimer // wxTimer
@@ -181,12 +181,14 @@ typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
#define EVT_TIMER(id, func) { wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL}, #define EVT_TIMER(id, func) { wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL},
#endif // wxUSE_GUI #endif // wxUSE_GUI && wxUSE_TIMER
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxStopWatch: measure time intervals with up to 1ms resolution // wxStopWatch: measure time intervals with up to 1ms resolution
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_STOPWATCH
class WXDLLEXPORT wxStopWatch class WXDLLEXPORT wxStopWatch
{ {
public: public:
@@ -208,6 +210,9 @@ private:
long m_pause; // the time of the last Pause() or 0 long m_pause; // the time of the last Pause() or 0
}; };
#endif // wxUSE_STOPWATCH
#if wxUSE_LONGLONG
// Starts a global timer // Starts a global timer
// -- DEPRECATED: use wxStopWatch instead // -- DEPRECATED: use wxStopWatch instead
@@ -217,6 +222,8 @@ void WXDLLEXPORT wxStartTimer();
// -- DEPRECATED: use wxStopWatch instead // -- DEPRECATED: use wxStopWatch instead
long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
#endif // wxUSE_LONGLONG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// global time functions // global time functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -227,8 +234,10 @@ extern long WXDLLEXPORT wxGetLocalTime();
// Get number of seconds since GMT 00:00:00, Jan 1st 1970. // Get number of seconds since GMT 00:00:00, Jan 1st 1970.
extern long WXDLLEXPORT wxGetUTCTime(); extern long WXDLLEXPORT wxGetUTCTime();
#if wxUSE_LONGLONG
// Get number of milliseconds since local time 00:00:00 Jan 1st 1970 // Get number of milliseconds since local time 00:00:00 Jan 1st 1970
extern wxLongLong WXDLLEXPORT wxGetLocalTimeMillis(); extern wxLongLong WXDLLEXPORT wxGetLocalTimeMillis();
#endif // wxUSE_LONGLONG
#define wxGetCurrentTime() wxGetLocalTime() #define wxGetCurrentTime() wxGetLocalTime()

View File

@@ -20,6 +20,8 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_TREECTRL
#include "wx/control.h" #include "wx/control.h"
#include "wx/event.h" #include "wx/event.h"
@@ -280,6 +282,8 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, #define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, #define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#endif // wxUSE_TREECTRL
#endif #endif
// _WX_TREEBASE_H_ // _WX_TREEBASE_H_

View File

@@ -556,10 +556,12 @@ public:
void UpdateWindowUI(); void UpdateWindowUI();
#if wxUSE_MENUS
bool PopupMenu( wxMenu *menu, const wxPoint& pos ) bool PopupMenu( wxMenu *menu, const wxPoint& pos )
{ return DoPopupMenu(menu, pos.x, pos.y); } { return DoPopupMenu(menu, pos.x, pos.y); }
bool PopupMenu( wxMenu *menu, int x, int y ) bool PopupMenu( wxMenu *menu, int x, int y )
{ return DoPopupMenu(menu, x, y); } { return DoPopupMenu(menu, x, y); }
#endif // wxUSE_MENUS
// scrollbars // scrollbars
// ---------- // ----------
@@ -831,7 +833,9 @@ protected:
virtual void DoSetToolTip( wxToolTip *tip ); virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS #endif // wxUSE_TOOLTIPS
#if wxUSE_MENUS
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) = 0; virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) = 0;
#endif // wxUSE_MENUS
// client data accessors // client data accessors
virtual void DoSetClientObject( wxClientData *data ); virtual void DoSetClientObject( wxClientData *data );

View File

@@ -14,6 +14,8 @@
#ifndef _WX_WIZARD_H_ #ifndef _WX_WIZARD_H_
#define _WX_WIZARD_H_ #define _WX_WIZARD_H_
#if wxUSE_WIZARDDLG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers and other simple declarations // headers and other simple declarations
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -188,4 +190,6 @@ typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
// unless the event handler vetoes the event // unless the event handler vetoes the event
#define EVT_WIZARD_CANCEL(id, fn) { wxEVT_WIZARD_CANCEL, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL }, #define EVT_WIZARD_CANCEL(id, fn) { wxEVT_WIZARD_CANCEL, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL },
#endif // wxUSE_WIZARDDLG
#endif // _WX_WIZARD_H_ #endif // _WX_WIZARD_H_

2
samples/configure vendored
View File

@@ -700,6 +700,7 @@ trap 'rm -fr `echo "
typetest/Makefile typetest/Makefile
validate/Makefile validate/Makefile
sockets/Makefile sockets/Makefile
univ/Makefile
wizard/Makefile wizard/Makefile
html/Makefile html/Makefile
html/about/Makefile html/about/Makefile
@@ -844,6 +845,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
typetest/Makefile typetest/Makefile
validate/Makefile validate/Makefile
sockets/Makefile sockets/Makefile
univ/Makefile
wizard/Makefile wizard/Makefile
html/Makefile html/Makefile
html/about/Makefile html/about/Makefile

View File

@@ -68,6 +68,7 @@ AC_OUTPUT([
typetest/Makefile typetest/Makefile
validate/Makefile validate/Makefile
sockets/Makefile sockets/Makefile
univ/Makefile
wizard/Makefile wizard/Makefile
html/Makefile html/Makefile
html/about/Makefile html/about/Makefile

View File

@@ -185,11 +185,36 @@
*/ */
#define wxUSE_VALIDATORS 0 #define wxUSE_VALIDATORS 0
/*
* Use wxControl
*/
#define wxUSE_CONTROLS 0
/* /*
* Use accelerators * Use accelerators
*/ */
#define wxUSE_ACCEL 0 #define wxUSE_ACCEL 0
/*
* Use wxFileDialog
*/
#define wxUSE_FILEDLG 0
/*
* Use wxFontDialog
*/
#define wxUSE_FONTDLG 0
/*
* Use wxMessageDialog (and wxMessageBox)
*/
#define wxUSE_MSGDLG 0
/*
* Use wxNumberEntryDialog
*/
#define wxUSE_NUMBERDLG 0
/* /*
* Use wxTextEntryDialog * Use wxTextEntryDialog
*/ */
@@ -205,16 +230,45 @@
*/ */
#define wxUSE_PROGRESSDLG 0 #define wxUSE_PROGRESSDLG 0
/*
* Use chooser dialog
*/
#define wxUSE_CHOICEDLG 0
/*
* Use colour picker dialog
*/
#define wxUSE_COLOURDLG 0
/* /*
* Use directory chooser dialog * Use directory chooser dialog
*/ */
#define wxUSE_DIRDLG 0 #define wxUSE_DIRDLG 0
/*
* Use property sheet classes
*/
#define wxUSE_PROPSHEET 0
/*
* Use wxWizard
*/
#define wxUSE_WIZARDDLG 0
/*
* Use splash screen
*/
#define wxUSE_SPLASH 0
/* /*
* Joystick support (Linux/GTK only) * Joystick support (Linux/GTK only)
*/ */
#define wxUSE_JOYSTICK 0 #define wxUSE_JOYSTICK 0
/*
* Use this control
*/
#define wxUSE_BUTTON 0
/* /*
* Use this control * Use this control
*/ */
@@ -264,6 +318,10 @@
* Use this control * Use this control
*/ */
#define wxUSE_LISTCTRL 0 #define wxUSE_LISTCTRL 0
/*
* Use wxMenuBar, wxMenuItem and wxMenu
*/
#define wxUSE_MENUS 0
/* /*
* Use this control * Use this control
*/ */
@@ -327,6 +385,11 @@
/* compatibility */ /* compatibility */
#define wxUSE_TABDIALOG wxUSE_TAB_DIALOG #define wxUSE_TABDIALOG wxUSE_TAB_DIALOG
/*
* Use wxTextCtrl
*/
#define wxUSE_TEXTCTRL 0
/* /*
* Use wxToollBar * Use wxToollBar
*/ */
@@ -344,7 +407,7 @@
#define wxUSE_TOOLBAR_SIMPLE 0 #define wxUSE_TOOLBAR_SIMPLE 0
#if defined(__WXWINE__) || defined(__GNUWIN32__) || defined(__WXPM__) #if defined(__WXWINE__) || defined(__GNUWIN32__) || defined(__WXPM__)
#define wxUSE_OWNER_DRAWN 1 #define wxUSE_OWNER_DRAWN 1
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
#define wxUSE_BUTTONBAR 1 #define wxUSE_BUTTONBAR 1
#endif #endif
@@ -360,6 +423,14 @@
*/ */
#define wxUSE_LONGLONG 0 #define wxUSE_LONGLONG 0
/*
* Use wxCmdLineParser class
*/
#define wxUSE_CMDLINE_PARSER 0
/*
* Use wxDateTime
*/
#define wxUSE_DATETIME 0
/* /*
* Use wxFile class * Use wxFile class
*/ */
@@ -372,6 +443,18 @@
* Use log classes and logging functions * Use log classes and logging functions
*/ */
#define wxUSE_LOG 0 #define wxUSE_LOG 0
/*
* Use log window
*/
#define wxUSE_LOGWINDOW 0
/*
* Use standard GUI logger
*/
#define wxUSE_LOGGUI 0
/*
* Use wxStopWatch
*/
#define wxUSE_STOPWATCH 0
/* /*
* Use time and date classes * Use time and date classes
*/ */
@@ -384,6 +467,10 @@
* Use config system * Use config system
*/ */
#define wxUSE_CONFIG 0 #define wxUSE_CONFIG 0
/*
* Use font mapping/conversion classes
*/
#define wxUSE_FONTMAP 0
/* /*
* Use intl system * Use intl system
*/ */
@@ -414,6 +501,11 @@
*/ */
#define wxUSE_DYNLIB_CLASS 0 #define wxUSE_DYNLIB_CLASS 0
/*
* Use wxTimer
*/
#define wxUSE_TIMER 0
/* /*
* Use font metric files in GetTextExtent for wxPostScriptDC * Use font metric files in GetTextExtent for wxPostScriptDC
* Use consistent PostScript fonts for AFM and printing (!) * Use consistent PostScript fonts for AFM and printing (!)
@@ -589,7 +681,7 @@
* A class that shows info window when app is busy * A class that shows info window when app is busy
* (works exactly like wxBusyCursor) * (works exactly like wxBusyCursor)
*/ */
#define wxUSE_BUSYINFO 0 #define wxUSE_BUSYINFO 0
/* /*
* Zip stream for accessing files stored inside .zip archives * Zip stream for accessing files stored inside .zip archives
@@ -610,7 +702,7 @@
* PNM image format support * PNM image format support
*/ */
#define wxUSE_PNM 0 #define wxUSE_PNM 0
/* /*
* Disable this if your compiler can't cope * Disable this if your compiler can't cope
* with omission of prototype parameters. * with omission of prototype parameters.
@@ -793,4 +885,7 @@
/* Define this if you are using gtk and gdk contains support for X11R6 XIM */ /* Define this if you are using gtk and gdk contains support for X11R6 XIM */
#undef HAVE_XIM #undef HAVE_XIM
/* now check the settings self consistency */
#include "wx/chkconf.h"
#endif /* __WX_SETUP_H__ */ #endif /* __WX_SETUP_H__ */

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_CHOICE
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/choice.h" #include "wx/choice.h"
#endif #endif
@@ -60,3 +62,6 @@ void wxChoiceBase::Command(wxCommandEvent& event)
SetSelection(event.m_commandInt); SetSelection(event.m_commandInt);
(void)ProcessEvent(event); (void)ProcessEvent(event);
} }
#endif // wxUSE_CHOICE

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_CMDLINE_PARSER
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h" #include "wx/log.h"
@@ -912,3 +914,5 @@ static wxString GetTypeName(wxCmdLineParamType type)
return s; return s;
} }
#endif // wxUSE_CMDLINE_PARSER

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_CONTROLS
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/control.h" #include "wx/control.h"
#include "wx/log.h" #include "wx/log.h"
@@ -93,3 +95,5 @@ void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
} }
} }
#endif // wxUSE_CONTROLS

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_CONTROLS
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/ctrlsub.h" #include "wx/ctrlsub.h"
#endif #endif
@@ -92,3 +94,4 @@ void *wxControlWithItems::GetClientData(int n) const
return DoGetItemClientData(n); return DoGetItemClientData(n);
} }
#endif // wxUSE_CONTROLS

View File

@@ -63,6 +63,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if !defined(wxUSE_DATETIME) || wxUSE_DATETIME
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
@@ -3598,4 +3600,4 @@ size_t wxDateTimeWorkDays::DoGetHolidaysInRange(const wxDateTime& dtStart,
return holidays.GetCount(); return holidays.GetCount();
} }
#endif // wxUSE_DATETIME

View File

@@ -43,6 +43,8 @@
// wxDialogBase // wxDialogBase
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#if wxUSE_STATTEXT && wxUSE_TEXTCTRL
wxSizer *wxDialogBase::CreateTextSizer( const wxString &message ) wxSizer *wxDialogBase::CreateTextSizer( const wxString &message )
{ {
wxBoxSizer *box = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *box = new wxBoxSizer( wxVERTICAL );
@@ -86,6 +88,10 @@ wxSizer *wxDialogBase::CreateTextSizer( const wxString &message )
return box; return box;
} }
#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
#if wxUSE_BUTTON
wxSizer *wxDialogBase::CreateButtonSizer( long flags ) wxSizer *wxDialogBase::CreateButtonSizer( long flags )
{ {
wxBoxSizer *box = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *box = new wxBoxSizer( wxHORIZONTAL );
@@ -174,3 +180,4 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags )
return box; return box;
} }
#endif // wxUSE_BUTTON

View File

@@ -27,6 +27,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_DATAOBJ
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/debug.h" #include "wx/debug.h"
@@ -364,5 +366,6 @@ wxDragResult wxFileDropTarget::OnData(wxCoord x, wxCoord y, wxDragResult def)
return OnDropFiles(x, y, dobj->GetFilenames()) ? def : wxDragNone; return OnDropFiles(x, y, dobj->GetFilenames()) ? def : wxDragNone;
} }
#endif #endif // wxUSE_DRAG_AND_DROP
#endif // wxUSE_DATAOBJ

View File

@@ -18,6 +18,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_FONTMAP
#include "wx/encconv.h" #include "wx/encconv.h"
#include <stdlib.h> #include <stdlib.h>
@@ -446,3 +448,5 @@ wxFontEncodingArray wxEncodingConverter::GetAllEquivalents(wxFontEncoding enc)
return arr; return arr;
} }
#endif // wxUSE_FONTMAP

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_FONTMAP
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/log.h" #include "wx/log.h"
@@ -54,12 +56,14 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// the config paths we use // the config paths we use
#if wxUSE_CONFIG
static const wxChar* FONTMAPPER_ROOT_PATH = wxT("/wxWindows/FontMapper"); static const wxChar* FONTMAPPER_ROOT_PATH = wxT("/wxWindows/FontMapper");
static const wxChar* FONTMAPPER_CHARSET_PATH = wxT("Charsets"); static const wxChar* FONTMAPPER_CHARSET_PATH = wxT("Charsets");
static const wxChar* FONTMAPPER_CHARSET_ALIAS_PATH = wxT("Aliases"); static const wxChar* FONTMAPPER_CHARSET_ALIAS_PATH = wxT("Aliases");
#if wxUSE_GUI #if wxUSE_GUI
static const wxChar* FONTMAPPER_FONT_FROM_ENCODING_PATH = wxT("Encodings"); static const wxChar* FONTMAPPER_FONT_FROM_ENCODING_PATH = wxT("Encodings");
#endif // wxUSE_GUI #endif // wxUSE_GUI
#endif // wxUSE_CONFIG
// encodings supported by GetEncodingDescription // encodings supported by GetEncodingDescription
static wxFontEncoding gs_encodings[] = static wxFontEncoding gs_encodings[] =
@@ -746,3 +750,5 @@ bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding,
} }
#endif // wxUSE_GUI #endif // wxUSE_GUI
#endif // wxUSE_FONTMAP

View File

@@ -60,7 +60,9 @@ END_EVENT_TABLE()
wxFrameBase::wxFrameBase() wxFrameBase::wxFrameBase()
{ {
#if wxUSE_MENUS
m_frameMenuBar = NULL; m_frameMenuBar = NULL;
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
m_frameToolBar = NULL; m_frameToolBar = NULL;
@@ -94,11 +96,13 @@ wxFrame *wxFrameBase::New(wxWindow *parent,
void wxFrameBase::DeleteAllBars() void wxFrameBase::DeleteAllBars()
{ {
#if wxUSE_MENUS
if ( m_frameMenuBar ) if ( m_frameMenuBar )
{ {
delete m_frameMenuBar; delete m_frameMenuBar;
m_frameMenuBar = (wxMenuBar *) NULL; m_frameMenuBar = (wxMenuBar *) NULL;
} }
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
if ( m_frameStatusBar ) if ( m_frameStatusBar )
@@ -192,6 +196,7 @@ void wxFrameBase::MakeModal(bool modal)
bool wxFrameBase::ProcessCommand(int id) bool wxFrameBase::ProcessCommand(int id)
{ {
#if wxUSE_MENUS
wxMenuBar *bar = GetMenuBar(); wxMenuBar *bar = GetMenuBar();
if ( !bar ) if ( !bar )
return FALSE; return FALSE;
@@ -209,6 +214,9 @@ bool wxFrameBase::ProcessCommand(int id)
} }
return GetEventHandler()->ProcessEvent(commandEvent); return GetEventHandler()->ProcessEvent(commandEvent);
#else // !wxUSE_MENUS
return FALSE;
#endif // wxUSE_MENUS/!wxUSE_MENUS
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -419,9 +427,13 @@ wxToolBar* wxFrameBase::OnCreateToolBar(long style,
void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) ) void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) )
{ {
#if wxUSE_MENUS
DoMenuUpdates(); DoMenuUpdates();
#endif // wxUSE_MENUS
} }
#if wxUSE_MENUS
// update all menus // update all menus
void wxFrameBase::DoMenuUpdates() void wxFrameBase::DoMenuUpdates()
{ {
@@ -465,3 +477,5 @@ void wxFrameBase::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin))
node = node->GetNext(); node = node->GetNext();
} }
} }
#endif // wxUSE_MENUS

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_LISTBOX
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/listbox.h" #include "wx/listbox.h"
#endif #endif
@@ -96,3 +98,5 @@ void wxListBoxBase::SetFirstItem(const wxString& s)
DoSetFirstItem(n); DoSetFirstItem(n);
} }
#endif // wxUSE_LISTBOX

View File

@@ -745,12 +745,12 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
// send it to the normal log destination // send it to the normal log destination
wxLogDebug(szBuf); wxLogDebug(szBuf);
#if wxUSE_GUI || defined(__WXMSW__) #if (wxUSE_GUI && wxUSE_MSGDLG) || defined(__WXMSW__)
// this message is intentionally not translated - it is for // this message is intentionally not translated - it is for
// developpers only // developpers only
wxStrcat(szBuf, wxT("\nDo you want to stop the program?\nYou can also choose [Cancel] to suppress further warnings.")); wxStrcat(szBuf, wxT("\nDo you want to stop the program?\nYou can also choose [Cancel] to suppress further warnings."));
#if wxUSE_GUI #if wxUSE_GUI && wxUSE_MSGDLG
switch ( wxMessageBox(szBuf, wxT("Debug"), switch ( wxMessageBox(szBuf, wxT("Debug"),
wxYES_NO | wxCANCEL | wxICON_STOP ) ) { wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
case wxYES: case wxYES:
@@ -763,7 +763,7 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
//case wxNO: nothing to do //case wxNO: nothing to do
} }
#else // !GUI, but MSW #else // no wxMessageBox, but we still have the native MessageBox
switch ( ::MessageBox(NULL, szBuf, _T("Debug"), switch ( ::MessageBox(NULL, szBuf, _T("Debug"),
MB_YESNOCANCEL | MB_ICONSTOP ) ) { MB_YESNOCANCEL | MB_ICONSTOP ) ) {
case IDYES: case IDYES:
@@ -778,9 +778,9 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
} }
#endif // GUI or MSW #endif // GUI or MSW
#else // !GUI #else // no message box
Trap(); Trap();
#endif // GUI/!GUI #endif // message boxes
} }
s_bInAssert = FALSE; s_bInAssert = FALSE;

View File

@@ -24,12 +24,14 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include <ctype.h>
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_MENUS
#include <ctype.h>
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/menu.h" #include "wx/menu.h"
#endif #endif
@@ -643,3 +645,4 @@ wxString wxMenuBarBase::GetHelpString(int id) const
return item->GetHelp(); return item->GetHelp();
} }
#endif // wxUSE_MENUS

View File

@@ -32,7 +32,9 @@ IMPLEMENT_ABSTRACT_CLASS(wxSizer, wxObject);
IMPLEMENT_ABSTRACT_CLASS(wxGridSizer, wxSizer); IMPLEMENT_ABSTRACT_CLASS(wxGridSizer, wxSizer);
IMPLEMENT_ABSTRACT_CLASS(wxFlexGridSizer, wxGridSizer); IMPLEMENT_ABSTRACT_CLASS(wxFlexGridSizer, wxGridSizer);
IMPLEMENT_ABSTRACT_CLASS(wxBoxSizer, wxSizer); IMPLEMENT_ABSTRACT_CLASS(wxBoxSizer, wxSizer);
#if wxUSE_STATBOX
IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer); IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer);
#endif
#if wxUSE_NOTEBOOK #if wxUSE_NOTEBOOK
IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer); IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer);
#endif #endif
@@ -942,6 +944,8 @@ wxSize wxBoxSizer::CalcMin()
// wxStaticBoxSizer // wxStaticBoxSizer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#if wxUSE_STATBOX
wxStaticBoxSizer::wxStaticBoxSizer( wxStaticBox *box, int orient ) wxStaticBoxSizer::wxStaticBoxSizer( wxStaticBox *box, int orient )
: wxBoxSizer( orient ) : wxBoxSizer( orient )
{ {
@@ -991,6 +995,8 @@ wxSize wxStaticBoxSizer::CalcMin()
return ret; return ret;
} }
#endif // wxUSE_STATBOX
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// wxNotebookSizer // wxNotebookSizer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_TOOLBAR
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
@@ -39,19 +41,15 @@
#include <windows.h> #include <windows.h>
#endif #endif
#if wxUSE_TOOLBAR
#include "wx/tbarbase.h" #include "wx/tbarbase.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxWindows macros // wxWindows macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if !USE_SHARED_LIBRARY BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) EVT_IDLE(wxToolBarBase::OnIdle)
EVT_IDLE(wxToolBarBase::OnIdle) END_EVENT_TABLE()
END_EVENT_TABLE()
#endif
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"

View File

@@ -12,10 +12,11 @@
// ============================================================================ // ============================================================================
// declarations // declarations
// ============================================================================ // ============================================================================
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "textctrlbase.h" #pragma implementation "textctrlbase.h"
#endif #endif
// for compilers that support precompilation, includes "wx.h". // for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
@@ -23,6 +24,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_TEXTCTRL
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
@@ -207,3 +210,5 @@ int wxTextCtrlBase::underflow()
#endif // NO_TEXT_WINDOW_STREAM #endif // NO_TEXT_WINDOW_STREAM
#endif // wxUSE_TEXTCTRL

View File

@@ -76,7 +76,7 @@
// wxWin macros // wxWin macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_GUI #if wxUSE_GUI && wxUSE_TIMER
IMPLEMENT_DYNAMIC_CLASS(wxTimerEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxTimerEvent, wxEvent)
#endif // wxUSE_GUI #endif // wxUSE_GUI
@@ -103,7 +103,7 @@
// wxTimerBase // wxTimerBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_GUI #if wxUSE_GUI && wxUSE_TIMER
void wxTimerBase::Notify() void wxTimerBase::Notify()
{ {
@@ -121,6 +121,8 @@ void wxTimerBase::Notify()
// wxStopWatch // wxStopWatch
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_LONGLONG
void wxStopWatch::Start(long t) void wxStopWatch::Start(long t)
{ {
m_t0 = wxGetLocalTimeMillis() - t; m_t0 = wxGetLocalTimeMillis() - t;
@@ -137,10 +139,14 @@ long wxStopWatch::Time() const
return (m_pause ? m_pause : GetElapsedTime()); return (m_pause ? m_pause : GetElapsedTime());
} }
#endif // wxUSE_LONGLONG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// old timer functions superceded by wxStopWatch // old timer functions superceded by wxStopWatch
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_LONGLONG
static wxLongLong wxStartTime = 0l; static wxLongLong wxStartTime = 0l;
// starts the global timer // starts the global timer
@@ -161,6 +167,7 @@ long wxGetElapsedTime(bool resetTimer)
return (newTime - oldTime).GetLo(); return (newTime - oldTime).GetLo();
} }
#endif // wxUSE_LONGLONG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// the functions to get the current time and timezone info // the functions to get the current time and timezone info
@@ -246,6 +253,7 @@ long wxGetUTCTime()
return -1; return -1;
} }
#if wxUSE_LONGLONG
// Get local time as milliseconds since 00:00:00, Jan 1st 1970 // Get local time as milliseconds since 00:00:00, Jan 1st 1970
wxLongLong wxGetLocalTimeMillis() wxLongLong wxGetLocalTimeMillis()
@@ -314,3 +322,6 @@ wxLongLong wxGetLocalTimeMillis()
#endif // time functions #endif // time functions
} }
#endif // wxUSE_LONGLONG

View File

@@ -25,9 +25,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_TREECTRL
#include "wx/treebase.h" #include "wx/treebase.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h" #include "wx/log.h"
@@ -50,4 +52,5 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
m_itemOld = 0; m_itemOld = 0;
} }
#endif // wxUSE_TREECTRL

View File

@@ -661,10 +661,12 @@ wxFindWindowByName1 (const wxString& title, wxWindow * parent)
int int
wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& itemString) wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& itemString)
{ {
#if wxUSE_MENUS
wxMenuBar *menuBar = frame->GetMenuBar (); wxMenuBar *menuBar = frame->GetMenuBar ();
if (!menuBar) if (menuBar)
return -1; return menuBar->FindMenuItem (menuString, itemString);
return menuBar->FindMenuItem (menuString, itemString); #endif // wxUSE_MENUS
return -1;
} }
#endif // wxUSE_GUI #endif // wxUSE_GUI
@@ -873,6 +875,8 @@ whereami(name)
* since otherwise the generic code may be pulled in unnecessarily. * since otherwise the generic code may be pulled in unnecessarily.
*/ */
#if wxUSE_MSGDLG
int wxMessageBox(const wxString& message, const wxString& caption, long style, int wxMessageBox(const wxString& message, const wxString& caption, long style,
wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) ) wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) )
{ {
@@ -896,7 +900,10 @@ int wxMessageBox(const wxString& message, const wxString& caption, long style,
return wxCANCEL; return wxCANCEL;
} }
#endif // wxUSE_MSGDLG
#if wxUSE_TEXTDLG #if wxUSE_TEXTDLG
wxString wxGetTextFromUser(const wxString& message, const wxString& caption, wxString wxGetTextFromUser(const wxString& message, const wxString& caption,
const wxString& defaultValue, wxWindow *parent, const wxString& defaultValue, wxWindow *parent,
int x, int y, bool WXUNUSED(centre) ) int x, int y, bool WXUNUSED(centre) )
@@ -929,6 +936,8 @@ wxString wxGetPasswordFromUser(const wxString& message,
#endif // wxUSE_TEXTDLG #endif // wxUSE_TEXTDLG
#if wxUSE_COLOURDLG
wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit) wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit)
{ {
wxColourData data; wxColourData data;
@@ -949,6 +958,8 @@ wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit)
return colRet; return colRet;
} }
#endif // wxUSE_COLOURDLG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// missing C RTL functions (FIXME shouldn't be here at all) // missing C RTL functions (FIXME shouldn't be here at all)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -409,7 +409,11 @@ wxSize wxWindowBase::DoGetBestSize() const
node = node->GetNext() ) node = node->GetNext() )
{ {
wxWindow *win = node->GetData(); wxWindow *win = node->GetData();
if ( win->IsTopLevel() || wxDynamicCast(win, wxStatusBar) ) if ( win->IsTopLevel()
#if wxUSE_STATUSBAR
|| wxDynamicCast(win, wxStatusBar)
#endif // wxUSE_STATUSBAR
)
{ {
// dialogs and frames lie in different top level windows - // dialogs and frames lie in different top level windows -
// don't deal with them here; as for the status bars, they // don't deal with them here; as for the status bars, they
@@ -1256,6 +1260,7 @@ void wxWindowBase::GetPositionConstraint(int *x, int *y) const
// of control classes. // of control classes.
void wxWindowBase::UpdateWindowUI() void wxWindowBase::UpdateWindowUI()
{ {
#if wxUSE_CONTROLS
wxUpdateUIEvent event(GetId()); wxUpdateUIEvent event(GetId());
event.m_eventObject = this; event.m_eventObject = this;
@@ -1269,10 +1274,12 @@ void wxWindowBase::UpdateWindowUI()
wxControl *control = wxDynamicCast(this, wxControl); wxControl *control = wxDynamicCast(this, wxControl);
if ( control ) if ( control )
{ {
#if wxUSE_TEXTCTRL
wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl); wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl);
if ( text ) if ( text )
text->SetValue(event.GetText()); text->SetValue(event.GetText());
else else
#endif // wxUSE_TEXTCTRL
control->SetLabel(event.GetText()); control->SetLabel(event.GetText());
} }
} }
@@ -1295,6 +1302,7 @@ void wxWindowBase::UpdateWindowUI()
} }
#endif // wxUSE_RADIOBTN #endif // wxUSE_RADIOBTN
} }
#endif // wxUSE_CONTROLS
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -1404,6 +1412,7 @@ void wxWindowBase::OnInitDialog( wxInitDialogEvent &WXUNUSED(event) )
// process Ctrl-Alt-mclick // process Ctrl-Alt-mclick
void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
{ {
#if wxUSE_MSGDLG
if ( event.ControlDown() && event.AltDown() ) if ( event.ControlDown() && event.AltDown() )
{ {
// don't translate these strings // don't translate these strings
@@ -1448,6 +1457,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
(wxWindow *)this); (wxWindow *)this);
} }
else else
#endif // wxUSE_MSGDLG
{ {
event.Skip(); event.Skip();
} }

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_CARET
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/window.h" #include "wx/window.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -205,3 +207,5 @@ void wxCaret::DoDraw(wxDC *dc)
dc->DrawRectangle( m_x, m_y, m_width, m_height ); dc->DrawRectangle( m_x, m_y, m_width, m_height );
#endif // 0/1 #endif // 0/1
} }
#endif // wxUSE_CARET

View File

@@ -20,6 +20,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_CHOICEDLG
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/utils.h" #include "wx/utils.h"
@@ -315,3 +317,4 @@ void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
EndModal(wxID_OK); EndModal(wxID_OK);
} }
#endif // wxUSE_CHOICEDLG

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: colrdlgg.cpp // Name: generic/colrdlgg.cpp
// Purpose: Choice dialogs // Purpose: Choice dialogs
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@@ -17,22 +17,22 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_COLOURDLG
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include "wx/utils.h"
#include <stdio.h> #include "wx/intl.h"
#include "wx/utils.h" #include "wx/dialog.h"
#include "wx/intl.h" #include "wx/listbox.h"
#include "wx/dialog.h" #include "wx/button.h"
#include "wx/listbox.h" #include "wx/stattext.h"
#include "wx/button.h" #include "wx/layout.h"
#include "wx/stattext.h" #include "wx/dcclient.h"
#include "wx/layout.h" #include "wx/slider.h"
#include "wx/dcclient.h" #include "wx/sizer.h"
#include "wx/slider.h"
#include "wx/sizer.h"
#endif #endif
#if wxUSE_STATLINE #if wxUSE_STATLINE
@@ -504,4 +504,5 @@ void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event))
PaintCustomColour(dc); PaintCustomColour(dc);
} }
#endif // wxUSE_COLOURDLG

View File

@@ -20,7 +20,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/defs.h" #if wxUSE_GRID
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
@@ -1244,3 +1244,5 @@ wxString wxGenericDirDialog::GetPath(void) const
{ {
return m_dirCtrl->GetPath(); return m_dirCtrl->GetPath();
} }
#endif // wxUSE_GRID

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_DRAGIMAGE
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/setup.h" #include "wx/setup.h"
@@ -497,3 +499,4 @@ wxRect wxGenericDragImage::GetImageRect(const wxPoint& pos) const
} }
} }
#endif // wxUSE_DRAGIMAGE

View File

@@ -20,6 +20,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_FILEDLG
#ifndef __UNIX__ #ifndef __UNIX__
#error wxFileDialog currently only supports unix #error wxFileDialog currently only supports unix
#endif #endif
@@ -1310,3 +1312,5 @@ public:
}; };
IMPLEMENT_DYNAMIC_CLASS(wxFileDialogGenericModule, wxModule) IMPLEMENT_DYNAMIC_CLASS(wxFileDialogGenericModule, wxModule)
#endif // wxUSE_FILEDLG

View File

@@ -25,6 +25,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_GRID
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -2852,3 +2854,4 @@ void *wxGenericGrid::GetCellData(int row, int col)
return rc; return rc;
} }
#endif // wxUSE_GRID

View File

@@ -176,6 +176,8 @@ void wxSashLayoutWindow::OnCalculateLayout(wxCalculateLayoutEvent& event)
* wxLayoutAlgorithm * wxLayoutAlgorithm
*/ */
#if wxUSE_MDI_ARCHITECTURE
// Lays out windows for an MDI frame. The MDI client area gets what's left // Lays out windows for an MDI frame. The MDI client area gets what's left
// over. // over.
bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r) bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
@@ -213,6 +215,8 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
return TRUE; return TRUE;
} }
#endif // wxUSE_MDI_ARCHITECTURE
// Layout algorithm for any window. mainWindow gets what's left over. // Layout algorithm for any window. mainWindow gets what's left over.
bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow) bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow)
{ {

View File

@@ -19,6 +19,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_LISTCTRL
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/listctrl.h" #include "wx/listctrl.h"
@@ -3728,3 +3730,5 @@ void wxListCtrl::SetFocus()
if ( FindFocus() != this ) if ( FindFocus() != this )
m_mainWin->SetFocus(); m_mainWin->SetFocus();
} }
#endif // wxUSE_LISTCTRL

View File

@@ -31,6 +31,8 @@
#error "This file can't be compiled without GUI!" #error "This file can't be compiled without GUI!"
#endif #endif
#if wxUSE_LOGGUI || wxUSE_LOGWINDOW
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/button.h" #include "wx/button.h"
@@ -247,7 +249,7 @@ void wxLogGui::Flush()
titleFormat = _("%s Information"); titleFormat = _("%s Information");
style = wxICON_INFORMATION; style = wxICON_INFORMATION;
} }
wxString title; wxString title;
title.Printf(titleFormat, appName.c_str()); title.Printf(titleFormat, appName.c_str());
@@ -1052,3 +1054,4 @@ static int OpenLogFile(wxFile& file, wxString *pFilename)
#endif // wxUSE_FILE #endif // wxUSE_FILE
#endif // !(wxUSE_LOGGUI || wxUSE_LOGWINDOW)

View File

@@ -20,6 +20,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_MSGDLG
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
@@ -127,4 +129,5 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
} }
} }
#endif // wxUSE_MSGDLG

View File

@@ -29,6 +29,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_NUMBERDLG
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
@@ -206,3 +208,5 @@ long wxGetNumberFromUser(const wxString& msg,
return dialog.GetValue(); return dialog.GetValue();
} }
#endif // wxUSE_NUMBERDLG

View File

@@ -65,7 +65,9 @@ END_EVENT_TABLE()
void wxPanel::Init() void wxPanel::Init()
{ {
m_winLastFocused = (wxWindow *)NULL; m_winLastFocused = (wxWindow *)NULL;
#if wxUSE_BUTTON
m_btnDefault = (wxButton *)NULL; m_btnDefault = (wxButton *)NULL;
#endif // wxUSE_BUTTON
} }
bool wxPanel::Create(wxWindow *parent, wxWindowID id, bool wxPanel::Create(wxWindow *parent, wxWindowID id,

View File

@@ -6,7 +6,7 @@
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -20,6 +20,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_PROPSHEET
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
@@ -564,7 +566,7 @@ void wxPropertyValue::WritePropertyType(wxString& stream) // Write as any oth
expr->WritePropertyType(stream); expr->WritePropertyType(stream);
expr = expr->m_next; expr = expr->m_next;
if (expr) if (expr)
stream.Append( wxT(", ") ); stream.Append( wxT(", ") );
} }
stream.Append( wxT("]") ); stream.Append( wxT("]") );
} }
@@ -1006,14 +1008,14 @@ void wxPropertySheet::RemoveProperty(const wxString& name)
if(node) if(node)
{ {
wxProperty *prop = (wxProperty *)node->Data(); wxProperty *prop = (wxProperty *)node->Data();
delete prop; delete prop;
m_properties.DeleteNode(node); m_properties.DeleteNode(node);
} }
} }
bool wxPropertySheet::HasProperty(const wxString& name) const bool wxPropertySheet::HasProperty(const wxString& name) const
{ {
return (GetProperty(name)?TRUE:FALSE); return (GetProperty(name)?TRUE:FALSE);
} }
// Clear all properties // Clear all properties
@@ -1095,10 +1097,10 @@ wxPropertyValidator::~wxPropertyValidator(void)
{} {}
bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) { bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) {
double num; double num;
bool ok = StringToDouble (s, &num); bool ok = StringToDouble (s, &num);
*number = (float) num; *number = (float) num;
return ok; return ok;
} }
bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) { bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) {
@@ -1106,20 +1108,20 @@ bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) {
wxChar *value_ptr; wxChar *value_ptr;
*number = wxStrtod (s, &value_ptr); *number = wxStrtod (s, &value_ptr);
if (value_ptr) { if (value_ptr) {
int len = wxStrlen (value_ptr); int len = wxStrlen (value_ptr);
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
ok = (wxIsspace (value_ptr[i]) != 0); ok = (wxIsspace (value_ptr[i]) != 0);
if (!ok) return FALSE; if (!ok) return FALSE;
} }
} }
return ok; return ok;
} }
bool wxPropertyValidator::StringToInt (wxChar *s, int *number) { bool wxPropertyValidator::StringToInt (wxChar *s, int *number) {
long num; long num;
bool ok = StringToLong (s, &num); bool ok = StringToLong (s, &num);
*number = (int) num; *number = (int) num;
return ok; return ok;
} }
bool wxPropertyValidator::StringToLong (wxChar *s, long *number) { bool wxPropertyValidator::StringToLong (wxChar *s, long *number) {
@@ -1127,31 +1129,33 @@ bool wxPropertyValidator::StringToLong (wxChar *s, long *number) {
wxChar *value_ptr; wxChar *value_ptr;
*number = wxStrtol (s, &value_ptr, 10); *number = wxStrtol (s, &value_ptr, 10);
if (value_ptr) { if (value_ptr) {
int len = wxStrlen (value_ptr); int len = wxStrlen (value_ptr);
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
ok = (wxIsspace (value_ptr[i]) != 0); ok = (wxIsspace (value_ptr[i]) != 0);
if (!ok) return FALSE; if (!ok) return FALSE;
} }
} }
return ok; return ok;
} }
wxChar *wxPropertyValidator::FloatToString (float number) { wxChar *wxPropertyValidator::FloatToString (float number) {
static wxChar buf[20]; static wxChar buf[20];
wxSprintf (buf, wxT("%.6g"), number); wxSprintf (buf, wxT("%.6g"), number);
return buf; return buf;
} }
wxChar *wxPropertyValidator::DoubleToString (double number) { wxChar *wxPropertyValidator::DoubleToString (double number) {
static wxChar buf[20]; static wxChar buf[20];
wxSprintf (buf, wxT("%.6g"), number); wxSprintf (buf, wxT("%.6g"), number);
return buf; return buf;
} }
wxChar *wxPropertyValidator::IntToString (int number) { wxChar *wxPropertyValidator::IntToString (int number) {
return ::IntToString (number); return ::IntToString (number);
} }
wxChar *wxPropertyValidator::LongToString (long number) { wxChar *wxPropertyValidator::LongToString (long number) {
return ::LongToString (number); return ::LongToString (number);
} }
#endif // wxUSE_PROPSHEET

View File

@@ -6,7 +6,7 @@
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
@@ -20,6 +20,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_PROPSHEET
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
@@ -39,11 +41,11 @@
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormView, wxPropertyView) IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormView, wxPropertyView)
BEGIN_EVENT_TABLE(wxPropertyFormView, wxPropertyView) BEGIN_EVENT_TABLE(wxPropertyFormView, wxPropertyView)
EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk) EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk)
EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel) EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel)
EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp) EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp)
EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert) EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert)
EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate) EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate)
END_EVENT_TABLE() END_EVENT_TABLE()
bool wxPropertyFormView::sm_dialogCancelled = FALSE; bool wxPropertyFormView::sm_dialogCancelled = FALSE;
@@ -52,11 +54,11 @@ wxPropertyFormView::wxPropertyFormView(wxWindow *propPanel, long flags):wxProper
{ {
m_propertyWindow = propPanel; m_propertyWindow = propPanel;
m_managedWindow = NULL; m_managedWindow = NULL;
m_windowCloseButton = NULL; m_windowCloseButton = NULL;
m_windowCancelButton = NULL; m_windowCancelButton = NULL;
m_windowHelpButton = NULL; m_windowHelpButton = NULL;
m_detailedEditing = FALSE; m_detailedEditing = FALSE;
} }
@@ -67,7 +69,7 @@ wxPropertyFormView::~wxPropertyFormView(void)
void wxPropertyFormView::ShowView(wxPropertySheet *ps, wxWindow *panel) void wxPropertyFormView::ShowView(wxPropertySheet *ps, wxWindow *panel)
{ {
m_propertySheet = ps; m_propertySheet = ps;
AssociatePanel(panel); AssociatePanel(panel);
// CreateControls(); // CreateControls();
// UpdatePropertyList(); // UpdatePropertyList();
@@ -84,7 +86,7 @@ bool wxPropertyFormView::Check(void)
{ {
if (!m_propertySheet) if (!m_propertySheet)
return FALSE; return FALSE;
wxNode *node = m_propertySheet->GetProperties().First(); wxNode *node = m_propertySheet->GetProperties().First();
while (node) while (node)
{ {
@@ -105,7 +107,7 @@ bool wxPropertyFormView::TransferToPropertySheet(void)
{ {
if (!m_propertySheet) if (!m_propertySheet)
return FALSE; return FALSE;
wxNode *node = m_propertySheet->GetProperties().First(); wxNode *node = m_propertySheet->GetProperties().First();
while (node) while (node)
{ {
@@ -125,7 +127,7 @@ bool wxPropertyFormView::TransferToDialog(void)
{ {
if (!m_propertySheet) if (!m_propertySheet)
return FALSE; return FALSE;
wxNode *node = m_propertySheet->GetProperties().First(); wxNode *node = m_propertySheet->GetProperties().First();
while (node) while (node)
{ {
@@ -145,7 +147,7 @@ bool wxPropertyFormView::AssociateNames(void)
{ {
if (!m_propertySheet || !m_propertyWindow) if (!m_propertySheet || !m_propertyWindow)
return FALSE; return FALSE;
wxNode *node = m_propertyWindow->GetChildren().First(); wxNode *node = m_propertyWindow->GetChildren().First();
while (node) while (node)
{ {
@@ -177,17 +179,17 @@ void wxPropertyFormView::OnOk(wxCommandEvent& WXUNUSED(event))
// Retrieve the value if any // Retrieve the value if any
if (!Check()) if (!Check())
return; return;
sm_dialogCancelled = FALSE; sm_dialogCancelled = FALSE;
TransferToPropertySheet(); TransferToPropertySheet();
m_managedWindow->Close(TRUE); m_managedWindow->Close(TRUE);
} }
void wxPropertyFormView::OnCancel(wxCommandEvent& WXUNUSED(event)) void wxPropertyFormView::OnCancel(wxCommandEvent& WXUNUSED(event))
{ {
sm_dialogCancelled = TRUE; sm_dialogCancelled = TRUE;
m_managedWindow->Close(TRUE); m_managedWindow->Close(TRUE);
} }
@@ -210,10 +212,10 @@ void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event)
{ {
if (!m_propertySheet) if (!m_propertySheet)
return; return;
if (win.GetName() == wxT("")) if (win.GetName() == wxT(""))
return; return;
if (wxStrcmp(win.GetName(), wxT("ok")) == 0) if (wxStrcmp(win.GetName(), wxT("ok")) == 0)
OnOk(event); OnOk(event);
else if (wxStrcmp(win.GetName(), wxT("cancel")) == 0) else if (wxStrcmp(win.GetName(), wxT("cancel")) == 0)
@@ -264,7 +266,7 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item)
{ {
if (!m_propertySheet) if (!m_propertySheet)
return; return;
// Find a validator to route the command to. // Find a validator to route the command to.
wxNode *node = m_propertySheet->GetProperties().First(); wxNode *node = m_propertySheet->GetProperties().First();
while (node) while (node)
@@ -413,20 +415,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxRealFormValidator, wxPropertyFormValidator)
/// ///
/// Real number form validator /// Real number form validator
/// ///
bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *parentWindow) wxWindow *parentWindow)
{ {
if (m_realMin == 0.0 && m_realMax == 0.0) if (m_realMin == 0.0 && m_realMax == 0.0)
return TRUE; return TRUE;
// The item used for viewing the real number: should be a text item. // The item used for viewing the real number: should be a text item.
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
return FALSE; return FALSE;
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
float val = 0.0; float val = 0.0;
if (!StringToFloat(WXSTRINGCAST value, &val)) if (!StringToFloat(WXSTRINGCAST value, &val))
{ {
@@ -435,7 +437,7 @@ bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView
wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
return FALSE; return FALSE;
} }
if (val < m_realMin || val > m_realMax) if (val < m_realMin || val > m_realMax)
{ {
wxChar buf[200]; wxChar buf[200];
@@ -446,32 +448,32 @@ bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView
return TRUE; return TRUE;
} }
bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow) ) wxWindow *WXUNUSED(parentWindow) )
{ {
// The item used for viewing the real number: should be a text item. // The item used for viewing the real number: should be a text item.
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
return FALSE; return FALSE;
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
if (value.Length() == 0) if (value.Length() == 0)
return FALSE; return FALSE;
float f = (float)wxAtof((const wxChar *)value); float f = (float)wxAtof((const wxChar *)value);
property->GetValue() = f; property->GetValue() = f;
return TRUE; return TRUE;
} }
bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow) ) wxWindow *WXUNUSED(parentWindow) )
{ {
// The item used for viewing the real number: should be a text item. // The item used for viewing the real number: should be a text item.
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
return FALSE; return FALSE;
wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow; wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow;
textItem->SetValue(FloatToString(property->GetValue().RealValue())); textItem->SetValue(FloatToString(property->GetValue().RealValue()));
return TRUE; return TRUE;
@@ -479,26 +481,26 @@ bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormVie
/// ///
/// Integer validator /// Integer validator
/// ///
IMPLEMENT_DYNAMIC_CLASS(wxIntegerFormValidator, wxPropertyFormValidator) IMPLEMENT_DYNAMIC_CLASS(wxIntegerFormValidator, wxPropertyFormValidator)
bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *parentWindow) wxWindow *parentWindow)
{ {
if (m_integerMin == 0.0 && m_integerMax == 0.0) if (m_integerMin == 0.0 && m_integerMax == 0.0)
return TRUE; return TRUE;
// The item used for viewing the real number: should be a text item or a slider // The item used for viewing the real number: should be a text item or a slider
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow) if (!m_propertyWindow)
return FALSE; return FALSE;
long val = 0; long val = 0;
if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
{ {
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
if (!StringToLong(WXSTRINGCAST value, &val)) if (!StringToLong(WXSTRINGCAST value, &val))
{ {
wxChar buf[200]; wxChar buf[200];
@@ -513,7 +515,7 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi
} }
else else
return FALSE; return FALSE;
if (val < m_integerMin || val > m_integerMax) if (val < m_integerMin || val > m_integerMax)
{ {
char buf[200]; char buf[200];
@@ -524,21 +526,21 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi
return TRUE; return TRUE;
} }
bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow)) wxWindow *WXUNUSED(parentWindow))
{ {
// The item used for viewing the real number: should be a text item or a slider // The item used for viewing the real number: should be a text item or a slider
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow) if (!m_propertyWindow)
return FALSE; return FALSE;
if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
{ {
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
if (value.Length() == 0) if (value.Length() == 0)
return FALSE; return FALSE;
long i = wxAtol((const wxChar *)value); long i = wxAtol((const wxChar *)value);
property->GetValue() = i; property->GetValue() = i;
} }
@@ -548,18 +550,18 @@ bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFor
} }
else else
return FALSE; return FALSE;
return TRUE; return TRUE;
} }
bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow)) wxWindow *WXUNUSED(parentWindow))
{ {
// The item used for viewing the real number: should be a text item or a slider // The item used for viewing the real number: should be a text item or a slider
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow) if (!m_propertyWindow)
return FALSE; return FALSE;
if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
{ {
wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow; wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow;
@@ -576,42 +578,42 @@ bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFor
/// ///
/// Boolean validator /// Boolean validator
/// ///
IMPLEMENT_DYNAMIC_CLASS(wxBoolFormValidator, wxPropertyFormValidator) IMPLEMENT_DYNAMIC_CLASS(wxBoolFormValidator, wxPropertyFormValidator)
bool wxBoolFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxBoolFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow)) wxWindow *WXUNUSED(parentWindow))
{ {
// The item used for viewing the boolean: should be a checkbox // The item used for viewing the boolean: should be a checkbox
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox)))
return FALSE; return FALSE;
return TRUE; return TRUE;
} }
bool wxBoolFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxBoolFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow) ) wxWindow *WXUNUSED(parentWindow) )
{ {
// The item used for viewing the boolean: should be a checkbox. // The item used for viewing the boolean: should be a checkbox.
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox)))
return FALSE; return FALSE;
wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow;
property->GetValue() = (bool)checkBox->GetValue(); property->GetValue() = (bool)checkBox->GetValue();
return TRUE; return TRUE;
} }
bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow)) wxWindow *WXUNUSED(parentWindow))
{ {
// The item used for viewing the boolean: should be a checkbox. // The item used for viewing the boolean: should be a checkbox.
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox)))
return FALSE; return FALSE;
wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow;
checkBox->SetValue((bool)property->GetValue().BoolValue()); checkBox->SetValue((bool)property->GetValue().BoolValue());
return TRUE; return TRUE;
@@ -619,7 +621,7 @@ bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormVie
/// ///
/// String validator /// String validator
/// ///
IMPLEMENT_DYNAMIC_CLASS(wxStringFormValidator, wxPropertyFormValidator) IMPLEMENT_DYNAMIC_CLASS(wxStringFormValidator, wxPropertyFormValidator)
wxStringFormValidator::wxStringFormValidator(wxStringList *list, long flags): wxStringFormValidator::wxStringFormValidator(wxStringList *list, long flags):
@@ -628,12 +630,12 @@ wxPropertyFormValidator(flags)
m_strings = list; m_strings = list;
} }
bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *parentWindow ) wxWindow *parentWindow )
{ {
if (!m_strings) if (!m_strings)
return TRUE; return TRUE;
// The item used for viewing the string: should be a text item, choice item or listbox. // The item used for viewing the string: should be a text item, choice item or listbox.
wxWindow *m_propertyWindow = property->GetWindow(); wxWindow *m_propertyWindow = property->GetWindow();
if (!m_propertyWindow) if (!m_propertyWindow)
@@ -658,7 +660,7 @@ bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVie
return TRUE; return TRUE;
} }
bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow) ) wxWindow *WXUNUSED(parentWindow) )
{ {
// The item used for viewing the string: should be a text item, choice item or listbox. // The item used for viewing the string: should be a text item, choice item or listbox.
@@ -696,7 +698,7 @@ bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyForm
return TRUE; return TRUE;
} }
bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
wxWindow *WXUNUSED(parentWindow) ) wxWindow *WXUNUSED(parentWindow) )
{ {
// The item used for viewing the string: should be a text item, choice item or listbox. // The item used for viewing the string: should be a text item, choice item or listbox.
@@ -755,3 +757,4 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV
return TRUE; return TRUE;
} }
#endif // wxUSE_PROPSHEET

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_PROPSHEET
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/window.h" #include "wx/window.h"
#include "wx/font.h" #include "wx/font.h"
@@ -1880,3 +1882,4 @@ static wxBitmap *GetCrossBitmap()
return s_crossBitmap; return s_crossBitmap;
} }
#endif // wxUSE_PROPSHEET

View File

@@ -20,6 +20,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_SPLASH
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
@@ -156,3 +158,4 @@ void wxSplashScreenWindow::OnChar(wxKeyEvent& event)
GetParent()->Close(TRUE); GetParent()->Close(TRUE);
} }
#endif // wxUSE_SPLASH

View File

@@ -20,7 +20,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
//#if !defined(__WIN32__) || !wxUSE_NATIVE_STATUSBAR #if wxUSE_STATUSBAR
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/setup.h" #include "wx/setup.h"
@@ -359,4 +359,4 @@ void wxStatusBarGeneric::SetMinHeight(int height)
} }
} }
//#endif // Win32 && wxUSE_NATIVE_STATUSBAR #endif // wxUSE_STATUSBAR

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_TEXTDLG
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
@@ -119,3 +121,5 @@ void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) )
EndModal(wxID_OK); EndModal(wxID_OK);
} }
#endif // wxUSE_TEXTDLG

View File

@@ -25,9 +25,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_TREECTRL
#include "wx/generic/treectlg.h" #include "wx/generic/treectlg.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/settings.h" #include "wx/settings.h"
@@ -2530,3 +2532,4 @@ void wxGenericTreeCtrl::RefreshLine( wxGenericTreeItem *item )
Refresh( TRUE, &rect ); Refresh( TRUE, &rect );
} }
#endif // wxUSE_TREECTRL

View File

@@ -28,6 +28,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_WIZARDDLG
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/intl.h" #include "wx/intl.h"
@@ -389,3 +391,4 @@ wxWizardEvent::wxWizardEvent(wxEventType type, int id, bool direction)
m_direction = direction; m_direction = direction;
} }
#endif // wxUSE_WIZARDDLG

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 15:57, 2000/08/04 # This file was automatically generated by tmake at 14:01, 2000/08/11
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \
@@ -972,6 +972,56 @@ GUIDEPS = \
win_gtk.d \ win_gtk.d \
window.d window.d
GUI_LOWLEVEL_OBJS = \
app.o \
bitmap.o \
brush.o \
colour.o \
cursor.o \
data.o \
dc.o \
dcclient.o \
dcmemory.o \
dcscreen.o \
dialog.o \
font.o \
frame.o \
gdiobj.o \
icon.o \
main.o \
palette.o \
pen.o \
region.o \
settings.o \
utilsgtk.o \
win_gtk.o \
window.o
GUI_LOWLEVEL_DEPS = \
app.d \
bitmap.d \
brush.d \
colour.d \
cursor.d \
data.d \
dc.d \
dcclient.d \
dcmemory.d \
dcscreen.d \
dialog.d \
font.d \
frame.d \
gdiobj.d \
icon.d \
main.d \
palette.d \
pen.d \
region.d \
settings.d \
utilsgtk.d \
win_gtk.d \
window.d
UNIXOBJS = \ UNIXOBJS = \
dialup.o \ dialup.o \
dir.o \ dir.o \

View File

@@ -146,6 +146,7 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
return TRUE; return TRUE;
} }
#if wxUSE_MENUS
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// "child_attached" of menu bar // "child_attached" of menu bar
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -169,6 +170,7 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
win->m_menuBarDetached = TRUE; win->m_menuBarDetached = TRUE;
win->GtkUpdateSize(); win->GtkUpdateSize();
} }
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -612,6 +614,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
wxWindow::DoGetClientSize( width, height ); wxWindow::DoGetClientSize( width, height );
if (height) if (height)
{ {
#if wxUSE_MENUS
/* menu bar */ /* menu bar */
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
@@ -620,6 +623,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
else else
(*height) -= wxPLACE_HOLDER; (*height) -= wxPLACE_HOLDER;
} }
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
/* status bar */ /* status bar */
@@ -663,6 +667,7 @@ void wxFrame::DoSetClientSize( int width, int height )
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
#if wxUSE_MENUS
/* menu bar */ /* menu bar */
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
@@ -671,6 +676,7 @@ void wxFrame::DoSetClientSize( int width, int height )
else else
height += wxPLACE_HOLDER; height += wxPLACE_HOLDER;
} }
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
/* status bar */ /* status bar */
@@ -759,6 +765,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
* this hurts in the eye, but I don't want to call SetSize() * this hurts in the eye, but I don't want to call SetSize()
* because I don't want to call any non-native functions here. */ * because I don't want to call any non-native functions here. */
#if wxUSE_MENUS
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
@@ -775,6 +782,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
xx, yy, ww, hh ); xx, yy, ww, hh );
client_area_y_offset += hh; client_area_y_offset += hh;
} }
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
if ((m_frameToolBar) && if ((m_frameToolBar) &&
@@ -782,6 +790,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle; int yy = m_miniEdge + m_miniTitle;
#if wxUSE_MENUS
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
if (!m_menuBarDetached) if (!m_menuBarDetached)
@@ -789,6 +798,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
else else
yy += wxPLACE_HOLDER; yy += wxPLACE_HOLDER;
} }
#endif // wxUSE_MENUS
m_frameToolBar->m_x = xx; m_frameToolBar->m_x = xx;
m_frameToolBar->m_y = yy; m_frameToolBar->m_y = yy;
@@ -848,7 +858,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
xx, yy, ww, hh ); xx, yy, ww, hh );
gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL ); gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL );
} }
#endif #endif // wxUSE_STATUSBAR
m_sizeSet = TRUE; m_sizeSet = TRUE;
@@ -857,6 +867,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
event.SetEventObject( this ); event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event ); GetEventHandler()->ProcessEvent( event );
#if wxUSE_STATUSBAR
// send size event to status bar // send size event to status bar
if (m_frameStatusBar) if (m_frameStatusBar)
{ {
@@ -864,6 +875,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
event2.SetEventObject( m_frameStatusBar ); event2.SetEventObject( m_frameStatusBar );
m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 ); m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 );
} }
#endif // wxUSE_STATUSBAR
m_resizing = FALSE; m_resizing = FALSE;
} }
@@ -888,7 +900,9 @@ void wxFrame::OnInternalIdle()
return; return;
} }
#if wxUSE_MENUS
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle(); if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
if (m_frameToolBar) m_frameToolBar->OnInternalIdle(); if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
#endif #endif
@@ -903,6 +917,8 @@ void wxFrame::OnInternalIdle()
// menu/tool/status bar stuff // menu/tool/status bar stuff
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_MENUS
void wxFrame::SetMenuBar( wxMenuBar *menuBar ) void wxFrame::SetMenuBar( wxMenuBar *menuBar )
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
@@ -959,7 +975,10 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
m_sizeSet = FALSE; m_sizeSet = FALSE;
} }
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name ) wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );

View File

@@ -1530,7 +1530,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(
gdk_im_begin(win->m_ic, win->m_wxwindow->window); gdk_im_begin(win->m_ic, win->m_wxwindow->window);
#endif #endif
#ifdef wxUSE_CARET #if wxUSE_CARET
// caret needs to be informed about focus change // caret needs to be informed about focus change
wxCaret *caret = win->GetCaret(); wxCaret *caret = win->GetCaret();
if ( caret ) if ( caret )
@@ -1588,7 +1588,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
gdk_im_end(); gdk_im_end();
#endif #endif
#ifdef wxUSE_CARET #if wxUSE_CARET
// caret needs to be informed about focus change // caret needs to be informed about focus change
wxCaret *caret = win->GetCaret(); wxCaret *caret = win->GetCaret();
if ( caret ) if ( caret )
@@ -3351,6 +3351,8 @@ void wxWindow::ApplyWidgetStyle()
// Pop-up menu stuff // Pop-up menu stuff
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_MENUS
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting ) static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
{ {
*is_waiting = FALSE; *is_waiting = FALSE;
@@ -3421,6 +3423,8 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
return TRUE; return TRUE;
} }
#endif // wxUSE_MENUS
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
void wxWindow::SetDropTarget( wxDropTarget *dropTarget ) void wxWindow::SetDropTarget( wxDropTarget *dropTarget )

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 15:57, 2000/08/04 # This file was automatically generated by tmake at 14:01, 2000/08/11
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \
@@ -972,6 +972,56 @@ GUIDEPS = \
win_gtk.d \ win_gtk.d \
window.d window.d
GUI_LOWLEVEL_OBJS = \
app.o \
bitmap.o \
brush.o \
colour.o \
cursor.o \
data.o \
dc.o \
dcclient.o \
dcmemory.o \
dcscreen.o \
dialog.o \
font.o \
frame.o \
gdiobj.o \
icon.o \
main.o \
palette.o \
pen.o \
region.o \
settings.o \
utilsgtk.o \
win_gtk.o \
window.o
GUI_LOWLEVEL_DEPS = \
app.d \
bitmap.d \
brush.d \
colour.d \
cursor.d \
data.d \
dc.d \
dcclient.d \
dcmemory.d \
dcscreen.d \
dialog.d \
font.d \
frame.d \
gdiobj.d \
icon.d \
main.d \
palette.d \
pen.d \
region.d \
settings.d \
utilsgtk.d \
win_gtk.d \
window.d
UNIXOBJS = \ UNIXOBJS = \
dialup.o \ dialup.o \
dir.o \ dir.o \

View File

@@ -146,6 +146,7 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
return TRUE; return TRUE;
} }
#if wxUSE_MENUS
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// "child_attached" of menu bar // "child_attached" of menu bar
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -169,6 +170,7 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
win->m_menuBarDetached = TRUE; win->m_menuBarDetached = TRUE;
win->GtkUpdateSize(); win->GtkUpdateSize();
} }
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -612,6 +614,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
wxWindow::DoGetClientSize( width, height ); wxWindow::DoGetClientSize( width, height );
if (height) if (height)
{ {
#if wxUSE_MENUS
/* menu bar */ /* menu bar */
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
@@ -620,6 +623,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
else else
(*height) -= wxPLACE_HOLDER; (*height) -= wxPLACE_HOLDER;
} }
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
/* status bar */ /* status bar */
@@ -663,6 +667,7 @@ void wxFrame::DoSetClientSize( int width, int height )
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
#if wxUSE_MENUS
/* menu bar */ /* menu bar */
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
@@ -671,6 +676,7 @@ void wxFrame::DoSetClientSize( int width, int height )
else else
height += wxPLACE_HOLDER; height += wxPLACE_HOLDER;
} }
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
/* status bar */ /* status bar */
@@ -759,6 +765,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
* this hurts in the eye, but I don't want to call SetSize() * this hurts in the eye, but I don't want to call SetSize()
* because I don't want to call any non-native functions here. */ * because I don't want to call any non-native functions here. */
#if wxUSE_MENUS
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
@@ -775,6 +782,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
xx, yy, ww, hh ); xx, yy, ww, hh );
client_area_y_offset += hh; client_area_y_offset += hh;
} }
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
if ((m_frameToolBar) && if ((m_frameToolBar) &&
@@ -782,6 +790,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
{ {
int xx = m_miniEdge; int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle; int yy = m_miniEdge + m_miniTitle;
#if wxUSE_MENUS
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
if (!m_menuBarDetached) if (!m_menuBarDetached)
@@ -789,6 +798,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
else else
yy += wxPLACE_HOLDER; yy += wxPLACE_HOLDER;
} }
#endif // wxUSE_MENUS
m_frameToolBar->m_x = xx; m_frameToolBar->m_x = xx;
m_frameToolBar->m_y = yy; m_frameToolBar->m_y = yy;
@@ -848,7 +858,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
xx, yy, ww, hh ); xx, yy, ww, hh );
gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL ); gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL );
} }
#endif #endif // wxUSE_STATUSBAR
m_sizeSet = TRUE; m_sizeSet = TRUE;
@@ -857,6 +867,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
event.SetEventObject( this ); event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event ); GetEventHandler()->ProcessEvent( event );
#if wxUSE_STATUSBAR
// send size event to status bar // send size event to status bar
if (m_frameStatusBar) if (m_frameStatusBar)
{ {
@@ -864,6 +875,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
event2.SetEventObject( m_frameStatusBar ); event2.SetEventObject( m_frameStatusBar );
m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 ); m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 );
} }
#endif // wxUSE_STATUSBAR
m_resizing = FALSE; m_resizing = FALSE;
} }
@@ -888,7 +900,9 @@ void wxFrame::OnInternalIdle()
return; return;
} }
#if wxUSE_MENUS
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle(); if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
if (m_frameToolBar) m_frameToolBar->OnInternalIdle(); if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
#endif #endif
@@ -903,6 +917,8 @@ void wxFrame::OnInternalIdle()
// menu/tool/status bar stuff // menu/tool/status bar stuff
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_MENUS
void wxFrame::SetMenuBar( wxMenuBar *menuBar ) void wxFrame::SetMenuBar( wxMenuBar *menuBar )
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
@@ -959,7 +975,10 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
m_sizeSet = FALSE; m_sizeSet = FALSE;
} }
#endif // wxUSE_MENUS
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name ) wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );

View File

@@ -1530,7 +1530,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(
gdk_im_begin(win->m_ic, win->m_wxwindow->window); gdk_im_begin(win->m_ic, win->m_wxwindow->window);
#endif #endif
#ifdef wxUSE_CARET #if wxUSE_CARET
// caret needs to be informed about focus change // caret needs to be informed about focus change
wxCaret *caret = win->GetCaret(); wxCaret *caret = win->GetCaret();
if ( caret ) if ( caret )
@@ -1588,7 +1588,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
gdk_im_end(); gdk_im_end();
#endif #endif
#ifdef wxUSE_CARET #if wxUSE_CARET
// caret needs to be informed about focus change // caret needs to be informed about focus change
wxCaret *caret = win->GetCaret(); wxCaret *caret = win->GetCaret();
if ( caret ) if ( caret )
@@ -3351,6 +3351,8 @@ void wxWindow::ApplyWidgetStyle()
// Pop-up menu stuff // Pop-up menu stuff
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_MENUS
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting ) static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
{ {
*is_waiting = FALSE; *is_waiting = FALSE;
@@ -3421,6 +3423,8 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
return TRUE; return TRUE;
} }
#endif // wxUSE_MENUS
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
void wxWindow::SetDropTarget( wxDropTarget *dropTarget ) void wxWindow::SetDropTarget( wxDropTarget *dropTarget )

View File

@@ -73,11 +73,13 @@ static char **CreateFontList(wxChar spacing,
wxNativeEncodingInfo info; wxNativeEncodingInfo info;
wxGetNativeFontEncoding(encoding, &info); wxGetNativeFontEncoding(encoding, &info);
#if wxUSE_FONTMAP
if ( !wxTestFontEncoding(info) ) if ( !wxTestFontEncoding(info) )
{ {
// ask font mapper for a replacement // ask font mapper for a replacement
(void)wxTheFontMapper->GetAltForEncoding(encoding, &info); (void)wxTheFontMapper->GetAltForEncoding(encoding, &info);
} }
#endif // wxUSE_FONTMAP
wxString pattern; wxString pattern;
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"), pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),

View File

@@ -260,7 +260,9 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
if ( !wxGetNativeFontEncoding(encoding, &info) || if ( !wxGetNativeFontEncoding(encoding, &info) ||
!wxTestFontEncoding(info) ) !wxTestFontEncoding(info) )
{ {
#if wxUSE_FONTMAP
if ( !wxTheFontMapper->GetAltForEncoding(encoding, &info) ) if ( !wxTheFontMapper->GetAltForEncoding(encoding, &info) )
#endif // wxUSE_FONTMAP
{ {
// unspported encoding - replace it with the default // unspported encoding - replace it with the default
// //

View File

@@ -847,7 +847,7 @@ void wxThread::Sleep(unsigned long milliseconds)
int wxThread::GetCPUCount() int wxThread::GetCPUCount()
{ {
#if defined(__LINUX__) #if defined(__LINUX__) && wxUSE_FFILE
// read from proc (can't use wxTextFile here because it's a special file: // read from proc (can't use wxTextFile here because it's a special file:
// it has 0 size but still can be read from) // it has 0 size but still can be read from)
wxLogNull nolog; wxLogNull nolog;

View File

@@ -303,6 +303,8 @@ void wxHandleProcessTermination(wxEndProcessData *proc_data)
// wxStream classes to support IO redirection in wxExecute // wxStream classes to support IO redirection in wxExecute
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_STREAMS
class wxProcessFileInputStream : public wxInputStream class wxProcessFileInputStream : public wxInputStream
{ {
public: public:
@@ -399,12 +401,14 @@ size_t wxProcessFileOutputStream::OnSysWrite(const void *buffer, size_t bufsize)
return ret; return ret;
} }
#endif // wxUSE_STREAMS
long wxExecute(wxChar **argv, long wxExecute(wxChar **argv,
bool sync, bool sync,
wxProcess *process) wxProcess *process)
{ {
// for the sync execution, we return -1 to indicate failure, but for async // for the sync execution, we return -1 to indicate failure, but for async
// cse we return 0 which is never a valid PID // case we return 0 which is never a valid PID
long errorRetCode = sync ? -1 : 0; long errorRetCode = sync ? -1 : 0;
wxCHECK_MSG( *argv, errorRetCode, wxT("can't exec empty command") ); wxCHECK_MSG( *argv, errorRetCode, wxT("can't exec empty command") );
@@ -557,16 +561,18 @@ long wxExecute(wxChar **argv,
// pipe initialization: construction of the wxStreams // pipe initialization: construction of the wxStreams
if ( process && process->IsRedirected() ) if ( process && process->IsRedirected() )
{ {
#if wxUSE_STREAMS
// These two streams are relative to this process. // These two streams are relative to this process.
wxOutputStream *outStream = new wxProcessFileOutputStream(pipeIn[1]); wxOutputStream *outStream = new wxProcessFileOutputStream(pipeIn[1]);
wxInputStream *inStream = new wxProcessFileInputStream(pipeOut[0]); wxInputStream *inStream = new wxProcessFileInputStream(pipeOut[0]);
wxInputStream *errStream = new wxProcessFileInputStream(pipeErr[0]); wxInputStream *errStream = new wxProcessFileInputStream(pipeErr[0]);
process->SetPipeStreams(inStream, outStream, errStream);
#endif // wxUSE_STREAMS
close(pipeIn[0]); // close reading side close(pipeIn[0]); // close reading side
close(pipeOut[1]); // close writing side close(pipeOut[1]); // close writing side
close(pipeErr[1]); // close writing side close(pipeErr[1]); // close writing side
process->SetPipeStreams(inStream, outStream, errStream);
} }
#if wxUSE_GUI #if wxUSE_GUI