New configure

wxRegionIterator
  New IsEposed functions  (-> recompile)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-09-02 17:53:48 +00:00
parent 2f2aa6287b
commit 8429bec1e8
18 changed files with 2158 additions and 1784 deletions

View File

@@ -23,9 +23,9 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// it won't compile without it anyhow // it won't compile without it anyhow
#ifndef USE_WXCONFIG #ifndef USE_CONFIG
#error "Please define USE_WXCONFIG or remove config.cpp from your makefile" #error "Please define USE_CONFIG or remove config.cpp from your makefile"
#endif // USE_WXCONFIG #endif // USE_CONFIG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants

View File

@@ -26,9 +26,9 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// it won't compile without it anyhow // it won't compile without it anyhow
#ifndef USE_WXCONFIG #ifndef USE_CONFIG
#error "Please define USE_WXCONFIG or remove fileconf.cpp from your makefile" #error "Please define USE_CONFIG or remove fileconf.cpp from your makefile"
#endif // USE_WXCONFIG #endif // USE_CONFIG
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxFileConfig // wxFileConfig

View File

@@ -89,11 +89,46 @@ class wxRegion : public wxGDIObject
wxRegionContain Contains( long x, long y ) const; wxRegionContain Contains( long x, long y ) const;
wxRegionContain Contains( long x, long y, long w, long h ) const; wxRegionContain Contains( long x, long y, long w, long h ) const;
wxRegionContain Contains(const wxPoint& pt) const;
wxRegionContain Contains(const wxRect& rect) const;
public: public:
wxList *GetRectList() const;
GdkRegion *GetRegion(void) const; GdkRegion *GetRegion(void) const;
}; };
class wxRegionIterator: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxRegionIterator);
public:
wxRegionIterator(void);
wxRegionIterator(const wxRegion& region);
void Reset(void) { m_current = 0; }
void Reset(const wxRegion& region);
operator bool (void) const;
bool HaveRects(void) const;
void operator ++ (void);
void operator ++ (int);
long GetX(void) const;
long GetY(void) const;
long GetW(void) const;
long GetWidth(void) const { return GetW(); }
long GetH(void) const;
long GetHeight(void) const { return GetH(); }
private:
long m_current;
wxRegion m_region;
};
#endif #endif
// __REGIONH__ // __REGIONH__

View File

@@ -140,8 +140,12 @@ public:
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL ); virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear(); virtual void Clear();
virtual bool IsExposed( long x, long y );
virtual bool IsExposed( long x, long y, long width, long height ); virtual wxRegion GetUpdateRegion() const;
virtual bool IsExposed(int x, int y) const;
virtual bool IsExposed(int x, int y, int w, int h) const;
virtual bool IsExposed(const wxPoint& pt) const;
virtual bool IsExposed(const wxRect& rect) const;
virtual wxColour GetBackgroundColour() const; virtual wxColour GetBackgroundColour() const;
virtual void SetBackgroundColour( const wxColour &colour ); virtual void SetBackgroundColour( const wxColour &colour );

View File

@@ -89,11 +89,46 @@ class wxRegion : public wxGDIObject
wxRegionContain Contains( long x, long y ) const; wxRegionContain Contains( long x, long y ) const;
wxRegionContain Contains( long x, long y, long w, long h ) const; wxRegionContain Contains( long x, long y, long w, long h ) const;
wxRegionContain Contains(const wxPoint& pt) const;
wxRegionContain Contains(const wxRect& rect) const;
public: public:
wxList *GetRectList() const;
GdkRegion *GetRegion(void) const; GdkRegion *GetRegion(void) const;
}; };
class wxRegionIterator: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxRegionIterator);
public:
wxRegionIterator(void);
wxRegionIterator(const wxRegion& region);
void Reset(void) { m_current = 0; }
void Reset(const wxRegion& region);
operator bool (void) const;
bool HaveRects(void) const;
void operator ++ (void);
void operator ++ (int);
long GetX(void) const;
long GetY(void) const;
long GetW(void) const;
long GetWidth(void) const { return GetW(); }
long GetH(void) const;
long GetHeight(void) const { return GetH(); }
private:
long m_current;
wxRegion m_region;
};
#endif #endif
// __REGIONH__ // __REGIONH__

View File

@@ -140,8 +140,12 @@ public:
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL ); virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear(); virtual void Clear();
virtual bool IsExposed( long x, long y );
virtual bool IsExposed( long x, long y, long width, long height ); virtual wxRegion GetUpdateRegion() const;
virtual bool IsExposed(int x, int y) const;
virtual bool IsExposed(int x, int y, int w, int h) const;
virtual bool IsExposed(const wxPoint& pt) const;
virtual bool IsExposed(const wxRect& rect) const;
virtual wxColour GetBackgroundColour() const; virtual wxColour GetBackgroundColour() const;
virtual void SetBackgroundColour( const wxColour &colour ); virtual void SetBackgroundColour( const wxColour &colour );

View File

@@ -78,7 +78,7 @@ class WXDLLEXPORT wxClassInfo
wxObject* WXDLLEXPORT wxCreateDynamicObject(char *name); wxObject* WXDLLEXPORT wxCreateDynamicObject(char *name);
#ifdef USE_STORABLE_CLASSES #ifdef USE_SERIAL
wxObject* WXDLLEXPORT wxCreateStoredObject( wxInputStream& stream ); wxObject* WXDLLEXPORT wxCreateStoredObject( wxInputStream& stream );
#endif #endif
@@ -183,7 +183,7 @@ class WXDLLEXPORT wxObject
virtual void Dump(ostream& str); virtual void Dump(ostream& str);
#endif #endif
#ifdef USE_STORABLE_CLASSES #ifdef USE_SERIAL
virtual void StoreObject( wxObjectOutputStream &stream ); virtual void StoreObject( wxObjectOutputStream &stream );
virtual void LoadObject( wxObjectInputStream &stream ); virtual void LoadObject( wxObjectInputStream &stream );
#endif #endif

