From 648955779bb9d2e76ebd984d055ca5df02d6bef5 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 19 Sep 2007 13:39:45 +0000 Subject: [PATCH] Updated readme and manual version and date Some clarifications of wxBORDER_THEME Don't use wxBORDER_DOUBLE in GTK+/Univ git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/manual.tex | 2 +- docs/latex/wx/wxmsw.tex | 9 +++++---- docs/readme.txt | 4 ++-- src/gtk/window.cpp | 7 +++++-- src/univ/stdrend.cpp | 5 ++++- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/docs/latex/wx/manual.tex b/docs/latex/wx/manual.tex index cdceb2dee0..0e1033c94d 100644 --- a/docs/latex/wx/manual.tex +++ b/docs/latex/wx/manual.tex @@ -32,7 +32,7 @@ }} \winhelpignore{\author{Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al} -\date{August, 2007} +\date{September, 2007} } \makeindex \begin{document} diff --git a/docs/latex/wx/wxmsw.tex b/docs/latex/wx/wxmsw.tex index fd4a2c0bd5..3ccd67cb63 100644 --- a/docs/latex/wx/wxmsw.tex +++ b/docs/latex/wx/wxmsw.tex @@ -37,9 +37,10 @@ sunken border. Other native controls such as wxTextCtrl in non-rich edit mode, a already paint themed borders where appropriate. To use themed borders on other windows, such as wxPanel, pass the wxBORDER\_THEME style. -Note that in wxWidgets 2.9 and above, wxBORDER\_THEME is defined to be 0 and it is not necessary -to pass the border style explicitly: wxWidgets will deduce the correct border style itself if there -is none supplied. Because of the requirements of binary compatibility, this automatic border +Note that in wxWidgets 2.9 and above, wxBORDER\_THEME will be used on all platforms to +indicate that there should definitely be a border, whose style is determined by wxWidgets for the current platform. +wxWidgets 2.9 and above will also be better at determining whether there should be a themed border +Because of the requirements of binary compatibility, this automatic border capability could not be put into wxWidgets 2.8 except for built-in, native controls. In 2.8, the border must be specified for custom controls and windows. However, to make it easier to decide what style should be passed, you can use (on Windows only) the function wxWindow::GetThemedBorderStyle() @@ -48,7 +49,7 @@ wxBORDER\_SIMPLE will be returned; on Windows 95/98/NT/2K, wxBORDER\_SUNKEN will returned, and on XP and above where theming is turned on, wxBORDER\_THEME will be returned. This function does not exist in wxWidgets 2.9 and is not part of the official API. -wxBORDER\_THEME has no effect on platforms other than Windows. +In 2.8, wxBORDER\_THEME is normally interpreted as a wxBORDER\_SUNKEN on platforms other than Windows. \subsection{wxWinCE}\label{wxwince} diff --git a/docs/readme.txt b/docs/readme.txt index d50113956e..d27a80d8bd 100644 --- a/docs/readme.txt +++ b/docs/readme.txt @@ -1,4 +1,4 @@ -wxWidgets 2.8.6 +wxWidgets 2.8.6 --------------------------------------------------------- Welcome to wxWidgets, a sophisticated cross-platform C++ @@ -153,5 +153,5 @@ web site. Have fun! -The wxWidgets Team, August 2007 +The wxWidgets Team, September 2007 diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 4b8a940efc..46b029edee 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -988,7 +988,7 @@ gtk_window_key_press_callback( GtkWidget *widget, return FALSE; if (g_blockEventsOnDrag) return FALSE; - + // GTK+ sends keypress events to the focus widget and then // to all its parent and grandparent widget. We only want // the key events from the focus widget. @@ -3182,7 +3182,7 @@ bool wxWindowGTK::GTKSetDelayedFocusIfNeeded() void wxWindowGTK::SetFocus() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - + if ( m_hasFocus ) { // don't do anything if we already have focus @@ -4297,8 +4297,11 @@ void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle) gtkstyle = GTK_SHADOW_OUT; else if (wxstyle & wxBORDER_SUNKEN) gtkstyle = GTK_SHADOW_IN; + // wxBORDER_DOUBLE is no longer supported since wxBORDER_THEME takes on the same value +#if 0 else if (wxstyle & wxBORDER_DOUBLE) gtkstyle = GTK_SHADOW_ETCHED_IN; +#endif else //default gtkstyle = GTK_SHADOW_IN; diff --git a/src/univ/stdrend.cpp b/src/univ/stdrend.cpp index ea50847d70..e3915bbf51 100644 --- a/src/univ/stdrend.cpp +++ b/src/univ/stdrend.cpp @@ -412,15 +412,18 @@ void wxStdRenderer::DrawBorder(wxDC& dc, switch ( border ) { + case wxBORDER_THEME: case wxBORDER_SUNKEN: DrawSunkenBorder(dc, &rect); break; + // wxBORDER_DOUBLE is no longer supported since wxBORDER_THEME takes on the same value +#if 0 case wxBORDER_DOUBLE: DrawAntiSunkenBorder(dc, &rect); DrawExtraBorder(dc, &rect); break; - +#endif case wxBORDER_STATIC: DrawStaticBorder(dc, &rect); break;