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:
864
configure.in
864
configure.in
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,8 @@
|
||||
# FIXME we'll generate this makefile with configure later, but for now please
|
||||
# change it manually
|
||||
TMAKEDIR=/home/zeitlin/build/tmake
|
||||
TMAKE=$(TMAKEDIR)/bin/tmake
|
||||
#TMAKEDIR=/home/zeitlin/build/tmake
|
||||
#TMAKE=$(TMAKEDIR)/bin/tmake
|
||||
TMAKE=tmake
|
||||
|
||||
WXDIR=../../..
|
||||
MSW_MAKEFILES_DIR=$(WXDIR)/src/msw
|
||||
|
@@ -44,6 +44,7 @@
|
||||
# P Not required for the os2Pm port
|
||||
# (unfortunately I can't use O since that is
|
||||
# in use already - and above I can't use P :-( )
|
||||
# L Low level GUI toolkit file, used by wxUniversal as well
|
||||
#
|
||||
# WX Base header
|
||||
# GTK GTK header
|
||||
@@ -326,49 +327,49 @@ gsocket.c U B
|
||||
mimetype.cpp U B
|
||||
|
||||
gsockgtk.c R
|
||||
win_gtk.c R
|
||||
win_gtk.c R L
|
||||
accel.cpp R
|
||||
app.cpp R
|
||||
bitmap.cpp R
|
||||
app.cpp R L
|
||||
bitmap.cpp R L
|
||||
bmpbuttn.cpp R
|
||||
brush.cpp R
|
||||
brush.cpp R L
|
||||
button.cpp R
|
||||
checkbox.cpp R
|
||||
checklst.cpp R
|
||||
choice.cpp R
|
||||
clipbrd.cpp R
|
||||
colour.cpp R
|
||||
colour.cpp R L
|
||||
combobox.cpp R
|
||||
control.cpp R
|
||||
cursor.cpp R
|
||||
data.cpp R
|
||||
cursor.cpp R L
|
||||
data.cpp R L
|
||||
dataobj.cpp R
|
||||
dc.cpp R
|
||||
dcclient.cpp R
|
||||
dcmemory.cpp R
|
||||
dcscreen.cpp R
|
||||
dialog.cpp R
|
||||
dc.cpp R L
|
||||
dcclient.cpp R L
|
||||
dcmemory.cpp R L
|
||||
dcscreen.cpp R L
|
||||
dialog.cpp R L
|
||||
dnd.cpp R
|
||||
font.cpp R
|
||||
font.cpp R L
|
||||
fontdlg.cpp R
|
||||
frame.cpp R
|
||||
frame.cpp R L
|
||||
gauge.cpp R
|
||||
gdiobj.cpp R
|
||||
icon.cpp R
|
||||
gdiobj.cpp R L
|
||||
icon.cpp R L
|
||||
joystick.cpp R
|
||||
listbox.cpp R
|
||||
main.cpp R
|
||||
main.cpp R L
|
||||
mdi.cpp R
|
||||
menu.cpp R
|
||||
minifram.cpp R
|
||||
notebook.cpp R
|
||||
palette.cpp R
|
||||
pen.cpp R
|
||||
palette.cpp R L
|
||||
pen.cpp R L
|
||||
radiobox.cpp R
|
||||
radiobut.cpp R
|
||||
region.cpp R
|
||||
region.cpp R L
|
||||
scrolbar.cpp R
|
||||
settings.cpp R
|
||||
settings.cpp R L
|
||||
slider.cpp R
|
||||
spinbutt.cpp R
|
||||
spinctrl.cpp R
|
||||
@@ -380,10 +381,10 @@ tbargtk.cpp R
|
||||
textctrl.cpp R
|
||||
timer.cpp R
|
||||
tooltip.cpp R
|
||||
utilsgtk.cpp R
|
||||
utilsgtk.cpp R L
|
||||
utilsres.cpp R
|
||||
wave.cpp R
|
||||
window.cpp R
|
||||
window.cpp R L
|
||||
|
||||
gsockmot.c X S
|
||||
accel.cpp X
|
||||
|
@@ -44,7 +44,12 @@
|
||||
|
||||
$project{"GTK_SOURCES"} .= "gtk/" . $file . " ";
|
||||
$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) {
|
||||
@@ -64,7 +69,7 @@
|
||||
$project{"HTMLOBJS"} .= $fileobj . " ";
|
||||
$project{"HTMLDEPS"} .= $filedep . " "
|
||||
}
|
||||
|
||||
|
||||
#! find all our headers
|
||||
foreach $file (sort keys %wxWXINCLUDE) {
|
||||
$project{"GTK_HEADERS"} .= $file . " "
|
||||
@@ -116,6 +121,12 @@ GUIOBJS = \
|
||||
GUIDEPS = \
|
||||
#$ ExpandList("GUIDEPS");
|
||||
|
||||
GUI_LOWLEVEL_OBJS = \
|
||||
#$ ExpandList("GUI_LOWLEVEL_OBJS");
|
||||
|
||||
GUI_LOWLEVEL_DEPS = \
|
||||
#$ ExpandList("GUI_LOWLEVEL_DEPS");
|
||||
|
||||
UNIXOBJS = \
|
||||
#$ ExpandList("UNIXOBJS");
|
||||
|
||||
|
@@ -198,11 +198,11 @@ public:
|
||||
// object) - this log object is used by default by all wxLogXXX()
|
||||
// functions.
|
||||
virtual wxLog *CreateLogTarget()
|
||||
#if wxUSE_GUI
|
||||
{ return new wxLogGui; }
|
||||
#else // !GUI
|
||||
{ return new wxLogStderr; }
|
||||
#endif // wxUSE_GUI
|
||||
#if wxUSE_GUI && wxUSE_LOGGUI
|
||||
{ return new wxLogGui; }
|
||||
#else // !GUI
|
||||
{ return new wxLogStderr; }
|
||||
#endif // wxUSE_GUI
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _WX_BUTTON_H_BASE_
|
||||
#define _WX_BUTTON_H_BASE_
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/button.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
@@ -17,5 +19,7 @@
|
||||
#include "wx/stubs/button.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
#endif
|
||||
// _WX_BUTTON_H_BASE_
|
||||
|
70
include/wx/chkconf.h
Normal file
70
include/wx/chkconf.h
Normal 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 */
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma interface "choicebase.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
|
||||
#include "wx/ctrlsub.h" // the base class
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -74,5 +76,7 @@ public:
|
||||
#include "wx/stubs/choice.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHOICE
|
||||
|
||||
#endif
|
||||
// _WX_CHOICE_H_BASE_
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma interface "controlbase.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_CONTROLS
|
||||
|
||||
#include "wx/window.h" // base class
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -71,5 +73,7 @@ protected:
|
||||
#include "wx/stubs/control.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
||||
#endif
|
||||
// _WX_CONTROL_H_BASE_
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "controlwithitems.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_CONTROLS
|
||||
|
||||
#include "wx/control.h" // base class
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -93,6 +95,7 @@ protected:
|
||||
wxClientDataType m_clientDataItemsType;
|
||||
};
|
||||
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
||||
#endif // _WX_CTRLSUB_H_BASE_
|
||||
|
||||
|
||||
|
@@ -27,12 +27,16 @@ public:
|
||||
void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
|
||||
int GetReturnCode() const { return m_returnCode; }
|
||||
|
||||
#if wxUSE_STATTEXT && wxUSE_TEXTCTRL
|
||||
// splits text up at newlines and places the
|
||||
// lines into a vertical wxBoxSizer
|
||||
wxSizer *CreateTextSizer( const wxString &message );
|
||||
#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
// places buttons into a horizontal wxBoxSizer
|
||||
wxSizer *CreateButtonSizer( long flags );
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
protected:
|
||||
// the return code from modal dialog
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _WX_DIRDLG_H_BASE_
|
||||
#define _WX_DIRDLG_H_BASE_
|
||||
|
||||
#if wxUSE_DIRDLG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -29,5 +31,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
||||
#include "wx/stubs/dirdlg.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_DIRDLG
|
||||
|
||||
#endif
|
||||
// _WX_DIRDLG_H_BASE_
|
||||
|
@@ -15,6 +15,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/fontenc.h"
|
||||
#include "wx/dynarray.h"
|
||||
@@ -147,5 +150,6 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject
|
||||
|
||||
};
|
||||
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
||||
#endif // _WX_ENCCONV_H_
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _WX_FILEDLG_H_BASE_
|
||||
#define _WX_FILEDLG_H_BASE_
|
||||
|
||||
#if wxUSE_FILEDLG
|
||||
|
||||
enum
|
||||
{
|
||||
wxOPEN = 1,
|
||||
@@ -27,6 +29,7 @@ enum
|
||||
#include "wx/stubs/filedlg.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_FILEDLG
|
||||
|
||||
#endif
|
||||
// _WX_FILEDLG_H_BASE_
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _WX_FONTDLG_H_BASE_
|
||||
#define _WX_FONTDLG_H_BASE_
|
||||
|
||||
#if wxUSE_FONTDLG
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/fontdlg.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
@@ -25,5 +27,7 @@
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_FONTDLG
|
||||
|
||||
#endif
|
||||
// _WX_FONTDLG_H_BASE_
|
||||
|
@@ -20,7 +20,10 @@
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
|
||||
#include "wx/fontenc.h" // for wxFontEncoding
|
||||
|
||||
#if wxUSE_GUI
|
||||
#include "wx/fontutil.h" // for wxNativeEncodingInfo
|
||||
#endif // wxUSE_GUI
|
||||
@@ -185,4 +188,6 @@ protected:
|
||||
// the default font mapper for wxWindows programs
|
||||
WXDLLEXPORT_DATA(extern wxFontMapper *) wxTheFontMapper;
|
||||
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
||||
#endif // _WX_FONTMAPPER_H_
|
||||
|
@@ -101,8 +101,10 @@ public:
|
||||
// menu bar functions
|
||||
// ------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar(wxMenuBar *menubar) = 0;
|
||||
virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; }
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// call this to simulate a menu command
|
||||
bool Command(int id) { return ProcessCommand(id); }
|
||||
@@ -173,9 +175,11 @@ public:
|
||||
// so should be there for all platforms
|
||||
void OnActivate(wxActivateEvent &WXUNUSED(event)) { }
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// send wxUpdateUIEvents for all menu items (called from OnIdle())
|
||||
void DoMenuUpdates();
|
||||
void DoMenuUpdates(wxMenu* menu, wxWindow* focusWin);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
protected:
|
||||
// the frame main menu/status/tool bars
|
||||
@@ -185,7 +189,9 @@ protected:
|
||||
// main menubar, statusbar and toolbar (if any)
|
||||
void DeleteAllBars();
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenuBar *m_frameMenuBar;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// override to update status bar position (or anything else) when
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// Created: 21/3/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DIRCTRL_H_
|
||||
@@ -19,6 +19,8 @@
|
||||
#pragma interface "dirctrlg.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_DIRDLG
|
||||
|
||||
#include "wx/treectrl.h"
|
||||
#include "wx/dirdlg.h"
|
||||
#include "wx/choice.h"
|
||||
@@ -243,5 +245,7 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
#endif // wxUSE_DIRDLG
|
||||
|
||||
#endif
|
||||
// _WX_DIRCTRLG_H_
|
||||
|
@@ -19,6 +19,9 @@
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_GRID
|
||||
|
||||
#include "wx/panel.h"
|
||||
#include "wx/string.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_RCLICK(fn) { wxEVT_GRID_LABEL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
|
||||
#endif // wxUSE_GRID
|
||||
|
||||
#endif // __GRIDH_G__
|
||||
|
||||
|
@@ -194,8 +194,10 @@ class WXDLLEXPORT wxLayoutAlgorithm: public wxObject
|
||||
public:
|
||||
wxLayoutAlgorithm() {}
|
||||
|
||||
#if wxUSE_MDI_ARCHITECTURE
|
||||
// The MDI client window is sized to whatever's left over.
|
||||
bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL);
|
||||
#endif // wxUSE_MDI_ARCHITECTURE
|
||||
|
||||
// mainWindow is sized to whatever's left over. This function for backward
|
||||
// compatibility; use LayoutWindow.
|
||||
|
@@ -71,9 +71,11 @@ public:
|
||||
// to the dialog via validators.
|
||||
virtual void InitDialog();
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
// a default button is activated when Enter is pressed
|
||||
wxButton *GetDefaultItem() const { return m_btnDefault; }
|
||||
void SetDefaultItem(wxButton *btn) { m_btnDefault = btn; }
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
@@ -107,8 +109,10 @@ protected:
|
||||
// the child which had the focus last time this panel was activated
|
||||
wxWindow *m_winLastFocused;
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
// a default button or NULL
|
||||
wxButton *m_btnDefault;
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPanel)
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "treectlg.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/object.h"
|
||||
@@ -426,5 +428,7 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
||||
#endif // _GENERIC_TREECTRL_H_
|
||||
|
||||
|
@@ -69,7 +69,9 @@ public:
|
||||
virtual void MakeModal(bool modal = TRUE);
|
||||
virtual void Restore();
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar( wxMenuBar *menuBar );
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
|
@@ -86,7 +86,9 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = TRUE );
|
||||
|
@@ -69,7 +69,9 @@ public:
|
||||
virtual void MakeModal(bool modal = TRUE);
|
||||
virtual void Restore();
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar( wxMenuBar *menuBar );
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
|
@@ -86,7 +86,9 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = TRUE );
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#pragma interface "listctrlbase.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTCTRL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 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_ACTIVATED(id, fn) { wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
#endif // wxUSE_LISTCTRL
|
||||
|
||||
#endif
|
||||
// _WX_LISTCTRL_H_BASE_
|
||||
|
@@ -266,6 +266,8 @@ protected:
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
#if wxUSE_TEXTCTRL
|
||||
|
||||
// log everything to a text window (GUI only of course)
|
||||
class WXDLLEXPORT wxLogTextCtrl : public wxLog
|
||||
{
|
||||
@@ -280,9 +282,14 @@ private:
|
||||
wxTextCtrl *m_pTextCtrl;
|
||||
};
|
||||
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// GUI log target, the default one for wxWindows programs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LOGGUI
|
||||
|
||||
class WXDLLEXPORT wxLogGui : public wxLog
|
||||
{
|
||||
public:
|
||||
@@ -305,12 +312,17 @@ protected:
|
||||
m_bWarnings; // any warnings?
|
||||
};
|
||||
|
||||
#endif // wxUSE_LOGGUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// (background) log window: this class forwards all log messages to the log
|
||||
// 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
|
||||
// close it, clear the log contents or save it to the file.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LOGWINDOW
|
||||
|
||||
class WXDLLEXPORT wxLogWindow : public wxLog
|
||||
{
|
||||
public:
|
||||
@@ -364,6 +376,8 @@ private:
|
||||
wxLogFrame *m_pLogFrame; // the log frame
|
||||
};
|
||||
|
||||
#endif // wxUSE_LOGWINDOW
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -26,13 +26,9 @@
|
||||
// classes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxStaticBox;
|
||||
class wxNotebook;
|
||||
|
||||
class wxSizerItem;
|
||||
class wxSizer;
|
||||
class wxBoxSizer;
|
||||
class wxStaticBoxSizer;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxSizerItem
|
||||
@@ -69,7 +65,7 @@ public:
|
||||
bool IsWindow();
|
||||
bool IsSizer();
|
||||
bool IsSpacer();
|
||||
|
||||
|
||||
void SetInitSize( int x, int y )
|
||||
{ m_minSize.x = x; m_minSize.y = y; }
|
||||
void SetOption( int option )
|
||||
@@ -145,29 +141,29 @@ public:
|
||||
{ DoSetMinSize( width, height ); }
|
||||
void SetMinSize( wxSize size )
|
||||
{ DoSetMinSize( size.x, size.y ); }
|
||||
|
||||
|
||||
/* Searches recursively */
|
||||
bool SetItemMinSize( wxWindow *window, int width, int height )
|
||||
{ return DoSetItemMinSize( window, width, height ); }
|
||||
bool SetItemMinSize( wxWindow *window, wxSize size )
|
||||
{ return DoSetItemMinSize( window, size.x, size.y ); }
|
||||
|
||||
|
||||
/* Searches recursively */
|
||||
bool SetItemMinSize( wxSizer *sizer, int width, int height )
|
||||
{ return DoSetItemMinSize( sizer, width, height ); }
|
||||
bool SetItemMinSize( wxSizer *sizer, wxSize size )
|
||||
{ return DoSetItemMinSize( sizer, size.x, size.y ); }
|
||||
|
||||
|
||||
bool SetItemMinSize( int pos, int width, int height )
|
||||
{ return DoSetItemMinSize( pos, width, height ); }
|
||||
bool SetItemMinSize( int pos, wxSize size )
|
||||
{ return DoSetItemMinSize( pos, size.x, size.y ); }
|
||||
|
||||
|
||||
wxSize GetSize()
|
||||
{ return m_size; }
|
||||
wxPoint GetPosition()
|
||||
{ return m_position; }
|
||||
|
||||
|
||||
/* Calculate the minimal size or return m_minSize if bigger. */
|
||||
wxSize GetMinSize();
|
||||
|
||||
@@ -191,12 +187,12 @@ protected:
|
||||
wxList m_children;
|
||||
|
||||
wxSize GetMinWindowSize( wxWindow *window );
|
||||
|
||||
|
||||
virtual void DoSetMinSize( 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( int pos, int width, int height );
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxSizer);
|
||||
};
|
||||
@@ -210,7 +206,7 @@ class WXDLLEXPORT wxGridSizer: public wxSizer
|
||||
public:
|
||||
wxGridSizer( int rows, int cols, int vgap, int hgap );
|
||||
wxGridSizer( int cols, int vgap = 0, int hgap = 0 );
|
||||
|
||||
|
||||
void RecalcSizes();
|
||||
wxSize CalcMin();
|
||||
|
||||
@@ -222,15 +218,15 @@ public:
|
||||
int GetRows() { return m_rows; }
|
||||
int GetVGap() { return m_vgap; }
|
||||
int GetHGap() { return m_hgap; }
|
||||
|
||||
|
||||
protected:
|
||||
int m_rows;
|
||||
int m_cols;
|
||||
int m_vgap;
|
||||
int m_hgap;
|
||||
|
||||
|
||||
void SetItemBounds( wxSizerItem *item, int x, int y, int w, int h );
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxGridSizer);
|
||||
};
|
||||
@@ -245,10 +241,10 @@ public:
|
||||
wxFlexGridSizer( int rows, int cols, int vgap, int hgap );
|
||||
wxFlexGridSizer( int cols, int vgap = 0, int hgap = 0 );
|
||||
~wxFlexGridSizer();
|
||||
|
||||
|
||||
void RecalcSizes();
|
||||
wxSize CalcMin();
|
||||
|
||||
|
||||
void AddGrowableRow( size_t idx );
|
||||
void RemoveGrowableRow( size_t idx );
|
||||
void AddGrowableCol( size_t idx );
|
||||
@@ -259,9 +255,9 @@ protected:
|
||||
int *m_colWidths;
|
||||
wxArrayInt m_growableRows;
|
||||
wxArrayInt m_growableCols;
|
||||
|
||||
|
||||
void CreateArrays();
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxFlexGridSizer);
|
||||
};
|
||||
@@ -288,7 +284,7 @@ protected:
|
||||
int m_minHeight;
|
||||
int m_fixedWidth;
|
||||
int m_fixedHeight;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxBoxSizer);
|
||||
};
|
||||
@@ -297,6 +293,10 @@ private:
|
||||
// wxStaticBoxSizer
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_STATBOX
|
||||
|
||||
class WXDLLEXPORT wxStaticBox;
|
||||
|
||||
class WXDLLEXPORT wxStaticBoxSizer: public wxBoxSizer
|
||||
{
|
||||
public:
|
||||
@@ -310,17 +310,21 @@ public:
|
||||
|
||||
protected:
|
||||
wxStaticBox *m_staticBox;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxStaticBoxSizer);
|
||||
};
|
||||
|
||||
#endif // wxUSE_STATBOX
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxNotebookSizer
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NOTEBOOK
|
||||
|
||||
class WXDLLEXPORT wxNotebook;
|
||||
|
||||
class WXDLLEXPORT wxNotebookSizer: public wxSizer
|
||||
{
|
||||
public:
|
||||
@@ -334,12 +338,12 @@ public:
|
||||
|
||||
protected:
|
||||
wxNotebook *m_notebook;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxNotebookSizer);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // wxUSE_NOTEBOOK
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _WX_STATTEXT_H_BASE_
|
||||
#define _WX_STATTEXT_H_BASE_
|
||||
|
||||
#if wxUSE_STATTEXT
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/stattext.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
@@ -17,5 +19,7 @@
|
||||
#include "wx/stubs/stattext.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_STATTEXT
|
||||
|
||||
#endif
|
||||
// _WX_STATTEXT_H_BASE_
|
||||
|
@@ -22,6 +22,8 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
@@ -466,6 +468,8 @@ private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
#endif
|
||||
// _WX_TBARBASE_H_
|
||||
|
||||
|
@@ -15,11 +15,15 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "textctrlbase.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_TEXTCTRL
|
||||
|
||||
#include "wx/control.h" // the base class
|
||||
|
||||
// 16-bit Borland 4.0 doesn't seem to allow multiple inheritance with wxWindow
|
||||
@@ -189,5 +193,7 @@ private:
|
||||
#include "wx/stubs/textctrl.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
|
||||
#endif
|
||||
// _WX_TEXTCTRL_H_BASE_
|
||||
|
@@ -25,14 +25,8 @@
|
||||
#define wxUSE_TEXTFILE 0
|
||||
#endif // wxUSE_FILE
|
||||
|
||||
#if wxUSE_TEXTFILE
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/file.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTextFile
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// the line termination type
|
||||
@@ -45,6 +39,16 @@ enum wxTextFileType
|
||||
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);
|
||||
|
||||
class WXDLLEXPORT wxTextFile
|
||||
@@ -184,6 +188,12 @@ private:
|
||||
// copy ctor/assignment operator not implemented
|
||||
wxTextFile(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
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#include "wx/longlong.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_GUI && wxUSE_TIMER
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTimer
|
||||
@@ -181,12 +181,14 @@ typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
|
||||
|
||||
#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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_STOPWATCH
|
||||
|
||||
class WXDLLEXPORT wxStopWatch
|
||||
{
|
||||
public:
|
||||
@@ -208,6 +210,9 @@ private:
|
||||
long m_pause; // the time of the last Pause() or 0
|
||||
};
|
||||
|
||||
#endif // wxUSE_STOPWATCH
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
|
||||
// Starts a global timer
|
||||
// -- DEPRECATED: use wxStopWatch instead
|
||||
@@ -217,6 +222,8 @@ void WXDLLEXPORT wxStartTimer();
|
||||
// -- DEPRECATED: use wxStopWatch instead
|
||||
long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
|
||||
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global time functions
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -227,8 +234,10 @@ extern long WXDLLEXPORT wxGetLocalTime();
|
||||
// Get number of seconds since GMT 00:00:00, Jan 1st 1970.
|
||||
extern long WXDLLEXPORT wxGetUTCTime();
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
// Get number of milliseconds since local time 00:00:00 Jan 1st 1970
|
||||
extern wxLongLong WXDLLEXPORT wxGetLocalTimeMillis();
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
#define wxGetCurrentTime() wxGetLocalTime()
|
||||
|
||||
|
@@ -20,6 +20,8 @@
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
|
||||
#include "wx/control.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_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
||||
#endif
|
||||
// _WX_TREEBASE_H_
|
||||
|
||||
|
@@ -556,10 +556,12 @@ public:
|
||||
|
||||
void UpdateWindowUI();
|
||||
|
||||
#if wxUSE_MENUS
|
||||
bool PopupMenu( wxMenu *menu, const wxPoint& pos )
|
||||
{ return DoPopupMenu(menu, pos.x, pos.y); }
|
||||
bool PopupMenu( wxMenu *menu, int x, int y )
|
||||
{ return DoPopupMenu(menu, x, y); }
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// scrollbars
|
||||
// ----------
|
||||
@@ -831,7 +833,9 @@ protected:
|
||||
virtual void DoSetToolTip( wxToolTip *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) = 0;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// client data accessors
|
||||
virtual void DoSetClientObject( wxClientData *data );
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#ifndef _WX_WIZARD_H_
|
||||
#define _WX_WIZARD_H_
|
||||
|
||||
#if wxUSE_WIZARDDLG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers and other simple declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -188,4 +190,6 @@ typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
|
||||
// unless the event handler vetoes the event
|
||||
#define EVT_WIZARD_CANCEL(id, fn) { wxEVT_WIZARD_CANCEL, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxWizardEventFunction) & fn, (wxObject *)NULL },
|
||||
|
||||
#endif // wxUSE_WIZARDDLG
|
||||
|
||||
#endif // _WX_WIZARD_H_
|
||||
|
2
samples/configure
vendored
2
samples/configure
vendored
@@ -700,6 +700,7 @@ trap 'rm -fr `echo "
|
||||
typetest/Makefile
|
||||
validate/Makefile
|
||||
sockets/Makefile
|
||||
univ/Makefile
|
||||
wizard/Makefile
|
||||
html/Makefile
|
||||
html/about/Makefile
|
||||
@@ -844,6 +845,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
||||
typetest/Makefile
|
||||
validate/Makefile
|
||||
sockets/Makefile
|
||||
univ/Makefile
|
||||
wizard/Makefile
|
||||
html/Makefile
|
||||
html/about/Makefile
|
||||
|
@@ -68,6 +68,7 @@ AC_OUTPUT([
|
||||
typetest/Makefile
|
||||
validate/Makefile
|
||||
sockets/Makefile
|
||||
univ/Makefile
|
||||
wizard/Makefile
|
||||
html/Makefile
|
||||
html/about/Makefile
|
||||
|
101
setup.h.in
101
setup.h.in
@@ -185,11 +185,36 @@
|
||||
*/
|
||||
#define wxUSE_VALIDATORS 0
|
||||
|
||||
/*
|
||||
* Use wxControl
|
||||
*/
|
||||
#define wxUSE_CONTROLS 0
|
||||
|
||||
/*
|
||||
* Use accelerators
|
||||
*/
|
||||
#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
|
||||
*/
|
||||
@@ -205,16 +230,45 @@
|
||||
*/
|
||||
#define wxUSE_PROGRESSDLG 0
|
||||
|
||||
/*
|
||||
* Use chooser dialog
|
||||
*/
|
||||
#define wxUSE_CHOICEDLG 0
|
||||
|
||||
/*
|
||||
* Use colour picker dialog
|
||||
*/
|
||||
#define wxUSE_COLOURDLG 0
|
||||
|
||||
/*
|
||||
* Use directory chooser dialog
|
||||
*/
|
||||
#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)
|
||||
*/
|
||||
#define wxUSE_JOYSTICK 0
|
||||
|
||||
/*
|
||||
* Use this control
|
||||
*/
|
||||
#define wxUSE_BUTTON 0
|
||||
/*
|
||||
* Use this control
|
||||
*/
|
||||
@@ -264,6 +318,10 @@
|
||||
* Use this control
|
||||
*/
|
||||
#define wxUSE_LISTCTRL 0
|
||||
/*
|
||||
* Use wxMenuBar, wxMenuItem and wxMenu
|
||||
*/
|
||||
#define wxUSE_MENUS 0
|
||||
/*
|
||||
* Use this control
|
||||
*/
|
||||
@@ -327,6 +385,11 @@
|
||||
/* compatibility */
|
||||
#define wxUSE_TABDIALOG wxUSE_TAB_DIALOG
|
||||
|
||||
/*
|
||||
* Use wxTextCtrl
|
||||
*/
|
||||
#define wxUSE_TEXTCTRL 0
|
||||
|
||||
/*
|
||||
* Use wxToollBar
|
||||
*/
|
||||
@@ -344,7 +407,7 @@
|
||||
#define wxUSE_TOOLBAR_SIMPLE 0
|
||||
|
||||
#if defined(__WXWINE__) || defined(__GNUWIN32__) || defined(__WXPM__)
|
||||
#define wxUSE_OWNER_DRAWN 1
|
||||
#define wxUSE_OWNER_DRAWN 1
|
||||
#if wxUSE_TOOLBAR
|
||||
#define wxUSE_BUTTONBAR 1
|
||||
#endif
|
||||
@@ -360,6 +423,14 @@
|
||||
*/
|
||||
#define wxUSE_LONGLONG 0
|
||||
|
||||
/*
|
||||
* Use wxCmdLineParser class
|
||||
*/
|
||||
#define wxUSE_CMDLINE_PARSER 0
|
||||
/*
|
||||
* Use wxDateTime
|
||||
*/
|
||||
#define wxUSE_DATETIME 0
|
||||
/*
|
||||
* Use wxFile class
|
||||
*/
|
||||
@@ -372,6 +443,18 @@
|
||||
* Use log classes and logging functions
|
||||
*/
|
||||
#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
|
||||
*/
|
||||
@@ -384,6 +467,10 @@
|
||||
* Use config system
|
||||
*/
|
||||
#define wxUSE_CONFIG 0
|
||||
/*
|
||||
* Use font mapping/conversion classes
|
||||
*/
|
||||
#define wxUSE_FONTMAP 0
|
||||
/*
|
||||
* Use intl system
|
||||
*/
|
||||
@@ -414,6 +501,11 @@
|
||||
*/
|
||||
#define wxUSE_DYNLIB_CLASS 0
|
||||
|
||||
/*
|
||||
* Use wxTimer
|
||||
*/
|
||||
#define wxUSE_TIMER 0
|
||||
|
||||
/*
|
||||
* Use font metric files in GetTextExtent for wxPostScriptDC
|
||||
* Use consistent PostScript fonts for AFM and printing (!)
|
||||
@@ -589,7 +681,7 @@
|
||||
* A class that shows info window when app is busy
|
||||
* (works exactly like wxBusyCursor)
|
||||
*/
|
||||
#define wxUSE_BUSYINFO 0
|
||||
#define wxUSE_BUSYINFO 0
|
||||
|
||||
/*
|
||||
* Zip stream for accessing files stored inside .zip archives
|
||||
@@ -610,7 +702,7 @@
|
||||
* PNM image format support
|
||||
*/
|
||||
#define wxUSE_PNM 0
|
||||
|
||||
|
||||
/*
|
||||
* Disable this if your compiler can't cope
|
||||
* with omission of prototype parameters.
|
||||
@@ -793,4 +885,7 @@
|
||||
/* Define this if you are using gtk and gdk contains support for X11R6 XIM */
|
||||
#undef HAVE_XIM
|
||||
|
||||
/* now check the settings self consistency */
|
||||
#include "wx/chkconf.h"
|
||||
|
||||
#endif /* __WX_SETUP_H__ */
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/choice.h"
|
||||
#endif
|
||||
@@ -60,3 +62,6 @@ void wxChoiceBase::Command(wxCommandEvent& event)
|
||||
SetSelection(event.m_commandInt);
|
||||
(void)ProcessEvent(event);
|
||||
}
|
||||
|
||||
#endif // wxUSE_CHOICE
|
||||
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CMDLINE_PARSER
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
#include "wx/log.h"
|
||||
@@ -912,3 +914,5 @@ static wxString GetTypeName(wxCmdLineParamType type)
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
#endif // wxUSE_CMDLINE_PARSER
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CONTROLS
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/control.h"
|
||||
#include "wx/log.h"
|
||||
@@ -93,3 +95,5 @@ void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CONTROLS
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/ctrlsub.h"
|
||||
#endif
|
||||
@@ -92,3 +94,4 @@ void *wxControlWithItems::GetClientData(int n) const
|
||||
return DoGetItemClientData(n);
|
||||
}
|
||||
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
@@ -63,6 +63,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if !defined(wxUSE_DATETIME) || wxUSE_DATETIME
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
#include "wx/intl.h"
|
||||
@@ -3598,4 +3600,4 @@ size_t wxDateTimeWorkDays::DoGetHolidaysInRange(const wxDateTime& dtStart,
|
||||
return holidays.GetCount();
|
||||
}
|
||||
|
||||
|
||||
#endif // wxUSE_DATETIME
|
||||
|
@@ -43,6 +43,8 @@
|
||||
// wxDialogBase
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_STATTEXT && wxUSE_TEXTCTRL
|
||||
|
||||
wxSizer *wxDialogBase::CreateTextSizer( const wxString &message )
|
||||
{
|
||||
wxBoxSizer *box = new wxBoxSizer( wxVERTICAL );
|
||||
@@ -86,6 +88,10 @@ wxSizer *wxDialogBase::CreateTextSizer( const wxString &message )
|
||||
return box;
|
||||
}
|
||||
|
||||
#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
|
||||
wxSizer *wxDialogBase::CreateButtonSizer( long flags )
|
||||
{
|
||||
wxBoxSizer *box = new wxBoxSizer( wxHORIZONTAL );
|
||||
@@ -174,3 +180,4 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags )
|
||||
return box;
|
||||
}
|
||||
|
||||
#endif // wxUSE_BUTTON
|
||||
|
@@ -27,6 +27,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_DATAOBJ
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.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;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif // wxUSE_DATAOBJ
|
||||
|
@@ -18,6 +18,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
|
||||
#include "wx/encconv.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -446,3 +448,5 @@ wxFontEncodingArray wxEncodingConverter::GetAllEquivalents(wxFontEncoding enc)
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
#include "wx/log.h"
|
||||
@@ -54,12 +56,14 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// the config paths we use
|
||||
#if wxUSE_CONFIG
|
||||
static const wxChar* FONTMAPPER_ROOT_PATH = wxT("/wxWindows/FontMapper");
|
||||
static const wxChar* FONTMAPPER_CHARSET_PATH = wxT("Charsets");
|
||||
static const wxChar* FONTMAPPER_CHARSET_ALIAS_PATH = wxT("Aliases");
|
||||
#if wxUSE_GUI
|
||||
static const wxChar* FONTMAPPER_FONT_FROM_ENCODING_PATH = wxT("Encodings");
|
||||
#endif // wxUSE_GUI
|
||||
#endif // wxUSE_CONFIG
|
||||
|
||||
// encodings supported by GetEncodingDescription
|
||||
static wxFontEncoding gs_encodings[] =
|
||||
@@ -746,3 +750,5 @@ bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding,
|
||||
}
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
@@ -60,7 +60,9 @@ END_EVENT_TABLE()
|
||||
|
||||
wxFrameBase::wxFrameBase()
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
m_frameMenuBar = NULL;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
m_frameToolBar = NULL;
|
||||
@@ -94,11 +96,13 @@ wxFrame *wxFrameBase::New(wxWindow *parent,
|
||||
|
||||
void wxFrameBase::DeleteAllBars()
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
if ( m_frameMenuBar )
|
||||
{
|
||||
delete m_frameMenuBar;
|
||||
m_frameMenuBar = (wxMenuBar *) NULL;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if ( m_frameStatusBar )
|
||||
@@ -192,6 +196,7 @@ void wxFrameBase::MakeModal(bool modal)
|
||||
|
||||
bool wxFrameBase::ProcessCommand(int id)
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
wxMenuBar *bar = GetMenuBar();
|
||||
if ( !bar )
|
||||
return FALSE;
|
||||
@@ -209,6 +214,9 @@ bool wxFrameBase::ProcessCommand(int id)
|
||||
}
|
||||
|
||||
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) )
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
DoMenuUpdates();
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
// update all menus
|
||||
void wxFrameBase::DoMenuUpdates()
|
||||
{
|
||||
@@ -465,3 +477,5 @@ void wxFrameBase::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin))
|
||||
node = node->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTBOX
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/listbox.h"
|
||||
#endif
|
||||
@@ -96,3 +98,5 @@ void wxListBoxBase::SetFirstItem(const wxString& s)
|
||||
|
||||
DoSetFirstItem(n);
|
||||
}
|
||||
|
||||
#endif // wxUSE_LISTBOX
|
||||
|
@@ -745,12 +745,12 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
|
||||
// send it to the normal log destination
|
||||
wxLogDebug(szBuf);
|
||||
|
||||
#if wxUSE_GUI || defined(__WXMSW__)
|
||||
#if (wxUSE_GUI && wxUSE_MSGDLG) || defined(__WXMSW__)
|
||||
// this message is intentionally not translated - it is for
|
||||
// developpers only
|
||||
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"),
|
||||
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
|
||||
case wxYES:
|
||||
@@ -763,7 +763,7 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
|
||||
|
||||
//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"),
|
||||
MB_YESNOCANCEL | MB_ICONSTOP ) ) {
|
||||
case IDYES:
|
||||
@@ -778,9 +778,9 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
|
||||
}
|
||||
#endif // GUI or MSW
|
||||
|
||||
#else // !GUI
|
||||
#else // no message box
|
||||
Trap();
|
||||
#endif // GUI/!GUI
|
||||
#endif // message boxes
|
||||
}
|
||||
|
||||
s_bInAssert = FALSE;
|
||||
|
@@ -24,12 +24,14 @@
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/menu.h"
|
||||
#endif
|
||||
@@ -643,3 +645,4 @@ wxString wxMenuBarBase::GetHelpString(int id) const
|
||||
return item->GetHelp();
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
@@ -32,7 +32,9 @@ IMPLEMENT_ABSTRACT_CLASS(wxSizer, wxObject);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxGridSizer, wxSizer);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxFlexGridSizer, wxGridSizer);
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxBoxSizer, wxSizer);
|
||||
#if wxUSE_STATBOX
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer);
|
||||
#endif
|
||||
#if wxUSE_NOTEBOOK
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer);
|
||||
#endif
|
||||
@@ -942,6 +944,8 @@ wxSize wxBoxSizer::CalcMin()
|
||||
// wxStaticBoxSizer
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_STATBOX
|
||||
|
||||
wxStaticBoxSizer::wxStaticBoxSizer( wxStaticBox *box, int orient )
|
||||
: wxBoxSizer( orient )
|
||||
{
|
||||
@@ -991,6 +995,8 @@ wxSize wxStaticBoxSizer::CalcMin()
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // wxUSE_STATBOX
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxNotebookSizer
|
||||
//---------------------------------------------------------------------------
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
@@ -39,19 +41,15 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
#include "wx/tbarbase.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWindows macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
|
||||
EVT_IDLE(wxToolBarBase::OnIdle)
|
||||
END_EVENT_TABLE()
|
||||
#endif
|
||||
BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
|
||||
EVT_IDLE(wxToolBarBase::OnIdle)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#include "wx/listimpl.cpp"
|
||||
|
||||
|
@@ -12,10 +12,11 @@
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "textctrlbase.h"
|
||||
#endif
|
||||
|
||||
|
||||
// for compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
@@ -23,6 +24,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TEXTCTRL
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
@@ -207,3 +210,5 @@ int wxTextCtrlBase::underflow()
|
||||
|
||||
#endif // NO_TEXT_WINDOW_STREAM
|
||||
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
|
||||
|
@@ -76,7 +76,7 @@
|
||||
// wxWin macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_GUI && wxUSE_TIMER
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxTimerEvent, wxEvent)
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
// wxTimerBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_GUI && wxUSE_TIMER
|
||||
|
||||
void wxTimerBase::Notify()
|
||||
{
|
||||
@@ -121,6 +121,8 @@ void wxTimerBase::Notify()
|
||||
// wxStopWatch
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
|
||||
void wxStopWatch::Start(long t)
|
||||
{
|
||||
m_t0 = wxGetLocalTimeMillis() - t;
|
||||
@@ -137,10 +139,14 @@ long wxStopWatch::Time() const
|
||||
return (m_pause ? m_pause : GetElapsedTime());
|
||||
}
|
||||
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// old timer functions superceded by wxStopWatch
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
|
||||
static wxLongLong wxStartTime = 0l;
|
||||
|
||||
// starts the global timer
|
||||
@@ -161,6 +167,7 @@ long wxGetElapsedTime(bool resetTimer)
|
||||
return (newTime - oldTime).GetLo();
|
||||
}
|
||||
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the functions to get the current time and timezone info
|
||||
@@ -246,6 +253,7 @@ long wxGetUTCTime()
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
|
||||
// Get local time as milliseconds since 00:00:00, Jan 1st 1970
|
||||
wxLongLong wxGetLocalTimeMillis()
|
||||
@@ -314,3 +322,6 @@ wxLongLong wxGetLocalTimeMillis()
|
||||
|
||||
#endif // time functions
|
||||
}
|
||||
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
|
@@ -25,9 +25,11 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
|
||||
#include "wx/treebase.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/log.h"
|
||||
@@ -50,4 +52,5 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
|
||||
m_itemOld = 0;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
||||
|
@@ -661,10 +661,12 @@ wxFindWindowByName1 (const wxString& title, wxWindow * parent)
|
||||
int
|
||||
wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& itemString)
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
wxMenuBar *menuBar = frame->GetMenuBar ();
|
||||
if (!menuBar)
|
||||
return -1;
|
||||
return menuBar->FindMenuItem (menuString, itemString);
|
||||
if (menuBar)
|
||||
return menuBar->FindMenuItem (menuString, itemString);
|
||||
#endif // wxUSE_MENUS
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
@@ -873,6 +875,8 @@ whereami(name)
|
||||
* since otherwise the generic code may be pulled in unnecessarily.
|
||||
*/
|
||||
|
||||
#if wxUSE_MSGDLG
|
||||
|
||||
int wxMessageBox(const wxString& message, const wxString& caption, long style,
|
||||
wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) )
|
||||
{
|
||||
@@ -896,7 +900,10 @@ int wxMessageBox(const wxString& message, const wxString& caption, long style,
|
||||
return wxCANCEL;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MSGDLG
|
||||
|
||||
#if wxUSE_TEXTDLG
|
||||
|
||||
wxString wxGetTextFromUser(const wxString& message, const wxString& caption,
|
||||
const wxString& defaultValue, wxWindow *parent,
|
||||
int x, int y, bool WXUNUSED(centre) )
|
||||
@@ -929,6 +936,8 @@ wxString wxGetPasswordFromUser(const wxString& message,
|
||||
|
||||
#endif // wxUSE_TEXTDLG
|
||||
|
||||
#if wxUSE_COLOURDLG
|
||||
|
||||
wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit)
|
||||
{
|
||||
wxColourData data;
|
||||
@@ -949,6 +958,8 @@ wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit)
|
||||
return colRet;
|
||||
}
|
||||
|
||||
#endif // wxUSE_COLOURDLG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// missing C RTL functions (FIXME shouldn't be here at all)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -409,7 +409,11 @@ wxSize wxWindowBase::DoGetBestSize() const
|
||||
node = node->GetNext() )
|
||||
{
|
||||
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 -
|
||||
// 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.
|
||||
void wxWindowBase::UpdateWindowUI()
|
||||
{
|
||||
#if wxUSE_CONTROLS
|
||||
wxUpdateUIEvent event(GetId());
|
||||
event.m_eventObject = this;
|
||||
|
||||
@@ -1269,10 +1274,12 @@ void wxWindowBase::UpdateWindowUI()
|
||||
wxControl *control = wxDynamicCast(this, wxControl);
|
||||
if ( control )
|
||||
{
|
||||
#if wxUSE_TEXTCTRL
|
||||
wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl);
|
||||
if ( text )
|
||||
text->SetValue(event.GetText());
|
||||
else
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
control->SetLabel(event.GetText());
|
||||
}
|
||||
}
|
||||
@@ -1295,6 +1302,7 @@ void wxWindowBase::UpdateWindowUI()
|
||||
}
|
||||
#endif // wxUSE_RADIOBTN
|
||||
}
|
||||
#endif // wxUSE_CONTROLS
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1404,6 +1412,7 @@ void wxWindowBase::OnInitDialog( wxInitDialogEvent &WXUNUSED(event) )
|
||||
// process Ctrl-Alt-mclick
|
||||
void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
|
||||
{
|
||||
#if wxUSE_MSGDLG
|
||||
if ( event.ControlDown() && event.AltDown() )
|
||||
{
|
||||
// don't translate these strings
|
||||
@@ -1448,6 +1457,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
|
||||
(wxWindow *)this);
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_MSGDLG
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CARET
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/window.h"
|
||||
#include "wx/dcclient.h"
|
||||
@@ -205,3 +207,5 @@ void wxCaret::DoDraw(wxDC *dc)
|
||||
dc->DrawRectangle( m_x, m_y, m_width, m_height );
|
||||
#endif // 0/1
|
||||
}
|
||||
|
||||
#endif // wxUSE_CARET
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_CHOICEDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/utils.h"
|
||||
@@ -315,3 +317,4 @@ void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
#endif // wxUSE_CHOICEDLG
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colrdlgg.cpp
|
||||
// Name: generic/colrdlgg.cpp
|
||||
// Purpose: Choice dialogs
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -17,22 +17,22 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_COLOURDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include <stdio.h>
|
||||
#include "wx/utils.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/listbox.h"
|
||||
#include "wx/button.h"
|
||||
#include "wx/stattext.h"
|
||||
#include "wx/layout.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/slider.h"
|
||||
#include "wx/sizer.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/listbox.h"
|
||||
#include "wx/button.h"
|
||||
#include "wx/stattext.h"
|
||||
#include "wx/layout.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/slider.h"
|
||||
#include "wx/sizer.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATLINE
|
||||
@@ -504,4 +504,5 @@ void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event))
|
||||
PaintCustomColour(dc);
|
||||
}
|
||||
|
||||
#endif // wxUSE_COLOURDLG
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#if wxUSE_GRID
|
||||
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dialog.h"
|
||||
@@ -1244,3 +1244,5 @@ wxString wxGenericDirDialog::GetPath(void) const
|
||||
{
|
||||
return m_dirCtrl->GetPath();
|
||||
}
|
||||
|
||||
#endif // wxUSE_GRID
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_DRAGIMAGE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/setup.h"
|
||||
@@ -497,3 +499,4 @@ wxRect wxGenericDragImage::GetImageRect(const wxPoint& pos) const
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_DRAGIMAGE
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FILEDLG
|
||||
|
||||
#ifndef __UNIX__
|
||||
#error wxFileDialog currently only supports unix
|
||||
#endif
|
||||
@@ -1310,3 +1312,5 @@ public:
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFileDialogGenericModule, wxModule)
|
||||
|
||||
#endif // wxUSE_FILEDLG
|
||||
|
@@ -25,6 +25,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_GRID
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dcclient.h"
|
||||
@@ -2852,3 +2854,4 @@ void *wxGenericGrid::GetCellData(int row, int col)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#endif // wxUSE_GRID
|
||||
|
@@ -176,6 +176,8 @@ void wxSashLayoutWindow::OnCalculateLayout(wxCalculateLayoutEvent& event)
|
||||
* wxLayoutAlgorithm
|
||||
*/
|
||||
|
||||
#if wxUSE_MDI_ARCHITECTURE
|
||||
|
||||
// Lays out windows for an MDI frame. The MDI client area gets what's left
|
||||
// over.
|
||||
bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
|
||||
@@ -213,6 +215,8 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MDI_ARCHITECTURE
|
||||
|
||||
// Layout algorithm for any window. mainWindow gets what's left over.
|
||||
bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow)
|
||||
{
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTCTRL
|
||||
|
||||
#include "wx/dcscreen.h"
|
||||
#include "wx/app.h"
|
||||
#include "wx/listctrl.h"
|
||||
@@ -3728,3 +3730,5 @@ void wxListCtrl::SetFocus()
|
||||
if ( FindFocus() != this )
|
||||
m_mainWin->SetFocus();
|
||||
}
|
||||
|
||||
#endif // wxUSE_LISTCTRL
|
||||
|
@@ -31,6 +31,8 @@
|
||||
#error "This file can't be compiled without GUI!"
|
||||
#endif
|
||||
|
||||
#if wxUSE_LOGGUI || wxUSE_LOGWINDOW
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
#include "wx/button.h"
|
||||
@@ -247,7 +249,7 @@ void wxLogGui::Flush()
|
||||
titleFormat = _("%s Information");
|
||||
style = wxICON_INFORMATION;
|
||||
}
|
||||
|
||||
|
||||
wxString title;
|
||||
title.Printf(titleFormat, appName.c_str());
|
||||
|
||||
@@ -1052,3 +1054,4 @@ static int OpenLogFile(wxFile& file, wxString *pFilename)
|
||||
|
||||
#endif // wxUSE_FILE
|
||||
|
||||
#endif // !(wxUSE_LOGGUI || wxUSE_LOGWINDOW)
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_MSGDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dialog.h"
|
||||
@@ -127,4 +129,5 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_MSGDLG
|
||||
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_NUMBERDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -206,3 +208,5 @@ long wxGetNumberFromUser(const wxString& msg,
|
||||
|
||||
return dialog.GetValue();
|
||||
}
|
||||
|
||||
#endif // wxUSE_NUMBERDLG
|
||||
|
@@ -65,7 +65,9 @@ END_EVENT_TABLE()
|
||||
void wxPanel::Init()
|
||||
{
|
||||
m_winLastFocused = (wxWindow *)NULL;
|
||||
#if wxUSE_BUTTON
|
||||
m_btnDefault = (wxButton *)NULL;
|
||||
#endif // wxUSE_BUTTON
|
||||
}
|
||||
|
||||
bool wxPanel::Create(wxWindow *parent, wxWindowID id,
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_PROPSHEET
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
@@ -564,7 +566,7 @@ void wxPropertyValue::WritePropertyType(wxString& stream) // Write as any oth
|
||||
expr->WritePropertyType(stream);
|
||||
expr = expr->m_next;
|
||||
if (expr)
|
||||
stream.Append( wxT(", ") );
|
||||
stream.Append( wxT(", ") );
|
||||
}
|
||||
stream.Append( wxT("]") );
|
||||
}
|
||||
@@ -1006,14 +1008,14 @@ void wxPropertySheet::RemoveProperty(const wxString& name)
|
||||
if(node)
|
||||
{
|
||||
wxProperty *prop = (wxProperty *)node->Data();
|
||||
delete prop;
|
||||
delete prop;
|
||||
m_properties.DeleteNode(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool wxPropertySheet::HasProperty(const wxString& name) const
|
||||
{
|
||||
return (GetProperty(name)?TRUE:FALSE);
|
||||
return (GetProperty(name)?TRUE:FALSE);
|
||||
}
|
||||
|
||||
// Clear all properties
|
||||
@@ -1095,10 +1097,10 @@ wxPropertyValidator::~wxPropertyValidator(void)
|
||||
{}
|
||||
|
||||
bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) {
|
||||
double num;
|
||||
bool ok = StringToDouble (s, &num);
|
||||
*number = (float) num;
|
||||
return ok;
|
||||
double num;
|
||||
bool ok = StringToDouble (s, &num);
|
||||
*number = (float) num;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) {
|
||||
@@ -1106,20 +1108,20 @@ bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) {
|
||||
wxChar *value_ptr;
|
||||
*number = wxStrtod (s, &value_ptr);
|
||||
if (value_ptr) {
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
}
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToInt (wxChar *s, int *number) {
|
||||
long num;
|
||||
bool ok = StringToLong (s, &num);
|
||||
*number = (int) num;
|
||||
return ok;
|
||||
long num;
|
||||
bool ok = StringToLong (s, &num);
|
||||
*number = (int) num;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToLong (wxChar *s, long *number) {
|
||||
@@ -1127,31 +1129,33 @@ bool wxPropertyValidator::StringToLong (wxChar *s, long *number) {
|
||||
wxChar *value_ptr;
|
||||
*number = wxStrtol (s, &value_ptr, 10);
|
||||
if (value_ptr) {
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
}
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
wxChar *wxPropertyValidator::FloatToString (float number) {
|
||||
static wxChar buf[20];
|
||||
wxSprintf (buf, wxT("%.6g"), number);
|
||||
return buf;
|
||||
static wxChar buf[20];
|
||||
wxSprintf (buf, wxT("%.6g"), number);
|
||||
return buf;
|
||||
}
|
||||
|
||||
wxChar *wxPropertyValidator::DoubleToString (double number) {
|
||||
static wxChar buf[20];
|
||||
wxSprintf (buf, wxT("%.6g"), number);
|
||||
return buf;
|
||||
static wxChar buf[20];
|
||||
wxSprintf (buf, wxT("%.6g"), number);
|
||||
return buf;
|
||||
}
|
||||
|
||||
wxChar *wxPropertyValidator::IntToString (int number) {
|
||||
return ::IntToString (number);
|
||||
return ::IntToString (number);
|
||||
}
|
||||
|
||||
wxChar *wxPropertyValidator::LongToString (long number) {
|
||||
return ::LongToString (number);
|
||||
return ::LongToString (number);
|
||||
}
|
||||
|
||||
#endif // wxUSE_PROPSHEET
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_PROPSHEET
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
@@ -39,11 +41,11 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormView, wxPropertyView)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPropertyFormView, wxPropertyView)
|
||||
EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk)
|
||||
EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel)
|
||||
EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp)
|
||||
EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert)
|
||||
EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate)
|
||||
EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk)
|
||||
EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel)
|
||||
EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp)
|
||||
EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert)
|
||||
EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
bool wxPropertyFormView::sm_dialogCancelled = FALSE;
|
||||
@@ -52,11 +54,11 @@ wxPropertyFormView::wxPropertyFormView(wxWindow *propPanel, long flags):wxProper
|
||||
{
|
||||
m_propertyWindow = propPanel;
|
||||
m_managedWindow = NULL;
|
||||
|
||||
|
||||
m_windowCloseButton = NULL;
|
||||
m_windowCancelButton = NULL;
|
||||
m_windowHelpButton = NULL;
|
||||
|
||||
|
||||
m_detailedEditing = FALSE;
|
||||
}
|
||||
|
||||
@@ -67,7 +69,7 @@ wxPropertyFormView::~wxPropertyFormView(void)
|
||||
void wxPropertyFormView::ShowView(wxPropertySheet *ps, wxWindow *panel)
|
||||
{
|
||||
m_propertySheet = ps;
|
||||
|
||||
|
||||
AssociatePanel(panel);
|
||||
// CreateControls();
|
||||
// UpdatePropertyList();
|
||||
@@ -84,7 +86,7 @@ bool wxPropertyFormView::Check(void)
|
||||
{
|
||||
if (!m_propertySheet)
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxNode *node = m_propertySheet->GetProperties().First();
|
||||
while (node)
|
||||
{
|
||||
@@ -105,7 +107,7 @@ bool wxPropertyFormView::TransferToPropertySheet(void)
|
||||
{
|
||||
if (!m_propertySheet)
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxNode *node = m_propertySheet->GetProperties().First();
|
||||
while (node)
|
||||
{
|
||||
@@ -125,7 +127,7 @@ bool wxPropertyFormView::TransferToDialog(void)
|
||||
{
|
||||
if (!m_propertySheet)
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxNode *node = m_propertySheet->GetProperties().First();
|
||||
while (node)
|
||||
{
|
||||
@@ -145,7 +147,7 @@ bool wxPropertyFormView::AssociateNames(void)
|
||||
{
|
||||
if (!m_propertySheet || !m_propertyWindow)
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxNode *node = m_propertyWindow->GetChildren().First();
|
||||
while (node)
|
||||
{
|
||||
@@ -177,17 +179,17 @@ void wxPropertyFormView::OnOk(wxCommandEvent& WXUNUSED(event))
|
||||
// Retrieve the value if any
|
||||
if (!Check())
|
||||
return;
|
||||
|
||||
|
||||
sm_dialogCancelled = FALSE;
|
||||
TransferToPropertySheet();
|
||||
|
||||
|
||||
m_managedWindow->Close(TRUE);
|
||||
}
|
||||
|
||||
void wxPropertyFormView::OnCancel(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
sm_dialogCancelled = TRUE;
|
||||
|
||||
|
||||
m_managedWindow->Close(TRUE);
|
||||
}
|
||||
|
||||
@@ -210,10 +212,10 @@ void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event)
|
||||
{
|
||||
if (!m_propertySheet)
|
||||
return;
|
||||
|
||||
|
||||
if (win.GetName() == wxT(""))
|
||||
return;
|
||||
|
||||
|
||||
if (wxStrcmp(win.GetName(), wxT("ok")) == 0)
|
||||
OnOk(event);
|
||||
else if (wxStrcmp(win.GetName(), wxT("cancel")) == 0)
|
||||
@@ -264,7 +266,7 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item)
|
||||
{
|
||||
if (!m_propertySheet)
|
||||
return;
|
||||
|
||||
|
||||
// Find a validator to route the command to.
|
||||
wxNode *node = m_propertySheet->GetProperties().First();
|
||||
while (node)
|
||||
@@ -413,20 +415,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxRealFormValidator, wxPropertyFormValidator)
|
||||
|
||||
///
|
||||
/// Real number form validator
|
||||
///
|
||||
bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
///
|
||||
bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *parentWindow)
|
||||
{
|
||||
if (m_realMin == 0.0 && m_realMax == 0.0)
|
||||
return TRUE;
|
||||
|
||||
|
||||
// The item used for viewing the real number: should be a text item.
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
|
||||
|
||||
|
||||
float val = 0.0;
|
||||
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);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (val < m_realMin || val > m_realMax)
|
||||
{
|
||||
wxChar buf[200];
|
||||
@@ -446,32 +448,32 @@ bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow) )
|
||||
{
|
||||
// The item used for viewing the real number: should be a text item.
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
|
||||
|
||||
|
||||
if (value.Length() == 0)
|
||||
return FALSE;
|
||||
|
||||
|
||||
float f = (float)wxAtof((const wxChar *)value);
|
||||
property->GetValue() = f;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow) )
|
||||
{
|
||||
// The item used for viewing the real number: should be a text item.
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow;
|
||||
textItem->SetValue(FloatToString(property->GetValue().RealValue()));
|
||||
return TRUE;
|
||||
@@ -479,26 +481,26 @@ bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormVie
|
||||
|
||||
///
|
||||
/// Integer validator
|
||||
///
|
||||
///
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxIntegerFormValidator, wxPropertyFormValidator)
|
||||
|
||||
bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *parentWindow)
|
||||
{
|
||||
if (m_integerMin == 0.0 && m_integerMax == 0.0)
|
||||
return TRUE;
|
||||
|
||||
|
||||
// The item used for viewing the real number: should be a text item or a slider
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow)
|
||||
return FALSE;
|
||||
|
||||
|
||||
long val = 0;
|
||||
|
||||
|
||||
if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
|
||||
{
|
||||
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
|
||||
|
||||
|
||||
if (!StringToLong(WXSTRINGCAST value, &val))
|
||||
{
|
||||
wxChar buf[200];
|
||||
@@ -513,7 +515,7 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (val < m_integerMin || val > m_integerMax)
|
||||
{
|
||||
char buf[200];
|
||||
@@ -524,21 +526,21 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow))
|
||||
{
|
||||
// The item used for viewing the real number: should be a text item or a slider
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow)
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
|
||||
{
|
||||
wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue());
|
||||
|
||||
|
||||
if (value.Length() == 0)
|
||||
return FALSE;
|
||||
|
||||
|
||||
long i = wxAtol((const wxChar *)value);
|
||||
property->GetValue() = i;
|
||||
}
|
||||
@@ -548,18 +550,18 @@ bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFor
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow))
|
||||
{
|
||||
// The item used for viewing the real number: should be a text item or a slider
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow)
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl)))
|
||||
{
|
||||
wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow;
|
||||
@@ -576,42 +578,42 @@ bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFor
|
||||
|
||||
///
|
||||
/// Boolean validator
|
||||
///
|
||||
///
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxBoolFormValidator, wxPropertyFormValidator)
|
||||
|
||||
bool wxBoolFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxBoolFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow))
|
||||
{
|
||||
// The item used for viewing the boolean: should be a checkbox
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox)))
|
||||
return FALSE;
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxBoolFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxBoolFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow) )
|
||||
{
|
||||
// The item used for viewing the boolean: should be a checkbox.
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox)))
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow;
|
||||
|
||||
|
||||
property->GetValue() = (bool)checkBox->GetValue();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow))
|
||||
{
|
||||
// The item used for viewing the boolean: should be a checkbox.
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox)))
|
||||
return FALSE;
|
||||
|
||||
|
||||
wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow;
|
||||
checkBox->SetValue((bool)property->GetValue().BoolValue());
|
||||
return TRUE;
|
||||
@@ -619,7 +621,7 @@ bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormVie
|
||||
|
||||
///
|
||||
/// String validator
|
||||
///
|
||||
///
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxStringFormValidator, wxPropertyFormValidator)
|
||||
|
||||
wxStringFormValidator::wxStringFormValidator(wxStringList *list, long flags):
|
||||
@@ -628,12 +630,12 @@ wxPropertyFormValidator(flags)
|
||||
m_strings = list;
|
||||
}
|
||||
|
||||
bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *parentWindow )
|
||||
{
|
||||
if (!m_strings)
|
||||
return TRUE;
|
||||
|
||||
|
||||
// The item used for viewing the string: should be a text item, choice item or listbox.
|
||||
wxWindow *m_propertyWindow = property->GetWindow();
|
||||
if (!m_propertyWindow)
|
||||
@@ -658,7 +660,7 @@ bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVie
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow) )
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow) )
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
#endif // wxUSE_PROPSHEET
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_PROPSHEET
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/window.h"
|
||||
#include "wx/font.h"
|
||||
@@ -1880,3 +1882,4 @@ static wxBitmap *GetCrossBitmap()
|
||||
return s_crossBitmap;
|
||||
}
|
||||
|
||||
#endif // wxUSE_PROPSHEET
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_SPLASH
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
@@ -156,3 +158,4 @@ void wxSplashScreenWindow::OnChar(wxKeyEvent& event)
|
||||
GetParent()->Close(TRUE);
|
||||
}
|
||||
|
||||
#endif // wxUSE_SPLASH
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
//#if !defined(__WIN32__) || !wxUSE_NATIVE_STATUSBAR
|
||||
#if wxUSE_STATUSBAR
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/setup.h"
|
||||
@@ -359,4 +359,4 @@ void wxStatusBarGeneric::SetMinHeight(int height)
|
||||
}
|
||||
}
|
||||
|
||||
//#endif // Win32 && wxUSE_NATIVE_STATUSBAR
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TEXTDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -119,3 +121,5 @@ void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) )
|
||||
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
#endif // wxUSE_TEXTDLG
|
||||
|
@@ -25,9 +25,11 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
|
||||
#include "wx/generic/treectlg.h"
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/settings.h"
|
||||
@@ -2530,3 +2532,4 @@ void wxGenericTreeCtrl::RefreshLine( wxGenericTreeItem *item )
|
||||
Refresh( TRUE, &rect );
|
||||
}
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_WIZARDDLG
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/intl.h"
|
||||
@@ -389,3 +391,4 @@ wxWizardEvent::wxWizardEvent(wxEventType type, int id, bool direction)
|
||||
m_direction = direction;
|
||||
}
|
||||
|
||||
#endif // wxUSE_WIZARDDLG
|
||||
|
@@ -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!
|
||||
ALL_SOURCES = \
|
||||
generic/busyinfo.cpp \
|
||||
@@ -972,6 +972,56 @@ GUIDEPS = \
|
||||
win_gtk.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 = \
|
||||
dialup.o \
|
||||
dir.o \
|
||||
|
@@ -146,6 +146,7 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
//-----------------------------------------------------------------------------
|
||||
// "child_attached" of menu bar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -169,6 +170,7 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
win->m_menuBarDetached = TRUE;
|
||||
win->GtkUpdateSize();
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -612,6 +614,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
wxWindow::DoGetClientSize( width, height );
|
||||
if (height)
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
@@ -620,6 +623,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
else
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
/* status bar */
|
||||
@@ -663,6 +667,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
|
||||
#if wxUSE_MENUS
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
@@ -671,6 +676,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
else
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
/* 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()
|
||||
* because I don't want to call any non-native functions here. */
|
||||
|
||||
#if wxUSE_MENUS
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
@@ -775,6 +782,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
xx, yy, ww, hh );
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
if ((m_frameToolBar) &&
|
||||
@@ -782,6 +790,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
#if wxUSE_MENUS
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
@@ -789,6 +798,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
else
|
||||
yy += wxPLACE_HOLDER;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
m_frameToolBar->m_x = xx;
|
||||
m_frameToolBar->m_y = yy;
|
||||
@@ -848,7 +858,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
xx, yy, ww, hh );
|
||||
gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL );
|
||||
}
|
||||
#endif
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
m_sizeSet = TRUE;
|
||||
|
||||
@@ -857,6 +867,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// send size event to status bar
|
||||
if (m_frameStatusBar)
|
||||
{
|
||||
@@ -864,6 +875,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
event2.SetEventObject( m_frameStatusBar );
|
||||
m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 );
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
m_resizing = FALSE;
|
||||
}
|
||||
@@ -888,7 +900,9 @@ void wxFrame::OnInternalIdle()
|
||||
return;
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
|
||||
#endif // wxUSE_MENUS
|
||||
#if wxUSE_TOOLBAR
|
||||
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
|
||||
#endif
|
||||
@@ -903,6 +917,8 @@ void wxFrame::OnInternalIdle()
|
||||
// menu/tool/status bar stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
@@ -959,7 +975,10 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
||||
m_sizeSet = FALSE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
|
@@ -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);
|
||||
#endif
|
||||
|
||||
#ifdef wxUSE_CARET
|
||||
#if wxUSE_CARET
|
||||
// caret needs to be informed about focus change
|
||||
wxCaret *caret = win->GetCaret();
|
||||
if ( caret )
|
||||
@@ -1588,7 +1588,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
|
||||
gdk_im_end();
|
||||
#endif
|
||||
|
||||
#ifdef wxUSE_CARET
|
||||
#if wxUSE_CARET
|
||||
// caret needs to be informed about focus change
|
||||
wxCaret *caret = win->GetCaret();
|
||||
if ( caret )
|
||||
@@ -3351,6 +3351,8 @@ void wxWindow::ApplyWidgetStyle()
|
||||
// Pop-up menu stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
|
||||
{
|
||||
*is_waiting = FALSE;
|
||||
@@ -3421,6 +3423,8 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
void wxWindow::SetDropTarget( wxDropTarget *dropTarget )
|
||||
|
@@ -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!
|
||||
ALL_SOURCES = \
|
||||
generic/busyinfo.cpp \
|
||||
@@ -972,6 +972,56 @@ GUIDEPS = \
|
||||
win_gtk.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 = \
|
||||
dialup.o \
|
||||
dir.o \
|
||||
|
@@ -146,6 +146,7 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
//-----------------------------------------------------------------------------
|
||||
// "child_attached" of menu bar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -169,6 +170,7 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
win->m_menuBarDetached = TRUE;
|
||||
win->GtkUpdateSize();
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -612,6 +614,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
wxWindow::DoGetClientSize( width, height );
|
||||
if (height)
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
@@ -620,6 +623,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
|
||||
else
|
||||
(*height) -= wxPLACE_HOLDER;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
/* status bar */
|
||||
@@ -663,6 +667,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
|
||||
#if wxUSE_MENUS
|
||||
/* menu bar */
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
@@ -671,6 +676,7 @@ void wxFrame::DoSetClientSize( int width, int height )
|
||||
else
|
||||
height += wxPLACE_HOLDER;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
/* 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()
|
||||
* because I don't want to call any non-native functions here. */
|
||||
|
||||
#if wxUSE_MENUS
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
@@ -775,6 +782,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
xx, yy, ww, hh );
|
||||
client_area_y_offset += hh;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
if ((m_frameToolBar) &&
|
||||
@@ -782,6 +790,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
{
|
||||
int xx = m_miniEdge;
|
||||
int yy = m_miniEdge + m_miniTitle;
|
||||
#if wxUSE_MENUS
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
if (!m_menuBarDetached)
|
||||
@@ -789,6 +798,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
else
|
||||
yy += wxPLACE_HOLDER;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
m_frameToolBar->m_x = xx;
|
||||
m_frameToolBar->m_y = yy;
|
||||
@@ -848,7 +858,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
xx, yy, ww, hh );
|
||||
gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL );
|
||||
}
|
||||
#endif
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
m_sizeSet = TRUE;
|
||||
|
||||
@@ -857,6 +867,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// send size event to status bar
|
||||
if (m_frameStatusBar)
|
||||
{
|
||||
@@ -864,6 +875,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
event2.SetEventObject( m_frameStatusBar );
|
||||
m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 );
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
m_resizing = FALSE;
|
||||
}
|
||||
@@ -888,7 +900,9 @@ void wxFrame::OnInternalIdle()
|
||||
return;
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
|
||||
#endif // wxUSE_MENUS
|
||||
#if wxUSE_TOOLBAR
|
||||
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
|
||||
#endif
|
||||
@@ -903,6 +917,8 @@ void wxFrame::OnInternalIdle()
|
||||
// menu/tool/status bar stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
@@ -959,7 +975,10 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar )
|
||||
m_sizeSet = FALSE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
|
||||
|
@@ -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);
|
||||
#endif
|
||||
|
||||
#ifdef wxUSE_CARET
|
||||
#if wxUSE_CARET
|
||||
// caret needs to be informed about focus change
|
||||
wxCaret *caret = win->GetCaret();
|
||||
if ( caret )
|
||||
@@ -1588,7 +1588,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
|
||||
gdk_im_end();
|
||||
#endif
|
||||
|
||||
#ifdef wxUSE_CARET
|
||||
#if wxUSE_CARET
|
||||
// caret needs to be informed about focus change
|
||||
wxCaret *caret = win->GetCaret();
|
||||
if ( caret )
|
||||
@@ -3351,6 +3351,8 @@ void wxWindow::ApplyWidgetStyle()
|
||||
// Pop-up menu stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
|
||||
{
|
||||
*is_waiting = FALSE;
|
||||
@@ -3421,6 +3423,8 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
void wxWindow::SetDropTarget( wxDropTarget *dropTarget )
|
||||
|
@@ -73,11 +73,13 @@ static char **CreateFontList(wxChar spacing,
|
||||
wxNativeEncodingInfo info;
|
||||
wxGetNativeFontEncoding(encoding, &info);
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
if ( !wxTestFontEncoding(info) )
|
||||
{
|
||||
// ask font mapper for a replacement
|
||||
(void)wxTheFontMapper->GetAltForEncoding(encoding, &info);
|
||||
}
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
||||
wxString pattern;
|
||||
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
|
||||
|
@@ -260,7 +260,9 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
||||
if ( !wxGetNativeFontEncoding(encoding, &info) ||
|
||||
!wxTestFontEncoding(info) )
|
||||
{
|
||||
#if wxUSE_FONTMAP
|
||||
if ( !wxTheFontMapper->GetAltForEncoding(encoding, &info) )
|
||||
#endif // wxUSE_FONTMAP
|
||||
{
|
||||
// unspported encoding - replace it with the default
|
||||
//
|
||||
|
@@ -847,7 +847,7 @@ void wxThread::Sleep(unsigned long milliseconds)
|
||||
|
||||
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:
|
||||
// it has 0 size but still can be read from)
|
||||
wxLogNull nolog;
|
||||
|
@@ -303,6 +303,8 @@ void wxHandleProcessTermination(wxEndProcessData *proc_data)
|
||||
// wxStream classes to support IO redirection in wxExecute
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
|
||||
class wxProcessFileInputStream : public wxInputStream
|
||||
{
|
||||
public:
|
||||
@@ -399,12 +401,14 @@ size_t wxProcessFileOutputStream::OnSysWrite(const void *buffer, size_t bufsize)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // wxUSE_STREAMS
|
||||
|
||||
long wxExecute(wxChar **argv,
|
||||
bool sync,
|
||||
wxProcess *process)
|
||||
{
|
||||
// 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;
|
||||
|
||||
wxCHECK_MSG( *argv, errorRetCode, wxT("can't exec empty command") );
|
||||
@@ -557,16 +561,18 @@ long wxExecute(wxChar **argv,
|
||||
// pipe initialization: construction of the wxStreams
|
||||
if ( process && process->IsRedirected() )
|
||||
{
|
||||
#if wxUSE_STREAMS
|
||||
// These two streams are relative to this process.
|
||||
wxOutputStream *outStream = new wxProcessFileOutputStream(pipeIn[1]);
|
||||
wxInputStream *inStream = new wxProcessFileInputStream(pipeOut[0]);
|
||||
wxInputStream *errStream = new wxProcessFileInputStream(pipeErr[0]);
|
||||
|
||||
process->SetPipeStreams(inStream, outStream, errStream);
|
||||
#endif // wxUSE_STREAMS
|
||||
|
||||
close(pipeIn[0]); // close reading side
|
||||
close(pipeOut[1]); // close writing side
|
||||
close(pipeErr[1]); // close writing side
|
||||
|
||||
process->SetPipeStreams(inStream, outStream, errStream);
|
||||
}
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
Reference in New Issue
Block a user