2421
install/unix/configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -14,9 +14,9 @@ AC_DEFUN(AM_PATH_GTK,
[dnl [dnl
dnl Get the cflags and libraries from the gtk-config script dnl Get the cflags and libraries from the gtk-config script
dnl dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], AC_ARG_WITH(gtk-prefix,[**--with-gtk-prefix=PFX Prefix where GTK is installed],
gtk_config_prefix="$withval", gtk_config_prefix="") gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], AC_ARG_WITH(gtk-exec-prefix,[**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
if test x$gtk_config_exec_prefix != x ; then if test x$gtk_config_exec_prefix != x ; then
@@ -655,62 +655,70 @@ DEFAULT_USE_DEBUG_FLAG=0
DEFAULT_USE_DEBUG_INFO=0 DEFAULT_USE_DEBUG_INFO=0
DEFAULT_USE_MEM_TRACING=0 DEFAULT_USE_MEM_TRACING=0
DEFAULT_USE_DMALLOC=0 DEFAULT_USE_DMALLOC=0
DEFAULT_USE_APPLE_IEEE=1
DEFAULT_USE_IOSTREAMH=1
DEFAULT_USE_ZLIB=1 DEFAULT_USE_ZLIB=1
DEFAULT_USE_GDK_IMLIB=1 DEFAULT_USE_GDK_IMLIB=1
DEFAULT_USE_LIBPNG=1 DEFAULT_USE_LIBPNG=1
DEFAULT_USE_ODBC=1 DEFAULT_USE_ODBC=1
DEFAULT_USE_APPLE_IEEE=1
DEFAULT_USE_STORABLE_CLASSES=1
DEFAULT_USE_AUTOTRANS=1
DEFAULT_USE_AFM_FOR_POSTSCRIPT=1
DEFAULT_WX_NORMALIZED_PS_FONTS=1
DEFAULT_USE_IOSTREAMH=1
DEFAULT_USE_OPENGL=0
DEFAULT_USE_WXCONFIG=1
DEFAULT_USE_POSTSCRIPT=1
DEFAULT_USE_IPC=1
DEFAULT_USE_RESOURCES=1
DEFAULT_USE_TIMEDATE=1
DEFAULT_USE_FRACTION=1
DEFAULT_USE_CONSTRAINTS=1
DEFAULT_USE_TOOLBAR=1
DEFAULT_USE_GAUGE=1 DEFAULT_USE_GAUGE=1
DEFAULT_USE_SCROLLBAR=1 DEFAULT_USE_SCROLLBAR=1
DEFAULT_USE_LISTCTRL=1
DEFAULT_USE_TREECTRL=1
DEFAULT_USE_GRID=1
DEFAULT_USE_TAB_DIALOG=1
DEFAULT_USE_NOTEBOOK=1
DEFAULT_USE_TIMEDATE=1
DEFAULT_USE_FRACTION=1
DEFAULT_USE_LOG=1
DEFAULT_USE_INTL=1
DEFAULT_USE_CONFIG=1
DEFAULT_USE_STREAMS=1
DEFAULT_USE_SERIAL=1
DEFAULT_USE_FILE=1
DEFAULT_USE_TEXTFILE=1
DEFAULT_USE_AFM_FOR_POSTSCRIPT=1
DEFAULT_WX_NORMALIZED_PS_FONTS=1
DEFAULT_USE_POSTSCRIPT=1
DEFAULT_USE_IPC=1
DEFAULT_USE_RESOURCES=1
DEFAULT_USE_CONSTRAINTS=1
DEFAULT_USE_CLIPBOARD=0
DEFAULT_USE_DND=1
DEFAULT_USE_MDI_ARCHITECTURE=1
DEFAULT_USE_DOC_VIEW_ARCHITECTURE=1 DEFAULT_USE_DOC_VIEW_ARCHITECTURE=1
DEFAULT_USE_PRINTING_ARCHITECTURE=1 DEFAULT_USE_PRINTING_ARCHITECTURE=1
DEFAULT_USE_PROLOGIO=1
DEFAULT_USE_WX_RESOURCES=1
DEFAULT_USE_RPC=0
DEFAULT_USE_OPENGL=0
DEFAULT_USE_METAFILE=0 DEFAULT_USE_METAFILE=0
DEFAULT_USE_HELP=0
DEFAULT_USE_CLIPBOARD=0
DEFAULT_USE_VLBOX=0
DEFAULT_USE_WXGRAPH=0 DEFAULT_USE_WXGRAPH=0
DEFAULT_USE_WXTREE=0 DEFAULT_USE_WXTREE=0
DEFAULT_USE_ENHANCED_DIALOG=0 DEFAULT_USE_HELP=0
DEFAULT_USE_FORM=0
DEFAULT_USE_PROLOGIO=1
DEFAULT_USE_RPC=0
DEFAULT_USE_WX_RESOURCES=1
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl toolkit options dnl toolkit options
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
AC_OVERRIDES(gtk,gtk, AC_OVERRIDES(gtk,gtk,
**--with-gtk use GTK, **--with-gtk use GTK,
USE_GTK) USE_GTK)
AC_OVERRIDES(qt,qt, AC_OVERRIDES(qt,qt,
**--with-qt use Qt, **--with-qt use Qt,
USE_QT) USE_QT)
AC_OVERRIDES(motif,motif, AC_OVERRIDES(motif,motif,
**--with-motif use Motif/Lesstif, **--with-motif use Motif/Lesstif,
USE_MOTIF) USE_MOTIF)
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
@@ -722,7 +730,7 @@ AC_OVERRIDES(shared,shared,
USE_SHARED) USE_SHARED)
AC_OVERRIDES(optimise,optimise, AC_OVERRIDES(optimise,optimise,
**--with-optimise create optimised code, **--with-optimise create optimised code,
USE_OPTIMISE) USE_OPTIMISE)
AC_OVERRIDES(debug_flag,debug_flag, AC_OVERRIDES(debug_flag,debug_flag,
@@ -730,7 +738,7 @@ AC_OVERRIDES(debug_flag,debug_flag,
USE_DEBUG_FLAG) USE_DEBUG_FLAG)
AC_OVERRIDES(debug_info,debug_info, AC_OVERRIDES(debug_info,debug_info,
**--with-debug_info create code with debuging information included, **--with-debug_info create code with debuging information,
USE_DEBUG_INFO) USE_DEBUG_INFO)
AC_OVERRIDES(mem_tracing,mem_tracing, AC_OVERRIDES(mem_tracing,mem_tracing,
@@ -738,19 +746,23 @@ AC_OVERRIDES(mem_tracing,mem_tracing,
USE_MEM_TRACING) USE_MEM_TRACING)
AC_OVERRIDES(dmalloc,dmalloc, AC_OVERRIDES(dmalloc,dmalloc,
**--with-dmalloc use dmalloc memory debug library (www.letters.com/dmalloc/), **--with-dmalloc use dmalloc memory debug library (www.letters.com/dmalloc/),
USE_DMALLOC) USE_DMALLOC)
AC_OVERRIDES(profile,profile, AC_OVERRIDES(profile,profile,
**--with-profile create code with profiling information included, **--with-profile create code with profiling information,
USE_PROFILE) USE_PROFILE)
AC_OVERRIDES(apple_ieee, apple_ieee,
**--with_apple_ieee use the Apple IEEE codec,
USE_APPLE_IEEE)
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl user options for libraries (no choice yet) dnl user options for libraries
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
AC_OVERRIDES(zlib,zlib, AC_OVERRIDES(zlib,zlib,
**--with-zlib use zlib (LZW comression), **--with-zlib use zlib for LZW comression,
USE_ZLIB) USE_ZLIB)
AC_OVERRIDES(gdk_imlib,gdk_imlib, AC_OVERRIDES(gdk_imlib,gdk_imlib,
@@ -762,28 +774,88 @@ AC_OVERRIDES(libpng,libpng,
USE_LIBPNG) USE_LIBPNG)
AC_OVERRIDES(odbc,odbc, AC_OVERRIDES(odbc,odbc,
**--with-odbc use iODBC, **--with-odbc use iODBC and wxODBC classes,
USE_ODBC) USE_ODBC)
AC_OVERRIDES(opengl,opengl, AC_OVERRIDES(opengl,opengl,
**--with-opengl use opengl (OpenGL or Mesa), **--with-opengl use OpenGL (or Mesa),
USE_OPENGL) USE_OPENGL)
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl user options for code features (no choice yet) dnl user options for GUI control classes
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
AC_OVERRIDES(apple_ieee, apple_ieee, AC_OVERRIDES(gauge,gauge,
**--with_apple_ieee use the Apple IEEE codec, **--with-gauge use wxGauge class,
USE_APPLE_IEEE) USE_GAUGE)
AC_OVERRIDES(storable,storable, AC_OVERRIDES(scrollbar,scrollbar,
**--with-storable use storable classes, **--with-scrollbar use wxScrollbar class,
USE_STORABLE_CLASSES) USE_SCROLLBAR)
AC_OVERRIDES(autotrans,autotrans, AC_OVERRIDES(listctrl,listctrl,
**--with-autotrans use gettext automatic translation, **--with-listctrl use wxListCtrl class,
USE_AUTOTRANS) USE_LISTCTRL)
AC_OVERRIDES(treectrl,treectrl,
**--with-treectrl use wxTreeCtrl class,
USE_TREECTRL)
AC_OVERRIDES(grid,grid,
**--with-grid use wxGrid class,
USE_GRID)
AC_OVERRIDES(tab_dialog,tab_dialog,
**--with-tab_dialog use wxTabDia class,
USE_TAB_DIALOG)
AC_OVERRIDES(notebook,notebook,
**--with-notebook use wxNotebook class,
USE_NOTEBOOK)
dnl ----------------------------------------------------------------
dnl user options for non-GUI classes
dnl ----------------------------------------------------------------
AC_OVERRIDES(timedate, timedate,
**--with-timedate use wxTime and wxDate classes,
USE_TIMEDATE)
AC_OVERRIDES(fraction,fraction,
**--with-fraction use wxFraction class,
USE_FRACTION)
AC_OVERRIDES(log,log,
**--with-log use logging system,
USE_LOG)
AC_OVERRIDES(intl,intl,
**--with-intl use internationalization system,
USE_INTL)
AC_OVERRIDES(config,config,
**--with-config use wxConfig class,
USE_CONFIG)
AC_OVERRIDES(streams,streams,
**--with-streams use wxStream etc classes,
USE_STREAMS)
AC_OVERRIDES(serial,serial,
**--with-serial use class serialization,
USE_SERIAL)
AC_OVERRIDES(file,file,
**--with-file use wxFile class,
USE_FILE)
AC_OVERRIDES(textfile,textfile,
**--with-textfile use wxTextFile class,
USE_TEXTFILE)
dnl ----------------------------------------------------------------
dnl user options for PostScript
dnl ----------------------------------------------------------------
AC_OVERRIDES(afmfonts,afmfonts, AC_OVERRIDES(afmfonts,afmfonts,
**--with-afmfonts use Adobe Font Metric Font table, **--with-afmfonts use Adobe Font Metric Font table,
@@ -793,81 +865,57 @@ AC_OVERRIDES(normalized, normalized,
**--with-PS-normalized use normalized PS fonts, **--with-PS-normalized use normalized PS fonts,
WX_NORMALIZED_PS_FONTS) WX_NORMALIZED_PS_FONTS)
AC_OVERRIDES(rpc,RPC, AC_OVERRIDES(postscript, postscript,
**--with-rpc use RPC, **--with-postscript use wxPostscriptDC device context,
USE_RPC) USE_POSTSCRIPT)
dnl ----------------------------------------------------------------
dnl user options for Prolog and Resources
dnl ----------------------------------------------------------------
AC_OVERRIDES(wxresources,wxresources, AC_OVERRIDES(wxresources,wxresources,
**--with-wxresources use wxresources, **--with-wxresources use wxWindows's resources,
USE_WX_RESOURCES) USE_WX_RESOURCES)
AC_OVERRIDES(prologio,prologio, AC_OVERRIDES(prologio,prologio,
**--with-prologio use prologio, **--with-prologio use Prolog IO library,
USE_PROLOGIO) USE_PROLOGIO)
AC_OVERRIDES(postscript, postscript, AC_OVERRIDES(rpc,RPC,
**--with-postscript use postscript-device-context, **--with-rpc use Prolog's remote procedure calls,
USE_POSTSCRIPT) USE_RPC)
AC_OVERRIDES(wxconfig, wxconfig, dnl ----------------------------------------------------------------
**--with-wxconfig use wxconfig, dnl user options for misc stuff
USE_WXCONFIG) dnl ----------------------------------------------------------------
AC_OVERRIDES(metafile, metafile,
**--with-metafile use metafile,
USE_METAFILE)
AC_OVERRIDES(form,form,
**--with-form use form,
USE_FORM)
AC_OVERRIDES(help,help,
**--with-help use help,
USE_HELP)
AC_OVERRIDES(ipc,IPC, AC_OVERRIDES(ipc,IPC,
**--with-ipc use ipc, **--with-ipc use interprocess communication (wxSocket etc.),
USE_IPC) USE_IPC)
AC_OVERRIDES(enhanceddialog,enhanced dialog,
**--with-enhanceddialog use enhanced dialog,
USE_ENHANCED_DIALOG)
AC_OVERRIDES(resources,resources, AC_OVERRIDES(resources,resources,
**--with-resources use resources, **--with-resources use X resources for saving information,
USE_RESOURCES) USE_RESOURCES)
AC_OVERRIDES(clipboard,clipboard, AC_OVERRIDES(clipboard,clipboard,
**--with-clipboard use clipboard, **--with-clipboard use wxClipboard classes,
USE_CLIPBOARD) USE_CLIPBOARD)
AC_OVERRIDES(timedate, timedate, AC_OVERRIDES(dnd,dnd,
**--with-timedate use timedate, **--with-dnd use Drag'n'Drop classes,
USE_TIMEDATE) USE_DND)
AC_OVERRIDES(fraction,fraction,
**--with-fraction use fraction,
USE_FRACTION)
AC_OVERRIDES(constraints,constrains, AC_OVERRIDES(constraints,constrains,
**--with-constraints use constraints, **--with-constraints use layout-constraints system,
USE_CONSTRAINTS) USE_CONSTRAINTS)
AC_OVERRIDES(toolbar,toolbar, dnl ----------------------------------------------------------------
**--with-toolbar use toolbar, dnl user options for architectures
USE_TOOLBAR) dnl ----------------------------------------------------------------
AC_OVERRIDES(gauge,gauge, AC_OVERRIDES(mdi,mdi,
**--with-gauge use gauge, **--with-mdi use multiple document interface architecture,
USE_GAUGE) USE_MDI_ARCHITECTURE)
AC_OVERRIDES(vllist,vllist,
**--with-vlbox use virtual list box,
USE_VLBOX)
AC_OVERRIDES(scrollbar,scrollbar,
**--with-scrollbar use scrollbar,
USE_SCROLLBAR)
AC_OVERRIDES(docview,docview, AC_OVERRIDES(docview,docview,
**--with-docview use document view architecture, **--with-docview use document view architecture,
@@ -877,20 +925,28 @@ AC_OVERRIDES(printarch,printarch,
**--with-printarch use printing architecture, **--with-printarch use printing architecture,
USE_PRINTING_ARCHITECTURE) USE_PRINTING_ARCHITECTURE)
AC_OVERRIDES(typetree,typetree, dnl ----------------------------------------------------------------
**--with-typetree use typetree, dnl user options with no effect yet
USE_TYPETREE) dnl ----------------------------------------------------------------
dnl
AC_OVERRIDES(wxgraph,wxgraph, dnl AC_OVERRIDES(metafile, metafile,
**--with-wxgraph use wxgraph, dnl **--with-metafile use metafile (no effect),
USE_WXGRAPH) dnl USE_METAFILE)
dnl
AC_OVERRIDES(wxtree,wxtree, dnl AC_OVERRIDES(help,help,
**--with-wxtree use wxtree, dnl **--with-help use help (no effect),
USE_WXTREE) dnl USE_HELP)
dnl
dnl AC_OVERRIDES(wxgraph,wxgraph,
dnl **--with-wxgraph use wxgraph (no effect),
dnl USE_WXGRAPH)
dnl
dnl AC_OVERRIDES(wxtree,wxtree,
dnl **--with-wxtree use wxtree (no effect),
dnl USE_WXTREE)
dnl
dnl AC_OVERRIDES(package,message,helpmessage,variable) dnl AC_OVERRIDES(package,message,helpmessage,variable)
dnl
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl Unix, obviously dnl Unix, obviously
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
@@ -989,47 +1045,9 @@ AC_SUBST(TOOLKIT_DEF)
AC_SUBST(MAKEINCLUDE) AC_SUBST(MAKEINCLUDE)
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl register changes for Makefiles (via substit) and setup.h dnl Register compile options for makefiles and setup.h
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
ZLIB=NONE
if test "$USE_ZLIB" = 1 ; then
ZLIB="ZLIB"
fi
GDK_IMLIB=NONE
if test "$USE_GDK_IMLIB" = 1 ; then
GDK_IMLIB="GDK_IMLIB"
fi
LIBPNG=NONE
if test "$USE_LIBPNG" = 1 ; then
LIBPNG="LIBPNG"
fi
ODBC=NONE
if test "$USE_ODBC" = 1 ; then
ODBC="ODBC"
fi
APPLE_IEEE=NONE
if test "$USE_APPLE_IEEE" = 1 ; then
APPLE_IEEE="APPLE_IEEE"
AC_DEFINE_UNQUOTED(USE_APPLE_IEEE,$USE_APPLE_IEEE)
fi
STORABLE=NONE
if test "$USE_STORABLE_CLASSES" = 1 ; then
STORABLE="STORABLE"
AC_DEFINE_UNQUOTED(USE_STORABLE_CLASSES,$USE_STORABLE_CLASSES)
fi
AUTOTRANS=NONE
if test "$USE_AUTOTRANS" = 1 ; then
AUTOTRANS="AUTOTRANS"
AC_DEFINE_UNQUOTED(USE_AUTOTRANS,$USE_AUTOTRANS)
fi
WXDEBUG= WXDEBUG=
if test "$USE_DEBUG_INFO" = 1 ; then if test "$USE_DEBUG_INFO" = 1 ; then
WXDEBUG="-g -O0" WXDEBUG="-g -O0"
@@ -1077,44 +1095,179 @@ else
fi fi
AC_SUBST(OPTIMISE) AC_SUBST(OPTIMISE)
APPLE_IEEE=NONE
if test "$USE_APPLE_IEEE" = 1 ; then
APPLE_IEEE="APPLE_IEEE"
AC_DEFINE_UNQUOTED(USE_APPLE_IEEE,$USE_APPLE_IEEE)
fi
USE_IOSTREAMH=$DEFAULT_USE_IOSTREAMH USE_IOSTREAMH=$DEFAULT_USE_IOSTREAMH
AC_DEFINE_UNQUOTED(USE_IOSTREAMH,$USE_IOSTREAMH) AC_DEFINE_UNQUOTED(USE_IOSTREAMH,$USE_IOSTREAMH)
RPC=NONE dnl ----------------------------------------------------------------
dnl Register library options for makefiles and setup.h
dnl ----------------------------------------------------------------
if test "$USE_ZLIB" = 1 ; then
AC_DEFINE_UNQUOTED(USE_ZLIB,$USE_ZLIB)
fi
if test "$USE_GDK_IMLIB" = 1 ; then
AC_DEFINE_UNQUOTED(USE_GDK_IMLIB,$USE_GDK_IMLIB)
fi
if test "$USE_LIBPNG" = 1 ; then
AC_DEFINE_UNQUOTED(USE_LIBPNG,$USE_LIBPNG)
fi
if test "$USE_ODBC" = 1 ; then
AC_DEFINE_UNQUOTED(USE_ODBC,$USE_ODBC)
fi
dnl ----------------------------------------------------------------
dnl Register GUI-control options for makefiles and setup.h
dnl ----------------------------------------------------------------
if test "$USE_GAUGE" = 1 ; then
AC_DEFINE_UNQUOTED(USE_GAUGE,$USE_GAUGE)
fi
if test "$USE_SCROLLBAR" = 1 ; then
AC_DEFINE_UNQUOTED(USE_SCROLLBAR,$USE_SCROLLBAR)
fi
if test "$USE_LISTCTRL" = 1 ; then
AC_DEFINE_UNQUOTED(USE_LISTCTRL,$USE_LISTCTRL)
fi
if test "$USE_TREECTRL" = 1 ; then
AC_DEFINE_UNQUOTED(USE_TREECTRL,$USE_TREECTRL)
fi
if test "$USE_GRID" = 1 ; then
AC_DEFINE_UNQUOTED(USE_GRID,$USE_GRID)
fi
if test "$USE_TAB_DIALOG" = 1 ; then
AC_DEFINE_UNQUOTED(USE_TAB_DIALOG,$USE_TAB_DIALOG)
fi
if test "$USE_NOTEBOOK" = 1 ; then
AC_DEFINE_UNQUOTED(USE_NOTEBOOK,$USE_NOTEBOOK)
fi
dnl ----------------------------------------------------------------
dnl Register non-GUI class options for makefiles and setup.h
dnl ----------------------------------------------------------------
if test "$USE_CONFIG" = 1 ; then
AC_DEFINE_UNQUOTED(USE_CONFIG,$USE_CONFIG)
fi
if test "$USE_TIMEDATE" = 1 ; then
AC_DEFINE_UNQUOTED(USE_TIMEDATE,$USE_TIMEDATE)
fi
if test "$USE_FRACTION" = 1 ; then
AC_DEFINE_UNQUOTED(USE_FRACTION,$USE_FRACTION)
fi
if test "$USE_LOG" = 1 ; then
AC_DEFINE_UNQUOTED(USE_LOG,$USE_LOG)
fi
if test "$USE_INTL" = 1 ; then
AC_DEFINE_UNQUOTED(USE_INTL,$USE_INTL)
fi
if test "$USE_STREAMS" = 1 ; then
AC_DEFINE_UNQUOTED(USE_STREAMS,$USE_STREAMS)
fi
if test "$USE_SERIAL" = 1 ; then
AC_DEFINE_UNQUOTED(USE_SERIAL,$USE_SERIAL)
fi
if test "$USE_FILE" = 1 ; then
AC_DEFINE_UNQUOTED(USE_FILE,$USE_FILE)
fi
if test "$USE_TEXTFILE" = 1 ; then
AC_DEFINE_UNQUOTED(USE_TEXTFILE,$USE_TEXTFILE)
fi
dnl ----------------------------------------------------------------
dnl Register Prolog and Resources options for makefiles and setup.h
dnl ----------------------------------------------------------------
if test "$USE_RPC" = 1 ; then if test "$USE_RPC" = 1 ; then
RPC="RPC"
AC_DEFINE_UNQUOTED(USE_RPC,$USE_RPC) AC_DEFINE_UNQUOTED(USE_RPC,$USE_RPC)
fi fi
AC_SUBST(RPC)
WXRESOURCES=NONE
if test "$USE_WX_RESOURCES" = 1 ; then if test "$USE_WX_RESOURCES" = 1 ; then
WXRESOURCES="WXRESOURCES"
AC_DEFINE_UNQUOTED(USE_WX_RESOURCES,$USE_WX_RESOURCES) AC_DEFINE_UNQUOTED(USE_WX_RESOURCES,$USE_WX_RESOURCES)
fi fi
AC_SUBST(WXRESOURCES)
PROLOGIO=NONE
PROLOGIOSRC=NONE
if test "$USE_PROLOGIO" = 1 ; then if test "$USE_PROLOGIO" = 1 ; then
PROLOGIO="PROLOGIO"
PROLOGIOSRC="PROLOGIOSRC"
AC_DEFINE_UNQUOTED(USE_PROLOGIO) AC_DEFINE_UNQUOTED(USE_PROLOGIO)
fi fi
AC_SUBST(PROLOGIO)
AC_SUBST(PROLOGIOSRC)
POSTSCRIPTDC=NONE dnl ----------------------------------------------------------------
dnl Register PostScript options for makefiles and setup.h
dnl ----------------------------------------------------------------
if test "$USE_POSTSCRIPT" = 1 ; then if test "$USE_POSTSCRIPT" = 1 ; then
POSTSCRIPTDC="POSTSCRIPTDC"
AC_DEFINE_UNQUOTED(USE_POSTSCRIPT) AC_DEFINE_UNQUOTED(USE_POSTSCRIPT)
fi fi
AC_SUBST(POSTSCRIPTDC)
if test "$USE_WXCONFIG" = 1 ; then AC_DEFINE_UNQUOTED(USE_AFM_FOR_POSTSCRIPT,$USE_AFM_FOR_POSTSCRIPT)
AC_DEFINE_UNQUOTED(USE_WXCONFIG,$USE_WXCONFIG)
AC_DEFINE_UNQUOTED(WX_NORMALIZED_PS_FONTS,$WX_NORMALIZED_PS_FONTS)
dnl ----------------------------------------------------------------
dnl Register architecture options for makefiles and setup.h
dnl ----------------------------------------------------------------
if test "$USE_MDI_ARCHITECTURE" = 1 ; then
AC_DEFINE_UNQUOTED(USE_MDI_ARCHITECTURE,$USE_MDI_ARCHITECTURE)
fi fi
if test "$USE_DOC_VIEW_ARCHITECTURE" = 1 ; then
AC_DEFINE_UNQUOTED(USE_DOC_VIEW_ARCHITECTURE,$USE_DOC_VIEW_ARCHITECTURE)
fi
if test "$USE_PRINTING_ARCHITECTURE" = 1 ; then
AC_DEFINE_UNQUOTED(USE_PRINTING_ARCHITECTURE,$USE_PRINTING_ARCHITECTURE)
fi
dnl ----------------------------------------------------------------
dnl Register misc options for makefiles and setup.h
dnl ----------------------------------------------------------------
if test "$USE_IPC" = 1 ; then
AC_DEFINE_UNQUOTED(USE_IPC)
fi
if test "$USE_RESOURCES" = 1 ; then
AC_DEFINE_UNQUOTED(USE_RESOURCES,$USE_RESOURCES)
fi
if test "$USE_CLIPBOARD" = 1 ; then
AC_DEFINE_UNQUOTED(USE_CLIPBOARD,$USE_CLIPBOARD)
fi
if test "$USE_DND" = 1 ; then
AC_DEFINE_UNQUOTED(USE_DND,$USE_DND)
fi
if test "$USE_CONSTRAINTS" = 1 ; then
AC_DEFINE_UNQUOTED(USE_CONSTRAINTS,$USE_CONSTRAINTS)
fi
dnl ----------------------------------------------------------------
dnl No effect
dnl ----------------------------------------------------------------
METAFILE=NONE METAFILE=NONE
if test "$USE_METAFILE" = 1 ; then if test "$USE_METAFILE" = 1 ; then
METAFILE="METAFILE" METAFILE="METAFILE"
@@ -1122,13 +1275,6 @@ if test "$USE_METAFILE" = 1 ; then
fi fi
AC_SUBST(METAFILE) AC_SUBST(METAFILE)
FORM=NONE
if test "$USE_FORM" = 1 ; then
FORM="FORM"
AC_DEFINE_UNQUOTED(USE_FORM,$USE_FORM)
fi
AC_SUBST(FORM)
HELP=NONE HELP=NONE
if test "$USE_HELP" = 1 ; then if test "$USE_HELP" = 1 ; then
HELP="HELP" HELP="HELP"
@@ -1136,105 +1282,6 @@ if test "$USE_HELP" = 1 ; then
fi fi
AC_SUBST(HELP) AC_SUBST(HELP)
IPC=NONE
if test "$USE_IPC" = 1 ; then
IPC="IPC"
AC_DEFINE_UNQUOTED(USE_IPC)
fi
AC_SUBST(IPC)
ENHDIALOGBOX=NONE
if test "$USE_ENHANCED_DIALOG" = 1 ; then
ENHDIALOGBOX="ENHDIALOGBOX"
AC_DEFINE_UNQUOTED(USE_ENHANCED_DIALOG,$USE_ENHANCED_DIALOG)
fi
AC_SUBST(ENHDIALOGBOX)
XRESOURCES=NONE
if test "$USE_RESOURCES" = 1 ; then
XRESOURCES="XRESOURCES"
AC_DEFINE_UNQUOTED(USE_RESOURCES,$USE_RESOURCES)
fi
AC_SUBST(XRESOURCES)
CLIPBOARD=NONE
if test "$USE_CLIPBOARD" = 1 ; then
CLIPBOARD="CLIPBOARD"
AC_DEFINE_UNQUOTED(USE_CLIPBOARD,$USE_CLIPBOARD)
fi
AC_SUBST(CLIPBOARD)
CONSTRAINTS=NONE
if test "$USE_CONSTRAINTS" = 1 ; then
CONSTRAINTS="CONSTRAINTS"
AC_DEFINE_UNQUOTED(USE_CONSTRAINTS,$USE_CONSTRAINTS)
fi
AC_SUBST(CONSTRAINTS)
TIMEDATE=NONE
if test "$USE_TIMEDATE" = 1 ; then
TIMEDATE="TIMEDATE"
AC_DEFINE_UNQUOTED(USE_TIMEDATE,$USE_TIMEDATE)
fi
AC_SUBST(TIMEDATE)
FRACTION=NONE
if test "$USE_FRACTION" = 1 ; then
FRACTION="FRACTION"
AC_DEFINE_UNQUOTED(USE_FRACTION,$USE_FRACTION)
fi
AC_SUBST(FRACTION)
TOOLBAR=NONE
if test "$USE_TOOLBAR" = 1 ; then
TOOLBAR="TOOLBAR"
AC_DEFINE_UNQUOTED(USE_TOOLBAR,$USE_TOOLBAR)
AC_DEFINE_UNQUOTED(USE_XT_TOOLBAR,$USE_XT_TOOLBAR)
fi
AC_SUBST(TOOLBAR)
GAUGE=NONE
if test "$USE_GAUGE" = 1 ; then
GAUGE="GAUGE"
AC_SUBST(GAUGE)
AC_DEFINE_UNQUOTED(USE_GAUGE,$USE_GAUGE)
fi
VIRLISTBOX=NONE
if test "$USE_VLBOX" = 1 ; then
VIRTLISTBOX="VIRLISTBOX"
AC_DEFINE_UNQUOTED(USE_VIRLISTBOX,$USE_VIRLISTBOX)
fi
AC_SUBST(VIRLISTBOX)
SCROLLBAR=NONE
if test "$USE_SCROLLBAR" = 1 ; then
SCROLLBAR="SCROLLBAR"
AC_DEFINE_UNQUOTED(USE_SCROLLBAR,$USE_SCROLLBAR)
fi
AC_SUBST(SCROLLBAR)
DOCVIEW=NONE
if test "$USE_DOC_VIEW_ARCHITECTURE" = 1 ; then
DOCVIEW="DOCVIEW"
AC_DEFINE_UNQUOTED(USE_DOC_VIEW_ARCHITECTURE,$USE_DOC_VIEW_ARCHITECTURE)
fi
AC_SUBST(DOCVIEW)
PRINTPREVIEW=NONE
if test "$USE_PRINTING_ARCHITECTURE" = 1 ; then
PRINTPREVIEW="PRINTPREVIEW"
AC_DEFINE_UNQUOTED(USE_PRINTING_ARCHITECTURE,$USE_PRINTING_ARCHITECTURE)
fi
AC_SUBST(PRINTPREVIEW)
TYPETREE=NONE
if test "$USE_TYPETREE" = 1 ; then
TYPETREE="TYPETREE"
AC_DEFINE_UNQUOTED(USE_TYPETREE,$USE_TYPETREE)
fi
AC_SUBST(TYPETREE)
WXGRAPH=NONE WXGRAPH=NONE
if test "$USE_WXGRAPH" = 1 ; then if test "$USE_WXGRAPH" = 1 ; then
WXGRAPH="WXGRAPH" WXGRAPH="WXGRAPH"
@@ -1254,10 +1301,6 @@ if test "$USE_OPENGL" = 1 ; then
GLCANVAS="GLCANVAS" GLCANVAS="GLCANVAS"
fi fi
AC_DEFINE_UNQUOTED(USE_AFM_FOR_POSTSCRIPT,$USE_AFM_FOR_POSTSCRIPT)
AC_DEFINE_UNQUOTED(WX_NORMALIZED_PS_FONTS,$WX_NORMALIZED_PS_FONTS)
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl select dynamic loader (used by iODBC to load drivers) dnl select dynamic loader (used by iODBC to load drivers)
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
@@ -1275,7 +1318,7 @@ THREADS_LINK=""
UNIX_THREAD="" UNIX_THREAD=""
AC_ARG_WITH(threads, AC_ARG_WITH(threads,
[ --without-threads Force disabling threads ], [**--without-threads Force disabling threads ],
[USE_THREADS="$withval"]) [USE_THREADS="$withval"])
if test "$USE_THREADS" = "1"; then if test "$USE_THREADS" = "1"; then
@@ -1364,125 +1407,6 @@ if test "$USE_OPENGL" = 1; then
fi fi
fi fi
dnl ----------------------------------------------------------------
dnl search for gdk_imlib
dnl ----------------------------------------------------------------
dnl
dnl GDK_IMLIB_INCLUDE=
dnl GDK_IMLIB_LIBRARY=
dnl GDK_IMLIB_LINK=
dnl
if test "$USE_GDK_IMLIB" = 1; then
dnl AC_MSG_CHECKING(for gdk_imlib includes)
dnl AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,gdk_imlib.h)
dnl if test "$ac_find_includes" != "" ; then
dnl dnl GDK_IMLIB_INCLUDE="-I$ac_find_includes"
dnl AC_MSG_RESULT(found $ac_find_includes)
dnl AC_MSG_CHECKING(for gdk_imlib library)
dnl AC_PATH_FIND_LIBRARIES($SEARCH_LIB,gdk_imlib)
dnl if test "$ac_find_libraries" != "" ; then
dnl AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE)
dnl AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB)
dnl CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link"
dnl CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include"
dnl GDK_IMLIB_LIBRARY="$ac_path_to_link"
dnl GDK_IMLIB_INCLUDE="$ac_path_to_include"
dnl GDK_IMLIB_LINK="-lgdk_imlib"
dnl AC_MSG_RESULT(found gdk_imlib at $ac_find_libraries)
dnl else
dnl AC_MSG_ERROR(no)
dnl fi
dnl else
dnl AC_MSG_ERROR(no)
dnl fi
AC_DEFINE_UNQUOTED(USE_GDK_IMLIB,$USE_GDK_IMLIB)
fi
dnl AC_SUBST(GDK_IMLIB_INCLUDE)
dnl AC_SUBST(GDK_IMLIB_LIBRARY)
dnl AC_SUBST(GDK_IMLIB_LINK)
dnl ----------------------------------------------------------------
dnl search for zlib
dnl ----------------------------------------------------------------
dnl
dnl ZLIB_INCLUDE=
dnl ZLIB_LINK=
dnl
if test "$USE_ZLIB" = 1; then
dnl AC_MSG_CHECKING(for zlib includes)
dnl AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,zlib.h)
dnl if test "$ac_find_includes" != "" ; then
dnl AC_MSG_RESULT(found $ac_find_includes)
dnl AC_MSG_CHECKING(for zlib library)
dnl AC_PATH_FIND_LIBRARIES($SEARCH_LIB,z)
dnl if test "$ac_find_libraries" != "" ; then
dnl AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE)
dnl AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB)
dnl CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link"
dnl CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include"
dnl ZLIB_INCLUDE="$ac_path_to_include"
dnl ZLIB_LINK="-lz"
dnl AC_MSG_RESULT(found zlib at $ac_find_libraries)
dnl else
dnl AC_MSG_ERROR(no)
dnl fi
dnl else
dnl AC_MSG_ERROR(no)
dnl fi
AC_DEFINE_UNQUOTED(USE_ZLIB,$USE_ZLIB)
fi
dnl AC_SUBST(ZLIB_INCLUDE)
dnl AC_SUBST(ZLIB_LIBRARY)
dnl AC_SUBST(ZLIB_LINK)
dnl ----------------------------------------------------------------
dnl search for libpng
dnl ----------------------------------------------------------------
dnl
dnl LIBPNG_INCLUDE=
dnl LIBPNG_LIBRARY=
dnl LIBPNG_LINK=
dnl
if test "$USE_LIBPNG" = 1; then
dnl AC_MSG_CHECKING(for libpng includes)
dnl AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,png.h)
dnl if test "$ac_find_includes" != "" ; then
dnl AC_MSG_RESULT(found $ac_find_includes)
dnl AC_MSG_CHECKING(for libpng library)
dnl AC_PATH_FIND_LIBRARIES($SEARCH_LIB,png)
dnl if test "$ac_find_libraries" != "" ; then
dnl AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE)
dnl AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB)
dnl CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link"
dnl CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include"
dnl LIBPNG_LIBRARY="$ac_path_to_link"
dnl LIBPNG_INCLUDE="$ac_path_to_include"
dnl LIBPNG_LINK="-lpng"
dnl AC_MSG_RESULT(found libpng at $ac_find_libraries)
dnl else
dnl AC_MSG_RESULT(no)
dnl fi
dnl else
dnl AC_MSG_ERROR(no)
dnl fi
AC_DEFINE_UNQUOTED(USE_LIBPNG,$USE_LIBPNG)
fi
dnl AC_SUBST(LIBPNG_INCLUDE)
dnl AC_SUBST(LIBPNG_LIBRARY)
dnl AC_SUBST(LIBPNG_LINK)
dnl ----------------------------------------------------------------
dnl search for iODBC
dnl ----------------------------------------------------------------
dnl
if test "$USE_ODBC" = 1; then
AC_DEFINE_UNQUOTED(USE_ODBC,$USE_ODBC)
fi
dnl ----------------------------------------------------------------
dnl search for Python
dnl ----------------------------------------------------------------
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl left-over dnl left-over
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------

