From be1f93ab877bee654e8d0d4841cd4f9ff730e580 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 16 Aug 2000 18:38:01 +0000 Subject: [PATCH] Unix compilation fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 2 +- configure | 51 ++++++++++++++++++++++++++++++++------ configure.in | 41 +++++++++++++++++++++++++++--- include/wx/gtk/app.h | 9 ++++++- include/wx/gtk1/app.h | 9 ++++++- include/wx/univ/renderer.h | 6 ++++- src/gtk/app.cpp | 6 +++++ src/gtk/window.cpp | 2 ++ src/gtk1/app.cpp | 6 +++++ src/gtk1/window.cpp | 2 ++ src/univ/button.cpp | 2 +- src/univ/control.cpp | 1 + src/univ/files.lst | 10 +++++--- src/univ/renderer.cpp | 3 +++ src/univ/stattext.cpp | 2 +- src/univ/theme.cpp | 4 ++- src/univ/themes/win32.cpp | 1 + 17 files changed, 136 insertions(+), 21 deletions(-) diff --git a/Makefile.in b/Makefile.in index 09293acbbb..708e8ef5b7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -32,7 +32,7 @@ include ./src/make.env srcdir = @srcdir@ VP1 = @top_srcdir@/src/common -VP1_5 = @top_srcdir@/src/univ +VP1_5 = @top_srcdir@/src/univ@PATH_IFS@@top_srcdir@/src/univ/themes VP2 = @top_srcdir@/src/@TOOLKIT_DIR@ VP3 = @top_srcdir@/src/motif/xmcombo VP4 = @top_srcdir@/src/generic diff --git a/configure b/configure index a3fd985f59..93037b2ac1 100755 --- a/configure +++ b/configure @@ -1388,8 +1388,8 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_ACCEL=no DEFAULT_wxUSE_BUTTON=no - DEFAULT_wxUSE_CARET=no DEFAULT_wxUSE_BMPBUTTON=no + DEFAULT_wxUSE_CARET=no DEFAULT_wxUSE_CHECKBOX=no DEFAULT_wxUSE_CHECKLST=no DEFAULT_wxUSE_CHOICE=no @@ -1526,8 +1526,8 @@ else DEFAULT_wxUSE_ACCEL=yes DEFAULT_wxUSE_BUTTON=yes - DEFAULT_wxUSE_CARET=yes DEFAULT_wxUSE_BMPBUTTON=yes + DEFAULT_wxUSE_CARET=yes DEFAULT_wxUSE_CHECKBOX=yes DEFAULT_wxUSE_CHECKLST=yes DEFAULT_wxUSE_CHOICE=yes @@ -9662,7 +9662,7 @@ rm -f conftest* PORT_FILES="src/\$(TOOLKITDIR)/files.lst" if test "$wxUSE_UNIVERSAL" = "yes"; then - PORT_FILES="${PORT_FILES} \${top_srcdir)/src/univ/files.lst" + PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst" fi RPM_FILES="src/\$(TOOLKITDIR)/rpmfiles.lst" RPM_SPEC="wx\$(TOOLKIT).spec" @@ -15126,11 +15126,9 @@ EOF fi +USES_CONTROLS=0 if test "$wxUSE_CONTROLS" = "yes"; then - cat >> confdefs.h <<\EOF -#define wxUSE_CONTROLS 1 -EOF - + USES_CONTROLS=1 fi if test "$wxUSE_ACCEL" = "yes"; then @@ -15138,6 +15136,7 @@ if test "$wxUSE_ACCEL" = "yes"; then #define wxUSE_ACCEL 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_BUTTON" = "yes"; then @@ -15145,6 +15144,7 @@ if test "$wxUSE_BUTTON" = "yes"; then #define wxUSE_BUTTON 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_BMPBUTTON" = "yes"; then @@ -15152,6 +15152,7 @@ if test "$wxUSE_BMPBUTTON" = "yes"; then #define wxUSE_BMPBUTTON 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_CARET" = "yes"; then @@ -15159,6 +15160,7 @@ if test "$wxUSE_CARET" = "yes"; then #define wxUSE_CARET 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret" fi @@ -15167,6 +15169,7 @@ if test "$wxUSE_COMBOBOX" = "yes"; then #define wxUSE_COMBOBOX 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_CHOICE" = "yes"; then @@ -15174,6 +15177,7 @@ if test "$wxUSE_CHOICE" = "yes"; then #define wxUSE_CHOICE 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_CHECKBOX" = "yes"; then @@ -15181,6 +15185,7 @@ if test "$wxUSE_CHECKBOX" = "yes"; then #define wxUSE_CHECKBOX 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_CHECKLST" = "yes"; then @@ -15188,6 +15193,7 @@ if test "$wxUSE_CHECKLST" = "yes"; then #define wxUSE_CHECKLISTBOX 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst" fi @@ -15196,6 +15202,7 @@ if test "$wxUSE_GAUGE" = "yes"; then #define wxUSE_GAUGE 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_NEW_GRID" = "yes"; then @@ -15204,6 +15211,7 @@ if test "$wxUSE_NEW_GRID" = "yes"; then #define wxUSE_NEW_GRID 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS newgrid" fi @@ -15212,6 +15220,7 @@ if test "$wxUSE_GRID" = "yes"; then #define wxUSE_GRID 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid" fi @@ -15227,6 +15236,7 @@ if test "$wxUSE_LISTBOX" = "yes"; then #define wxUSE_LISTBOX 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_LISTCTRL" = "yes"; then @@ -15235,6 +15245,7 @@ if test "$wxUSE_LISTCTRL" = "yes"; then #define wxUSE_LISTCTRL 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl" else echo "configure: warning: wxListCtrl requires wxImageList and won't be compiled without it" 1>&2 @@ -15246,6 +15257,7 @@ if test "$wxUSE_NOTEBOOK" = "yes"; then #define wxUSE_NOTEBOOK 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" fi @@ -15254,6 +15266,7 @@ if test "$wxUSE_RADIOBOX" = "yes"; then #define wxUSE_RADIOBOX 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_RADIOBTN" = "yes"; then @@ -15261,6 +15274,7 @@ if test "$wxUSE_RADIOBTN" = "yes"; then #define wxUSE_RADIOBTN 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_SASH" = "yes"; then @@ -15276,6 +15290,7 @@ if test "$wxUSE_SCROLLBAR" = "yes"; then #define wxUSE_SCROLLBAR 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll scrollsub" fi @@ -15284,6 +15299,7 @@ if test "$wxUSE_SLIDER" = "yes"; then #define wxUSE_SLIDER 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_SPINBTN" = "yes"; then @@ -15291,6 +15307,7 @@ if test "$wxUSE_SPINBTN" = "yes"; then #define wxUSE_SPINBTN 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_SPINCTRL" = "yes"; then @@ -15298,6 +15315,7 @@ if test "$wxUSE_SPINCTRL" = "yes"; then #define wxUSE_SPINCTRL 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_SPLITTER" = "yes"; then @@ -15313,6 +15331,7 @@ if test "$wxUSE_STATBMP" = "yes"; then #define wxUSE_STATBMP 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_STATBOX" = "yes"; then @@ -15320,6 +15339,7 @@ if test "$wxUSE_STATBOX" = "yes"; then #define wxUSE_STATBOX 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_STATTEXT" = "yes"; then @@ -15327,6 +15347,7 @@ if test "$wxUSE_STATTEXT" = "yes"; then #define wxUSE_STATTEXT 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_STATLINE" = "yes"; then @@ -15337,6 +15358,7 @@ if test "$wxUSE_STATLINE" = "yes"; then #define wxUSE_STATLINE 1 EOF + USES_CONTROLS=1 fi fi @@ -15345,6 +15367,7 @@ if test "$wxUSE_STATUSBAR" = "yes"; then #define wxUSE_STATUSBAR 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar" fi @@ -15362,6 +15385,7 @@ if test "$wxUSE_TEXTCTRL" = "yes"; then #define wxUSE_TEXTCTRL 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text" fi @@ -15370,6 +15394,7 @@ if test "$wxUSE_TOOLBAR_SIMPLE" = "yes"; then #define wxUSE_TOOLBAR_SIMPLE 1 EOF + USES_CONTROLS=1 wxUSE_TOOLBAR="yes" fi @@ -15378,6 +15403,7 @@ if test "$wxUSE_TOOLBAR" = "yes"; then #define wxUSE_TOOLBAR 1 EOF + USES_CONTROLS=1 if test "$wxUSE_TOOLBAR_SIMPLE" != "yes"; then wxUSE_TOOLBAR_NATIVE="yes" @@ -15391,6 +15417,7 @@ if test "$wxUSE_TOOLBAR_NATIVE" = "yes"; then #define wxUSE_TOOLBAR_NATIVE 1 EOF + USES_CONTROLS=1 fi if test "$wxUSE_TOOLTIPS" = "yes"; then @@ -15414,12 +15441,20 @@ if test "$wxUSE_TREECTRL" = "yes"; then #define wxUSE_TREECTRL 1 EOF + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl" else echo "configure: warning: wxTreeCtrl requires wxImageList and won't be compiled without it" 1>&2 fi fi +if test "$USES_CONTROLS" = 1; then + cat >> confdefs.h <<\EOF +#define wxUSE_CONTROLS 1 +EOF + +fi + if test "$wxUSE_METAFILE" = "yes"; then @@ -15715,7 +15750,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:15719: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:15754: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/configure.in b/configure.in index dc32167929..010e809bdc 100644 --- a/configure.in +++ b/configure.in @@ -779,8 +779,8 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_ACCEL=no DEFAULT_wxUSE_BUTTON=no - DEFAULT_wxUSE_CARET=no DEFAULT_wxUSE_BMPBUTTON=no + DEFAULT_wxUSE_CARET=no DEFAULT_wxUSE_CHECKBOX=no DEFAULT_wxUSE_CHECKLST=no DEFAULT_wxUSE_CHOICE=no @@ -917,8 +917,8 @@ else DEFAULT_wxUSE_ACCEL=yes DEFAULT_wxUSE_BUTTON=yes - DEFAULT_wxUSE_CARET=yes DEFAULT_wxUSE_BMPBUTTON=yes + DEFAULT_wxUSE_CARET=yes DEFAULT_wxUSE_CHECKBOX=yes DEFAULT_wxUSE_CHECKLST=yes DEFAULT_wxUSE_CHOICE=yes @@ -3559,56 +3559,68 @@ dnl --------------------------------------------------------------------------- dnl GUI controls dnl --------------------------------------------------------------------------- +USES_CONTROLS=0 if test "$wxUSE_CONTROLS" = "yes"; then - AC_DEFINE(wxUSE_CONTROLS) + USES_CONTROLS=1 fi if test "$wxUSE_ACCEL" = "yes"; then AC_DEFINE(wxUSE_ACCEL) + USES_CONTROLS=1 fi if test "$wxUSE_BUTTON" = "yes"; then AC_DEFINE(wxUSE_BUTTON) + USES_CONTROLS=1 fi if test "$wxUSE_BMPBUTTON" = "yes"; then AC_DEFINE(wxUSE_BMPBUTTON) + USES_CONTROLS=1 fi if test "$wxUSE_CARET" = "yes"; then AC_DEFINE(wxUSE_CARET) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret" fi if test "$wxUSE_COMBOBOX" = "yes"; then AC_DEFINE(wxUSE_COMBOBOX) + USES_CONTROLS=1 fi if test "$wxUSE_CHOICE" = "yes"; then AC_DEFINE(wxUSE_CHOICE) + USES_CONTROLS=1 fi if test "$wxUSE_CHECKBOX" = "yes"; then AC_DEFINE(wxUSE_CHECKBOX) + USES_CONTROLS=1 fi if test "$wxUSE_CHECKLST" = "yes"; then AC_DEFINE(wxUSE_CHECKLISTBOX) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst" fi if test "$wxUSE_GAUGE" = "yes"; then AC_DEFINE(wxUSE_GAUGE) + USES_CONTROLS=1 fi if test "$wxUSE_NEW_GRID" = "yes"; then wxUSE_GRID="yes" AC_DEFINE(wxUSE_NEW_GRID) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS newgrid" fi if test "$wxUSE_GRID" = "yes"; then AC_DEFINE(wxUSE_GRID) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid" fi @@ -3618,11 +3630,13 @@ fi if test "$wxUSE_LISTBOX" = "yes"; then AC_DEFINE(wxUSE_LISTBOX) + USES_CONTROLS=1 fi if test "$wxUSE_LISTCTRL" = "yes"; then if test "$wxUSE_IMAGLIST" = "yes"; then AC_DEFINE(wxUSE_LISTCTRL) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl" else AC_MSG_WARN([wxListCtrl requires wxImageList and won't be compiled without it]) @@ -3631,15 +3645,18 @@ fi if test "$wxUSE_NOTEBOOK" = "yes"; then AC_DEFINE(wxUSE_NOTEBOOK) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" fi if test "$wxUSE_RADIOBOX" = "yes"; then AC_DEFINE(wxUSE_RADIOBOX) + USES_CONTROLS=1 fi if test "$wxUSE_RADIOBTN" = "yes"; then AC_DEFINE(wxUSE_RADIOBTN) + USES_CONTROLS=1 fi if test "$wxUSE_SASH" = "yes"; then @@ -3649,19 +3666,23 @@ fi if test "$wxUSE_SCROLLBAR" = "yes"; then AC_DEFINE(wxUSE_SCROLLBAR) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll scrollsub" fi if test "$wxUSE_SLIDER" = "yes"; then AC_DEFINE(wxUSE_SLIDER) + USES_CONTROLS=1 fi if test "$wxUSE_SPINBTN" = "yes"; then AC_DEFINE(wxUSE_SPINBTN) + USES_CONTROLS=1 fi if test "$wxUSE_SPINCTRL" = "yes"; then AC_DEFINE(wxUSE_SPINCTRL) + USES_CONTROLS=1 fi if test "$wxUSE_SPLITTER" = "yes"; then @@ -3671,14 +3692,17 @@ fi if test "$wxUSE_STATBMP" = "yes"; then AC_DEFINE(wxUSE_STATBMP) + USES_CONTROLS=1 fi if test "$wxUSE_STATBOX" = "yes"; then AC_DEFINE(wxUSE_STATBOX) + USES_CONTROLS=1 fi if test "$wxUSE_STATTEXT" = "yes"; then AC_DEFINE(wxUSE_STATTEXT) + USES_CONTROLS=1 fi if test "$wxUSE_STATLINE" = "yes"; then @@ -3686,11 +3710,13 @@ if test "$wxUSE_STATLINE" = "yes"; then AC_MSG_WARN([wxStaticLine is not supported under WINE]) else AC_DEFINE(wxUSE_STATLINE) + USES_CONTROLS=1 fi fi if test "$wxUSE_STATUSBAR" = "yes"; then AC_DEFINE(wxUSE_STATUSBAR) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar" fi @@ -3702,16 +3728,19 @@ fi if test "$wxUSE_TEXTCTRL" = "yes"; then AC_DEFINE(wxUSE_TEXTCTRL) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text" fi if test "$wxUSE_TOOLBAR_SIMPLE" = "yes"; then AC_DEFINE(wxUSE_TOOLBAR_SIMPLE) + USES_CONTROLS=1 wxUSE_TOOLBAR="yes" fi if test "$wxUSE_TOOLBAR" = "yes"; then AC_DEFINE(wxUSE_TOOLBAR) + USES_CONTROLS=1 dnl if wxUSE_TOOLBAR and !wxUSE_TOOLBAR_SIMPLE => wxUSE_TOOLBAR_NATIVE if test "$wxUSE_TOOLBAR_SIMPLE" != "yes"; then @@ -3723,6 +3752,7 @@ fi if test "$wxUSE_TOOLBAR_NATIVE" = "yes"; then AC_DEFINE(wxUSE_TOOLBAR_NATIVE) + USES_CONTROLS=1 fi if test "$wxUSE_TOOLTIPS" = "yes"; then @@ -3740,12 +3770,17 @@ fi if test "$wxUSE_TREECTRL" = "yes"; then if test "$wxUSE_IMAGLIST" = "yes"; then AC_DEFINE(wxUSE_TREECTRL) + USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl" else AC_MSG_WARN([wxTreeCtrl requires wxImageList and won't be compiled without it]) fi fi +if test "$USES_CONTROLS" = 1; then + AC_DEFINE(wxUSE_CONTROLS) +fi + dnl --------------------------------------------------------------------------- dnl misc options dnl --------------------------------------------------------------------------- diff --git a/include/wx/gtk/app.h b/include/wx/gtk/app.h index 7b911ec302..0aa17f76e4 100644 --- a/include/wx/gtk/app.h +++ b/include/wx/gtk/app.h @@ -47,6 +47,8 @@ public: virtual bool Pending(); virtual void Dispatch(); + virtual bool IsActive() const; + virtual wxIcon GetStdIcon(int which) const; // implementation only from now on @@ -65,6 +67,8 @@ public: void SuppressIdleEvents(bool arg = TRUE) { m_suppressIdleEvents = arg; } bool GetSuppressIdleEvents() const { return m_suppressIdleEvents; } + void SetActive(bool isActive) { m_isActive = isActive; } + bool m_initialized; gint m_idleTag; @@ -74,9 +78,12 @@ public: unsigned char *m_colorCube; private: - /// Set to TRUE while we are in wxYield(). + // Set to TRUE while we are in wxYield(). bool m_suppressIdleEvents; + // does any of our windows has focus? + bool m_isActive; + private: DECLARE_DYNAMIC_CLASS(wxApp) DECLARE_EVENT_TABLE() diff --git a/include/wx/gtk1/app.h b/include/wx/gtk1/app.h index 7b911ec302..0aa17f76e4 100644 --- a/include/wx/gtk1/app.h +++ b/include/wx/gtk1/app.h @@ -47,6 +47,8 @@ public: virtual bool Pending(); virtual void Dispatch(); + virtual bool IsActive() const; + virtual wxIcon GetStdIcon(int which) const; // implementation only from now on @@ -65,6 +67,8 @@ public: void SuppressIdleEvents(bool arg = TRUE) { m_suppressIdleEvents = arg; } bool GetSuppressIdleEvents() const { return m_suppressIdleEvents; } + void SetActive(bool isActive) { m_isActive = isActive; } + bool m_initialized; gint m_idleTag; @@ -74,9 +78,12 @@ public: unsigned char *m_colorCube; private: - /// Set to TRUE while we are in wxYield(). + // Set to TRUE while we are in wxYield(). bool m_suppressIdleEvents; + // does any of our windows has focus? + bool m_isActive; + private: DECLARE_DYNAMIC_CLASS(wxApp) DECLARE_EVENT_TABLE() diff --git a/include/wx/univ/renderer.h b/include/wx/univ/renderer.h index 5f99331d32..155b8d8e9e 100644 --- a/include/wx/univ/renderer.h +++ b/include/wx/univ/renderer.h @@ -16,15 +16,19 @@ */ #ifdef __GNUG__ - #pragma implementation "renderer.h" + #pragma interface "renderer.h" #endif #ifndef _WX_UNIX_RENDERER_H_ #define _WX_UNIX_RENDERER_H_ +class WXDLLEXPORT wxControl; class WXDLLEXPORT wxDC; class WXDLLEXPORT wxWindow; +#include "wx/string.h" +#include "wx/gdicmn.h" + // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 985da80c45..2fe2770315 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -249,6 +249,7 @@ wxApp::wxApp() m_topWindow = (wxWindow *) NULL; m_exitOnFrameDelete = TRUE; + m_isActive = TRUE; m_idleTag = gtk_idle_add_priority( 1000, wxapp_idle_callback, (gpointer) NULL ); @@ -469,6 +470,11 @@ void wxApp::Dispatch() gtk_main_iteration(); } +bool wxApp::IsActive() const +{ + return m_isActive; +} + void wxApp::DeletePendingObjects() { wxNode *node = wxPendingDelete.First(); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index ff9c0e8e08..6e3e21bc0b 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2569,6 +2569,8 @@ void wxWindow::OnInternalIdle() // do it only once g_sendActivateEvent = -1; + wxTheApp->SetActive(activate); + wxActivateEvent event(wxEVT_ACTIVATE, activate, GetId()); event.SetEventObject(this); diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 985da80c45..2fe2770315 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -249,6 +249,7 @@ wxApp::wxApp() m_topWindow = (wxWindow *) NULL; m_exitOnFrameDelete = TRUE; + m_isActive = TRUE; m_idleTag = gtk_idle_add_priority( 1000, wxapp_idle_callback, (gpointer) NULL ); @@ -469,6 +470,11 @@ void wxApp::Dispatch() gtk_main_iteration(); } +bool wxApp::IsActive() const +{ + return m_isActive; +} + void wxApp::DeletePendingObjects() { wxNode *node = wxPendingDelete.First(); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index ff9c0e8e08..6e3e21bc0b 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2569,6 +2569,8 @@ void wxWindow::OnInternalIdle() // do it only once g_sendActivateEvent = -1; + wxTheApp->SetActive(activate); + wxActivateEvent event(wxEVT_ACTIVATE, activate, GetId()); event.SetEventObject(this); diff --git a/src/univ/button.cpp b/src/univ/button.cpp index 1b9db532eb..ed196e30a4 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -30,7 +30,7 @@ #if wxUSE_STATTEXT #ifndef WX_PRECOMP - #include "wx/dc.h" + #include "wx/dcclient.h" #include "wx/button.h" #include "wx/validate.h" #endif diff --git a/src/univ/control.cpp b/src/univ/control.cpp index 2a020b6a10..9a67468242 100644 --- a/src/univ/control.cpp +++ b/src/univ/control.cpp @@ -31,6 +31,7 @@ #ifndef WX_PRECOMP #include "wx/control.h" + #include "wx/dcclient.h" #endif #include "wx/univ/renderer.h" diff --git a/src/univ/files.lst b/src/univ/files.lst index 2de9af461a..1e6c3e7cf7 100644 --- a/src/univ/files.lst +++ b/src/univ/files.lst @@ -1,6 +1,10 @@ -UNIVOBJS = winuniv.o \ +UNIVOBJS = \ + button.o \ control.o \ + renderer.o \ + statbox.o \ stattext.o \ - theme.o + theme.o \ + win32.o -# themes/win32.cpp +# winuniv.o diff --git a/src/univ/renderer.cpp b/src/univ/renderer.cpp index b7ce110d10..014742fe37 100644 --- a/src/univ/renderer.cpp +++ b/src/univ/renderer.cpp @@ -29,6 +29,9 @@ #endif #ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/control.h" + #include "wx/dc.h" #endif // WX_PRECOMP #include "wx/univ/renderer.h" diff --git a/src/univ/stattext.cpp b/src/univ/stattext.cpp index 003c654e15..ee40d60f47 100644 --- a/src/univ/stattext.cpp +++ b/src/univ/stattext.cpp @@ -30,7 +30,7 @@ #if wxUSE_STATTEXT #ifndef WX_PRECOMP - #include "wx/dc.h" + #include "wx/dcclient.h" #include "wx/stattext.h" #include "wx/validate.h" #endif diff --git a/src/univ/theme.cpp b/src/univ/theme.cpp index 5ef926ff66..6f165fccdc 100644 --- a/src/univ/theme.cpp +++ b/src/univ/theme.cpp @@ -29,6 +29,8 @@ #endif #ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" #endif // WX_PRECOMP #include "wx/univ/renderer.h" @@ -48,7 +50,7 @@ wxTheme *wxTheme::ms_theme = (wxTheme *)NULL; wxTheme::wxThemeInfo::wxThemeInfo(wxTheme::Constructor c, const wxChar *n, const wxChar *d) - : ctor(c), name(n), desc(d) + : name(n), desc(d), ctor(c) { // insert us (in the head of) the linked list next = ms_allThemes; diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 3e45374dc4..5aaa259b70 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -26,6 +26,7 @@ #ifndef WX_PRECOMP #include "wx/intl.h" + #include "wx/button.h" #include "wx/dc.h" #include "wx/window.h" #endif // WX_PRECOMP