View File

@@ -1,18 +1,14 @@
/* wx_setup.h /* setup.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that Do not edit this file. It is autogenerated by configure.
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file.
Leave the following blank line there!! Autoheader needs it. */ Leave the following blank line there!! Autoheader needs it. */
// ------------------------------------------------------------------------
// Features as requested by configure
// ------------------------------------------------------------------------
#ifndef __GTKSETUPH__ #ifndef __GTKSETUPH__
#define __GTKSETUPH__ #define __GTKSETUPH__
@@ -42,6 +38,10 @@
#undef __ULTRIX__ #undef __ULTRIX__
#undef __DATA_GENERAL__ #undef __DATA_GENERAL__
//------------------------------------------------------------------------
// library options
//------------------------------------------------------------------------
/* /*
* Use zlib * Use zlib
*/ */
@@ -62,48 +62,155 @@
* Use Threads * Use Threads
*/ */
#undef USE_THREADS #undef USE_THREADS
//------------------------------------------------------------------------
// GUI control options
//------------------------------------------------------------------------
/* /*
* Use storable classes * Use gauge item
*/ */
#undef USE_STORABLE_CLASSES #undef USE_GAUGE
/* /*
* Use automatic translation via gettext() in wxTString * Use scrollbar item
*/ */
#undef USE_AUTOTRANS #undef USE_SCROLLBAR
/*
* Use notebook item
*/
#undef USE_NOTEBOOK
/*
* Use listctrl item
*/
#undef USE_LISTCTRL
/*
* Use treectrl item
*/
#undef USE_TREECTRL
/*
* Use grid item
*/
#undef USE_GRID
/*
* Use tab dialog item
*/
#undef USE_TAB_DIALOG
//------------------------------------------------------------------------
// non-GUI options
//------------------------------------------------------------------------
/*
* Use fraction class
*/
#undef USE_FRACTION
/*
* Use time and date classes
*/
#undef USE_TIMEDATE
/*
* Use config system
*/
#undef USE_CONFIG
/*
* Use intl system
*/
#undef USE_INTL
/*
* Use streams
*/
#undef USE_STREAMS
/*
* Use wxFile
*/
#undef USE_FILE
/*
* Use wxTextFile
*/
#undef USE_TEXTFILE
/*
* Use class serialization
*/
#undef USE_SERIAL
//------------------------------------------------------------------------
// PS options
//------------------------------------------------------------------------
/* /*
* Use font metric files in GetTextExtent for wxPostScriptDC * Use font metric files in GetTextExtent for wxPostScriptDC
* Use consistent PostScript fonts for AFM and printing (!) * Use consistent PostScript fonts for AFM and printing (!)
*/ */
#undef USE_AFM_FOR_POSTSCRIPT #undef USE_AFM_FOR_POSTSCRIPT
#undef WX_NORMALIZED_PS_FONTS #undef WX_NORMALIZED_PS_FONTS
/*
* Use PostScript device context
*/
#undef USE_POSTSCRIPT
//------------------------------------------------------------------------
// misc options
//------------------------------------------------------------------------
/*
* Use Interprocess communication
*/
#undef USE_IPC
/*
* Use wxGetResource & wxWriteResource (change .Xdefaults)
*/
#undef USE_RESOURCES
/* /*
* Use clipboard * Use clipboard
*/ */
#undef USE_CLIPBOARD #undef USE_CLIPBOARD
/*
* Use dnd
*/
#undef USE_DND
/* /*
* Use wxWindows layout constraint system * Use wxWindows layout constraint system
*/ */
#undef USE_CONSTRAINTS #undef USE_CONSTRAINTS
//------------------------------------------------------------------------
// architecture options
//------------------------------------------------------------------------
/*
* Use the mdi architecture
*/
#undef USE_MDI_ARCHITECTURE
/* /*
* Use the document/view architecture * Use the document/view architecture
*/ */
#undef USE_DOC_VIEW_ARCHITECTURE #undef USE_DOC_VIEW_ARCHITECTURE
/* /*
* Use enhanced dialog * Use the print/preview architecture
*/ */
#undef USE_ENHANCED_DIALOG #undef USE_PRINTING_ARCHITECTURE
//------------------------------------------------------------------------
// Prolog and wxWindows' resource system options
//------------------------------------------------------------------------
/* /*
* Use Form panel item placement * Use Prolog IO
*/ */
#undef USE_FORM #undef USE_PROLOGIO
/* /*
* Use fraction class * Use Remote Procedure Call (Needs USE_IPC and USE_PROLOGIO)
*/ */
#undef USE_FRACTION #undef USE_RPC
/* /*
* Use gauge item * Use wxWindows resource loading (.wxr-files) (Needs USE_PROLOGIO 1)
*/ */
#undef USE_GAUGE #undef USE_WX_RESOURCES
//------------------------------------------------------------------------
// the rest
//------------------------------------------------------------------------
/* /*
* Implement a GLCanvas class as an interface to OpenGL, using the GLX * Implement a GLCanvas class as an interface to OpenGL, using the GLX
* extension to the X11 protocol. You can use the (free) Mesa library * extension to the X11 protocol. You can use the (free) Mesa library
@@ -118,63 +225,10 @@
* Use iostream.h rather than iostream * Use iostream.h rather than iostream
*/ */
#undef USE_IOSTREAMH #undef USE_IOSTREAMH
/*
* Use Interprocess communication
*/
#undef USE_IPC
/* /*
* Use Metafile and Metafile device context * Use Metafile and Metafile device context
*/ */
#undef USE_METAFILE #undef USE_METAFILE
/*
* Use PostScript device context
*/
#undef USE_POSTSCRIPT
/*
* Use wxConfig system
*/
#undef USE_WXCONFIG
/*
* Use the print/preview architecture
*/
#undef USE_PRINTING_ARCHITECTURE
/*
* Use Prolog IO
*/
#undef USE_PROLOGIO
/*
* Use Remote Procedure Call (Needs USE_IPC and USE_PROLOGIO)
*/
#undef USE_RPC
/*
* Use wxGetResource & wxWriteResource (change .Xdefaults)
*/
#undef USE_RESOURCES
/*
* Use scrollbar item
*/
#undef USE_SCROLLBAR
/*
* Use time and date classes
*/
#undef USE_TIMEDATE
/*
* Use toolbar, use Xt port toolbar (3D look)
*/
#undef USE_TOOLBAR
#undef USE_XT_TOOLBAR
/*
* Enables old type checking mechanism (wxSubType)
*/
#undef USE_TYPETREE
/*
* Use virtual list box item
*/
#undef USE_VLBOX
/*
* Use wxWindows resource loading (.wxr-files) (Needs USE_PROLOGIO 1)
*/
#undef USE_WX_RESOURCES
/* /*
* Use wxGraph * Use wxGraph
*/ */
@@ -182,15 +236,11 @@
/* /*
* Use wxTree * Use wxTree
*/ */
#undef USE_WXTREE
/* /*
* Use Apple Ieee-double converter * Use Apple Ieee-double converter
*/ */
#undef USE_APPLE_IEEE #undef USE_APPLE_IEEE
/********************** DO NOT CHANGE BELOW THIS POINT **********************/
/**************************** WXDEBUGGING FEATURES ****************************/
/* Compatibility with 1.66 API. /* Compatibility with 1.66 API.
Level 0: no backward compatibility, all new features Level 0: no backward compatibility, all new features
Level 1: wxDC, OnSize (etc.) compatibility, but Level 1: wxDC, OnSize (etc.) compatibility, but
@@ -220,9 +270,14 @@
* Matthews garbage collection (used for MrEd?) * Matthews garbage collection (used for MrEd?)
*/ */
#define WXGARBAGE_COLLECTION_ON 0 #define WXGARBAGE_COLLECTION_ON 0
/*
/**************************** COMPILER FEATURES *****************************/ * Use splines
*/
#define USE_SPLINES 1
/*
* USE_DYNAMIC_CLASSES is TRUE for the Xt port
*/
#define USE_DYNAMIC_CLASSES 1
/* /*
* Disable this if your compiler can't cope * Disable this if your compiler can't cope
* with omission of prototype parameters. * with omission of prototype parameters.
@@ -239,47 +294,9 @@
*/ */
#define CONST_COMPATIBILITY 0 #define CONST_COMPATIBILITY 0
/************************ WINDOWS 3.1 COMPATIBILITY *************************/ // ------------------------------------------------------------------------
// System-specific stuff
/* // ------------------------------------------------------------------------
* Normalize X drawing code to behave exactly as MSW.
*/
#define WX_STANDARD_GRAPHICS 0
/******************* other stuff **********************************/
/*
* Support image loading for wxBitmap (wxImage is needed for this)
*/
#define USE_IMAGE_LOADING 0
#define WXIMAGE_INCLUDE "../../utils/image/src/wx_image.h"
/*
* Use splines
*/
#define USE_SPLINES 1
/*
* USE_DYNAMIC_CLASSES is TRUE for the Xt port
*/
#define USE_DYNAMIC_CLASSES 1
/*
* USE_EXTENDED_STATICS is FALSE for the Xt port
*/
#define USE_EXTENDED_STATICS 0
/*************************** IMAKEFILE EVALUATIOS ***************************/
#if USE_XPM
#define USE_XPM_IN_X 1
#else
#define USE_XPM_IN_X 0
#endif
#if USE_IMAGE_LOADING
#define USE_IMAGE_LOADING_IN_X 1
#else
#define USE_IMAGE_LOADING_IN_X 0
#endif
/* here comes the system-specific stuff */
/* acconfig.h /* acconfig.h
This file is in the public domain. This file is in the public domain.

View File

@@ -44,33 +44,5 @@ s|*TOOLKIT_DEF*|@TOOLKIT_DEF@|g
s|*THREADS*|@THREADS@|g s|*THREADS*|@THREADS@|g
s|*THREADS_LINK*|@THREADS_LINK@|g s|*THREADS_LINK*|@THREADS_LINK@|g
s|*EXTRA_LINK*|@EXTRA_LINK@|g s|*EXTRA_LINK*|@EXTRA_LINK@|g
s|*WXSTRING*|@WXSTRING@|g
s|*TYPETREE*|@TYPETREE@|g
s|*METAFILE*|@METAFILE@|g
s|*POSTSCRIPTDC*|@POSTSCRIPTDC@|g
s|*WXGRAPH*|@WXGRAPH@|g
s|*WXTREE*|@WXTREE@|g
s|*DOCVIEW*|@DOCVIEW@|g
s|*FORM*|@FORM@|g
s|*PRINTPREVIEW*|@PRINTPREVIEW@|g
s|*IPC*|@IPC@|g
s|*HELP*|@HELP@|g
s|*CLIPBOARD*|@CLIPBOARD@|g
s|*TIMEDATE*|@TIMEDATE@|g
s|*FRACTION*|@FRACTION@|g
s|*PROLOGIO*|@PROLOGIO@|g
s|*PROLOGIOSRC*|@PROLOGIOSRC@|g
s|*ENHDIALOGBOX*|@ENHDIALOGBOX@|g
s|*GAUGE*|@GAUGE@|g
s|*GLCANVAS*|@GLCANVAS@|g
s|*LAYOUT*|@LAYOUT@|g
s|*WXRESOURCES*|@WXRESOURCES@|g
s|*XRESOURCES*|@XRESOURCES@|g
s|*SCROLLBAR*|@SCROLLBAR@|g
s|*STATICITEMS*|@STATICITEMS@|g
s|*TOOLBAR*|@TOOLBAR@|g
s|*CONSTRAINTS*|@CONSTRAINTS@|g
s|*RPC*|@RPC@|g
s|*VIRLISTBOX*|@VIRLISTBOX@|g
s|*GTK_JOYSTICK*|@GTK_JOYSTICK@|g s|*GTK_JOYSTICK*|@GTK_JOYSTICK@|g
s|*UNIX_THREAD*|@UNIX_THREAD@|g s|*UNIX_THREAD*|@UNIX_THREAD@|g

View File

@@ -228,7 +228,7 @@ wxObject *wxCreateDynamicObject(char *name)
return info->CreateObject(); return info->CreateObject();
} }
#ifdef USE_STORABLE_CLASSES #ifdef USE_SERIAL
#include "wx/serbase.h" #include "wx/serbase.h"
#include "wx/dynlib.h" #include "wx/dynlib.h"

View File

@@ -326,7 +326,7 @@ int wxEntry( int argc, char *argv[] )
{ {
if (!wxApp::GetInitializerFunction()) if (!wxApp::GetInitializerFunction())
{ {
printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") ); printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" );
return 0; return 0;
} }

View File

@@ -29,6 +29,7 @@ class wxRegionRefData: public wxObjectRefData
public: public:
GdkRegion *m_region; GdkRegion *m_region;
wxList m_rects;
}; };
wxRegionRefData::wxRegionRefData(void) wxRegionRefData::wxRegionRefData(void)
@@ -39,6 +40,14 @@ wxRegionRefData::wxRegionRefData(void)
wxRegionRefData::~wxRegionRefData(void) wxRegionRefData::~wxRegionRefData(void)
{ {
if (m_region) gdk_region_destroy( m_region ); if (m_region) gdk_region_destroy( m_region );
wxNode *node = m_rects.First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
delete r;
node = node->Next();
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -58,6 +67,7 @@ wxRegion::wxRegion( long x, long y, long w, long h )
rect.height = h; rect.height = h;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg ); gdk_region_destroy( reg );
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,w,h) );
} }
wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
@@ -71,6 +81,7 @@ wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
rect.height = bottomRight.y - rect.y; rect.height = bottomRight.y - rect.y;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg ); gdk_region_destroy( reg );
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(topLeft,bottomRight) );
} }
wxRegion::wxRegion( const wxRect& rect ) wxRegion::wxRegion( const wxRect& rect )
@@ -84,6 +95,14 @@ wxRegion::wxRegion( const wxRect& rect )
g_rect.height = rect.height; g_rect.height = rect.height;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect ); M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect );
gdk_region_destroy( reg ); gdk_region_destroy( reg );
wxNode *node = M_REGIONDATA->m_rects.First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) );
node = node->Next();
}
} }
wxRegion::wxRegion(void) wxRegion::wxRegion(void)
@@ -113,6 +132,7 @@ bool wxRegion::Union( long x, long y, long width, long height )
GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,width,height) );
return TRUE; return TRUE;
} }
@@ -126,6 +146,7 @@ bool wxRegion::Union( const wxRect& rect )
GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &g_rect ); GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &g_rect );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(rect.x,rect.y,rect.width,rect.height) );
return TRUE; return TRUE;
} }
@@ -134,6 +155,15 @@ bool wxRegion::Union( const wxRegion& region )
GdkRegion *reg = gdk_regions_union( M_REGIONDATA->m_region, region.GetRegion() ); GdkRegion *reg = gdk_regions_union( M_REGIONDATA->m_region, region.GetRegion() );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
wxNode *node = region.GetRectList()->First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) );
node = node->Next();
}
return TRUE; return TRUE;
} }
@@ -200,6 +230,15 @@ bool wxRegion::Xor( const wxRegion& region )
GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() ); GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
wxNode *node = region.GetRectList()->First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) );
node = node->Next();
}
return TRUE; return TRUE;
} }
@@ -209,11 +248,50 @@ void wxRegion::GetBox( long& x, long& y, long&w, long &h ) const
y = 0; y = 0;
w = -1; w = -1;
h = -1; h = -1;
wxNode *node = GetRectList()->First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
if (node == GetRectList()->First())
{
x = r->x;
y = r->y;
w = r->width;
h = r->height;
}
else
{
if (r->x < x)
{
x = r->x;
w += x - r->x;
}
if (r->y < y)
{
y = r->y;
h += y - r->y;
}
if (r->width+r->x > x+w)
{
w = r->x + r->width - x;
}
if (r->height+r->y > y+h)
{
h = r->y + r->height - y;
}
}
node = node->Next();
}
} }
wxRect wxRegion::GetBox(void) const wxRect wxRegion::GetBox(void) const
{ {
return wxRect( 0, 0, -1, -1 ); long x = 0;
long y = 0;
long w = -1;
long h = -1;
GetBox( x, y, w, h );
return wxRect( x, y, w, h );
} }
bool wxRegion::Empty(void) const bool wxRegion::Empty(void) const
@@ -246,8 +324,99 @@ wxRegionContain wxRegion::Contains( long x, long y, long w, long h ) const
return wxOutRegion; return wxOutRegion;
} }
wxRegionContain wxRegion::Contains(const wxPoint& pt) const
{
return Contains( pt.x, pt.y );
}
wxRegionContain wxRegion::Contains(const wxRect& rect) const
{
return Contains( rect.x, rect.y, rect.width, rect.height );
}
GdkRegion *wxRegion::GetRegion(void) const GdkRegion *wxRegion::GetRegion(void) const
{ {
return M_REGIONDATA->m_region; return M_REGIONDATA->m_region;
} }
wxList *wxRegion::GetRectList() const
{
return &(M_REGIONDATA->m_rects);
}
//-----------------------------------------------------------------------------
// wxRegion
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject);
wxRegionIterator::wxRegionIterator(void)
{
m_current = 0;
}
wxRegionIterator::wxRegionIterator( const wxRegion& region )
{
m_region = region;
m_current = 0;
}
void wxRegionIterator::Reset( const wxRegion& region )
{
m_region = region;
m_current = 0;
}
wxRegionIterator::operator bool (void) const
{
return m_current < m_region.GetRectList()->Number();
}
bool wxRegionIterator::HaveRects(void) const
{
return m_current < m_region.GetRectList()->Number();
}
void wxRegionIterator::operator ++ (void)
{
if (m_current < m_region.GetRectList()->Number()) ++m_current;
}
void wxRegionIterator::operator ++ (int)
{
if (m_current < m_region.GetRectList()->Number()) ++m_current;
}
long wxRegionIterator::GetX(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->x;
}
long wxRegionIterator::GetY(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->y;
}
long wxRegionIterator::GetW(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->width;
}
long wxRegionIterator::GetH(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->height;
}

View File

@@ -228,10 +228,12 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
if (!win->HasVMT()) return TRUE; if (!win->HasVMT()) return TRUE;
/*
printf( "OnButtonPress from " ); printf( "OnButtonPress from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() ); printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" ); printf( ".\n" );
*/
wxEventType event_type = wxEVT_LEFT_DOWN; wxEventType event_type = wxEVT_LEFT_DOWN;
@@ -1652,14 +1654,29 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
} }
} }
bool wxWindow::IsExposed( long x, long y ) wxRegion wxWindow::GetUpdateRegion() const
{
return m_updateRegion;
}
bool wxWindow::IsExposed( int x, int y) const
{ {
return (m_updateRegion.Contains( x, y ) != wxOutRegion ); return (m_updateRegion.Contains( x, y ) != wxOutRegion );
} }
bool wxWindow::IsExposed( long x, long y, long width, long height ) bool wxWindow::IsExposed( int x, int y, int w, int h ) const
{ {
return (m_updateRegion.Contains( x, y, width, height ) != wxOutRegion ); return (m_updateRegion.Contains( x, y, w, h ) != wxOutRegion );
}
bool wxWindow::IsExposed( const wxPoint& pt ) const
{
return (m_updateRegion.Contains( pt.x, pt.y ) != wxOutRegion );
}
bool wxWindow::IsExposed( const wxRect& rect ) const
{
return (m_updateRegion.Contains( rect.x, rect.y, rect.width, rect.height ) != wxOutRegion );
} }
void wxWindow::Clear(void) void wxWindow::Clear(void)

View File

@@ -326,7 +326,7 @@ int wxEntry( int argc, char *argv[] )
{ {
if (!wxApp::GetInitializerFunction()) if (!wxApp::GetInitializerFunction())
{ {
printf( _("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") ); printf( "wxWindows error: No initializer - use IMPLEMENT_APP macro.\n" );
return 0; return 0;
} }

View File

@@ -29,6 +29,7 @@ class wxRegionRefData: public wxObjectRefData
public: public:
GdkRegion *m_region; GdkRegion *m_region;
wxList m_rects;
}; };
wxRegionRefData::wxRegionRefData(void) wxRegionRefData::wxRegionRefData(void)
@@ -39,6 +40,14 @@ wxRegionRefData::wxRegionRefData(void)
wxRegionRefData::~wxRegionRefData(void) wxRegionRefData::~wxRegionRefData(void)
{ {
if (m_region) gdk_region_destroy( m_region ); if (m_region) gdk_region_destroy( m_region );
wxNode *node = m_rects.First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
delete r;
node = node->Next();
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -58,6 +67,7 @@ wxRegion::wxRegion( long x, long y, long w, long h )
rect.height = h; rect.height = h;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg ); gdk_region_destroy( reg );
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,w,h) );
} }
wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
@@ -71,6 +81,7 @@ wxRegion::wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
rect.height = bottomRight.y - rect.y; rect.height = bottomRight.y - rect.y;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect ); M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &rect );
gdk_region_destroy( reg ); gdk_region_destroy( reg );
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(topLeft,bottomRight) );
} }
wxRegion::wxRegion( const wxRect& rect ) wxRegion::wxRegion( const wxRect& rect )
@@ -84,6 +95,14 @@ wxRegion::wxRegion( const wxRect& rect )
g_rect.height = rect.height; g_rect.height = rect.height;
M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect ); M_REGIONDATA->m_region = gdk_region_union_with_rect( reg, &g_rect );
gdk_region_destroy( reg ); gdk_region_destroy( reg );
wxNode *node = M_REGIONDATA->m_rects.First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) );
node = node->Next();
}
} }
wxRegion::wxRegion(void) wxRegion::wxRegion(void)
@@ -113,6 +132,7 @@ bool wxRegion::Union( long x, long y, long width, long height )
GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(x,y,width,height) );
return TRUE; return TRUE;
} }
@@ -126,6 +146,7 @@ bool wxRegion::Union( const wxRect& rect )
GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &g_rect ); GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &g_rect );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(rect.x,rect.y,rect.width,rect.height) );
return TRUE; return TRUE;
} }
@@ -134,6 +155,15 @@ bool wxRegion::Union( const wxRegion& region )
GdkRegion *reg = gdk_regions_union( M_REGIONDATA->m_region, region.GetRegion() ); GdkRegion *reg = gdk_regions_union( M_REGIONDATA->m_region, region.GetRegion() );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
wxNode *node = region.GetRectList()->First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) );
node = node->Next();
}
return TRUE; return TRUE;
} }
@@ -200,6 +230,15 @@ bool wxRegion::Xor( const wxRegion& region )
GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() ); GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() );
gdk_region_destroy( M_REGIONDATA->m_region ); gdk_region_destroy( M_REGIONDATA->m_region );
M_REGIONDATA->m_region = reg; M_REGIONDATA->m_region = reg;
wxNode *node = region.GetRectList()->First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
M_REGIONDATA->m_rects.Append( (wxObject*) new wxRect(r->x,r->y,r->width,r->height) );
node = node->Next();
}
return TRUE; return TRUE;
} }
@@ -209,11 +248,50 @@ void wxRegion::GetBox( long& x, long& y, long&w, long &h ) const
y = 0; y = 0;
w = -1; w = -1;
h = -1; h = -1;
wxNode *node = GetRectList()->First();
while (node)
{
wxRect *r = (wxRect*)node->Data();
if (node == GetRectList()->First())
{
x = r->x;
y = r->y;
w = r->width;
h = r->height;
}
else
{
if (r->x < x)
{
x = r->x;
w += x - r->x;
}
if (r->y < y)
{
y = r->y;
h += y - r->y;
}
if (r->width+r->x > x+w)
{
w = r->x + r->width - x;
}
if (r->height+r->y > y+h)
{
h = r->y + r->height - y;
}
}
node = node->Next();
}
} }
wxRect wxRegion::GetBox(void) const wxRect wxRegion::GetBox(void) const
{ {
return wxRect( 0, 0, -1, -1 ); long x = 0;
long y = 0;
long w = -1;
long h = -1;
GetBox( x, y, w, h );
return wxRect( x, y, w, h );
} }
bool wxRegion::Empty(void) const bool wxRegion::Empty(void) const
@@ -246,8 +324,99 @@ wxRegionContain wxRegion::Contains( long x, long y, long w, long h ) const
return wxOutRegion; return wxOutRegion;
} }
wxRegionContain wxRegion::Contains(const wxPoint& pt) const
{
return Contains( pt.x, pt.y );
}
wxRegionContain wxRegion::Contains(const wxRect& rect) const
{
return Contains( rect.x, rect.y, rect.width, rect.height );
}
GdkRegion *wxRegion::GetRegion(void) const GdkRegion *wxRegion::GetRegion(void) const
{ {
return M_REGIONDATA->m_region; return M_REGIONDATA->m_region;
} }
wxList *wxRegion::GetRectList() const
{
return &(M_REGIONDATA->m_rects);
}
//-----------------------------------------------------------------------------
// wxRegion
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject);
wxRegionIterator::wxRegionIterator(void)
{
m_current = 0;
}
wxRegionIterator::wxRegionIterator( const wxRegion& region )
{
m_region = region;
m_current = 0;
}
void wxRegionIterator::Reset( const wxRegion& region )
{
m_region = region;
m_current = 0;
}
wxRegionIterator::operator bool (void) const
{
return m_current < m_region.GetRectList()->Number();
}
bool wxRegionIterator::HaveRects(void) const
{
return m_current < m_region.GetRectList()->Number();
}
void wxRegionIterator::operator ++ (void)
{
if (m_current < m_region.GetRectList()->Number()) ++m_current;
}
void wxRegionIterator::operator ++ (int)
{
if (m_current < m_region.GetRectList()->Number()) ++m_current;
}
long wxRegionIterator::GetX(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->x;
}
long wxRegionIterator::GetY(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->y;
}
long wxRegionIterator::GetW(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->width;
}
long wxRegionIterator::GetH(void) const
{
wxNode *node = m_region.GetRectList()->Nth( m_current );
if (!node) return 0;
wxRect *r = (wxRect*)node->Data();
return r->height;
}

View File

@@ -228,10 +228,12 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
if (!win->HasVMT()) return TRUE; if (!win->HasVMT()) return TRUE;
/*
printf( "OnButtonPress from " ); printf( "OnButtonPress from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() ); printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" ); printf( ".\n" );
*/
wxEventType event_type = wxEVT_LEFT_DOWN; wxEventType event_type = wxEVT_LEFT_DOWN;
@@ -1652,14 +1654,29 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
} }
} }
bool wxWindow::IsExposed( long x, long y ) wxRegion wxWindow::GetUpdateRegion() const
{
return m_updateRegion;
}
bool wxWindow::IsExposed( int x, int y) const
{ {
return (m_updateRegion.Contains( x, y ) != wxOutRegion ); return (m_updateRegion.Contains( x, y ) != wxOutRegion );
} }
bool wxWindow::IsExposed( long x, long y, long width, long height ) bool wxWindow::IsExposed( int x, int y, int w, int h ) const
{ {
return (m_updateRegion.Contains( x, y, width, height ) != wxOutRegion ); return (m_updateRegion.Contains( x, y, w, h ) != wxOutRegion );
}
bool wxWindow::IsExposed( const wxPoint& pt ) const
{
return (m_updateRegion.Contains( pt.x, pt.y ) != wxOutRegion );
}
bool wxWindow::IsExposed( const wxRect& rect ) const
{
return (m_updateRegion.Contains( rect.x, rect.y, rect.width, rect.height ) != wxOutRegion );
} }
void wxWindow::Clear(void) void wxWindow::Clear(void)