wxDataViewCtrl and wxDataViewTreeCtrl: this
@@ -310,7 +310,7 @@ cases, supporting an old version of GTK+ hinders development so we
decided to declare GTK+ 2.6 the minimum toolkit version that is
supported. As an example, this made it possible to always use the
GTK+ file dialog instead of the old generic file dialog which had to
-be used when GTK+ didn't have a usable file dialog.
+be used when GTK+ didn't have a usable file dialog.
Other parts of wxGTK that
were rewritten or which underwent a major update include, but are not
diff --git a/docs/publicity/announce.txt b/docs/publicity/announce.txt
index 5434c56687..cedfcfdb85 100644
--- a/docs/publicity/announce.txt
+++ b/docs/publicity/announce.txt
@@ -1,39 +1,44 @@
-February 19, 2018 -- The wxWidgets team is pleased to announce a new
+December 10, 2018 -- The wxWidgets team is pleased to announce a new
release of our open source framework for the development of native
cross-platform applications in C++.
-wxWidgets 3.1.1 is the second release in the 3.1 development
+wxWidgets 3.1.2 is the latest release in the 3.1 development
branch and is now available at
- https://github.com/wxWidgets/wxWidgets/releases/tag/v3.1.1
+ https://github.com/wxWidgets/wxWidgets/releases/tag/v3.1.2
Compared to the stable 3.0.x series, this version brings many
improvements and even more bug fixes, please see the change log
-https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.1.1/docs/changes.txt
+https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.1.2/docs/changes.txt
for the incomplete list of the most important ones. Here is the
maximally condensed summary of the changes compared to 3.0:
+- Build system improvements: support for new compilers (MSVS 2017, g++ 8) and
+ OS versions (macOS 10.14 and its dark mode) as well as an entirely new CMake
+ build system.
- New features: support for mouse gesture events (GSoC 2017 project);
- fractional pen widths in wxGraphicsContext; arbitrary label windows in
- wxStaticBox; markup in wxDataViewCtrl items text; better support for high DPI
- monitors; support for ZIP 64 files; much improved accessibility support under
+ non-integer font sizes and arbitrary font weights in wxFont; fractional pen
+ widths in wxGraphicsContext; arbitrary label windows in wxStaticBox; markup
+ in wxDataViewCtrl items text; better support for high DPI monitors; support
+ for ZIP 64 files; LZMA compression; much improved accessibility support under
MSW.
- New classes: wxActivityIndicator, wxAddRemoveCtrl,
wxAppProgressIndicator, wxNativeWindow, wxPowerResourceBlocker,
wxSecretStore.
-- And methods: wxDateTime::GetWeekBasedYear(), wxListBox::GetTopItem(),
- wxProcess::Activate(), wxTextEntry::ForceUpper(), several ones in
- wxRendererNative, wxStandardPaths::GetUserDir(), wxUIActionSimulator
- ::Select() and many others.
-- Significant improvements to: wxBusyInfo, wxNotificationMessage.
+- And methods: wxDataViewToggleRenderer::ShowAsRadio(), wxDateTime::
+ GetWeekBasedYear(), wxDisplay::GetPPI(), wxGrid::SetCornerLabelValue(),
+ wxHtmlEasyPrinting::SetPromptMode(), wxJoystickEvent::GetButtonOrdinal(),
+ wxListBox::GetTopItem(), wxProcess::Activate(), wxTextEntry::ForceUpper(),
+ several ones in wxRendererNative, wxStandardPaths::GetUserDir(),
+ wxToolbook::EnablePage(), wxUIActionSimulator::Select() and many others.
+- Significant improvements to: wxBusyInfo, wxDataViewCtrl,
+ wxNotificationMessage, wxStaticBox, wxStyledTextCtrl.
- Latest versions of all bundled 3rd party libraries, including all the
security fixed and support for WebKit 2 and GStreamer 1.7 under Unix.
- Revamped OpenGL support better suited to modern OpenGL (3.2+).
- Further C++11 support improvements.
-- New CMake-based alternative build system.
-- Support for latest compilers: MSVS 2017, g++ 7, clang 6.
- A lot of bug fixes, especially in wxGTK3 and wxOSX/Cocoa ports.
- New experimental wxQt port.
@@ -42,8 +47,8 @@ This release is a "development" one as it makes (very few)
incompatible API changes compared to 3.0 and does not guarantee the
ABI stability, unlike the 3.0.x series. It is not inherently more
buggy or less stable than the "stable" releases and you're encouraged
-to use it. If you're already using 3.0, upgrading shouldn't require
-any special effort, so please try it out.
+to use it, including in production. If you're already using 3.0, upgrading
+shouldn't require any special effort, so please try it out.
We hope that you will enjoy using the new release!
diff --git a/docs/publicity/slogans.txt b/docs/publicity/slogans.txt
index 19c7263c24..a7eef61e6a 100644
--- a/docs/publicity/slogans.txt
+++ b/docs/publicity/slogans.txt
@@ -73,7 +73,7 @@ maybe stripped down to
"Specialization is for insects."
============================
-The Open-Source, Cross-Platform GUI Framework
+The Open-Source, Cross-Platform GUI Framework
with Ten Years of Evolution Behind It
I saw this changed to 'native UI' on the website, which is slightly more
@@ -81,17 +81,17 @@ accurate but sounds less 'catchy' imho.
.. and templates.
-Hmm. I might buy a mug that had, say, a wxLogo and "wxWidgets" (and
-maybe the website URL underneath in smaller type) on one side and
+Hmm. I might buy a mug that had, say, a wxLogo and "wxWidgets" (and
+maybe the website URL underneath in smaller type) on one side and
"Specialization is for insects ... and templates" on the other.
-.. only if it held at leat a full half (imperial) pint, mind. Not
+.. only if it held at leat a full half (imperial) pint, mind. Not
one of those wussy 8.5 fl.oz. jobbies.
-That'd be a nice ice-breaker when working at a new client's site -
+That'd be a nice ice-breaker when working at a new client's site -
people would be bound to stop and ask what it was all about!
-.. and how about a nice silk tie (US: necktie) with the logo on ...
+.. and how about a nice silk tie (US: necktie) with the logo on ...
Oh, I forgot, we programmers don't wear ties.
============================
@@ -149,7 +149,7 @@ One API to bridge them all and in the compiler bind them.
wxWidgets
-How about "and in the linker bind them"? That's where the local libraries
+How about "and in the linker bind them"? That's where the local libraries
get bound to the wxWidgets code anyway.
============================
@@ -162,7 +162,7 @@ Hugh Gibson wrote:
> window control in different operating systems to emphasise the
> native look and feel.
-Nice idea. But I wonder where you'll find some volunteer willing to
+Nice idea. But I wonder where you'll find some volunteer willing to
have his face tattooed with win32 common controls ;-)
============================
diff --git a/docs/readme.txt b/docs/readme.txt
index 6caebb7e9a..a831d5a500 100644
--- a/docs/readme.txt
+++ b/docs/readme.txt
@@ -1,4 +1,4 @@
-wxWidgets 3.1.2 Release Notes
+wxWidgets 3.1.3 Release Notes
=============================
Welcome to the latest development release of wxWidgets, a free and open source
@@ -16,61 +16,33 @@ more about wxWidgets at:
Documentation is available online at:
-* https://docs.wxwidgets.org/3.1.2/
+* https://docs.wxwidgets.org/3.1.3/
wxWidgets sources and binaries for the selected platforms are available for
download from:
-* https://github.com/wxWidgets/wxWidgets/releases/tag/v3.1.2/
+* https://github.com/wxWidgets/wxWidgets/releases/tag/v3.1.3/
-Changes since 3.1.0
+Changes since 3.1.2
-------------------
-There have been more than 2800 commits from more than 160 contributors (79 with
-multiple contributions) since 3.1.0 release. New features added since then
-include:
+TODO: Fill in
-- Support for gesture events has been added (GSoC 2017 project).
-- wxWebView can now return JavaScript results to the C++ code (GSoC 2017).
-- New wxSecretStore class for securely storing user passwords.
-
-Some of the other improvements:
-
-- wxWidgets can now be built with CMake too.
-- Strings can now be translated differently depending on their context.
-- Converting between wxString and UTF-8 encoded std::string is now
- simpler and unsafe wxString can now be disabled on the opt-in basis
- (see http://wxwidgets.blogspot.com/2017/02/safer-s.html)
-- It is possible to use any window (e.g. wxCheckBox) as wxStaticBox label now.
-- Many improvements to accessibility support under MSW.
-- wxGraphicsContext now supports pens with fractional widths.
-- Support for XDG file layout under Unix.
-- Many bug fixes to the behaviour (including TAB navigation) and appearances,
- especially in wxGTK3 and wxOSX ports.
-- wxDataViewCtrl items and headers can be formatted using simple markup
- and it is simpler to combine to put items with checkboxes into it. Many bugs
- and inconsistencies between platforms in this control have been fixed too.
-- Several enhancements to wxStyledTextCtrl including better support for
- custom lexers and auto-completion.
-- Many improvements to the (still experimental) wxQt port.
-
-Additionally, the latest versions of compilers (e.g. MSVS 2017) and
-operating systems (macOS 10.12) are now supported and all the third
-party libraries have been updated to their latest versions.
-
-Please refer to the detailed change log for the full list of changes:
-
-https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.1.2/docs/changes.txt
+Notice that this release is almost completely compatible with 3.1.2 at the API
+level, so upgrading to it if you're already using wxWidgets 3 should be
+straightforward.
Changes since 3.0
-----------------
Compared to the stable 3.0.x series, this version brings too many
-improvements and even more bug fixes to list them them all. Here is the
+improvements and even more bug fixes to list them all, but here is the
maximally condensed summary:
+- Build system improvements: support for new compilers (MSVS 2017, g++ 8) and
+ OS versions as well as an entirely new CMake build system.
- New features: support for mouse gesture events (GSoC 2017 project);
fractional pen widths in wxGraphicsContext; arbitrary label windows in
wxStaticBox; markup in wxDataViewCtrl items text; better support for high DPI
@@ -83,13 +55,12 @@ maximally condensed summary:
wxProcess::Activate(), wxTextEntry::ForceUpper(), several ones in
wxRendererNative, wxStandardPaths::GetUserDir(), wxUIActionSimulator
::Select() and many others.
-- Significant improvements to: wxBusyInfo, wxNotificationMessage.
+- Significant improvements to: wxBusyInfo, wxDataViewCtrl,
+ wxNotificationMessage, wxStaticBox, wxStyledTextCtrl.
- Latest versions of all bundled 3rd party libraries, including all the
security fixed and support for WebKit 2 and GStreamer 1.7 under Unix.
- Revamped OpenGL support better suited to modern OpenGL (3.2+).
- Further C++11 support improvements.
-- New CMake-based alternative build system.
-- Support for latest compilers: MSVS 2017, g++ 7, clang 6.
- A lot of bug fixes, especially in wxGTK3 and wxOSX/Cocoa ports.
- New experimental wxQt port.
@@ -98,7 +69,7 @@ maximally condensed summary:
Platforms Supported
-------------------
-wxWidgets currently supports the following primary platforms:
+This version of wxWidgets supports the following primary platforms:
* Windows XP, Vista, 7, 8 and 10 (32/64 bits).
* Most Unix variants using the GTK+ toolkit (version 2.6 or newer)
@@ -140,8 +111,10 @@ Installation
Unless you have downloaded the binaries for your compiler, you will need to
build wxWidgets before you can test out the samples or write your own
-applications. For installation information, please see the install.txt file in
-the docs subdirectory appropriate for the platform you use.
+applications. For installation information, please see the install.md files in
+the docs subdirectory appropriate for the platform you use or the "Platform
+Details" page of the manual, which contains links to the rendered versions of
+these files.
Licence
@@ -200,7 +173,7 @@ problems so this ensures that your report will be addressed sooner.
Further Information
-------------------
-If you are looking for support, you can get it from
+If you are looking for community support, you can get it from
* Mailing Lists: https://www.wxwidgets.org/support/mailing-lists/
* Discussion Forums: https://forums.wxwidgets.org/
@@ -208,6 +181,13 @@ If you are looking for support, you can get it from
* Stack Overflow (tag your questions with "wxwidgets"):
https://stackoverflow.com/questions/tagged/wxwidgets
+Commercial support is also available, please see
+https://www.wxwidgets.org/support/commercial/
+
+Finally, keep in mind that wxWidgets is an open source project collaboratively
+developed by its users and your contributions to it are always welcome!
+
+
Have fun!
-The wxWidgets Team, February 2018
+The wxWidgets Team, December 2018
diff --git a/docs/release.md b/docs/release.md
index 4856571a66..82b9958762 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -1,102 +1,105 @@
Welcome to wxWidgets, a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.
-wxWidgets 3.1.1 is the second release in the 3.1 development branch. This release is a "development" one as it makes (very few) incompatible API changes compared to 3.0 and does not guarantee the ABI stability, unlike the 3.0.x series. It is not inherently more buggy or less stable than the "stable" releases and you're encouraged to use it. If you're already using 3.0, upgrading shouldn't require any special effort, so please try it out.
+wxWidgets 3.1.2 is the latest release in the 3.1 development branch. This release is a "development" one as it makes (very few) incompatible API changes compared to 3.0 and does not guarantee the ABI stability, unlike the 3.0.x series. It is not inherently more buggy or less stable than the "stable" releases and you're encouraged to use it, including in production. If you're already using 3.0, upgrading shouldn't require any special effort, so please try it out.
-Please see [**README**](https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.1.1/docs/readme.txt) for more information about this release and the [change log](https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.1.1/docs/changes.txt) for details of the changes in it.
+Please see [**README**](https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.1.2/docs/readme.txt) for more information about this release and the [change log](https://raw.githubusercontent.com/wxWidgets/wxWidgets/v3.1.2/docs/changes.txt) for the details of the changes in it.
## Source Files and Documentation
If you intend to build wxWidgets from sources (which is recommended), please do **NOT** download the files using the "Source code" links just above, which are automatically generated by GitHub and don't contain the submodules sources which are necessary for building wxWidgets.
-Instead, download one of [wxWidgets-3.1.1.zip](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxWidgets-3.1.1.zip) or [wxWidgets-3.1.1.7z](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxWidgets-3.1.1.7z), for much smaller size, for Microsoft Windows systems or [wxWidgets-3.1.1.tar.bz2](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxWidgets-3.1.1.tar.bz2) for Unix ones, including macOS. These archives have exactly the same contents, but use the line endings appropriate for the corresponding platform.
+Instead, download one of [wxWidgets-3.1.2.zip](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.zip) or [wxWidgets-3.1.2.7z](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.7z), for much smaller size, for Microsoft Windows systems or [wxWidgets-3.1.2.tar.bz2](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.tar.bz2) for Unix ones, including macOS. These archives have exactly the same contents, but use the line endings appropriate for the corresponding platform.
-In addition, we provide archives containing the documentation in either HTML or Microsoft CHM formats. Notice that the documentation is also [available online](https://docs.wxwidgets.org/3.1).
+In addition, we provide archives containing the documentation in either HTML or Microsoft CHM formats. Notice that the documentation is also [available online](https://docs.wxwidgets.org/3.1.2).
-Finally, Microsoft Windows users may download [Setup.exe file](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxMSW-3.1.1-Setup.exe) containing both sources and documentation, however please note that this file does _not_ contain any binaries, please see below for those.
+Finally, Microsoft Windows users may download [Setup.exe file](https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxMSW-3.1.2-Setup.exe) containing both sources and documentation, however please note that this file does _not_ contain any binaries, please see below for those.
To verify your download please use the following SHA-1 checksums:
- 0000000000000000000000000000000000000000 wxMSW-3.1.1-Setup.exe
- 0000000000000000000000000000000000000000 wxWidgets-3.1.1-docs-chm.zip
- 0000000000000000000000000000000000000000 wxWidgets-3.1.1-docs-html.tar.bz2
- 0000000000000000000000000000000000000000 wxWidgets-3.1.1-docs-html.zip
- 0000000000000000000000000000000000000000 wxWidgets-3.1.1-headers.7z
- 0000000000000000000000000000000000000000 wxWidgets-3.1.1.7z
- 0000000000000000000000000000000000000000 wxWidgets-3.1.1.tar.bz2
- 0000000000000000000000000000000000000000 wxWidgets-3.1.1.zip
+ 85ac5b18de191d9d5504b7106466b21b64e7249d wxMSW-3.1.2-Setup.exe
+ 40a1469a13023f12a56bcbcfec2c1172fe1b86d6 wxWidgets-3.1.2-docs-chm.zip
+ 393f6bca6c5c4fc178a9312fae5bddc04233b7bb wxWidgets-3.1.2-docs-html.tar.bz2
+ e51475ec38628b7080af01963bbf43f2151121c8 wxWidgets-3.1.2-docs-html.zip
+ e6335af2fc8c9058d442bbb7ef456c3c5594e7fe wxWidgets-3.1.2-headers.7z
+ 0737ccc29f8d625496e425cb7d0ff8207343609b wxWidgets-3.1.2.7z
+ 29cbbba946d2a7b4d28ca1db12315810cc8de74d wxWidgets-3.1.2.tar.bz2
+ ec7114242f2df2706bb90bd76fa3b79f83f1b05d wxWidgets-3.1.2.zip
## Binaries
We provide pre-built binary files for the following compilers:
* Microsoft Visual C++ compiler versions 9.0, 10.0, 11.0, 12.0, 14.0 and 14.1 (corresponding to marketing product names of Microsoft Visual Studio 2008, 2010, 2012, 2013, 2015 and 2017 respectively).
-* TDM-GCC version 5.1 and MinGW-w64 version 7.2 (with the default SJLJ exceptions propagation method, using C++11). Please note that you need to use the very latest MinGW-w64 7.2 compiler release with this version of the compiler which can be downloaded from [here for 32 bits](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/7.2.0/threads-win32/sjlj/i686-7.2.0-release-win32-sjlj-rt_v5-rev1.7z/download) and [here for 64 bits](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.2.0/threads-win32/seh/x86_64-7.2.0-release-win32-seh-rt_v5-rev1.7z/download), the older "rev0" release has a known bug affecting building wxWidgets in some scenarios.
+* TDM-GCC version 5.1 and MinGW-w64 versions 7.3 and 8.1 (with the default SJLJ exceptions propagation method, using C++11).
### For Developers
-For developing applications with wxWidgets you need to download the compiler-independent `wxWidgets-3.1.1_Headers.7z` file and one of `wxMSW-3.1.1-vcXXX_Dev.7z` or `wxMSW-3.1.1_gccXXX_Dev.7z` files depending on your compiler, its version and the target architecture (x86 if not specified or x64).
+For developing applications with wxWidgets you need to download the compiler-independent `wxWidgets-3.1.2_Headers.7z` file and one of `wxMSW-3.1.2-vcXXX_Dev.7z` or `wxMSW-3.1.2_gccXXX_Dev.7z` files depending on your compiler, its version and the target architecture (x86 if not specified or x64).
Unpack both files into the same directory so that `include` and `lib` directories are at the same level after unpacking. You should be able to compile and link applications using wxWidgets in both debug and release modes but the debug symbols are provided only for debug libraries in this archive, see below for the release build debug symbols.
### For End Users
-End users may download one of `wxMSW-3.1.1_vcXXX_ReleaseDLL.7z` or `wxMSW-3.1.1_gccXXX_ReleaseDLL.7z` files to get just the DLLs required for running the applications using wxWidgets.
+End users may download one of `wxMSW-3.1.2_vcXXX_ReleaseDLL.7z` or `wxMSW-3.1.2_gccXXX_ReleaseDLL.7z` files to get just the DLLs required for running the applications using wxWidgets.
### For Debugging
-* Microsoft Visual C++ users: Files `wxMSW-3.1.1_vcXXX_ReleasePDB.7z` contain the debug symbols for the release build of the DLLs. Download them if you want to debug your own applications in release build or if you want to get meaningful information from mini-dumps retrieved from your users machines.
-* MinGW-TDM users: Currently the debug symbols are not available for the release build of the DLLs (only the debug versions of the DLLs contains the debug
- symbols).
+* Microsoft Visual C++ users: Files `wxMSW-3.1.2_vcXXX_ReleasePDB.7z` contain the debug symbols for the release build of the DLLs. Download them if you want to debug your own applications in release build or if you want to get meaningful information from mini-dumps retrieved from your users machines.
+* MinGW-TDM users: Currently the debug symbols are not available for the release build of the DLLs (only the debug versions of the DLLs contains the debug symbols).
### Binary File Download Verification
To verify your download please use the following SHA-1 checksums:
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc510TDM_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc510TDM_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc510TDM_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc510TDM_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc720_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc720_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc720_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_gcc720_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc90_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc90_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc90_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc90_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc90_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc90_x64_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc100_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc100_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc100_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc100_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc100_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc100_x64_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc110_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc110_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc110_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc110_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc110_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc110_x64_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc120_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc120_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc120_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc120_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc120_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc120_x64_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc140_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc140_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc140_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc140_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc140_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc140_x64_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc141_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc141_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc141_ReleasePDB.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc141_x64_Dev.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc141_x64_ReleaseDLL.7z
- 0000000000000000000000000000000000000000 wxMSW-3.1.1_vc141_x64_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc510TDM_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc510TDM_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc510TDM_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc510TDM_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc730_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc730_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc730_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc730_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc810_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc810_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc810_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_gcc810_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc90_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc90_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc90_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc90_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc90_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc90_x64_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc100_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc100_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc100_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc100_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc100_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc100_x64_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc110_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc110_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc110_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc110_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc110_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc110_x64_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc120_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc120_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc120_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc120_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc120_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc120_x64_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc140_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc140_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc140_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc140_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc140_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc140_x64_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc141_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc141_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc141_ReleasePDB.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc141_x64_Dev.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc141_x64_ReleaseDLL.7z
+ 0000000000000000000000000000000000000000 wxMSW-3.1.2_vc141_x64_ReleasePDB.7z
## Reporting Problems
diff --git a/docs/vms/readme.txt b/docs/vms/readme.txt
index 8aeb8c9d0b..e403857dc7 100644
--- a/docs/vms/readme.txt
+++ b/docs/vms/readme.txt
@@ -7,7 +7,7 @@ The compilation was tested with
-Compaq C++ 6.2
-DECWindows 1.2-5
-GTK1.2.8 (for wxGTK)
-
+
To get everything compiled you'll need to have installed prior to compiling
wxWidgets:
-Bison
@@ -19,7 +19,7 @@ wxWidgets:
#define alloca malloc
before
#endif /* __hpux */
-
+
-Flex
get it from http://www.openvms.digital.com/freeware/
@@ -119,7 +119,7 @@ $ ass $disk2:[joukj.public.gtk.gtk.glib],-
-I think in general wxGTK is better maintained, so that version is my
first choice.
-
+
-Note that only a few people have used wxWidgets on VMS so many problems are
to be expected.
@@ -147,7 +147,7 @@ $ ass $disk2:[joukj.public.gtk.gtk.glib],-
again.
-image sample: after clicking "about" the colourmap is permanently
changed resulting in strange images
-
+
Finally :
I like the idea of Robert Roebling that CD's with classical music should be
send to the authors.
@@ -156,7 +156,7 @@ send to the authors.
>-----------------------------------------------------------------------------<
Jouk Jansen
-
+
joukj@hrem.stm.tudelft.nl
diff --git a/docs/wine/COPYING.LIB b/docs/wine/COPYING.LIB
index eb685a5ec9..bbe3fe1987 100644
--- a/docs/wine/COPYING.LIB
+++ b/docs/wine/COPYING.LIB
@@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
diff --git a/docs/wine/changes.txt b/docs/wine/changes.txt
index c9d3429da5..1be099a744 100644
--- a/docs/wine/changes.txt
+++ b/docs/wine/changes.txt
@@ -9,4 +9,4 @@ for wxWINE is in place and that all that has to be done to get
wxWINE running is to make WINE work as Win32. No joke intended.
Robert Roebling
-
+
diff --git a/docs/wine/install.txt b/docs/wine/install.txt
index 9a5cd5da1a..e6e3d3311b 100644
--- a/docs/wine/install.txt
+++ b/docs/wine/install.txt
@@ -2,7 +2,7 @@
* The most simple case
-----------------------
-If you compile wxWidgets on Linux for the first time and don't like to read
+If you compile wxWidgets on Linux for the first time and don't like to read
install instructions just do (in the base dir):
> ./configure --with-wine
@@ -12,8 +12,8 @@ install instructions just do (in the base dir):
> ldconfig
> exit
-On all variants of Unix except Linux (and maybe except *BSD), shared libraries
-are not supported out of the box due to the utter stupidity of libtool, so you'll
+On all variants of Unix except Linux (and maybe except *BSD), shared libraries
+are not supported out of the box due to the utter stupidity of libtool, so you'll
have to do this to get shared library support:
> ./configure --with-wine --disable-unicode --disable-static --enable-shared
@@ -23,12 +23,12 @@ important entries with respect to shared library creation, which are
archive_cmds="\$LD -shared ....
archive_expsym_cmds="\$LD -shared ....
-
+
which should be something like
archive_cmds="\$CC -shared ....
archive_expsym_cmds="\$CC -shared ....
-
+
Afterwards you can continue with
> make
@@ -47,14 +47,14 @@ If you want to remove wxWidgets on Unix you can do this:
* The expert case
-----------------
-If you want to do some more serious cross-platform programming with wxWidgets,
-such as for GTK and Motif, you can now build two complete libraries and use
-them concurrently. For this end, you have to create a directory for each build
+If you want to do some more serious cross-platform programming with wxWidgets,
+such as for GTK and Motif, you can now build two complete libraries and use
+them concurrently. For this end, you have to create a directory for each build
of wxWidgets - you may also want to create different versions of wxWidgets
-and test them concurrently. Most typically, this would be a version configured
-with --enable-debug_flag and one without. Note, that only one build can currently
+and test them concurrently. Most typically, this would be a version configured
+with --enable-debug_flag and one without. Note, that only one build can currently
be installed, so you'd have to use local version of the library for that purpose.
-For building three versions (one GTK, one WINE and a debug version of the WINE
+For building three versions (one GTK, one WINE and a debug version of the WINE
source) you'd do this:
md buildmotif
@@ -78,18 +78,18 @@ cd ..
* The most simple errors
------------------------
-wxWINE doesn't work yet as WINE isn't really up to the task yet.
+wxWINE doesn't work yet as WINE isn't really up to the task yet.
-You get errors during compilation: The reason is that you probably have a broken
-compiler, which includes almost everything that is called gcc. If you use gcc 2.8
-you have to disable optimisation as the compiler will give up with an internal
+You get errors during compilation: The reason is that you probably have a broken
+compiler, which includes almost everything that is called gcc. If you use gcc 2.8
+you have to disable optimisation as the compiler will give up with an internal
compiler error.
If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
-You get immediate segfault when starting any sample or application: This is either
-due to having compiled the library with different flags or options than your program -
-typically you might have the __WXDEBUG__ option set for the library but not for your
+You get immediate segfault when starting any sample or application: This is either
+due to having compiled the library with different flags or options than your program -
+typically you might have the __WXDEBUG__ option set for the library but not for your
program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
* The most simple program
@@ -102,27 +102,27 @@ g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
* General
-----------------------
-The Unix variants of wxWidgets use GNU configure. If you have problems with your
+The Unix variants of wxWidgets use GNU configure. If you have problems with your
make use GNU make instead.
-If you have general problems with installation, read my homepage at
+If you have general problems with installation, read my homepage at
http://wesley.informatik.uni-freiburg.de/~wxxt
-
-for newest information. If you still don't have any success, please send a bug
-report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
-YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION
+
+for newest information. If you still don't have any success, please send a bug
+report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
+YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION
YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
* GUI libraries
-----------------------
-wxWidgets/WINE requires the WINE library to be installed on your system.
+wxWidgets/WINE requires the WINE library to be installed on your system.
You can get the newest version of the WINE from the WINE homepage at:
http://www.winehq.com
-
+
* Create your configuration
-----------------------------
@@ -141,16 +141,16 @@ to see all the options please use:
./configure --help
The basic philosophy is that if you want to use different
-configurations, like a debug and a release version,
+configurations, like a debug and a release version,
or use the same source tree on different systems,
you have only to change the environment variable OSTYPE.
(Sadly this variable is not set by default on some systems
-in some shells - on SGI's for example). So you will have to
-set it there. This variable HAS to be set before starting
-configure, so that it knows which system it tries to
+in some shells - on SGI's for example). So you will have to
+set it there. This variable HAS to be set before starting
+configure, so that it knows which system it tries to
configure for.
-Configure will complain if the system variable OSTYPE has
+Configure will complain if the system variable OSTYPE has
not been defined. And Make in some circumstances as well...
@@ -167,7 +167,7 @@ in wxWidgets snapshot 6, but not yet all (ODBC not).
You must do this by running configure with either of:
--with-wine Use the WINE library
-
+
The following options handle the kind of library you want to build.
--enable-threads Compile with thread support. Threads
@@ -182,25 +182,25 @@ The following options handle the kind of library you want to build.
such as Sun with gcc 2.8.X which
would otherwise produce segvs.
- --enable-profile Add profiling info to the object
+ --enable-profile Add profiling info to the object
files. Currently broken, I think.
-
+
--enable-no_rtti Enable compilation without creation of
- C++ RTTI information in object files.
- This will speed-up compilation and reduce
+ C++ RTTI information in object files.
+ This will speed-up compilation and reduce
binary size.
-
+
--enable-no_exceptions Enable compilation without creation of
- C++ exception information in object files.
- This will speed-up compilation and reduce
+ C++ exception information in object files.
+ This will speed-up compilation and reduce
binary size. Also fewer crashes during the
actual compilation...
-
- --enable-mem_tracing Add built-in memory tracing.
-
+
+ --enable-mem_tracing Add built-in memory tracing.
+
--enable-dmalloc Use the dmalloc memory debugger.
Read more at www.letters.com/dmalloc/
-
+
--enable-debug_info Add debug info to object files and
executables for use with debuggers
such as gdb (or its many frontends).
@@ -210,7 +210,7 @@ The following options handle the kind of library you want to build.
useful internal debugging tricks (such
as automatically reporting illegal calls)
to work. Note that program and library
- must be compiled with the same debug
+ must be compiled with the same debug
options.
* Feature Options
@@ -221,42 +221,42 @@ in wxWidgets snapshot 6, but not yet all (ODBC not).
When producing an executable that is linked statically with wxGTK
you'll be surprised at its immense size. This can sometimes be
-drastically reduced by removing features from wxWidgets that
+drastically reduced by removing features from wxWidgets that
are not used in your program. The most relevant such features
are
--without-libpng Disables PNG image format code.
-
+
--without-libjpeg Disables JPEG image format code.
-
+
{ --without-odbc Disables ODBC code. Not yet. }
-
+
--disable-resources Disables the use of *.wxr type
resources.
-
+
--disable-threads Disables threads. Will also
disable sockets.
--disable-sockets Disables sockets.
--disable-dnd Disables Drag'n'Drop.
-
+
--disable-clipboard Disables Clipboard.
-
+
--disable-serial Disables object instance serialisation.
-
+
--disable-streams Disables the wxStream classes.
-
+
--disable-file Disables the wxFile class.
-
+
--disable-textfile Disables the wxTextFile class.
-
+
--disable-intl Disables the internationalisation.
-
+
--disable-validators Disables validators.
-
+
--disable-accel Disables accel.
-
+
Apart from disabling certain features you can very often "strip"
the program of its debugging information resulting in a significant
reduction in size.
@@ -267,13 +267,13 @@ reduction in size.
The following must be done in the base directory (e.g. ~/wxGTK
or ~/wxWin or whatever)
-Now the makefiles are created (by configure) and you can compile
+Now the makefiles are created (by configure) and you can compile
the library by typing:
make
make yourself some coffee, as it will take some time. On an old
-386SX possibly two weeks. During compilation, you'll get a few
+386SX possibly two weeks. During compilation, you'll get a few
warning messages depending in your compiler.
If you want to be more selective, you can change into a specific
@@ -284,12 +284,12 @@ Then you may install the library and its header files under
have to log in as root (i.e. run "su" and enter the root
password) and type
- make install
+ make install
You can remove any traces of wxWidgets by typing
make uninstall
-
+
If you want to save disk space by removing unnecessary
object-files:
@@ -316,13 +316,13 @@ minimal: minimal.o
minimal.o: minimal.cpp
$(CXX) `wx-config --cflags` -c minimal.cpp -o minimal.o
-clean:
+clean:
rm -f *.o minimal
This is certain to become the standard way unless we decide
to stick to tmake.
-2) The other way creates a project within the source code
+2) The other way creates a project within the source code
directories of wxWidgets. For this endeavour, you'll need
the usual number of GNU tools, at least
@@ -331,7 +331,7 @@ GNU autoheader version 2.14
GNU autoconf version 2.14
GNU libtool version 1.3
-and quite possibly
+and quite possibly
GNU make
GNU C++
@@ -344,10 +344,10 @@ go ahead yourself :-)
In the hope that it will be useful,
Robert Roebling
-
+
Addition notes by Julian Smart, August 2002
-===========================================
+===========================================
I've fixed some compile errors, and got as far as
compiling wxWINE, but actually linking a sample will take
diff --git a/docs/wine/readme.txt b/docs/wine/readme.txt
index 7d3d8a867d..00a719a36f 100644
--- a/docs/wine/readme.txt
+++ b/docs/wine/readme.txt
@@ -9,15 +9,15 @@ install.txt.
When you run into problems, please read the install.txt and
follow those instructions. If you still don't have any success,
please send a bug report to one of our mailing lists (see
-my homepage) INCLUDING A DESCRIPTION OF YOUR SYSTEM AND
+my homepage) INCLUDING A DESCRIPTION OF YOUR SYSTEM AND
YOUR PROBLEM, SUCH AS YOUR VERSION OF THE WINE SOURCES, WHAT
DISTRIBUTION YOU USE AND WHAT ERROR WAS REPORTED.
-Please send problems concerning installation, feature requests,
-bug reports or comments to the wxWidgets users list. Information
+Please send problems concerning installation, feature requests,
+bug reports or comments to the wxWidgets users list. Information
on how to subscribe is available from my homepage.
-wxWidgets/Wine doesn't come with any guarantee whatsoever. It might
+wxWidgets/Wine doesn't come with any guarantee whatsoever. It might
crash your harddisk or destroy your monitor. It doesn't claim to be
suitable for any special or general purpose.
diff --git a/docs/xserver.txt b/docs/xserver.txt
index c29ee4fbde..3758388f12 100644
--- a/docs/xserver.txt
+++ b/docs/xserver.txt
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/include/msvc/wx/setup.h b/include/msvc/wx/setup.h
index 122b67a3c0..375c70e04b 100644
--- a/include/msvc/wx/setup.h
+++ b/include/msvc/wx/setup.h
@@ -65,8 +65,10 @@
#define wxCOMPILER_PREFIX vc120
#elif _MSC_VER == 1900
#define wxCOMPILER_PREFIX vc140
- #elif _MSC_VER >= 1910 && _MSC_VER < 2000
+ #elif _MSC_VER >= 1910 && _MSC_VER < 1920
#define wxCOMPILER_PREFIX vc141
+ #elif _MSC_VER >= 1920 && _MSC_VER < 2000
+ #define wxCOMPILER_PREFIX vc142
#else
#error "Unknown MSVC compiler version, please report to wx-dev."
#endif
@@ -151,8 +153,8 @@
// special version for regex as it does have a Unicode version
#define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
-#if defined(wxMONOLITHIC) && wxMONOLITHIC == 1
- #pragma comment(lib, wxWX_LIB_NAME("msw", ""))
+#if defined(wxMONOLITHIC) && wxMONOLITHIC == 1
+ #pragma comment(lib, wxWX_LIB_NAME("msw", ""))
#else
#pragma comment(lib, wxWX_LIB_NAME("base", ""))
@@ -160,7 +162,7 @@
#pragma comment(lib, wxBASE_LIB_NAME("net"))
#endif
#if wxUSE_XML && !defined(wxNO_XML_LIB)
- #pragma comment(lib, wxBASE_LIB_NAME("xml"))
+ #pragma comment(lib, wxBASE_LIB_NAME("xml"))
#endif
#endif // defined(wxMONOLITHIC) && wxMONOLITHIC == 1
@@ -204,7 +206,7 @@
#if wxUSE_HTML && !defined(wxNO_HTML_LIB)
#pragma comment(lib, wxTOOLKIT_LIB_NAME("html"))
- #endif
+ #endif
#if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
#pragma comment(lib, wxTOOLKIT_LIB_NAME("qa"))
#endif
@@ -227,7 +229,7 @@
#pragma comment(lib, wxTOOLKIT_LIB_NAME("media"))
#endif
#if wxUSE_STC && !defined(wxNO_STC_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
+ #pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
#endif
#if wxUSE_WEBVIEW && !defined(wxNO_WEBVIEW_LIB)
#pragma comment(lib, wxTOOLKIT_LIB_NAME("webview"))
diff --git a/include/wx/accel.h b/include/wx/accel.h
index 604039561f..c1f78d58ed 100644
--- a/include/wx/accel.h
+++ b/include/wx/accel.h
@@ -33,7 +33,7 @@ enum wxAcceleratorEntryFlags
wxACCEL_CTRL = 0x0002, // hold Ctrl key down
wxACCEL_SHIFT = 0x0004, // hold Shift key down
#if defined(__WXMAC__)
- wxACCEL_RAW_CTRL= 0x0008, //
+ wxACCEL_RAW_CTRL= 0x0008, //
#else
wxACCEL_RAW_CTRL= wxACCEL_CTRL,
#endif
@@ -55,24 +55,10 @@ public:
, m_item(item)
{ }
- wxAcceleratorEntry(const wxAcceleratorEntry& entry)
- : m_flags(entry.m_flags)
- , m_keyCode(entry.m_keyCode)
- , m_command(entry.m_command)
- , m_item(entry.m_item)
- { }
-
// create accelerator corresponding to the specified string, return NULL if
// string couldn't be parsed or a pointer to be deleted by the caller
static wxAcceleratorEntry *Create(const wxString& str);
- wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
- {
- if (&entry != this)
- Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
- return *this;
- }
-
void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
{
m_flags = flags;
diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h
index ccc99e7ad0..029987479f 100644
--- a/include/wx/android/setup.h
+++ b/include/wx/android/setup.h
@@ -1661,6 +1661,13 @@
// Recommended setting: 0, nobody uses .INI files any more
#define wxUSE_INICONF 0
+// Set to 1 if you need to include over
+//
+// Default is 0.
+//
+// Recommended setting: 0
+#define wxUSE_WINSOCK2 0
+
// ----------------------------------------------------------------------------
// Generic versions of native controls
// ----------------------------------------------------------------------------
diff --git a/include/wx/any.h b/include/wx/any.h
index bd61b1e7a0..4bf9b0eef4 100644
--- a/include/wx/any.h
+++ b/include/wx/any.h
@@ -231,8 +231,8 @@ public:
{
public:
DataHolder(const T2& value)
+ : m_value(value)
{
- m_value = value;
}
virtual ~DataHolder() { }
diff --git a/include/wx/app.h b/include/wx/app.h
index d16f209732..33810ef719 100644
--- a/include/wx/app.h
+++ b/include/wx/app.h
@@ -104,7 +104,7 @@ public:
// Called before the first events are handled, called from within MainLoop()
virtual void OnLaunched();
-
+
// This is called by wxEventLoopBase::SetActive(): you should put the code
// which needs an active event loop here.
// Note that this function is called whenever an event loop is activated;
diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h
index 274757d88e..986575ad83 100644
--- a/include/wx/aui/auibar.h
+++ b/include/wx/aui/auibar.h
@@ -69,21 +69,12 @@ public:
wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL,
int winId = 0)
: wxNotifyEvent(commandType, winId)
+ , m_clickPt(-1, -1)
+ , m_rect(-1, -1, 0, 0)
{
m_isDropdownClicked = false;
- m_clickPt = wxPoint(-1, -1);
- m_rect = wxRect(-1,-1, 0, 0);
m_toolId = -1;
}
-#ifndef SWIG
- wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c)
- {
- m_isDropdownClicked = c.m_isDropdownClicked;
- m_clickPt = c.m_clickPt;
- m_rect = c.m_rect;
- m_toolId = c.m_toolId;
- }
-#endif
wxEvent *Clone() const wxOVERRIDE { return new wxAuiToolBarEvent(*this); }
bool IsDropDownClicked() const { return m_isDropdownClicked; }
@@ -132,17 +123,6 @@ public:
m_alignment = wxALIGN_CENTER;
}
- wxAuiToolBarItem(const wxAuiToolBarItem& c)
- {
- Assign(c);
- }
-
- wxAuiToolBarItem& operator=(const wxAuiToolBarItem& c)
- {
- Assign(c);
- return *this;
- }
-
void Assign(const wxAuiToolBarItem& c)
{
m_window = c.m_window;
@@ -759,7 +739,7 @@ typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&);
#define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK
#define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && wxUSE_UXTHEME
#define wxHAS_NATIVE_TOOLBAR_ART
#include "wx/aui/barartmsw.h"
#define wxAuiDefaultToolBarArt wxAuiMSWToolBarArt
diff --git a/include/wx/aui/auibook.h b/include/wx/aui/auibook.h
index 2571f7d9ac..221d2a4ed2 100644
--- a/include/wx/aui/auibook.h
+++ b/include/wx/aui/auibook.h
@@ -69,12 +69,6 @@ public:
{
m_dragSource = NULL;
}
-#ifndef SWIG
- wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c)
- {
- m_dragSource = c.m_dragSource;
- }
-#endif
wxEvent *Clone() const wxOVERRIDE { return new wxAuiNotebookEvent(*this); }
void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; }
@@ -350,12 +344,14 @@ public:
virtual int ChangeSelection(size_t n) wxOVERRIDE;
- virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
+ virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
int imageId) wxOVERRIDE;
virtual bool DeleteAllPages() wxOVERRIDE;
virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
bool select, int imageId) wxOVERRIDE;
+ virtual wxSize DoGetBestSize() const wxOVERRIDE;
+
protected:
// Common part of all ctors.
void Init();
diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h
index eccc6603c1..145bd98df7 100644
--- a/include/wx/aui/framemanager.h
+++ b/include/wx/aui/framemanager.h
@@ -148,6 +148,11 @@ class WXDLLIMPEXP_AUI wxAuiPaneInfo
public:
wxAuiPaneInfo()
+ : best_size(wxDefaultSize)
+ , min_size(wxDefaultSize)
+ , max_size(wxDefaultSize)
+ , floating_pos(wxDefaultPosition)
+ , floating_size(wxDefaultSize)
{
window = NULL;
frame = NULL;
@@ -156,11 +161,6 @@ public:
dock_layer = 0;
dock_row = 0;
dock_pos = 0;
- floating_pos = wxDefaultPosition;
- floating_size = wxDefaultSize;
- best_size = wxDefaultSize;
- min_size = wxDefaultSize;
- max_size = wxDefaultSize;
dock_proportion = 0;
DefaultPane();
@@ -168,52 +168,6 @@ public:
~wxAuiPaneInfo() {}
-#ifndef SWIG
- wxAuiPaneInfo(const wxAuiPaneInfo& c)
- {
- name = c.name;
- caption = c.caption;
- icon = c.icon;
- window = c.window;
- frame = c.frame;
- state = c.state;
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- dock_pos = c.dock_pos;
- best_size = c.best_size;
- min_size = c.min_size;
- max_size = c.max_size;
- floating_pos = c.floating_pos;
- floating_size = c.floating_size;
- dock_proportion = c.dock_proportion;
- buttons = c.buttons;
- rect = c.rect;
- }
-
- wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c)
- {
- name = c.name;
- caption = c.caption;
- window = c.window;
- frame = c.frame;
- state = c.state;
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- dock_pos = c.dock_pos;
- best_size = c.best_size;
- min_size = c.min_size;
- max_size = c.max_size;
- floating_pos = c.floating_pos;
- floating_size = c.floating_size;
- dock_proportion = c.dock_proportion;
- buttons = c.buttons;
- rect = c.rect;
- return *this;
- }
-#endif // SWIG
-
// Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
// used on loading perspectives etc.
void SafeSet(wxAuiPaneInfo source)
@@ -686,17 +640,6 @@ public:
canveto_flag = true;
dc = NULL;
}
-#ifndef SWIG
- wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c)
- {
- manager = c.manager;
- pane = c.pane;
- button = c.button;
- veto_flag = c.veto_flag;
- canveto_flag = c.canveto_flag;
- dc = c.dc;
- }
-#endif
wxEvent *Clone() const wxOVERRIDE { return new wxAuiManagerEvent(*this); }
void SetManager(wxAuiManager* mgr) { manager = mgr; }
@@ -745,39 +688,6 @@ public:
reserved1 = false;
}
-#ifndef SWIG
- wxAuiDockInfo(const wxAuiDockInfo& c)
- {
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- size = c.size;
- min_size = c.min_size;
- resizable = c.resizable;
- fixed = c.fixed;
- toolbar = c.toolbar;
- panes = c.panes;
- rect = c.rect;
- reserved1 = c.reserved1;
- }
-
- wxAuiDockInfo& operator=(const wxAuiDockInfo& c)
- {
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- size = c.size;
- min_size = c.min_size;
- resizable = c.resizable;
- fixed = c.fixed;
- toolbar = c.toolbar;
- panes = c.panes;
- rect = c.rect;
- reserved1 = c.reserved1;
- return *this;
- }
-#endif // SWIG
-
bool IsOk() const { return dock_direction != 0; }
bool IsHorizontal() const { return dock_direction == wxAUI_DOCK_TOP ||
dock_direction == wxAUI_DOCK_BOTTOM; }
diff --git a/include/wx/aui/tabart.h b/include/wx/aui/tabart.h
index f11e75b4ba..565ac1067a 100644
--- a/include/wx/aui/tabart.h
+++ b/include/wx/aui/tabart.h
@@ -318,7 +318,7 @@ protected:
#define wxHAS_NATIVE_TABART
#include "wx/aui/tabartgtk.h"
#define wxAuiDefaultTabArt wxAuiGtkTabArt
- #elif defined(__WXMSW__)
+ #elif defined(__WXMSW__) && wxUSE_UXTHEME
#define wxHAS_NATIVE_TABART
#include "wx/aui/tabartmsw.h"
#define wxAuiDefaultTabArt wxAuiMSWTabArt
diff --git a/include/wx/clrpicker.h b/include/wx/clrpicker.h
index 840e0b1123..0530e309de 100644
--- a/include/wx/clrpicker.h
+++ b/include/wx/clrpicker.h
@@ -40,7 +40,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxColourPickerCtrlNameStr[];
class WXDLLIMPEXP_CORE wxColourPickerWidgetBase
{
public:
- wxColourPickerWidgetBase() { m_colour = *wxBLACK; }
+ wxColourPickerWidgetBase() : m_colour(*wxBLACK) { }
virtual ~wxColourPickerWidgetBase() {}
wxColour GetColour() const
diff --git a/include/wx/colour.h b/include/wx/colour.h
index 7565f09162..e9a13ef95e 100644
--- a/include/wx/colour.h
+++ b/include/wx/colour.h
@@ -118,7 +118,7 @@ public:
virtual ChannelType Blue() const = 0;
virtual ChannelType Alpha() const
{ return wxALPHA_OPAQUE ; }
-
+
virtual bool IsSolid() const
{ return true; }
diff --git a/include/wx/dataobj.h b/include/wx/dataobj.h
index 348ad20286..b7680b5c95 100644
--- a/include/wx/dataobj.h
+++ b/include/wx/dataobj.h
@@ -322,7 +322,7 @@ private:
// ----------------------------------------------------------------------------
#if wxUSE_UNICODE
- #if defined(__WXGTK20__) || defined(__WXX11__)
+ #if defined(__WXGTK20__) || defined(__WXX11__) || defined(__WXQT__)
#define wxNEEDS_UTF8_FOR_TEXT_DATAOBJ
#elif defined(__WXMAC__)
#define wxNEEDS_UTF16_FOR_TEXT_DATAOBJ
@@ -345,11 +345,11 @@ public:
virtual size_t GetLength() const { return m_html.Len() + 1; }
virtual wxString GetHTML() const { return m_html; }
virtual void SetHTML(const wxString& html) { m_html = html; }
-
+
virtual size_t GetDataSize() const wxOVERRIDE;
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
-
+
// Must provide overloads to avoid hiding them (and warnings about it)
virtual size_t GetDataSize(const wxDataFormat&) const wxOVERRIDE
{
diff --git a/include/wx/datetime.h b/include/wx/datetime.h
index 8ed8dfcbda..cb88987dac 100644
--- a/include/wx/datetime.h
+++ b/include/wx/datetime.h
@@ -464,7 +464,7 @@ public:
// ------------------------------------------------------------------------
// default ctor does not initialize the object, use Set()!
- wxDateTime() { m_time = wxINT64_MIN; }
+ wxDateTime() : m_time(wxINT64_MIN) { }
// from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970)
inline wxDateTime(time_t timet);
@@ -1114,7 +1114,7 @@ public:
// ------------------------------------------------------------------------
// construct from internal representation
- wxDateTime(const wxLongLong& time) { m_time = time; }
+ wxDateTime(const wxLongLong& time) : m_time(time) { }
// get the internal representation
inline wxLongLong GetValue() const;
@@ -1343,7 +1343,7 @@ public:
// ------------------------------------------------------------------------
// construct from internal representation
- wxTimeSpan(const wxLongLong& diff) { m_diff = diff; }
+ wxTimeSpan(const wxLongLong& diff) : m_diff(diff) { }
// get the internal representation
wxLongLong GetValue() const { return m_diff; }
diff --git a/include/wx/dc.h b/include/wx/dc.h
index a34a73b698..dd5eb2251d 100644
--- a/include/wx/dc.h
+++ b/include/wx/dc.h
@@ -283,7 +283,7 @@ public:
}
virtual void* GetHandle() const { return NULL; }
-
+
// query dimension, colour deps, resolution
virtual void DoGetSize(int *width, int *height) const = 0;
@@ -528,7 +528,7 @@ public:
// this needs to overidden if the axis is inverted
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
-
+
virtual double GetContentScaleFactor() const { return m_contentScaleFactor; }
#ifdef __WXMSW__
@@ -686,6 +686,16 @@ protected:
// for rendering on higher-resolution DCs such as printer ones
static float GetFontPointSizeAdjustment(float dpi);
+ // Return the number of pixels per mm in the horizontal and vertical
+ // directions, respectively.
+ //
+ // If the physical size of the DC is not known, or doesn't make sense, as
+ // for a SVG DC, for example, a fixed value corresponding to the standard
+ // DPI is used.
+ double GetMMToPXx() const;
+ double GetMMToPXy() const;
+
+
// window on which the DC draws or NULL
wxWindow *m_window;
@@ -712,12 +722,15 @@ protected:
double m_scaleX, m_scaleY; // calculated from logical scale and user scale
int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes
-
+
double m_contentScaleFactor; // used by high resolution displays (retina)
- // what is a mm on a screen you don't know the size of?
- double m_mm_to_pix_x,
- m_mm_to_pix_y;
+ // Pixel per mm in horizontal and vertical directions.
+ //
+ // These variables are computed on demand by GetMMToPX[xy]() functions,
+ // don't access them directly other than for assigning to them.
+ mutable double m_mm_to_pix_x,
+ m_mm_to_pix_y;
// bounding and clipping boxes
wxCoord m_minX, m_minY, m_maxX, m_maxY; // Bounding box is stored in device units.
diff --git a/include/wx/dcbuffer.h b/include/wx/dcbuffer.h
index fb912f6e24..4a29fda820 100644
--- a/include/wx/dcbuffer.h
+++ b/include/wx/dcbuffer.h
@@ -134,7 +134,7 @@ private:
int m_style;
wxSize m_area;
-
+
wxDECLARE_DYNAMIC_CLASS(wxBufferedDC);
wxDECLARE_NO_COPY_CLASS(wxBufferedDC);
};
diff --git a/include/wx/dcgraph.h b/include/wx/dcgraph.h
index 9a11a19ce4..c2482d78c3 100644
--- a/include/wx/dcgraph.h
+++ b/include/wx/dcgraph.h
@@ -32,7 +32,7 @@ public:
wxGCDC( const wxEnhMetaFileDC& dc );
#endif
wxGCDC(wxGraphicsContext* context);
-
+
wxGCDC();
virtual ~wxGCDC();
@@ -60,6 +60,10 @@ public:
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
wxGCDCImpl( wxDC *owner, const wxEnhMetaFileDC& dc );
#endif
+
+ // Ctor using an existing graphics context given to wxGCDC ctor.
+ wxGCDCImpl(wxDC *owner, wxGraphicsContext* context);
+
wxGCDCImpl( wxDC *owner );
virtual ~wxGCDCImpl();
diff --git a/include/wx/defs.h b/include/wx/defs.h
index 27b175f910..1871ae13e4 100644
--- a/include/wx/defs.h
+++ b/include/wx/defs.h
@@ -1568,9 +1568,8 @@ enum wxBorder
/*
* wxRadioBox style flags
+ * These styles are not used in any port.
*/
-/* should we number the items from left to right or from top to bottom in a 2d */
-/* radiobox? */
#define wxRA_LEFTTORIGHT 0x0001
#define wxRA_TOPTOBOTTOM 0x0002
@@ -2718,6 +2717,7 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSArray);
DECLARE_WXCOCOA_OBJC_CLASS(NSData);
DECLARE_WXCOCOA_OBJC_CLASS(NSMutableArray);
DECLARE_WXCOCOA_OBJC_CLASS(NSString);
+DECLARE_WXCOCOA_OBJC_CLASS(NSObject);
#if wxOSX_USE_COCOA
@@ -2739,7 +2739,6 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSMenu);
DECLARE_WXCOCOA_OBJC_CLASS(NSMenuExtra);
DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
DECLARE_WXCOCOA_OBJC_CLASS(NSNotification);
-DECLARE_WXCOCOA_OBJC_CLASS(NSObject);
DECLARE_WXCOCOA_OBJC_CLASS(NSPanel);
DECLARE_WXCOCOA_OBJC_CLASS(NSResponder);
DECLARE_WXCOCOA_OBJC_CLASS(NSScrollView);
diff --git a/include/wx/dfb/dc.h b/include/wx/dfb/dc.h
index 141224ba68..4dac548d98 100644
--- a/include/wx/dfb/dc.h
+++ b/include/wx/dfb/dc.h
@@ -157,8 +157,6 @@ private:
protected:
wxIDirectFBSurfacePtr m_surface;
- double m_mm_to_pix_x, m_mm_to_pix_y;
-
friend class WXDLLIMPEXP_FWD_CORE wxOverlayImpl; // for Init
wxDECLARE_ABSTRACT_CLASS(wxDFBDCImpl);
diff --git a/include/wx/display.h b/include/wx/display.h
index 1c3a67298a..f05c0c8451 100644
--- a/include/wx/display.h
+++ b/include/wx/display.h
@@ -115,6 +115,11 @@ public:
void ResetMode() { (void)ChangeMode(); }
#endif // wxUSE_DISPLAY
+ // If the implementation caches any information about the displays, calling
+ // this function clears it -- this should be done e.g. after a display
+ // [dis]connection.
+ static void InvalidateCache();
+
private:
// returns the factory used to implement our static methods and create new
// displays
diff --git a/include/wx/event.h b/include/wx/event.h
index 20f08b1ae2..de8e772d35 100644
--- a/include/wx/event.h
+++ b/include/wx/event.h
@@ -160,7 +160,7 @@ public:
// The class of wxEvent-derived class carried by the events of this type.
typedef T EventClass;
- wxEventTypeTag(wxEventType type) { m_type = type; }
+ wxEventTypeTag(wxEventType type) : m_type(type) { }
// Return a wxEventType reference for the initialization of the static
// event tables. See wxEventTableEntry::m_eventType for a more thorough
@@ -1801,6 +1801,10 @@ public:
// should occur for each delta.
int GetWheelDelta() const { return m_wheelDelta; }
+ // On Mac, has the user selected "Natural" scrolling in their System
+ // Preferences? Currently false on all other OS's.
+ bool IsWheelInverted() const { return m_wheelInverted; }
+
// Gets the axis the wheel operation concerns; wxMOUSE_WHEEL_VERTICAL
// (most common case) or wxMOUSE_WHEEL_HORIZONTAL (for horizontal scrolling
// using e.g. a trackpad).
@@ -1834,6 +1838,7 @@ public:
wxMouseWheelAxis m_wheelAxis;
int m_wheelRotation;
int m_wheelDelta;
+ bool m_wheelInverted;
int m_linesPerAction;
int m_columnsPerAction;
float m_magnification;
@@ -1898,8 +1903,8 @@ public:
}
wxGestureEvent(const wxGestureEvent& event) : wxEvent(event)
+ , m_pos(event.m_pos)
{
- m_pos = event.m_pos;
m_isStart = event.m_isStart;
m_isEnd = event.m_isEnd;
}
diff --git a/include/wx/filesys.h b/include/wx/filesys.h
index eb9a794e80..c16af4941b 100644
--- a/include/wx/filesys.h
+++ b/include/wx/filesys.h
@@ -13,14 +13,6 @@
#if wxUSE_FILESYSTEM
-#if !wxUSE_STREAMS
-#error You cannot compile virtual file systems without wxUSE_STREAMS
-#endif
-
-#if wxUSE_HTML && !wxUSE_FILESYSTEM
-#error You cannot compile wxHTML without virtual file systems
-#endif
-
#include "wx/stream.h"
#include "wx/datetime.h"
#include "wx/filename.h"
@@ -46,14 +38,14 @@ public:
, wxDateTime modif
#endif // wxUSE_DATETIME
)
+ : m_Location(loc)
+ , m_MimeType(mimetype.Lower())
+ , m_Anchor(anchor)
+#if wxUSE_DATETIME
+ , m_Modif(modif)
+#endif
{
m_Stream = stream;
- m_Location = loc;
- m_MimeType = mimetype.Lower();
- m_Anchor = anchor;
-#if wxUSE_DATETIME
- m_Modif = modif;
-#endif // wxUSE_DATETIME
}
virtual ~wxFSFile() { delete m_Stream; }
diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h
index aee4cf4fd5..35bd9508a6 100644
--- a/include/wx/fontutil.h
+++ b/include/wx/fontutil.h
@@ -129,7 +129,7 @@ public:
#elif defined(__WXOSX__)
public:
wxNativeFontInfo(const wxNativeFontInfo& info) { Init(info); }
-
+
~wxNativeFontInfo() { Free(); }
wxNativeFontInfo& operator=(const wxNativeFontInfo& info)
@@ -147,7 +147,7 @@ public:
void Init(const wxNativeFontInfo& info);
void Free();
-
+
wxString GetFamilyName() const;
wxString GetStyleName() const;
@@ -157,8 +157,8 @@ public:
static CGFloat GetCTWeight( CTFontRef font );
static CGFloat GetCTWeight( CTFontDescriptorRef font );
static CGFloat GetCTSlant( CTFontDescriptorRef font );
-
-
+
+
CTFontDescriptorRef GetCTFontDescriptor() const;
private:
// attributes for regenerating a CTFontDescriptor, stay close to native values
@@ -167,7 +167,7 @@ private:
wxFontStyle m_style;
CGFloat m_ctSize;
wxFontFamily m_family;
-
+
wxString m_styleName;
wxString m_familyName;
diff --git a/include/wx/gbsizer.h b/include/wx/gbsizer.h
index 501b5d8188..3ddb9be5c4 100644
--- a/include/wx/gbsizer.h
+++ b/include/wx/gbsizer.h
@@ -291,8 +291,8 @@ public:
// These are what make the sizer do size calculations and layout
- virtual void RecalcSizes() wxOVERRIDE;
virtual wxSize CalcMin() wxOVERRIDE;
+ virtual void RepositionChildren(const wxSize& minSize) wxOVERRIDE;
// Look at all items and see if any intersect (or would overlap) the given
diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h
index 815dfcb75b..6742e048ba 100644
--- a/include/wx/generic/dataview.h
+++ b/include/wx/generic/dataview.h
@@ -12,7 +12,6 @@
#include "wx/defs.h"
#include "wx/object.h"
-#include "wx/list.h"
#include "wx/control.h"
#include "wx/scrolwin.h"
#include "wx/icon.h"
@@ -74,6 +73,11 @@ public:
// UpdateWidth() if the width didn't really change, even if we don't
// care about its return value.
(void)WXUpdateWidth(width);
+
+ // Do remember the last explicitly set width: this is used to prevent
+ // UpdateColumnSizes() from resizing the last column to be smaller than
+ // this size.
+ m_manuallySetWidth = width;
}
virtual int GetWidth() const wxOVERRIDE;
@@ -137,9 +141,15 @@ public:
m_width = width;
UpdateWidth();
+ // We must not update m_manuallySetWidth here as this method is called by
+ // UpdateColumnSizes() which resizes the column automatically, and not
+ // "manually".
+
return true;
}
+ int WXGetManuallySetWidth() const { return m_manuallySetWidth; }
+
private:
// common part of all ctors
void Init(int width, wxAlignment align, int flags);
@@ -152,6 +162,7 @@ private:
wxString m_title;
int m_width,
+ m_manuallySetWidth,
m_minWidth;
wxAlignment m_align;
int m_flags;
@@ -167,9 +178,6 @@ private:
// wxDataViewCtrl
// ---------------------------------------------------------
-WX_DECLARE_LIST_WITH_DECL(wxDataViewColumn, wxDataViewColumnList,
- class WXDLLIMPEXP_CORE);
-
class WXDLLIMPEXP_CORE wxDataViewCtrl : public wxDataViewCtrlBase,
public wxScrollHelper
{
@@ -354,7 +362,9 @@ private:
void InvalidateColBestWidth(int idx);
void UpdateColWidths();
- wxDataViewColumnList m_cols;
+ void DoClearColumns();
+
+ wxVector m_cols;
// cached column best widths information, values are for
// respective columns from m_cols and the arrays have same size
struct CachedColWidthInfo
diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h
index 84e283154d..2e1fcb89a6 100644
--- a/include/wx/generic/grid.h
+++ b/include/wx/generic/grid.h
@@ -48,6 +48,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxGridNameStr[];
#define wxGRID_VALUE_NUMBER wxT("long")
#define wxGRID_VALUE_FLOAT wxT("double")
#define wxGRID_VALUE_CHOICE wxT("choice")
+#define wxGRID_VALUE_DATE wxT("date")
#define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING
#define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER
@@ -99,6 +100,9 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
#if wxUSE_SPINCTRL
class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
#endif
+#if wxUSE_DATEPICKCTRL
+class WXDLLIMPEXP_FWD_CORE wxDatePickerCtrl;
+#endif
class wxGridFixedIndicesSet;
@@ -1354,6 +1358,7 @@ public:
void SetColFormatBool(int col);
void SetColFormatNumber(int col);
void SetColFormatFloat(int col, int width = -1, int precision = -1);
+ void SetColFormatDate(int col, const wxString& format = wxString());
void SetColFormatCustom(int col, const wxString& typeName);
// ------ row and col formatting
diff --git a/include/wx/generic/gridctrl.h b/include/wx/generic/gridctrl.h
index 044f565382..28249fae88 100644
--- a/include/wx/generic/gridctrl.h
+++ b/include/wx/generic/gridctrl.h
@@ -153,12 +153,17 @@ private:
#include "wx/datetime.h"
-// the default renderer for the cells containing times and dates
-class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellStringRenderer
+// renderer for the cells containing dates only, without time component
+class WXDLLIMPEXP_ADV wxGridCellDateRenderer : public wxGridCellStringRenderer
{
public:
- wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat,
- const wxString& informat = wxDefaultDateTimeFormat);
+ explicit wxGridCellDateRenderer(const wxString& outformat = wxString());
+
+ wxGridCellDateRenderer(const wxGridCellDateRenderer& other)
+ : m_oformat(other.m_oformat),
+ m_tz(other.m_tz)
+ {
+ }
// draw the string right aligned
virtual void Draw(wxGrid& grid,
@@ -180,11 +185,33 @@ public:
protected:
wxString GetString(const wxGrid& grid, int row, int col);
+ virtual bool Parse(const wxString& text, wxDateTime& result);
+
+ wxString m_oformat;
+ wxDateTime::TimeZone m_tz;
+};
+
+// the default renderer for the cells containing times and dates
+class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellDateRenderer
+{
+public:
+ wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat,
+ const wxString& informat = wxDefaultDateTimeFormat);
+
+ wxGridCellDateTimeRenderer(const wxGridCellDateTimeRenderer& other)
+ : wxGridCellDateRenderer(other),
+ m_iformat(other.m_iformat),
+ m_dateDef(other.m_dateDef)
+ {
+ }
+
+ virtual wxGridCellRenderer *Clone() const wxOVERRIDE;
+
+protected:
+ virtual bool Parse(const wxString& text, wxDateTime& result) wxOVERRIDE;
wxString m_iformat;
- wxString m_oformat;
wxDateTime m_dateDef;
- wxDateTime::TimeZone m_tz;
};
#endif // wxUSE_DATETIME
diff --git a/include/wx/generic/grideditors.h b/include/wx/generic/grideditors.h
index c1b8206caa..db5dd425db 100644
--- a/include/wx/generic/grideditors.h
+++ b/include/wx/generic/grideditors.h
@@ -373,6 +373,41 @@ public:
wxDECLARE_NO_COPY_CLASS(wxGridCellAutoWrapStringEditor);
};
+#if wxUSE_DATEPICKCTRL
+
+class WXDLLIMPEXP_ADV wxGridCellDateEditor : public wxGridCellEditor
+{
+public:
+ wxGridCellDateEditor() { }
+
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler) wxOVERRIDE;
+
+ virtual void SetSize(const wxRect& rect) wxOVERRIDE;
+
+ virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE;
+ virtual bool EndEdit(int row, int col, const wxGrid* grid,
+ const wxString& oldval, wxString *newval) wxOVERRIDE;
+ virtual void ApplyEdit(int row, int col, wxGrid* grid) wxOVERRIDE;
+
+ virtual void Reset() wxOVERRIDE;
+
+ virtual wxGridCellEditor *Clone() const wxOVERRIDE;
+
+ virtual wxString GetValue() const wxOVERRIDE;
+
+protected:
+ wxDatePickerCtrl* DatePicker() const;
+
+private:
+ wxDateTime m_value;
+
+ wxDECLARE_NO_COPY_CLASS(wxGridCellDateEditor);
+};
+
+#endif // wxUSE_DATEPICKCTRL
+
#endif // wxUSE_GRID
#endif // _WX_GENERIC_GRID_EDITORS_H_
diff --git a/include/wx/generic/headerctrlg.h b/include/wx/generic/headerctrlg.h
index b145f1cbe2..f2ca427b8d 100644
--- a/include/wx/generic/headerctrlg.h
+++ b/include/wx/generic/headerctrlg.h
@@ -50,7 +50,7 @@ public:
protected:
virtual wxSize DoGetBestSize() const wxOVERRIDE;
-
+
private:
// implement base class pure virtuals
virtual void DoSetCount(unsigned int count) wxOVERRIDE;
diff --git a/include/wx/generic/private/rowheightcache.h b/include/wx/generic/private/rowheightcache.h
new file mode 100644
index 0000000000..9136a3863c
--- /dev/null
+++ b/include/wx/generic/private/rowheightcache.h
@@ -0,0 +1,155 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/private/rowheightcache.h
+// Purpose: height cache of rows in a dataview
+// Author: Jens Goepfert (mail@jensgoepfert.de)
+// Created: 2018-03-06
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_PRIVATE_ROWHEIGHTCACHE_H_
+#define _WX_PRIVATE_ROWHEIGHTCACHE_H_
+
+#include "wx/hashmap.h"
+#include "wx/vector.h"
+
+// struct describing a range of rows which contains rows ..
+struct RowRange
+{
+ unsigned int from;
+ unsigned int to;
+};
+
+/**
+ A helper class that manages a set of RowRange objects.
+
+ It stores the indices that are members of a group in a memory
+ efficient way.
+*/
+class WXDLLIMPEXP_CORE RowRanges
+{
+public:
+ /**
+ Adds a row index to this group by adding it to an existing RowRange
+ or by creating a new one.
+ */
+ void Add(unsigned int row);
+
+ /**
+ Removes a row index and all indices after idx from this group.
+ */
+ void Remove(unsigned int row);
+
+ /**
+ Checks whether a row index is contained in this group.
+ */
+ bool Has(unsigned int row) const;
+
+ /**
+ Returns the number of row indices that are contained in this group.
+ */
+ unsigned int CountAll() const;
+
+ /**
+ Returns the number of rows that are in this group before the given row
+ index.
+
+ Not that this doesn't include the given row.
+ */
+ unsigned int CountTo(unsigned int row) const;
+
+ /**
+ Returns the size of the range.
+
+ This is only used for testing and debugging.
+ */
+ unsigned int GetSize() const { return m_ranges.size(); }
+
+private:
+ wxVector m_ranges;
+
+ /**
+ If a new row index was inserted, Cleanup() checks if the neighbour
+ ranges of idx can includes the same row indices and discards
+ unnecessary RowRange objects.
+ */
+ void CleanUp(unsigned int idx);
+};
+
+WX_DECLARE_HASH_MAP(unsigned int, RowRanges*, wxIntegerHash, wxIntegerEqual,
+ HeightToRowRangesMap);
+
+/**
+ HeightCache implements a cache mechanism for wxDataViewCtrl.
+
+ It gives fast access to:
+ * the height of one line (GetLineHeight)
+ * the y-coordinate where a row starts (GetLineStart)
+ * and vice versa (GetLineAt)
+
+ The layout of the cache is a hashmap where the keys are all existing row
+ heights in pixels. The values are RowRange objects that represent all rows
+ having the specified height.
+
+ An example:
+ @code
+ {
+ 22: RowRange([0..10], [15..17], [20..2000]),
+ 42: RowRange([11..12], [18..18]),
+ 62: RowRange([13..14], [19..19])
+ }
+ @endcode
+
+ Examples
+ ========
+
+ GetLineStart
+ ------------
+ To retrieve the y-coordinate of item 1000 it is necessary to look into
+ each key of the hashmap *m_heightToRowRange*. Get the row count of
+ indices lower than 1000 (RowRange::CountTo) and multiplies it which the
+ according height.
+
+ RowRange([0..10], [15..17], [20..2000]).CountTo(1000)
+ --> 0..10 are 11 items, 15..17 are 3 items and 20..1000 are 980 items (1000-20)
+ = 11 + 3 + 980 = 994 items
+
+ GetLineStart(1000) --> (22 * 994) + (42 * 3) + (62 * 3) = 22180
+
+ GetLineHeight
+ -------------
+ To retrieve the line height look into each key and check if row is
+ contained in RowRange (RowRange::Has)
+
+ GetLineAt
+ ---------
+ To retrieve the row that starts at a specific y-coordinate.
+ Look into each key and count all rows.
+ Use bisect algorithm in combination with GetLineStart() to
+ find the appropriate item
+*/
+class WXDLLIMPEXP_CORE HeightCache
+{
+public:
+ ~HeightCache();
+ bool GetLineStart(unsigned int row, int& start);
+ bool GetLineHeight(unsigned int row, int& height);
+ bool GetLineAt(int y, unsigned int& row);
+ bool GetLineInfo(unsigned int row, int &start, int &height);
+
+ void Put(unsigned int row, int height);
+
+ /**
+ Removes the stored height of the given row from the cache and
+ invalidates all cached rows (including the given one).
+ */
+ void Remove(unsigned int row);
+
+ void Clear();
+
+private:
+ HeightToRowRangesMap m_heightToRowRange;
+};
+
+
+#endif // _WX_PRIVATE_ROWHEIGHTCACHE_H_
diff --git a/include/wx/graphics.h b/include/wx/graphics.h
index a35667491f..86a4444fb0 100644
--- a/include/wx/graphics.h
+++ b/include/wx/graphics.h
@@ -35,7 +35,7 @@ enum wxInterpolationQuality
// default interpolation
wxINTERPOLATION_DEFAULT,
// no interpolation
- wxINTERPOLATION_NONE,
+ wxINTERPOLATION_NONE,
// fast interpolation, suited for interactivity
wxINTERPOLATION_FAST,
// better quality
@@ -206,7 +206,7 @@ public:
#if wxUSE_IMAGE
wxImage ConvertToImage() const;
#endif // wxUSE_IMAGE
-
+
void* GetNativeBitmap() const;
const wxGraphicsBitmapData* GetBitmapData() const
@@ -601,10 +601,10 @@ public:
// returns the current interpolation quality
virtual wxInterpolationQuality GetInterpolationQuality() const { return m_interpolation; }
-
+
// sets the interpolation quality, returns true if it supported
virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) = 0;
-
+
// returns the current compositing operator
virtual wxCompositionMode GetCompositionMode() const { return m_composition; }
@@ -754,14 +754,14 @@ public:
// helper to determine if a 0.5 offset should be applied for the drawing operation
virtual bool ShouldOffset() const { return false; }
-
- // indicates whether the context should try to offset for pixel boundaries, this only makes sense on
+
+ // indicates whether the context should try to offset for pixel boundaries, this only makes sense on
// bitmap devices like screen, by default this is turned off
virtual void EnableOffset(bool enable = true);
-
+
void DisableOffset() { EnableOffset(false); }
bool OffsetEnabled() { return m_enableOffset; }
-
+
protected:
// These fields must be initialized in the derived class ctors.
wxDouble m_width,
@@ -876,6 +876,8 @@ public:
#endif
#endif
+ wxGraphicsContext* CreateContextFromUnknownDC(const wxDC& dc);
+
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0;
virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ) = 0;
diff --git a/include/wx/gtk/anybutton.h b/include/wx/gtk/anybutton.h
index ad0357a659..0b149ec085 100644
--- a/include/wx/gtk/anybutton.h
+++ b/include/wx/gtk/anybutton.h
@@ -23,8 +23,6 @@ public:
m_isPressed = false;
}
- virtual bool Enable( bool enable = true ) wxOVERRIDE;
-
// implementation
// --------------
@@ -41,6 +39,8 @@ public:
protected:
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const wxOVERRIDE;
+ virtual void DoEnable(bool enable) wxOVERRIDE;
+
virtual wxBitmap DoGetBitmap(State which) const wxOVERRIDE;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which) wxOVERRIDE;
virtual void DoSetBitmapPosition(wxDirection dir) wxOVERRIDE;
diff --git a/include/wx/gtk/checkbox.h b/include/wx/gtk/checkbox.h
index 8068f0b556..e16bc4f3ff 100644
--- a/include/wx/gtk/checkbox.h
+++ b/include/wx/gtk/checkbox.h
@@ -39,7 +39,6 @@ public:
bool GetValue() const wxOVERRIDE;
virtual void SetLabel( const wxString& label ) wxOVERRIDE;
- virtual bool Enable( bool enable = true ) wxOVERRIDE;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -52,6 +51,8 @@ protected:
virtual void DoApplyWidgetStyle(GtkRcStyle *style) wxOVERRIDE;
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const wxOVERRIDE;
+ virtual void DoEnable(bool enable) wxOVERRIDE;
+
void DoSet3StateValue(wxCheckBoxState state) wxOVERRIDE;
wxCheckBoxState DoGet3StateValue() const wxOVERRIDE;
diff --git a/include/wx/gtk/dc.h b/include/wx/gtk/dc.h
index 88e46392f6..d88a1487b0 100644
--- a/include/wx/gtk/dc.h
+++ b/include/wx/gtk/dc.h
@@ -136,7 +136,7 @@ public:
virtual GdkWindow* GetGDKWindow() const { return NULL; }
virtual void* GetHandle() const wxOVERRIDE { return GetGDKWindow(); }
-
+
// base class pure virtuals implemented here
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE;
virtual void DoGetSizeMM(int* width, int* height) const wxOVERRIDE;
diff --git a/include/wx/gtk/dcmemory.h b/include/wx/gtk/dcmemory.h
index 3f7e7c057a..8371d721e3 100644
--- a/include/wx/gtk/dcmemory.h
+++ b/include/wx/gtk/dcmemory.h
@@ -39,7 +39,7 @@ public:
virtual void DoGetSize( int *width, int *height ) const wxOVERRIDE;
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const wxOVERRIDE;
virtual void* GetHandle() const wxOVERRIDE;
-
+
// overridden for wxMemoryDC Impl
virtual void DoSelect(const wxBitmap& bitmap) wxOVERRIDE;
diff --git a/include/wx/gtk/print.h b/include/wx/gtk/print.h
index 5c54286eb3..9458ce7643 100644
--- a/include/wx/gtk/print.h
+++ b/include/wx/gtk/print.h
@@ -226,7 +226,7 @@ public:
virtual void* GetCairoContext() const wxOVERRIDE;
virtual void* GetHandle() const wxOVERRIDE;
-
+
bool CanDrawBitmap() const wxOVERRIDE { return true; }
void Clear() wxOVERRIDE;
void SetFont( const wxFont& font ) wxOVERRIDE;
diff --git a/include/wx/gtk/private/string.h b/include/wx/gtk/private/string.h
index bd188d10f8..051c94132c 100644
--- a/include/wx/gtk/private/string.h
+++ b/include/wx/gtk/private/string.h
@@ -43,8 +43,8 @@ class wxGtkCollatableString
{
public:
wxGtkCollatableString( const wxString &label, gchar *key )
+ : m_label(label)
{
- m_label = label;
m_key = key;
}
diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h
index 9e7df61a93..f38f82a599 100644
--- a/include/wx/gtk/radiobox.h
+++ b/include/wx/gtk/radiobox.h
@@ -141,6 +141,8 @@ protected:
virtual void DoApplyWidgetStyle(GtkRcStyle *style) wxOVERRIDE;
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const wxOVERRIDE;
+ virtual void DoEnable(bool enable) wxOVERRIDE;
+
virtual bool GTKNeedsToFilterSameWindowFocus() const wxOVERRIDE { return true; }
virtual bool GTKWidgetNeedsMnemonic() const wxOVERRIDE;
diff --git a/include/wx/gtk/radiobut.h b/include/wx/gtk/radiobut.h
index 340c671c1e..7ef6a6a162 100644
--- a/include/wx/gtk/radiobut.h
+++ b/include/wx/gtk/radiobut.h
@@ -41,7 +41,6 @@ public:
virtual void SetLabel(const wxString& label) wxOVERRIDE;
virtual void SetValue(bool val);
virtual bool GetValue() const;
- virtual bool Enable( bool enable = true ) wxOVERRIDE;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -52,6 +51,8 @@ protected:
virtual void DoApplyWidgetStyle(GtkRcStyle *style) wxOVERRIDE;
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const wxOVERRIDE;
+ virtual void DoEnable(bool enable) wxOVERRIDE;
+
private:
typedef wxControl base_type;
diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h
index 22ee07b8d0..c581562c6b 100644
--- a/include/wx/gtk/setup0.h
+++ b/include/wx/gtk/setup0.h
@@ -1713,6 +1713,13 @@
// Recommended setting: 0, nobody uses .INI files any more
#define wxUSE_INICONF 0
+// Set to 1 if you need to include over
+//
+// Default is 0.
+//
+// Recommended setting: 0, set to 1 automatically if wxUSE_IPV6 is 1.
+#define wxUSE_WINSOCK2 0
+
// ----------------------------------------------------------------------------
// Generic versions of native controls
// ----------------------------------------------------------------------------
diff --git a/include/wx/gtk/spinbutt.h b/include/wx/gtk/spinbutt.h
index ae974200b7..437198173c 100644
--- a/include/wx/gtk/spinbutt.h
+++ b/include/wx/gtk/spinbutt.h
@@ -44,8 +44,6 @@ public:
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
- virtual bool Enable( bool enable = true ) wxOVERRIDE;
-
// implementation
int m_pos;
@@ -56,6 +54,8 @@ protected:
virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const wxOVERRIDE;
+ virtual void DoEnable(bool enable) wxOVERRIDE;
+
private:
typedef wxSpinButtonBase base_type;
diff --git a/include/wx/gtk/textctrl.h b/include/wx/gtk/textctrl.h
index f27d38cfa7..d411188a66 100644
--- a/include/wx/gtk/textctrl.h
+++ b/include/wx/gtk/textctrl.h
@@ -95,7 +95,6 @@ public:
// Overridden wxWindow methods
virtual void SetWindowStyleFlag( long style ) wxOVERRIDE;
- virtual bool Enable( bool enable = true ) wxOVERRIDE;
// Implementation from now on
void OnDropFiles( wxDropFilesEvent &event );
@@ -178,6 +177,8 @@ protected:
private:
void Init();
+ virtual void DoEnable(bool enable) wxOVERRIDE;
+
// overridden wxTextEntry virtual methods
virtual GtkEditable *GetEditable() const wxOVERRIDE;
virtual GtkEntry *GetEntry() const wxOVERRIDE;
diff --git a/include/wx/hashset.h b/include/wx/hashset.h
index 38a65ab5f4..82e0d252f5 100644
--- a/include/wx/hashset.h
+++ b/include/wx/hashset.h
@@ -75,13 +75,13 @@ public: \
// the names of the hasher and comparator classes are interpreted as naming
// the base class which is inaccessible.
// The workaround is to prefix the class names with 'struct'; however, don't
-// do this on MSVC because it causes a warning there if the class was
-// declared as a 'class' rather than a 'struct' (and MSVC's std::unordered_set
-// implementation does not suffer from the access problem).
-#ifdef _MSC_VER
-#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) STRUCTNAME
-#else
+// do this unconditionally, as with other compilers (both MSVC and clang)
+// doing it causes a warning if the class was declared as a 'class' rather than
+// a 'struct'.
+#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) struct STRUCTNAME
+#else
+#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) STRUCTNAME
#endif
#define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \
diff --git a/include/wx/headerctrl.h b/include/wx/headerctrl.h
index f491fcbc7a..f2270bf78e 100644
--- a/include/wx/headerctrl.h
+++ b/include/wx/headerctrl.h
@@ -345,6 +345,8 @@ protected:
return -1;
}
+ void OnHeaderResizing(wxHeaderCtrlEvent& evt);
+
private:
// functions implementing our public API
void DoInsert(const wxHeaderColumnSimple& col, unsigned int idx);
@@ -371,6 +373,7 @@ private:
wxDECLARE_NO_COPY_CLASS(wxHeaderCtrlSimple);
+ wxDECLARE_EVENT_TABLE();
};
// ----------------------------------------------------------------------------
diff --git a/include/wx/html/helpctrl.h b/include/wx/html/helpctrl.h
index 54c27afbe0..cad8d6458e 100644
--- a/include/wx/html/helpctrl.h
+++ b/include/wx/html/helpctrl.h
@@ -46,7 +46,7 @@ class WXDLLIMPEXP_HTML wxHtmlHelpController : public wxHelpControllerBase // wxE
public:
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxWindow* parentWindow = NULL);
wxHtmlHelpController(wxWindow* parentWindow, int style = wxHF_DEFAULT_STYLE);
-
+
virtual ~wxHtmlHelpController();
void SetShouldPreventAppExit(bool enable);
@@ -117,7 +117,7 @@ public:
protected:
void Init(int style);
-
+
virtual wxWindow* CreateHelpWindow();
virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData *data);
virtual wxHtmlHelpDialog* CreateHelpDialog(wxHtmlHelpData *data);
diff --git a/include/wx/html/helpdata.h b/include/wx/html/helpdata.h
index 8c4aad9238..2627f78c08 100644
--- a/include/wx/html/helpdata.h
+++ b/include/wx/html/helpdata.h
@@ -32,11 +32,11 @@ class WXDLLIMPEXP_HTML wxHtmlBookRecord
public:
wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath,
const wxString& title, const wxString& start)
+ : m_BookFile(bookfile)
+ , m_BasePath(basepath)
+ , m_Title(title)
+ , m_Start(start)
{
- m_BookFile = bookfile;
- m_BasePath = basepath;
- m_Title = title;
- m_Start = start;
// for debugging, give the contents index obvious default values
m_ContentsStart = m_ContentsEnd = -1;
}
diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h
index 5276a7b601..c31475bd05 100644
--- a/include/wx/html/htmlcell.h
+++ b/include/wx/html/htmlcell.h
@@ -571,7 +571,7 @@ protected:
class WXDLLIMPEXP_HTML wxHtmlColourCell : public wxHtmlCell
{
public:
- wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND) : wxHtmlCell() {m_Colour = clr; m_Flags = flags;}
+ wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND) : wxHtmlCell(), m_Colour(clr) { m_Flags = flags;}
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
wxHtmlRenderingInfo& info) wxOVERRIDE;
virtual void DrawInvisible(wxDC& dc, int x, int y,
@@ -596,7 +596,7 @@ protected:
class WXDLLIMPEXP_HTML wxHtmlFontCell : public wxHtmlCell
{
public:
- wxHtmlFontCell(wxFont *font) : wxHtmlCell() { m_Font = (*font); }
+ wxHtmlFontCell(wxFont *font) : wxHtmlCell(), m_Font(*font) { }
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
wxHtmlRenderingInfo& info) wxOVERRIDE;
virtual void DrawInvisible(wxDC& dc, int x, int y,
diff --git a/include/wx/html/htmlwin.h b/include/wx/html/htmlwin.h
index 8a81f1bd52..1dfc31b5cd 100644
--- a/include/wx/html/htmlwin.h
+++ b/include/wx/html/htmlwin.h
@@ -578,10 +578,10 @@ public:
wxHtmlCell *cell, const wxPoint &pt,
const wxMouseEvent &ev)
: wxCommandEvent(commandType, id)
+ , m_mouseEvent(ev)
+ , m_pt(pt)
{
m_cell = cell;
- m_pt = pt;
- m_mouseEvent = ev;
m_bLinkWasClicked = false;
}
diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h
index 30179440f4..f8558a3141 100644
--- a/include/wx/html/webkit.h
+++ b/include/wx/html/webkit.h
@@ -107,11 +107,11 @@ private:
wxString m_pageTitle;
OSXWebViewPtr m_webView;
-
+
WX_NSObject m_frameLoadMonitor;
WX_NSObject m_policyDelegate;
WX_NSObject m_UIDelegate;
-
+
// we may use this later to setup our own mouse events,
// so leave it in for now.
void* m_webKitCtrlEventHandler;
diff --git a/include/wx/kbdstate.h b/include/wx/kbdstate.h
index ab0df32d1c..8945c6b2ba 100644
--- a/include/wx/kbdstate.h
+++ b/include/wx/kbdstate.h
@@ -65,10 +65,10 @@ public:
// accessors for individual modifier keys
bool ControlDown() const { return m_controlDown; }
- bool RawControlDown() const
- {
+ bool RawControlDown() const
+ {
#ifdef __WXOSX__
- return m_rawControlDown;
+ return m_rawControlDown;
#else
return m_controlDown;
#endif
@@ -91,12 +91,12 @@ public:
// ---------------------------------------------------
void SetControlDown(bool down) { m_controlDown = down; }
- void SetRawControlDown(bool down)
- {
+ void SetRawControlDown(bool down)
+ {
#ifdef __WXOSX__
- m_rawControlDown = down;
+ m_rawControlDown = down;
#else
- m_controlDown = down;
+ m_controlDown = down;
#endif
}
void SetShiftDown(bool down) { m_shiftDown = down; }
diff --git a/include/wx/list.h b/include/wx/list.h
index 22446a2dd4..cc58fe04f8 100644
--- a/include/wx/list.h
+++ b/include/wx/list.h
@@ -496,14 +496,6 @@ protected:
void *data,
const wxListKey& key = wxDefaultListKey) = 0;
-
- // ctors
- // from an array
- wxListBase(size_t count, void *elements[]);
- // from a sequence of objects
- wxListBase(void *object, ... /* terminate with NULL */);
-
-protected:
void Assign(const wxListBase& list)
{ Clear(); DoCopy(list); }
@@ -688,8 +680,6 @@ private:
{ } \
name(const name& list) : wxListBase(list.GetKeyType()) \
{ Assign(list); } \
- name(size_t count, T *elements[]) \
- : wxListBase(count, (void **)elements) { } \
\
name& operator=(const name& list) \
{ if (&list != this) Assign(list); return *this; } \
diff --git a/include/wx/menu.h b/include/wx/menu.h
index b733467604..eb262bc2da 100644
--- a/include/wx/menu.h
+++ b/include/wx/menu.h
@@ -406,7 +406,7 @@ private:
wxDECLARE_NO_COPY_CLASS(wxMenuBase);
};
-#if wxUSE_EXTENDED_RTTI
+#if wxUSE_EXTENDED_RTTI
// ----------------------------------------------------------------------------
// XTI accessor
@@ -417,17 +417,17 @@ class WXDLLEXPORT wxMenuInfoHelper : public wxObject
public:
wxMenuInfoHelper() { m_menu = NULL; }
virtual ~wxMenuInfoHelper() { }
-
+
bool Create( wxMenu *menu, const wxString &title )
- {
- m_menu = menu;
- m_title = title;
+ {
+ m_menu = menu;
+ m_title = title;
return true;
}
-
+
wxMenu* GetMenu() const { return m_menu; }
wxString GetTitle() const { return m_title; }
-
+
private:
wxMenu *m_menu;
wxString m_title;
@@ -555,13 +555,13 @@ public:
virtual bool CanBeOutsideClientArea() const wxOVERRIDE { return true; }
-#if wxUSE_EXTENDED_RTTI
+#if wxUSE_EXTENDED_RTTI
// XTI helpers:
bool AppendMenuInfo( const wxMenuInfoHelper *info )
{ return Append( info->GetMenu(), info->GetTitle() ); }
const wxMenuInfoHelperList& GetMenuInfos() const;
#endif
-
+
#if WXWIN_COMPATIBILITY_2_8
// get or change the label of the menu at given position
// Deprecated in favour of SetMenuLabel
@@ -574,11 +574,11 @@ protected:
// the list of all our menus
wxMenuList m_menus;
-#if wxUSE_EXTENDED_RTTI
+#if wxUSE_EXTENDED_RTTI
// used by XTI
wxMenuInfoHelperList m_menuInfos;
#endif
-
+
// the frame we are attached to (may be NULL)
wxFrame *m_menuBarFrame;
diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h
index 4ef7be5d7f..6f9c161d37 100644
--- a/include/wx/msw/chkconf.h
+++ b/include/wx/msw/chkconf.h
@@ -118,6 +118,14 @@
# endif
#endif /* wxUSE_UXTHEME */
+#ifndef wxUSE_WINSOCK2
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_WINSOCK2 must be defined."
+# else
+# define wxUSE_WINSOCK2 0
+# endif
+#endif /* wxUSE_WINSOCK2 */
+
/*
* Unfortunately we can't use compiler TLS support if the library can be used
* inside a dynamically loaded DLL under Windows XP, as this can result in hard
@@ -455,4 +463,14 @@
# define wxUSE_POSTSCRIPT 1
#endif
+/*
+ IPv6 support requires winsock2.h, but the default of wxUSE_WINSOCK2 is 0.
+ Don't require changing it explicitly and just turn it on automatically if
+ wxUSE_IPV6 is on.
+ */
+#if wxUSE_IPV6 && !wxUSE_WINSOCK2
+ #undef wxUSE_WINSOCK2
+ #define wxUSE_WINSOCK2 1
+#endif
+
#endif /* _WX_MSW_CHKCONF_H_ */
diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h
index 7e16a138b2..e541499f9a 100644
--- a/include/wx/msw/dc.h
+++ b/include/wx/msw/dc.h
@@ -125,7 +125,7 @@ public:
}
void* GetHandle() const wxOVERRIDE { return (void*)GetHDC(); }
-
+
const wxBitmap& GetSelectedBitmap() const wxOVERRIDE { return m_selectedBitmap; }
wxBitmap& GetSelectedBitmap() wxOVERRIDE { return m_selectedBitmap; }
@@ -294,9 +294,6 @@ protected:
// MSW-specific member variables
// -----------------------------
- // the window associated with this DC (may be NULL)
- wxWindow *m_canvas;
-
wxBitmap m_selectedBitmap;
// TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it
diff --git a/include/wx/msw/dde.h b/include/wx/msw/dde.h
index 91fdd06f96..a7cd04ccda 100644
--- a/include/wx/msw/dde.h
+++ b/include/wx/msw/dde.h
@@ -70,7 +70,6 @@ public:
WXHCONV m_hConv;
const void* m_sendingData;
int m_dataSize;
- wxIPCFormat m_dataType;
wxDECLARE_NO_COPY_CLASS(wxDDEConnection);
wxDECLARE_DYNAMIC_CLASS(wxDDEConnection);
diff --git a/include/wx/msw/headerctrl.h b/include/wx/msw/headerctrl.h
index c261ee1ac7..aaaecd942f 100644
--- a/include/wx/msw/headerctrl.h
+++ b/include/wx/msw/headerctrl.h
@@ -58,7 +58,7 @@ protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
-
+
private:
// implement base class pure virtuals
virtual void DoSetCount(unsigned int count) wxOVERRIDE;
diff --git a/include/wx/msw/missing.h b/include/wx/msw/missing.h
index 1443a1069e..ec6b93efc8 100644
--- a/include/wx/msw/missing.h
+++ b/include/wx/msw/missing.h
@@ -262,7 +262,7 @@
#define TVM_GETEXTENDEDSTYLE (TV_FIRST + 45)
#endif
-// Various defines used by the webview library that are needed by mingw
+// Various defines used by the webview library that are needed by mingw
#ifndef DISPID_COMMANDSTATECHANGE
#define DISPID_COMMANDSTATECHANGE 105
diff --git a/include/wx/msw/popupwin.h b/include/wx/msw/popupwin.h
index d41dda58e5..bba24abfae 100644
--- a/include/wx/msw/popupwin.h
+++ b/include/wx/msw/popupwin.h
@@ -25,11 +25,15 @@ public:
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
+ virtual void SetFocus() wxOVERRIDE;
virtual bool Show(bool show = true) wxOVERRIDE;
// return the style to be used for the popup windows
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const wxOVERRIDE;
+ // get the HWND to be used as parent of this window with CreateWindow()
+ virtual WXHWND MSWGetParent() const wxOVERRIDE;
+
// Implementation only from now on.
diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h
index dcbb2d7fde..7b502ecbef 100644
--- a/include/wx/msw/setup0.h
+++ b/include/wx/msw/setup0.h
@@ -1713,6 +1713,13 @@
// Recommended setting: 0, nobody uses .INI files any more
#define wxUSE_INICONF 0
+// Set to 1 if you need to include over
+//
+// Default is 0.
+//
+// Recommended setting: 0, set to 1 automatically if wxUSE_IPV6 is 1.
+#define wxUSE_WINSOCK2 0
+
// ----------------------------------------------------------------------------
// Generic versions of native controls
// ----------------------------------------------------------------------------
diff --git a/include/wx/msw/setup_inc.h b/include/wx/msw/setup_inc.h
index ff5fc00102..6a1ea9dbec 100644
--- a/include/wx/msw/setup_inc.h
+++ b/include/wx/msw/setup_inc.h
@@ -156,6 +156,13 @@
// Recommended setting: 0, nobody uses .INI files any more
#define wxUSE_INICONF 0
+// Set to 1 if you need to include over
+//
+// Default is 0.
+//
+// Recommended setting: 0, set to 1 automatically if wxUSE_IPV6 is 1.
+#define wxUSE_WINSOCK2 0
+
// ----------------------------------------------------------------------------
// Generic versions of native controls
// ----------------------------------------------------------------------------
diff --git a/include/wx/msw/uxtheme.h b/include/wx/msw/uxtheme.h
index 3207521c0a..9d7000cd3b 100644
--- a/include/wx/msw/uxtheme.h
+++ b/include/wx/msw/uxtheme.h
@@ -13,6 +13,8 @@
#include "wx/defs.h"
+#if wxUSE_UXTHEME
+
#include "wx/msw/private.h" // we use GetHwndOf()
#include
@@ -253,5 +255,11 @@ private:
wxDECLARE_NO_COPY_CLASS(wxUxThemeHandle);
};
+#else // !wxUSE_UXTHEME
+
+inline bool wxUxThemeIsActive() { return false; }
+
+#endif // wxUSE_UXTHEME/!wxUSE_UXTHEME
+
#endif // _WX_UXTHEME_H_
diff --git a/include/wx/msw/webview_ie.h b/include/wx/msw/webview_ie.h
index 3a4f042c16..d12864be5c 100644
--- a/include/wx/msw/webview_ie.h
+++ b/include/wx/msw/webview_ie.h
@@ -36,6 +36,31 @@ class DocHostUIHandler;
class wxFindPointers;
class wxIInternetProtocol;
+// Note that the highest emulation level may be used even when the
+// corresponding browser version is not installed.
+//
+// Using FORCE options is not recommended, DEFAULT can be used to reset level
+// to the system default.
+//
+// The value of the constants were taken from
+//
+// https://msdn.microsoft.com/library/ee330730.aspx#browser_emulation
+//
+// and must not be changed.
+enum wxWebViewIE_EmulationLevel
+{
+ wxWEBVIEWIE_EMU_DEFAULT = 0,
+ wxWEBVIEWIE_EMU_IE7 = 7000,
+ wxWEBVIEWIE_EMU_IE8 = 8000,
+ wxWEBVIEWIE_EMU_IE8_FORCE = 8888,
+ wxWEBVIEWIE_EMU_IE9 = 9000,
+ wxWEBVIEWIE_EMU_IE9_FORCE = 9999,
+ wxWEBVIEWIE_EMU_IE10 = 10000,
+ wxWEBVIEWIE_EMU_IE10_FORCE = 10001,
+ wxWEBVIEWIE_EMU_IE11 = 11000,
+ wxWEBVIEWIE_EMU_IE11_FORCE = 11001
+};
+
class WXDLLIMPEXP_WEBVIEW wxWebViewIE : public wxWebView
{
public:
@@ -144,9 +169,19 @@ public:
void onActiveXEvent(wxActiveXEvent& evt);
void onEraseBg(wxEraseEvent&) {}
- // Establish sufficiently modern emulation level for the browser control to
- // allow RunScript() to return any kind of values.
- static bool MSWSetModernEmulationLevel(bool modernLevel = true);
+ // Switch to specific emulation level for the browser control to
+ // ensure RunScript() and web pages work as designed and also change the
+ // value of User-Agent header sent to web server.
+ static bool
+ MSWSetEmulationLevel(wxWebViewIE_EmulationLevel level = wxWEBVIEWIE_EMU_IE11);
+
+ // This function is provided only for compatibility reasons, use
+ // MSWSetEmulationLevel() in the new code instead.
+ static bool MSWSetModernEmulationLevel(bool modernLevel = true)
+ {
+ return MSWSetEmulationLevel(modernLevel ? wxWEBVIEWIE_EMU_IE8
+ : wxWEBVIEWIE_EMU_DEFAULT);
+ }
wxDECLARE_EVENT_TABLE();
diff --git a/include/wx/msw/wrapwin.h b/include/wx/msw/wrapwin.h
index e4ef98a6b6..dbb3173af2 100644
--- a/include/wx/msw/wrapwin.h
+++ b/include/wx/msw/wrapwin.h
@@ -28,9 +28,10 @@
#endif // NOMINMAX
-// For IPv6 support, we must include winsock2.h before winsock.h, and
-// windows.h include winsock.h so do it before including it
-#if wxUSE_IPV6
+// When the application wants to use (this is required for IPv6
+// support, for example), we must include it before winsock.h, and as windows.h
+// includes winsock.h, we have to do it before including it.
+#if wxUSE_WINSOCK2
#include
#endif
diff --git a/include/wx/odcombo.h b/include/wx/odcombo.h
index 7fe4cddd8a..11755fe356 100644
--- a/include/wx/odcombo.h
+++ b/include/wx/odcombo.h
@@ -178,7 +178,7 @@ protected:
void StopPartialCompletion();
wxArrayString m_strings;
- wxArrayPtrVoid m_clientDatas;
+ wxVector m_clientDatas;
wxFont m_useFont;
diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h
index a16b112f1f..08632e4477 100644
--- a/include/wx/osx/app.h
+++ b/include/wx/osx/app.h
@@ -82,7 +82,7 @@ public:
// TODO change semantics to be in line with cocoa (make autrelease NOT increase the count)
void MacAddToAutorelease( void* cfrefobj );
void MacReleaseAutoreleasePool();
-
+
public:
static wxWindow* s_captureWindow ;
static long s_lastModifiers ;
@@ -95,7 +95,7 @@ protected:
// override for support of custom app controllers
virtual WX_NSObject OSXCreateAppController();
#endif
-
+
private:
virtual bool DoInitGui();
virtual void DoCleanUp();
@@ -155,14 +155,14 @@ private:
wxArrayString m_openFiles;
wxArrayString m_printFiles;
wxString m_getURL;
-
+
public:
bool OSXInitWasCalled() { return m_inited; }
void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
void OSXStorePrintFiles(const wxArrayString &files ) { m_printFiles = files ; }
void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; }
#endif
-
+
// Hide the application windows the same as the system hide command would do it.
void MacHideApp();
diff --git a/include/wx/osx/bitmap.h b/include/wx/osx/bitmap.h
index 65255198e9..04d0c867d1 100644
--- a/include/wx/osx/bitmap.h
+++ b/include/wx/osx/bitmap.h
@@ -107,7 +107,7 @@ public:
// Constructor for generalised creation from data
wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1);
-
+
// creates an bitmap from the native image format
wxBitmap(CGImageRef image, double scale = 1.0);
wxBitmap(WXImage image);
@@ -115,7 +115,7 @@ public:
// Create a bitmap compatible with the given DC
wxBitmap(int width, int height, const wxDC& dc);
-
+
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); }
wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); }
@@ -141,13 +141,13 @@ public:
bool Create( CGImageRef image, double scale = 1.0 );
bool Create( WXImage image );
bool Create( CGContextRef bitmapcontext);
-
+
// Create a bitmap compatible with the given DC, inheriting its magnification factor
bool Create(int width, int height, const wxDC& dc);
// Create a bitmap with a scale factor, width and height are multiplied with that factor
bool CreateScaled(int logwidth, int logheight, int depth, double logicalScale);
-
+
// virtual bool Create( WXHICON icon) ;
virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const;
diff --git a/include/wx/osx/cocoa/chkconf.h b/include/wx/osx/cocoa/chkconf.h
index 5cc104b02d..f2b5f528a6 100644
--- a/include/wx/osx/cocoa/chkconf.h
+++ b/include/wx/osx/cocoa/chkconf.h
@@ -22,7 +22,7 @@
/*
* leave is isFlipped and don't override
*/
-#ifndef wxOSX_USE_NATIVE_FLIPPED
+#ifndef wxOSX_USE_NATIVE_FLIPPED
#define wxOSX_USE_NATIVE_FLIPPED 1
#endif
diff --git a/include/wx/osx/cocoa/dataview.h b/include/wx/osx/cocoa/dataview.h
index 58d9495f6e..b4203ca6ee 100644
--- a/include/wx/osx/cocoa/dataview.h
+++ b/include/wx/osx/cocoa/dataview.h
@@ -532,7 +532,7 @@ public:
virtual void SetRowHeight(int height);
virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height);
virtual void OnSize();
-
+
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
// drag & drop helper methods
diff --git a/include/wx/osx/cocoa/evtloop.h b/include/wx/osx/cocoa/evtloop.h
index ab15dd94af..12fd66a33a 100644
--- a/include/wx/osx/cocoa/evtloop.h
+++ b/include/wx/osx/cocoa/evtloop.h
@@ -15,16 +15,16 @@ class WXDLLIMPEXP_BASE wxGUIEventLoop : public wxCFEventLoop
public:
wxGUIEventLoop();
~wxGUIEventLoop();
-
+
void BeginModalSession( wxWindow* modalWindow );
-
+
void EndModalSession();
virtual void WakeUp();
void OSXUseLowLevelWakeup(bool useIt)
{ m_osxLowLevelWakeUp = useIt ; }
-
+
protected:
virtual int DoDispatchTimeout(unsigned long timeout);
@@ -32,15 +32,15 @@ protected:
virtual void OSXDoStop();
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
-
+
void* m_modalSession;
-
+
wxWindow* m_modalWindow;
-
+
WXWindow m_dummyWindow;
-
+
int m_modalNestedLevel;
-
+
bool m_osxLowLevelWakeUp;
};
diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h
index 18267fda31..cc990135cc 100644
--- a/include/wx/osx/cocoa/private.h
+++ b/include/wx/osx/cocoa/private.h
@@ -50,7 +50,7 @@ class WXDLLIMPEXP_FWD_CORE wxDialog;
class WXDLLIMPEXP_CORE wxWidgetCocoaImpl : public wxWidgetImpl
{
public :
- wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false, bool isUserPane = false ) ;
+ wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, int flags = 0 ) ;
wxWidgetCocoaImpl() ;
~wxWidgetCocoaImpl();
@@ -163,7 +163,7 @@ public :
#endif
virtual double GetContentScaleFactor() const;
-
+
// cocoa thunk connected calls
#if wxUSE_DRAG_AND_DROP
@@ -281,20 +281,20 @@ public :
virtual void SetRepresentedFilename(const wxString& filename) wxOVERRIDE;
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
-
+
CGWindowLevel GetWindowLevel() const wxOVERRIDE { return m_macWindowLevel; }
void RestoreWindowLevel() wxOVERRIDE;
-
+
static WX_NSResponder GetNextFirstResponder() ;
static WX_NSResponder GetFormerFirstResponder() ;
protected :
CGWindowLevel m_macWindowLevel;
WXWindow m_macWindow;
void * m_macFullScreenData ;
-
+
private:
void SetUpForModalParent();
-
+
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCocoaImpl);
};
@@ -308,7 +308,7 @@ public:
#if wxUSE_MARKUP
virtual void SetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP
-
+
void SetPressedBitmap( const wxBitmap& bitmap );
void GetLayoutInset(int &left , int &top , int &right, int &bottom) const;
void SetAcceleratorFromLabel(const wxString& label);
diff --git a/include/wx/osx/cocoa/private/textimpl.h b/include/wx/osx/cocoa/private/textimpl.h
index fa42e78341..fc44aeb15d 100644
--- a/include/wx/osx/cocoa/private/textimpl.h
+++ b/include/wx/osx/cocoa/private/textimpl.h
@@ -97,7 +97,7 @@ public:
virtual ~wxNSTextViewControl();
virtual void insertText(NSString* text, WXWidget slf, void *_cmd) wxOVERRIDE;
-
+
virtual wxString GetStringValue() const wxOVERRIDE ;
virtual void SetStringValue( const wxString &str) wxOVERRIDE ;
virtual void Copy() wxOVERRIDE ;
diff --git a/include/wx/osx/config_xcode.h b/include/wx/osx/config_xcode.h
index 1a4946c0e1..ab61d65363 100644
--- a/include/wx/osx/config_xcode.h
+++ b/include/wx/osx/config_xcode.h
@@ -126,9 +126,9 @@
#define PACKAGE_BUGREPORT "wx-dev@googlegroups.com"
#define PACKAGE_NAME "wxWidgets"
-#define PACKAGE_STRING "wxWidgets 3.1.2"
+#define PACKAGE_STRING "wxWidgets 3.1.3"
#define PACKAGE_TARNAME "wxwidgets"
-#define PACKAGE_VERSION "3.1.2"
+#define PACKAGE_VERSION "3.1.3"
// for regex
#define WX_NO_REGEX_ADVANCED 1
diff --git a/include/wx/osx/core/cfdictionary.h b/include/wx/osx/core/cfdictionary.h
index d27c0f5891..d3028e90c7 100644
--- a/include/wx/osx/core/cfdictionary.h
+++ b/include/wx/osx/core/cfdictionary.h
@@ -119,7 +119,7 @@ public:
{
SetValue(key, wxCFNumberRef(v));
}
-
+
CFMutableDictionaryRef CreateCopy() const
{
return CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, this->m_ptr);
diff --git a/include/wx/osx/core/cfref.h b/include/wx/osx/core/cfref.h
index b441693779..be349c08e7 100644
--- a/include/wx/osx/core/cfref.h
+++ b/include/wx/osx/core/cfref.h
@@ -176,7 +176,7 @@ public:
*/
wxCFRef(refType p) : m_ptr(p)
{
-
+
}
/*! @method wxCFRef
@abstract Assumes ownership of p and creates a reference to it.
@@ -190,7 +190,7 @@ public:
This method is templated and takes an otherType *p. This prevents implicit conversion
using an operator refType() in a different ref-holding class type.
*/
-
+
template
explicit wxCFRef(otherType *p)
: m_ptr(p) // Implicit conversion from otherType* to refType should occur.
diff --git a/include/wx/osx/core/colour.h b/include/wx/osx/core/colour.h
index d3b6ec4eb6..cb0ce23367 100644
--- a/include/wx/osx/core/colour.h
+++ b/include/wx/osx/core/colour.h
@@ -47,10 +47,10 @@ public:
// This ctor does take ownership of the color.
wxColour( CGColorRef col );
-
+
// don't take ownership of the returned value
CGColorRef GetCGColor() const;
-
+
// do take ownership of the returned value
CGColorRef CreateCGColor() const { return wxCFRetain(GetCGColor()); }
@@ -69,7 +69,7 @@ public:
explicit wxColour(WX_NSColor color);
WX_NSColor OSXGetNSColor() const;
#endif
-
+
protected :
virtual void
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) wxOVERRIDE;
@@ -87,19 +87,19 @@ class wxColourRefData : public wxGDIRefData
public:
wxColourRefData() {}
virtual ~wxColourRefData() {}
-
+
virtual CGFloat Red() const = 0;
virtual CGFloat Green() const = 0;
virtual CGFloat Blue() const = 0;
virtual CGFloat Alpha() const = 0;
-
+
virtual bool IsSolid() const
{ return true; }
virtual CGColorRef GetCGColor() const = 0;
-
+
virtual wxColourRefData* Clone() const = 0;
-
+
#if wxOSX_USE_COCOA
virtual WX_NSColor GetNSColor() const;
#endif
diff --git a/include/wx/osx/core/evtloop.h b/include/wx/osx/core/evtloop.h
index 7c4f189fdf..c2be89e33b 100644
--- a/include/wx/osx/core/evtloop.h
+++ b/include/wx/osx/core/evtloop.h
@@ -43,7 +43,7 @@ public:
virtual void WakeUp();
bool ShouldProcessIdleEvents() const { return m_processIdleEvents ; }
-
+
#if wxUSE_UIACTIONSIMULATOR
// notifies Yield and Dispatch to wait for at least one event before
// returning, this is necessary, because the synthesized events need to be
diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h
index af0657ce8f..dfe47f4efd 100644
--- a/include/wx/osx/core/private.h
+++ b/include/wx/osx/core/private.h
@@ -168,7 +168,7 @@ public :
const wxString& strHelp,
wxItemKind kind,
wxMenu *pSubMenu );
-
+
// handle OS specific menu items if they weren't handled during normal processing
virtual bool DoDefault() { return false; }
protected :
@@ -197,7 +197,7 @@ public :
wxMenu* GetWXPeer() { return m_peer ; }
virtual void PopUp( wxWindow *win, int x, int y ) = 0;
-
+
virtual void GetMenuBarDimensions(int &x, int &y, int &width, int &height) const
{
x = y = width = height = -1;
@@ -216,16 +216,32 @@ protected :
class WXDLLIMPEXP_CORE wxWidgetImpl : public wxObject
{
public :
- wxWidgetImpl( wxWindowMac* peer , bool isRootControl = false, bool isUserPane = false );
+ enum WidgetFlags
+ {
+ Widget_IsRoot = 0x0001,
+ Widget_IsUserPane = 0x0002,
+ Widget_UserKeyEvents = 0x0004,
+ Widget_UserMouseEvents = 0x0008,
+ };
+
+ wxWidgetImpl( wxWindowMac* peer , bool isRootControl, bool isUserPane, bool wantsUserKey );
+ wxWidgetImpl( wxWindowMac* peer , int flags = 0 );
wxWidgetImpl();
virtual ~wxWidgetImpl();
void Init();
bool IsRootControl() const { return m_isRootControl; }
-
+
+ // is a custom control that has all events handled in wx code, no built-ins
bool IsUserPane() const { return m_isUserPane; }
+ // we are doing keyboard handling in wx code, other events might be handled natively
+ virtual bool HasUserKeyHandling() const { return m_wantsUserKey; }
+
+ // we are doing mouse handling in wx code, other events might be handled natively
+ virtual bool HasUserMouseHandling() const { return m_wantsUserMouse; }
+
wxWindowMac* GetWXPeer() const { return m_wxPeer; }
bool IsOk() const { return GetWXWidget() != NULL; }
@@ -264,7 +280,7 @@ public :
{
return 1.0;
}
-
+
// the native coordinates may have an 'aura' for shadows etc, if this is the case the layout
// inset indicates on which insets the real control is drawn
virtual void GetLayoutInset(int &left , int &top , int &right, int &bottom) const
@@ -283,7 +299,7 @@ public :
virtual bool NeedsFrame() const;
virtual void SetNeedsFrame( bool needs );
-
+
virtual void SetDrawingEnabled(bool enabled);
virtual bool CanFocus() const = 0;
@@ -306,7 +322,7 @@ public :
virtual void SetCursor( const wxCursor & cursor ) = 0;
virtual void CaptureMouse() = 0;
virtual void ReleaseMouse() = 0;
-
+
virtual void SetDropTarget( wxDropTarget * WXUNUSED(dropTarget) ) {}
virtual wxInt32 GetValue() const = 0;
@@ -355,7 +371,7 @@ public :
// of a known control
static wxWidgetImpl*
FindBestFromWXWidget(WXWidget control);
-
+
static void RemoveAssociations( wxWidgetImpl* impl);
static void RemoveAssociation(WXWidget control);
@@ -572,6 +588,8 @@ public :
protected :
bool m_isRootControl;
bool m_isUserPane;
+ bool m_wantsUserKey;
+ bool m_wantsUserMouse;
wxWindowMac* m_wxPeer;
bool m_needsFocusRect;
bool m_needsFrame;
@@ -937,7 +955,7 @@ public :
virtual void ScreenToWindow( int *x, int *y ) = 0;
virtual void WindowToScreen( int *x, int *y ) = 0;
-
+
virtual bool IsActive() = 0;
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
diff --git a/include/wx/osx/dataobj.h b/include/wx/osx/dataobj.h
index 45a73f289f..86ab65d748 100644
--- a/include/wx/osx/dataobj.h
+++ b/include/wx/osx/dataobj.h
@@ -30,7 +30,7 @@ public:
// returns true if any of the accepted formats of this dataobj is in the pasteboard
bool HasDataInPasteboard( void * pasteboardRef );
bool GetFromPasteboard( void * pasteboardRef );
-
+
#if wxOSX_USE_COCOA
virtual void AddSupportedTypes( void* cfarray);
#endif
diff --git a/include/wx/osx/dataview.h b/include/wx/osx/dataview.h
index 2b958c60a4..2eb826b5c4 100644
--- a/include/wx/osx/dataview.h
+++ b/include/wx/osx/dataview.h
@@ -205,7 +205,7 @@ public:
// finishes editing of custom items; if no custom item is currently edited the method does nothing
void FinishCustomItemEditing();
-
+
virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) wxOVERRIDE;
// returns the n-th pointer to a column;
diff --git a/include/wx/osx/dialog.h b/include/wx/osx/dialog.h
index bce052f4c2..e8d871cd54 100644
--- a/include/wx/osx/dialog.h
+++ b/include/wx/osx/dialog.h
@@ -62,7 +62,7 @@ public:
static bool OSXHasModalDialogsOpen();
void OSXBeginModalDialog();
void OSXEndModalDialog();
-
+
#if wxOSX_USE_COCOA
bool OSXGetWorksWhenModal();
void OSXSetWorksWhenModal(bool worksWhenModal);
@@ -94,7 +94,7 @@ protected:
private:
void Init();
-
+
static wxVector s_modalStack;
#if wxOSX_USE_COCOA
static wxVector s_modalWorksStack;
diff --git a/include/wx/osx/evtloop.h b/include/wx/osx/evtloop.h
index cbbab016d6..e9e7545f18 100644
--- a/include/wx/osx/evtloop.h
+++ b/include/wx/osx/evtloop.h
@@ -23,7 +23,7 @@ class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop
public:
wxModalEventLoop(wxWindow *modalWindow);
wxModalEventLoop(WXWindow modalNativeWindow);
-
+
#ifdef __WXOSX_COCOA__
// skip wxGUIEventLoop to avoid missing Enter/Exit notifications
virtual int Run() { return wxCFEventLoop::Run(); }
diff --git a/include/wx/osx/filedlg.h b/include/wx/osx/filedlg.h
index d8e8a862a6..e106a48629 100644
--- a/include/wx/osx/filedlg.h
+++ b/include/wx/osx/filedlg.h
@@ -17,7 +17,7 @@ class WXDLLIMPEXP_FWD_CORE wxChoice;
// wxFileDialog
//-------------------------------------------------------------------------
-// set this system option to 1 in order to always show the filetypes popup in
+// set this system option to 1 in order to always show the filetypes popup in
// file open dialogs if possible
#define wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES wxT("osx.openfiledialog.always-show-types")
@@ -59,7 +59,7 @@ public:
#if wxOSX_USE_COCOA
~wxFileDialog();
#endif
-
+
virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
@@ -71,9 +71,9 @@ public:
#endif
virtual bool SupportsExtraControl() const;
-
+
// implementation only
-
+
#if wxOSX_USE_COCOA
// returns true if the file can be shown as active
bool CheckFile( const wxString& filename );
@@ -86,7 +86,7 @@ protected:
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
void SetupExtraControls(WXWindow nativeWindow);
-
+
#if wxOSX_USE_COCOA
virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
void DoOnFilterSelected(int index);
diff --git a/include/wx/osx/iphone/private.h b/include/wx/osx/iphone/private.h
index 484e7525ee..a0694ed2d7 100644
--- a/include/wx/osx/iphone/private.h
+++ b/include/wx/osx/iphone/private.h
@@ -37,7 +37,7 @@ wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxSt
class WXDLLIMPEXP_CORE wxWidgetIPhoneImpl : public wxWidgetImpl
{
public :
- wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false, bool isUserPane = false ) ;
+ wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, int flags = 0 ) ;
wxWidgetIPhoneImpl() ;
~wxWidgetIPhoneImpl();
@@ -63,7 +63,7 @@ public :
virtual void GetSize( int &width, int &height ) const;
virtual void SetControlSize( wxWindowVariant variant );
virtual double GetContentScaleFactor() const ;
-
+
virtual void SetNeedsDisplay( const wxRect* where = NULL );
virtual bool GetNeedsDisplay() const;
@@ -176,7 +176,7 @@ public :
virtual bool IsFullScreen() const;
virtual bool EnableFullScreenView(bool enable);
-
+
virtual bool ShowFullScreen(bool show, long style);
virtual void RequestUserAttention(int flags);
diff --git a/include/wx/osx/iphone/private/textimpl.h b/include/wx/osx/iphone/private/textimpl.h
index 7c9e5fd109..4019881872 100644
--- a/include/wx/osx/iphone/private/textimpl.h
+++ b/include/wx/osx/iphone/private/textimpl.h
@@ -34,10 +34,10 @@ public :
virtual void WriteText(const wxString& str) ;
virtual bool HasOwnContextMenu() const { return true; }
- virtual wxSize GetBestSize() const;
-
+ virtual wxSize GetBestSize() const;
+
virtual bool SetHint(const wxString& hint);
-
+
virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
protected :
UITextField* m_textField;
diff --git a/include/wx/osx/menu.h b/include/wx/osx/menu.h
index d9808e5f1d..2fee40e622 100644
--- a/include/wx/osx/menu.h
+++ b/include/wx/osx/menu.h
@@ -170,7 +170,7 @@ public:
static WXHMENU MacGetWindowMenuHMenu() { return s_macWindowMenuHandle ; }
-
+
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetClientSize(int *width, int *height) const;
diff --git a/include/wx/osx/msgdlg.h b/include/wx/osx/msgdlg.h
index c4257aff57..4d6e9d6a87 100644
--- a/include/wx/osx/msgdlg.h
+++ b/include/wx/osx/msgdlg.h
@@ -24,7 +24,7 @@ public:
#if wxOSX_USE_COCOA
~wxMessageDialog();
#endif
-
+
virtual int ShowModal();
#if wxOSX_USE_COCOA
diff --git a/include/wx/osx/nonownedwnd.h b/include/wx/osx/nonownedwnd.h
index a52eae9922..41c9ca0492 100644
--- a/include/wx/osx/nonownedwnd.h
+++ b/include/wx/osx/nonownedwnd.h
@@ -64,7 +64,7 @@ public:
virtual void UnsubclassWin();
virtual wxPoint GetClientAreaOrigin() const;
-
+
// implement base class pure virtuals
virtual bool SetTransparent(wxByte alpha);
@@ -151,7 +151,7 @@ protected:
private :
static clock_t s_lastFlush;
-
+
wxRegion m_shape;
#if wxUSE_GRAPHICS_CONTEXT
wxGraphicsPath m_shapePath;
diff --git a/include/wx/osx/popupwin.h b/include/wx/osx/popupwin.h
index 21065febcf..8d9be37dee 100644
--- a/include/wx/osx/popupwin.h
+++ b/include/wx/osx/popupwin.h
@@ -27,7 +27,7 @@ public:
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
virtual bool Show(bool show = true);
-
+
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow);
};
diff --git a/include/wx/osx/toolbar.h b/include/wx/osx/toolbar.h
index 70a33f77a7..52febf14a3 100644
--- a/include/wx/osx/toolbar.h
+++ b/include/wx/osx/toolbar.h
@@ -95,9 +95,9 @@ public:
protected:
// common part of all ctors
void Init();
-
+
void DoLayout();
-
+
void DoSetSize(int x, int y, int width, int height, int sizeFlags) wxOVERRIDE;
#ifndef __WXOSX_IPHONE__
diff --git a/include/wx/osx/toplevel.h b/include/wx/osx/toplevel.h
index 72f58c98a6..c54528d97a 100644
--- a/include/wx/osx/toplevel.h
+++ b/include/wx/osx/toplevel.h
@@ -82,7 +82,7 @@ public:
virtual void SetLabel(const wxString& label) wxOVERRIDE { SetTitle( label ); }
virtual wxString GetLabel() const wxOVERRIDE { return GetTitle(); }
-
+
virtual void OSXSetModified(bool modified) wxOVERRIDE;
virtual bool OSXIsModified() const wxOVERRIDE;
diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h
index dc54ec061c..32730fb613 100644
--- a/include/wx/osx/webview_webkit.h
+++ b/include/wx/osx/webview_webkit.h
@@ -14,7 +14,7 @@
#include "wx/defs.h"
-#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX__)
+#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX__)
#include "wx/control.h"
#include "wx/webview.h"
@@ -86,10 +86,10 @@ public:
//Find function
virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) wxOVERRIDE
- {
+ {
wxUnusedVar(text);
wxUnusedVar(flags);
- return wxNOT_FOUND;
+ return wxNOT_FOUND;
}
//Clipboard functions
diff --git a/include/wx/osx/window.h b/include/wx/osx/window.h
index b192b44b47..46ab294af7 100644
--- a/include/wx/osx/window.h
+++ b/include/wx/osx/window.h
@@ -52,7 +52,7 @@ public:
const wxString& name = wxPanelNameStr );
virtual void SendSizeEvent(int flags = 0) wxOVERRIDE;
-
+
// implement base class pure virtuals
virtual void SetLabel( const wxString& label ) wxOVERRIDE;
virtual wxString GetLabel() const wxOVERRIDE;
@@ -92,10 +92,10 @@ public:
virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE;
virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const wxOVERRIDE;
-
+
virtual int GetCharHeight() const wxOVERRIDE;
virtual int GetCharWidth() const wxOVERRIDE;
-
+
public:
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true ) wxOVERRIDE;
@@ -117,16 +117,14 @@ public:
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
// hot keys (system wide accelerators)
// -----------------------------------
-
+
virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode) wxOVERRIDE;
virtual bool UnregisterHotKey(int hotkeyId) wxOVERRIDE;
#endif // wxUSE_HOTKEY
-
+
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE;
- // Accept files for dragging
- virtual void DragAcceptFiles( bool accept ) wxOVERRIDE;
#endif
// implementation from now on
@@ -255,7 +253,7 @@ public:
// the 'true' OS level control for this wxWindow
wxOSXWidgetImpl* GetPeer() const;
-
+
// optimization to avoid creating a user pane in wxWindow::Create if we already know
// we will replace it with our own peer
void DontCreatePeer();
@@ -263,10 +261,10 @@ public:
// return true unless DontCreatePeer() had been called
bool ShouldCreatePeer() const;
- // sets the native implementation wrapper, can replace an existing peer, use peer = NULL to
+ // sets the native implementation wrapper, can replace an existing peer, use peer = NULL to
// release existing peer
void SetPeer(wxOSXWidgetImpl* peer);
-
+
// wraps the already existing peer with the wrapper
void SetWrappingPeer(wxOSXWidgetImpl* wrapper);
@@ -289,9 +287,9 @@ public:
virtual void OSXSimulateFocusEvents();
bool IsNativeWindowWrapper() const { return m_isNativeWindowWrapper; }
-
+
double GetContentScaleFactor() const wxOVERRIDE;
-
+
// internal response to size events
virtual void MacOnInternalSize() {}
diff --git a/include/wx/popupwin.h b/include/wx/popupwin.h
index 3d20bf4a7b..e8c0dd9242 100644
--- a/include/wx/popupwin.h
+++ b/include/wx/popupwin.h
@@ -15,6 +15,15 @@
#if wxUSE_POPUPWIN
+// ----------------------------------------------------------------------------
+// wxPopupWindow specific flags
+// ----------------------------------------------------------------------------
+
+// This flag can be used in MSW if some controls are not working with the
+// default popup style.
+#define wxPU_CONTAINS_CONTROLS 0x0001
+
+
#include "wx/nonownedwnd.h"
// ----------------------------------------------------------------------------
@@ -124,6 +133,13 @@ public:
wxPopupTransientWindow() { }
wxPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE)
{ Create(parent, style); }
+ bool Create(wxWindow *parent, int style = wxBORDER_NONE)
+ {
+ return wxPopupTransientWindowBase::Create
+ (
+ parent, style | wxPU_CONTAINS_CONTROLS
+ );
+ }
// Implement base class pure virtuals.
virtual void Popup(wxWindow *focus = NULL) wxOVERRIDE;
diff --git a/include/wx/private/display.h b/include/wx/private/display.h
index 9a97a75f9c..15668eaaf8 100644
--- a/include/wx/private/display.h
+++ b/include/wx/private/display.h
@@ -22,7 +22,7 @@ class wxDisplayFactory
{
public:
wxDisplayFactory() { }
- virtual ~wxDisplayFactory();
+ virtual ~wxDisplayFactory() { ClearImpls(); }
// Create the display if necessary using CreateDisplay(), otherwise just
// get it from cache.
@@ -48,6 +48,9 @@ public:
// the window pointer must not be NULL (i.e. caller should check it)
virtual int GetFromWindow(const wxWindow *window);
+ // Trigger recreation of wxDisplayImpl when they're needed the next time.
+ void InvalidateCache() { ClearImpls(); }
+
protected:
// create a new display object
//
@@ -55,6 +58,9 @@ protected:
virtual wxDisplayImpl *CreateDisplay(unsigned n) = 0;
private:
+ // Delete all the elements of m_impls vector and clear it.
+ void ClearImpls();
+
// On-demand populated vector of wxDisplayImpl objects.
wxVector m_impls;
diff --git a/include/wx/private/notifmsg.h b/include/wx/private/notifmsg.h
index 772a9c308e..3f02a29e72 100644
--- a/include/wx/private/notifmsg.h
+++ b/include/wx/private/notifmsg.h
@@ -66,7 +66,7 @@ protected:
void SetActive(bool active)
{
m_active = active;
-
+
// Delete the implementation if the notification is detached
if (!m_notification && !active)
delete this;
diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h
index 7415530438..342d42e816 100644
--- a/include/wx/propgrid/advprops.h
+++ b/include/wx/propgrid/advprops.h
@@ -81,9 +81,9 @@ public:
wxColourPropertyValue( const wxColourPropertyValue& v )
: wxObject()
+ , m_colour(v.m_colour)
{
m_type = v.m_type;
- m_colour = v.m_colour;
}
void Init( wxUint32 type, const wxColour& colour )
@@ -94,9 +94,9 @@ public:
wxColourPropertyValue( const wxColour& colour )
: wxObject()
+ , m_colour(colour)
{
m_type = wxPG_COLOUR_CUSTOM;
- m_colour = colour;
}
wxColourPropertyValue( wxUint32 type )
diff --git a/include/wx/propgrid/editors.h b/include/wx/propgrid/editors.h
index 6b60d06d73..c9c8dddd31 100644
--- a/include/wx/propgrid/editors.h
+++ b/include/wx/propgrid/editors.h
@@ -458,7 +458,7 @@ public:
wxPGMultiButton( wxPropertyGrid* pg, const wxSize& sz );
virtual ~wxPGMultiButton() {}
- wxWindow* GetButton( unsigned int i ) { return (wxWindow*) m_buttons[i]; }
+ wxWindow* GetButton( unsigned int i ) { return m_buttons[i]; }
const wxWindow* GetButton( unsigned int i ) const
{ return (const wxWindow*) m_buttons[i]; }
@@ -486,7 +486,7 @@ protected:
int GenId( int id ) const;
- wxArrayPtrVoid m_buttons;
+ wxVector m_buttons;
wxSize m_fullEditorSize;
int m_buttonsWidth;
};
diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h
index bbd0bb94d8..c83d421191 100644
--- a/include/wx/propgrid/manager.h
+++ b/include/wx/propgrid/manager.h
@@ -544,6 +544,7 @@ protected:
void OnResize( wxSizeEvent& event );
void OnPropertyGridSelect( wxPropertyGridEvent& event );
void OnPGColDrag( wxPropertyGridEvent& event );
+ void OnPGScrollH(wxPropertyGridEvent& evt);
wxPropertyGrid* m_pPropGrid;
@@ -561,8 +562,6 @@ protected:
wxPropertyGridPage* m_emptyPage;
- wxArrayString m_columnLabels;
-
long m_iFlags;
// Selected page index.
@@ -590,7 +589,7 @@ protected:
unsigned char m_dragStatus;
- unsigned char m_onSplitter;
+ bool m_onSplitter;
bool m_showHeader;
diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h
index 9239043908..68f6eab42c 100644
--- a/include/wx/propgrid/propgrid.h
+++ b/include/wx/propgrid/propgrid.h
@@ -338,8 +338,8 @@ class WXDLLIMPEXP_PROPGRID wxPGCommonValue
public:
wxPGCommonValue( const wxString& label, wxPGCellRenderer* renderer )
+ : m_label(label)
{
- m_label = label;
m_renderer = renderer;
renderer->IncRef();
}
@@ -1456,7 +1456,10 @@ public:
virtual bool SetFont( const wxFont& font ) wxOVERRIDE;
virtual void SetExtraStyle( long exStyle ) wxOVERRIDE;
virtual bool Reparent( wxWindowBase *newParent ) wxOVERRIDE;
-
+ virtual void ScrollWindow(int dx, int dy, const wxRect* rect) wxOVERRIDE;
+ virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
+ int noUnitsX, int noUnitsY,
+ int xPos, int yPos, bool noRefresh) wxOVERRIDE;
protected:
virtual void DoThaw() wxOVERRIDE;
@@ -1577,7 +1580,7 @@ protected:
#if !WXWIN_COMPATIBILITY_3_0
// List of editors and their event handlers to be deleted in idle event handler.
- wxArrayPGObject m_deletedEditorObjects;
+ wxVector m_deletedEditorObjects;
#endif
// List of key codes that will not be handed over to editor controls.
@@ -1687,10 +1690,8 @@ protected:
// Which column's editor is selected (usually 1)?
unsigned int m_selColumn;
-
// x relative to splitter (needed for resize).
int m_ctrlXAdjust;
-
// lines between cells
wxColour m_colLine;
// property labels and values are written in this colour
@@ -1925,11 +1926,13 @@ protected:
// Send event from the property grid.
// Omit the wxPG_SEL_NOVALIDATE flag to allow vetoing the event
- bool SendEvent( int eventType, wxPGProperty* p,
+ bool SendEvent( wxEventType eventType, wxPGProperty* p,
wxVariant* pValue = NULL,
unsigned int selFlags = wxPG_SEL_NOVALIDATE,
unsigned int column = 1 );
+ void SendEvent(wxEventType eventType, int intVal);
+
// This function only moves focus to the wxPropertyGrid if it already
// was on one of its child controls.
void SetFocusOnCanvas();
@@ -2027,6 +2030,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID,
wxEVT_PG_COL_DRAGGING, wxPropertyGridEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID,
wxEVT_PG_COL_END_DRAG, wxPropertyGridEvent );
+wxDECLARE_EVENT(wxEVT_PG_HSCROLL, wxPropertyGridEvent);
#else
enum {
diff --git a/include/wx/propgrid/propgriddefs.h b/include/wx/propgrid/propgriddefs.h
index 6eebf00177..1a18eccbac 100644
--- a/include/wx/propgrid/propgriddefs.h
+++ b/include/wx/propgrid/propgriddefs.h
@@ -24,6 +24,10 @@
#include "wx/longlong.h"
#include "wx/clntdata.h"
+#if wxUSE_STD_CONTAINERS
+#include
+#endif // wxUSE_STD_CONTAINERS
+
// -----------------------------------------------------------------------
//
@@ -308,9 +312,11 @@ WX_DECLARE_HASH_SET_WITH_DECL(int,
wxPGHashSetInt,
class WXDLLIMPEXP_PROPGRID);
+#if WXWIN_COMPATIBILITY_3_0
WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(wxObject*, wxArrayPGObject,
wxBaseArrayPtrVoid,
class WXDLLIMPEXP_PROPGRID);
+#endif // WXWIN_COMPATIBILITY_3_0
// -----------------------------------------------------------------------
@@ -760,6 +766,20 @@ inline void wxPGRemoveItemFromVector(wxVector& vector, const T& item)
#endif // wxUSE_STL/!wxUSE_STL
}
+// Utility to calaculate sum of all elements of the vector.
+template
+inline T wxPGGetSumVectorItems(const wxVector& vector, T init)
+{
+#if wxUSE_STD_CONTAINERS
+ return std::accumulate(vector.begin(), vector.end(), init);
+#else
+ for (typename wxVector::const_iterator it = vector.begin(); it != vector.end(); ++it)
+ init += *it;
+
+ return init;
+#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS
+}
+
// -----------------------------------------------------------------------
#endif // wxUSE_PROPGRID
diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h
index a5c4a601d9..358e2891ca 100644
--- a/include/wx/propgrid/props.h
+++ b/include/wx/propgrid/props.h
@@ -398,8 +398,6 @@ public:
// this take advantage of it.
virtual int GetChoiceSelection() const wxOVERRIDE { return m_index; }
- virtual void OnValidationFailure( wxVariant& pendingValue ) wxOVERRIDE;
-
protected:
int GetIndex() const;
@@ -796,8 +794,8 @@ wxValidator* PROPNAME::DoGetValidator () const \
#if wxUSE_EDITABLELISTBOX
-class WXDLLIMPEXP_FWD_CORE wxEditableListBox;
-class WXDLLIMPEXP_FWD_CORE wxListEvent;
+#include "wx/bmpbuttn.h"
+#include "wx/editlbox.h"
#define wxAEDIALOG_STYLE \
(wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE)
@@ -810,13 +808,6 @@ public:
void Init();
- wxPGArrayEditorDialog( wxWindow *parent,
- const wxString& message,
- const wxString& caption,
- long style = wxAEDIALOG_STYLE,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize );
-
bool Create( wxWindow *parent,
const wxString& message,
const wxString& caption,
@@ -829,6 +820,15 @@ public:
m_hasCustomNewAction = true;
}
+ void SetNewButtonText(const wxString& text)
+ {
+ m_customNewButtonText = text;
+ if ( m_elb && m_elb->GetNewButton() )
+ {
+ m_elb->GetNewButton()->SetToolTip(text);
+ }
+ }
+
// Set value modified by dialog.
virtual void SetDialogValue( const wxVariant& WXUNUSED(value) )
{
@@ -880,6 +880,7 @@ protected:
bool m_modified;
bool m_hasCustomNewAction;
+ wxString m_customNewButtonText;
// These must be overridden - must return true on success.
virtual wxString ArrayGet( size_t index ) = 0;
@@ -929,6 +930,7 @@ public:
if ( !custBtText.empty() )
{
EnableCustomNewAction();
+ SetNewButtonText(custBtText);
m_pCallingClass = pcc;
}
}
diff --git a/include/wx/qt/accel.h b/include/wx/qt/accel.h
index a710f7f0ab..3e53300030 100644
--- a/include/wx/qt/accel.h
+++ b/include/wx/qt/accel.h
@@ -33,6 +33,8 @@
* QShortcut. This handler will finally create and send the appropriate wx
* event to the window. */
+#include "wx/vector.h"
+
class QShortcut;
template < class T > class QList;
@@ -43,7 +45,7 @@ public:
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
// Implementation
- QList < QShortcut* > *ConvertShortcutTable( QWidget *parent ) const;
+ wxVector ConvertShortcutTable( QWidget *parent ) const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
@@ -52,8 +54,8 @@ protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
-
-private:
+
+private:
wxDECLARE_DYNAMIC_CLASS(wxAcceleratorTable);
};
diff --git a/include/wx/qt/anybutton.h b/include/wx/qt/anybutton.h
index f8cc359f97..eb3951aca7 100644
--- a/include/wx/qt/anybutton.h
+++ b/include/wx/qt/anybutton.h
@@ -18,9 +18,7 @@ class QPushButton;
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
{
public:
- wxAnyButton()
- {
- }
+ wxAnyButton();
// implementation
// --------------
@@ -29,6 +27,10 @@ public:
virtual QWidget *GetHandle() const;
+ // implementation only
+ void QtUpdateState();
+ virtual int GetEventType() const = 0;
+
protected:
virtual wxBitmap DoGetBitmap(State state) const wxOVERRIDE;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which) wxOVERRIDE;
@@ -39,8 +41,10 @@ protected:
void QtSetBitmap( const wxBitmap &bitmap );
private:
+ State QtGetCurrentState() const;
+
typedef wxAnyButtonBase base_type;
- wxBitmap m_bitmap;
+ wxBitmap m_bitmaps[State_Max];
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
};
diff --git a/include/wx/qt/app.h b/include/wx/qt/app.h
index 80bda3a773..2c7d51ff97 100644
--- a/include/wx/qt/app.h
+++ b/include/wx/qt/app.h
@@ -9,21 +9,23 @@
#ifndef _WX_QT_APP_H_
#define _WX_QT_APP_H_
+#include
+
class QApplication;
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
{
public:
wxApp();
~wxApp();
-
+
virtual bool Initialize(int& argc, wxChar **argv);
private:
- QApplication *m_qtApplication;
+ wxScopedPtr m_qtApplication;
int m_qtArgc;
- char **m_qtArgv;
-
+ wxScopedArray m_qtArgv;
+
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxApp );
};
-
+
#endif // _WX_QT_APP_H_
diff --git a/include/wx/qt/bitmap.h b/include/wx/qt/bitmap.h
index e03883ca3f..0da96633da 100644
--- a/include/wx/qt/bitmap.h
+++ b/include/wx/qt/bitmap.h
@@ -29,7 +29,7 @@ public:
wxBitmap(const char* const* bits);
wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH, double scale = 1.0);
-
+
// Convert from wxIcon / wxCursor
wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); }
explicit wxBitmap(const wxCursor& cursor);
diff --git a/include/wx/qt/brush.h b/include/wx/qt/brush.h
index 7dfe38ee22..60c116574f 100644
--- a/include/wx/qt/brush.h
+++ b/include/wx/qt/brush.h
@@ -35,12 +35,15 @@ public:
wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants")
void SetStyle(int style) { SetStyle((wxBrushStyle)style); }
-
+
QBrush GetHandle() const;
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
+
+private:
+ wxDECLARE_DYNAMIC_CLASS(wxBrush);
};
#endif // _WX_QT_BRUSH_H_
diff --git a/include/wx/qt/button.h b/include/wx/qt/button.h
index 0bbce110a4..d1b11c1f51 100644
--- a/include/wx/qt/button.h
+++ b/include/wx/qt/button.h
@@ -31,6 +31,9 @@ public:
virtual wxWindow *SetDefault();
+ // implementation only
+ virtual int GetEventType() const wxOVERRIDE { return wxEVT_BUTTON; }
+
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxButton);
};
diff --git a/include/wx/qt/choice.h b/include/wx/qt/choice.h
index 06602b9b68..5808879ea8 100644
--- a/include/wx/qt/choice.h
+++ b/include/wx/qt/choice.h
@@ -14,7 +14,7 @@ class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase
{
public:
wxChoice();
-
+
wxChoice( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@@ -22,7 +22,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr );
-
+
wxChoice( wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@@ -38,7 +38,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr );
-
+
bool Create( wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@@ -64,13 +64,15 @@ protected:
void **clientData,
wxClientDataType type);
virtual int DoInsertOneItem(const wxString& item, unsigned int pos);
-
+
virtual void DoSetItemClientData(unsigned int n, void *clientData);
virtual void *DoGetItemClientData(unsigned int n) const;
virtual void DoClear();
virtual void DoDeleteOneItem(unsigned int pos);
+ void QtInitSort(QComboBox *combo);
+
QComboBox *m_qtComboBox;
private:
diff --git a/include/wx/qt/colordlg.h b/include/wx/qt/colordlg.h
index fec19d7d94..48c535fa03 100644
--- a/include/wx/qt/colordlg.h
+++ b/include/wx/qt/colordlg.h
@@ -27,6 +27,8 @@ private:
QColorDialog *GetQColorDialog() const;
wxColourData m_data;
+
+ wxDECLARE_DYNAMIC_CLASS(wxColourDialog);
};
#endif // _WX_QT_COLORDLG_H_
diff --git a/include/wx/qt/combobox.h b/include/wx/qt/combobox.h
index 490e2cb117..c5bce191de 100644
--- a/include/wx/qt/combobox.h
+++ b/include/wx/qt/combobox.h
@@ -52,7 +52,7 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
- virtual void SetSelection(int n) wxOVERRIDE { wxChoice::SetSelection(n); }
+ virtual void SetSelection(int n) wxOVERRIDE;
virtual void SetSelection(long from, long to) wxOVERRIDE;
virtual int GetSelection() const wxOVERRIDE { return wxChoice::GetSelection(); }
@@ -70,6 +70,12 @@ public:
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
virtual void SetValue(const wxString& value) wxOVERRIDE;
+ virtual void ChangeValue(const wxString& value) wxOVERRIDE;
+ virtual void AppendText(const wxString &value) wxOVERRIDE;
+ virtual void Replace(long from, long to, const wxString &value) wxOVERRIDE;
+ virtual void WriteText(const wxString &value) wxOVERRIDE;
+ virtual void SetInsertionPoint(long insertion) wxOVERRIDE;
+ virtual long GetInsertionPoint() const wxOVERRIDE;
virtual void Popup();
virtual void Dismiss();
@@ -80,6 +86,8 @@ protected:
virtual wxString DoGetValue() const wxOVERRIDE;
private:
+ void SetActualValue(const wxString& value);
+ bool IsReadOnly() const;
// From wxTextEntry:
virtual wxWindow *GetEditableWindow() wxOVERRIDE { return this; }
diff --git a/include/wx/qt/cursor.h b/include/wx/qt/cursor.h
index b57f770a6f..218564e32d 100644
--- a/include/wx/qt/cursor.h
+++ b/include/wx/qt/cursor.h
@@ -29,7 +29,7 @@ public:
virtual wxPoint GetHotSpot() const;
QCursor &GetHandle() const;
-
+
protected:
void InitFromStock( wxStockCursor cursorId );
#if wxUSE_IMAGE
diff --git a/include/wx/qt/dataform.h b/include/wx/qt/dataform.h
index b6f5c307bf..55932a5815 100644
--- a/include/wx/qt/dataform.h
+++ b/include/wx/qt/dataform.h
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/qt/toolbar.h
+// Name: wx/qt/dataform.h
// Author: Sean D'Epagnier
// Copyright: (c) Sean D'Epagnier 2014
// Licence: wxWindows licence
@@ -8,34 +8,34 @@
#ifndef _WX_QT_DATAFORM_H_
#define _WX_QT_DATAFORM_H_
-class QString;
-
class WXDLLIMPEXP_CORE wxDataFormat
{
public:
- wxDataFormat();
- wxDataFormat( wxDataFormatId formatId );
+ wxDataFormat(wxDataFormatId formatId = wxDF_INVALID);
wxDataFormat(const wxString &id);
- wxDataFormat(const QString &id);
- wxDataFormat(const wxChar *id);
- void SetId( const wxChar *id );
-
+ // Standard methods
+ const wxString& GetId() const;
+ void SetId(const wxString& id);
+
+ wxDataFormatId GetType() const;
+ void SetType(wxDataFormatId type);
+
bool operator==(wxDataFormatId format) const;
bool operator!=(wxDataFormatId format) const;
bool operator==(const wxDataFormat& format) const;
bool operator!=(const wxDataFormat& format) const;
- // string ids are used for custom types - this SetId() must be used for
- // application-specific formats
- wxString GetId() const;
- void SetId( const wxString& id );
+ // Direct access to the underlying mime type.
+ // Equivalent to "id", except "id" is supposed to be
+ // invalid for standard types, whereas this should
+ // always be valid (if meaningful).
+ const wxString& GetMimeType() const;
+ void SetMimeType(const wxString& mimeType);
- // implementation
- wxDataFormatId GetType() const;
- void SetType( wxDataFormatId type );
-
- wxString m_MimeType;
+private:
+ wxString m_mimeType;
+ wxDataFormatId m_formatId;
};
#endif // _WX_QT_DATAFORM_H_
diff --git a/include/wx/qt/dataobj.h b/include/wx/qt/dataobj.h
index 002de9c2a0..ed4287c285 100644
--- a/include/wx/qt/dataobj.h
+++ b/include/wx/qt/dataobj.h
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: src/qt/dataobj.cpp
+// Name: src/qt/dataobj.h
// Author: Peter Most
// Copyright: (c) Peter Most
// Licence: wxWindows licence
@@ -8,24 +8,17 @@
#ifndef _WX_QT_DATAOBJ_H_
#define _WX_QT_DATAOBJ_H_
-class QMimeData;
+// ----------------------------------------------------------------------------
+// wxDataObject is the same as wxDataObjectBase under wxQT
+// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase
{
public:
wxDataObject();
- ~wxDataObject();
-
- virtual bool IsSupportedFormat(const wxDataFormat& format, Direction dir) const;
- virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const;
- virtual size_t GetFormatCount(Direction dir = Get) const;
- virtual void GetAllFormats(wxDataFormat *formats, Direction dir = Get) const;
- virtual size_t GetDataSize(const wxDataFormat& format) const;
- virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
- virtual bool SetData(const wxDataFormat& format, size_t len, const void * buf);
+ virtual ~wxDataObject();
-private:
- QMimeData *m_qtMimeData; // to handle formats that have no helper classes
+ virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const;
};
#endif // _WX_QT_DATAOBJ_H_
diff --git a/include/wx/qt/dc.h b/include/wx/qt/dc.h
index 94623e4201..76abb7a43b 100644
--- a/include/wx/qt/dc.h
+++ b/include/wx/qt/dc.h
@@ -111,12 +111,12 @@ public:
virtual void* GetHandle() const { return (void*) m_qtPainter; }
protected:
- virtual QImage *GetQImage() { return m_qtImage; }
-
- QPainter *m_qtPainter;
- QImage *m_qtImage;
+ virtual QPixmap *GetQPixmap() { return m_qtPixmap; }
- wxRegion *m_clippingRegion;
+ QPainter *m_qtPainter;
+ QPixmap *m_qtPixmap;
+
+ wxRegion m_clippingRegion;
private:
enum wxQtRasterColourOp
{
@@ -129,7 +129,10 @@ private:
QColor *m_qtPenColor;
QColor *m_qtBrushColor;
void ApplyRasterColourOp();
-
+
+ wxDECLARE_CLASS(wxQtDCImpl);
+ wxDECLARE_NO_COPY_CLASS(wxQtDCImpl);
+
};
#endif // _WX_QT_DC_H_
diff --git a/include/wx/qt/dcclient.h b/include/wx/qt/dcclient.h
index 23d6d8ce69..c9a5986838 100644
--- a/include/wx/qt/dcclient.h
+++ b/include/wx/qt/dcclient.h
@@ -10,6 +10,10 @@
#include "wx/qt/dc.h"
+#include "wx/scopedptr.h"
+
+class QPicture;
+
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxQtDCImpl
{
public:
@@ -20,6 +24,10 @@ public:
protected:
wxWindow *m_window;
+
+private:
+ wxDECLARE_CLASS(wxWindowDCImpl);
+ wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
};
@@ -30,6 +38,11 @@ public:
wxClientDCImpl( wxDC *owner, wxWindow *win );
~wxClientDCImpl();
+private:
+ wxScopedPtr m_pict;
+
+ wxDECLARE_CLASS(wxClientDCImpl);
+ wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
};
@@ -38,6 +51,9 @@ class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxWindowDCImpl
public:
wxPaintDCImpl( wxDC *owner );
wxPaintDCImpl( wxDC *owner, wxWindow *win );
+private:
+ wxDECLARE_CLASS(wxPaintDCImpl);
+ wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
};
#endif // _WX_QT_DCCLIENT_H_
diff --git a/include/wx/qt/dcmemory.h b/include/wx/qt/dcmemory.h
index 8ed5773a89..5f1e333cf6 100644
--- a/include/wx/qt/dcmemory.h
+++ b/include/wx/qt/dcmemory.h
@@ -26,6 +26,9 @@ public:
private:
wxBitmap m_selected;
+
+ DECLARE_CLASS(wxMemoryDCImpl);
+ DECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
};
#endif // _WX_QT_DCMEMORY_H_
diff --git a/include/wx/qt/dcprint.h b/include/wx/qt/dcprint.h
index 3c567eef47..2c9dfce4f8 100644
--- a/include/wx/qt/dcprint.h
+++ b/include/wx/qt/dcprint.h
@@ -14,7 +14,7 @@ class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxDCImpl
{
public:
wxPrinterDCImpl( wxPrinterDC *, const wxPrintData & );
-
+
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
@@ -35,7 +35,7 @@ public:
#endif // wxUSE_PALETTE
virtual void SetLogicalFunction(wxRasterOperationMode function);
-
+
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
virtual void DoGetTextExtent(const wxString& string,
@@ -43,7 +43,7 @@ public:
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
const wxFont *theFont = NULL) const;
-
+
virtual void Clear();
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
@@ -53,7 +53,7 @@ public:
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
wxFloodFillStyle style = wxFLOOD_SURFACE);
-
+
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
virtual void DoDrawPoint(wxCoord x, wxCoord y);
@@ -98,9 +98,9 @@ public:
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
-protected:
-
private:
+ wxDECLARE_CLASS(wxPrinterDCImpl);
+ wxDECLARE_NO_COPY_CLASS(wxPrinterDCImpl);
};
#endif // _WX_QT_DCPRINT_H_
diff --git a/include/wx/qt/dcscreen.h b/include/wx/qt/dcscreen.h
index c6c19b4848..f2fba75bca 100644
--- a/include/wx/qt/dcscreen.h
+++ b/include/wx/qt/dcscreen.h
@@ -19,9 +19,7 @@ public:
protected:
virtual void DoGetSize(int *width, int *height) const wxOVERRIDE;
- virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
-
- virtual QImage *GetQImage();
+ virtual QPixmap *GetQPixmap() wxOVERRIDE;
wxDECLARE_ABSTRACT_CLASS(wxScreenDCImpl);
};
diff --git a/include/wx/qt/defs.h b/include/wx/qt/defs.h
index be9129c036..b737b9290e 100644
--- a/include/wx/qt/defs.h
+++ b/include/wx/qt/defs.h
@@ -12,6 +12,6 @@
typedef class QWidget *WXWidget;
-#endif
+#endif
#endif /* _WX_QT_DEFS_H_ */
diff --git a/include/wx/qt/dialog.h b/include/wx/qt/dialog.h
index 5ae3b04a33..7a478bf9ff 100644
--- a/include/wx/qt/dialog.h
+++ b/include/wx/qt/dialog.h
@@ -23,7 +23,7 @@ public:
const wxString &name = wxDialogNameStr );
virtual ~wxDialog();
-
+
bool Create( wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
@@ -31,9 +31,10 @@ public:
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
- virtual int ShowModal();
- virtual void EndModal(int retCode);
- virtual bool IsModal() const;
+ virtual int ShowModal() wxOVERRIDE;
+ virtual void EndModal(int retCode) wxOVERRIDE;
+ virtual bool IsModal() const wxOVERRIDE;
+ virtual bool Show(bool show = true) wxOVERRIDE;
QDialog *GetDialogHandle() const;
diff --git a/include/wx/qt/dnd.h b/include/wx/qt/dnd.h
index d06a35a570..b497daf58e 100644
--- a/include/wx/qt/dnd.h
+++ b/include/wx/qt/dnd.h
@@ -8,39 +8,47 @@
#ifndef _WX_QT_DND_H_
#define _WX_QT_DND_H_
-#define wxDROP_ICON(name) wxICON(name)
+#define wxDROP_ICON(name) wxCursor(name##_xpm)
class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase
{
public:
- wxDropTarget(wxDataObject *dataObject = NULL );
-
- virtual bool OnDrop(wxCoord x, wxCoord y);
- virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
- virtual bool GetData();
+ wxDropTarget(wxDataObject *dataObject = NULL);
+ virtual ~wxDropTarget();
+
+ virtual bool OnDrop(wxCoord x, wxCoord y) wxOVERRIDE;
+ virtual wxDragResult OnData(wxCoord x,
+ wxCoord y,
+ wxDragResult def) wxOVERRIDE;
+ virtual bool GetData() wxOVERRIDE;
wxDataFormat GetMatchingPair();
-protected:
+ void ConnectTo(QWidget* widget);
+ void Disconnect();
private:
+ class Impl;
+ Impl* m_pImpl;
};
-
class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase
{
public:
- wxDropSource( wxWindow *win = NULL,
- const wxIcon © = wxNullIcon,
- const wxIcon &move = wxNullIcon,
- const wxIcon &none = wxNullIcon);
+ wxDropSource(wxWindow *win = NULL,
+ const wxCursor © = wxNullCursor,
+ const wxCursor &move = wxNullCursor,
+ const wxCursor &none = wxNullCursor);
+
+ wxDropSource(wxDataObject& data,
+ wxWindow *win,
+ const wxCursor © = wxNullCursor,
+ const wxCursor &move = wxNullCursor,
+ const wxCursor &none = wxNullCursor);
- wxDropSource( wxDataObject& data,
- wxWindow *win,
- const wxIcon © = wxNullIcon,
- const wxIcon &move = wxNullIcon,
- const wxIcon &none = wxNullIcon);
-
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
+
+private:
+ wxWindow* m_parentWindow;
};
#endif // _WX_QT_DND_H_
diff --git a/include/wx/qt/evtloop.h b/include/wx/qt/evtloop.h
index 25ea24a8dc..2fbac8ae6a 100644
--- a/include/wx/qt/evtloop.h
+++ b/include/wx/qt/evtloop.h
@@ -8,7 +8,8 @@
#ifndef _WX_QT_EVTLOOP_H_
#define _WX_QT_EVTLOOP_H_
-class QTimer;
+class wxQtIdleTimer;
+class QEventLoop;
class WXDLLIMPEXP_CORE wxQtEventLoopBase : public wxEventLoopBase
{
@@ -16,22 +17,20 @@ public:
wxQtEventLoopBase();
~wxQtEventLoopBase();
- virtual int DoRun();
- virtual void ScheduleExit(int rc = 0);
- virtual bool Pending() const;
- virtual bool Dispatch();
- virtual int DispatchTimeout(unsigned long timeout);
- virtual void WakeUp();
- virtual void DoYieldFor(long eventsToProcess);
+ virtual int DoRun() wxOVERRIDE;
+ virtual void ScheduleExit(int rc = 0) wxOVERRIDE;
+ virtual bool Pending() const wxOVERRIDE;
+ virtual bool Dispatch() wxOVERRIDE;
+ virtual int DispatchTimeout(unsigned long timeout) wxOVERRIDE;
+ virtual void WakeUp() wxOVERRIDE;
+ virtual void DoYieldFor(long eventsToProcess) wxOVERRIDE;
-#if wxUSE_EVENTLOOP_SOURCE
- virtual wxEventLoopSource *AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
-#endif // wxUSE_EVENTLOOP_SOURCE
-protected:
+ void ScheduleIdleCheck();
private:
- QTimer *m_qtIdleTimer;
-
+ QEventLoop *m_qtEventLoop;
+ wxObjectDataPtr m_qtIdleTimer;
+
wxDECLARE_NO_COPY_CLASS(wxQtEventLoopBase);
};
diff --git a/include/wx/qt/font.h b/include/wx/qt/font.h
index dd06d24356..391623dcb9 100644
--- a/include/wx/qt/font.h
+++ b/include/wx/qt/font.h
@@ -50,31 +50,37 @@ public:
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
// accessors: get the font characteristics
+ virtual int GetPointSize() const wxOVERRIDE;
virtual float GetFractionalPointSize() const wxOVERRIDE;
+ virtual wxSize GetPixelSize() const wxOVERRIDE;
virtual wxFontStyle GetStyle() const;
virtual int GetNumericWeight() const wxOVERRIDE;
virtual bool GetUnderlined() const;
virtual wxString GetFaceName() const;
virtual wxFontEncoding GetEncoding() const;
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
+ virtual bool GetStrikethrough() const wxOVERRIDE;
// change the font characteristics
virtual void SetFractionalPointSize(float pointSize) wxOVERRIDE;
+ virtual void SetPixelSize(const wxSize& pixelSize) wxOVERRIDE;
virtual void SetFamily( wxFontFamily family );
virtual void SetStyle( wxFontStyle style );
virtual void SetNumericWeight(int weight) wxOVERRIDE;
virtual bool SetFaceName(const wxString& facename);
virtual void SetUnderlined( bool underlined );
+ virtual void SetStrikethrough(bool strikethrough) wxOVERRIDE;
virtual void SetEncoding(wxFontEncoding encoding);
-
+
wxDECLARE_COMMON_FONT_METHODS();
virtual QFont GetHandle() const;
-
+
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
virtual wxFontFamily DoGetFamily() const;
+ virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxFont);
diff --git a/include/wx/qt/fontdlg.h b/include/wx/qt/fontdlg.h
index df739d3852..a170578ffa 100644
--- a/include/wx/qt/fontdlg.h
+++ b/include/wx/qt/fontdlg.h
@@ -16,10 +16,10 @@ public:
wxFontDialog() { }
wxFontDialog(wxWindow *parent) { Create(parent); }
wxFontDialog(wxWindow *parent, const wxFontData& data) { Create(parent, data); }
-
+
protected:
bool DoCreate(wxWindow *parent);
-
+
private:
wxFontData m_data;
diff --git a/include/wx/qt/frame.h b/include/wx/qt/frame.h
index 35a7f39aaa..4e164f3d26 100644
--- a/include/wx/qt/frame.h
+++ b/include/wx/qt/frame.h
@@ -19,14 +19,19 @@ class QScrollArea;
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
{
public:
- wxFrame();
+ wxFrame() { Init(); }
wxFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr);
+ const wxString& name = wxFrameNameStr)
+ {
+ Init();
+
+ Create( parent, id, title, pos, size, style, name );
+ }
virtual ~wxFrame();
bool Create(wxWindow *parent,
@@ -40,7 +45,7 @@ public:
virtual void SetMenuBar(wxMenuBar *menubar);
virtual void SetStatusBar(wxStatusBar *statusBar );
virtual void SetToolBar(wxToolBar *toolbar);
-
+
virtual void SetWindowStyleFlag( long style );
virtual void AddChild( wxWindowBase *child );
@@ -53,6 +58,15 @@ protected:
virtual void DoGetClientSize(int *width, int *height) const;
private:
+ // Common part of all ctors.
+ void Init()
+ {
+ m_qtToolBar = NULL;
+ }
+
+
+ // Currently active native toolbar.
+ class QToolBar* m_qtToolBar;
wxDECLARE_DYNAMIC_CLASS( wxFrame );
};
diff --git a/include/wx/qt/listbox.h b/include/wx/qt/listbox.h
index dc0c761c65..f3acc6eb5f 100644
--- a/include/wx/qt/listbox.h
+++ b/include/wx/qt/listbox.h
@@ -49,13 +49,13 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
- virtual bool IsSelected(int n) const;
- virtual int GetSelections(wxArrayInt& aSelections) const;
-
+ virtual bool IsSelected(int n) const wxOVERRIDE;
+ virtual int GetSelections(wxArrayInt& aSelections) const wxOVERRIDE;
+
virtual unsigned int GetCount() const;
virtual wxString GetString(unsigned int n) const;
virtual void SetString(unsigned int n, const wxString& s);
-
+
virtual int GetSelection() const;
virtual QWidget *GetHandle() const;
@@ -63,19 +63,19 @@ public:
void QtSendEvent(wxEventType evtType, const QModelIndex &index, bool selected);
protected:
- virtual void DoSetFirstItem(int n);
+ virtual void DoSetFirstItem(int n) wxOVERRIDE;
+
+ virtual void DoSetSelection(int n, bool select) wxOVERRIDE;
- virtual void DoSetSelection(int n, bool select);
-
virtual int DoInsertItems(const wxArrayStringsAdapter & items,
unsigned int pos,
void **clientData,
wxClientDataType type);
virtual int DoInsertOneItem(const wxString& item, unsigned int pos);
-
+
virtual void DoSetItemClientData(unsigned int n, void *clientData);
virtual void *DoGetItemClientData(unsigned int n) const;
-
+
virtual void DoClear();
virtual void DoDeleteOneItem(unsigned int pos);
@@ -90,6 +90,11 @@ protected:
private:
virtual void Init(); //common construction
+ // Common part of both Create() overloads.
+ void DoCreate(wxWindow* parent, long style);
+
+ void UnSelectAll();
+
wxDECLARE_DYNAMIC_CLASS(wxListBox);
};
diff --git a/include/wx/qt/listctrl.h b/include/wx/qt/listctrl.h
index 17637de752..5d3a135fa7 100644
--- a/include/wx/qt/listctrl.h
+++ b/include/wx/qt/listctrl.h
@@ -10,7 +10,7 @@
#include "wx/textctrl.h"
-class QTreeWidget;
+class wxQtTreeWidget;
class QTreeWidgetItem;
class WXDLLIMPEXP_FWD_CORE wxImageList;
@@ -292,7 +292,7 @@ protected:
void Init();
// Implement base class pure virtual methods.
- long DoInsertColumn(long col, const wxListItem& info);
+ virtual long DoInsertColumn(long col, const wxListItem& info) wxOVERRIDE;
QTreeWidgetItem *QtGetItem(int id) const;
@@ -303,7 +303,7 @@ protected:
m_ownsImageListSmall,
m_ownsImageListState;
private:
- QTreeWidget *m_qtTreeWidget;
+ wxQtTreeWidget *m_qtTreeWidget;
wxDECLARE_DYNAMIC_CLASS( wxListCtrl );
};
diff --git a/include/wx/qt/mdi.h b/include/wx/qt/mdi.h
index f8ec160355..a1970ba322 100644
--- a/include/wx/qt/mdi.h
+++ b/include/wx/qt/mdi.h
@@ -65,6 +65,8 @@ public:
const wxString& name = wxFrameNameStr);
virtual void Activate();
+
+ wxDECLARE_DYNAMIC_CLASS(wxMDIChildFrame);
};
@@ -73,8 +75,9 @@ class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase
{
public:
wxMDIClientWindow();
-
+
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
+ wxDECLARE_DYNAMIC_CLASS(wxMDIClientWindow);
};
#endif // _WX_QT_MDI_H_
diff --git a/include/wx/qt/menu.h b/include/wx/qt/menu.h
index f6d52bb3e2..cd747f2461 100644
--- a/include/wx/qt/menu.h
+++ b/include/wx/qt/menu.h
@@ -20,9 +20,9 @@ public:
virtual QMenu *GetHandle() const;
protected:
- virtual wxMenuItem *DoAppend(wxMenuItem *item);
- virtual wxMenuItem *DoInsert(size_t pos, wxMenuItem *item);
- virtual wxMenuItem *DoRemove(wxMenuItem *item);
+ virtual wxMenuItem *DoAppend(wxMenuItem *item) wxOVERRIDE;
+ virtual wxMenuItem *DoInsert(size_t pos, wxMenuItem *item) wxOVERRIDE;
+ virtual wxMenuItem *DoRemove(wxMenuItem *item) wxOVERRIDE;
private:
QMenu *m_qtMenu;
@@ -39,21 +39,21 @@ public:
wxMenuBar(long style);
wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0);
- virtual bool Append(wxMenu *menu, const wxString& title);
- virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
- virtual wxMenu *Remove(size_t pos);
+ virtual bool Append(wxMenu *menu, const wxString& title) wxOVERRIDE;
+ virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title) wxOVERRIDE;
+ virtual wxMenu *Remove(size_t pos) wxOVERRIDE;
- virtual void EnableTop(size_t pos, bool enable);
+ virtual void EnableTop(size_t pos, bool enable) wxOVERRIDE;
virtual bool IsEnabledTop(size_t pos) const wxOVERRIDE;
- virtual void SetMenuLabel(size_t pos, const wxString& label);
- virtual wxString GetMenuLabel(size_t pos) const;
+ virtual void SetMenuLabel(size_t pos, const wxString& label) wxOVERRIDE;
+ virtual wxString GetMenuLabel(size_t pos) const wxOVERRIDE;
QMenuBar *GetQMenuBar() const { return m_qtMenuBar; }
- virtual QWidget *GetHandle() const;
+ virtual QWidget *GetHandle() const wxOVERRIDE;
- virtual void Attach(wxFrame *frame);
- virtual void Detach();
+ virtual void Attach(wxFrame *frame) wxOVERRIDE;
+ virtual void Detach() wxOVERRIDE;
private:
QMenuBar *m_qtMenuBar;
diff --git a/include/wx/qt/menuitem.h b/include/wx/qt/menuitem.h
index 769f4a9e8e..c91a16a4e1 100644
--- a/include/wx/qt/menuitem.h
+++ b/include/wx/qt/menuitem.h
@@ -13,7 +13,6 @@
class QAction;
-class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxMenu;
class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
@@ -26,14 +25,14 @@ public:
wxItemKind kind = wxITEM_NORMAL,
wxMenu *subMenu = NULL);
- virtual void SetItemLabel(const wxString& str);
- virtual void SetCheckable(bool checkable);
+ virtual void SetItemLabel(const wxString& str) wxOVERRIDE;
+ virtual void SetCheckable(bool checkable) wxOVERRIDE;
- virtual void Enable(bool enable = true);
- virtual bool IsEnabled() const;
+ virtual void Enable(bool enable = true) wxOVERRIDE;
+ virtual bool IsEnabled() const wxOVERRIDE;
- virtual void Check(bool check = true);
- virtual bool IsChecked() const;
+ virtual void Check(bool check = true) wxOVERRIDE;
+ virtual bool IsChecked() const wxOVERRIDE;
virtual void SetBitmap(const wxBitmap& bitmap);
virtual const wxBitmap& GetBitmap() const { return m_bitmap; };
diff --git a/include/wx/qt/minifram.h b/include/wx/qt/minifram.h
index daf75a35f5..0c10e5a634 100644
--- a/include/wx/qt/minifram.h
+++ b/include/wx/qt/minifram.h
@@ -25,7 +25,7 @@ public:
const wxString& name = wxFrameNameStr)
{
return wxFrame::Create(parent, id, title, pos, size,
- style | wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR,
+ style | wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR,
name);
}
diff --git a/include/wx/qt/msgdlg.h b/include/wx/qt/msgdlg.h
index 6f1acdc16a..08b3c6437d 100644
--- a/include/wx/qt/msgdlg.h
+++ b/include/wx/qt/msgdlg.h
@@ -23,6 +23,9 @@ public:
// Reimplemented to translate return codes from Qt to wx
virtual int ShowModal();
+
+private:
+ wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMessageDialog);
};
#endif // _WX_QT_MSGDLG_H_
diff --git a/include/wx/qt/notebook.h b/include/wx/qt/notebook.h
index 288d0d9a7f..6fbb072b7c 100644
--- a/include/wx/qt/notebook.h
+++ b/include/wx/qt/notebook.h
@@ -20,7 +20,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNotebookNameStr);
-
+
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
@@ -42,14 +42,15 @@ public:
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
- int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); }
- int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); }
+ int SetSelection(size_t nPage);
+ int ChangeSelection(size_t nPage);
+
+ virtual bool DeleteAllPages() wxOVERRIDE;
virtual QWidget *GetHandle() const;
protected:
virtual wxWindow *DoRemovePage(size_t page);
- int DoSetSelection(size_t nPage, int flags = 0);
private:
QTabWidget *m_qtTabWidget;
diff --git a/include/wx/qt/palette.h b/include/wx/qt/palette.h
index d3aeff38ab..331130f79c 100644
--- a/include/wx/qt/palette.h
+++ b/include/wx/qt/palette.h
@@ -13,9 +13,9 @@ class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
public:
wxPalette();
wxPalette(int n, unsigned char *red, unsigned char *green, unsigned char *blue);
-
+
bool Create(int n, unsigned char *red, unsigned char *green, unsigned char *blue);
-
+
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
@@ -23,6 +23,9 @@ protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
+private:
+ wxDECLARE_DYNAMIC_CLASS(wxPalette);
+
};
#endif // _WX_QT_PALETTE_H_
diff --git a/include/wx/qt/pen.h b/include/wx/qt/pen.h
index 42c57a5304..c9d78b56ad 100644
--- a/include/wx/qt/pen.h
+++ b/include/wx/qt/pen.h
@@ -43,12 +43,15 @@ public:
wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants")
void SetStyle(int style) { SetStyle((wxPenStyle)style); }
-
+
QPen GetHandle() const;
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
+
+private:
+ wxDECLARE_DYNAMIC_CLASS(wxPen);
};
#endif // _WX_QT_PEN_H_
diff --git a/include/wx/qt/printdlg.h b/include/wx/qt/printdlg.h
index fc9fb91afe..1fd43ed1e9 100644
--- a/include/wx/qt/printdlg.h
+++ b/include/wx/qt/printdlg.h
@@ -15,12 +15,12 @@ class WXDLLIMPEXP_CORE wxQtPrintNativeData: public wxPrintNativeDataBase
{
public:
wxQtPrintNativeData();
-
+
virtual bool TransferTo( wxPrintData &data );
virtual bool TransferFrom( const wxPrintData &data );
virtual bool IsOk() const;
-
+
};
class WXDLLIMPEXP_CORE wxQtPrintDialog : public wxPrintDialogBase
diff --git a/include/wx/qt/printqt.h b/include/wx/qt/printqt.h
index 23d5dcb1bb..65c44bc194 100644
--- a/include/wx/qt/printqt.h
+++ b/include/wx/qt/printqt.h
@@ -32,7 +32,7 @@ public:
wxQtPrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting,
wxPrintData *data);
-
+
virtual bool Print(bool interactive);
virtual void DetermineScaling();
diff --git a/include/wx/qt/private/converter.h b/include/wx/qt/private/converter.h
index f6406a8009..7cdce58fad 100644
--- a/include/wx/qt/private/converter.h
+++ b/include/wx/qt/private/converter.h
@@ -12,27 +12,47 @@
#define _WX_QT_CONVERTER_H_
#include "wx/defs.h"
-#include
#include "wx/kbdstate.h"
+#include "wx/gdicmn.h"
+
+#include
+#include
+#include
// Rely on overloading and let the compiler pick the correct version, which makes
// them easier to use then to write wxQtConvertQtRectToWxRect() or wxQtConvertWxRectToQtRect()
-class WXDLLIMPEXP_FWD_CORE wxPoint;
-class QPoint;
-wxPoint wxQtConvertPoint( const QPoint &point );
-QPoint wxQtConvertPoint( const wxPoint &point );
+inline wxPoint wxQtConvertPoint( const QPoint &point )
+{
+ return wxPoint( point.x(), point.y() );
+}
+inline QPoint wxQtConvertPoint( const wxPoint &point )
+{
+ return QPoint( point.x, point.y );
+}
-class WXDLLIMPEXP_FWD_CORE wxRect;
-class QRect;
-wxRect wxQtConvertRect( const QRect &rect );
-QRect wxQtConvertRect( const wxRect &rect );
+inline wxRect wxQtConvertRect( const QRect &rect )
+{
+ return wxRect( rect.x(), rect.y(), rect.width(), rect.height() );
+}
-class WXDLLIMPEXP_FWD_BASE wxString;
-class QString;
-wxString wxQtConvertString( const QString &str );
-QString wxQtConvertString( const wxString &str );
+inline QRect wxQtConvertRect( const wxRect &rect )
+{
+ return QRect( rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight() );
+}
+
+// TODO: Check whether QString::toStdString/QString::toStdWString might be faster
+
+inline wxString wxQtConvertString( const QString &str )
+{
+ return wxString( str.toUtf8().data(), wxConvUTF8 );
+}
+
+inline QString wxQtConvertString( const wxString &str )
+{
+ return QString( str.utf8_str() );
+}
#if wxUSE_DATETIME
@@ -44,10 +64,14 @@ QDate wxQtConvertDate(const wxDateTime& date);
#endif // wxUSE_DATETIME
-class WXDLLIMPEXP_FWD_BASE wxSize;
-class QSize;
-wxSize wxQtConvertSize( const QSize &size );
-QSize wxQtConvertSize( const wxSize &size );
+inline wxSize wxQtConvertSize( const QSize &size )
+{
+ return wxSize(size.width(), size.height());
+}
+inline QSize wxQtConvertSize( const wxSize &size )
+{
+ return QSize(size.GetWidth(), size.GetHeight());
+}
Qt::Orientation wxQtConvertOrientation( long style, wxOrientation defaultOrientation );
wxOrientation wxQtConvertOrientation( Qt::Orientation );
diff --git a/include/wx/qt/private/timer.h b/include/wx/qt/private/timer.h
index 21ce2f79d6..d1d5790428 100644
--- a/include/wx/qt/private/timer.h
+++ b/include/wx/qt/private/timer.h
@@ -29,7 +29,7 @@ public:
protected:
virtual void timerEvent( QTimerEvent * event );
-
+
private:
int m_timerId;
};
diff --git a/include/wx/qt/private/winevent.h b/include/wx/qt/private/winevent.h
index 40ea85e417..a8465b542a 100644
--- a/include/wx/qt/private/winevent.h
+++ b/include/wx/qt/private/winevent.h
@@ -253,7 +253,7 @@ protected:
else
event->accept();
}
-
+
//wxMoveEvent
virtual void moveEvent ( QMoveEvent * event )
{
@@ -265,7 +265,7 @@ protected:
else
event->accept();
}
-
+
//wxEraseEvent then wxPaintEvent
virtual void paintEvent ( QPaintEvent * event )
{
@@ -301,7 +301,7 @@ protected:
else
event->accept();
}
-
+
//wxMouseEvent
virtual void wheelEvent ( QWheelEvent * event )
{
diff --git a/include/wx/qt/radiobox.h b/include/wx/qt/radiobox.h
index f858a576f6..a3149e25e6 100644
--- a/include/wx/qt/radiobox.h
+++ b/include/wx/qt/radiobox.h
@@ -10,7 +10,7 @@
class QGroupBox;
class QButtonGroup;
-class QBoxLayout;
+class QGridLayout;
class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, public wxRadioBoxBase
{
@@ -65,10 +65,12 @@ public:
using wxWindowBase::Enable;
using wxRadioBoxBase::GetDefaultBorder;
- virtual bool Enable(unsigned int n, bool enable = true);
- virtual bool Show(unsigned int n, bool show = true);
- virtual bool IsItemEnabled(unsigned int n) const;
- virtual bool IsItemShown(unsigned int n) const;
+ virtual bool Enable(unsigned int n, bool enable = true) wxOVERRIDE;
+ virtual bool Enable(bool enable = true) wxOVERRIDE;
+ virtual bool Show(unsigned int n, bool show = true) wxOVERRIDE;
+ virtual bool Show(bool show = true) wxOVERRIDE;
+ virtual bool IsItemEnabled(unsigned int n) const wxOVERRIDE;
+ virtual bool IsItemShown(unsigned int n) const wxOVERRIDE;
virtual unsigned int GetCount() const;
virtual wxString GetString(unsigned int n) const;
@@ -87,7 +89,7 @@ private:
QButtonGroup *m_qtButtonGroup;
// Autofit layout for buttons (either vert. or horiz.):
- QBoxLayout *m_qtBoxLayout;
+ QGridLayout *m_qtGridLayout;
wxDECLARE_DYNAMIC_CLASS(wxRadioBox);
};
diff --git a/include/wx/qt/radiobut.h b/include/wx/qt/radiobut.h
index 6679be6d04..56864e9094 100644
--- a/include/wx/qt/radiobut.h
+++ b/include/wx/qt/radiobut.h
@@ -37,8 +37,6 @@ public:
virtual QWidget *GetHandle() const;
-protected:
-
private:
QRadioButton *m_qtRadioButton;
diff --git a/include/wx/qt/region.h b/include/wx/qt/region.h
index 17840ead77..a1cb66c111 100644
--- a/include/wx/qt/region.h
+++ b/include/wx/qt/region.h
@@ -23,7 +23,7 @@ public:
wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
wxRegion(const wxBitmap& bmp);
wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance = 0);
-
+
virtual bool IsEmpty() const;
virtual void Clear();
@@ -47,6 +47,11 @@ protected:
virtual bool DoIntersect(const wxRegion& region);
virtual bool DoSubtract(const wxRegion& region);
virtual bool DoXor(const wxRegion& region);
+
+ virtual bool DoCombine(const wxRegion& rgn, wxRegionOp op);
+
+private:
+ wxDECLARE_DYNAMIC_CLASS(wxRegion);
};
@@ -77,10 +82,12 @@ public:
wxCoord GetH() const;
wxCoord GetHeight() const;
wxRect GetRect() const;
-
+
private:
QVector < QRect > *m_qtRects;
int m_pos;
+
+ wxDECLARE_DYNAMIC_CLASS(wxRegionIterator);
};
#endif // _WX_QT_REGION_H_
diff --git a/include/wx/qt/spinbutt.h b/include/wx/qt/spinbutt.h
index 6df89572e4..10771bc0bf 100644
--- a/include/wx/qt/spinbutt.h
+++ b/include/wx/qt/spinbutt.h
@@ -31,6 +31,7 @@ public:
virtual int GetValue() const;
virtual void SetValue(int val);
+ virtual void SetRange(int min, int max) wxOVERRIDE;
virtual QWidget *GetHandle() const;
diff --git a/include/wx/qt/statbox.h b/include/wx/qt/statbox.h
index 186146b242..8589adf4b1 100644
--- a/include/wx/qt/statbox.h
+++ b/include/wx/qt/statbox.h
@@ -14,7 +14,7 @@ class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase
{
public:
wxStaticBox();
-
+
wxStaticBox(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
@@ -33,6 +33,9 @@ public:
virtual QWidget *GetHandle() const;
+ virtual void SetLabel(const wxString& label) wxOVERRIDE;
+ virtual wxString GetLabel() const wxOVERRIDE;
+
protected:
private:
diff --git a/include/wx/qt/statusbar.h b/include/wx/qt/statusbar.h
index 0609d4b044..df9ae9891d 100644
--- a/include/wx/qt/statusbar.h
+++ b/include/wx/qt/statusbar.h
@@ -36,7 +36,7 @@ public:
QStatusBar *GetQStatusBar() const { return m_qtStatusBar; }
QWidget *GetHandle() const;
-
+
protected:
virtual void DoUpdateStatusText(int number);
@@ -45,7 +45,7 @@ private:
void UpdateFields();
QStatusBar *m_qtStatusBar;
- QList< QLabel* > *m_qtPanes;
+ wxVector m_qtPanes;
wxDECLARE_DYNAMIC_CLASS(wxStatusBar);
};
diff --git a/include/wx/qt/textctrl.h b/include/wx/qt/textctrl.h
index fda210583c..3cd57c936c 100644
--- a/include/wx/qt/textctrl.h
+++ b/include/wx/qt/textctrl.h
@@ -8,9 +8,8 @@
#ifndef _WX_QT_TEXTCTRL_H_
#define _WX_QT_TEXTCTRL_H_
-class QLineEdit;
-class QTextEdit;
class QScrollArea;
+class wxQtEdit;
class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase
{
@@ -25,6 +24,8 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString &name = wxTextCtrlNameStr);
+ virtual ~wxTextCtrl();
+
bool Create(wxWindow *parent,
wxWindowID id,
const wxString &value = wxEmptyString,
@@ -45,7 +46,7 @@ public:
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
virtual bool GetStyle(long position, wxTextAttr& style);
virtual bool SetDefaultStyle(const wxTextAttr& style);
-
+
virtual long XYToPosition(long x, long y) const;
virtual bool PositionToXY(long pos, long *x, long *y) const;
@@ -71,8 +72,7 @@ protected:
virtual QScrollArea *QtGetScrollBarsContainer() const;
private:
- QLineEdit *m_qtLineEdit;
- QTextEdit *m_qtTextEdit;
+ wxQtEdit *m_qtEdit;
wxDECLARE_DYNAMIC_CLASS( wxTextCtrl );
};
diff --git a/include/wx/qt/textentry.h b/include/wx/qt/textentry.h
index 26261c3132..685edda867 100644
--- a/include/wx/qt/textentry.h
+++ b/include/wx/qt/textentry.h
@@ -20,7 +20,7 @@ public:
virtual void Copy();
virtual void Cut();
virtual void Paste();
-
+
virtual void Undo();
virtual void Redo();
virtual bool CanUndo() const;
@@ -32,17 +32,15 @@ public:
virtual void SetSelection(long from, long to);
virtual void GetSelection(long *from, long *to) const;
-
+
virtual bool IsEditable() const;
virtual void SetEditable(bool editable);
-
+
protected:
virtual wxString DoGetValue() const;
virtual void DoSetValue(const wxString& value, int flags=0);
virtual wxWindow *GetEditableWindow();
-
-private:
};
#endif // _WX_QT_TEXTENTRY_H_
diff --git a/include/wx/qt/tglbtn.h b/include/wx/qt/tglbtn.h
index de7f16e926..f2b361e579 100644
--- a/include/wx/qt/tglbtn.h
+++ b/include/wx/qt/tglbtn.h
@@ -10,40 +10,6 @@
#include "wx/tglbtn.h"
-extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[];
-
-class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButtonBase
-{
-public:
- wxBitmapToggleButton();
- wxBitmapToggleButton(wxWindow *parent,
- wxWindowID id,
- const wxBitmap& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxCheckBoxNameStr);
-
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxBitmap& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxCheckBoxNameStr);
-
- virtual void SetValue(bool state);
- virtual bool GetValue() const;
-
- virtual QWidget *GetHandle() const;
-
-private:
- wxDECLARE_DYNAMIC_CLASS(wxBitmapToggleButton);
-
-};
-
-
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
{
@@ -69,9 +35,40 @@ public:
virtual void SetValue(bool state);
virtual bool GetValue() const;
- virtual QWidget *GetHandle() const;
+ // implementation only
+ virtual int GetEventType() const wxOVERRIDE { return wxEVT_TOGGLEBUTTON; }
private:
+ wxDECLARE_DYNAMIC_CLASS(wxToggleButton);
+
+};
+
+
+
+class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButton
+{
+public:
+ wxBitmapToggleButton();
+ wxBitmapToggleButton(wxWindow *parent,
+ wxWindowID id,
+ const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCheckBoxNameStr);
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCheckBoxNameStr);
+
+
+private:
+ wxDECLARE_DYNAMIC_CLASS(wxBitmapToggleButton);
};
diff --git a/include/wx/qt/toolbar.h b/include/wx/qt/toolbar.h
index 6e9822b7c1..6b3c38e42a 100644
--- a/include/wx/qt/toolbar.h
+++ b/include/wx/qt/toolbar.h
@@ -5,13 +5,12 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-class QToolBar;
#ifndef _WX_QT_TOOLBAR_H_
#define _WX_QT_TOOLBAR_H_
class QActionGroup;
-class wxQtToolBar;
+class QToolBar;
class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
{
@@ -40,7 +39,6 @@ public:
const wxString& name = wxToolBarNameStr);
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const wxOVERRIDE;
- virtual QToolBar *GetQToolBar() const { return m_qtToolBar; }
virtual void SetWindowStyleFlag( long style ) wxOVERRIDE;
@@ -63,6 +61,9 @@ public:
const wxString& label) wxOVERRIDE;
QWidget *GetHandle() const wxOVERRIDE;
+ // Private, only used by wxFrame.
+ QToolBar *GetQToolBar() const { return m_qtToolBar; }
+
protected:
QActionGroup* GetActionGroup(size_t pos);
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE;
diff --git a/include/wx/qt/tooltip.h b/include/wx/qt/tooltip.h
index 1f52f5b3b9..8f8bb232fe 100644
--- a/include/wx/qt/tooltip.h
+++ b/include/wx/qt/tooltip.h
@@ -10,7 +10,8 @@
#include "wx/object.h"
-class wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+
class WXDLLIMPEXP_CORE wxToolTip : public wxObject
{
public:
@@ -24,7 +25,7 @@ public:
static void SetAutoPop(long milliseconds);
// set the delay between subsequent tooltips to appear
static void SetReshow(long milliseconds);
-
+
wxToolTip(const wxString &tip);
void SetTip(const wxString& tip);
diff --git a/include/wx/qt/toplevel.h b/include/wx/qt/toplevel.h
index 2e7bd198ec..8eb283cc70 100644
--- a/include/wx/qt/toplevel.h
+++ b/include/wx/qt/toplevel.h
@@ -28,7 +28,8 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
-
+
+ virtual bool Show(bool show = true) wxOVERRIDE;
virtual void Maximize(bool maximize = true);
virtual void Restore();
virtual void Iconize(bool iconize = true);
@@ -40,10 +41,10 @@ public:
virtual void SetTitle(const wxString& title);
virtual wxString GetTitle() const;
virtual void SetIcons(const wxIconBundle& icons);
-
+
// Styles
virtual void SetWindowStyleFlag( long style );
virtual long GetWindowStyleFlag() const;
};
-
+
#endif // _WX_QT_TOPLEVEL_H_
diff --git a/include/wx/qt/treectrl.h b/include/wx/qt/treectrl.h
index 2abf2e17f4..5fdc125ce0 100644
--- a/include/wx/qt/treectrl.h
+++ b/include/wx/qt/treectrl.h
@@ -29,7 +29,7 @@ public:
const wxString& name = wxTreeCtrlNameStr);
virtual unsigned int GetCount() const;
-
+
virtual unsigned int GetIndent() const;
virtual void SetIndent(unsigned int indent);
@@ -55,15 +55,15 @@ public:
virtual void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
virtual void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col);
virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font);
-
+
virtual bool IsVisible(const wxTreeItemId& item) const;
virtual bool ItemHasChildren(const wxTreeItemId& item) const;
virtual bool IsExpanded(const wxTreeItemId& item) const;
virtual bool IsSelected(const wxTreeItemId& item) const;
virtual bool IsBold(const wxTreeItemId& item) const;
-
+
virtual size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true) const;
-
+
virtual wxTreeItemId GetRootItem() const;
virtual wxTreeItemId GetSelection() const;
virtual size_t GetSelections(wxArrayTreeItemIds& selections) const;
@@ -73,7 +73,7 @@ public:
virtual wxTreeItemId GetFocusedItem() const;
virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
-
+
virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
virtual wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
diff --git a/include/wx/qt/window.h b/include/wx/qt/window.h
index 3a07aed4c4..681a28732e 100644
--- a/include/wx/qt/window.h
+++ b/include/wx/qt/window.h
@@ -9,15 +9,12 @@
#ifndef _WX_QT_WINDOW_H_
#define _WX_QT_WINDOW_H_
-#include
-
class QShortcut;
template < class T > class QList;
class QWidget;
-class QScrollWindow;
-class QAbstractScrollArea;
class QScrollArea;
+class QScrollBar;
class QPicture;
class QPainter;
@@ -148,7 +145,8 @@ public:
// wxQt implementation internals:
- virtual QPicture *QtGetPicture() const;
+ // Caller maintains ownership of pict - window will NOT delete it
+ void QtSetPicture( QPicture* pict );
QPainter *QtGetPainter();
@@ -174,6 +172,11 @@ public:
virtual QScrollArea *QtGetScrollBarsContainer() const;
+#if wxUSE_TOOLTIPS
+ // applies tooltip to the widget.
+ virtual void QtApplyToolTip(const wxString& text);
+#endif // wxUSE_TOOLTIPS
+
protected:
virtual void DoGetTextExtent(const wxString& string,
int *x, int *y,
@@ -213,25 +216,24 @@ protected:
private:
void Init();
- QScrollArea *m_qtContainer;
+ QScrollArea *m_qtContainer; // either NULL or the same as m_qtWindow pointer
- wxScrollBar *m_horzScrollBar;
- wxScrollBar *m_vertScrollBar;
- void QtOnScrollBarEvent( wxScrollEvent& event );
-
- wxScrollBar *QtGetScrollBar( int orientation ) const;
- wxScrollBar *QtSetScrollBar( int orientation, wxScrollBar *scrollBar=NULL );
+ QScrollBar *m_horzScrollBar; // owned by m_qtWindow when allocated
+ QScrollBar *m_vertScrollBar; // owned by m_qtWindow when allocated
+
+ QScrollBar *QtGetScrollBar( int orientation ) const;
+ QScrollBar *QtSetScrollBar( int orientation, QScrollBar *scrollBar=NULL );
bool QtSetBackgroundStyle();
- QPicture *m_qtPicture;
- QPainter *m_qtPainter;
+ QPicture *m_qtPicture; // not owned
+ wxScopedPtr m_qtPainter; // always allocated
bool m_mouseInside;
#if wxUSE_ACCEL
- QList< QShortcut* > *m_qtShortcuts;
- wxQtShortcutHandler *m_qtShortcutHandler;
+ wxVector m_qtShortcuts; // owned by whatever GetHandle() returns
+ wxScopedPtr m_qtShortcutHandler; // always allocated
bool m_processingShortcut;
#endif // wxUSE_ACCEL
diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h
index fae330a7e3..12eb283723 100644
--- a/include/wx/rawbmp.h
+++ b/include/wx/rawbmp.h
@@ -171,7 +171,7 @@ typedef wxPixelFormat wxImagePixelFormat;
#define wxPIXEL_FORMAT_ALPHA 3
#elif defined(__WXQT__)
typedef wxPixelFormat wxNativePixelFormat;
-
+
#define wxPIXEL_FORMAT_ALPHA 3
#endif
diff --git a/include/wx/ribbon/bar.h b/include/wx/ribbon/bar.h
index 221640504f..78c272a488 100644
--- a/include/wx/ribbon/bar.h
+++ b/include/wx/ribbon/bar.h
@@ -59,12 +59,6 @@ public:
, m_page(page)
{
}
-#ifndef SWIG
- wxRibbonBarEvent(const wxRibbonBarEvent& c) : wxNotifyEvent(c)
- {
- m_page = c.m_page;
- }
-#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonBarEvent(*this); }
wxRibbonPage* GetPage() {return m_page;}
diff --git a/include/wx/ribbon/buttonbar.h b/include/wx/ribbon/buttonbar.h
index 17ba124e57..bc54379261 100644
--- a/include/wx/ribbon/buttonbar.h
+++ b/include/wx/ribbon/buttonbar.h
@@ -231,13 +231,6 @@ public:
, m_bar(bar), m_button(button)
{
}
-#ifndef SWIG
- wxRibbonButtonBarEvent(const wxRibbonButtonBarEvent& e) : wxCommandEvent(e)
- {
- m_bar = e.m_bar;
- m_button = e.m_button;
- }
-#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonButtonBarEvent(*this); }
wxRibbonButtonBar* GetBar() {return m_bar;}
diff --git a/include/wx/ribbon/panel.h b/include/wx/ribbon/panel.h
index 6f8a489b41..c47949f81d 100644
--- a/include/wx/ribbon/panel.h
+++ b/include/wx/ribbon/panel.h
@@ -150,12 +150,6 @@ public:
, m_panel(panel)
{
}
-#ifndef SWIG
- wxRibbonPanelEvent(const wxRibbonPanelEvent& e) : wxCommandEvent(e)
- {
- m_panel = e.m_panel;
- }
-#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonPanelEvent(*this); }
wxRibbonPanel* GetPanel() {return m_panel;}
diff --git a/include/wx/ribbon/toolbar.h b/include/wx/ribbon/toolbar.h
index 996927bf5e..cb694194db 100644
--- a/include/wx/ribbon/toolbar.h
+++ b/include/wx/ribbon/toolbar.h
@@ -207,12 +207,6 @@ public:
, m_bar(bar)
{
}
-#ifndef SWIG
- wxRibbonToolBarEvent(const wxRibbonToolBarEvent& e) : wxCommandEvent(e)
- {
- m_bar = e.m_bar;
- }
-#endif
wxEvent *Clone() const wxOVERRIDE { return new wxRibbonToolBarEvent(*this); }
wxRibbonToolBar* GetBar() {return m_bar;}
diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h
index a3a900dde1..ce15e67aea 100644
--- a/include/wx/richtext/richtextbuffer.h
+++ b/include/wx/richtext/richtextbuffer.h
@@ -3905,7 +3905,7 @@ protected:
covers common needs especially for simple, static fields using text or a bitmap.
Register field types on application initialisation with the static function
- wxRichTextBuffer::AddFieldType. They will be deleted automatically on
+ wxRichTextBuffer::AddFieldType. They will be deleted automatically on
application exit.
An application can write a field to a control with wxRichTextCtrl::WriteField,
@@ -6122,7 +6122,7 @@ public:
/**
Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.
- */
+ */
virtual wxPosition GetFocusedCell() const;
// Operations
@@ -6206,7 +6206,7 @@ public:
wxRichTextTableBlock(const wxRichTextTableBlock& block) { Copy(block); }
void Init() { m_colStart = 0; m_colEnd = 0; m_rowStart = 0; m_rowEnd = 0; }
-
+
void Copy(const wxRichTextTableBlock& block)
{
m_colStart = block.m_colStart; m_colEnd = block.m_colEnd; m_rowStart = block.m_rowStart; m_rowEnd = block.m_rowEnd;
diff --git a/include/wx/richtext/richtextfontpage.h b/include/wx/richtext/richtextfontpage.h
index b7a242d776..f52ee19b44 100644
--- a/include/wx/richtext/richtextfontpage.h
+++ b/include/wx/richtext/richtextfontpage.h
@@ -87,7 +87,7 @@ public:
/// be removed from the page. By default, these effects are not shown as they
/// have no effect in the editor.
static int GetAllowedTextEffects() { return sm_allowedTextEffects; }
-
+
/// Sets the allowed text effects in the page.
static void SetAllowedTextEffects(int allowed) { sm_allowedTextEffects = allowed; }
diff --git a/include/wx/richtext/richtextimagedlg.h b/include/wx/richtext/richtextimagedlg.h
index daf320ae8c..bc29b1822e 100644
--- a/include/wx/richtext/richtextimagedlg.h
+++ b/include/wx/richtext/richtextimagedlg.h
@@ -44,7 +44,7 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
*/
class WXDLLIMPEXP_RICHTEXT wxRichTextObjectPropertiesDialog: public wxRichTextFormattingDialog
-{
+{
wxDECLARE_DYNAMIC_CLASS(wxRichTextObjectPropertiesDialog);
wxDECLARE_EVENT_TABLE();
diff --git a/include/wx/richtext/richtextmarginspage.h b/include/wx/richtext/richtextmarginspage.h
index d69184e51e..afdc2a09ae 100644
--- a/include/wx/richtext/richtextmarginspage.h
+++ b/include/wx/richtext/richtextmarginspage.h
@@ -2,7 +2,7 @@
// Name: wx/richtext/richtextmarginspage.h
// Purpose: Declares the rich text formatting dialog margins page.
// Author: Julian Smart
-// Modified by:
+// Modified by:
// Created: 20/10/2010 10:27:34
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
@@ -70,11 +70,11 @@ public:
/// Gets the attributes from the formatting dialog
wxRichTextAttr* GetAttributes();
-
+
/// Data transfer
virtual bool TransferDataToWindow() wxOVERRIDE;
virtual bool TransferDataFromWindow() wxOVERRIDE;
-
+
////@begin wxRichTextMarginsPage event handler declarations
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT_MARGIN
diff --git a/include/wx/richtext/richtextuicustomization.h b/include/wx/richtext/richtextuicustomization.h
index d9fadfc808..4d405bf6ff 100644
--- a/include/wx/richtext/richtextuicustomization.h
+++ b/include/wx/richtext/richtextuicustomization.h
@@ -26,7 +26,7 @@
wxRichTextFormattingDialog::GetHelpInfo().SetHelpId(ID_HELP_FORMATTINGDIALOG);
wxRichTextFormattingDialog::GetHelpInfo().SetUICustomization(& wxGetApp().GetRichTextUICustomization());
wxRichTextBordersPage::GetHelpInfo().SetHelpId(ID_HELP_BORDERSPAGE);
-
+
Only the wxRichTextFormattingDialog class needs to have its customization object and help id set,
though the application set them for individual pages if it wants.
**/
@@ -46,17 +46,17 @@ public:
This class is used as a static member of dialogs, to store the help topic for the dialog
and also the customization object that will allow help to be shown appropriately for the application.
**/
-
+
class WXDLLIMPEXP_RICHTEXT wxRichTextHelpInfo
{
public:
wxRichTextHelpInfo()
{
m_helpTopic = -1;
- m_uiCustomization = NULL;
+ m_uiCustomization = NULL;
}
virtual ~wxRichTextHelpInfo() {}
-
+
virtual bool ShowHelp(wxWindow* win)
{
if ( !m_uiCustomization || m_helpTopic == -1 )
diff --git a/include/wx/richtext/richtextxml.h b/include/wx/richtext/richtextxml.h
index 9557d5d4b7..6f25e367ea 100644
--- a/include/wx/richtext/richtextxml.h
+++ b/include/wx/richtext/richtextxml.h
@@ -98,7 +98,7 @@ public:
void OutputString(wxOutputStream& stream, const wxString& str);
void OutputStringEnt(wxOutputStream& stream, const wxString& str);
-
+
static void AddString(wxString& str, const int& v) { str << wxString::Format(wxT("%d"), v); }
static void AddString(wxString& str, const long& v) { str << wxString::Format(wxT("%ld"), v); }
static void AddString(wxString& str, const double& v) { str << wxString::Format(wxT("%.2f"), (float) v); }
@@ -122,7 +122,7 @@ public:
/// Create a string containing style attributes, plus further object 'attributes' (shown, id)
static wxString AddAttributes(wxRichTextObject* obj, bool isPara = false);
-
+
virtual bool ExportStyleDefinition(wxOutputStream& stream, wxRichTextStyleDefinition* def, int level);
virtual bool WriteProperties(wxOutputStream& stream, const wxRichTextProperties& properties, int level);
diff --git a/include/wx/sharedptr.h b/include/wx/sharedptr.h
index 67618c2b1b..b9db5c8c38 100644
--- a/include/wx/sharedptr.h
+++ b/include/wx/sharedptr.h
@@ -126,7 +126,7 @@ private:
struct reftype_with_deleter : public reftype
{
reftype_with_deleter(T* ptr, Deleter d) : reftype(ptr), m_deleter(d) {}
- virtual void delete_ptr() { m_deleter(this->m_ptr); }
+ virtual void delete_ptr() wxOVERRIDE { m_deleter(this->m_ptr); }
Deleter m_deleter;
};
diff --git a/include/wx/sizer.h b/include/wx/sizer.h
index 16c86222a1..4f34ccd3ed 100644
--- a/include/wx/sizer.h
+++ b/include/wx/sizer.h
@@ -658,10 +658,26 @@ public:
// These virtual functions are used by the layout algorithm: first
// CalcMin() is called to calculate the minimal size of the sizer and
- // prepare for laying it out and then RecalcSizes() is called to really
- // update all the sizer items
+ // prepare for laying it out and then RepositionChildren() is called with
+ // this size to really update all the sizer items.
virtual wxSize CalcMin() = 0;
- virtual void RecalcSizes() = 0;
+
+ // This method should be overridden but isn't pure virtual for backwards
+ // compatibility.
+ virtual void RepositionChildren(const wxSize& WXUNUSED(minSize))
+ {
+ RecalcSizes();
+ }
+
+ // This is a deprecated version of RepositionChildren() which doesn't take
+ // the minimal size parameter which is not needed for very simple sizers
+ // but typically is for anything more complicated, so prefer to override
+ // RepositionChildren() in new code.
+ //
+ // If RepositionChildren() is not overridden, this method must be
+ // overridden, calling the base class version results in an assertion
+ // failure.
+ virtual void RecalcSizes();
virtual void Layout();
@@ -770,7 +786,7 @@ public:
wxGridSizer( int rows, int cols, int vgap, int hgap );
wxGridSizer( int rows, int cols, const wxSize& gap );
- virtual void RecalcSizes() wxOVERRIDE;
+ virtual void RepositionChildren(const wxSize& minSize) wxOVERRIDE;
virtual wxSize CalcMin() wxOVERRIDE;
void SetCols( int cols )
@@ -901,13 +917,13 @@ public:
const wxArrayInt& GetColWidths() const { return m_colWidths; }
// implementation
- virtual void RecalcSizes() wxOVERRIDE;
+ virtual void RepositionChildren(const wxSize& minSize) wxOVERRIDE;
virtual wxSize CalcMin() wxOVERRIDE;
protected:
void AdjustForFlexDirection();
- void AdjustForGrowables(const wxSize& sz);
- void FindWidthsAndHeights(int nrows, int ncols);
+ void AdjustForGrowables(const wxSize& sz, const wxSize& minSize);
+ wxSize FindWidthsAndHeights(int nrows, int ncols);
// the heights/widths of all rows/columns
wxArrayInt m_rowHeights,
@@ -926,9 +942,6 @@ protected:
int m_flexDirection;
wxFlexSizerGrowMode m_growMode;
- // saves CalcMin result to optimize RecalcSizes
- wxSize m_calculatedMinSize;
-
private:
wxDECLARE_CLASS(wxFlexGridSizer);
wxDECLARE_NO_COPY_CLASS(wxFlexGridSizer);
@@ -960,7 +973,7 @@ public:
// implementation of our resizing logic
virtual wxSize CalcMin() wxOVERRIDE;
- virtual void RecalcSizes() wxOVERRIDE;
+ virtual void RepositionChildren(const wxSize& minSize) wxOVERRIDE;
virtual bool InformFirstDirection(int direction,
int size,
@@ -1022,10 +1035,6 @@ protected:
// the sum of proportion of all of our elements
int m_totalProportion;
- // the minimal size needed for this sizer as calculated by the last call to
- // our CalcMin()
- wxSize m_calculatedMinSize;
-
private:
wxDECLARE_CLASS(wxBoxSizer);
};
@@ -1045,8 +1054,8 @@ public:
wxStaticBoxSizer(int orient, wxWindow *win, const wxString& label = wxEmptyString);
virtual ~wxStaticBoxSizer();
- void RecalcSizes() wxOVERRIDE;
- wxSize CalcMin() wxOVERRIDE;
+ virtual wxSize CalcMin() wxOVERRIDE;
+ virtual void RepositionChildren(const wxSize& minSize) wxOVERRIDE;
wxStaticBox *GetStaticBox() const
{ return m_staticBox; }
diff --git a/include/wx/strvararg.h b/include/wx/strvararg.h
index 57429045d4..2af4d79734 100644
--- a/include/wx/strvararg.h
+++ b/include/wx/strvararg.h
@@ -425,6 +425,12 @@ wxFORMAT_STRING_SPECIFIER(int*, wxFormatString::Arg_IntPtr | wxFormatString::Arg
wxFORMAT_STRING_SPECIFIER(short int*, wxFormatString::Arg_ShortIntPtr | wxFormatString::Arg_Pointer)
wxFORMAT_STRING_SPECIFIER(long int*, wxFormatString::Arg_LongIntPtr | wxFormatString::Arg_Pointer)
+// Support for nullptr is available since MSVS 2010, even though it doesn't
+// define __cplusplus as a C++11 compiler.
+#if __cplusplus >= 201103 || wxCHECK_VISUALC_VERSION(10)
+wxFORMAT_STRING_SPECIFIER(std::nullptr_t, wxFormatString::Arg_Pointer)
+#endif
+
#undef wxFORMAT_STRING_SPECIFIER
diff --git a/include/wx/systhemectrl.h b/include/wx/systhemectrl.h
index 8af2d5d9c1..269c361855 100644
--- a/include/wx/systhemectrl.h
+++ b/include/wx/systhemectrl.h
@@ -12,7 +12,7 @@
#include "wx/defs.h"
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+#if defined(__WXMSW__) && wxUSE_UXTHEME && !defined(__WXUNIVERSAL__)
#define wxHAS_SYSTEM_THEMED_CONTROL
#endif
diff --git a/include/wx/translation.h b/include/wx/translation.h
index 9b931a088a..3d5d5b0b83 100644
--- a/include/wx/translation.h
+++ b/include/wx/translation.h
@@ -145,12 +145,6 @@ public:
wxString GetBestTranslation(const wxString& domain,
const wxString& msgIdLanguage = "en");
- // find best and all other suitable translation languages for given domain
- wxArrayString GetAcceptableTranslations(const wxString& domain,
- wxLanguage msgIdLanguage);
- wxArrayString GetAcceptableTranslations(const wxString& domain,
- const wxString& msgIdLanguage = "en");
-
// add standard wxWidgets catalog ("wxstd")
bool AddStdCatalog();
diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h
index 11c7277097..0ebca727fd 100644
--- a/include/wx/univ/setup0.h
+++ b/include/wx/univ/setup0.h
@@ -1661,6 +1661,13 @@
// Recommended setting: 0, nobody uses .INI files any more
#define wxUSE_INICONF 0
+// Set to 1 if you need to include over
+//
+// Default is 0.
+//
+// Recommended setting: 0
+#define wxUSE_WINSOCK2 0
+
// ----------------------------------------------------------------------------
// Generic versions of native controls
// ----------------------------------------------------------------------------
diff --git a/include/wx/valtext.h b/include/wx/valtext.h
index 7dbdec176f..61c339a22b 100644
--- a/include/wx/valtext.h
+++ b/include/wx/valtext.h
@@ -31,9 +31,20 @@ enum wxTextValidatorStyle
wxFILTER_INCLUDE_LIST = 0x40,
wxFILTER_INCLUDE_CHAR_LIST = 0x80,
wxFILTER_EXCLUDE_LIST = 0x100,
- wxFILTER_EXCLUDE_CHAR_LIST = 0x200
+ wxFILTER_EXCLUDE_CHAR_LIST = 0x200,
+ wxFILTER_XDIGITS = 0x400,
+ wxFILTER_SPACE = 0x800,
+
+ // filter char class (for internal use only)
+ wxFILTER_CC = wxFILTER_SPACE|wxFILTER_ASCII|wxFILTER_NUMERIC|
+ wxFILTER_ALPHANUMERIC|wxFILTER_ALPHA|
+ wxFILTER_DIGITS|wxFILTER_XDIGITS
};
+// ----------------------------------------------------------------------------
+// wxTextValidator
+// ----------------------------------------------------------------------------
+
class WXDLLIMPEXP_CORE wxTextValidator: public wxValidator
{
public:
@@ -68,31 +79,78 @@ public:
wxTextEntry *GetTextEntry();
+ // strings & chars inclusions:
+ // ---------------------------
+
void SetCharIncludes(const wxString& chars);
- void SetIncludes(const wxArrayString& includes) { m_includes = includes; }
- inline wxArrayString& GetIncludes() { return m_includes; }
+ void AddCharIncludes(const wxString& chars);
+
+ void SetIncludes(const wxArrayString& includes);
+ void AddInclude(const wxString& include);
+
+ const wxArrayString& GetIncludes() const { return m_includes; }
+ wxString GetCharIncludes() const { return m_charIncludes; }
+
+ // strings & chars exclusions:
+ // ---------------------------
void SetCharExcludes(const wxString& chars);
- void SetExcludes(const wxArrayString& excludes) { m_excludes = excludes; }
- inline wxArrayString& GetExcludes() { return m_excludes; }
+ void AddCharExcludes(const wxString& chars);
+
+ void SetExcludes(const wxArrayString& excludes);
+ void AddExclude(const wxString& exclude);
+
+ const wxArrayString& GetExcludes() const { return m_excludes; }
+ wxString GetCharExcludes() const { return m_charExcludes; }
bool HasFlag(wxTextValidatorStyle style) const
{ return (m_validatorStyle & style) != 0; }
+ // implementation only
+ // --------------------
+
+ // returns the error message if the contents of 'str' are invalid
+ virtual wxString IsValid(const wxString& str) const;
+
protected:
- // returns true if all characters of the given string are present in m_includes
+ bool IsCharIncluded(const wxUniChar& c) const
+ {
+ return m_charIncludes.find(c) != wxString::npos;
+ }
+
+ bool IsCharExcluded(const wxUniChar& c) const
+ {
+ return m_charExcludes.find(c) != wxString::npos;
+ }
+
+ bool IsIncluded(const wxString& str) const
+ {
+ if ( HasFlag(wxFILTER_INCLUDE_LIST) )
+ return m_includes.Index(str) != wxNOT_FOUND;
+
+ // m_includes should be ignored (i.e. return true)
+ // if the style is not set.
+ return true;
+ }
+
+ bool IsExcluded(const wxString& str) const
+ {
+ return m_excludes.Index(str) != wxNOT_FOUND;
+ }
+
+ // returns false if the character is invalid
+ bool IsValidChar(const wxUniChar& c) const;
+
+ // These two functions (undocumented now) are kept for compatibility reasons.
bool ContainsOnlyIncludedCharacters(const wxString& val) const;
-
- // returns true if at least one character of the given string is present in m_excludes
bool ContainsExcludedCharacters(const wxString& val) const;
- // returns the error message if the contents of 'val' are invalid
- virtual wxString IsValid(const wxString& val) const;
-
protected:
long m_validatorStyle;
wxString* m_stringValue;
+ wxString m_charIncludes;
+ wxString m_charExcludes;
wxArrayString m_includes;
wxArrayString m_excludes;
diff --git a/include/wx/variant.h b/include/wx/variant.h
index efb1b5b111..734d7f0dce 100644
--- a/include/wx/variant.h
+++ b/include/wx/variant.h
@@ -485,7 +485,7 @@ class classname##VariantData: public wxVariantData \
{ \
public:\
classname##VariantData() {} \
- classname##VariantData( const classname &value ) { m_value = value; } \
+ classname##VariantData( const classname &value ) : m_value(value) { } \
\
classname &GetValue() { return m_value; } \
\
diff --git a/include/wx/variantbase.h b/include/wx/variantbase.h
index 22f4c32788..8335415ee8 100644
--- a/include/wx/variantbase.h
+++ b/include/wx/variantbase.h
@@ -85,9 +85,9 @@ public:
// If it based on wxObject return the ClassInfo.
virtual wxClassInfo* GetValueClassInfo() { return NULL; }
- int GetRefCount() const
+ int GetRefCount() const
{ return m_count; }
- void IncRef()
+ void IncRef()
{ m_count++; }
void DecRef()
{
@@ -151,7 +151,7 @@ public:
wxVariantBase(const wxVariantBase& variant);
wxVariantBase(wxVariantData* data, const wxString& name = wxEmptyString);
- template
+ template
wxVariantBase(const T& data, const wxString& name = wxEmptyString) :
m_data(new wxVariantDataT(data)), m_name(name) {}
@@ -207,19 +207,19 @@ public:
// FIXME wxXTI methods:
// get the typeinfo of the stored object
- const wxTypeInfo* GetTypeInfo() const
- {
+ const wxTypeInfo* GetTypeInfo() const
+ {
if (!m_data)
return NULL;
- return m_data->GetTypeInfo();
+ return m_data->GetTypeInfo();
}
// get a ref to the stored data
template T& Get()
{
- wxVariantDataT *dataptr =
+ wxVariantDataT *dataptr =
wx_dynamic_cast(wxVariantDataT*, m_data);
- wxASSERT_MSG( dataptr,
+ wxASSERT_MSG( dataptr,
wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) );
return dataptr->Get();
}
@@ -227,16 +227,16 @@ public:
// get a const ref to the stored data
template const T& Get() const
{
- const wxVariantDataT *dataptr =
+ const wxVariantDataT *dataptr =
wx_dynamic_cast(const wxVariantDataT*, m_data);
- wxASSERT_MSG( dataptr,
+ wxASSERT_MSG( dataptr,
wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) );
return dataptr->Get();
}
template bool HasData() const
{
- const wxVariantDataT *dataptr =
+ const wxVariantDataT *dataptr =
wx_dynamic_cast(const wxVariantDataT*, m_data);
return dataptr != NULL;
}
@@ -244,7 +244,7 @@ public:
// returns this value as string
wxString GetAsString() const;
- // gets the stored data casted to a wxObject*,
+ // gets the stored data casted to a wxObject*,
// returning NULL if cast is not possible
wxObject* GetAsObject();
diff --git a/include/wx/vector.h b/include/wx/vector.h
index 113157875c..25067081b4 100644
--- a/include/wx/vector.h
+++ b/include/wx/vector.h
@@ -219,6 +219,14 @@ public:
{ return m_ptr == it.m_ptr; }
bool operator !=(const reverse_iterator& it) const
{ return m_ptr != it.m_ptr; }
+ bool operator<(const reverse_iterator& it) const
+ { return m_ptr > it.m_ptr; }
+ bool operator>(const reverse_iterator& it) const
+ { return m_ptr < it.m_ptr; }
+ bool operator<=(const reverse_iterator& it) const
+ { return m_ptr >= it.m_ptr; }
+ bool operator>=(const reverse_iterator& it) const
+ { return m_ptr <= it.m_ptr; }
private:
value_type *m_ptr;
@@ -274,6 +282,14 @@ public:
{ return m_ptr == it.m_ptr; }
bool operator !=(const const_reverse_iterator& it) const
{ return m_ptr != it.m_ptr; }
+ bool operator<(const const_reverse_iterator& it) const
+ { return m_ptr > it.m_ptr; }
+ bool operator>(const const_reverse_iterator& it) const
+ { return m_ptr < it.m_ptr; }
+ bool operator<=(const const_reverse_iterator& it) const
+ { return m_ptr >= it.m_ptr; }
+ bool operator>=(const const_reverse_iterator& it) const
+ { return m_ptr <= it.m_ptr; }
protected:
const value_type *m_ptr;
diff --git a/include/wx/version.h b/include/wx/version.h
index f977b5364b..cdb72af195 100644
--- a/include/wx/version.h
+++ b/include/wx/version.h
@@ -27,9 +27,9 @@
/* NB: this file is parsed by automatic tools so don't change its format! */
#define wxMAJOR_VERSION 3
#define wxMINOR_VERSION 1
-#define wxRELEASE_NUMBER 2
+#define wxRELEASE_NUMBER 3
#define wxSUBRELEASE_NUMBER 0
-#define wxVERSION_STRING wxT("wxWidgets 3.1.2")
+#define wxVERSION_STRING wxT("wxWidgets 3.1.3")
/* nothing to update below this line when updating the version */
/* ---------------------------------------------------------------------------- */
diff --git a/include/wx/versioninfo.h b/include/wx/versioninfo.h
index 79469111a6..277e3e146a 100644
--- a/include/wx/versioninfo.h
+++ b/include/wx/versioninfo.h
@@ -25,13 +25,13 @@ public:
int micro = 0,
const wxString& description = wxString(),
const wxString& copyright = wxString())
+ : m_name(name)
+ , m_description(description)
+ , m_copyright(copyright)
{
- m_name = name;
m_major = major;
m_minor = minor;
m_micro = micro;
- m_description = description;
- m_copyright = copyright;
}
// Default copy ctor, assignment operator and dtor are ok.
diff --git a/include/wx/wrapsizer.h b/include/wx/wrapsizer.h
index f401c260df..d0494a14a4 100644
--- a/include/wx/wrapsizer.h
+++ b/include/wx/wrapsizer.h
@@ -36,7 +36,7 @@ public:
// override base class virtual methods
virtual wxSize CalcMin() wxOVERRIDE;
- virtual void RecalcSizes() wxOVERRIDE;
+ virtual void RepositionChildren(const wxSize& minSize) wxOVERRIDE;
virtual bool InformFirstDirection(int direction,
int size,
@@ -84,13 +84,17 @@ protected:
bool m_lastUsed; // Indicates whether value from InformFirst... has
// been used yet
- // The sizes below are computed by RecalcSizes(), i.e. they don't have
+ // The sizes below are computed by RepositionChildren(), i.e. they don't have
// valid values during the initial call to CalcMin() and they are only
// valid for the current layout (i.e. the current number of rows)
int m_minSizeMinor; // Min size in minor direction
int m_maxSizeMajor; // Size of longest row
int m_minItemMajor; // Size of smallest item in major direction
+ // the minimal size needed for this sizer as calculated by the last call to
+ // our CalcMin()
+ wxSize m_calculatedMinSize;
+
wxBoxSizer m_rows; // Sizer containing multiple rows of our items
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxWrapSizer);
diff --git a/include/wx/xti.h b/include/wx/xti.h
index f8ddce9bbd..f532318fb9 100644
--- a/include/wx/xti.h
+++ b/include/wx/xti.h
@@ -195,9 +195,9 @@ public:
virtual ~wxClassInfo();
- // allocates an instance of this class, this object does not have to be
+ // allocates an instance of this class, this object does not have to be
// initialized or fully constructed as this call will be followed by a call to Create
- virtual wxObject *AllocateObject() const
+ virtual wxObject *AllocateObject() const
{ return m_objectConstructor ? (*m_objectConstructor)() : 0; }
// 'old naming' for AllocateObject staying here for backward compatibility
@@ -207,8 +207,8 @@ public:
wxObject *ConstructObject(int ParamCount, wxAny *Params) const;
bool NeedsDirectConstruction() const;
-
- const wxChar *GetClassName() const
+
+ const wxChar *GetClassName() const
{ return m_className; }
const wxChar *GetBaseClassName1() const
{ return m_parents[0] ? m_parents[0]->GetClassName() : NULL; }
@@ -220,25 +220,25 @@ public:
const wxClassInfo *GetBaseClass2() const
{ return m_parents[0] ? m_parents[1] : NULL; }
- const wxChar *GetIncludeName() const
+ const wxChar *GetIncludeName() const
{ return m_unitName; }
- const wxClassInfo **GetParents() const
+ const wxClassInfo **GetParents() const
{ return m_parents; }
- int GetSize() const
+ int GetSize() const
{ return m_objectSize; }
- bool IsDynamic() const
+ bool IsDynamic() const
{ return (NULL != m_objectConstructor); }
- wxObjectConstructorFn GetConstructor() const
+ wxObjectConstructorFn GetConstructor() const
{ return m_objectConstructor; }
- const wxClassInfo *GetNext() const
+ const wxClassInfo *GetNext() const
{ return m_next; }
// statics:
static void CleanUp();
static wxClassInfo *FindClass(const wxString& className);
- static const wxClassInfo *GetFirst()
+ static const wxClassInfo *GetFirst()
{ return sm_first; }
@@ -254,18 +254,18 @@ public:
// this object by returning false, if this class has not registered a
// callback, the search will go up the inheritance tree if no callback has
// been registered true will be returned by default
- bool BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer,
+ bool BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer,
wxObjectWriterCallback *writercallback, const wxStringToAnyHashMap &metadata) const;
// gets the streaming callback from this class or any superclass
wxObjectStreamingCallback GetStreamingCallback() const;
// returns the first property
- wxPropertyInfo* GetFirstProperty() const
+ wxPropertyInfo* GetFirstProperty() const
{ EnsureInfosInited(); return m_firstProperty; }
// returns the first handler
- wxHandlerInfo* GetFirstHandler() const
+ wxHandlerInfo* GetFirstHandler() const
{ EnsureInfosInited(); return m_firstHandler; }
// Call the Create upon an instance of the class, in the end the object is fully
@@ -273,26 +273,26 @@ public:
virtual bool Create (wxObject *object, int ParamCount, wxAny *Params) const;
// get number of parameters for constructor
- virtual int GetCreateParamCount() const
+ virtual int GetCreateParamCount() const
{ return m_constructorPropertiesCount; }
// get n-th constructor parameter
- virtual const wxChar* GetCreateParamName(int n) const
+ virtual const wxChar* GetCreateParamName(int n) const
{ return m_constructorProperties[n]; }
- // Runtime access to objects for simple properties (get/set) by property
+ // Runtime access to objects for simple properties (get/set) by property
// name and variant data
- virtual void SetProperty (wxObject *object, const wxChar *propertyName,
+ virtual void SetProperty (wxObject *object, const wxChar *propertyName,
const wxAny &value) const;
virtual wxAny GetProperty (wxObject *object, const wxChar *propertyName) const;
// Runtime access to objects for collection properties by property name
- virtual wxAnyList GetPropertyCollection(wxObject *object,
+ virtual wxAnyList GetPropertyCollection(wxObject *object,
const wxChar *propertyName) const;
- virtual void AddToPropertyCollection(wxObject *object, const wxChar *propertyName,
+ virtual void AddToPropertyCollection(wxObject *object, const wxChar *propertyName,
const wxAny& value) const;
- // we must be able to cast variants to wxObject pointers, templates seem
+ // we must be able to cast variants to wxObject pointers, templates seem
// not to be suitable
void CallOnAny( const wxAny &data, wxObjectFunctor* functor ) const;
@@ -312,7 +312,7 @@ public:
// find handler by name
virtual wxHandlerInfo *FindHandlerInfoInThisClass (const wxChar *handlerName) const;
- // puts all the properties of this class and its superclasses in the map,
+ // puts all the properties of this class and its superclasses in the map,
// as long as there is not yet an entry with the same name (overriding mechanism)
void GetProperties( wxPropertyInfoMap &map ) const;
@@ -385,7 +385,7 @@ class WXDLLIMPEXP_BASE wxDynamicClassInfo : public wxClassInfo
friend class WXDLLIMPEXP_BASE wxDynamicObject;
public:
- wxDynamicClassInfo( const wxChar *_UnitName, const wxChar *_ClassName,
+ wxDynamicClassInfo( const wxChar *_UnitName, const wxChar *_ClassName,
const wxClassInfo* superClass );
virtual ~wxDynamicClassInfo();
@@ -402,7 +402,7 @@ public:
virtual const wxChar* GetCreateParamName(int i) const;
// Runtime access to objects by property name, and variant data
- virtual void SetProperty (wxObject *object, const wxChar *PropertyName,
+ virtual void SetProperty (wxObject *object, const wxChar *PropertyName,
const wxAny &Value) const;
virtual wxAny GetProperty (wxObject *object, const wxChar *PropertyName) const;
@@ -416,7 +416,7 @@ public:
void RenameProperty( const wxChar *oldPropertyName, const wxChar *newPropertyName );
// as a handler to this class at runtime
- void AddHandler( const wxChar *handlerName, wxObjectEventFunction address,
+ void AddHandler( const wxChar *handlerName, wxObjectEventFunction address,
const wxClassInfo* eventClassInfo );
// removes an existing runtime-handler
diff --git a/include/wx/xti2.h b/include/wx/xti2.h
index c7abd2fa3d..f153f17746 100644
--- a/include/wx/xti2.h
+++ b/include/wx/xti2.h
@@ -92,7 +92,7 @@ private :
#define _DEFAULT_CONSTRUCTOR(name) \
wxObject* wxConstructorFor##name() \
-{ return new name; }
+{ return new name; }
#define _DEFAULT_CONVERTERS(name) \
wxObject* wxVariantOfPtrToObjectConverter##name ( const wxAny &data ) \
@@ -258,28 +258,28 @@ template
void wxStringWriteValue( wxString &s, const T &data);
template
-void wxToStringConverter( const wxAny &v, wxString &s )
+void wxToStringConverter( const wxAny &v, wxString &s )
{ wxStringWriteValue(s, v.As()); }
template
-void wxFromStringConverter( const wxString &s, wxAny &v)
+void wxFromStringConverter( const wxString &s, wxAny &v)
{ T d; wxStringReadValue(s, d); v = wxAny(d); }
// --------------------------------------------------------------------------
// Collection Support
// --------------------------------------------------------------------------
-template void wxListCollectionToAnyList(
+template void wxListCollectionToAnyList(
const collection_t& coll, wxAnyList &value )
{
- for ( iter current = coll.GetFirst(); current;
+ for ( iter current = coll.GetFirst(); current;
current = current->GetNext() )
{
value.Append( new wxAny(current->GetData()) );
}
}
-template void wxArrayCollectionToVariantArray(
+template void wxArrayCollectionToVariantArray(
const collection_t& coll, wxAnyList &value )
{
for( size_t i = 0; i < coll.GetCount(); i++ )
diff --git a/include/wx/xtiprop.h b/include/wx/xtiprop.h
index 8c18e2a35a..d0d20039ac 100644
--- a/include/wx/xtiprop.h
+++ b/include/wx/xtiprop.h
@@ -159,47 +159,47 @@ public: \
class WXDLLIMPEXP_BASE wxPropertyAccessor
{
public:
- wxPropertyAccessor( wxPropertySetter *setter, wxPropertyGetter *getter,
+ wxPropertyAccessor( wxPropertySetter *setter, wxPropertyGetter *getter,
wxPropertyCollectionAdder *adder, wxPropertyCollectionGetter *collectionGetter )
- { m_setter = setter; m_getter = getter; m_adder = adder;
+ { m_setter = setter; m_getter = getter; m_adder = adder;
m_collectionGetter = collectionGetter; }
virtual ~wxPropertyAccessor() {}
// Setting a simple property (non-collection)
virtual void SetProperty(wxObject *object, const wxAny &value) const
- {
- if ( m_setter )
- m_setter->Set( object, value );
- else
- wxLogError( wxGetTranslation("SetProperty called w/o valid setter") );
+ {
+ if ( m_setter )
+ m_setter->Set( object, value );
+ else
+ wxLogError( wxGetTranslation("SetProperty called w/o valid setter") );
}
// Getting a simple property (non-collection)
virtual void GetProperty(const wxObject *object, wxAny &result) const
- {
- if ( m_getter )
- m_getter->Get( object, result );
- else
- wxLogError( wxGetTranslation("GetProperty called w/o valid getter") );
+ {
+ if ( m_getter )
+ m_getter->Get( object, result );
+ else
+ wxLogError( wxGetTranslation("GetProperty called w/o valid getter") );
}
// Adding an element to a collection property
virtual void AddToPropertyCollection(wxObject *object, const wxAny &value) const
- {
- if ( m_adder )
- m_adder->Add( object, value );
- else
- wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") );
+ {
+ if ( m_adder )
+ m_adder->Add( object, value );
+ else
+ wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") );
}
// Getting a collection property
virtual void GetPropertyCollection( const wxObject *obj, wxAnyList &result) const
- {
- if ( m_collectionGetter )
- m_collectionGetter->Get( obj, result);
- else
- wxLogError( wxGetTranslation("GetPropertyCollection called w/o valid collection getter") );
+ {
+ if ( m_collectionGetter )
+ m_collectionGetter->Get( obj, result);
+ else
+ wxLogError( wxGetTranslation("GetPropertyCollection called w/o valid collection getter") );
}
virtual bool HasSetter() const { return m_setter != NULL; }
@@ -249,17 +249,17 @@ public:
virtual void GetProperty(const wxObject *object, wxAny &value) const;
// Adding an element to a collection property
- virtual void AddToPropertyCollection(wxObject *WXUNUSED(object),
+ virtual void AddToPropertyCollection(wxObject *WXUNUSED(object),
const wxAny &WXUNUSED(value)) const
- {
- wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") );
+ {
+ wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") );
}
// Getting a collection property
- virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj),
+ virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj),
wxAnyList &WXUNUSED(result)) const
- {
- wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") );
+ {
+ wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") );
}
private:
@@ -271,7 +271,7 @@ private:
};
typedef long wxPropertyInfoFlags;
-enum
+enum
{
// will be removed in future releases
wxPROP_DEPRECATED = 0x00000001,
@@ -279,11 +279,11 @@ enum
// object graph property, will be streamed with priority (after constructor properties)
wxPROP_OBJECT_GRAPH = 0x00000002,
- // this will only be streamed out and in as enum/set, the internal representation
+ // this will only be streamed out and in as enum/set, the internal representation
// is still a long
wxPROP_ENUM_STORE_LONG = 0x00000004,
- // don't stream out this property, needed eg to avoid streaming out children
+ // don't stream out this property, needed eg to avoid streaming out children
// that are always created by their parents
wxPROP_DONT_STREAM = 0x00000008
};
@@ -442,7 +442,7 @@ private:
// stl is giving problems when forwarding declarations, therefore we define it as a subclass
-WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMapBase,
+WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMapBase,
class WXDLLIMPEXP_BASE );
class WXDLLIMPEXP_BASE wxPropertyInfoMap : public wxPropertyInfoMapBase {
diff --git a/include/wx/xtistrm.h b/include/wx/xtistrm.h
index 0621ead1ea..9c9bef5372 100644
--- a/include/wx/xtistrm.h
+++ b/include/wx/xtistrm.h
@@ -54,58 +54,58 @@ public:
virtual ~wxObjectWriterCallback() {}
// will be called before an object is written, may veto by returning false
- virtual bool BeforeWriteObject( wxObjectWriter *WXUNUSED(writer),
- const wxObject *WXUNUSED(object),
- const wxClassInfo *WXUNUSED(classInfo),
- const wxStringToAnyHashMap &WXUNUSED(metadata))
+ virtual bool BeforeWriteObject( wxObjectWriter *WXUNUSED(writer),
+ const wxObject *WXUNUSED(object),
+ const wxClassInfo *WXUNUSED(classInfo),
+ const wxStringToAnyHashMap &WXUNUSED(metadata))
{ return true; }
- // will be called after this object has been written, may be
+ // will be called after this object has been written, may be
// needed for adjusting stacks
- virtual void AfterWriteObject( wxObjectWriter *WXUNUSED(writer),
- const wxObject *WXUNUSED(object),
- const wxClassInfo *WXUNUSED(classInfo) )
+ virtual void AfterWriteObject( wxObjectWriter *WXUNUSED(writer),
+ const wxObject *WXUNUSED(object),
+ const wxClassInfo *WXUNUSED(classInfo) )
{}
- // will be called before a property gets written, may change the value,
- // eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
+ // will be called before a property gets written, may change the value,
+ // eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
// or veto writing that property at all by returning false
- virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
- const wxObject *WXUNUSED(object),
- const wxPropertyInfo *WXUNUSED(propInfo),
- const wxAny &WXUNUSED(value) )
+ virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
+ const wxObject *WXUNUSED(object),
+ const wxPropertyInfo *WXUNUSED(propInfo),
+ const wxAny &WXUNUSED(value) )
{ return true; }
- // will be called before a property gets written, may change the value,
- // eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
+ // will be called before a property gets written, may change the value,
+ // eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
// or veto writing that property at all by returning false
- virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
- const wxObject *WXUNUSED(object),
- const wxPropertyInfo *WXUNUSED(propInfo),
- const wxAnyList &WXUNUSED(value) )
+ virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
+ const wxObject *WXUNUSED(object),
+ const wxPropertyInfo *WXUNUSED(propInfo),
+ const wxAnyList &WXUNUSED(value) )
{ return true; }
- // will be called after a property has been written out, may be needed
+ // will be called after a property has been written out, may be needed
// for adjusting stacks
- virtual void AfterWriteProperty( wxObjectWriter *WXUNUSED(writer),
- const wxPropertyInfo *WXUNUSED(propInfo) )
+ virtual void AfterWriteProperty( wxObjectWriter *WXUNUSED(writer),
+ const wxPropertyInfo *WXUNUSED(propInfo) )
{}
// will be called before this delegate gets written
- virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer),
- const wxObject *WXUNUSED(object),
- const wxClassInfo* WXUNUSED(classInfo),
+ virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer),
+ const wxObject *WXUNUSED(object),
+ const wxClassInfo* WXUNUSED(classInfo),
const wxPropertyInfo *WXUNUSED(propInfo),
- const wxObject *&WXUNUSED(eventSink),
- const wxHandlerInfo* &WXUNUSED(handlerInfo) )
+ const wxObject *&WXUNUSED(eventSink),
+ const wxHandlerInfo* &WXUNUSED(handlerInfo) )
{ return true; }
- virtual void AfterWriteDelegate( wxObjectWriter *WXUNUSED(writer),
- const wxObject *WXUNUSED(object),
- const wxClassInfo* WXUNUSED(classInfo),
+ virtual void AfterWriteDelegate( wxObjectWriter *WXUNUSED(writer),
+ const wxObject *WXUNUSED(object),
+ const wxClassInfo* WXUNUSED(classInfo),
const wxPropertyInfo *WXUNUSED(propInfo),
- const wxObject *&WXUNUSED(eventSink),
- const wxHandlerInfo* &WXUNUSED(handlerInfo) )
+ const wxObject *&WXUNUSED(eventSink),
+ const wxHandlerInfo* &WXUNUSED(handlerInfo) )
{ }
};
@@ -121,15 +121,15 @@ public:
virtual ~wxObjectWriter();
// with this call you start writing out a new top-level object
- void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
- wxObjectWriterCallback *writercallback, const wxString &name,
+ void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
+ wxObjectWriterCallback *writercallback, const wxString &name,
const wxStringToAnyHashMap &metadata);
// Managing the object identity table a.k.a context
//
- // these methods make sure that no object gets written twice,
+ // these methods make sure that no object gets written twice,
// because sometimes multiple calls to the WriteObject will be
- // made without wanting to have duplicate objects written, the
+ // made without wanting to have duplicate objects written, the
// object identity table will be reset manually
virtual void ClearObjectContext();
@@ -151,12 +151,12 @@ public:
virtual void DoEndWriteTopLevelEntry( const wxString &name ) = 0;
// start of writing an object having the passed in ID
- virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo,
+ virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo,
int objectID, const wxStringToAnyHashMap &metadata ) = 0;
- // end of writing an toplevel object name param is used for unique
+ // end of writing an toplevel object name param is used for unique
// identification within the container
- virtual void DoEndWriteObject(const wxObject *object,
+ virtual void DoEndWriteObject(const wxObject *object,
const wxClassInfo *classInfo, int objectID ) = 0;
// writes a simple property in the stream format
@@ -177,12 +177,12 @@ public:
virtual void DoWriteNullObject() = 0;
// writes a delegate in the stream format
- virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo,
- const wxPropertyInfo *propInfo, const wxObject *eventSink,
+ virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo,
+ const wxPropertyInfo *propInfo, const wxObject *eventSink,
int sinkObjectID, const wxClassInfo* eventSinkClassInfo,
const wxHandlerInfo* handlerIndo ) = 0;
- void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
+ void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
wxObjectWriterCallback *writercallback, bool isEmbedded, const wxStringToAnyHashMap &metadata );
protected:
@@ -191,17 +191,17 @@ protected:
struct wxObjectWriterInternalPropertiesData;
- void WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
- wxObjectWriterCallback *writercallback,
+ void WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
+ wxObjectWriterCallback *writercallback,
wxObjectWriterInternalPropertiesData * data );
- void WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
+ void WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
const wxPropertyInfo* pi, wxObjectWriterCallback *writercallback,
wxObjectWriterInternalPropertiesData *data );
void FindConnectEntry(const wxEvtHandler * evSource,
- const wxEventSourceTypeInfo* dti, const wxObject* &sink,
+ const wxEventSourceTypeInfo* dti, const wxObject* &sink,
const wxHandlerInfo *&handler);
};
@@ -213,8 +213,8 @@ Streaming callbacks for depersisting XML to code, or running objects
class WXDLLIMPEXP_BASE wxObjectReaderCallback;
/*
-wxObjectReader handles streaming in a class from a arbitrary format.
-While walking through it issues calls out to interfaces to readercallback
+wxObjectReader handles streaming in a class from a arbitrary format.
+While walking through it issues calls out to interfaces to readercallback
the guts from the underlying storage format.
*/
@@ -252,7 +252,7 @@ public:
virtual ~wxObjectReaderCallback() {}
// allocate the new object on the heap, that object will have the passed in ID
- virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
+ virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
wxStringToAnyHashMap &metadata) = 0;
// initialize the already allocated object having the ID objectID with the Create method
@@ -267,9 +267,9 @@ public:
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata) = 0;
- // construct the new object on the heap, that object will have the passed in ID
+ // construct the new object on the heap, that object will have the passed in ID
// (for objects that don't support allocate-create type of creation)
- // creation parameters which are objects are having their Ids passed in
+ // creation parameters which are objects are having their Ids passed in
// objectIDValues having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
@@ -280,8 +280,8 @@ public:
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata) = 0;
- // destroy the heap-allocated object having the ID objectID, this may be used
- // if an object is embedded in another object and set via value semantics,
+ // destroy the heap-allocated object having the ID objectID, this may be used
+ // if an object is embedded in another object and set via value semantics,
// so the intermediate object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo) = 0;
@@ -339,8 +339,8 @@ public:
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
wxStringToAnyHashMap &metadata);
- // initialize the already allocated object having the ID objectID with
- // the Create method creation parameters which are objects are having
+ // initialize the already allocated object having the ID objectID with
+ // the Create method creation parameters which are objects are having
// their Ids passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void CreateObject(int objectID,
@@ -352,9 +352,9 @@ public:
wxStringToAnyHashMap &metadata
);
- // construct the new object on the heap, that object will have the
- // passed in ID (for objects that don't support allocate-create type of
- // creation) creation parameters which are objects are having their Ids
+ // construct the new object on the heap, that object will have the
+ // passed in ID (for objects that don't support allocate-create type of
+ // creation) creation parameters which are objects are having their Ids
// passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
@@ -365,8 +365,8 @@ public:
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata);
- // destroy the heap-allocated object having the ID objectID, this may be
- // used if an object is embedded in another object and set via value semantics,
+ // destroy the heap-allocated object having the ID objectID, this may be
+ // used if an object is embedded in another object and set via value semantics,
// so the intermediate object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo);
diff --git a/include/wx/xtitypes.h b/include/wx/xtitypes.h
index f8d7165643..47ee22b17c 100644
--- a/include/wx/xtitypes.h
+++ b/include/wx/xtitypes.h
@@ -126,7 +126,7 @@ private:
//
// wxIMPLEMENT_SET_STREAMING( wxCoupe, wxFlavor )
//
-// implementation note: no partial specialization for streaming, but a delegation
+// implementation note: no partial specialization for streaming, but a delegation
// to a different class
//
// ----------------------------------------------------------------------------
@@ -318,7 +318,7 @@ public:
wxTypeInfo(wxTypeKind kind,
wxVariant2StringFnc to, wxString2VariantFnc from,
const char *name):
- m_toString(to), m_fromString(from), m_kind(kind),
+ m_toString(to), m_fromString(from), m_kind(kind),
m_name(wxString::FromAscii(name))
{
Register();
@@ -350,20 +350,20 @@ public:
// convert a wxAny holding data of this type into a string
void ConvertToString( const wxAny& data, wxString &result ) const
- {
- if ( m_toString )
- (*m_toString)( data, result );
- else
- wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
+ {
+ if ( m_toString )
+ (*m_toString)( data, result );
+ else
+ wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
}
// convert a string into a wxAny holding the corresponding data in this type
void ConvertFromString( const wxString& data, wxAny &result ) const
- {
- if( m_fromString )
- (*m_fromString)( data, result );
- else
- wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
+ {
+ if( m_fromString )
+ (*m_fromString)( data, result );
+ else
+ wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
}
// statics:
@@ -387,8 +387,8 @@ private:
class WXDLLIMPEXP_BASE wxBuiltInTypeInfo : public wxTypeInfo
{
public:
- wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to = NULL,
- wxString2VariantFnc from = NULL,
+ wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to = NULL,
+ wxString2VariantFnc from = NULL,
const wxString &name = wxEmptyString ) :
wxTypeInfo( kind, to, from, name )
{ wxASSERT_MSG( GetKind() < wxT_SET, wxT("Illegal Kind for Base Type") ); }
@@ -397,7 +397,7 @@ public:
class WXDLLIMPEXP_BASE wxCustomTypeInfo : public wxTypeInfo
{
public:
- wxCustomTypeInfo( const wxString &name, wxVariant2StringFnc to,
+ wxCustomTypeInfo( const wxString &name, wxVariant2StringFnc to,
wxString2VariantFnc from ) :
wxTypeInfo( wxT_CUSTOM, to, from, name )
{}
@@ -413,30 +413,30 @@ public:
wxString2VariantFnc from, converterToLong_t toLong,
converterFromLong_t fromLong, const wxString &name ) :
wxTypeInfo( kind, to, from, name ), m_toLong( toLong ), m_fromLong( fromLong )
- {
+ {
wxASSERT_MSG( kind == wxT_ENUM || kind == wxT_SET,
- wxT("Illegal Kind for Enum Type"));
- m_enumInfo = enumInfo;
+ wxT("Illegal Kind for Enum Type"));
+ m_enumInfo = enumInfo;
}
const wxEnumData* GetEnumData() const { return m_enumInfo; }
// convert a wxAny holding data of this type into a long
void ConvertToLong( const wxAny& data, long &result ) const
- {
- if( m_toLong )
- (*m_toLong)( data, result );
- else
- wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
+ {
+ if( m_toLong )
+ (*m_toLong)( data, result );
+ else
+ wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
}
// convert a long into a wxAny holding the corresponding data in this type
void ConvertFromLong( long data, wxAny &result ) const
- {
- if( m_fromLong )
- (*m_fromLong)( data, result );
- else
- wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
+ {
+ if( m_fromLong )
+ (*m_fromLong)( data, result );
+ else
+ wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
}
private:
@@ -449,8 +449,8 @@ private:
class WXDLLIMPEXP_BASE wxClassTypeInfo : public wxTypeInfo
{
public:
- wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo,
- wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL,
+ wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo,
+ wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL,
const wxString &name = wxEmptyString);
const wxClassInfo *GetClassInfo() const { return m_classInfo; }
@@ -471,7 +471,7 @@ public:
{
if ( m_elementType == NULL )
m_elementType = wxTypeInfo::FindType( m_elementTypeName );
- return m_elementType;
+ return m_elementType;
}
private:
@@ -482,10 +482,10 @@ private:
class WXDLLIMPEXP_BASE wxEventSourceTypeInfo : public wxTypeInfo
{
public:
- wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass,
- wxVariant2StringFnc to = NULL,
+ wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass,
+ wxVariant2StringFnc to = NULL,
wxString2VariantFnc from = NULL );
- wxEventSourceTypeInfo( int eventType, int lastEventType, wxClassInfo* eventClass,
+ wxEventSourceTypeInfo( int eventType, int lastEventType, wxClassInfo* eventClass,
wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL );
int GetEventType() const { return m_eventType; }
@@ -498,10 +498,10 @@ private:
int m_lastEventType;
};
-template const wxTypeInfo* wxGetTypeInfo( T * )
+template const wxTypeInfo* wxGetTypeInfo( T * )
{ return wxTypeInfo::FindType(typeid(T).name()); }
-// this macro is for usage with custom, non-object derived classes and structs,
+// this macro is for usage with custom, non-object derived classes and structs,
// wxPoint is such a custom type
#if wxUSE_FUNC_TEMPLATE_POINTER
@@ -521,9 +521,9 @@ template const wxTypeInfo* wxGetTypeInfo( T * )
wxCollectionTypeInfo s_typeInfo##collection( typeid(element).name(), \
NULL, NULL, typeid(collection).name() );
-// sometimes a compiler invents specializations that are nowhere called,
-// use this macro to satisfy the refs, currently we don't have to play
-// tricks, but if we will have to according to the compiler, we will use
+// sometimes a compiler invents specializations that are nowhere called,
+// use this macro to satisfy the refs, currently we don't have to play
+// tricks, but if we will have to according to the compiler, we will use
// that macro for that
#define wxILLEGAL_TYPE_SPECIALIZATION( a )
diff --git a/include/wx/xtixml.h b/include/wx/xtixml.h
index 100e0653e1..df91f2bbd7 100644
--- a/include/wx/xtixml.h
+++ b/include/wx/xtixml.h
@@ -53,12 +53,12 @@ public:
virtual void DoEndWriteTopLevelEntry( const wxString &name );
// start of writing an object having the passed in ID
- virtual void DoBeginWriteObject(const wxObject *object,
+ virtual void DoBeginWriteObject(const wxObject *object,
const wxClassInfo *classInfo, int objectID, const wxStringToAnyHashMap &metadata );
- // end of writing an toplevel object name param is used for unique
+ // end of writing an toplevel object name param is used for unique
// identification within the container
- virtual void DoEndWriteObject(const wxObject *object,
+ virtual void DoEndWriteObject(const wxObject *object,
const wxClassInfo *classInfo, int objectID );
// writes a simple property in the stream format
@@ -80,9 +80,9 @@ public:
virtual void DoWriteNullObject();
// writes a delegate in the stream format
- virtual void DoWriteDelegate( const wxObject *object,
+ virtual void DoWriteDelegate( const wxObject *object,
const wxClassInfo* classInfo, const wxPropertyInfo *propInfo,
- const wxObject *eventSink, int sinkObjectID,
+ const wxObject *eventSink, int sinkObjectID,
const wxClassInfo* eventSinkClassInfo, const wxHandlerInfo* handlerIndo );
private:
diff --git a/interface/wx/aboutdlg.h b/interface/wx/aboutdlg.h
index 41719ec269..cd43d1bbdc 100644
--- a/interface/wx/aboutdlg.h
+++ b/interface/wx/aboutdlg.h
@@ -28,7 +28,7 @@
don't support URLs, licence text nor custom icons in the about dialog and if
either of those is used, wxAboutBox() will automatically use the generic version
so you should avoid specifying these fields to achieve more native look and feel.
-
+
Example of usage:
@code
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
@@ -170,7 +170,7 @@ public:
Returns the icon set by SetIcon().
*/
wxIcon GetIcon() const;
-
+
/**
Set the icon to be shown in the dialog. By default the icon of the main frame
will be shown if the native about dialog supports custom icons. If it doesn't
@@ -241,7 +241,7 @@ public:
@see SetVersion()
*/
const wxString& GetVersion() const;
-
+
/**
Return the long version string if set.
@@ -263,7 +263,7 @@ public:
Returns the description of the website URL set for the dialog.
*/
const wxString& GetWebSiteDescription() const;
-
+
/**
Set the web site for the program and its description (which defaults to @a url
itself if empty).
@@ -275,7 +275,7 @@ public:
void SetWebSite(const wxString& url,
const wxString& desc = wxEmptyString);
-
+
/**
Returns @true if developers have been set in the dialog info.
*/
@@ -316,7 +316,7 @@ public:
*/
const wxArrayString& GetTranslators() const;
-
+
};
diff --git a/interface/wx/affinematrix2dbase.h b/interface/wx/affinematrix2dbase.h
index e7d0a6df11..7b95669808 100644
--- a/interface/wx/affinematrix2dbase.h
+++ b/interface/wx/affinematrix2dbase.h
@@ -36,7 +36,7 @@ struct wxMatrix2D
/**
@class wxAffineMatrix2DBase
-
+
A 2x3 matrix representing an affine 2D transformation.
This is an abstract base class implemented by wxAffineMatrix2D only so far,
@@ -160,7 +160,7 @@ public:
@param cRadians
Rotation angle in radians, clockwise.
- */
+ */
virtual void Rotate(wxDouble cRadians) = 0;
/**
diff --git a/interface/wx/animate.h b/interface/wx/animate.h
index d8d5e13edb..45e5e88adb 100644
--- a/interface/wx/animate.h
+++ b/interface/wx/animate.h
@@ -206,7 +206,7 @@ public:
Default ctor.
*/
wxAnimation();
-
+
/**
Copy ctor.
*/
diff --git a/interface/wx/anybutton.h b/interface/wx/anybutton.h
index 5887f8ffd6..c993b062e2 100644
--- a/interface/wx/anybutton.h
+++ b/interface/wx/anybutton.h
@@ -91,7 +91,7 @@ public:
*/
wxBitmap GetBitmapPressed() const;
-
+
/**
Sets the bitmap to display in the button.
@@ -177,7 +177,7 @@ public:
previous versions)
*/
void SetBitmapPressed(const wxBitmap& bitmap);
-
+
/**
Get the margins between the bitmap and the text of the button.
diff --git a/interface/wx/app.h b/interface/wx/app.h
index fcaf21111a..0f9a0f344c 100644
--- a/interface/wx/app.h
+++ b/interface/wx/app.h
@@ -1063,7 +1063,7 @@ public:
is specified in the @c Info.plist file.
@onlyfor{wxosx}
-
+
@since 3.0.1
*/
virtual bool OSXIsGUIApplication();
diff --git a/interface/wx/artprov.h b/interface/wx/artprov.h
index d0581d9913..e8c848452f 100644
--- a/interface/wx/artprov.h
+++ b/interface/wx/artprov.h
@@ -29,64 +29,64 @@ wxArtClient wxART_LIST;
wxArtClient wxART_OTHER;
-wxArtID wxART_ADD_BOOKMARK;
-wxArtID wxART_DEL_BOOKMARK;
-wxArtID wxART_HELP_SIDE_PANEL;
-wxArtID wxART_HELP_SETTINGS;
-wxArtID wxART_HELP_BOOK;
-wxArtID wxART_HELP_FOLDER;
-wxArtID wxART_HELP_PAGE;
-wxArtID wxART_GO_BACK;
-wxArtID wxART_GO_FORWARD;
-wxArtID wxART_GO_UP;
-wxArtID wxART_GO_DOWN;
-wxArtID wxART_GO_TO_PARENT;
-wxArtID wxART_GO_HOME;
-wxArtID wxART_GOTO_FIRST;
-wxArtID wxART_GOTO_LAST;
-wxArtID wxART_FILE_OPEN;
-wxArtID wxART_FILE_SAVE;
-wxArtID wxART_FILE_SAVE_AS;
-wxArtID wxART_PRINT;
-wxArtID wxART_HELP;
-wxArtID wxART_TIP;
-wxArtID wxART_REPORT_VIEW;
-wxArtID wxART_LIST_VIEW;
-wxArtID wxART_NEW_DIR;
-wxArtID wxART_HARDDISK;
-wxArtID wxART_FLOPPY;
-wxArtID wxART_CDROM;
-wxArtID wxART_REMOVABLE;
-wxArtID wxART_FOLDER;
-wxArtID wxART_FOLDER_OPEN;
-wxArtID wxART_GO_DIR_UP;
-wxArtID wxART_EXECUTABLE_FILE;
-wxArtID wxART_NORMAL_FILE;
-wxArtID wxART_TICK_MARK;
-wxArtID wxART_CROSS_MARK;
-wxArtID wxART_ERROR;
-wxArtID wxART_QUESTION;
-wxArtID wxART_WARNING;
-wxArtID wxART_INFORMATION;
-wxArtID wxART_MISSING_IMAGE;
+wxArtID wxART_ADD_BOOKMARK;
+wxArtID wxART_DEL_BOOKMARK;
+wxArtID wxART_HELP_SIDE_PANEL;
+wxArtID wxART_HELP_SETTINGS;
+wxArtID wxART_HELP_BOOK;
+wxArtID wxART_HELP_FOLDER;
+wxArtID wxART_HELP_PAGE;
+wxArtID wxART_GO_BACK;
+wxArtID wxART_GO_FORWARD;
+wxArtID wxART_GO_UP;
+wxArtID wxART_GO_DOWN;
+wxArtID wxART_GO_TO_PARENT;
+wxArtID wxART_GO_HOME;
+wxArtID wxART_GOTO_FIRST;
+wxArtID wxART_GOTO_LAST;
+wxArtID wxART_FILE_OPEN;
+wxArtID wxART_FILE_SAVE;
+wxArtID wxART_FILE_SAVE_AS;
+wxArtID wxART_PRINT;
+wxArtID wxART_HELP;
+wxArtID wxART_TIP;
+wxArtID wxART_REPORT_VIEW;
+wxArtID wxART_LIST_VIEW;
+wxArtID wxART_NEW_DIR;
+wxArtID wxART_HARDDISK;
+wxArtID wxART_FLOPPY;
+wxArtID wxART_CDROM;
+wxArtID wxART_REMOVABLE;
+wxArtID wxART_FOLDER;
+wxArtID wxART_FOLDER_OPEN;
+wxArtID wxART_GO_DIR_UP;
+wxArtID wxART_EXECUTABLE_FILE;
+wxArtID wxART_NORMAL_FILE;
+wxArtID wxART_TICK_MARK;
+wxArtID wxART_CROSS_MARK;
+wxArtID wxART_ERROR;
+wxArtID wxART_QUESTION;
+wxArtID wxART_WARNING;
+wxArtID wxART_INFORMATION;
+wxArtID wxART_MISSING_IMAGE;
-wxArtID wxART_COPY;
-wxArtID wxART_CUT;
-wxArtID wxART_PASTE;
-wxArtID wxART_DELETE;
-wxArtID wxART_NEW;
+wxArtID wxART_COPY;
+wxArtID wxART_CUT;
+wxArtID wxART_PASTE;
+wxArtID wxART_DELETE;
+wxArtID wxART_NEW;
-wxArtID wxART_UNDO;
-wxArtID wxART_REDO;
+wxArtID wxART_UNDO;
+wxArtID wxART_REDO;
-wxArtID wxART_PLUS;
-wxArtID wxART_MINUS;
+wxArtID wxART_PLUS;
+wxArtID wxART_MINUS;
-wxArtID wxART_CLOSE;
-wxArtID wxART_QUIT;
+wxArtID wxART_CLOSE;
+wxArtID wxART_QUIT;
-wxArtID wxART_FIND;
-wxArtID wxART_FIND_AND_REPLACE;
+wxArtID wxART_FIND;
+wxArtID wxART_FIND_AND_REPLACE;
wxArtID wxART_FULL_SCREEN;
wxArtID wxART_EDIT;
@@ -214,7 +214,7 @@ wxArtID wxART_EDIT;
For a list of the GTK+ stock items please refer to the
GTK+ documentation
page .
- It is also possible to load icons from the current icon theme by specifying their name
+ It is also possible to load icons from the current icon theme by specifying their name
(without extension and directory components).
Icon themes recognized by GTK+ follow the freedesktop.org
Icon Themes specification .
diff --git a/interface/wx/aui/auibar.h b/interface/wx/aui/auibar.h
index ed5125e04e..899b956ff2 100644
--- a/interface/wx/aui/auibar.h
+++ b/interface/wx/aui/auibar.h
@@ -179,11 +179,11 @@ public:
*/
int GetToolId() const;
-
+
void SetDropDownClicked(bool c);
void SetClickPoint(const wxPoint& p);
void SetItemRect(const wxRect& r);
- void SetToolId(int toolId);
+ void SetToolId(int toolId);
};
wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN;
diff --git a/interface/wx/aui/framemanager.h b/interface/wx/aui/framemanager.h
index 7ce7e741db..4f4dae092f 100644
--- a/interface/wx/aui/framemanager.h
+++ b/interface/wx/aui/framemanager.h
@@ -333,12 +333,12 @@ public:
/**
LoadPaneInfo() is similar to LoadPerspective, with the exception that it
only loads information about a single pane.
-
+
This method writes the serialized data into the passed pane. Pointers to
UI elements are not modified.
@notice This operation also changes the name in the pane information!
-
+
@sa LoadPerspective
@sa SavePaneInfo().
@sa SavePerspective
@@ -347,9 +347,9 @@ public:
/**
Loads a saved perspective.
-
+
A perspective is the layout state of an AUI managed window.
-
+
All currently existing panes that have an object in "perspective"
with the same name ("equivalent") will receive the layout parameters of the object in
"perspective". Existing panes that do not have an equivalent in "perspective" remain
@@ -358,7 +358,7 @@ public:
@param perspective Serialized layout information of a perspective (excl. pointers to UI elements).
@param update If update is @true, wxAuiManager::Update() is automatically invoked,
thus realizing the specified perspective on screen.
-
+
@sa LoadPaneInfo
@sa LoadPerspective
@sa SavePerspective
@@ -384,12 +384,12 @@ public:
/**
SavePaneInfo() is similar to SavePerspective, with the exception that it only
saves information about a single pane.
-
+
@param pane Pane whose layout parameters should be serialized.
@return The serialized layout parameters of the pane are returned within
the string. Information about the pointers to UI elements stored
in the pane are not serialized.
-
+
@sa LoadPaneInfo
@sa LoadPerspective
@sa SavePerspective
@@ -399,7 +399,7 @@ public:
/**
Saves the entire user interface layout into an encoded wxString, which
can then be stored by the application (probably using wxConfig).
-
+
@sa LoadPerspective
@sa LoadPaneInfo
@sa SavePaneInfo
@@ -908,7 +908,7 @@ public:
"Safe parts" are all non-UI elements (e.g. all layout determining parameters like the
size, position etc.). "Unsafe parts" (pointers to button, frame and window) are not
modified by this write operation.
-
+
@remark This method is used when loading perspectives.
*/
void SafeSet(wxAuiPaneInfo source);
@@ -953,7 +953,7 @@ public:
*/
wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c);
-
+
/// name of the pane
wxString name;
@@ -961,7 +961,7 @@ public:
wxString caption;
/// icon of the pane, may be invalid
- wxBitmap icon;
+ wxBitmap icon;
/// window that is in this pane
wxWindow* window;
@@ -1003,12 +1003,12 @@ public:
int dock_proportion;
/// buttons on the pane
- wxAuiPaneButtonArray buttons;
+ wxAuiPaneButtonArray buttons;
/// current rectangle (populated by wxAUI)
wxRect rect;
- bool IsValid() const;
+ bool IsValid() const;
};
@@ -1137,7 +1137,7 @@ public:
bool IsOk() const;
bool IsHorizontal() const;
bool IsVertical() const;
-
+
wxAuiPaneInfoPtrArray panes; // array of panes
wxRect rect; // current rectangle
int dock_direction; // dock direction (top, bottom, left, right, center)
diff --git a/interface/wx/aui/tabmdi.h b/interface/wx/aui/tabmdi.h
index 4092edcdfc..e12fa75133 100644
--- a/interface/wx/aui/tabmdi.h
+++ b/interface/wx/aui/tabmdi.h
@@ -108,7 +108,7 @@ public:
wxWindowID winid,
const wxString& name);
virtual wxToolBar *GetToolBar() const;
-
+
// no maximize etc
virtual void Maximize(bool maximize = true);
virtual void Restore();
diff --git a/interface/wx/base64.h b/interface/wx/base64.h
index dc5abe4402..56b13864d1 100644
--- a/interface/wx/base64.h
+++ b/interface/wx/base64.h
@@ -13,7 +13,7 @@
/** @addtogroup group_funcmacro_misc */
//@{
-/**
+/**
Elements of this enum specify the possible behaviours of wxBase64Decode
when an invalid character is encountered.
*/
diff --git a/interface/wx/bitmap.h b/interface/wx/bitmap.h
index c20aa7725e..57ce3e3ff3 100644
--- a/interface/wx/bitmap.h
+++ b/interface/wx/bitmap.h
@@ -172,7 +172,7 @@ public:
class (either wxNativePixelData for RGB bitmaps or wxAlphaPixelData
for bitmaps with an additionally alpha channel).
- Note that many wxBitmap functions take a @e type parameter, which is a
+ Note that many wxBitmap functions take a @e type parameter, which is a
value of the ::wxBitmapType enumeration.
The validity of those values depends however on the platform where your program
is running and from the wxWidgets configuration.
@@ -183,9 +183,9 @@ public:
- wxX11 supports XPM files, XPM data, XBM data;
In addition, wxBitmap can load and save all formats that wxImage can; see wxImage
- for more info. Of course, you must have loaded the wxImage handlers
+ for more info. Of course, you must have loaded the wxImage handlers
(see ::wxInitAllImageHandlers() and wxImage::AddHandler).
- Note that all available wxBitmapHandlers for a given wxWidgets port are
+ Note that all available wxBitmapHandlers for a given wxWidgets port are
automatically loaded at startup so you won't need to use wxBitmap::AddHandler.
More on the difference between wxImage and wxBitmap: wxImage is just a
@@ -386,12 +386,12 @@ public:
@param handler
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.
-
+
Note that unlike wxImage::AddHandler, there's no documented list of
the wxBitmapHandlers available in wxWidgets.
- This is because they are platform-specific and most important, they are
+ This is because they are platform-specific and most important, they are
all automatically loaded at startup.
-
+
If you want to be sure that wxBitmap can load a certain type of image,
you'd better use wxImage::AddHandler.
diff --git a/interface/wx/bmpbuttn.h b/interface/wx/bmpbuttn.h
index 9c04bc2993..be1657cabb 100644
--- a/interface/wx/bmpbuttn.h
+++ b/interface/wx/bmpbuttn.h
@@ -12,7 +12,7 @@
Notice that since wxWidgets 2.9.1 bitmap display is supported by the base
wxButton class itself and the only tiny advantage of using this class is
- that it allows to specify the bitmap in its constructor, unlike wxButton.
+ that it allows specifying the bitmap in its constructor, unlike wxButton.
Please see the base class documentation for more information about images
support in wxButton.
@@ -62,8 +62,8 @@ public:
Button position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Button size.
- If ::wxDefaultSize is specified then the button is sized appropriately
+ Button size.
+ If ::wxDefaultSize is specified then the button is sized appropriately
for the bitmap.
@param style
Window style. See wxBitmapButton.
diff --git a/interface/wx/bookctrl.h b/interface/wx/bookctrl.h
index 7789496765..dc775d00a6 100644
--- a/interface/wx/bookctrl.h
+++ b/interface/wx/bookctrl.h
@@ -249,7 +249,10 @@ public:
The page must have the book control itself as the parent and must not
have been added to this control previously.
- The call to this function may generate the page changing events.
+ The call to this function will generate the page changing and page
+ changed events if @a select is true, but not when inserting the very
+ first page (as there is no previous page selection to switch from in
+ this case and so it wouldn't make sense to e.g. veto such event).
@param page
Specifies the new page.
diff --git a/interface/wx/busyinfo.h b/interface/wx/busyinfo.h
index 94ee4f74df..f0ecefe509 100644
--- a/interface/wx/busyinfo.h
+++ b/interface/wx/busyinfo.h
@@ -88,7 +88,7 @@ public:
/**
General constructor.
- This constructor allows to specify all supported attributes by calling
+ This constructor allows specifying all supported attributes by calling
the appropriate methods on wxBusyInfoFlags object passed to it as
parameter. All of them are optional but usually at least the message
should be specified.
diff --git a/interface/wx/button.h b/interface/wx/button.h
index 15e77f48bb..923415ae17 100644
--- a/interface/wx/button.h
+++ b/interface/wx/button.h
@@ -56,7 +56,7 @@
The position of the image inside the button be configured using
SetBitmapPosition(). By default the image is on the left of the text.
- Please also notice that GTK+ uses a global setting called @c gtk-button-images
+ Please also notice that GTK+ uses a global setting called @c gtk-button-images
to determine if the images should be shown in the buttons
at all. If it is off (which is the case in e.g. Gnome 2.28 by default), no
images will be shown, consistently with the native behaviour.
@@ -180,7 +180,7 @@ public:
/**
Returns the default size for the buttons. It is advised to make all the dialog
- buttons of the same size and this function allows to retrieve the (platform and
+ buttons of the same size and this function allows retrieving the (platform and
current font dependent size) which should be the best suited for this.
*/
static wxSize GetDefaultSize();
diff --git a/interface/wx/calctrl.h b/interface/wx/calctrl.h
index 7c4c579884..2142dc5922 100644
--- a/interface/wx/calctrl.h
+++ b/interface/wx/calctrl.h
@@ -244,7 +244,7 @@ enum wxCalendarHitTestResult
An item without custom attributes is drawn with the default colours and
font and without border, but setting custom attributes with SetAttr()
- allows to modify its appearance. Just create a custom attribute object and
+ allows modifying its appearance. Just create a custom attribute object and
set it for the day you want to be displayed specially (note that the
control will take ownership of the pointer, i.e. it will delete it itself).
A day may be marked as being a holiday, even if it is not recognized as
diff --git a/interface/wx/checkbox.h b/interface/wx/checkbox.h
index 203928873c..c6a07ca246 100644
--- a/interface/wx/checkbox.h
+++ b/interface/wx/checkbox.h
@@ -91,10 +91,10 @@ public:
@param label
Text to be displayed next to the checkbox.
@param pos
- Checkbox position.
+ Checkbox position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Checkbox size.
+ Checkbox size.
If ::wxDefaultSize is specified then a default size is chosen.
@param style
Window style. See wxCheckBox.
diff --git a/interface/wx/checklst.h b/interface/wx/checklst.h
index 315abbce3a..833aad5481 100644
--- a/interface/wx/checklst.h
+++ b/interface/wx/checklst.h
@@ -49,7 +49,7 @@ public:
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then the window is sized appropriately.
@param n
Number of strings with which to initialise the control.
diff --git a/interface/wx/choice.h b/interface/wx/choice.h
index dac038fb3a..fd0abd207d 100644
--- a/interface/wx/choice.h
+++ b/interface/wx/choice.h
@@ -51,7 +51,7 @@ public:
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then the choice is sized appropriately.
@param n
Number of strings with which to initialise the choice control.
@@ -172,7 +172,7 @@ public:
virtual void SetColumns(int n = 1);
virtual bool IsSorted() const;
-
+
virtual unsigned int GetCount() const ;
virtual int GetSelection() const ;
virtual void SetSelection(int n);
diff --git a/interface/wx/choicebk.h b/interface/wx/choicebk.h
index d96f9493a9..752a171042 100644
--- a/interface/wx/choicebk.h
+++ b/interface/wx/choicebk.h
@@ -88,7 +88,7 @@ public:
long style = 0,
const wxString& name = wxEmptyString);
-
+
/**
Returns the wxChoice associated with the control.
*/
diff --git a/interface/wx/clipbrd.h b/interface/wx/clipbrd.h
index 14593e27cc..21bd70b19a 100644
--- a/interface/wx/clipbrd.h
+++ b/interface/wx/clipbrd.h
@@ -165,7 +165,7 @@ public:
until this function is called again with @false.
On the other platforms, there is no PRIMARY selection and so all
- clipboard operations will fail. This allows to implement the standard
+ clipboard operations will fail. This allows implementing the standard
X11 handling of the clipboard which consists in copying data to the
CLIPBOARD selection only when the user explicitly requests it (i.e. by
selecting the "Copy" menu command) but putting the currently selected
diff --git a/interface/wx/clrpicker.h b/interface/wx/clrpicker.h
index 176934c834..158457f3f7 100644
--- a/interface/wx/clrpicker.h
+++ b/interface/wx/clrpicker.h
@@ -35,7 +35,7 @@ wxEventType wxEVT_COLOURPICKER_CHANGED;
Shows the colour in HTML form (AABBCC) as colour button label
(instead of no label at all).
@style{wxCLRP_SHOW_ALPHA}
- Allows to select opacity in the colour-chooser (effective under
+ Allows selecting opacity in the colour-chooser (effective under
wxGTK and wxOSX).
@endStyleTable
@@ -57,7 +57,7 @@ class wxColourPickerCtrl : public wxPickerBase
{
public:
wxColourPickerCtrl();
-
+
/**
Initializes the object and calls Create() with all the parameters.
*/
diff --git a/interface/wx/cmdline.h b/interface/wx/cmdline.h
index 0a35e1630f..25ef77ccfe 100644
--- a/interface/wx/cmdline.h
+++ b/interface/wx/cmdline.h
@@ -596,8 +596,8 @@ public:
/**
Enable or disable support for the long options.
- As long options are not (yet) POSIX-compliant, this option allows to
- disable them.
+ As long options are not (yet) POSIX-compliant, this option allows
+ disabling them.
@see @ref cmdlineparser_customization and AreLongOptionsEnabled()
*/
diff --git a/interface/wx/collpane.h b/interface/wx/collpane.h
index 714df38795..594a20748b 100644
--- a/interface/wx/collpane.h
+++ b/interface/wx/collpane.h
@@ -87,7 +87,7 @@ wxEventType wxEVT_COLLAPSIBLEPANE_CHANGED;
The default style. It includes wxTAB_TRAVERSAL and wxBORDER_NONE.
@style{wxCP_NO_TLW_RESIZE}
By default wxCollapsiblePane resizes the top level window containing it
- when its own size changes. This allows to easily implement dialogs
+ when its own size changes. This allows easily implementing dialogs
containing an optionally shown part, for example, and so is the default
behaviour but can be inconvenient in some specific cases -- use this
flag to disable this automatic parent resizing then.
diff --git a/interface/wx/colour.h b/interface/wx/colour.h
index cd217d853a..a3d4ef7afa 100644
--- a/interface/wx/colour.h
+++ b/interface/wx/colour.h
@@ -86,7 +86,7 @@ public:
A packed RGB value.
*/
wxColour(unsigned long colRGB);
-
+
/**
Copy constructor.
*/
@@ -194,8 +194,8 @@ public:
string (third overload).
When using third form, Set() accepts: colour names (those listed in
- wxColourDatabase), the CSS-like @c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax
- (case insensitive) and the HTML-like syntax: @c "#" followed by 6 hexadecimal
+ wxColourDatabase), the CSS-like @c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax
+ (case insensitive) and the HTML-like syntax: @c "#" followed by 6 hexadecimal
digits for red, green, blue components.
Returns @true if the conversion was successful, @false otherwise.
@@ -233,7 +233,7 @@ public:
@since 2.9.0
*/
static void MakeMono(unsigned char* r, unsigned char* g, unsigned char* b, bool on);
-
+
/**
Create a disabled (dimmed) colour from (in/out) rgb parameters.
@since 2.9.0
@@ -254,7 +254,7 @@ public:
@since 2.9.0
*/
static void MakeGrey(unsigned char* r, unsigned char* g, unsigned char* b);
-
+
/**
Create a grey colour from (in/out) rgb parameters using floating point arithmetic.
Defaults to using the standard ITU-T BT.601 when converting to YUV, where every pixel equals
@@ -269,7 +269,7 @@ public:
@since 2.9.0
*/
static unsigned char AlphaBlend(unsigned char fg, unsigned char bg, double alpha);
-
+
/**
ChangeLightness() is a utility function that simply darkens
or lightens a color, based on the specified percentage
diff --git a/interface/wx/combo.h b/interface/wx/combo.h
index 443d9de1c4..7583ed3cb8 100644
--- a/interface/wx/combo.h
+++ b/interface/wx/combo.h
@@ -69,10 +69,10 @@ public:
/**
Implement to customize matching of value string to an item container
entry.
-
+
@param item
String entered, usually by user or from SetValue() call.
-
+
@param trueItem
When item matches an entry, but the entry's string representation
is not exactly the same (case mismatch, for example), then the
@@ -130,7 +130,7 @@ public:
Useful in conjunction with LazyCreate().
*/
bool IsCreated() const;
-
+
/**
The derived class may implement this to return @true if it wants to
delay call to Create() until the popup is shown for the first time. It
@@ -386,7 +386,7 @@ public:
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then the window is sized appropriately.
@param style
Window style. See wxComboCtrl.
@@ -450,7 +450,7 @@ public:
*/
void EnablePopupAnimation(bool enable = true);
-
+
/**
Returns true if given key combination should toggle the popup.
*/
diff --git a/interface/wx/combobox.h b/interface/wx/combobox.h
index 5447243a4d..d6728a7efa 100644
--- a/interface/wx/combobox.h
+++ b/interface/wx/combobox.h
@@ -101,7 +101,7 @@ public:
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then the window is sized appropriately.
@param n
Number of strings with which to initialise the control.
diff --git a/interface/wx/config.h b/interface/wx/config.h
index 413bfa9b49..3b4fdc40c1 100644
--- a/interface/wx/config.h
+++ b/interface/wx/config.h
@@ -27,9 +27,9 @@ enum
However, usually you don't even need to know the precise nature of the
class you're working with but you would just use the wxConfigBase methods.
This allows you to write the same code regardless of whether you're working
- with the registry under Windows or text-based config files under Unix.
- To make writing the portable code even easier, wxWidgets provides a typedef
- wxConfig which is mapped onto the native wxConfigBase implementation on the
+ with the registry under Windows or text-based config files under Unix.
+ To make writing the portable code even easier, wxWidgets provides a typedef
+ wxConfig which is mapped onto the native wxConfigBase implementation on the
given platform: i.e. wxRegConfig under Windows and wxFileConfig otherwise.
See @ref overview_config for a description of all features of this class.
@@ -253,7 +253,7 @@ enum
@library{wxbase}
@category{cfg}
-
+
@see wxConfigPathChanger
*/
class wxConfigBase : public wxObject
@@ -353,7 +353,7 @@ public:
Set current path: if the first character is '/', it is the absolute
path, otherwise it is a relative path. '..' is supported. If @a strPath
doesn't exist, it is created.
-
+
@see wxConfigPathChanger
*/
virtual void SetPath(const wxString& strPath) = 0;
@@ -889,7 +889,7 @@ public:
@class wxConfigPathChanger
A handy little class which changes the current path in a wxConfig object and restores it in dtor.
- Declaring a local variable of this type, it's possible to work in a specific directory
+ Declaring a local variable of this type, it's possible to work in a specific directory
and ensure that the path is automatically restored when the function returns.
For example:
@@ -902,13 +902,13 @@ public:
wxString str;
if ( !config->Read("SomeString", &str) ) {
wxLogError("Couldn't read SomeString!");
- return false;
+ return false;
// NOTE: without wxConfigPathChanger it would be easy to forget to
// set the old path back into the wxConfig object before this return!
}
-
+
// do something useful with SomeString...
-
+
return true; // again: wxConfigPathChanger dtor will restore the original wxConfig path
}
@endcode
@@ -923,21 +923,21 @@ public:
/**
Changes the path of the given wxConfigBase object so that the key @a strEntry is accessible
(for read or write).
-
- In other words, the ctor uses wxConfigBase::SetPath() with everything which precedes the
+
+ In other words, the ctor uses wxConfigBase::SetPath() with everything which precedes the
last slash of @a strEntry, so that:
@code
wxConfigPathChanger(wxConfigBase::Get(), "/MyProgram/SomeKeyName");
- @endcode
+ @endcode
has the same effect of:
@code
wxConfigPathChanger(wxConfigBase::Get(), "/MyProgram/");
- @endcode
+ @endcode
*/
wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry);
/**
- Restores the path selected, inside the wxConfig object passed to the ctor, to the path which was
+ Restores the path selected, inside the wxConfig object passed to the ctor, to the path which was
selected when the wxConfigPathChanger ctor was called.
*/
~wxConfigPathChanger();
@@ -949,9 +949,9 @@ public:
const wxString& Name() const;
/**
- This method must be called if the original path inside the wxConfig object
- (i.e. the current path at the moment of creation of this wxConfigPathChanger object)
- could have been deleted, thus preventing wxConfigPathChanger from restoring the not
+ This method must be called if the original path inside the wxConfig object
+ (i.e. the current path at the moment of creation of this wxConfigPathChanger object)
+ could have been deleted, thus preventing wxConfigPathChanger from restoring the not
existing (any more) path.
If the original path doesn't exist any more, the path will be restored to
diff --git a/interface/wx/control.h b/interface/wx/control.h
index 34d8a388a8..04670c9e04 100644
--- a/interface/wx/control.h
+++ b/interface/wx/control.h
@@ -50,7 +50,7 @@ public:
@param style
Control style. For generic window styles, please see wxWindow.
@param validator
- Control validator.
+ Control validator.
@param name
Control name.
*/
@@ -64,7 +64,7 @@ public:
Default constructor to allow 2-phase creation.
*/
wxControl();
-
+
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
@@ -332,7 +332,7 @@ public:
public: // static functions
-
+
/**
Returns the given @a label string without mnemonics ("&" characters).
*/
@@ -340,7 +340,7 @@ public: // static functions
/**
Returns the given @a str string without mnemonics ("&" characters).
-
+
@note This function is identical to GetLabelText() and is provided
mostly for symmetry with EscapeMnemonics().
*/
diff --git a/interface/wx/cshelp.h b/interface/wx/cshelp.h
index e7f80d4c6b..0d5a55ab2d 100644
--- a/interface/wx/cshelp.h
+++ b/interface/wx/cshelp.h
@@ -257,8 +257,8 @@ public:
Button position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Button size.
- If ::wxDefaultSize is specified then the button is sized appropriately
+ Button size.
+ If ::wxDefaultSize is specified then the button is sized appropriately
for the question mark bitmap.
@param style
Window style.
diff --git a/interface/wx/ctrlsub.h b/interface/wx/ctrlsub.h
index 3e1d8d0da6..a9582e7b10 100644
--- a/interface/wx/ctrlsub.h
+++ b/interface/wx/ctrlsub.h
@@ -354,6 +354,12 @@ public:
failure in debug builds) to remove an item with the index negative or
greater or equal than the number of items in the control.
+ If there is a currently selected item below the item being deleted,
+ i.e. if GetSelection() returns a valid index greater than or equal to
+ @a n, the selection is invalidated when this function is called.
+ However if the selected item appears before the item being deleted, the
+ selection is preserved unchanged.
+
@param n
The zero-based item index.
diff --git a/interface/wx/cursor.h b/interface/wx/cursor.h
index 56b5b7ad1a..12d95b1d0a 100644
--- a/interface/wx/cursor.h
+++ b/interface/wx/cursor.h
@@ -138,12 +138,12 @@ public:
(to load a cursor from a .ico icon file) and @c wxBITMAP_TYPE_ANI
(to load a cursor from a .ani icon file).
- under MacOS, it defaults to @c wxBITMAP_TYPE_MACCURSOR_RESOURCE;
- when specifying a string resource name, first the color cursors 'crsr'
- and then the black/white cursors 'CURS' in the resource chain are scanned
+ when specifying a string resource name, first the color cursors 'crsr'
+ and then the black/white cursors 'CURS' in the resource chain are scanned
through. Note that resource forks are deprecated on OS X so this
is only available for legacy reasons and should not be used in
new code.
- - under GTK, it defaults to @c wxBITMAP_TYPE_XPM.
+ - under GTK, it defaults to @c wxBITMAP_TYPE_XPM.
See the wxCursor(const wxImage& image) ctor for more info.
- under X11, it defaults to @c wxBITMAP_TYPE_XPM.
- under Motif, it defaults to @c wxBITMAP_TYPE_XBM.
diff --git a/interface/wx/dataobj.h b/interface/wx/dataobj.h
index b6afd34daf..9a2ea4fb54 100644
--- a/interface/wx/dataobj.h
+++ b/interface/wx/dataobj.h
@@ -791,7 +791,7 @@ public:
@class wxHTMLDataObject
wxHTMLDataObject is used for working with HTML-formatted text.
-
+
@library{wxcore}
@category{dnd}
@@ -809,7 +809,7 @@ public:
Returns the HTML string.
*/
virtual wxString GetHTML() const;
-
+
/**
Sets the HTML string.
*/
diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h
index 00a8069f06..1c9076a908 100644
--- a/interface/wx/dataview.h
+++ b/interface/wx/dataview.h
@@ -78,10 +78,10 @@
@endcode
A potentially better way to avoid memory leaks is to use wxObjectDataPtr
-
+
@code
wxObjectDataPtr musicModel;
-
+
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, wxID_ANY );
musicModel = new MyMusicModel;
m_musicCtrl->AssociateModel( musicModel.get() );
@@ -382,7 +382,7 @@ public:
*/
bool ValueChanged(const wxDataViewItem& item, unsigned int col);
-
+
virtual bool IsListModel() const;
virtual bool IsVirtualListModel() const;
@@ -527,7 +527,7 @@ public:
have other reason to use a virtual control.
@see wxDataViewListModel for the API.
-
+
@library{wxcore}
@category{dvc}
*/
@@ -1634,7 +1634,7 @@ public:
/**
Set custom colours and/or font to use for the header.
- This method allows to customize the display of the control header (it
+ This method allows customizing the display of the control header (it
does nothing if @c wxDV_NO_HEADER style is used).
Currently it is only implemented in the generic version and just
@@ -2064,7 +2064,7 @@ public:
*/
virtual bool Validate(wxVariant& value);
-
+
virtual bool HasEditorCtrl() const;
virtual wxWindow* CreateEditorCtrl(wxWindow * parent,
wxRect labelRect,
@@ -2551,6 +2551,10 @@ public:
}
@endcode
+ @note Currently support for this method is not implemented in the
+ native macOS version of the control, i.e. it will be never called
+ there.
+
@see ActivateCell()
*/
virtual wxWindow* CreateEditorCtrl(wxWindow* parent,
@@ -3280,7 +3284,7 @@ public:
Returns true if item is a container.
*/
bool IsContainer( const wxDataViewItem& item );
-
+
/**
Calls the same method from wxDataViewTreeStore but uses
an index position in the image list instead of a wxIcon.
diff --git a/interface/wx/datectrl.h b/interface/wx/datectrl.h
index 26ba06496f..72199583e7 100644
--- a/interface/wx/datectrl.h
+++ b/interface/wx/datectrl.h
@@ -70,15 +70,15 @@ enum
@beginEventEmissionTable{wxDateEvent}
@event{EVT_DATE_CHANGED(id, func)}
- This event fires when the user changes the current selection in the
- control.
+ Process a wxEVT_DATE_CHANGED event, which fires when the user
+ changes the current selection in the control.
@endEventTable
@library{wxcore}
@category{pickers}
@appearance{datepickerctrl}
- @see wxCalendarCtrl, wxDateEvent
+ @see wxTimePickerCtrl, wxCalendarCtrl, wxDateEvent
*/
class wxDatePickerCtrl : public wxControl
{
@@ -87,7 +87,7 @@ public:
Default constructor.
*/
wxDatePickerCtrl();
-
+
/**
Initializes the object and calls Create() with all the parameters.
*/
diff --git a/interface/wx/datetime.h b/interface/wx/datetime.h
index 0851e59b2e..68f8630713 100644
--- a/interface/wx/datetime.h
+++ b/interface/wx/datetime.h
@@ -164,7 +164,7 @@ public:
};
/**
- Date calculations often depend on the country and wxDateTime allows to set
+ Date calculations often depend on the country and wxDateTime allows setting
the country whose conventions should be used using SetCountry(). It takes
one of the following values as parameter.
*/
@@ -325,7 +325,7 @@ public:
Copy constructor.
*/
wxDateTime(const wxDateTime& date);
-
+
/**
Same as Set().
*/
@@ -387,7 +387,7 @@ public:
@a wxDateTime::Tm structure.
*/
wxDateTime& Set(const Tm& tm);
-
+
/**
Sets the date from the so-called Julian Day Number.
@@ -795,7 +795,7 @@ public:
/**
Returns the difference between this object and @a dt as a wxDateSpan.
- This method allows to find the number of entire years, months, weeks and
+ This method allows finding the number of entire years, months, weeks and
days between @a dt and this date.
@since 2.9.5
@@ -1161,11 +1161,15 @@ public:
@a n may be either positive (counting from the beginning of the month)
or negative (counting from the end of it).
- For example, SetToWeekDay(2, wxDateTime::Wed) will set the date to the
+ For example, SetToWeekDay(wxDateTime::Wed, 2) will set the date to the
second Wednesday in the current month and
- SetToWeekDay(-1, wxDateTime::Sun) will set the date to the last Sunday
+ SetToWeekDay(wxDateTime::Sun, -1) will set the date to the last Sunday
in the current month.
+ Note that leaving the month or year parameters as their default values
+ will result in the current month or year being substituted, overwriting
+ any previous values in the wxDateTime object.
+
@return @true if the date was modified successfully, @false otherwise
meaning that the specified date doesn't exist.
*/
diff --git a/interface/wx/dc.h b/interface/wx/dc.h
index 9e363dc90a..84238b44df 100644
--- a/interface/wx/dc.h
+++ b/interface/wx/dc.h
@@ -146,7 +146,7 @@ struct wxFontMetrics
stated. Logical units are arbitrary units mapped to device units using
the current mapping mode (see wxDC::SetMapMode).
- This mechanism allows to reuse the same code which prints on e.g. a window
+ This mechanism allows reusing the same code which prints on e.g. a window
on the screen to print on e.g. a paper.
@@ -550,7 +550,7 @@ public:
void DrawRectangle(const wxRect& rect);
/**
- Draws the text rotated by @a angle degrees
+ Draws the text rotated by @a angle degrees
(positive angles are counterclockwise; the full angle is 360 degrees).
Notice that, as with DrawText(), the @a text can contain multiple lines
@@ -853,7 +853,7 @@ public:
/**
Returns the various font characteristics.
- This method allows to retrieve some of the font characteristics not
+ This method allows retrieving some of the font characteristics not
returned by GetTextExtent(), notably internal leading and average
character width.
@@ -980,10 +980,10 @@ public:
int GetBackgroundMode() const;
/**
- Gets the current font.
-
- Notice that even although each device context object has some default font
- after creation, this method would return a ::wxNullFont initially and only
+ Gets the current font.
+
+ Notice that even although each device context object has some default font
+ after creation, this method would return a ::wxNullFont initially and only
after calling SetFont() a valid font is returned.
*/
const wxFont& GetFont() const;
@@ -1014,17 +1014,17 @@ public:
/**
@a mode may be one of @c wxPENSTYLE_SOLID and @c wxPENSTYLE_TRANSPARENT.
-
- This setting determines whether text will be drawn with a background
+
+ This setting determines whether text will be drawn with a background
colour or not.
*/
void SetBackgroundMode(int mode);
/**
- Sets the current font for the DC.
+ Sets the current font for the DC.
- If the argument is ::wxNullFont (or another invalid font; see wxFont::IsOk),
- the current font is selected out of the device context (leaving wxDC without
+ If the argument is ::wxNullFont (or another invalid font; see wxFont::IsOk),
+ the current font is selected out of the device context (leaving wxDC without
any valid font), allowing the current font to be destroyed safely.
@see wxFont
@@ -1045,9 +1045,9 @@ public:
void SetTextForeground(const wxColour& colour);
/**
- Sets the current layout direction for the device context.
-
- @param dir
+ Sets the current layout direction for the device context.
+
+ @param dir
May be either @c wxLayout_Default, @c wxLayout_LeftToRight or
@c wxLayout_RightToLeft.
@@ -1213,7 +1213,7 @@ public:
/**
Copy from a source DC to this DC possibly changing the scale.
- Unlike Blit(), this method allows to specify different source and
+ Unlike Blit(), this method allows specifying different source and
destination region sizes, meaning that it can stretch or shrink it
while copying. The same can be achieved by changing the scale of the
source or target DC but calling this method is simpler and can also be
@@ -1333,8 +1333,8 @@ public:
/**
Sets the current brush for the DC.
- If the argument is ::wxNullBrush (or another invalid brush; see wxBrush::IsOk),
- the current brush is selected out of the device context (leaving wxDC without
+ If the argument is ::wxNullBrush (or another invalid brush; see wxBrush::IsOk),
+ the current brush is selected out of the device context (leaving wxDC without
any valid brush), allowing the current brush to be destroyed safely.
@see wxBrush, wxMemoryDC (for the interpretation of colours when
@@ -1343,10 +1343,10 @@ public:
void SetBrush(const wxBrush& brush);
/**
- Sets the current pen for the DC.
+ Sets the current pen for the DC.
- If the argument is ::wxNullPen (or another invalid pen; see wxPen::IsOk),
- the current pen is selected out of the device context (leaving wxDC without any
+ If the argument is ::wxNullPen (or another invalid pen; see wxPen::IsOk),
+ the current pen is selected out of the device context (leaving wxDC without any
valid pen), allowing the current pen to be destroyed safely.
@see wxMemoryDC for the interpretation of colours when drawing into a
@@ -1592,7 +1592,7 @@ public:
//@}
-
+
/**
@name query capabilities
*/
@@ -1607,7 +1607,7 @@ public:
Does the DC support calculating the size required to draw text?
*/
bool CanGetTextExtent() const;
-
+
//@}
/**
@@ -1620,12 +1620,12 @@ public:
wxGCDC then the return value will be the value returned from
wxGraphicsContext::GetNativeContext. A value of NULL is returned if
the DC does not have anything that fits the handle concept.
-
+
@since 2.9.5
*/
void* GetHandle() const;
-
+
/**
If supported by the platform and the type of DC, fetch the contents of the DC, or a subset of it, as a bitmap.
*/
diff --git a/interface/wx/dcbuffer.h b/interface/wx/dcbuffer.h
index 9268e437aa..7acdc52f91 100644
--- a/interface/wx/dcbuffer.h
+++ b/interface/wx/dcbuffer.h
@@ -36,7 +36,7 @@
Otherwise, wxBufferedDC can be used in the same way as any other device
context.
- There is another possible use for wxBufferedDC is to use it to maintain a
+ Another possible use for wxBufferedDC is to use it to maintain a
backing store for the window contents. In this case, the associated @e DC
may be @NULL but a valid backing store bitmap should be specified.
@@ -122,7 +122,7 @@ public:
/**
Blits the buffer to the dc, and detaches the dc from the buffer (so it
can be effectively used once only).
-
+
Usually only called in the destructor or by the destructor of derived
classes if the BufferedDC must blit before the derived class (which may
own the dc it's blitting to) is destroyed.
diff --git a/interface/wx/dcgraph.h b/interface/wx/dcgraph.h
index c60a00e7e0..e12a49db61 100644
--- a/interface/wx/dcgraph.h
+++ b/interface/wx/dcgraph.h
@@ -40,6 +40,10 @@ public:
/**
Construct a wxGCDC from an existing graphics context.
+
+ Note that this object takes ownership of @a context and will delete it
+ when it is destroyed or when SetGraphicsContext() is called with a
+ different context object.
*/
wxGCDC(wxGraphicsContext* context);
@@ -56,7 +60,7 @@ public:
wxGCDC();
virtual ~wxGCDC();
-
+
/**
Retrieves associated wxGraphicsContext
*/
@@ -64,8 +68,11 @@ public:
/**
Set the graphics context to be used for this wxGCDC.
+
+ Note that this object takes ownership of @a context and will delete it when
+ it is destroyed or when SetGraphicsContext() is called again.
*/
- void SetGraphicsContext( wxGraphicsContext* ctx );
+ void SetGraphicsContext(wxGraphicsContext* context);
};
diff --git a/interface/wx/debugrpt.h b/interface/wx/debugrpt.h
index c56dcba092..7af5267efc 100644
--- a/interface/wx/debugrpt.h
+++ b/interface/wx/debugrpt.h
@@ -74,7 +74,7 @@ public:
way (e.g. automatically uploaded to a remote server) but if the user is
asked to manually upload or send the report, it may be more convenient
to generate it in e.g. the users home directory and this function
- allows to do this.
+ allows doing this.
Notice that it should be called before wxDebugReport::Process() or it
has no effect.
@@ -90,8 +90,8 @@ public:
/**
Set the base name of the generated debug report file.
- This function is similar to SetCompressedFileDirectory() but allows to
- change the base name of the file. Notice that the file extension will
+ This function is similar to SetCompressedFileDirectory() but allows
+ changing the base name of the file. Notice that the file extension will
always be @c .zip.
By default, a unique name constructed from wxApp::GetAppName(), the
@@ -221,8 +221,8 @@ public:
is copied to a file in the debug report directory with the same name.
Otherwise the file will be searched in the temporary directory returned
by GetDirectory().
-
- The argument @a description only exists to be displayed to the user in
+
+ The argument @a description only exists to be displayed to the user in
the report summary shown by wxDebugReportPreview.
@see GetDirectory(), AddText()
diff --git a/interface/wx/defs.h b/interface/wx/defs.h
index 68727fd827..3a07a81dab 100644
--- a/interface/wx/defs.h
+++ b/interface/wx/defs.h
@@ -292,7 +292,7 @@ enum wxBorder
/* wxCommandEvents and the objects of the derived classes are forwarded to the */
/* parent window and so on recursively by default. Using this flag for the */
-/* given window allows to block this propagation at this window, i.e. prevent */
+/* given window allows blocking this propagation at this window, i.e. preventing */
/* the events from being propagated further upwards. The dialogs have this */
/* flag on by default. */
#define wxWS_EX_BLOCK_EVENTS 0x00000002
@@ -379,9 +379,8 @@ enum wxBorder
/*
* wxRadioBox style flags
+ * These styles are not used in any port.
*/
-/* should we number the items from left to right or from top to bottom in a 2d */
-/* radiobox? */
#define wxRA_LEFTTORIGHT 0x0001
#define wxRA_TOPTOBOTTOM 0x0002
@@ -537,7 +536,7 @@ enum wxBackgroundStyle
with this style.
*/
wxBG_STYLE_PAINT,
-
+
/* this style is deprecated and doesn't do anything, don't use */
wxBG_STYLE_COLOUR,
@@ -908,7 +907,7 @@ enum wxKeyCode
WXK_CONTROL_X,
WXK_CONTROL_Y,
WXK_CONTROL_Z,
-
+
WXK_BACK = 8, //!< Backspace.
WXK_TAB = 9,
WXK_RETURN = 13,
@@ -1035,7 +1034,7 @@ enum wxKeyCode
WXK_WINDOWS_LEFT,
WXK_WINDOWS_RIGHT,
WXK_WINDOWS_MENU ,
-
+
/** This special key code was used to represent the key used for keyboard shortcuts. Under OS X,
* this key maps to the 'Command' (aka logo or 'Apple') key, whereas on Linux/Windows/others
* this is the Control key, with the new semantic of WXK_CONTROL, WXK_COMMAND is not needed anymore
@@ -1096,11 +1095,11 @@ enum wxKeyModifier
wxMOD_SHIFT = 0x0004,
wxMOD_META = 0x0008,
wxMOD_WIN = wxMOD_META,
-
+
/** used to describe the true Ctrl Key under OS X,
identic to @c wxMOD_CONTROL on other platforms */
wxMOD_RAW_CONTROL,
-
+
/** deprecated, identic to @c wxMOD_CONTROL on all platforms */
wxMOD_CMD = wxMOD_CONTROL,
wxMOD_ALL = 0xffff
diff --git a/interface/wx/dialog.h b/interface/wx/dialog.h
index 6dfe57cf7a..90fb4ca17c 100644
--- a/interface/wx/dialog.h
+++ b/interface/wx/dialog.h
@@ -590,7 +590,7 @@ public:
EndModal().
Notice that it is possible to call ShowModal() for a dialog which had
- been previously shown with Show(), this allows to make an existing
+ been previously shown with Show(), this allows making an existing
modeless dialog modal. However ShowModal() can't be called twice
without intervening EndModal() calls.
diff --git a/interface/wx/dialup.h b/interface/wx/dialup.h
index 5ad0ce5325..a97c74490e 100644
--- a/interface/wx/dialup.h
+++ b/interface/wx/dialup.h
@@ -162,7 +162,7 @@ public:
/**
Sometimes the built-in logic for determining the online status may
fail, so, in general, the user should be allowed to override it. This
- function allows to forcefully set the online status - whatever our
+ function allows forcefully setting the online status - whatever our
internal algorithm may think about it.
@see IsOnline()
diff --git a/interface/wx/dir.h b/interface/wx/dir.h
index e5dbd92109..3fbb0fd083 100644
--- a/interface/wx/dir.h
+++ b/interface/wx/dir.h
@@ -137,7 +137,7 @@ enum wxDirFlags
@class wxDir
wxDir is a portable equivalent of Unix open/read/closedir functions which
- allow enumerating of the files in a directory. wxDir allows to enumerate
+ allow enumerating of the files in a directory. wxDir allows enumerating
files as well as directories.
wxDir also provides a flexible way to enumerate files recursively using
@@ -233,7 +233,7 @@ public:
would be unchanged and should include ::wxDIR_DIRS flag to recurse into
subdirectories (both flags are included in the value by default).
See ::wxDirFlags for the list of the possible flags.
-
+
@return Returns the total number of files found while traversing
the directory @a dirname (i.e. the number of entries appended
to the @a files array).
@@ -324,7 +324,7 @@ public:
/**
Creates a directory.
-
+
This is just an alias for wxFileName::Mkdir(); refer to that function
for more info.
*/
@@ -339,12 +339,12 @@ public:
/**
Removes a directory.
-
+
This is just an alias for wxFileName::Rmdir(); refer to that function
for more info.
*/
static bool Remove(const wxString &dir, int flags = 0);
-
+
/**
Enumerate all files and directories under the given directory.
diff --git a/interface/wx/dirctrl.h b/interface/wx/dirctrl.h
index dc43e1d6d1..69b4bb120b 100644
--- a/interface/wx/dirctrl.h
+++ b/interface/wx/dirctrl.h
@@ -52,7 +52,7 @@ enum
@library{wxcore}
@category{ctrl}
@appearance{genericdirctrl}
-
+
@beginEventEmissionTable
@event{EVT_DIRCTRL_SELECTIONCHANGED(id, func)}
Selected directory has changed.
diff --git a/interface/wx/editlbox.h b/interface/wx/editlbox.h
index 4152c63ea2..80462b24dc 100644
--- a/interface/wx/editlbox.h
+++ b/interface/wx/editlbox.h
@@ -58,7 +58,7 @@ public:
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then the window is sized appropriately.
@param style
Window style. See wxEditableListBox.
diff --git a/interface/wx/event.h b/interface/wx/event.h
index 061ba76201..dfd7e1b626 100644
--- a/interface/wx/event.h
+++ b/interface/wx/event.h
@@ -279,7 +279,7 @@ protected:
/**
@class wxEventBlocker
- This class is a special event handler which allows to discard
+ This class is a special event handler which allows discarding
any event (or a set of event types) directed to a specific window.
Example:
@@ -713,7 +713,7 @@ public:
usage, it has no advantages compared to Bind().
This is an alternative to the use of static event tables. It is more
- flexible as it allows to connect events generated by some object to an
+ flexible as it allows connecting events generated by some object to an
event handler defined in a different object of a different class (which
is impossible to do directly with the event tables -- the events can be
only handled in another object if they are propagated upwards to it).
@@ -758,7 +758,7 @@ public:
@beginWxPerlOnly
In wxPerl this function takes 4 arguments: @a id, @a lastid,
@a type, @a method; if @a method is undef, the handler is
- disconnected.}
+ disconnected.
@endWxPerlOnly
@see Bind<>()
@@ -1867,7 +1867,7 @@ public:
int GetPosition() const;
void SetOrientation(int orient);
- void SetPosition(int pos);
+ void SetPosition(int pos);
};
@@ -2477,8 +2477,8 @@ public:
@c wxEVT_TEXT_CUT and @c wxEVT_TEXT_PASTE.
If any of these events is processed (without being skipped) by an event
- handler, the corresponding operation doesn't take place which allows to
- prevent the text from being copied from or pasted to a control. It is also
+ handler, the corresponding operation doesn't take place which allows
+ preventing the text from being copied from or pasted to a control. It is also
possible to examine the clipboard contents in the PASTE event handler and
transform it in some way before inserting in a control -- for example,
changing its case or removing invalid characters.
@@ -2795,6 +2795,22 @@ public:
*/
int GetWheelDelta() const;
+ /**
+ On Mac, has the user selected "Natural" scrolling in their System
+ Preferences? Currently false on all other OS's.
+
+ "Natural" scrolling means that content scrolling happens in the
+ opposite direction, and if you are indeed scrolling content then
+ you don't need to use this function because macOS has already
+ inverted the scroll direction.
+ But there can be special situations where you want the mouse wheel
+ action to work always in the same direction and in that case you
+ will need this function.
+
+ @since 3.1.3
+ */
+ bool IsWheelInverted() const;
+
/**
Get wheel rotation, positive or negative indicates direction of rotation.
@@ -3023,7 +3039,7 @@ public:
bool GetActive() const;
/**
- Allows to check if the window was activated by clicking it with the
+ Allows checking if the window was activated by clicking it with the
mouse or in some other way.
This method is currently only implemented in wxMSW and returns @c
@@ -3298,7 +3314,7 @@ class wxQueryNewPaletteEvent : public wxEvent
{
public:
wxQueryNewPaletteEvent(wxWindowID winid = 0);
-
+
void SetPaletteRealized(bool realized);
bool GetPaletteRealized();
};
@@ -3653,9 +3669,9 @@ public:
*/
int GetPosition() const;
-
+
void SetOrientation(int orient);
- void SetPosition(int pos);
+ void SetPosition(int pos);
};
@@ -4179,7 +4195,7 @@ public:
/**
Sets the flags for this event.
- The @a flags can be a combination of the
+ The @a flags can be a combination of the
wxNavigationKeyEvent::wxNavigationKeyEventFlags values.
*/
void SetFlags(long flags);
@@ -4445,8 +4461,6 @@ public:
Notice that the event is not triggered when the application is iconized
(minimized) or restored under wxMSW.
- @onlyfor{wxmsw,wxgtk}
-
@beginEventTable{wxShowEvent}
@event{EVT_SHOW(func)}
Process a @c wxEVT_SHOW event.
@@ -4565,7 +4579,7 @@ public:
wxRect GetRect() const;
void SetRect(const wxRect& rect);
- void SetPosition(const wxPoint& pos);
+ void SetPosition(const wxPoint& pos);
};
@@ -4589,7 +4603,7 @@ public:
@b Important : Sizers ( see @ref overview_sizer ) rely on size events to function
correctly. Therefore, in a sizer-based layout, do not forget to call Skip on all
size events you catch (and don't catch size events at all when you don't need to).
-
+
@beginEventTable{wxSizeEvent}
@event{EVT_SIZE(func)}
Process a @c wxEVT_SIZE event.
@@ -4846,7 +4860,7 @@ wxEventType wxNewEventType();
In the implementation file you'll need to use the wxBEGIN_EVENT_TABLE()
and the wxEND_EVENT_TABLE() macros, plus some additional @c EVT_xxx macro
to capture events.
-
+
Note that this macro requires a final semicolon.
@see @ref overview_events_eventtables
diff --git a/interface/wx/eventfilter.h b/interface/wx/eventfilter.h
index 6488d2175b..af17c53cf6 100644
--- a/interface/wx/eventfilter.h
+++ b/interface/wx/eventfilter.h
@@ -13,8 +13,8 @@
This is a very simple class which just provides FilterEvent() virtual
method to be called by wxEvtHandler before starting process of any event.
- Thus, inheriting from this class and overriding FilterEvent() allows to
- capture and possibly handle or ignore all the events happening in the
+ Thus, inheriting from this class and overriding FilterEvent() allows
+ capturing and possibly handling or ignoring all the events happening in the
program. Of course, having event filters adds additional overhead to every
event processing and so should not be used lightly and your FilterEvent()
code should try to return as quickly as possible, especially for the events
@@ -22,7 +22,7 @@
An example of using this class:
@code
- // This class allows to determine the last time the user has worked with
+ // This class allows determining the last time the user has worked with
// this application:
class LastActivityTimeDetector : public wxEventFilter
{
@@ -72,8 +72,8 @@
filter during its creation so you may also override FilterEvent() method in
your wxApp-derived class and, in fact, this is often the most convenient
way to do it. However creating a new class deriving directly from
- wxEventFilter allows to isolate the event filtering code in its own
- separate class and also to have several independent filters, if necessary.
+ wxEventFilter allows isolating the event filtering code in its own
+ separate class and also having several independent filters, if necessary.
@category{events}
@@ -118,7 +118,7 @@ public:
/**
Override this method to implement event pre-processing.
- This method allows to filter all the events processed by the program,
+ This method allows filtering all the events processed by the program,
so you should try to return quickly from it to avoid slowing down the
program to a crawl.
diff --git a/interface/wx/evtloop.h b/interface/wx/evtloop.h
index 87750b103d..74d0056232 100644
--- a/interface/wx/evtloop.h
+++ b/interface/wx/evtloop.h
@@ -324,7 +324,7 @@ public:
@class wxGUIEventLoop
A generic implementation of the GUI event loop.
-
+
@library{wxbase}
@category{appmanagement}
*/
diff --git a/interface/wx/fileconf.h b/interface/wx/fileconf.h
index 21d85e420b..8e71afb541 100644
--- a/interface/wx/fileconf.h
+++ b/interface/wx/fileconf.h
@@ -96,7 +96,7 @@ public:
virtual bool Save(wxOutputStream& os, const wxMBConv& conv = wxConvAuto());
/**
- Allows to set the mode to be used for the config file creation. For example, to
+ Allows setting the mode to be used for the config file creation. For example, to
create a config file which is not readable by other users (useful if it stores
some sensitive information, such as passwords), you could use @c SetUmask(0077).
@@ -105,7 +105,7 @@ public:
@see wxCHANGE_UMASK()
*/
void SetUmask(int mode);
-
+
// implement inherited pure virtual functions
virtual void SetPath(const wxString& strPath);
virtual const wxString& GetPath() const;
diff --git a/interface/wx/filedlg.h b/interface/wx/filedlg.h
index 403d6c4d7d..890491d112 100644
--- a/interface/wx/filedlg.h
+++ b/interface/wx/filedlg.h
@@ -48,14 +48,14 @@ const char wxFileSelectorDefaultWildcardStr[];
return;
//else: proceed asking to the user the new file to open
}
-
- wxFileDialog
+
+ wxFileDialog
openFileDialog(this, _("Open XYZ file"), "", "",
"XYZ files (*.xyz)|*.xyz", wxFD_OPEN|wxFD_FILE_MUST_EXIST);
if (openFileDialog.ShowModal() == wxID_CANCEL)
return; // the user changed idea...
-
+
// proceed loading the file chosen by the user;
// this can be done with e.g. wxWidgets input streams:
wxFileInputStream input_stream(openFileDialog.GetPath());
@@ -64,22 +64,22 @@ const char wxFileSelectorDefaultWildcardStr[];
wxLogError("Cannot open file '%s'.", openFileDialog.GetPath());
return;
}
-
+
...
}
@endcode
-
+
The typical usage for the save file dialog is instead somewhat simpler:
@code
void MyFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event))
{
- wxFileDialog
+ wxFileDialog
saveFileDialog(this, _("Save XYZ file"), "", "",
"XYZ files (*.xyz)|*.xyz", wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (saveFileDialog.ShowModal() == wxID_CANCEL)
return; // the user changed idea...
-
+
// save the current contents in the file;
// this can be done with e.g. wxWidgets output streams:
wxFileOutputStream output_stream(saveFileDialog.GetPath());
@@ -88,7 +88,7 @@ const char wxFileSelectorDefaultWildcardStr[];
wxLogError("Cannot save current contents in file '%s'.", saveFileDialog.GetPath());
return;
}
-
+
...
}
@endcode
@@ -136,7 +136,7 @@ const char wxFileSelectorDefaultWildcardStr[];
@style{wxFD_MULTIPLE}
For open dialog only: allows selecting multiple files.
@style{wxFD_CHANGE_DIR}
- Change the current working directory (when the dialog is dismissed)
+ Change the current working directory (when the dialog is dismissed)
to the directory where the file(s) chosen by the user are.
@style{wxFD_PREVIEW}
Show the preview of the selected files (currently only supported by
@@ -302,7 +302,7 @@ public:
/**
Sets the default filename.
-
+
In wxGTK this will have little effect unless a default directory has previously been set.
*/
virtual void SetFilename(const wxString& setfilename);
diff --git a/interface/wx/filename.h b/interface/wx/filename.h
index 5a79e83df8..330a172b66 100644
--- a/interface/wx/filename.h
+++ b/interface/wx/filename.h
@@ -193,7 +193,7 @@ wxULongLong wxInvalidSize;
invalid state and wxFileName::IsOk() returns false for it.
File names can be case-sensitive or not, the function wxFileName::IsCaseSensitive()
- allows to determine this. The rules for determining whether the file name is
+ allows determining this. The rules for determining whether the file name is
absolute or relative also depend on the file name format and the only portable way
to answer this question is to use wxFileName::IsAbsolute() or wxFileName::IsRelative()
method.
@@ -517,7 +517,7 @@ public:
By default, all operations in this class work on the target of a
symbolic link (symlink) if the path of the file is actually a symlink.
- Using this method allows to turn off this "symlink following" behaviour
+ Using this method allows turning off this "symlink following" behaviour
and apply the operations to this path itself, even if it is a symlink.
The following methods are currently affected by this option:
diff --git a/interface/wx/filepicker.h b/interface/wx/filepicker.h
index f4aed07345..d226838986 100644
--- a/interface/wx/filepicker.h
+++ b/interface/wx/filepicker.h
@@ -83,7 +83,7 @@ class wxFilePickerCtrl : public wxPickerBase
{
public:
wxFilePickerCtrl();
-
+
/**
Initializes the object and calls Create() with
all the parameters.
@@ -204,7 +204,7 @@ public:
automatically synchronized with button's value. Use functions
defined in wxPickerBase to modify the text control.
@style{wxDIRP_DIR_MUST_EXIST}
- Creates a picker which allows to select only existing directories in
+ Creates a picker which allows selecting only existing directories in
the popup wxDirDialog. Notice that, as with @c wxFLP_FILE_MUST_EXIST,
it is still possible to enter a non-existent directory even when
this file is specified if @c wxDIRP_USE_TEXTCTRL style is also used.
@@ -237,7 +237,7 @@ class wxDirPickerCtrl : public wxPickerBase
{
public:
wxDirPickerCtrl();
-
+
/**
Initializes the object and calls Create() with
all the parameters.
diff --git a/interface/wx/filesys.h b/interface/wx/filesys.h
index 0145b949ba..1e7ca40d20 100644
--- a/interface/wx/filesys.h
+++ b/interface/wx/filesys.h
@@ -64,7 +64,7 @@ public:
Remove a filesystem handler from the list of handlers.
*/
static wxFileSystemHandler* RemoveHandler(wxFileSystemHandler *handler);
-
+
/**
Sets the current location. @a location parameter passed to OpenFile() is
relative to this path.
diff --git a/interface/wx/font.h b/interface/wx/font.h
index df3b25b65a..20b261b23b 100644
--- a/interface/wx/font.h
+++ b/interface/wx/font.h
@@ -11,7 +11,7 @@
the generic properties of the font without hardcoding in the sources a specific
face name.
- wxFontFamily thus allows to group the font face names of fonts with similar
+ wxFontFamily thus allows grouping the font face names of fonts with similar
properties. Most wxWidgets ports use lists of fonts for each font family
inspired by the data taken from http://www.codestyle.org/css/font-family.
*/
@@ -291,7 +291,7 @@ enum wxFontEncoding
@class wxFontInfo
This class is a helper used for wxFont creation using named parameter
- idiom: it allows to specify various wxFont attributes using the chained
+ idiom: it allows specifying various wxFont attributes using the chained
calls to its clearly named methods instead of passing them in the fixed
order to wxFont constructors.
@@ -1169,7 +1169,7 @@ public:
/**
Sets the font size using a predefined symbolic size name.
- This function allows to change font size to be (very) large or small
+ This function allows changing font size to be (very) large or small
compared to the standard font size.
@see SetSymbolicSizeRelativeTo().
diff --git a/interface/wx/fontpicker.h b/interface/wx/fontpicker.h
index 7282c4f4cc..424fccd9be 100644
--- a/interface/wx/fontpicker.h
+++ b/interface/wx/fontpicker.h
@@ -59,7 +59,7 @@ class wxFontPickerCtrl : public wxPickerBase
{
public:
wxFontPickerCtrl();
-
+
/**
Initializes the object and calls Create() with
all the parameters.
diff --git a/interface/wx/fontutil.h b/interface/wx/fontutil.h
index 5109babd57..d880edcb75 100644
--- a/interface/wx/fontutil.h
+++ b/interface/wx/fontutil.h
@@ -8,7 +8,7 @@
/**
@class wxNativeFontInfo
-
+
wxNativeFontInfo is platform-specific font representation: this class
should be considered as an opaque font description only used by the native
functions, the user code can only get the objects of this type from
diff --git a/interface/wx/fswatcher.h b/interface/wx/fswatcher.h
index 5675a7a666..c911c1c23c 100644
--- a/interface/wx/fswatcher.h
+++ b/interface/wx/fswatcher.h
@@ -10,7 +10,7 @@
/**
@class wxFileSystemWatcher
- The wxFileSystemWatcher class allows to receive notifications of file
+ The wxFileSystemWatcher class allows receiving notifications of file
system changes.
@note Implementation limitations: this class is currently implemented for
diff --git a/interface/wx/gbsizer.h b/interface/wx/gbsizer.h
index 5279db00c0..1fd3857d8d 100644
--- a/interface/wx/gbsizer.h
+++ b/interface/wx/gbsizer.h
@@ -82,7 +82,7 @@ public:
//@{
/**
Adds the given item to the given position.
-
+
@return A valid pointer if the item was successfully placed at the
given position, or @NULL if something was already there.
*/
@@ -299,7 +299,7 @@ public:
*/
bool SetSpan(const wxGBSpan& span);
-
+
wxGridBagSizer* GetGBSizer() const;
void SetGBSizer(wxGridBagSizer* sizer);
};
diff --git a/interface/wx/gdicmn.h b/interface/wx/gdicmn.h
index 0e8ffd53c8..50934ba2c5 100644
--- a/interface/wx/gdicmn.h
+++ b/interface/wx/gdicmn.h
@@ -557,7 +557,7 @@ public:
*/
void SetBottomLeft(const wxPoint &p);
-
+
//@{
/**
Modifies the rectangle to contain the bounding box of this rectangle
@@ -902,7 +902,7 @@ wxColourDatabase* wxTheColourDatabase;
@class wxSize
A wxSize is a useful data structure for graphics operations.
- It simply contains integer @e width and @e height members.
+ It simply contains integer @e x and @e y members.
Note that the width and height stored inside a wxSize object may be negative
and that wxSize functions do not perform any check against negative values
@@ -1220,7 +1220,7 @@ void wxSetCursor(const wxCursor& cursor);
/**
Returns the dimensions of the work area on the display.
- This is the same as wxGetClientDisplayRect() but allows to retrieve the
+ This is the same as wxGetClientDisplayRect() but allows retrieving the
individual components instead of the entire rectangle.
Any of the output pointers can be @NULL if the corresponding value is not
diff --git a/interface/wx/generic/helpext.h b/interface/wx/generic/helpext.h
index 2f0174f2ca..59d03baaac 100644
--- a/interface/wx/generic/helpext.h
+++ b/interface/wx/generic/helpext.h
@@ -111,9 +111,9 @@ public:
@param k
string to search for, empty string will list all entries
-
- @param mode
- optional parameter allows the search the index (wxHELP_SEARCH_INDEX)
+
+ @param mode
+ optional parameter allows the search the index (wxHELP_SEARCH_INDEX)
but this currently only supported by the wxHtmlHelpController.
@return @true on success
diff --git a/interface/wx/geometry.h b/interface/wx/geometry.h
index 51adabbb28..1db6856378 100644
--- a/interface/wx/geometry.h
+++ b/interface/wx/geometry.h
@@ -279,7 +279,7 @@ public:
void Inset( wxInt32 x , wxInt32 y );
void Inset( wxInt32 left , wxInt32 top ,wxInt32 right , wxInt32 bottom );
void Offset( const wxPoint2DInt &pt );
- void ConstrainTo( const wxRect2DInt &rect );
+ void ConstrainTo( const wxRect2DInt &rect );
wxPoint2DInt Interpolate( wxInt32 widthfactor , wxInt32 heightfactor );
static void Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
diff --git a/interface/wx/graphics.h b/interface/wx/graphics.h
index 5154ec19ba..78932c0f98 100644
--- a/interface/wx/graphics.h
+++ b/interface/wx/graphics.h
@@ -456,6 +456,8 @@ public:
with wxDC and doesn't known its exact type. Use Create() instead if
you know that the DC is e.g. wxWindowDC.
+ @see wxGraphicsRenderer::CreateContextFromUnknownDC()
+
@since 3.1.1
*/
static wxGraphicsContext* CreateFromUnknownDC(wxDC& dc);
@@ -1341,6 +1343,24 @@ public:
*/
virtual wxGraphicsContext* CreateContext(const wxEnhMetaFileDC& metaFileDC) = 0;
+ /**
+ Creates a wxGraphicsContext from a DC of unknown specific type.
+
+ Creates a wxGraphicsContext if @a dc is a supported type (i.e. has a
+ corresponding CreateContext() method, e.g. wxWindowDC or wxMemoryDC).
+ Returns @NULL if the DC is unsupported.
+
+ This method is only useful as a helper in generic code that operates
+ with wxDC and doesn't known its exact type. Use the appropriate
+ CreateContext() overload instead if you know that the DC is e.g.
+ wxWindowDC.
+
+ @see wxGraphicsContext::CreateFromUnknownDC()
+
+ @since 3.1.3
+ */
+ static wxGraphicsContext* CreateContextFromUnknownDC(wxDC& dc);
+
/**
Creates a wxGraphicsContext associated with a wxImage.
@@ -1565,7 +1585,7 @@ public:
@class wxGraphicsPenInfo
This class is a helper used for wxGraphicsPen creation using named parameter
- idiom: it allows to specify various wxGraphicsPen attributes using the chained
+ idiom: it allows specifying various wxGraphicsPen attributes using the chained
calls to its clearly named methods instead of passing them in the fixed
order to wxGraphicsPen constructors.
diff --git a/interface/wx/grid.h b/interface/wx/grid.h
index 0c3eef3d24..27690c953a 100644
--- a/interface/wx/grid.h
+++ b/interface/wx/grid.h
@@ -142,6 +142,50 @@ public:
wxGridCellBoolRenderer();
};
+/**
+ @class wxGridCellDateRenderer
+
+ This class may be used to show a date, without time, in a cell.
+
+ See @ref wxGridCellDateTimeRenderer for a date/time version.
+ wxDateTime::Format() is used internally to render the date
+ representation. wxDateTime::ParseDate() is used to parse the string
+ data entered in the cell.
+
+ @library{wxcore}
+ @category{grid}
+
+ @see wxGridCellRenderer, wxGridCellAutoWrapStringRenderer,
+ wxGridCellBoolRenderer, wxGridCellEnumRenderer,
+ wxGridCellFloatRenderer, wxGridCellNumberRenderer,
+ wxGridCellStringRenderer, wxGridCellDateTimeRenderer
+
+ @since 3.1.3
+*/
+class wxGridCellDateRenderer : public wxGridCellStringRenderer
+{
+public:
+ /**
+ Date renderer constructor.
+
+ @param outformat
+ strftime()-like format string used to render the output date.
+ By default (or if provided format string is empty) localized
+ date representation ("%x") is used.
+ */
+ wxGridCellDateRenderer(const wxString& outformat = wxString());
+
+
+ /**
+ Sets the strftime()-like format string which will be used to render
+ the date.
+
+ @param params
+ strftime()-like format string used to render the date.
+ */
+ virtual void SetParameters(const wxString& params);
+};
+
/**
@class wxGridCellDateTimeRenderer
@@ -155,9 +199,9 @@ public:
@see wxGridCellRenderer, wxGridCellAutoWrapStringRenderer,
wxGridCellBoolRenderer, wxGridCellEnumRenderer,
wxGridCellFloatRenderer, wxGridCellNumberRenderer,
- wxGridCellStringRenderer
+ wxGridCellStringRenderer, wxGridCellDateRenderer
*/
-class wxGridCellDateTimeRenderer : public wxGridCellStringRenderer
+class wxGridCellDateTimeRenderer : public wxGridCellDateRenderer
{
public:
/**
@@ -384,7 +428,7 @@ public:
@see wxGridCellAutoWrapStringEditor, wxGridCellBoolEditor,
wxGridCellChoiceEditor, wxGridCellEnumEditor,
wxGridCellFloatEditor, wxGridCellNumberEditor,
- wxGridCellTextEditor
+ wxGridCellTextEditor, wxGridCellDateEditor
*/
class wxGridCellEditor : public wxClientDataContainer, public wxRefCounter
{
@@ -532,7 +576,8 @@ protected:
@see wxGridCellEditor, wxGridCellBoolEditor, wxGridCellChoiceEditor,
wxGridCellEnumEditor, wxGridCellFloatEditor,
- wxGridCellNumberEditor, wxGridCellTextEditor
+ wxGridCellNumberEditor, wxGridCellTextEditor,
+ wxGridCellDateEditor
*/
class wxGridCellAutoWrapStringEditor : public wxGridCellTextEditor
{
@@ -551,7 +596,7 @@ public:
@see wxGridCellEditor, wxGridCellAutoWrapStringEditor,
wxGridCellChoiceEditor, wxGridCellEnumEditor,
wxGridCellFloatEditor, wxGridCellNumberEditor,
- wxGridCellTextEditor
+ wxGridCellTextEditor, wxGridCellDateEditor
*/
class wxGridCellBoolEditor : public wxGridCellEditor
{
@@ -590,7 +635,7 @@ public:
@see wxGridCellEditor, wxGridCellAutoWrapStringEditor,
wxGridCellBoolEditor, wxGridCellEnumEditor,
wxGridCellFloatEditor, wxGridCellNumberEditor,
- wxGridCellTextEditor
+ wxGridCellTextEditor, wxGridCellDateEditor
*/
class wxGridCellChoiceEditor : public wxGridCellEditor
{
@@ -641,7 +686,7 @@ public:
@see wxGridCellEditor, wxGridCellAutoWrapStringEditor,
wxGridCellBoolEditor, wxGridCellChoiceEditor,
wxGridCellTextEditor, wxGridCellFloatEditor,
- wxGridCellNumberEditor
+ wxGridCellNumberEditor, wxGridCellDateEditor
*/
class wxGridCellEnumEditor : public wxGridCellChoiceEditor
{
@@ -666,7 +711,7 @@ public:
@see wxGridCellEditor, wxGridCellAutoWrapStringEditor,
wxGridCellBoolEditor, wxGridCellChoiceEditor,
wxGridCellEnumEditor, wxGridCellFloatEditor,
- wxGridCellNumberEditor
+ wxGridCellNumberEditor, wxGridCellDateEditor
*/
class wxGridCellTextEditor : public wxGridCellEditor
{
@@ -705,7 +750,7 @@ public:
@see wxGridCellEditor, wxGridCellAutoWrapStringEditor,
wxGridCellBoolEditor, wxGridCellChoiceEditor,
wxGridCellEnumEditor, wxGridCellNumberEditor,
- wxGridCellTextEditor
+ wxGridCellTextEditor, wxGridCellDateEditor
*/
class wxGridCellFloatEditor : public wxGridCellTextEditor
{
@@ -743,7 +788,7 @@ public:
@see wxGridCellEditor, wxGridCellAutoWrapStringEditor,
wxGridCellBoolEditor, wxGridCellChoiceEditor,
wxGridCellEnumEditor, wxGridCellFloatEditor,
- wxGridCellTextEditor
+ wxGridCellTextEditor, wxGridCellDateEditor
*/
class wxGridCellNumberEditor : public wxGridCellTextEditor
{
@@ -775,6 +820,32 @@ protected:
wxString GetString() const;
};
+/**
+ @class wxGridCellDateEditor
+
+ Grid cell editor for dates.
+
+ Uses @ref wxDatePickerCtrl as actual edit control.
+
+ @library{wxcore}
+ @category{grid}
+
+ @see wxGridCellEditor, wxGridCellAutoWrapStringEditor,
+ wxGridCellBoolEditor, wxGridCellChoiceEditor,
+ wxGridCellEnumEditor, wxGridCellFloatEditor,
+ wxGridCellTextEditor
+
+ @since 3.1.3
+*/
+class wxGridCellDateEditor : public wxGridCellEditor
+{
+public:
+ /**
+ Date editor constructor.
+ */
+ wxGridCellDateEditor();
+};
+
/**
@@ -830,7 +901,7 @@ public:
/**
This class is reference counted: it is created with ref count of 1, so
- calling DecRef() once will delete it. Calling IncRef() allows to lock
+ calling DecRef() once will delete it. Calling IncRef() allows locking
it until the matching DecRef() is called.
*/
void DecRef();
@@ -934,7 +1005,7 @@ public:
/**
This class is reference counted: it is created with ref count of 1, so
- calling DecRef() once will delete it. Calling IncRef() allows to lock
+ calling DecRef() once will delete it. Calling IncRef() allows locking
it until the matching DecRef() is called.
*/
void IncRef();
@@ -2080,6 +2151,8 @@ enum wxGridRenderStyle
- wxGridCellFloatRenderer
- wxGridCellNumberRenderer
- wxGridCellStringRenderer
+ - wxGridCellDateRenderer
+ - wxGridCellDateTimeRenderer
The look of a cell can be further defined using wxGridCellAttr. An object
of this type may be returned by wxGridTableBase::GetAttr().
@@ -2092,6 +2165,7 @@ enum wxGridRenderStyle
- wxGridCellFloatEditor
- wxGridCellNumberEditor
- wxGridCellTextEditor
+ - wxGridCellDateEditor
Please see wxGridEvent, wxGridSizeEvent, wxGridRangeSelectEvent, and
wxGridEditorCreatedEvent for the documentation of all event types you can
@@ -2861,7 +2935,7 @@ public:
The base class version returns the editor which was associated with the
specified @a typeName when it was registered RegisterDataType() but
this function may be overridden to return something different. This
- allows to override an editor used for one of the standard types.
+ allows overriding an editor used for one of the standard types.
The caller must call DecRef() on the returned pointer.
*/
@@ -2961,9 +3035,10 @@ public:
Name of the new type. May be any string, but if the type name is
the same as the name of an already registered type, including one
of the standard ones (which are @c wxGRID_VALUE_STRING, @c
- wxGRID_VALUE_BOOL, @c wxGRID_VALUE_NUMBER, @c wxGRID_VALUE_FLOAT
- and @c wxGRID_VALUE_CHOICE), then the new registration information
- replaces the previously used renderer and editor.
+ wxGRID_VALUE_BOOL, @c wxGRID_VALUE_NUMBER, @c wxGRID_VALUE_FLOAT,
+ @c wxGRID_VALUE_CHOICE and @c wxGRID_VALUE_DATE), then the new
+ registration information replaces the previously used renderer and
+ editor.
@param renderer
The renderer to use for the cells of this type. Its ownership is
taken by the grid, i.e. it will call DecRef() on this pointer when
@@ -3090,6 +3165,19 @@ public:
*/
void SetColFormatNumber(int col);
+ /**
+ Sets the specified column to display date values.
+
+ The @a format argument is used with wxGridCellDateRenderer and allows
+ to specify the strftime-like format string to use for displaying the
+ dates in this column.
+
+ @see SetColFormatCustom()
+
+ @since 3.1.3
+ */
+ void SetColFormatDate(int col, const wxString& format = wxString());
+
/**
Sets the default editor for grid cells.
@@ -3579,7 +3667,7 @@ public:
/**
Disable interactive resizing of the specified column.
- This method allows to disable resizing of an individual column in a
+ This method allows one to disable resizing of an individual column in a
grid where the columns are otherwise resizable (which is the case by
default).
@@ -4537,7 +4625,7 @@ public:
Sets the extra margins used around the grid area.
A grid may occupy more space than needed for its data display and
- this function allows to set how big this extra space is
+ this function allows setting how big this extra space is
*/
void SetMargins(int extraWidth, int extraHeight);
diff --git a/interface/wx/headercol.h b/interface/wx/headercol.h
index 60e0a4a3cc..bb73100a5c 100644
--- a/interface/wx/headercol.h
+++ b/interface/wx/headercol.h
@@ -248,7 +248,7 @@ public:
/**
Set the column flags.
- This method allows to set all flags at once, see also generic
+ This method allows setting all flags at once, see also generic
ChangeFlag(), SetFlag(), ClearFlag() and ToggleFlag() methods below as
well as specific SetResizeable(), SetSortable(), SetReorderable() and
SetHidden() ones.
diff --git a/interface/wx/headerctrl.h b/interface/wx/headerctrl.h
index 8a9907d546..d8045cf6de 100644
--- a/interface/wx/headerctrl.h
+++ b/interface/wx/headerctrl.h
@@ -692,7 +692,7 @@ public:
*/
int GetColumn() const;
void SetColumn(int col);
-
+
/**
Return the current width of the column.
@@ -700,7 +700,7 @@ public:
*/
int GetWidth() const;
void SetWidth(int width);
-
+
/**
Return the new order of the column.
diff --git a/interface/wx/help.h b/interface/wx/help.h
index dfa6f489ed..9b7b3b8400 100644
--- a/interface/wx/help.h
+++ b/interface/wx/help.h
@@ -156,7 +156,7 @@ public:
/**
If the help viewer is not running, runs it, and searches for sections matching
the given keyword. If one match is found, the file is displayed at this section.
- The optional parameter allows to search the index (wxHELP_SEARCH_INDEX)
+ The optional parameter allows searching the index (wxHELP_SEARCH_INDEX)
but this currently is only supported by the wxHtmlHelpController.
- @e WinHelp, MS HTML Help:
@@ -247,7 +247,7 @@ public:
This is an alias for one of a family of help controller classes which is
most appropriate for the current platform.
-
+
A help controller allows an application to display help, at the contents
or at a particular topic, and shut the help program down on termination.
This avoids proliferation of many instances of the help viewer whenever the
diff --git a/interface/wx/html/helpctrl.h b/interface/wx/html/helpctrl.h
index 9cbea267c5..bb3e1064a7 100644
--- a/interface/wx/html/helpctrl.h
+++ b/interface/wx/html/helpctrl.h
@@ -269,7 +269,7 @@ public:
wxHtmlHelpDialog* GetDialog();
-
+
protected:
/**
diff --git a/interface/wx/html/helpdata.h b/interface/wx/html/helpdata.h
index 36537406b0..f652185a9e 100644
--- a/interface/wx/html/helpdata.h
+++ b/interface/wx/html/helpdata.h
@@ -20,7 +20,7 @@ public:
wxString GetTitle() const;
wxString GetStart() const;
wxString GetBasePath() const;
-
+
/* SetContentsRange: store in the bookrecord where in the index/contents lists the
* book's records are stored. This to facilitate searching in a specific book.
* This code will have to be revised when loading/removing books becomes dynamic.
diff --git a/interface/wx/html/htmlcell.h b/interface/wx/html/htmlcell.h
index 2f64f36556..af3b201db1 100644
--- a/interface/wx/html/htmlcell.h
+++ b/interface/wx/html/htmlcell.h
@@ -8,7 +8,7 @@
/**
@class wxHtmlRenderingStyle
-
+
wxHtmlSelection is data holder with information about text selection.
Selection is defined by two positions (beginning and end of the selection)
and two leaf(!) cells at these positions.
@@ -476,7 +476,7 @@ public:
/**
Detach a child cell.
- Detaching a cell removes it from this container and allows to reattach
+ Detaching a cell removes it from this container and allows reattaching
it to another one by using InsertCell(). Alternatively, this method can
be used to selectively remove some elements of the HTML document tree
by deleting the cell after calling it.
diff --git a/interface/wx/html/htmlwin.h b/interface/wx/html/htmlwin.h
index 36fd69d41c..177939fba1 100644
--- a/interface/wx/html/htmlwin.h
+++ b/interface/wx/html/htmlwin.h
@@ -621,6 +621,11 @@ public:
*/
wxPoint GetPoint() const;
+ /**
+ Returns the wxMouseEvent associated with the event.
+ */
+ wxMouseEvent GetMouseEvent() const;
+
/**
Call this function with @a linkclicked set to @true if the cell which has
been clicked contained a link or @false otherwise (which is the default).
diff --git a/interface/wx/html/htmprint.h b/interface/wx/html/htmprint.h
index 1b4a4e861b..cb6b86822e 100644
--- a/interface/wx/html/htmprint.h
+++ b/interface/wx/html/htmprint.h
@@ -136,15 +136,15 @@ public:
Sets font sizes to be relative to the given size or the system
default size; use either specified or default font
- @param size
+ @param size
Point size of the default HTML text
@param normal_face
- This is face name for normal (i.e. non-fixed) font. It can be
- either empty string (then the default face is chosen) or
- platform-specific face name. Examples are "helvetica" under
+ This is face name for normal (i.e. non-fixed) font. It can be
+ either empty string (then the default face is chosen) or
+ platform-specific face name. Examples are "helvetica" under
Unix or "Times New Roman" under Windows.
@param fixed_face
- The same thing for fixed face ( \..\ )
+ The same thing for fixed face ( \..\ )
@see SetSize()
*/
@@ -301,7 +301,7 @@ public:
*/
void SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int* sizes = NULL);
-
+
/**
Sets the name used for preview frames and setup dialogs.
@@ -310,7 +310,7 @@ public:
void SetName(const wxString& name);
/**
- Sets default font sizes and/or default font size.
+ Sets default font sizes and/or default font size.
See wxHtmlDCRenderer::SetStandardFonts for detailed description.
@see SetFonts()
*/
diff --git a/interface/wx/html/webkit.h b/interface/wx/html/webkit.h
index dce5f0e5f5..d00c857f7a 100644
--- a/interface/wx/html/webkit.h
+++ b/interface/wx/html/webkit.h
@@ -35,7 +35,7 @@ public:
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxWebKitCtrlNameStr);
-
+
bool Create(wxWindow *parent,
wxWindowID winid,
const wxString& strURL,
diff --git a/interface/wx/htmllbox.h b/interface/wx/htmllbox.h
index 234467fe7d..b70f62213f 100644
--- a/interface/wx/htmllbox.h
+++ b/interface/wx/htmllbox.h
@@ -97,7 +97,7 @@ protected:
background of the selected cells in the same way as GetSelectedTextColour().
It should be rarely, if ever, used because wxVListBox::SetSelectionBackground
- allows to change the selection background for all cells at once and doing
+ allows changing the selection background for all cells at once and doing
anything more fancy is probably going to look strangely.
@see GetSelectedTextColour()
@@ -218,7 +218,7 @@ public:
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then the window is sized appropriately.
@param n
Number of strings with which to initialise the control.
diff --git a/interface/wx/hyperlink.h b/interface/wx/hyperlink.h
index ff0f136654..b389e0b465 100644
--- a/interface/wx/hyperlink.h
+++ b/interface/wx/hyperlink.h
@@ -100,7 +100,7 @@ class wxHyperlinkCtrl : public wxControl
{
public:
wxHyperlinkCtrl();
-
+
/**
Constructor. See Create() for more info.
*/
diff --git a/interface/wx/icon.h b/interface/wx/icon.h
index 8f1986c46c..770120707e 100644
--- a/interface/wx/icon.h
+++ b/interface/wx/icon.h
@@ -181,7 +181,7 @@ public:
/**
Attach a Windows icon handle.
- This wxMSW-specific method allows to assign a native Windows @c HICON
+ This wxMSW-specific method allows assigning a native Windows @c HICON
(which must be castes to @c WXHICON opaque handle type) to wxIcon.
Notice that this means that the @c HICON will be destroyed by wxIcon
when it is destroyed.
diff --git a/interface/wx/iconbndl.h b/interface/wx/iconbndl.h
index ef1fdd9023..f81f71f46f 100644
--- a/interface/wx/iconbndl.h
+++ b/interface/wx/iconbndl.h
@@ -140,10 +140,10 @@ public:
always returned. Otherwise, the behaviour depends on the flags. If only
wxIconBundle::FALLBACK_NONE is given, the function returns an invalid
icon. If wxIconBundle::FALLBACK_SYSTEM is given, it tries to find the
- icon of standard system size, regardless of the size passed as
+ icon of standard system size, regardless of the size passed as
parameter. Otherwise, or if the icon system size is not found neither,
but wxIconBundle::FALLBACK_NEAREST_LARGER flag is specified, the
- function returns the smallest icon of the size larger than the
+ function returns the smallest icon of the size larger than the
requested one or, if this fails too, just the icon closest to the
specified size.
diff --git a/interface/wx/image.h b/interface/wx/image.h
index c3d47af52b..055fcbbe77 100644
--- a/interface/wx/image.h
+++ b/interface/wx/image.h
@@ -350,7 +350,7 @@ protected:
/**
Called to get the number of images available in a multi-image file
type, if supported.
-
+
NOTE: this function is allowed to change the current stream position
since GetImageCount() will take care of restoring it later
*/
@@ -358,7 +358,7 @@ protected:
/**
Called to test if this handler can read an image from the given stream.
-
+
NOTE: this function is allowed to change the current stream position
since CallDoCanRead() will take care of restoring it later
*/
@@ -512,7 +512,7 @@ public:
double hue;
double saturation;
- double value;
+ double value;
};
/**
@@ -953,9 +953,8 @@ public:
than @a threshold are replaced with the mask colour and the alpha
channel is removed. Otherwise nothing is done.
- The mask colour is chosen automatically using
- FindFirstUnusedColour() by this function, see the overload below if you
- this is not appropriate.
+ The mask colour is chosen automatically using FindFirstUnusedColour(),
+ see the overload below if this is not appropriate.
@return Returns @true on success, @false on error.
*/
@@ -1744,7 +1743,7 @@ public:
/**
Set the color of the pixel at the given x and y coordinate.
*/
-
+
void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b );
/**
diff --git a/interface/wx/imaggif.h b/interface/wx/imaggif.h
index 0fa8b0257a..b30540a4eb 100644
--- a/interface/wx/imaggif.h
+++ b/interface/wx/imaggif.h
@@ -1,9 +1,9 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imaggif.h
-// Purpose: interface of wxGIFHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imaggif.h
+// Purpose: interface of wxGIFHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
#define wxIMAGE_OPTION_GIF_COMMENT wxT("GifComment")
@@ -25,13 +25,13 @@ public:
*/
wxGIFHandler();
- virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose = true,
+ virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose = true,
int index = -1);
virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true);
/**
Save the animated gif.
-
+
@param images
The image array object which is to be affected by this operation.
@param stream
diff --git a/interface/wx/imagiff.h b/interface/wx/imagiff.h
index 128b05935c..fdf19a469d 100644
--- a/interface/wx/imagiff.h
+++ b/interface/wx/imagiff.h
@@ -1,11 +1,11 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imagiff.h
-// Purpose: interface of wxIFFHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imagiff.h
+// Purpose: interface of wxIFFHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
-/**
+/**
@class wxIFFHandler
This is the image handler for the IFF format.
diff --git a/interface/wx/imagjpeg.h b/interface/wx/imagjpeg.h
index 3cbd9b2ef8..2e68d982db 100644
--- a/interface/wx/imagjpeg.h
+++ b/interface/wx/imagjpeg.h
@@ -1,11 +1,11 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imagjpeg.h
-// Purpose: interface of wxJPEGHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imagjpeg.h
+// Purpose: interface of wxJPEGHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
-/**
+/**
@class wxJPEGHandler
This is the image handler for the JPEG format.
@@ -22,7 +22,7 @@ public:
Default constructor for wxJPEGHandler
*/
wxJPEGHandler();
-
+
/**
Retrieve the version information about the JPEG library used by this
handler.
diff --git a/interface/wx/imagpcx.h b/interface/wx/imagpcx.h
index 4872dad801..b2dcbb7c42 100644
--- a/interface/wx/imagpcx.h
+++ b/interface/wx/imagpcx.h
@@ -1,11 +1,11 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imagpcx.h
-// Purpose: interface of wxPCXHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imagpcx.h
+// Purpose: interface of wxPCXHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
-/**
+/**
@class wxPCXHandler
This is the image handler for the PCX format.
diff --git a/interface/wx/imagpng.h b/interface/wx/imagpng.h
index a87febf1a4..7605c5bc69 100644
--- a/interface/wx/imagpng.h
+++ b/interface/wx/imagpng.h
@@ -1,9 +1,9 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imagpng.h
-// Purpose: interface of wxPNGHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imagpng.h
+// Purpose: interface of wxPNGHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
#define wxIMAGE_OPTION_PNG_FORMAT wxT("PngFormat")
#define wxIMAGE_OPTION_PNG_BITDEPTH wxT("PngBitDepth")
diff --git a/interface/wx/imagpnm.h b/interface/wx/imagpnm.h
index 01f923b59b..a538f48f72 100644
--- a/interface/wx/imagpnm.h
+++ b/interface/wx/imagpnm.h
@@ -1,11 +1,11 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imagpnm.h
-// Purpose: interface of wxPNMHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imagpnm.h
+// Purpose: interface of wxPNMHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
-/**
+/**
@class wxPNMHandler
This is the image handler for the PNM format.
diff --git a/interface/wx/imagtga.h b/interface/wx/imagtga.h
index b5c2682861..dbdd3d9207 100644
--- a/interface/wx/imagtga.h
+++ b/interface/wx/imagtga.h
@@ -1,11 +1,11 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imagtga.h
-// Purpose: interface of wxTGAHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imagtga.h
+// Purpose: interface of wxTGAHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
-/**
+/**
@class wxTGAHandler
This is the image handler for the TGA format.
diff --git a/interface/wx/imagtiff.h b/interface/wx/imagtiff.h
index 260c0ea1de..d370d2e72d 100644
--- a/interface/wx/imagtiff.h
+++ b/interface/wx/imagtiff.h
@@ -13,12 +13,12 @@
/**
@class wxTIFFHandler
-
+
This is the image handler for the TIFF format.
-
+
@library{wxcore}
@category{gdi}
-
+
@see wxImage, wxImageHandler, wxInitAllImageHandlers()
*/
class wxTIFFHandler : public wxImageHandler
@@ -28,7 +28,7 @@ public:
Default constructor for wxTIFFHandler
*/
wxTIFFHandler();
-
+
/**
Retrieve the version information about the TIFF library used by this
handler.
@@ -36,10 +36,10 @@ public:
@since 2.9.2
*/
static wxVersionInfo GetLibraryVersionInfo();
-
+
// let the parent class' (wxImageHandler) documentation through for these methods
virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1);
-
+
protected:
virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true);
virtual int DoGetImageCount(wxInputStream& stream);
diff --git a/interface/wx/imagxpm.h b/interface/wx/imagxpm.h
index 03e6b5fc3c..dff40ed5a1 100644
--- a/interface/wx/imagxpm.h
+++ b/interface/wx/imagxpm.h
@@ -1,11 +1,11 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: imagxpm.h
-// Purpose: interface of wxXPMHandler
-// Author: Samuel Dunn
-// Licence: wxWindows licence
-////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+// Name: imagxpm.h
+// Purpose: interface of wxXPMHandler
+// Author: Samuel Dunn
+// Licence: wxWindows licence
+////////////////////////////////////////////////////////////////////////////
-/**
+/**
@class wxXPMHandler
This is the image handler for the XPM format.
diff --git a/interface/wx/intl.h b/interface/wx/intl.h
index 63bcf9f260..17d42de8d8 100644
--- a/interface/wx/intl.h
+++ b/interface/wx/intl.h
@@ -98,15 +98,15 @@ enum wxLocaleCategory
/**
The values understood by wxLocale::GetInfo().
-
- Note that for the @c wxLOCALE_*_FMT constants (the date and time formats),
+
+ Note that for the @c wxLOCALE_*_FMT constants (the date and time formats),
the strings returned by wxLocale::GetInfo() use strftime() or,
equivalently, wxDateTime::Format() format. If the relevant format
couldn't be determined, an empty string is returned -- there is no
fallback value so that the application could determine the best course
of actions itself in such case.
- All of these values are used with @c wxLOCALE_CAT_DATE in wxLocale::GetInfo() or,
+ All of these values are used with @c wxLOCALE_CAT_DATE in wxLocale::GetInfo() or,
more typically, with @c wxLOCALE_CAT_DEFAULT as they only apply to a single category.
*/
enum wxLocaleInfo
@@ -214,6 +214,12 @@ enum wxLocaleInfo
@see @ref overview_i18n, @ref page_samples_internat, wxXLocale, wxTranslations
*/
+enum wxLocaleInitFlags
+{
+ wxLOCALE_DONT_LOAD_DEFAULT = 0x0000, ///< Don't load wxstd.mo catalog.
+ wxLOCALE_LOAD_DEFAULT = 0x0001 ///< Load wxstd.mo (done by default).
+};
+
class wxLocale
{
public:
diff --git a/interface/wx/kbdstate.h b/interface/wx/kbdstate.h
index bbc8e4eac7..fc26fc257e 100644
--- a/interface/wx/kbdstate.h
+++ b/interface/wx/kbdstate.h
@@ -107,9 +107,9 @@ public:
/**
Returns true if the Control key (also under OS X).
-
+
This function doesn't distinguish between right and left control keys.
-
+
Notice that GetModifiers() should usually be used instead of this one.
*/
bool RawControlDown() const;
@@ -127,7 +127,7 @@ public:
Returns true if the Meta/Windows/Apple key is pressed.
This function tests the state of the key traditionally called Meta
- under Unix systems, Windows keys under MSW
+ under Unix systems, Windows keys under MSW
Notice that GetModifiers() should usually be used instead of this one.
@see CmdDown()
@@ -149,7 +149,7 @@ public:
*/
bool CmdDown() const;
-
+
void SetControlDown(bool down);
void SetRawControlDown(bool down);
void SetShiftDown(bool down);
diff --git a/interface/wx/listbox.h b/interface/wx/listbox.h
index 00b4c53338..53c07ddab1 100644
--- a/interface/wx/listbox.h
+++ b/interface/wx/listbox.h
@@ -61,9 +61,9 @@
list is selected or the selection changes.
@event{EVT_LISTBOX_DCLICK(id, func)}
Process a @c wxEVT_LISTBOX_DCLICK event, when the listbox
- is double-clicked. On some platforms (notably wxGTK2)
- pressing the enter key is handled as an equivalent of a
- double-click.
+ is double-clicked. On some platforms (notably wxGTK2)
+ pressing the enter key is handled as an equivalent of a
+ double-click.
@endEventTable
@library{wxcore}
@@ -176,9 +176,9 @@ public:
void Deselect(int n);
virtual void SetSelection(int n);
-
+
virtual int GetSelection() const;
-
+
virtual bool SetStringSelection(const wxString& s, bool select);
virtual bool SetStringSelection(const wxString& s);
@@ -324,8 +324,8 @@ public:
// NOTE: Phoenix needs to see the implementation of pure virtuals so it
// knows that this class is not abstract.
virtual unsigned int GetCount() const;
- virtual wxString GetString(unsigned int n) const;
- virtual void SetString(unsigned int n, const wxString& s);
- virtual int FindString(const wxString& s, bool bCase = false) const;
+ virtual wxString GetString(unsigned int n) const;
+ virtual void SetString(unsigned int n, const wxString& s);
+ virtual int FindString(const wxString& s, bool bCase = false) const;
};
diff --git a/interface/wx/listctrl.h b/interface/wx/listctrl.h
index 49bfdb85ef..6692f09907 100644
--- a/interface/wx/listctrl.h
+++ b/interface/wx/listctrl.h
@@ -127,7 +127,7 @@ enum
A special case of report view quite different from the other modes of the list
control is a virtual control in which the items data (including text, images
and attributes) is managed by the main program and is requested by the control
- itself only when needed which allows to have controls with millions of items
+ itself only when needed which allows having controls with millions of items
without consuming much memory. To use virtual list control you must use
wxListCtrl::SetItemCount first and override at least wxListCtrl::OnGetItemText
(and optionally wxListCtrl::OnGetItemImage or wxListCtrl::OnGetItemColumnImage and
@@ -374,7 +374,7 @@ public:
@return @true if all columns were successfully deleted, @false otherwise.
*/
bool DeleteAllColumns();
-
+
/**
Deletes all items in the list control.
@@ -453,7 +453,7 @@ public:
/**
Finish editing the label.
- This method allows to programmatically end editing a list control item
+ This method allows one to programmatically end editing a list control item
in place. Usually it will only be called when editing is in progress,
i.e. if GetEditControl() returns non-NULL. In particular, do not call
it from EVT_LIST_BEGIN_LABEL_EDIT handler as the edit control is not
@@ -1405,7 +1405,7 @@ protected:
@event{EVT_LIST_ITEM_RIGHT_CLICK(id, func)}
The right mouse button has been clicked on an item.
@event{EVT_LIST_KEY_DOWN(id, func)}
- A key has been pressed. GetIndex() may be -1 if no item is selected.
+ A key has been pressed. GetIndex() may be -1 if no item is selected.
@event{EVT_LIST_INSERT_ITEM(id, func)}
An item has been inserted.
@event{EVT_LIST_COL_CLICK(id, func)}
@@ -1516,7 +1516,7 @@ public:
*/
bool IsEditCancelled() const;
-
+
/**
@see GetKeyCode()
*/
diff --git a/interface/wx/log.h b/interface/wx/log.h
index a701af81af..213365b5d2 100644
--- a/interface/wx/log.h
+++ b/interface/wx/log.h
@@ -507,7 +507,7 @@ public:
/**
Show all pending output and clear the buffer.
-
+
Some of wxLog implementations, most notably the standard wxLogGui class,
buffer the messages (for example, to avoid showing the user a zillion of modal
message boxes one after another -- which would be really annoying).
@@ -801,7 +801,7 @@ public:
The messages will be written in the encoding specified by the
given @c wxMBConv.
- The @a conv argument is only available in wxWidgets 3.1.1 and later.
+ The @a conv argument is only available in wxWidgets 3.1.1 and later.
@note
In practice, it is only advisable to specify @c wxConvUTF8 as
@@ -1398,8 +1398,8 @@ void wxVLogError(const char* formatString, va_list argPtr);
make sense to separate them from other debug messages.
Trace messages can be separated into different categories; these functions in facts
- only log the message if the given @a mask is currently enabled in wxLog.
- This lets you selectively trace only some operations and not others by enabling the
+ only log the message if the given @a mask is currently enabled in wxLog.
+ This lets you selectively trace only some operations and not others by enabling the
desired trace masks with wxLog::AddTraceMask() or by setting the
@ref overview_envvars "@c WXTRACE environment variable".
diff --git a/interface/wx/longlong.h b/interface/wx/longlong.h
index 5903a32f0f..4c630388da 100644
--- a/interface/wx/longlong.h
+++ b/interface/wx/longlong.h
@@ -69,7 +69,7 @@ public:
//@}
/**
- This allows to convert a double value to wxLongLong type.
+ This allows converting a double value to wxLongLong type.
Such conversion is not always possible in which case the result will be
silently truncated in a platform-dependent way.
diff --git a/interface/wx/math.h b/interface/wx/math.h
index b1486c270c..5774680131 100644
--- a/interface/wx/math.h
+++ b/interface/wx/math.h
@@ -93,7 +93,7 @@ unsigned int wxCTZ(wxUint32 x);
*/
int wxRound(double x);
-/**
+/**
Returns true if both double values are identical. This is
only reliable if both values have been assigned the same
value.
diff --git a/interface/wx/mdi.h b/interface/wx/mdi.h
index b093fc6387..b5708c0742 100644
--- a/interface/wx/mdi.h
+++ b/interface/wx/mdi.h
@@ -306,7 +306,7 @@ public:
SetWindowMenu() is called again).
To remove the window completely, you can use the wxFRAME_NO_WINDOW_MENU
- window style but this function also allows to do it by passing @NULL
+ window style but this function also allows doing it by passing @NULL
pointer as @a menu.
The menu may include the items with the following standard identifiers
diff --git a/interface/wx/menu.h b/interface/wx/menu.h
index 233f042f55..1b8a85aaca 100644
--- a/interface/wx/menu.h
+++ b/interface/wx/menu.h
@@ -382,27 +382,27 @@ public:
@remarks Use only after the menubar has been associated with a frame.
*/
virtual void SetMenuLabel(size_t pos, const wxString& label);
-
- /**
+
+ /**
Enables you to set the global menubar on Mac, that is, the menubar displayed
when the app is running without any frames open.
-
+
@param menubar
The menubar to set.
-
- @remarks Only exists on Mac, other platforms do not have this method.
+
+ @remarks Only exists on Mac, other platforms do not have this method.
@onlyfor{wxosx}
*/
static void MacSetCommonMenuBar(wxMenuBar* menubar);
-
- /**
+
+ /**
Enables you to get the global menubar on Mac, that is, the menubar displayed
when the app is running without any frames open.
-
+
@return The global menubar.
-
- @remarks Only exists on Mac, other platforms do not have this method.
+
+ @remarks Only exists on Mac, other platforms do not have this method.
@onlyfor{wxosx}
*/
@@ -511,7 +511,7 @@ public:
Constructs a wxMenu object.
*/
wxMenu();
-
+
/**
Constructs a wxMenu object.
@@ -1050,7 +1050,7 @@ public:
*/
void UpdateUI(wxEvtHandler* source = NULL);
-
+
void SetInvokingWindow(wxWindow *win);
wxWindow *GetInvokingWindow() const;
wxWindow *GetWindow() const;
diff --git a/interface/wx/menuitem.h b/interface/wx/menuitem.h
index 3597079e9d..b03ff5ae65 100644
--- a/interface/wx/menuitem.h
+++ b/interface/wx/menuitem.h
@@ -144,37 +144,37 @@ public:
@see GetItemLabelText(), GetItemLabel()
*/
static wxString GetLabelText(const wxString& text);
-
-
+
+
/**
@name Getters
*/
//@{
-
+
/**
Returns the background colour associated with the menu item.
-
+
@onlyfor{wxmsw}
*/
wxColour& GetBackgroundColour() const;
/**
Returns the checked or unchecked bitmap.
-
+
@onlyfor{wxmsw}
*/
virtual const wxBitmap& GetBitmap(bool checked = true) const;
/**
Returns the bitmap to be used for disabled items.
-
+
@onlyfor{wxmsw}
*/
virtual const wxBitmap& GetDisabledBitmap() const;
-
+
/**
Returns the font associated with the menu item.
-
+
@onlyfor{wxmsw}
*/
wxFont& GetFont() const;
@@ -223,7 +223,7 @@ public:
/**
Gets the width of the menu item checkmark bitmap.
-
+
@onlyfor{wxmsw}
*/
int GetMarginWidth() const;
@@ -238,7 +238,7 @@ public:
Returns the text associated with the menu item.
@deprecated This function is deprecated. Please use GetItemLabel() or GetItemLabelText() instead.
-
+
@see GetItemLabel(), GetItemLabelText()
*/
wxString GetName() const;
@@ -260,11 +260,11 @@ public:
/**
Returns the text colour associated with the menu item.
-
+
@onlyfor{wxmsw}
*/
wxColour& GetTextColour() const;
-
+
/**
Extract the accelerator from the given menu string, return NULL if none
found.
@@ -277,9 +277,9 @@ public:
virtual wxAcceleratorEntry *GetAccel() const;
//@}
-
-
-
+
+
+
/**
@name Checkers
*/
@@ -329,11 +329,11 @@ public:
Returns @true if the item is a submenu.
*/
bool IsSubMenu() const;
-
+
//@}
-
-
-
+
+
+
/**
@name Setters
*/
@@ -341,7 +341,7 @@ public:
/**
Sets the background colour associated with the menu item.
-
+
@onlyfor{wxmsw}
*/
void SetBackgroundColour(const wxColour& colour);
@@ -349,7 +349,7 @@ public:
/**
Sets the bitmap for the menu item.
- It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap) if
+ It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap) if
@a checked is @true (default value) or SetBitmaps(wxNullBitmap, bmp)
otherwise.
@@ -386,7 +386,7 @@ public:
/**
Sets the font associated with the menu item.
-
+
@onlyfor{wxmsw}
*/
void SetFont(const wxFont& font);
@@ -398,19 +398,19 @@ public:
/**
Sets the label associated with the menu item.
-
- Note that if the ID of this menu item corresponds to a stock ID, then it is
+
+ Note that if the ID of this menu item corresponds to a stock ID, then it is
not necessary to specify a label: wxWidgets will automatically use the stock
item label associated with that ID. See the @ref wxMenuItem::wxMenuItem "constructor"
for more info.
-
- The label string for the normal menu items (not separators) may include the
+
+ The label string for the normal menu items (not separators) may include the
accelerator which can be used to activate the menu item from keyboard.
- An accelerator key can be specified using the ampersand & character.
- In order to embed an ampersand character in the menu item text, the ampersand
+ An accelerator key can be specified using the ampersand & character.
+ In order to embed an ampersand character in the menu item text, the ampersand
must be doubled.
-
- Optionally you can specify also an accelerator string appending a tab character
+
+ Optionally you can specify also an accelerator string appending a tab character
\\t followed by a valid key combination (e.g. CTRL+V ).
Its general syntax is any combination of @c "CTRL", @c "RAWCTRL", @c
"ALT" and @c "SHIFT" strings (case doesn't matter) separated by either
@@ -507,7 +507,7 @@ public:
/**
Sets the width of the menu item checkmark bitmap.
-
+
@onlyfor{wxmsw}
*/
void SetMarginWidth(int width);
@@ -526,18 +526,18 @@ public:
Sets the text associated with the menu item.
@deprecated This function is deprecated in favour of SetItemLabel().
-
+
@see SetItemLabel().
*/
virtual void SetText(const wxString& text);
/**
Sets the text colour associated with the menu item.
-
+
@onlyfor{wxmsw}
*/
void SetTextColour(const wxColour& colour);
-
+
/**
Set the accel for this item - this may also be done indirectly with
SetText()
diff --git a/interface/wx/mimetype.h b/interface/wx/mimetype.h
index 54d0e10666..7cb00011ce 100644
--- a/interface/wx/mimetype.h
+++ b/interface/wx/mimetype.h
@@ -10,11 +10,11 @@
This class allows the application to retrieve information about all known
MIME types from a system-specific location and the filename extensions to the
- MIME types and vice versa.
-
+ MIME types and vice versa.
+
MIME stands for "Multipurpose Internet Mail Extensions" and was originally
used in mail protocols. It's standardized by several RFCs.
-
+
Under Windows, the MIME type information is queried from registry.
Under Linux and Unix, it is queried from the XDG data directories.
@@ -23,7 +23,7 @@
The application should not construct its own manager: it should use the
object pointer ::wxTheMimeTypesManager.
The functions GetFileTypeFromMimeType() and GetFileTypeFromExtension()
- return a wxFileType object which may be further queried for file description,
+ return a wxFileType object which may be further queried for file description,
icon and other attributes.
@section mimetypemanager_helpers Helper functions
@@ -445,7 +445,7 @@ public:
const wxString& description,
const wxString& extension,
...);
-
+
/**
Constructor using an array of string elements corresponding to the
parameters of the ctor above in the same order.
@@ -497,7 +497,7 @@ public:
Get the MIME type
*/
const wxString& GetMimeType() const;
-
+
/**
Get the open command
*/
@@ -507,17 +507,17 @@ public:
Get the print command
*/
const wxString& GetPrintCommand() const;
-
+
/**
Get the short description (only used under Win32 so far)
*/
const wxString& GetShortDesc() const;
-
+
/**
Get the long, user visible description
*/
const wxString& GetDescription() const;
-
+
/**
Get the array of all extensions
*/
@@ -527,7 +527,7 @@ public:
Get the number of extensions.
*/
size_t GetExtensionsCount() const;
-
+
/**
Get the icon filename
*/
diff --git a/interface/wx/modalhook.h b/interface/wx/modalhook.h
index 16df4bc18b..5eb07ff694 100644
--- a/interface/wx/modalhook.h
+++ b/interface/wx/modalhook.h
@@ -7,7 +7,7 @@
/////////////////////////////////////////////////////////////////////////////
/**
- Allows to intercept all modal dialog calls.
+ Allows intercepting all modal dialog calls.
This class can be used to hook into normal modal dialog handling for some
special needs. One of the most common use cases is for testing: as
diff --git a/interface/wx/mousestate.h b/interface/wx/mousestate.h
index 2c5b4f9313..5bb1827b2f 100644
--- a/interface/wx/mousestate.h
+++ b/interface/wx/mousestate.h
@@ -108,7 +108,7 @@ public:
void SetX(wxCoord x);
void SetY(wxCoord y);
void SetPosition(const wxPoint& pos);
-
+
void SetLeftDown(bool down);
void SetMiddleDown(bool down);
void SetRightDown(bool down);
@@ -116,7 +116,7 @@ public:
void SetAux2Down(bool down);
void SetState(const wxMouseState& state);
-
+
};
diff --git a/interface/wx/msgdlg.h b/interface/wx/msgdlg.h
index 5eba416fee..7297ba65a1 100644
--- a/interface/wx/msgdlg.h
+++ b/interface/wx/msgdlg.h
@@ -62,7 +62,7 @@ const char wxMessageBoxCaptionStr[] = "Message";
with @c wxYES_NO so it's usually unnecessary to specify it explicitly.
This style is not supported for message dialogs under wxMSW when a task
dialog is used to implement them (i.e. when running under Windows Vista
- or later) because Microsoft
+ or later) because Microsoft
guidelines indicate that no icon should be used for routine
confirmations. If it is specified, no icon will be displayed.
@style{wxICON_INFORMATION}
diff --git a/interface/wx/msgout.h b/interface/wx/msgout.h
index e83942f050..e7b6631403 100644
--- a/interface/wx/msgout.h
+++ b/interface/wx/msgout.h
@@ -10,7 +10,7 @@
Simple class allowing to write strings to various output channels.
wxMessageOutput is a low-level class and doesn't provide any of the
- conveniences of wxLog. It simply allows to write a message to some output
+ conveniences of wxLog. It simply allows writing a message to some output
channel: usually file or standard error but possibly also a message box.
While use of wxLog and related functions is preferable in many cases
sometimes this simple interface may be more convenient.
diff --git a/interface/wx/mstream.h b/interface/wx/mstream.h
index be70e4faf9..c0dfa13fba 100644
--- a/interface/wx/mstream.h
+++ b/interface/wx/mstream.h
@@ -8,7 +8,7 @@
/**
@class wxMemoryOutputStream
- This class allows to use all methods taking a wxOutputStream reference to write
+ This class allows using all methods taking a wxOutputStream reference to write
to in-memory data.
Example:
@@ -72,7 +72,7 @@ public:
/**
@class wxMemoryInputStream
- This class allows to use all methods taking a wxInputStream reference to read
+ This class allows using all methods taking a wxInputStream reference to read
in-memory data.
Example:
diff --git a/interface/wx/msw/ole/automtn.h b/interface/wx/msw/ole/automtn.h
index 1df6240a0b..352b022a60 100644
--- a/interface/wx/msw/ole/automtn.h
+++ b/interface/wx/msw/ole/automtn.h
@@ -388,7 +388,7 @@ public:
@code
wxAutomationObject excelObject;
-
+
if ( excelObject.GetInstance("Excel.Application") )
excelObject.PutProperty("ActiveCell.Font.Bold", true);
@endcode
@@ -450,7 +450,7 @@ public:
Creates a new object based on the @a progID, returning @true if the object was
successfully created,
or @false if not.
-
+
@see GetInstance()
*/
bool CreateInstance(const wxString& progId) const;
@@ -495,7 +495,7 @@ public:
@param progId COM ProgID, e.g. "Excel.Application"
@param flags The creation flags (this parameters was added in wxWidgets
2.9.2)
-
+
@see CreateInstance()
*/
bool GetInstance(const wxString& progId,
@@ -532,11 +532,11 @@ public:
wxVariant res = obj.GetProperty("Range", wxVariant("A1"));
wxVariant res = obj.GetProperty("Range", "A1");
@endcode
-
+
Note that @a property can contain dot-separated property names, to save the
application
needing to call GetProperty several times using several temporary objects.
-
+
@see GetObject(), PutProperty()
*/
wxVariant GetProperty(const wxString& property, int noArgs,
diff --git a/interface/wx/msw/regconf.h b/interface/wx/msw/regconf.h
index 85a37f603b..4e9e40cecf 100644
--- a/interface/wx/msw/regconf.h
+++ b/interface/wx/msw/regconf.h
@@ -25,7 +25,7 @@ public:
/**
The wxRegConfig constructor. For more info see the docs for the
wxConfigBase::wxConfigBase() constructor.
-
+
Note that wxRegConfig's @a style argument defaults to @c wxCONFIG_USE_GLOBAL_FILE,
i.e. to the use of the @c HKLM key (also known as "HKEY_LOCAL_MACHINE").
*/
diff --git a/interface/wx/nativewin.h b/interface/wx/nativewin.h
index c3555ef885..e96e4611ea 100644
--- a/interface/wx/nativewin.h
+++ b/interface/wx/nativewin.h
@@ -10,7 +10,7 @@
/**
@class wxNativeWindow
- Allows to embed a native widget in an application using wxWidgets.
+ Allows embedding a native widget in an application using wxWidgets.
This class can be used as a bridge between wxWidgets and native GUI
toolkit, i.e. standard Windows controls under MSW, GTK+ widgets or Cocoa
diff --git a/interface/wx/notifmsg.h b/interface/wx/notifmsg.h
index 7608a84cc9..4e86a59ca9 100644
--- a/interface/wx/notifmsg.h
+++ b/interface/wx/notifmsg.h
@@ -8,7 +8,7 @@
/**
@class wxNotificationMessage
- This class allows to show the user a message non intrusively.
+ This class allows showing the user a message non intrusively.
Currently it is implemented natively for Windows, OS X, GTK and uses
generic toast notifications under the other platforms. It's not recommended
@@ -29,15 +29,15 @@
Windows 10 and for toast notification support on Windows 8 it is
recommended to call MSWUseToasts() before showing the first notification
message.
-
+
@par OS X
The OS X implementation uses Notification Center to display native notifications.
In order to use actions your notifications must use the alert style. This can
be enabled by the user in system settings or by setting the
@c NSUserNotificationAlertStyle value in Info.plist to @c alert. Please note
that the user always has the option to change the notification style.
-
-
+
+
@beginEventEmissionTable{wxCommandEvent}
@event{wxEVT_NOTIFICATION_MESSAGE_CLICK(id, func)}
Process a @c wxEVT_NOTIFICATION_MESSAGE_CLICK event, when a notification
@@ -49,7 +49,7 @@
Process a @c wxEVT_NOTIFICATION_MESSAGE_ACTION event, when the user
selects on of the actions added by AddAction()
@endEventTable
-
+
@since 2.9.0
@library{wxcore}
@category{misc}
@@ -93,11 +93,11 @@ public:
@return @false if the current implementation or OS version
does not support actions in notifications.
-
+
@since 3.1.0
*/
bool AddAction(wxWindowID actionid, const wxString &label = wxString());
-
+
/**
Hides the notification.
@@ -114,22 +114,22 @@ public:
Valid values are @c wxICON_INFORMATION, @c wxICON_WARNING and
@c wxICON_ERROR (notice that @c wxICON_QUESTION is not allowed here).
Some implementations of this class may not support the icons.
-
+
@see SetIcon()
*/
void SetFlags(int flags);
/**
Specify a custom icon to be displayed in the notification.
-
+
Some implementations of this class may not support custom icons.
-
+
@see SetFlags()
-
+
@since 3.1.0
*/
void SetIcon(const wxIcon& icon);
-
+
/**
Set the main text of the notification.
@@ -173,42 +173,42 @@ public:
If the application already uses a wxTaskBarIcon, it should be connected
to notifications by using this method. This has no effect if toast
notifications are used.
-
+
@return the task bar icon which was used previously (may be @c NULL)
-
+
@onlyfor{wxmsw}
*/
static wxTaskBarIcon *UseTaskBarIcon(wxTaskBarIcon *icon);
-
+
/**
Enables toast notifications available since Windows 8 and suppresses
the additional icon in the notification area on Windows 10.
-
+
Toast notifications @b require a shortcut to the application in the
- start menu. The start menu shortcut needs to contain an Application
+ start menu. The start menu shortcut needs to contain an Application
User Model ID. It is recommended that the applications setup creates the
shortcut and the application specifies the setup created shortcut in
@c shortcutPath. A call to this method will verify (and if necessary
modify) the shortcut before enabling toast notifications.
-
+
@param shortcutPath
- Path to a shortcut file referencing the applications executable. If
- the string is empty the applications display name will be used. If
- not fully qualified, it will be used as a path relative to the
+ Path to a shortcut file referencing the applications executable. If
+ the string is empty the applications display name will be used. If
+ not fully qualified, it will be used as a path relative to the
users start menu directory. The file extension .lnk is optional.
@param appId
The applications
Application User Model ID . If empty it will be extracted from
the shortcut. If the shortcut does not contain an id an id will be
automatically created from the applications vendor and app name.
-
+
@return @false if toast notifications could not be enabled.
-
+
@onlyfor{wxmsw}
-
+
@see wxAppConsole::SetAppName(), wxAppConsole::SetVendorName()
-
+
@since 3.1.0
*/
static bool MSWUseToasts(
diff --git a/interface/wx/object.h b/interface/wx/object.h
index 3f17dcf264..e28facff9d 100644
--- a/interface/wx/object.h
+++ b/interface/wx/object.h
@@ -718,7 +718,7 @@ public:
/**
Used in a C++ implementation file to complete the declaration of a class
that has run-time type information.
-
+
@header{wx/object.h}
Example:
@@ -736,7 +736,7 @@ public:
/**
Used in a C++ implementation file to complete the declaration of a class
- that has run-time type information and two base classes.
+ that has run-time type information and two base classes.
@header{wx/object.h}
*/
diff --git a/interface/wx/overlay.h b/interface/wx/overlay.h
index ecbefde926..c03732ce08 100644
--- a/interface/wx/overlay.h
+++ b/interface/wx/overlay.h
@@ -11,7 +11,7 @@
Creates an overlay over an existing window, allowing for manipulations like
rubberbanding, etc. On wxOSX the overlay is implemented with native
platform APIs, on the other platforms it is simulated using wxMemoryDC.
-
+
@library{wxcore}
@see wxDCOverlay, wxDC
@@ -35,11 +35,11 @@ public:
@class wxDCOverlay
Connects an overlay with a drawing DC.
-
+
@library{wxcore}
@see wxOverlay, wxDC
-
+
*/
class wxDCOverlay
{
diff --git a/interface/wx/pen.h b/interface/wx/pen.h
index 13f7e65ce6..d6df1c3f4d 100644
--- a/interface/wx/pen.h
+++ b/interface/wx/pen.h
@@ -105,7 +105,7 @@ enum wxPenCap
@class wxPenInfo
This class is a helper used for wxPen creation using named parameter
- idiom: it allows to specify various wxPen attributes using the chained
+ idiom: it allows specifying various wxPen attributes using the chained
calls to its clearly named methods instead of passing them in the fixed
order to wxPen constructors.
diff --git a/interface/wx/persist.h b/interface/wx/persist.h
index f9c75920fe..417867821d 100644
--- a/interface/wx/persist.h
+++ b/interface/wx/persist.h
@@ -62,7 +62,7 @@ public:
Globally disable restoring the persistence object properties.
By default, restoring properties in Restore() is enabled but this
- function allows to disable it. This is mostly useful for testing.
+ function allows disabling it. This is mostly useful for testing.
@see DisableSaving()
*/
diff --git a/interface/wx/pickerbase.h b/interface/wx/pickerbase.h
index b50a964225..22d08185af 100644
--- a/interface/wx/pickerbase.h
+++ b/interface/wx/pickerbase.h
@@ -163,7 +163,7 @@ public:
virtual void UpdatePickerFromTextCtrl() = 0;
virtual void UpdateTextCtrlFromPicker() = 0;
-
+
protected:
virtual long GetTextCtrlStyle(long style) const;
virtual long GetPickerStyle(long style) const;
diff --git a/interface/wx/platinfo.h b/interface/wx/platinfo.h
index 601b145524..d10563c38a 100644
--- a/interface/wx/platinfo.h
+++ b/interface/wx/platinfo.h
@@ -11,7 +11,7 @@
whose version can be detected at run-time.
The values of the constants are chosen so that they can be combined as flags;
- this allows to check for operating system families like e.g. @c wxOS_MAC and @c wxOS_UNIX.
+ this allows checking for operating system families like e.g. @c wxOS_MAC and @c wxOS_UNIX.
Note that you can obtain more detailed information about the current OS
version in use by checking the major, minor, and micro version numbers
@@ -24,12 +24,12 @@ enum wxOperatingSystemId
wxOS_MAC_OS = 1 << 0, //!< Apple Mac OS 8/9/X with Mac paths
wxOS_MAC_OSX_DARWIN = 1 << 1, //!< Apple OS X with Unix paths
-
+
//! A combination of all @c wxOS_MAC_* values previously listed.
wxOS_MAC = wxOS_MAC_OS|wxOS_MAC_OSX_DARWIN,
wxOS_WINDOWS_NT = 1 << 3, //!< Windows NT family (XP/Vista/7/8/10)
-
+
//! Any Windows system, currently can be only wxOS_WINDOWS_NT.
wxOS_WINDOWS = wxOS_WINDOWS_NT,
@@ -40,7 +40,7 @@ enum wxOperatingSystemId
wxOS_UNIX_SOLARIS = 1 << 10, //!< SunOS
wxOS_UNIX_AIX = 1 << 11, //!< AIX
wxOS_UNIX_HPUX = 1 << 12, //!< HP/UX
-
+
//! A combination of all @c wxOS_UNIX_* values previously listed.
wxOS_UNIX = wxOS_UNIX_LINUX |
wxOS_UNIX_FREEBSD |
@@ -104,9 +104,9 @@ enum wxEndianness
};
/**
- A structure containing information about a Linux distribution as returned
+ A structure containing information about a Linux distribution as returned
by the @c lsb_release utility.
-
+
See wxGetLinuxDistributionInfo() or wxPlatformInfo::GetLinuxDistributionInfo()
for more info.
*/
@@ -116,7 +116,7 @@ struct wxLinuxDistributionInfo
wxString Release; //!< The version of the distribution; e.g. "9.04"
wxString CodeName; //!< The code name of the distribution; e.g. "jaunty"
wxString Description; //!< The description of the distribution; e.g. "Ubuntu 9.04"
-
+
bool operator==(const wxLinuxDistributionInfo& ldi) const;
bool operator!=(const wxLinuxDistributionInfo& ldi) const;
};
@@ -125,16 +125,16 @@ struct wxLinuxDistributionInfo
/**
@class wxPlatformInfo
- This class holds information about the operating system, the toolkit and the
+ This class holds information about the operating system, the toolkit and the
basic architecture of the machine where the application is currently running.
-
+
This class does not only have @e getters for the information above, it also has
- @e setters. This allows you to e.g. save the current platform information in a
+ @e setters. This allows you to e.g. save the current platform information in a
data file (maybe in string form) so that when you later load it, you can easily
retrieve (see the static getters for string->enum conversion functions) and store
- inside a wxPlatformInfo instance (using its setters) the signature of the system
+ inside a wxPlatformInfo instance (using its setters) the signature of the system
which generated it.
-
+
In general however you only need to use the static Get() function and then
access the various information for the current platform:
@code
@@ -148,7 +148,7 @@ struct wxLinuxDistributionInfo
@see ::wxGetOsVersion(), wxIsPlatformLittleEndian(), wxIsPlatform64Bit(),
wxAppTraits, @ref group_funcmacro_networkuseros
*/
-class wxPlatformInfo
+class wxPlatformInfo
{
public:
@@ -211,16 +211,16 @@ public:
Equality operator. Tests all class' internal variables.
*/
bool operator==(const wxPlatformInfo& t) const;
-
+
/**
Returns the global wxPlatformInfo object, initialized with the values
for the currently running platform.
*/
static const wxPlatformInfo& Get();
-
+
/**
@name Static enum getters
-
+
These getters allow for easy string-to-enumeration-value conversion.
*/
//@{
@@ -251,13 +251,13 @@ public:
("wxGTK", "wxMSW", etc) nor any of the short wxWidgets name ports ("gtk", "msw", etc).
*/
static wxPortId GetPortId(const wxString& portname);
-
+
//@}
-
-
+
+
/**
@name Static string-form getters
-
+
These getters allow for easy enumeration-value-to-string conversion.
*/
//@{
@@ -271,7 +271,7 @@ public:
Returns name for the given wxEndianness enumeration value.
*/
static wxString GetEndiannessName(wxEndianness end);
-
+
/**
Returns the operating system family name for the given wxOperatingSystemId
enumeration value: @c Unix for @c wxOS_UNIX, @c OSX for @c wxOS_MAC_OS,
@@ -308,14 +308,14 @@ public:
/**
Returns the operating system directory.
-
+
See wxGetOSDirectory() for more info.
*/
static wxString GetOperatingSystemDirectory();
//@}
-
-
+
+
/**
@name Getters
*/
@@ -359,14 +359,14 @@ public:
/**
Returns the operating system ID of this wxPlatformInfo instance.
-
+
See wxGetOsVersion() for more info.
*/
wxOperatingSystemId GetOperatingSystemId() const;
-
+
/**
Returns the description of the operating system of this wxPlatformInfo instance.
-
+
See wxGetOsDescription() for more info.
*/
wxString GetOperatingSystemDescription() const;
@@ -375,17 +375,17 @@ public:
Returns the wxWidgets port ID associated with this wxPlatformInfo instance.
*/
wxPortId GetPortId() const;
-
+
/**
Returns the Linux distribution info associated with this wxPlatformInfo instance.
-
+
See wxGetLinuxDistributionInfo() for more info.
*/
wxLinuxDistributionInfo GetLinuxDistributionInfo() const;
-
+
/**
Returns the desktop environment associated with this wxPlatformInfo instance.
-
+
See wxAppTraits::GetDesktopEnvironment() for more info.
*/
wxString GetDesktopEnvironment() const;
@@ -454,7 +454,7 @@ public:
wxPlatformInfo instance.
*/
wxString GetOperatingSystemFamilyName() const;
-
+
/**
Returns the operating system name of the OS associated with this wxPlatformInfo
instance.
@@ -472,16 +472,16 @@ public:
wxPlatformInfo instance.
*/
wxString GetPortIdShortName() const;
-
- //@}
-
-
+ //@}
+
+
+
/**
@name Setters
*/
//@{
-
+
/**
Sets the architecture enum value associated with this wxPlatformInfo instance.
*/
@@ -517,17 +517,17 @@ public:
Sets the operating system description associated with this wxPlatformInfo instance.
*/
void SetOperatingSystemDescription(const wxString& desc);
-
+
/**
Sets the desktop environment associated with this wxPlatformInfo instance.
*/
void SetDesktopEnvironment(const wxString& de);
-
+
/**
Sets the linux distribution info associated with this wxPlatformInfo instance.
*/
void SetLinuxDistributionInfo(const wxLinuxDistributionInfo& di);
-
+
//@}
};
diff --git a/interface/wx/popupwin.h b/interface/wx/popupwin.h
index 01af6cfa63..fe7c92b313 100644
--- a/interface/wx/popupwin.h
+++ b/interface/wx/popupwin.h
@@ -11,6 +11,19 @@
A special kind of top level window used for popup menus,
combobox popups and such.
+ @beginStyleTable
+ @style{wxPU_CONTAINS_CONTROLS}
+ By default in wxMSW, a popup window will not take focus from its parent
+ window. However many standard controls, including common ones such as
+ wxTextCtrl, need focus to function correctly and will not work when
+ placed on a default popup. This flag can be used to make the popup take
+ focus and let all controls work but at the price of not allowing the
+ parent window to keep focus while the popup is shown, which can also be
+ sometimes desirable. This style is currently only implemented in MSW
+ and simply does nothing under the other platforms (it's new since
+ wxWidgets 3.1.3).
+ @endStyleTable
+
@library{wxcore}
@category{managedwnd}
@@ -25,7 +38,7 @@ public:
Default constructor
*/
wxPopupWindow();
-
+
/**
Constructor
*/
@@ -112,5 +125,5 @@ protected:
else but direct call to Dismiss().
*/
virtual void OnDismiss();
-
+
};
diff --git a/interface/wx/power.h b/interface/wx/power.h
index 375234568e..62fa9525e2 100644
--- a/interface/wx/power.h
+++ b/interface/wx/power.h
@@ -80,7 +80,7 @@ class wxPowerEvent : public wxEvent
public:
wxPowerEvent();
wxPowerEvent(wxEventType evtType);
-
+
/**
Call this to prevent suspend from taking place in @c wxEVT_POWER_SUSPENDING
handler (it is ignored for all the others).
diff --git a/interface/wx/process.h b/interface/wx/process.h
index 5484338f63..50d49398b4 100644
--- a/interface/wx/process.h
+++ b/interface/wx/process.h
@@ -15,7 +15,7 @@
notified about the process termination and also retrieve its exit status which is
unavailable from ::wxExecute() in the case of asynchronous execution.
- @note
+ @note
If the @c wxEVT_END_PROCESS event sent after termination is processed by the
parent, then it is responsible for deleting the wxProcess object which sent it.
However, if it is not processed, the object will delete itself and so the
@@ -67,7 +67,7 @@ public:
/**
Creates an object without any associated parent (and hence no id neither)
- but allows to specify the @a flags which can have the value of
+ but allows specifying the @a flags which can have the value of
@c wxPROCESS_DEFAULT or @c wxPROCESS_REDIRECT.
Specifying the former value has no particular effect while using the latter
@@ -110,17 +110,17 @@ public:
/**
Detaches this event handler from the parent specified in the constructor
(see wxEvtHandler::Unlink() for a similar but not identical function).
-
+
Normally, a wxProcess object is deleted by its parent when it receives the
- notification about the process termination.
-
- However, it might happen that the parent object is destroyed before the external
- process is terminated (e.g. a window from which this external process was launched
- is closed by the user) and in this case it @b should not delete the wxProcess
- object, but @b should call Detach() instead.
-
- After the wxProcess object is detached from its parent, no notification events
- will be sent to the parent and the object will delete itself upon reception of
+ notification about the process termination.
+
+ However, it might happen that the parent object is destroyed before the external
+ process is terminated (e.g. a window from which this external process was launched
+ is closed by the user) and in this case it @b should not delete the wxProcess
+ object, but @b should call Detach() instead.
+
+ After the wxProcess object is detached from its parent, no notification events
+ will be sent to the parent and the object will delete itself upon reception of
the process termination notification.
*/
void Detach();
@@ -174,7 +174,7 @@ public:
Returns @true if there is data to be read on the child process standard
output stream.
- This allows to write simple (and extremely inefficient) polling-based code
+ This allows writing simple (and extremely inefficient) polling-based code
waiting for a better mechanism in future wxWidgets versions.
See the @ref page_samples_exec "exec sample" for an example of using this
function.
@@ -211,7 +211,7 @@ public:
/**
It is called when the process with the pid @a pid finishes.
It raises a wxWidgets event when it isn't overridden.
-
+
Note that this function won't be called if you Kill() the process.
@param pid
diff --git a/interface/wx/progdlg.h b/interface/wx/progdlg.h
index 28ce778ed6..e1ab36431b 100644
--- a/interface/wx/progdlg.h
+++ b/interface/wx/progdlg.h
@@ -167,7 +167,7 @@ public:
/**
Changes the maximum value of the progress meter given in the constructor.
- This function can only be called (with a positive value) if the value passed
+ This function can only be called (with a positive value) if the value passed
in the constructor was positive.
@since 2.9.1
@@ -180,8 +180,8 @@ public:
Normally a Cancel button press is indicated by Update() returning
@false but sometimes it may be more convenient to check if the dialog
- was cancelled from elsewhere in the code and this function allows to
- do it.
+ was cancelled from elsewhere in the code and this function allows
+ doing it.
It always returns @false if the Cancel button is not shown at all.
diff --git a/interface/wx/propdlg.h b/interface/wx/propdlg.h
index 8ccdc1ca8b..e6932471e1 100644
--- a/interface/wx/propdlg.h
+++ b/interface/wx/propdlg.h
@@ -197,7 +197,7 @@ public:
*/
void SetSheetStyle(long style);
-
+
/**
Set the border around the whole dialog
*/
@@ -208,18 +208,18 @@ public:
*/
int GetSheetOuterBorder() const;
-
+
/**
Set the border around the book control only.
*/
void SetSheetInnerBorder(int border);
-
+
/**
Returns the border around the book control only.
*/
int GetSheetInnerBorder() const;
-
+
virtual wxWindow* GetContentWindow() const;
};
diff --git a/interface/wx/propgrid/editors.h b/interface/wx/propgrid/editors.h
index 6fe9c15544..4af9d0c3e3 100644
--- a/interface/wx/propgrid/editors.h
+++ b/interface/wx/propgrid/editors.h
@@ -427,7 +427,7 @@ public:
class wxSampleMultiButtonEditor : public wxPGTextCtrlEditor
{
wxDECLARE_DYNAMIC_CLASS(wxSampleMultiButtonEditor);
-
+
public:
wxSampleMultiButtonEditor() {}
virtual ~wxSampleMultiButtonEditor() {}
diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h
index e60002a638..6af7f8ba80 100644
--- a/interface/wx/propgrid/property.h
+++ b/interface/wx/propgrid/property.h
@@ -516,7 +516,7 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
Note that when displaying the value, sign is omitted if the resulting
textual representation is effectively zero (for example, -0.0001 with
- precision of 3 will become 0.0 instead of -0.0). This behaviour is unlike
+ precision of 3 will become 0.0 instead of -0.0). This behaviour is unlike
what C standard library does, but should result in better end-user
experience in almost all cases.
@@ -1147,16 +1147,17 @@ public:
NOTE: Following applies when OnMeasureImage() returns a "flexible" height (
using wxPG_FLEXIBLE_SIZE(W,H) macro), which implies variable height items:
- If rect.x is < 0, then this is a measure item call, which means that
- dc is invalid and only thing that should be done is to set paintdata.m_drawnHeight
- to the height of the image of item at index paintdata.m_choiceItem. This call
- may be done even as often as once every drop-down popup show.
+ If (rect.x+rect.width) is < 0, then this is a measure item call, which
+ means that dc is invalid and only thing that should be done is to set
+ paintdata.m_drawnHeight to the height of the image of item at index
+ paintdata.m_choiceItem. This call may be done even as often as once every
+ drop-down popup show.
@param dc
wxDC to paint on.
@param rect
Box reserved for custom graphics. Includes surrounding rectangle, if any.
- If x is < 0, then this is a measure item call (see above).
+ If x+width is < 0, then this is a measure item call (see above).
@param paintdata
wxPGPaintData structure with much useful data about painted item.
@code
@@ -1246,7 +1247,7 @@ public:
Called whenever validation has failed with given pending value.
@remarks If you implement this in your custom property class, please
- remember to call the baser implementation as well, since they
+ remember to call the base implementation as well, since they
may use it to revert property into pre-change state.
*/
virtual void OnValidationFailure( wxVariant& pendingValue );
diff --git a/interface/wx/propgrid/propgrid.h b/interface/wx/propgrid/propgrid.h
index 2e7bf51563..7f28cab079 100644
--- a/interface/wx/propgrid/propgrid.h
+++ b/interface/wx/propgrid/propgrid.h
@@ -229,7 +229,7 @@ wxPG_EX_NO_TOOLBAR_DIVIDER = 0x04000000,
*/
wxPG_EX_TOOLBAR_SEPARATOR = 0x08000000,
-/** Allows to take focus on the entire area (on canvas)
+/** Allows taking focus on the entire area (on canvas)
even if wxPropertyGrid is not a standalone control.
@hideinitializer
*/
diff --git a/interface/wx/propgrid/propgridpagestate.h b/interface/wx/propgrid/propgridpagestate.h
index 1a392b7659..8289b59108 100644
--- a/interface/wx/propgrid/propgridpagestate.h
+++ b/interface/wx/propgrid/propgridpagestate.h
@@ -227,7 +227,7 @@ class wxPropertyGridIterator : public wxPropertyGridIteratorBase
public:
wxPropertyGridIterator();
wxPropertyGridIterator( wxPropertyGridPageState* state,
- int flags = wxPG_ITERATE_DEFAULT,
+ int flags = wxPG_ITERATE_DEFAULT,
wxPGProperty* property = NULL, int dir = 1 );
wxPropertyGridIterator( wxPropertyGridPageState* state,
int flags, int startPos, int dir = 0 );
@@ -252,7 +252,7 @@ public:
wxPropertyGridConstIterator();
wxPropertyGridConstIterator( const wxPropertyGridPageState* state,
- int flags = wxPG_ITERATE_DEFAULT,
+ int flags = wxPG_ITERATE_DEFAULT,
const wxPGProperty* property = NULL, int dir = 1 );
wxPropertyGridConstIterator( wxPropertyGridPageState* state,
int flags, int startPos, int dir = 0 );
diff --git a/interface/wx/propgrid/props.h b/interface/wx/propgrid/props.h
index 564916c829..e4be903293 100644
--- a/interface/wx/propgrid/props.h
+++ b/interface/wx/propgrid/props.h
@@ -312,7 +312,7 @@ public:
const wxChar* const* labels = NULL,
const long* values = NULL,
int value = 0 );
-
+
wxEnumProperty( const wxString& label,
const wxString& name,
wxPGChoices& choices,
@@ -361,8 +361,6 @@ public:
// this take advantage of it.
virtual int GetChoiceSelection() const;
- virtual void OnValidationFailure( wxVariant& pendingValue );
-
protected:
int GetIndex() const;
@@ -711,13 +709,6 @@ public:
void Init();
- wxPGArrayEditorDialog( wxWindow *parent,
- const wxString& message,
- const wxString& caption,
- long style = wxAEDIALOG_STYLE,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize );
-
bool Create( wxWindow *parent,
const wxString& message,
const wxString& caption,
@@ -726,7 +717,12 @@ public:
const wxSize& sz = wxDefaultSize );
void EnableCustomNewAction();
-
+
+ /** Sets tooltip text for button allowing the user to enter new string.
+ @since 3.1.3
+ */
+ void SetNewButtonText(const wxString& text);
+
/** Set value modified by dialog.
*/
virtual void SetDialogValue( const wxVariant& value );
@@ -745,27 +741,25 @@ public:
*/
virtual wxValidator* GetTextCtrlValidator() const;
- // Returns true if array was actually modified
+ /** Returns true if array was actually modified
+ */
bool IsModified() const;
- // wxEditableListBox utilities
int GetSelection() const;
protected:
wxEditableListBox* m_elb;
-
- // These are used for focus repair
wxWindow* m_elbSubPanel;
wxWindow* m_lastFocused;
- // A new item, edited by user, is pending at this index.
- // It will be committed once list ctrl item editing is done.
+ /** A new item, edited by user, is pending at this index.
+ It will be committed once list ctrl item editing is done.
+ */
int m_itemPendingAtIndex;
bool m_modified;
bool m_hasCustomNewAction;
- // These must be overridden - must return true on success.
virtual wxString ArrayGet( size_t index ) = 0;
virtual size_t ArrayGetCount() = 0;
virtual bool ArrayInsert( const wxString& str, int index ) = 0;
diff --git a/interface/wx/protocol/protocol.h b/interface/wx/protocol/protocol.h
index 94330044c9..7ab332db9a 100644
--- a/interface/wx/protocol/protocol.h
+++ b/interface/wx/protocol/protocol.h
@@ -132,7 +132,7 @@ public:
/**
Detach the existing logger without deleting it.
-
+
The caller is responsible for deleting the returned pointer if it's
non-@c NULL.
*/
diff --git a/interface/wx/rearrangectrl.h b/interface/wx/rearrangectrl.h
index fa4d40eb5e..2b200372bd 100644
--- a/interface/wx/rearrangectrl.h
+++ b/interface/wx/rearrangectrl.h
@@ -13,8 +13,8 @@
A listbox-like control allowing the user to rearrange the items and to
enable or disable them.
- This class allows to change the order of the items shown in it as well as
- to check or uncheck them individually. The data structure used to allow
+ This class allows changing the order of the items shown in it as well as
+ checking or unchecking them individually. The data structure used to allow
this is the order array which contains the items indices indexed by their
position with an added twist that the unchecked items are represented by
the bitwise complement of the corresponding index (for any architecture
@@ -301,7 +301,7 @@ public:
/**
Effectively creates the dialog for an object created using the default
- constructor.
+ constructor.
@param parent
The dialog parent, possibly @NULL.
diff --git a/interface/wx/renderer.h b/interface/wx/renderer.h
index ddd4d3a1f8..a94b5c9f9c 100644
--- a/interface/wx/renderer.h
+++ b/interface/wx/renderer.h
@@ -635,7 +635,7 @@ public:
struct wxRendererVersion
{
wxRendererVersion(int version_, int age_);
-
+
/**
Checks if the main program is compatible with the renderer having the version
@e ver, returns @true if it is and @false otherwise.
diff --git a/interface/wx/ribbon/art.h b/interface/wx/ribbon/art.h
index 055949e76a..7cdb0b9156 100644
--- a/interface/wx/ribbon/art.h
+++ b/interface/wx/ribbon/art.h
@@ -8,7 +8,7 @@
/**
Identifiers for common settings on ribbon art providers which can be used
to tweak the appearance of the art provider.
-
+
@see wxRibbonArtProvider::GetColour()
@see wxRibbonArtProvider::GetFont()
@see wxRibbonArtProvider::GetMetric()
@@ -127,7 +127,7 @@ enum wxRibbonArtSetting
/**
Flags used to describe the direction, state, and/or purpose of a
ribbon-style scroll button.
-
+
@see wxRibbonArtProvider::DrawScrollButton()
@see wxRibbonArtProvider::GetScrollButtonMinimumSize()
*/
@@ -167,19 +167,19 @@ enum wxRibbonButtonKind
action.
*/
wxRIBBON_BUTTON_NORMAL = 1 << 0,
-
+
/**
Dropdown button or tool with a clickable area which typically causes a
dropdown menu.
*/
wxRIBBON_BUTTON_DROPDOWN = 1 << 1,
-
+
/**
Button or tool with two clickable areas - one which causes a dropdown
menu, and one which causes a generic action.
*/
wxRIBBON_BUTTON_HYBRID = wxRIBBON_BUTTON_NORMAL | wxRIBBON_BUTTON_DROPDOWN,
-
+
/**
Normal button or tool with a clickable area which toggles the button
between a pressed and unpressed state.
@@ -216,7 +216,7 @@ public:
Constructor.
*/
wxRibbonArtProvider();
-
+
/**
Destructor.
*/
@@ -226,16 +226,16 @@ public:
Create a new art provider which is a clone of this one.
*/
virtual wxRibbonArtProvider* Clone() const = 0;
-
+
/**
Set the style flags.
-
+
Normally called automatically by wxRibbonBar::SetArtProvider with the ribbon
bar's style flags, so that the art provider has the same flags as the bar which
it is serving.
*/
virtual void SetFlags(long flags) = 0;
-
+
/**
Get the previously set style flags.
*/
@@ -246,53 +246,53 @@ public:
@a id can be one of the size values of @ref wxRibbonArtSetting.
*/
virtual int GetMetric(int id) const = 0;
-
+
/**
Set the value of a certain integer setting to the value @e new_val.
@a id can be one of the size values of @ref wxRibbonArtSetting.
*/
virtual void SetMetric(int id, int new_val) = 0;
-
+
/**
Set the value of a certain font setting to the value @e font.
@a id can be one of the font values of @ref wxRibbonArtSetting.
*/
virtual void SetFont(int id, const wxFont& font) = 0;
-
+
/**
Get the value of a certain font setting.
@a id can be one of the font values of @ref wxRibbonArtSetting.
*/
virtual wxFont GetFont(int id) const = 0;
-
+
/**
Get the value of a certain colour setting.
@a id can be one of the colour values of @ref wxRibbonArtSetting.
*/
virtual wxColour GetColour(int id) const = 0;
-
+
/**
Set the value of a certain colour setting to the value @e colour.
@a id can be one of the colour values of @ref wxRibbonArtSetting, though
not all colour settings will have an effect on every art provider.
-
+
@see SetColourScheme()
*/
virtual void SetColour(int id, const wxColour& colour) = 0;
-
+
/**
@see wxRibbonArtProvider::GetColour()
*/
wxColour GetColor(int id) const;
-
+
/**
@see wxRibbonArtProvider::SetColour()
*/
void SetColor(int id, const wxColour& color);
-
+
/**
Get the current colour scheme.
-
+
Returns three colours such that if SetColourScheme() were called with
them, the colour scheme would be restored to what it was when
SetColourScheme() was last called. In practice, this usually means that
@@ -308,7 +308,7 @@ public:
and return a colour scheme similar to colours being used - it's return
values are dependent upon the last values given to SetColourScheme(),
as described above.
-
+
@param[out] primary
Pointer to a location to store the primary colour, or NULL.
@param[out] secondary
@@ -319,26 +319,26 @@ public:
virtual void GetColourScheme(wxColour* primary,
wxColour* secondary,
wxColour* tertiary) const = 0;
-
+
/**
Set all applicable colour settings from a few base colours.
-
+
Uses any or all of the three given colours to create a colour scheme,
and then sets all colour settings which are relevant to the art
provider using that scheme.
Note that some art providers may not use the tertiary colour for
anything, and some may not use the secondary colour either.
-
+
@see SetColour()
@see GetColourScheme()
- */
+ */
virtual void SetColourScheme(const wxColour& primary,
const wxColour& secondary,
const wxColour& tertiary) = 0;
/**
Draw the background of the tab region of a ribbon bar.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -353,7 +353,7 @@ public:
/**
Draw a single tab in the tab region of a ribbon bar.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -373,7 +373,7 @@ public:
/**
Draw a separator between two tabs in a ribbon bar.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -393,7 +393,7 @@ public:
/**
Draw the background of a ribbon page.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -401,7 +401,7 @@ public:
whose background is being drawn, but doesn't have to be).
@param rect
The rectangle within which to draw.
-
+
@sa GetPageBackgroundRedrawArea
*/
virtual void DrawPageBackground(
@@ -411,7 +411,7 @@ public:
/**
Draw a ribbon-style scroll button.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -439,11 +439,11 @@ public:
Draw the background and chrome for a ribbon panel. This should draw
the border, background, label, and any other items of a panel which
are outside the client area of a panel.
-
+
Note that when a panel is minimised, this function is not called - only
DrawMinimisedPanel() is called, so a background should be explicitly
painted by that if required.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -457,13 +457,13 @@ public:
wxDC& dc,
wxRibbonPanel* wnd,
const wxRect& rect) = 0;
-
+
/**
Draw the background and chrome for a wxRibbonGallery control. This
should draw the border, background, scroll buttons, extension button,
and any other UI elements which are not attached to a specific gallery
item.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -488,7 +488,7 @@ public:
is painted on top of a gallery background, and behind the items bitmap.
Unlike DrawButtonBarButton() and DrawTool(), it is not expected to draw
the item bitmap - that is done by the gallery control itself.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -515,10 +515,10 @@ public:
wxRibbonGallery* wnd,
const wxRect& rect,
wxRibbonGalleryItem* item) = 0;
-
+
/**
Draw a minimised ribbon panel.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -539,10 +539,10 @@ public:
wxRibbonPanel* wnd,
const wxRect& rect,
wxBitmap& bitmap) = 0;
-
+
/**
Draw the background for a wxRibbonButtonBar control.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -558,7 +558,7 @@ public:
/**
Draw a single button for a wxRibbonButtonBar control.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -591,10 +591,10 @@ public:
const wxString& label,
const wxBitmap& bitmap_large,
const wxBitmap& bitmap_small) = 0;
-
+
/**
Draw the background for a wxRibbonToolBar control.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -613,7 +613,7 @@ public:
/**
Draw the background for a group of tools on a wxRibbonToolBar control.
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -636,7 +636,7 @@ public:
/**
Draw a single tool (for a wxRibbonToolBar control).
-
+
@param dc
The device context to draw onto.
@param wnd
@@ -710,7 +710,7 @@ public:
/**
Calculate the ideal and minimum width (in pixels) of a tab in a ribbon
bar.
-
+
@param dc
A device context to use when one is required for size calculations.
@param wnd
@@ -746,7 +746,7 @@ public:
Note that as the tab region can contain scroll buttons, the height
should be greater than or equal to the minimum height for a tab scroll
button.
-
+
@param dc
A device context to use when one is required for size calculations.
@param wnd
@@ -761,7 +761,7 @@ public:
/**
Calculate the minimum size (in pixels) of a scroll button.
-
+
@param dc
A device context to use when one is required for size calculations.
@param wnd
@@ -781,7 +781,7 @@ public:
Calculate the size of a panel for a given client size. This should
increment the given size by enough to fit the panel label and other
chrome.
-
+
@param dc
A device context to use if one is required for size calculations.
@param wnd
@@ -791,7 +791,7 @@ public:
@param[out] client_offset
The offset where the client rectangle begins within the panel (may
be NULL).
-
+
@sa GetPanelClientSize()
*/
virtual wxSize GetPanelSize(
@@ -799,12 +799,12 @@ public:
const wxRibbonPanel* wnd,
wxSize client_size,
wxPoint* client_offset) = 0;
-
+
/**
Calculate the client size of a panel for a given overall size. This
should act as the inverse to GetPanelSize(), and decrement the given
size by enough to fit the panel label and other chrome.
-
+
@param dc
A device context to use if one is required for size calculations.
@param wnd
@@ -814,7 +814,7 @@ public:
@param[out] client_offset
The offset where the returned client size begins within the given
@a size (may be NULL).
-
+
@sa GetPanelSize()
*/
virtual wxSize GetPanelClientSize(
@@ -844,14 +844,14 @@ public:
Calculate the size of a wxRibbonGallery control for a given client
size. This should increment the given size by enough to fit the gallery
border, buttons, and any other chrome.
-
+
@param dc
A device context to use if one is required for size calculations.
@param wnd
The gallery in question.
@param client_size
The client size.
-
+
@sa GetGalleryClientSize()
*/
virtual wxSize GetGallerySize(
@@ -864,7 +864,7 @@ public:
size. This should act as the inverse to GetGallerySize(), and decrement
the given size by enough to fit the gallery border, buttons, and other
chrome.
-
+
@param dc
A device context to use if one is required for size calculations.
@param wnd
@@ -899,7 +899,7 @@ public:
small an area as possible should be returned. Of course, if the way in
which a background is drawn means that the entire background needs to
be repainted on resize, then the entire new size should be returned.
-
+
@param dc
A device context to use when one is required for size calculations.
@param wnd
@@ -915,10 +915,10 @@ public:
const wxRibbonPage* wnd,
wxSize page_old_size,
wxSize page_new_size) = 0;
-
+
/**
Calculate the size of a button within a wxRibbonButtonBar.
-
+
@param dc
A device context to use when one is required for size calculations.
@param wnd
@@ -947,7 +947,7 @@ public:
The region of the button which constitutes the normal button.
@param[out] dropdown_region
The region of the button which constitutes the dropdown button.
-
+
@return @true if a size exists for the button, @false otherwise.
*/
virtual bool GetButtonBarButtonSize(
@@ -990,10 +990,10 @@ public:
wxDC& dc, const wxString& label,
wxRibbonButtonKind kind,
wxRibbonButtonBarButtonState size) = 0;
-
+
/**
Calculate the size of a minimised ribbon panel.
-
+
@param dc
A device context to use when one is required for size calculations.
@param wnd
@@ -1011,10 +1011,10 @@ public:
const wxRibbonPanel* wnd,
wxSize* desired_bitmap_size,
wxDirection* expanded_panel_direction) = 0;
-
+
/**
Calculate the size of a tool within a wxRibbonToolBar.
-
+
@param dc
A device context to use when one is required for size calculations.
@param wnd
diff --git a/interface/wx/ribbon/bar.h b/interface/wx/ribbon/bar.h
index 3d98f0ca76..615d07e30b 100644
--- a/interface/wx/ribbon/bar.h
+++ b/interface/wx/ribbon/bar.h
@@ -77,7 +77,7 @@ public:
Returns the page being changed to, or being clicked on.
*/
wxRibbonPage* GetPage();
-
+
/**
Sets the page relating to this event.
*/
@@ -120,7 +120,7 @@ public:
for wxRibbonPage - a ribbon user interface typically has a ribbon bar,
which contains one or more wxRibbonPages, which in turn each contain one
or more wxRibbonPanels, which in turn contain controls.
-
+
While a wxRibbonBar has tabs similar to a wxNotebook, it does not follow
the same API for adding pages. Containers like wxNotebook can contain any
type of window as a page, hence the normal procedure is to create the
@@ -128,13 +128,13 @@ public:
have wxRibbonPage as children (and a wxRibbonPage can only have a
wxRibbonBar as parent), when a page is created, it is automatically added
to the bar - there is no AddPage equivalent to call.
-
+
After all pages have been created, and all controls and panels placed on
those pages, Realize() must be called.
-
+
@sa wxRibbonPage
@sa wxRibbonPanel
-
+
@beginStyleTable
@style{wxRIBBON_BAR_DEFAULT_STYLE}
Defined as wxRIBBON_BAR_FLOW_HORIZONTAL |
@@ -213,7 +213,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxRIBBON_BAR_DEFAULT_STYLE);
-
+
/**
Create a ribbon bar in two-step ribbon bar construction.
Should only be called when the default constructor is used, and
@@ -235,7 +235,7 @@ public:
tab bar region of the ribbon bar. These margins will be painted with
the tab background, but tabs and scroll buttons will never be painted
in the margins.
-
+
The left margin could be used for rendering something equivalent to the
"Office Button", though this is not currently implemented. The right
margin could be used for rendering a help button, and/or MDI buttons,
@@ -247,7 +247,7 @@ public:
Set the art provider to be used be the ribbon bar. Also sets the art
provider on all current wxRibbonPage children, and any wxRibbonPage
children added in the future.
-
+
Note that unlike most other ribbon controls, the ribbon bar creates a
default art provider when initialised, so an explicit call to
SetArtProvider() is not required if the default art provider is
@@ -260,17 +260,17 @@ public:
/**
Set the active page by index, without triggering any events.
-
+
@param page
The zero-based index of the page to activate.
@return @true if the specified page is now active, @false if it could
not be activated (for example because the page index is invalid).
*/
bool SetActivePage(size_t page);
-
+
/**
Set the active page, without triggering any events.
-
+
@param page
The page to activate.
@return @true if the specified page is now active, @false if it could
@@ -278,21 +278,21 @@ public:
of the ribbon bar).
*/
bool SetActivePage(wxRibbonPage* page);
-
+
/**
Get the index of the active page.
-
+
In the rare case of no page being active, -1 is returned.
*/
int GetActivePage() const;
-
+
/**
Get a page by index.
-
+
NULL will be returned if the given index is out of range.
*/
wxRibbonPage* GetPage(int n);
-
+
/**
Get the number of pages in this bar.
@@ -302,7 +302,7 @@ public:
/**
Dismiss the expanded panel of the currently active page.
-
+
Calls and returns the value from wxRibbonPage::DismissExpandedPanel()
for the currently active page, or @false if there is no active page.
*/
@@ -433,7 +433,7 @@ public:
@since 2.9.2
*/
bool ArePanelsShown() const;
-
+
/**
Returns the current display mode of the panel area.
@@ -449,7 +449,7 @@ public:
children. This must be called after all of the bar's children have been
created (and their children created, etc.) - if it is not, then windows
may not be laid out or sized correctly.
-
+
Also calls wxRibbonPage::Realize() on each child page.
*/
virtual bool Realize();
diff --git a/interface/wx/ribbon/buttonbar.h b/interface/wx/ribbon/buttonbar.h
index 9b18fba7ce..b98b20f5a2 100644
--- a/interface/wx/ribbon/buttonbar.h
+++ b/interface/wx/ribbon/buttonbar.h
@@ -7,12 +7,12 @@
/**
Flags for button bar button size and state.
-
+
Buttons on a ribbon button bar can each come in three sizes: small, medium,
and large. In some places this is called the size class, and the term size
used for the pixel width and height associated with a particular size
class.
-
+
A button can also be in zero or more hovered or active states, or in the
disabled state.
*/
@@ -23,19 +23,19 @@ enum wxRibbonButtonBarButtonState
provider, but it will be smaller than medium).
*/
wxRIBBON_BUTTONBAR_BUTTON_SMALL = 0 << 0,
-
+
/**
Button is medium sized (the interpretation of medium is dependent upon
the art provider, but it will be between small and large).
*/
wxRIBBON_BUTTONBAR_BUTTON_MEDIUM = 1 << 0,
-
+
/**
Button is large (the interpretation of large is dependent upon the art
provider, but it will be larger than medium).
*/
wxRIBBON_BUTTONBAR_BUTTON_LARGE = 2 << 0,
-
+
/**
A mask to extract button size from a combination of flags.
*/
@@ -46,24 +46,24 @@ enum wxRibbonButtonBarButtonState
the mouse cursor. Only applicable to normal and hybrid buttons.
*/
wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED = 1 << 3,
-
+
/**
The dropdown region of the button is being hovered over by the mouse
cursor. Only applicable to dropdown and hybrid buttons.
*/
wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED = 1 << 4,
-
+
/**
A mask to extract button hover state from a combination of flags.
*/
wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK = wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED | wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED,
-
+
/**
The normal (non-dropdown) region of the button is being pressed.
Only applicable to normal and hybrid buttons.
*/
wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE = 1 << 5,
-
+
/**
The dropdown region of the button is being pressed.
Only applicable to dropdown and hybrid buttons.
@@ -81,12 +81,12 @@ enum wxRibbonButtonBarButtonState
disabled.
*/
wxRIBBON_BUTTONBAR_BUTTON_DISABLED = 1 << 7,
-
+
/**
The button is a toggle button which is currently in the toggled state.
*/
wxRIBBON_BUTTONBAR_BUTTON_TOGGLED = 1 << 8,
-
+
/**
A mask to extract button state from a combination of flags.
*/
@@ -95,7 +95,7 @@ enum wxRibbonButtonBarButtonState
/**
@class wxRibbonButtonBar
-
+
A ribbon button bar is similar to a traditional toolbar. It contains one or
more buttons (button bar buttons, not wxButtons), each of which has a label
and an icon. It differs from a wxRibbonToolBar in several ways:
@@ -106,7 +106,7 @@ enum wxRibbonButtonBarButtonState
@li There is no grouping of buttons on a button bar
@li A button bar typically has a border around each individual button,
whereas a tool bar typically has a border around each group of buttons.
-
+
@beginEventEmissionTable{wxRibbonButtonBarEvent}
@event{EVT_RIBBONBUTTONBAR_CLICKED(id, func)}
Triggered when the normal (non-dropdown) region of a button on the
@@ -117,7 +117,7 @@ enum wxRibbonButtonBarButtonState
event handler if it wants to display a popup menu (which is what most
dropdown buttons should be doing).
@endEventTable
-
+
@library{wxribbon}
@category{ribbon}
*/
@@ -133,7 +133,7 @@ public:
/**
Construct a ribbon button bar with the given parameters.
-
+
@param parent
Parent window for the button bar (typically a wxRibbonPanel).
@param id
@@ -179,7 +179,7 @@ public:
/**
Add a dropdown button to the button bar (simple version).
-
+
@see AddButton()
*/
virtual wxRibbonButtonBarButtonBase* AddDropdownButton(
@@ -190,7 +190,7 @@ public:
/**
Add a hybrid button to the button bar (simple version).
-
+
@see AddButton()
*/
virtual wxRibbonButtonBarButtonBase* AddHybridButton(
@@ -198,10 +198,10 @@ public:
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
-
+
/**
Add a toggle button to the button bar (simple version).
-
+
@see AddButton()
*/
virtual wxRibbonButtonBarButtonBase* AddToggleButton(
@@ -209,10 +209,10 @@ public:
const wxString& label,
const wxBitmap& bitmap,
const wxString& help_string = wxEmptyString);
-
+
/**
Add a button to the button bar.
-
+
@param button_id
ID of the new button (used for event callbacks).
@param label
@@ -235,10 +235,10 @@ public:
The kind of button to add.
@param help_string
The UI help string to associate with the new button.
-
+
@return An opaque pointer which can be used only with other button bar
methods.
-
+
@see AddDropdownButton()
@see AddHybridButton()
@see AddToggleButton()
@@ -431,20 +431,20 @@ public:
/**
Calculate button layouts and positions.
-
+
Must be called after buttons are added to the button bar, as otherwise
the newly added buttons will not be displayed. In normal situations, it
will be called automatically when wxRibbonBar::Realize() is called.
*/
virtual bool Realize();
-
+
/**
Delete all buttons from the button bar.
-
+
@see DeleteButton()
*/
virtual void ClearButtons();
-
+
/**
Delete a single button from the button bar.
@@ -454,20 +454,20 @@ public:
@see ClearButtons()
*/
virtual bool DeleteButton(int button_id);
-
+
/**
Enable or disable a single button on the bar.
-
+
@param button_id
ID of the button to enable or disable.
@param enable
@true to enable the button, @false to disable it.
*/
virtual void EnableButton(int button_id, bool enable = true);
-
+
/**
Set a toggle button to the checked or unchecked state.
-
+
@param button_id
ID of the toggle button to manipulate.
@param checked
@@ -678,12 +678,12 @@ public:
Returns the bar which contains the button which the event relates to.
*/
wxRibbonButtonBar* GetBar();
-
+
/**
Sets the button bar relating to this event.
*/
void SetBar(wxRibbonButtonBar* bar);
-
+
/**
Returns the button which the event relates to.
diff --git a/interface/wx/ribbon/gallery.h b/interface/wx/ribbon/gallery.h
index 2b34f83a64..6fd8145746 100644
--- a/interface/wx/ribbon/gallery.h
+++ b/interface/wx/ribbon/gallery.h
@@ -238,7 +238,7 @@ public:
direction, @false if it did not scroll.
*/
virtual bool ScrollLines(int lines);
-
+
/**
Scroll the gallery contents by some fine-grained amount.
diff --git a/interface/wx/ribbon/page.h b/interface/wx/ribbon/page.h
index c6e2845342..1e62dda8aa 100644
--- a/interface/wx/ribbon/page.h
+++ b/interface/wx/ribbon/page.h
@@ -9,7 +9,7 @@
@class wxRibbonPage
Container for related ribbon panels, and a tab within a ribbon bar.
-
+
@see wxRibbonBar
@see wxRibbonPanel
@@ -28,7 +28,7 @@ public:
/**
Constructs a ribbon page, which must be a child of a ribbon bar.
-
+
@param parent
Pointer to a parent wxRibbonBar (unlike most controls, a wxRibbonPage
can only have wxRibbonBar as a parent).
@@ -53,7 +53,7 @@ public:
Destructor.
*/
virtual ~wxRibbonPage();
-
+
/**
Create a ribbon page in two-step ribbon page construction.
Should only be called when the default constructor is used, and
@@ -69,7 +69,7 @@ public:
Set the art provider to be used. Normally called automatically by
wxRibbonBar when the page is created, or the art provider changed on the
bar.
-
+
The new art provider will be propagated to the children of the page.
*/
void SetArtProvider(wxRibbonArtProvider* art);
@@ -79,10 +79,10 @@ public:
displayed if the ribbon bar is actually showing icons).
*/
wxBitmap& GetIcon();
-
+
/**
Set the size of the page and the external scroll buttons (if any).
-
+
When a page is too small to display all of its children, scroll buttons
will appear (and if the page is sized up enough, they will disappear again).
Slightly counter-intuitively, these buttons are created as siblings of the
@@ -91,78 +91,78 @@ public:
buttons, this function behaves the same as SetSize(), however when there
are scroll buttons, it positions them at the edges of the given area, and
then calls SetSize() with the remaining area.
-
+
This is provided as a separate function to SetSize() rather than within
the implementation of SetSize(), as interacting algorithms may not expect
SetSize() to also set the size of siblings.
*/
void SetSizeWithScrollButtonAdjustment(int x, int y, int width, int height);
-
+
/**
Expand a rectangle of the page to include external scroll buttons (if
any). When no scroll buttons are shown, has no effect.
-
+
@param[in,out] rect
The rectangle to adjust. The width and height will not be reduced,
and the x and y will not be increased.
*/
void AdjustRectToIncludeScrollButtons(wxRect* rect) const;
-
+
/**
Dismiss the current externally expanded panel, if there is one.
-
+
When a ribbon panel automatically minimises, it can be externally
expanded into a floating window. When the user clicks a button in such
a panel, the panel should generally re-minimise. Event handlers for
buttons on ribbon panels should call this method to achieve this
behaviour.
-
+
@return @true if a panel was minimised, @false otherwise.
*/
bool DismissExpandedPanel();
-
+
/**
Perform a full re-layout of all panels on the page.
-
+
Should be called after panels are added to the page, or the sizing
behaviour of a panel on the page changes (i.e. due to children being
added to it). Usually called automatically when wxRibbonBar::Realize()
is called.
-
+
Will invoke wxRibbonPanel::Realize() for all child panels.
*/
virtual bool Realize();
/**
Scroll the page by some amount up / down / left / right.
-
+
When the page's children are too big to fit in the onscreen area given to
the page, scroll buttons will appear, and the page can be programmatically
scrolled. Positive values of @a lines will scroll right or down, while
negative values will scroll up or left (depending on the direction in which
panels are stacked). A line is equivalent to a constant number of pixels.
-
+
@return @true if the page scrolled at least one pixel in the given
direction, @false if it did not scroll.
-
+
@see GetMajorAxis()
@see ScrollPixels()
@see ScrollSections()
*/
virtual bool ScrollLines(int lines);
-
+
/**
Scroll the page by a set number of pixels up / down / left / right.
-
+
When the page's children are too big to fit in the onscreen area given to
the page, scroll buttons will appear, and the page can be programmatically
scrolled. Positive values of @a lines will scroll right or down, while
negative values will scroll up or left (depending on the direction in which
panels are stacked).
-
+
@return @true if the page scrolled at least one pixel in the given
direction, @false if it did not scroll.
-
+
@see GetMajorAxis()
@see ScrollLines()
@see ScrollSections()
@@ -188,12 +188,12 @@ public:
/**
Get the direction in which ribbon panels are stacked within the page.
-
+
This is controlled by the style of the containing wxRibbonBar, meaning
that all pages within a bar will have the same major axis. As well as
being the direction in which panels are stacked, it is also the axis in
which scrolling will occur (when required).
-
+
@return wxHORIZONTAL or wxVERTICAL (never wxBOTH).
*/
wxOrientation GetMajorAxis() const;
diff --git a/interface/wx/ribbon/toolbar.h b/interface/wx/ribbon/toolbar.h
index 588b6b3ea6..9b7c44c9a9 100644
--- a/interface/wx/ribbon/toolbar.h
+++ b/interface/wx/ribbon/toolbar.h
@@ -8,11 +8,11 @@
/**
@class wxRibbonToolBar
-
+
A ribbon tool bar is similar to a traditional toolbar which has no labels.
It contains one or more tool groups, each of which contains one or more
tools. Each tool is represented by a (generally small, i.e. 16x15) bitmap.
-
+
@beginEventEmissionTable{wxRibbonToolBarEvent}
@event{EVT_RIBBONTOOLBAR_CLICKED(id, func)}
Triggered when the normal (non-dropdown) region of a tool on the tool
@@ -23,7 +23,7 @@
event handler if it wants to display a popup menu (which is what most
dropdown tools should be doing).
@endEventTable
-
+
@library{wxribbon}
@category{ribbon}
*/
@@ -39,7 +39,7 @@ public:
/**
Construct a ribbon tool bar with the given parameters.
-
+
@param parent
Parent window for the tool bar (typically a wxRibbonPanel).
@param id
@@ -84,7 +84,7 @@ public:
/**
Add a dropdown tool to the tool bar (simple version).
-
+
@see AddTool()
*/
virtual wxRibbonToolBarToolBase* AddDropdownTool(
@@ -94,7 +94,7 @@ public:
/**
Add a hybrid tool to the tool bar (simple version).
-
+
@see AddTool()
*/
virtual wxRibbonToolBarToolBase* AddHybridTool(
@@ -116,7 +116,7 @@ public:
/**
Add a tool to the tool bar.
-
+
@param tool_id
ID of the new tool (used for event callbacks).
@param bitmap
@@ -132,10 +132,10 @@ public:
The kind of tool to add.
@param client_data
Client data to associate with the new tool.
-
+
@return An opaque pointer which can be used only with other tool bar
methods.
-
+
@see AddDropdownTool(), AddHybridTool(), AddSeparator(), InsertTool()
*/
virtual wxRibbonToolBarToolBase* AddTool(
@@ -148,7 +148,7 @@ public:
/**
Add a separator to the tool bar.
-
+
Separators are used to separate tools into groups. As such, a separator
is not explicitly drawn, but is visually seen as the gap between tool
groups.
@@ -404,12 +404,12 @@ public:
/**
Set the number of rows to distribute tool groups over.
-
+
Tool groups can be distributed over a variable number of rows. The way
in which groups are assigned to rows is not specified, and the order
of groups may change, but they will be distributed in such a way as to
minimise the overall size of the tool bar.
-
+
@param nMin
The minimum number of rows to use.
@param nMax
diff --git a/interface/wx/richmsgdlg.h b/interface/wx/richmsgdlg.h
index 649e0ae4d4..8cf94dbaae 100644
--- a/interface/wx/richmsgdlg.h
+++ b/interface/wx/richmsgdlg.h
@@ -115,7 +115,7 @@ public:
The footer text if empty no footer text will be used.
@see SetFooterIcon(), GetFooterText()
-
+
@since 3.1.1
*/
void SetFooterText(const wxString& footerText);
diff --git a/interface/wx/richtext/richtextbuffer.h b/interface/wx/richtext/richtextbuffer.h
index b58125debd..ae9554605b 100644
--- a/interface/wx/richtext/richtextbuffer.h
+++ b/interface/wx/richtext/richtextbuffer.h
@@ -4486,7 +4486,7 @@ protected:
// Whether the paragraph is impacted by floating objects from above
int m_impactedByFloatingObjects;
-
+
// Default tabstops
static wxArrayInt sm_defaultTabs;
@@ -5702,7 +5702,7 @@ protected:
wxRichTextCell is the cell in a table, in which the user can type. As well as
text, it can also contain objects e.g. an image, or even another wxRichTextTable.
-
+
A cell's appearance can be changed via its associated wxRichTextAttr; for example
its size altered or its background colour set. It also has the properties of
column- and row-span. By default these are 1, meaning that the cell only spans
@@ -5745,46 +5745,46 @@ public:
/**
Returns the number of columns spanned by the cell.
-
+
By default a cell doesn't span extra columns, so this function returns 1.
-
+
@since 2.9.5
-
+
@see SetColSpan(), GetRowSpan()
*/
int GetColSpan() const;
/**
Set the number of columns spanned by the cell.
-
+
By default colspan is 1 i.e. a cell doesn't span extra columns. Pass a value >1
to change this. Attempting to set a colspan <1 will assert and be ignored.
-
+
@since 2.9.5
-
+
@see GetColSpan(), SetRowSpan()
*/
void SetColSpan(long span);
/**
Returns the number of rows spanned by the cell.
-
+
By default a cell doesn't span extra rows, so this function returns 1.
-
+
@since 2.9.5
-
+
@see SetRowSpan(), GetColSpan()
*/
int GetRowSpan() const;
/**
Set the number of rows spanned by the cell.
-
+
By default colspan is 1 i.e. a cell doesn't span extra rows. Pass a value >1
to change this. Attempting to set a rowspan <1 will assert and be ignored.
-
+
@since 2.9.5
-
+
@see GetRowSpan(), SetColSpan()
*/
void SetRowSpan(long span);
@@ -5912,7 +5912,7 @@ public:
/**
Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.
- */
+ */
virtual wxPosition GetFocusedCell() const;
// Operations
@@ -5996,7 +5996,7 @@ public:
wxRichTextTableBlock(const wxRichTextTableBlock& block) { Copy(block); }
void Init() { m_colStart = 0; m_colEnd = 0; m_rowStart = 0; m_rowEnd = 0; }
-
+
void Copy(const wxRichTextTableBlock& block)
{
m_colStart = block.m_colStart; m_colEnd = block.m_colEnd; m_rowStart = block.m_rowStart; m_rowEnd = block.m_rowEnd;
diff --git a/interface/wx/richtext/richtextctrl.h b/interface/wx/richtext/richtextctrl.h
index 3af29d13a5..2346593a3a 100644
--- a/interface/wx/richtext/richtextctrl.h
+++ b/interface/wx/richtext/richtextctrl.h
@@ -595,7 +595,7 @@ public:
*/
virtual void DiscardEdits();
-
+
void SetModified(bool modified);
/**
@@ -1236,7 +1236,7 @@ public:
left of the actual paragraph is leftSubIndent.
*/
bool BeginNumberedBullet(int bulletNumber, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_ARABIC|wxTEXT_ATTR_BULLET_STYLE_PERIOD);
-
+
/**
Ends application of a numbered bullet.
*/
@@ -1248,7 +1248,7 @@ public:
to render the bulleted paragraph.
*/
bool BeginSymbolBullet(const wxString& symbol, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL);
-
+
/**
Ends applying a symbol bullet.
*/
@@ -1503,7 +1503,7 @@ public:
@a style must have flags indicating which attributes are of interest.
*/
virtual bool HasCharacterAttributes(const wxRichTextRange& range, const wxRichTextAttr& style) const;
-
+
/**
Test if this whole range has paragraph attributes of the specified kind.
@@ -1512,7 +1512,7 @@ public:
@a style must have flags indicating which attributes are of interest.
*/
virtual bool HasParagraphAttributes(const wxRichTextRange& range, const wxRichTextAttr& style) const;
-
+
/**
Returns @true if all of the selection, or the content at the caret position, is bold.
@@ -2400,7 +2400,7 @@ public:
Copy constructor.
*/
wxRichTextEvent(const wxRichTextEvent& event);
-
+
/**
Returns the buffer position at which the event occurred.
*/
diff --git a/interface/wx/richtooltip.h b/interface/wx/richtooltip.h
index a4e48648ff..cd3c3148c2 100644
--- a/interface/wx/richtooltip.h
+++ b/interface/wx/richtooltip.h
@@ -51,7 +51,7 @@ enum wxTipKind
wxTipKind_Auto
};
/**
- Allows to show a tool tip with more customizations than wxToolTip.
+ Allows showing a tool tip with more customizations than wxToolTip.
Using this class is very simple, to give a standard warning for a password
text control if the password was entered correctly you could simply do:
diff --git a/interface/wx/sashwin.h b/interface/wx/sashwin.h
index 28d48f8e7e..5710e09a2d 100644
--- a/interface/wx/sashwin.h
+++ b/interface/wx/sashwin.h
@@ -275,7 +275,7 @@ public:
*/
wxSashEdgePosition GetEdge() const;
-
+
void SetEdge(wxSashEdgePosition edge);
void SetDragRect(const wxRect& rect);
void SetDragStatus(wxSashDragStatus status);
diff --git a/interface/wx/scopedptr.h b/interface/wx/scopedptr.h
index c72936eb0a..4895ee96e6 100644
--- a/interface/wx/scopedptr.h
+++ b/interface/wx/scopedptr.h
@@ -238,8 +238,8 @@ public:
T& operator*() const;
/**
- Smart pointer member access. Returns pointer to object.
-
+ Smart pointer member access. Returns pointer to object.
+
If the internal pointer is @NULL this method will cause an assert in debug mode.
*/
T* operator->() const;
diff --git a/interface/wx/scrolbar.h b/interface/wx/scrolbar.h
index 1f7ff099ef..18e7d155ff 100644
--- a/interface/wx/scrolbar.h
+++ b/interface/wx/scrolbar.h
@@ -124,10 +124,10 @@ public:
@param id
Window identifier. The value wxID_ANY indicates a default value.
@param pos
- Window position.
+ Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then a default size is chosen.
@param style
Window style. See wxScrollBar.
diff --git a/interface/wx/scrolwin.h b/interface/wx/scrolwin.h
index 7b44ae250c..177ce0545a 100644
--- a/interface/wx/scrolwin.h
+++ b/interface/wx/scrolwin.h
@@ -539,7 +539,7 @@ public:
void SetTargetWindow(wxWindow *window);
wxWindow *GetTargetWindow() const;
-
+
void SetTargetRect(const wxRect& rect);
wxRect GetTargetRect() const;
@@ -562,13 +562,13 @@ public:
window.
*/
void StopAutoScrolling();
-
+
/**
This method can be overridden in a derived class to forbid sending the
auto scroll events - note that unlike StopAutoScrolling() it doesn't
stop the timer, so it will be called repeatedly and will typically
return different values depending on the current mouse position
-
+
The base class version just returns true.
*/
virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
diff --git a/interface/wx/settings.h b/interface/wx/settings.h
index 11f913a2f6..925c6aa9c4 100644
--- a/interface/wx/settings.h
+++ b/interface/wx/settings.h
@@ -257,7 +257,7 @@ enum wxSystemScreenType
wxSystemSettings allows the application to ask for details about the system.
- This can include settings such as standard colours, fonts, and user interface
+ This can include settings such as standard colours, fonts, and user interface
element sizes.
@library{wxcore}
@@ -279,9 +279,9 @@ public:
/**
Returns a system colour.
- @param index
+ @param index
Can be one of the ::wxSystemColour enum values.
-
+
@return
The returned colour is always valid.
*/
@@ -290,9 +290,9 @@ public:
/**
Returns a system font.
- @param index
+ @param index
Can be one of the ::wxSystemFont enum values.
-
+
@return
The returned font is always valid.
*/
diff --git a/interface/wx/simplebook.h b/interface/wx/simplebook.h
index ba2302fb3d..7db8c04adb 100644
--- a/interface/wx/simplebook.h
+++ b/interface/wx/simplebook.h
@@ -73,7 +73,7 @@ public:
/**
Set the effects to use for showing and hiding the pages.
- This method allows to specify the effects passed to
+ This method allows specifying the effects passed to
wxWindow::ShowWithEffect() and wxWindow::HideWithEffect() respectively
when the pages need to be shown or hidden.
@@ -102,7 +102,7 @@ public:
/**
Set the effect timeout to use for showing and hiding the pages.
- This method allows to configure the timeout arguments passed to
+ This method allows configuring the timeout arguments passed to
wxWindow::ShowWithEffect() and wxWindow::HideWithEffect() if a
non-default effect is used.
diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h
index f1e3295f52..c42fd3e380 100644
--- a/interface/wx/sizer.h
+++ b/interface/wx/sizer.h
@@ -83,12 +83,14 @@
The item will be expanded as much as possible while also
maintaining its aspect ratio.}
@itemdef{wxFIXED_MINSIZE,
- Normally wxSizers will use GetAdjustedBestSize() to determine what
- the minimal size of window items should be, and will use that size
- to calculate the layout. This allows layouts to adjust when an
- item changes and its best size becomes different. If you would
- rather have a window item stay the size it started with then use
- @c wxFIXED_MINSIZE.}
+ Normally sizers use the "best", i.e. most appropriate, size of the
+ window to determine what the minimal size of window items should be.
+ This allows layouts to adjust correctly when the item contents,
+ and hence its best size, changes. If this behaviour is unwanted,
+ @c wxFIXED_MINSIZE can be used to fix minimal size of the window
+ to its initial value and not change it any more in the future.
+ Note that the same thing can be accomplished by calling
+ wxWindow::SetMinSize() explicitly as well.}
@itemdef{wxRESERVE_SPACE_EVEN_IF_HIDDEN,
Normally wxSizers don't allocate space for hidden windows or other
items. This flag overrides this behaviour so that sufficient space
@@ -292,7 +294,7 @@ public:
int flag = 0,
int border = 0,
wxObject* userData = NULL);
-
+
/**
Appends a spacer child to the sizer.
@@ -307,7 +309,7 @@ public:
wxSizerItem* Add( int width, int height, const wxSizerFlags& flags);
wxSizerItem* Add(wxSizerItem* item);
-
+
/**
This base function adds non-stretchable space to both the horizontal
and vertical orientation of the sizer.
@@ -437,7 +439,7 @@ public:
*/
virtual bool InformFirstDirection(int direction, int size, int availableOtherDir);
-
+
//@{
/**
Returns the list of the items in this sizer.
@@ -458,7 +460,7 @@ public:
Set the window this sizer is used in.
*/
void SetContainingWindow(wxWindow *window);
-
+
/**
Returns the number of items in the sizer.
@@ -615,7 +617,7 @@ public:
const wxSizerFlags& flags);
wxSizerItem* Insert(size_t index, wxSizerItem* item);
-
+
/**
Inserts non-stretchable space to the sizer.
More readable way of calling wxSizer::Insert(index, size, size).
@@ -711,7 +713,7 @@ public:
wxSizerItem* Prepend(int width, int height, const wxSizerFlags& flags);
wxSizerItem* Prepend(wxSizerItem* item);
-
+
/**
Prepends non-stretchable space to the sizer.
More readable way of calling wxSizer::Prepend(size, size, 0).
@@ -725,11 +727,16 @@ public:
wxSizerItem* PrependStretchSpacer(int prop = 1);
/**
- This method is abstract and has to be overwritten by any derived class.
- Here, the sizer will do the actual calculation of its children's
- positions and sizes.
+ Method which must be overridden in the derived sizer classes.
+
+ The implementation should reposition the children using the current
+ total size available to the sizer (@c m_size) and the size computed by
+ the last call to CalcMin().
+
+ @since 3.1.3, before this version RecalcSizes() method not taking any
+ arguments had to be overridden in the derived classes instead.
*/
- virtual void RecalcSizes() = 0;
+ virtual void RepositionChildren(const wxSize& minSize) = 0;
/**
Removes a child window from the sizer, but does @b not destroy it
@@ -1708,7 +1715,7 @@ public:
virtual void RecalcSizes();
virtual wxSize CalcMin();
-
+
};
@@ -1771,7 +1778,7 @@ public:
number of columns or rows being currently used, see GetEffectiveColsCount()
*/
int GetCols() const;
-
+
/**
Returns the number of rows that has been specified for the
sizer.
@@ -1791,7 +1798,7 @@ public:
@since 2.9.1
*/
int GetEffectiveColsCount() const;
-
+
/**
Returns the number of rows currently used by the sizer.
diff --git a/interface/wx/slider.h b/interface/wx/slider.h
index 68815389c5..0c35d97224 100644
--- a/interface/wx/slider.h
+++ b/interface/wx/slider.h
@@ -57,6 +57,8 @@
Displays ticks on the top.
@style{wxSL_BOTTOM}
Displays ticks on the bottom (this is the default).
+ @style{wxSL_BOTH}
+ Displays ticks on both sides of the slider. Windows only.
@style{wxSL_SELRANGE}
Displays a highlighted selection range. Windows only.
@style{wxSL_INVERSE}
@@ -167,10 +169,10 @@ public:
@param maxValue
Maximum slider position.
@param pos
- Window position.
+ Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then a default size is chosen.
@param style
Window style. See wxSlider.
@@ -306,7 +308,7 @@ public:
@param minValue
The new bottom end of the slider range.
-
+
@see GetMin(), SetRange()
*/
void SetMin( int minValue );
@@ -316,7 +318,7 @@ public:
@param maxValue
The new top end of the slider range.
-
+
@see GetMax(), SetRange()
*/
void SetMax( int maxValue );
diff --git a/interface/wx/snglinst.h b/interface/wx/snglinst.h
index 2801cec57f..999b6bcb1d 100644
--- a/interface/wx/snglinst.h
+++ b/interface/wx/snglinst.h
@@ -8,7 +8,7 @@
/**
@class wxSingleInstanceChecker
- wxSingleInstanceChecker class allows to check that only a single instance of a
+ wxSingleInstanceChecker class allows checking that only a single instance of a
program is running.
To do it, you should create an object of this class. As long as this object
diff --git a/interface/wx/srchctrl.h b/interface/wx/srchctrl.h
index 975a137703..0709cb9e11 100644
--- a/interface/wx/srchctrl.h
+++ b/interface/wx/srchctrl.h
@@ -100,7 +100,7 @@ public:
*/
virtual ~wxSearchCtrl();
-
+
bool Create(wxWindow* parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
@@ -126,7 +126,7 @@ public:
Returns the cancel button's visibility state.
*/
virtual bool IsCancelButtonVisible() const;
-
+
/**
Sets the search control's menu object.
If there is already a menu associated with the search control it is deleted.
diff --git a/interface/wx/statbmp.h b/interface/wx/statbmp.h
index 06bfce85b2..e47094ae58 100644
--- a/interface/wx/statbmp.h
+++ b/interface/wx/statbmp.h
@@ -33,36 +33,36 @@ class wxStaticBitmap : public wxControl
public:
/**
Specify how the bitmap should be scaled in the control.
-
+
@see SetScaleMode(), GetScaleMode()
*/
enum ScaleMode
{
- /**
+ /**
The bitmap is displayed in original size. Portions larger then the
control will be cut off.
*/
Scale_None,
-
+
/**
Scale the bitmap to fit the size of the control by changing the
aspect ratio of the bitmap if necessary.
*/
Scale_Fill,
-
+
/**
Scale the bitmap to fit the size of the control by maintaining the
aspect ratio. Any remaining area of the control will use the background.
*/
Scale_AspectFit,
-
+
/**
Scale the bitmap to fill the size of the control. Some portion of
the bitmap may be clipped to fill the control.
*/
Scale_AspectFill
};
-
+
/**
Default constructor
*/
@@ -138,31 +138,31 @@ public:
The new icon.
*/
virtual void SetIcon(const wxIcon& label);
-
+
/**
Sets the scale mode.
-
+
@param scaleMode
Controls how the bitmap is scaled inside the control.
-
+
@note Currently only the generic implementation supports all scaling modes.
You may use generic implementation wxGenericStaticBitmap declared in
\ in all ports.
-
+
@see GetScaleMode()
-
+
@since 3.1.0
*/
virtual void SetScaleMode(ScaleMode scaleMode);
-
+
/**
Returns the scale mode currently used in the control.
-
+
@see SetScaleMode()
-
+
@since 3.1.0
*/
virtual ScaleMode GetScaleMode() const;
-
+
};
diff --git a/interface/wx/stc/stc.h b/interface/wx/stc/stc.h
index 49ef8ff5ad..3c992fe511 100644
--- a/interface/wx/stc/stc.h
+++ b/interface/wx/stc/stc.h
@@ -7,7 +7,7 @@
/*
IMPORTANT: This file is generated by src/stc/gen_iface.py from
- src/stc/stc.interface.h.in. Do not edit the file in
+ src/stc/stc.interface.h.in. Do not edit the file in
interface/wx/stc or your changes will be lost.
*/
@@ -6829,7 +6829,7 @@ public:
void SetWrapVisualFlags(int wrapVisualFlags);
/**
- Retrive the display mode of visual flags for wrapped lines.
+ Retrieve the display mode of visual flags for wrapped lines.
The return value will be a bit list containing one or more of the
@link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAG_NONE wxSTC_WRAPVISUALFLAG_* @endlink constants.
@@ -6845,7 +6845,7 @@ public:
void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation);
/**
- Retrive the location of visual flags for wrapped lines.
+ Retrieve the location of visual flags for wrapped lines.
The return value will be a bit list containing one or more of the
@link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAGLOC_DEFAULT wxSTC_WRAPVISUALFLAGLOC_* @endlink constants.
@@ -6858,7 +6858,7 @@ public:
void SetWrapStartIndent(int indent);
/**
- Retrive the start indent for wrapped lines.
+ Retrieve the start indent for wrapped lines.
*/
int GetWrapStartIndent() const;
@@ -7275,7 +7275,7 @@ public:
/**
Extract style settings from a spec-string which is composed of one or
more of the following comma separated elements:
-
+
bold turns on bold
italic turns on italics
fore:[name or \#RRGGBB] sets the foreground colour
diff --git a/interface/wx/stockitem.h b/interface/wx/stockitem.h
index 0826edf555..7a30787dae 100644
--- a/interface/wx/stockitem.h
+++ b/interface/wx/stockitem.h
@@ -39,7 +39,7 @@ enum wxStockLabelQueryFlag
Return the label without any ellipsis at the end.
By default, stock items text is returned with ellipsis, if appropriate,
- this flag allows to avoid having it. So using the same example as
+ this flag allows one to avoid having it. So using the same example as
above, the returned string would be "Print" or "&Print" if
wxSTOCK_WITH_MNEMONIC were also used.
diff --git a/interface/wx/strconv.h b/interface/wx/strconv.h
index 111a07ce54..00dfb359e6 100644
--- a/interface/wx/strconv.h
+++ b/interface/wx/strconv.h
@@ -86,7 +86,7 @@ public:
This is the most general function for converting a multibyte string to
a wide string, cMB2WC() may be often more convenient, however this
- function is the most efficient one as it allows to avoid any
+ function is the most efficient one as it allows avoiding any
unnecessary copying.
The main case is when @a dst is not @NULL and @a srcLen is not
diff --git a/interface/wx/stream.h b/interface/wx/stream.h
index 5eccd60e15..b7f5bbc4f1 100644
--- a/interface/wx/stream.h
+++ b/interface/wx/stream.h
@@ -662,7 +662,7 @@ public:
/**
Changes the stream current position.
- This operation in general is possible only for seekable streams
+ This operation in general is possible only for seekable streams
(see wxStreamBase::IsSeekable()); non-seekable streams support only
seeking positive amounts in mode @c wxFromCurrent (this is implemented
by reading data and simply discarding it).
diff --git a/interface/wx/string.h b/interface/wx/string.h
index d2f449c405..65d828c8f5 100644
--- a/interface/wx/string.h
+++ b/interface/wx/string.h
@@ -2038,7 +2038,7 @@ public:
//@{
/**
- Allows to extend a function with the signature:
+ Allows extending a function with the signature:
@code bool SomeFunc(const wxUniChar& c) @endcode
which operates on a single character, to an entire wxString.
diff --git a/interface/wx/sysopt.h b/interface/wx/sysopt.h
index 47ac09624d..bbf3d1ccac 100644
--- a/interface/wx/sysopt.h
+++ b/interface/wx/sysopt.h
@@ -34,7 +34,7 @@
If set to non-zero value, abort the program if an assertion fails. The
default behaviour in case of assertion failure depends on the build mode
and can be changed by overriding wxApp::OnAssertFailure() but setting
- this option allows to change it without modifying the program code and
+ this option allows changing it without modifying the program code and
also applies to asserts which may happen before the wxApp object
creation or after its destruction.
@endFlagTable
@@ -81,8 +81,8 @@
@flag{gtk.tlw.can-set-transparent}
wxTopLevelWindow::CanSetTransparent() method normally tries to detect
automatically whether transparency for top level windows is currently
- supported, however this may sometimes fail and this option allows to
- override the automatic detection. Setting it to 1 makes the transparency
+ supported, however this may sometimes fail and this option allows
+ overriding the automatic detection. Setting it to 1 makes the transparency
be always available (setting it can still fail, of course) and setting it
to 0 makes it always unavailable.
@flag{gtk.desktop}
@@ -112,7 +112,7 @@
If 1 activates the spell checking in wxTextCtrl.
@flag{osx.openfiledialog.always-show-types}
Per default a wxFileDialog with wxFD_OPEN does not show a types-popup on OS X but allows
- the selection of files from any of the supported types. Setting this to 1 shows a wxChoice
+ the selection of files from any of the supported types. Setting this to 1 shows a wxChoice
for selection (if there is more than one supported filetype).
@endFlagTable
diff --git a/interface/wx/textcompleter.h b/interface/wx/textcompleter.h
index 543833ef9c..8657b11f5d 100644
--- a/interface/wx/textcompleter.h
+++ b/interface/wx/textcompleter.h
@@ -21,7 +21,7 @@
one after the user finished entering the first one and so on.
When inheriting from this class you need to implement its two pure virtual
- methods. This allows to return the results incrementally and may or not be
+ methods. This allows returning the results incrementally and may or not be
convenient depending on where do they come from. If you prefer to return
all the completions at once, you should inherit from wxTextCompleterSimple
instead.
diff --git a/interface/wx/textctrl.h b/interface/wx/textctrl.h
index 1bb50d9e90..a0b6b7464f 100644
--- a/interface/wx/textctrl.h
+++ b/interface/wx/textctrl.h
@@ -960,7 +960,7 @@ public:
@style{wxTE_READONLY}
The text will not be user-editable.
@style{wxTE_RICH}
- Use rich text control under MSW, this allows to have more than 64KB
+ Use rich text control under MSW, this allows having more than 64KB
of text in the control. This style is ignored under other platforms.
@style{wxTE_RICH2}
Use rich text control version 2.0 or higher under MSW, this style is
@@ -1469,7 +1469,7 @@ public:
/**
Converts given text position to client coordinates in pixels.
- This function allows to find where is the character at the given
+ This function allows finding where is the character at the given
position displayed in the text control.
@onlyfor{wxmsw,wxgtk}. Additionally, wxGTK only implements this method
diff --git a/interface/wx/textentry.h b/interface/wx/textentry.h
index f580f86f1e..7af88079be 100644
--- a/interface/wx/textentry.h
+++ b/interface/wx/textentry.h
@@ -68,7 +68,7 @@ public:
This method should be used instead of AutoComplete() overload taking
the array of possible completions if the total number of strings is too
- big as it allows to return the completions dynamically, depending on
+ big as it allows returning the completions dynamically, depending on
the text already entered by user and so is more efficient.
The specified @a completer object will be used to retrieve the list of
@@ -399,7 +399,7 @@ public:
This function sets the maximum number of characters the user can enter
into the control.
- In other words, it allows to limit the text value length to @a len not
+ In other words, it allows limiting the text value length to @a len not
counting the terminating @c NUL character.
If @a len is 0, the previously set max length limit, if any, is discarded
diff --git a/interface/wx/textfile.h b/interface/wx/textfile.h
index 52a6506fa6..fc344b3547 100644
--- a/interface/wx/textfile.h
+++ b/interface/wx/textfile.h
@@ -22,7 +22,7 @@ enum wxTextFileType
/**
@class wxTextFile
- The wxTextFile is a simple class which allows to work with text files on line by
+ The wxTextFile is a simple class which allows working with text files on line by
line basis. It also understands the differences in line termination characters
under different platforms and will not do anything bad to files with "non
native" line termination sequences - in fact, it can be also used to modify the
@@ -169,7 +169,7 @@ public:
/**
Gets the last line of the file.
- Together with GetPrevLine() it allows to enumerate the lines
+ Together with GetPrevLine() it allows enumerating the lines
in the file from the end to the beginning like this:
@code
diff --git a/interface/wx/textwrapper.h b/interface/wx/textwrapper.h
index f4a3822cd9..495cb90ed1 100644
--- a/interface/wx/textwrapper.h
+++ b/interface/wx/textwrapper.h
@@ -19,7 +19,7 @@
Here is an example function using this class which inserts hard line breaks
into a string of text at the positions where it would be wrapped:
-
+
@code
wxString WrapText(wxWindow *win, const wxString& text, int widthMax)
{
diff --git a/interface/wx/thread.h b/interface/wx/thread.h
index f308327a29..65d14dcddf 100644
--- a/interface/wx/thread.h
+++ b/interface/wx/thread.h
@@ -1042,11 +1042,19 @@ public:
wxThreadError Create(unsigned int stackSize = 0);
/**
- Calling Delete() gracefully terminates a @b detached thread, either when
- the thread calls TestDestroy() or when it finishes processing.
+ Calling Delete() requests termination of any thread.
+
+ Note that Delete() doesn't actually stop the thread, but simply asks it
+ to terminate and so will work only if the thread calls TestDestroy()
+ periodically. For detached threads, Delete() returns immediately,
+ without waiting for the thread to actually terminate, while for
+ joinable threads it does wait for the thread to terminate and may also
+ return its exit code in @a rc argument.
@param rc
- The thread exit code, if rc is not NULL.
+ For joinable threads, filled with the thread exit code on
+ successful return, if non-@NULL. For detached threads this
+ parameter is not used.
@param waitMode
As described in wxThreadWait documentation, wxTHREAD_WAIT_BLOCK
@@ -1216,7 +1224,7 @@ public:
of detached threads.
This function can only be called from another thread context.
-
+
Finally, note that once a thread has completed and its Entry() function
returns, you cannot call Run() on it again (an assert will fail in debug
builds or @c wxTHREAD_RUNNING will be returned in release builds).
diff --git a/interface/wx/timectrl.h b/interface/wx/timectrl.h
index c640f8f1b4..daaba32ac6 100644
--- a/interface/wx/timectrl.h
+++ b/interface/wx/timectrl.h
@@ -38,15 +38,15 @@ enum
@beginEventEmissionTable{wxDateEvent}
@event{EVT_TIME_CHANGED(id, func)}
- This event fires when the user changes the current selection in the
- control.
+ Process a wxEVT_TIME_CHANGED event, which fires when the user
+ changes the current selection in the control.
@endEventTable
@library{wxcore}
@category{pickers}
@appearance{timepickerctrl}
- @see wxDatePickerCtrl, wxDateEvent
+ @see wxDatePickerCtrl, wxCalendarCtrl, wxDateEvent
@since 2.9.3
*/
@@ -57,7 +57,7 @@ public:
Default constructor.
*/
wxTimePickerCtrl();
-
+
/**
Initializes the object and calls Create() with all the parameters.
*/
diff --git a/interface/wx/timer.h b/interface/wx/timer.h
index 6753e2dd12..d0a884c7b7 100644
--- a/interface/wx/timer.h
+++ b/interface/wx/timer.h
@@ -154,7 +154,7 @@ public:
@class wxTimerRunner
Starts the timer in its ctor, stops in the dtor.
-*/
+*/
class wxTimerRunner
{
public:
diff --git a/interface/wx/tokenzr.h b/interface/wx/tokenzr.h
index d7861593b0..2ab0829f6b 100644
--- a/interface/wx/tokenzr.h
+++ b/interface/wx/tokenzr.h
@@ -7,7 +7,7 @@
/**
The behaviour of wxStringTokenizer is governed by the
- wxStringTokenizer::wxStringTokenizer() or wxStringTokenizer::SetString()
+ wxStringTokenizer::wxStringTokenizer() or wxStringTokenizer::SetString()
with the parameter @e mode, which may be one of the following:
*/
enum wxStringTokenizerMode
@@ -27,7 +27,7 @@ enum wxStringTokenizerMode
/**
In this mode, the empty tokens in the middle of the string will be returned,
- i.e. @c "a::b:" will be tokenized in three tokens @c 'a', @c '' and @c 'b'.
+ i.e. @c "a::b:" will be tokenized in three tokens @c 'a', @c '' and @c 'b'.
Notice that all trailing delimiters are ignored in this mode, not just the last one,
i.e. a string @c "a::b::" would still result in the same set of tokens.
*/
@@ -72,7 +72,7 @@ enum wxStringTokenizerMode
string to tokenize and also the delimiters which separate tokens in the string
(by default, white space characters will be used).
- Then wxStringTokenizer::GetNextToken() may be called repeatedly until
+ Then wxStringTokenizer::GetNextToken() may be called repeatedly until
wxStringTokenizer::HasMoreTokens() returns @false.
For example:
@@ -169,17 +169,17 @@ public:
//@{
/**
- This is a convenience function wrapping wxStringTokenizer which simply
+ This is a convenience function wrapping wxStringTokenizer which simply
returns all tokens found in the given @a str as an array.
- Please see wxStringTokenizer::wxStringTokenizer for the description
+ Please see wxStringTokenizer::wxStringTokenizer for the description
of the other parameters.
@return The array with the parsed tokens.
@header{wx/tokenzr.h}
*/
-wxArrayString
+wxArrayString
wxStringTokenize(const wxString& str,
const wxString& delims = wxDEFAULT_DELIMITERS,
wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
diff --git a/interface/wx/toolbar.h b/interface/wx/toolbar.h
index e6b43df03b..03d7ba16c4 100644
--- a/interface/wx/toolbar.h
+++ b/interface/wx/toolbar.h
@@ -809,7 +809,7 @@ public:
/**
Removes the given tool from the toolbar but doesn't delete it. This
- allows to insert/add this tool back to this (or another) toolbar later.
+ allows inserting/adding this tool back to this (or another) toolbar later.
@note It is unnecessary to call Realize() for the change to take place,
it will happen immediately.
diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h
index 44731c8790..5ad74b5912 100644
--- a/interface/wx/toplevel.h
+++ b/interface/wx/toplevel.h
@@ -445,11 +445,11 @@ public:
*/
wxWindow* SetDefaultItem(wxWindow* win);
-
+
wxWindow* SetTmpDefaultItem(wxWindow * win);
wxWindow* GetTmpDefaultItem() const;
-
+
/**
Sets the icon for this window.
@@ -467,8 +467,8 @@ public:
void SetIcon(const wxIcon& icon);
/**
- Sets several icons of different sizes for this window: this allows to
- use different icons for different situations (e.g. task switching bar,
+ Sets several icons of different sizes for this window: this allows
+ using different icons for different situations (e.g. task switching bar,
taskbar, window title bar) instead of scaling, with possibly bad looking
results, the only icon set by SetIcon().
@@ -571,20 +571,20 @@ public:
there are any open top level windows.
*/
virtual bool ShouldPreventAppExit() const;
-
+
/**
This function sets the wxTopLevelWindow's modified state on OS X,
which currently draws a black dot in the wxTopLevelWindow's close button.
On other platforms, this method does nothing.
-
+
@see OSXIsModified()
*/
virtual void OSXSetModified(bool modified);
-
+
/**
Returns the current modified state of the wxTopLevelWindow on OS X.
On other platforms, this method does nothing.
-
+
@see OSXSetModified()
*/
virtual bool OSXIsModified() const;
@@ -611,7 +611,7 @@ public:
virtual void ShowWithoutActivating();
/**
- Enables the maximize button to toggle full screen mode. Prior to
+ Enables the maximize button to toggle full screen mode. Prior to
OS X 10.10 a full screen button is added to the right upper corner
of a window's title bar.
diff --git a/interface/wx/translation.h b/interface/wx/translation.h
index 23ca5128c7..bc92a3a378 100644
--- a/interface/wx/translation.h
+++ b/interface/wx/translation.h
@@ -7,7 +7,7 @@
/**
- This class allows to get translations for strings.
+ This class allows getting translations for strings.
In wxWidgets this class manages message catalogs which contain the
translations of the strings used to the current language. Unlike wxLocale,
@@ -137,34 +137,6 @@ public:
const wxString& msgIdLanguage = "en");
/**
- Returns the languages of all translations that can be used for the @a
- domain.
-
- This is a more general version of GetBestTranslation(), which returns
- the whole list of preferred UI languages for which a translation for
- the @a domain was found instead of just the first, i.e. the most
- preferred, element of this list.
-
- @param domain
- The catalog domain to look for.
-
- @param msgIdLanguage
- Specifies the language of "msgid" strings in source code (i.e.
- arguments to GetString(), wxGetTranslation() and the _() macro).
-
- @return An array of language codes if any suitable matches were found,
- empty array otherwise.
-
- @since 3.1.2
- */
- wxArrayString GetAcceptableTranslations(const wxString& domain,
- wxLanguage msgIdLanguage);
-
- /// @overload
- wxArrayString GetAcceptableTranslations(const wxString& domain,
- const wxString& msgIdLanguage = "en");
-
- /**
Add standard wxWidgets catalogs ("wxstd" and possible port-specific
catalogs).
@@ -175,10 +147,9 @@ public:
bool AddStdCatalog();
/**
- Add a catalog for the preferred UI language. In case of multiple
- preferences, add catalog for each language, if available.
+ Add a catalog for use with the current locale.
- By default, the catalog is searched for in standard places (see
+ By default, it is searched for in standard places (see
wxFileTranslationsLoader), but you may also prepend additional
directories to the search path with
wxFileTranslationsLoader::AddCatalogLookupPathPrefix().
@@ -202,9 +173,8 @@ public:
code are used instead.
@return
- @true if catalog in the most preferred language was successfully loaded,
- @false otherwise (which might mean that the catalog is not found or that
- it isn't in the correct format).
+ @true if catalog was successfully loaded, @false otherwise (which might
+ mean that the catalog is not found or that it isn't in the correct format).
*/
bool AddCatalog(const wxString& domain,
wxLanguage msgIdLanguage = wxLANGUAGE_ENGLISH_US);
@@ -230,9 +200,8 @@ public:
in case they use 8-bit characters (e.g. German or French strings).
@return
- @true if catalog in the most preferred language was successfully loaded,
- @false otherwise (which might mean that the catalog is not found or that
- it isn't in the correct format).
+ @true if catalog was successfully loaded, @false otherwise (which might
+ mean that the catalog is not found or that it isn't in the correct format).
*/
bool AddCatalog(const wxString& domain,
wxLanguage msgIdLanguage,
@@ -570,7 +539,7 @@ public:
If @a context is not empty (notice that this argument is only available
starting from wxWidgets 3.1.1), item translation is looked up in the
- specified context. This allows to have different translations for the same
+ specified context. This allows having different translations for the same
string appearing in different contexts, e.g. it may be necessary to
translate the same English "Open" verb differently depending on the object
it applies to. To do this, you need to use @c msgctxt in the source message
diff --git a/interface/wx/treectrl.h b/interface/wx/treectrl.h
index 329ad6fe7a..1138f59d3f 100644
--- a/interface/wx/treectrl.h
+++ b/interface/wx/treectrl.h
@@ -185,7 +185,7 @@ public:
Window position.
If ::wxDefaultPosition is specified then a default position is chosen.
@param size
- Window size.
+ Window size.
If ::wxDefaultSize is specified then the window is sized appropriately.
@param style
Window style. See wxTreeCtrl.
@@ -470,7 +470,7 @@ public:
Returns the item last clicked or otherwise selected.
Unlike GetSelection(), it can be used whether or not
the control has the @c wxTR_MULTIPLE style.
-
+
@since 2.9.1
*/
virtual wxTreeItemId GetFocusedItem() const;
@@ -647,7 +647,7 @@ public:
/**
Returns the selection, or an invalid item if there is no selection. This
function only works with the controls without @c wxTR_MULTIPLE style,
- use GetSelections() for the controls which do have this style
+ use GetSelections() for the controls which do have this style
or, if a single item is wanted, use GetFocusedItem().
*/
virtual wxTreeItemId GetSelection() const;
diff --git a/interface/wx/treelist.h b/interface/wx/treelist.h
index 7be469dc9f..19633a3204 100644
--- a/interface/wx/treelist.h
+++ b/interface/wx/treelist.h
@@ -24,7 +24,7 @@ enum
Don't show the column headers.
By default this control shows the column headers, using this class
- allows to avoid this and show only the data.
+ allows avoiding this and showing only the data.
@since 2.9.5
*/
@@ -41,7 +41,7 @@ enum
/**
@class wxTreeListItem
-
+
Unique identifier of an item in wxTreeListCtrl.
This is an opaque class which can't be used by the application in any other
@@ -74,7 +74,7 @@ public:
/**
@class wxTreeListItemComparator
-
+
Class defining sort order for the items in wxTreeListCtrl.
@see wxTreeListCtrl
diff --git a/interface/wx/utils.h b/interface/wx/utils.h
index c981365e37..b4267d0f92 100644
--- a/interface/wx/utils.h
+++ b/interface/wx/utils.h
@@ -866,10 +866,10 @@ bool wxGetUserName(char* buf, int sz);
wxString wxGetOsDescription();
/**
- Gets the version and the operating system ID for currently running OS.
+ Gets the version and the operating system ID for currently running OS.
The returned wxOperatingSystemId value can be used for a basic categorization
- of the OS family; the major, minor, and micro version numbers allows to
- detect a specific system.
+ of the OS family; the major, minor, and micro version numbers allows
+ detecting a specific system.
If on Unix-like systems the version can't be detected all three version
numbers will have a value of -1.
@@ -885,8 +885,8 @@ wxString wxGetOsDescription();
For OS X systems (@c wxOS_MAC) the major and minor version integers are the
natural version numbers associated with the OS; e.g. "10", "11" and "2" if
the machine is using OS X El Capitan 10.11.2.
-
- For Windows-like systems (@c wxOS_WINDOWS) the major and minor version integers will
+
+ For Windows-like systems (@c wxOS_WINDOWS) the major and minor version integers will
contain the following values:
@beginTable
@row3col{Windows OS name , Major version , Minor version }
@@ -954,15 +954,15 @@ bool wxIsPlatformLittleEndian();
/**
Returns a structure containing information about the currently running
Linux distribution.
-
- This function uses the @c lsb_release utility which is part of the
- Linux Standard Base Core specification
- (see http://refspecs.linux-foundation.org/lsb.shtml) since the very first LSB
+
+ This function uses the @c lsb_release utility which is part of the
+ Linux Standard Base Core specification
+ (see http://refspecs.linux-foundation.org/lsb.shtml) since the very first LSB
release 1.0 (released in 2001).
The @c lsb_release utility is very common on modern Linux distributions but in
case it's not available, then this function will return a ::wxLinuxDistributionInfo
structure containing empty strings.
-
+
This function is Linux-specific and is only available when the @c __LINUX__
symbol is defined.
*/
@@ -1026,7 +1026,7 @@ enum
Always show the child process console under MSW.
The child console is hidden by default if the child IO is redirected,
- this flag allows to change this and show it nevertheless.
+ this flag allows changing this and showing it nevertheless.
This flag is ignored under the other platforms.
*/
diff --git a/interface/wx/validate.h b/interface/wx/validate.h
index 1096077019..f1eaddc0ad 100644
--- a/interface/wx/validate.h
+++ b/interface/wx/validate.h
@@ -81,7 +81,7 @@ public:
Returns if the error sound is currently disabled.
*/
static bool IsSilent();
-
+
/**
Associates a window with the validator.
diff --git a/interface/wx/valnum.h b/interface/wx/valnum.h
index 8bb6d6346d..0fb243b4f5 100644
--- a/interface/wx/valnum.h
+++ b/interface/wx/valnum.h
@@ -364,7 +364,7 @@ public:
/**
Creates a wxFloatingPointValidator object with automatic type deduction.
- Similarly to wxMakeIntegerValidator(), this function allows to avoid
+ Similarly to wxMakeIntegerValidator(), this function allows avoiding
explicitly specifying the validator type.
@since 2.9.2
diff --git a/interface/wx/valtext.h b/interface/wx/valtext.h
index 0102328ad4..de93979acc 100644
--- a/interface/wx/valtext.h
+++ b/interface/wx/valtext.h
@@ -9,8 +9,11 @@
/**
Styles used by wxTextValidator.
- Note that when you specify more styles in wxTextValidator the validation checks
- are performed in the order in which the styles of this enumeration are defined.
+ Notice that wxFILTER_EXCLUDE[_CHAR]_LIST pair can be used to document the
+ purpose of the validator only and are not enforced in the implementation of
+ the wxTextValidator. Therefore, calling the corresponding member functions:
+ wxTextValidator::{SetExcludes,SetCharExcludes}(), is enough to create the
+ desired validator.
*/
enum wxTextValidatorStyle
{
@@ -33,9 +36,11 @@ enum wxTextValidatorStyle
/// Non-alphanumeric characters are filtered out.
/// Uses the wxWidgets wrapper for the standard CRT function @c isalnum
/// (which is locale-dependent) on all characters of the string.
+ /// Equivalent to wxFILTER_ALPHA combined with wxFILTER_DIGITS or
+ /// wxFILTER_XDIGITS, or with both of them.
wxFILTER_ALPHANUMERIC,
- /// Non-numeric characters are filtered out.
+ /// Non-digit characters are filtered out.
/// Uses the wxWidgets wrapper for the standard CRT function @c isdigit
/// (which is locale-dependent) on all characters of the string.
wxFILTER_DIGITS,
@@ -50,19 +55,36 @@ enum wxTextValidatorStyle
/// the list, complaining if not. See wxTextValidator::SetIncludes().
wxFILTER_INCLUDE_LIST,
- /// Use an include list. The validator checks if each input character is
- /// in the list (one character per list element), complaining if not.
- /// See wxTextValidator::SetCharIncludes().
+ /// Use an include char list.
+ /// Characters in the include char list will be allowed to be in the
+ /// user input. See wxTextValidator::SetCharIncludes().
+ /// If this style is set with one or more of the following styles:
+ /// wxFILTER_ASCII, wxFILTER_ALPHA, wxFILTER_ALPHANUMERIC, wxFILTER_DIGITS,
+ /// wxFILTER_XDIGITS, wxFILTER_NUMERIC it just extends the character class
+ /// denoted by the aforementioned styles with those specified in the include
+ /// char list. If set alone, then the charactes allowed to be in the user input
+ /// are restricted to those, and only those, present in the include char list.
wxFILTER_INCLUDE_CHAR_LIST,
/// Use an exclude list. The validator checks if the user input is on
/// the list, complaining if it is. See wxTextValidator::SetExcludes().
wxFILTER_EXCLUDE_LIST,
- /// Use an exclude list. The validator checks if each input character is
- /// in the list (one character per list element), complaining if it is.
- /// See wxTextValidator::SetCharExcludes().
- wxFILTER_EXCLUDE_CHAR_LIST
+ /// Use an exclude char list.
+ /// Characters in the exclude char list won't be allowed to be in the
+ /// user input. See wxTextValidator::SetCharExcludes().
+ wxFILTER_EXCLUDE_CHAR_LIST,
+
+ /// Non-hexadecimal characters are filtered out.
+ /// Uses the wxWidgets wrapper for the standard CRT function @c isxdigit
+ /// (which is locale-dependent) on all characters of the string.
+ wxFILTER_XDIGITS,
+
+ /// A convenience flag for use with the other flags.
+ /// The space character is more often used with alphanumeric characters
+ /// which makes setting a flag more easier than calling SetCharIncludes(" ")
+ /// for that matter.
+ wxFILTER_SPACE
};
/**
@@ -83,7 +105,7 @@ class wxTextValidator : public wxValidator
{
public:
/**
- Default constructor.
+ Copy constructor.
*/
wxTextValidator(const wxTextValidator& validator);
@@ -106,14 +128,28 @@ public:
virtual wxObject* Clone() const;
/**
- Returns a reference to the exclude list (the list of invalid values).
+ Returns a copy of the exclude char list (the list of invalid characters).
+
+ @since 3.1.3
*/
- wxArrayString& GetExcludes();
+ wxString GetCharExcludes() const;
/**
- Returns a reference to the include list (the list of valid values).
+ Returns a copy of the include char list (the list of additional valid characters).
+
+ @since 3.1.3
*/
- wxArrayString& GetIncludes();
+ wxString GetCharIncludes() const;
+
+ /**
+ Returns a const reference to the exclude list (the list of invalid values).
+ */
+ const wxArrayString& GetExcludes() const;
+
+ /**
+ Returns a const reference to the include list (the list of valid values).
+ */
+ const wxArrayString& GetIncludes() const;
/**
Returns the validator style.
@@ -135,41 +171,81 @@ public:
/**
Sets the exclude list (invalid values for the user input).
+
+ @note Beware that exclusion takes priority over inclusion.
*/
void SetExcludes(const wxArrayString& stringList);
/**
- Breaks the given @a chars strings in single characters and sets the
- internal wxArrayString used to store the "excluded" characters
- (see SetExcludes()).
+ Sets the exclude char list (invalid characters for the user input).
- This function is mostly useful when @c wxFILTER_EXCLUDE_CHAR_LIST was used.
+ @note Beware that exclusion takes priority over inclusion.
+ @note This function may cancel the effect of @c wxFILTER_SPACE if the passed
+ in string @a chars contains the @b space character.
*/
void SetCharExcludes(const wxString& chars);
/**
Sets the include list (valid values for the user input).
+
+ @see IsIncluded()
*/
void SetIncludes(const wxArrayString& stringList);
/**
- Breaks the given @a chars strings in single characters and sets the
- internal wxArrayString used to store the "included" characters
- (see SetIncludes()).
+ Sets the include char list (additional valid values for the user input).
- This function is mostly useful when @c wxFILTER_INCLUDE_CHAR_LIST was used.
+ @note Any explicitly excluded characters will still be excluded even if
+ they're part of @a chars.
*/
void SetCharIncludes(const wxString& chars);
+ /**
+ Adds @a exclude to the list of excluded values.
+
+ @note Beware that exclusion takes priority over inclusion.
+
+ @since 3.1.3
+ */
+ void AddExclude(const wxString& exclude);
+
+ /**
+ Adds @a include to the list of included values.
+
+ @note Any explicitly excluded characters will still be excluded.
+
+ @since 3.1.3
+ */
+ void AddInclude(const wxString& include);
+
+ /**
+ Adds @a chars to the list of excluded characters.
+
+ @note Beware that exclusion takes priority over inclusion.
+
+ @since 3.1.3
+ */
+ void AddCharExcludes(const wxString& chars);
+
+ /**
+ Adds @a chars to the list of included characters.
+
+ @note Any explicitly excluded characters will still be excluded even if
+ they're part of @a chars.
+
+ @since 3.1.3
+ */
+ void AddCharIncludes(const wxString& chars);
+
+
/**
Sets the validator style which must be a combination of one or more
of the ::wxTextValidatorStyle values.
- Note that not all possible combinations make sense!
- Also note that the order in which the checks are performed is important,
- in case you specify more than a single style.
- wxTextValidator will perform the checks in the same definition order
- used in the ::wxTextValidatorStyle enumeration.
+ Note that not all possible combinations make sense! Also, some
+ combinations have shorter and more idiomatic alternative, e.g.
+ @c wxFILTER_ALPHANUMERIC can be used instead of
+ @c wxFILTER_ALPHA|wxFILTER_DIGITS.
*/
void SetStyle(long style);
@@ -189,24 +265,52 @@ public:
*/
virtual bool Validate(wxWindow* parent);
-protected:
-
- /**
- Returns @true if all the characters of the given @a val string
- are present in the include list (set by SetIncludes() or SetCharIncludes()).
- */
- bool ContainsOnlyIncludedCharacters(const wxString& val) const;
-
- /**
- Returns true if at least one character of the given @a val string
- is present in the exclude list (set by SetExcludes() or SetCharExcludes()).
- */
- bool ContainsExcludedCharacters(const wxString& val) const;
-
/**
Returns the error message if the contents of @a val are invalid
or the empty string if @a val is valid.
*/
virtual wxString IsValid(const wxString& val) const;
+
+protected:
+
+ /**
+ Returns @true if the char @a c is allowed to be in the user input string.
+ Additional characters, set by SetCharIncludes() or AddCharIncludes() are
+ also considered.
+
+ @since 3.1.3
+ */
+ bool IsCharIncluded(const wxUniChar& c) const;
+
+ /**
+ Returns @true if the char @a c is not allowed to be in the user input string.
+ (characters set by SetCharExcludes() or AddCharExcludes()).
+
+ @since 3.1.3
+ */
+ bool IsCharExcluded(const wxUniChar& c) const;
+
+ /**
+ Returns @true if the string @a str is one of the includes strings set by
+ SetIncludes() or AddInclude().
+
+ Notice that unless wxFILTER_INCLUDE_LIST is specified (in which case the
+ validator will complain if the user input is not on the list), the list
+ will be ignored and won't participate in the validation process.
+
+ @since 3.1.3
+ */
+ bool IsIncluded(const wxString& str) const;
+
+ /**
+ Returns @true if the string @a str is one of the excludes strings set by
+ SetExcludes() or AddExclude().
+
+ @since 3.1.3
+ */
+ bool IsExcluded(const wxString& str) const;
+
+ /// Returns false if the character @a c is invalid.
+ bool IsValidChar(const wxUniChar& c) const;
};
diff --git a/interface/wx/webview.h b/interface/wx/webview.h
index 103661f0e9..0b441b3d0b 100644
--- a/interface/wx/webview.h
+++ b/interface/wx/webview.h
@@ -107,6 +107,46 @@ enum wxWebViewNavigationActionFlags
wxWEBVIEW_NAV_ACTION_OTHER
};
+/**
+ Internet Explorer emulation modes for wxWebViewIE.
+
+ Elements of this enum can be used with wxWebView::MSWSetEmulationLevel().
+
+ Note that using the @c _FORCE variants is not recommended.
+
+ @since 3.1.3
+*/
+enum wxWebViewIE_EmulationLevel
+{
+ /**
+ Clear FEATURE_BROWSER_EMULATION registry setting to default,
+ corresponding application specific registry key will be deleted
+ */
+ wxWEBVIEWIE_EMU_DEFAULT = 0,
+
+ /** Prefer IE7 Standards mode, default value for the control. */
+ wxWEBVIEWIE_EMU_IE7 = 7000,
+
+ /** Prefer IE8 mode, default value for Internet Explorer 8. */
+ wxWEBVIEWIE_EMU_IE8 = 8000,
+ /** Force IE8 Standards mode, ignore !DOCTYPE directives. */
+ wxWEBVIEWIE_EMU_IE8_FORCE = 8888,
+
+ /** Prefer IE9 mode, default value for Internet Explorer 9. */
+ wxWEBVIEWIE_EMU_IE9 = 9000,
+ /** Force IE9 Standards mode, ignore !DOCTYPE directives. */
+ wxWEBVIEWIE_EMU_IE9_FORCE = 9999,
+
+ /** Prefer IE10 mode, default value for Internet Explorer 10. */
+ wxWEBVIEWIE_EMU_IE10 = 10000,
+ /** Force IE10 Standards mode, ignore !DOCTYPE directives. */
+ wxWEBVIEWIE_EMU_IE10_FORCE = 10001,
+
+ /** Prefer IE11 edge mode, default value for Internet Explorer 11. */
+ wxWEBVIEWIE_EMU_IE11 = 11000,
+ /** Force IE11 edge mode, ignore !DOCTYPE directives. */
+ wxWEBVIEWIE_EMU_IE11_FORCE = 11001
+};
/**
@class wxWebViewHistoryItem
@@ -233,7 +273,7 @@ public:
is only available for the MSW port. By default recent versions of the
WebBrowser
control, which this backend uses, emulate Internet Explorer 7. This can be
- changed with a registry setting, see
+ changed with a registry setting by wxWebView::MSWSetEmulationLevel() see
this article for more information. This backend has full support for
custom schemes and virtual file systems.
@@ -341,14 +381,14 @@ public:
/**
Factory function to create a new wxWebView with two-step creation,
wxWebView::Create should be called on the returned object.
- @param backend The backend web rendering engine to use.
+ @param backend The backend web rendering engine to use.
@c wxWebViewBackendDefault, @c wxWebViewBackendIE and
@c wxWebViewBackendWebKit are predefined where appropriate.
@return The created wxWebView
@since 2.9.5
*/
static wxWebView* New(const wxString& backend = wxWebViewBackendDefault);
-
+
/**
Factory function to create a new wxWebView using a wxWebViewFactory.
@param parent Parent window for the control
@@ -375,15 +415,15 @@ public:
long style = 0,
const wxString& name = wxWebViewNameStr);
- /**
+ /**
Allows the registering of new backend for wxWebView. @a backend can be
used as an argument to New().
@param backend The name for the new backend to be registered under
- @param factory A shared pointer to the factory which creates the
+ @param factory A shared pointer to the factory which creates the
appropriate backend.
@since 2.9.5
*/
- static void RegisterFactory(const wxString& backend,
+ static void RegisterFactory(const wxString& backend,
wxSharedPtr factory);
/**
@@ -475,32 +515,48 @@ public:
virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) = 0;
/**
- Sets emulation level to more modern level.
+ Sets emulation level.
- This function is useful to enable some minimally modern emulation level
- of the system browser control used for wxWebView implementation under
- MSW, rather than using the currently default, IE7-compatible,
- emulation level. Currently the modern emulation level is only IE8, but
- this could change in the future and shouldn't be relied on.
+ This function is useful to change the emulation level of
+ the system browser control used for wxWebView implementation under
+ MSW, rather than using the currently default, IE7-compatible, level.
Please notice that this function works by modifying the per-user part
of MSW registry, which has several implications: first, it is
sufficient to call it only once (per user) as the changes done by it
are persistent and, second, if you do not want them to be persistent,
- you need to call it with @false argument explicitly.
+ you need to call it with @c wxWEBVIEWIE_EMU_DEFAULT argument explicitly.
In particular, this function should be called to allow RunScript() to
work for JavaScript code returning arbitrary objects, which is not
supported at the default emulation level.
+ If set to a level higher than installed version, the highest available
+ level will be used instead. @c wxWEBVIEWIE_EMU_IE11 is recommended for
+ best performance and experience.
+
This function is MSW-specific and doesn't exist under other platforms.
See https://msdn.microsoft.com/en-us/library/ee330730#browser_emulation
for more information about browser control emulation levels.
- @param modernLevel @true to set level to a level modern enough to allow
- all wxWebView features to work (currently IE8), @false to reset the
- emulation level to its default, compatible value.
+ @param level the target emulation level
+ @return @true on success, @false on failure (a warning message is also
+ logged in the latter case).
+
+ @since 3.1.3
+ */
+ bool MSWSetEmulationLevel(wxWebViewIE_EmulationLevel level = wxWEBVIEWIE_EMU_IE11);
+
+ /**
+ @deprecated
+ This function is kept mostly for backwards compatibility.
+
+ Please explicitly specify emulation level with MSWSetEmulationLevel().
+
+ @param modernLevel @true to set level to IE8, synonym for @c wxWEBVIEWIE_EMU_IE8.
+ @false to reset the emulation level to its default,
+ synonym for @c wxWEBVIEWIE_EMU_DEFAULT.
@return @true on success, @false on failure (a warning message is also
logged in the latter case).
@@ -527,7 +583,7 @@ public:
wxString result;
if ( webview->RunScript
(
- "document.getElementById('some_id').innderHTML",
+ "document.getElementById('some_id').innerHTML",
&result
) )
{
@@ -556,7 +612,7 @@ public:
object-to-JSON conversion as a fallback for this case, however it is
not as full-featured, well-tested or performing as the implementation
of this functionality in the browser control itself, so it is
- recommended to use MSWSetModernEmulationLevel() to change emulation
+ recommended to use MSWSetEmulationLevel() to change emulation
level to a more modern one in which JSON conversion is done by the
control itself.
diff --git a/interface/wx/wfstream.h b/interface/wx/wfstream.h
index 27c1a3f406..4473f568c8 100644
--- a/interface/wx/wfstream.h
+++ b/interface/wx/wfstream.h
@@ -276,7 +276,7 @@ public:
/**
@class wxFFileStream
- This stream allows to both read from and write to a file using buffered
+ This stream allows both reading from and writing to a file using buffered
STDIO functions.
@library{wxbase}
diff --git a/interface/wx/window.h b/interface/wx/window.h
index 97184e1c28..18f7b7b9af 100644
--- a/interface/wx/window.h
+++ b/interface/wx/window.h
@@ -257,7 +257,7 @@ enum wxWindowVariant
@style{wxWS_EX_BLOCK_EVENTS}
wxCommandEvents and the objects of the derived classes are
forwarded to the parent window and so on recursively by default.
- Using this flag for the given window allows to block this
+ Using this flag for the given window allows blocking this
propagation at this window, i.e. prevent the events from being
propagated further upwards. Dialogs have this flag on by default
for the reasons explained in the @ref overview_events.
@@ -486,7 +486,7 @@ public:
container windows.
*/
virtual bool AcceptsFocusRecursively() const;
-
+
/**
Can this window itself have focus?
*/
@@ -494,7 +494,7 @@ public:
/**
Can this window have focus right now?
-
+
If this method returns true, it means that calling SetFocus() will
put focus either to this window or one of its children, if you need
to know whether this window accepts focus itself, use IsFocusable()
@@ -1410,7 +1410,7 @@ public:
InformFirstDirection(int direction,
int size,
int availableOtherDir);
-
+
/**
Resets the cached best size value so it will be recalculated the next time it
is needed.
@@ -1793,7 +1793,7 @@ public:
wxRect GetClientRect() const;
-
+
/**
Moves the window to the given position.
@@ -2834,6 +2834,14 @@ public:
disabled, all of its children are disabled as well and they are reenabled again
when the parent is.
+ A window can be created initially disabled by calling this method on it
+ @e before calling Create() to create the actual underlying window, e.g.
+ @code
+ wxWindow* w = new MyWindow(); // Note: default ctor is used here.
+ w->Enable(false);
+ w->Create(parent, ... all the usual non-default ctor arguments ...);
+ @endcode
+
@param enable
If @true, enables the window for input. If @false, disables the window.
@@ -3601,7 +3609,7 @@ public:
*/
wxBorder GetBorder() const;
-
+
/**
Does the window-specific updating after processing the update event.
This function is called by UpdateWindowUI() in order to check return
@@ -3713,7 +3721,7 @@ public:
*/
virtual bool IsTopLevel() const;
-
+
/**
This virtual function is normally only used internally, but
sometimes an application may need it to implement functionality
diff --git a/interface/wx/withimages.h b/interface/wx/withimages.h
index a52104a2ab..3adc3e0d84 100644
--- a/interface/wx/withimages.h
+++ b/interface/wx/withimages.h
@@ -28,7 +28,7 @@ public:
/**
Sets the image list to use. It does not take ownership of the image
list, you must delete it yourself.
-
+
@see wxImageList, AssignImageList()
*/
virtual void SetImageList(wxImageList* imageList);
@@ -39,7 +39,7 @@ public:
@see wxImageList, SetImageList()
*/
wxImageList* GetImageList() const;
-
+
protected:
/**
Return true if we have a valid image list.
diff --git a/interface/wx/wrapsizer.h b/interface/wx/wrapsizer.h
index 61bc160bb3..302da9643f 100644
--- a/interface/wx/wrapsizer.h
+++ b/interface/wx/wrapsizer.h
@@ -58,7 +58,7 @@ public:
*/
virtual bool InformFirstDirection(int direction, int size,
int availableOtherDir);
-
+
virtual void RecalcSizes();
virtual wxSize CalcMin();
diff --git a/interface/wx/xlocale.h b/interface/wx/xlocale.h
index 21481dccf7..da67f0b127 100644
--- a/interface/wx/xlocale.h
+++ b/interface/wx/xlocale.h
@@ -49,7 +49,7 @@
@stdobjects
@li ::wxNullXLocale
-
+
@see wxLocale
*/
class wxXLocale
@@ -85,7 +85,7 @@ public:
or @false otherwise.
*/
bool IsOk() const;
-
+
/**
Comparison operator.
*/
diff --git a/interface/wx/xml/xml.h b/interface/wx/xml/xml.h
index 30eb28763b..08cd68335f 100644
--- a/interface/wx/xml/xml.h
+++ b/interface/wx/xml/xml.h
@@ -886,7 +886,7 @@ public:
void SetEncoding(const wxString& enc);
/**
- Sets the enconding of the file which will be used to save the document.
+ Sets the encoding of the file which will be used to save the document.
*/
void SetFileEncoding(const wxString& encoding);
diff --git a/lib/vms.opt b/lib/vms.opt
index abc3ca3c52..a589086c99 100644
--- a/lib/vms.opt
+++ b/lib/vms.opt
@@ -2,7 +2,7 @@ wx_root:[wxwidgets.lib]libwx_motif.olb/lib
sys$library:libjpeg.olb/lib
sys$library:libpng.olb/lib
sys$library:libz.olb/lib
-sys$library:tiff.olb/lib
+sys$share:tiff$shr/share
X11:libxpm.olb/lib
sys$library:decw$xextlibshr.exe/share
sys$library:decw$xlibshr.exe/share
diff --git a/lib/vms_gtk.opt b/lib/vms_gtk.opt
index 1246be9681..d38927153e 100644
--- a/lib/vms_gtk.opt
+++ b/lib/vms_gtk.opt
@@ -3,7 +3,7 @@ sys$library:gthread.obj
sys$library:libjpeg.olb/lib
sys$library:libpng.olb/lib
sys$library:libz.olb/lib
-sys$library:tiff.olb/lib
+sys$share:tiff$shr/share
sys$library:expat.olb/lib
X11:libxpm.olb/lib
sys$share:libgtk.exe/share
diff --git a/lib/vms_gtk2.opt b/lib/vms_gtk2.opt
index 4edff31f42..ecb88e5bbb 100644
--- a/lib/vms_gtk2.opt
+++ b/lib/vms_gtk2.opt
@@ -4,7 +4,7 @@ sys$library:libpixman.olb/lib
sys$library:libjpeg.olb/lib
sys$library:libpng.olb/lib
sys$library:libz.olb/lib
-sys$library:tiff.olb/lib
+sys$share:tiff$shr/share
X11:libxpm.olb/lib
sys$library:expat.olb/lib
sys$share:libgtk2.exe/share
diff --git a/lib/vms_x11_univ.opt b/lib/vms_x11_univ.opt
index 36680e33c0..dcf95c810a 100644
--- a/lib/vms_x11_univ.opt
+++ b/lib/vms_x11_univ.opt
@@ -4,7 +4,7 @@ sys$library:libpixman.olb/lib
sys$library:libjpeg.olb/lib
sys$library:libpng.olb/lib
sys$library:libz.olb/lib
-sys$library:tiff.olb/lib
+sys$share:tiff$shr/share
sys$library:expat.olb/lib
X11:libxpm.olb/lib
sys$share:freetype2shr/share
diff --git a/locale/hr.po b/locale/hr.po
new file mode 100644
index 0000000000..4be234004c
--- /dev/null
+++ b/locale/hr.po
@@ -0,0 +1,8860 @@
+# Croatian translations for wxWidgets
+# Copyright (C) 2019 wxWidgets
+# This file is distributed under the same license as the wxWidgets package.
+# Milo Ivir , 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.1.x\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-05-21 14:25+0200\n"
+"PO-Revision-Date: 2019-03-10 17:42+0100\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
+"X-Generator: Poedit 2.2.1\n"
+"Last-Translator: Milo Ivir \n"
+"Language: hr\n"
+
+#: ../src/common/debugrpt.cpp:586
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Molimo te da ovaj izvještaj pošalješ održavatelju aplikacije. Hvala!\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid " Thank you and we're sorry for the inconvenience!\n"
+msgstr " Hvala, i žao nam je zbog nastalih neugodnosti!\n"
+
+#: ../src/common/prntbase.cpp:573
+#, c-format
+msgid " (copy %d of %d)"
+msgstr " (kopija %d od %d)"
+
+#: ../src/common/log.cpp:421
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (greška %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:72
+#, c-format
+msgid " (in module \"%s\")"
+msgstr " (u modulu \"%s\")"
+
+#: ../src/osx/core/secretstore.cpp:138
+msgid " (while overwriting an existing item)"
+msgstr " (prilikom prepisivanja preko postojeće stavke)"
+
+#: ../src/common/docview.cpp:1642
+msgid " - "
+msgstr " – "
+
+#: ../src/richtext/richtextprint.cpp:593 ../src/html/htmprint.cpp:714
+msgid " Preview"
+msgstr " Pregled"
+
+#: ../src/common/fontcmn.cpp:824
+msgid " bold"
+msgstr " debeli"
+
+#: ../src/common/fontcmn.cpp:840
+msgid " italic"
+msgstr " kurziv"
+
+#: ../src/common/fontcmn.cpp:820
+msgid " light"
+msgstr " svjetli"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " strikethrough"
+msgstr " precrtano"
+
+#: ../src/common/paper.cpp:117
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "#10 kuverta, 4 1/8 × 9 1/2 in"
+
+#: ../src/common/paper.cpp:118
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "#11 kuverta, 4 1/2 × 10 3/8 in"
+
+#: ../src/common/paper.cpp:119
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "#12 kuverta, 4 3/4 × 11 in"
+
+#: ../src/common/paper.cpp:120
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "#14 kuverta, 5 × 11 1/2 in"
+
+#: ../src/common/paper.cpp:116
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "#9 kuverta, 3 7/8 × 8 7/8 in"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "%"
+msgstr "%"
+
+#: ../src/html/helpwnd.cpp:1031
+#, c-format
+msgid "%d of %lu"
+msgstr "%d od %lu"
+
+#: ../src/html/helpwnd.cpp:1678
+#, c-format
+msgid "%i of %u"
+msgstr "%i od %u"
+
+#: ../src/generic/filectrlg.cpp:279
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld bajt"
+msgstr[1] "%ld bajta"
+msgstr[2] "%ld bajtova"
+
+#: ../src/html/helpwnd.cpp:1033
+#, c-format
+msgid "%lu of %lu"
+msgstr "%lu od %lu"
+
+#: ../src/generic/datavgen.cpp:6028
+#, c-format
+msgid "%s (%d items)"
+msgstr "%s (%d stavki)"
+
+#: ../src/common/cmdline.cpp:1221
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (ili %s)"
+
+#: ../src/generic/logg.cpp:224
+#, c-format
+msgid "%s Error"
+msgstr "%s greška"
+
+#: ../src/generic/logg.cpp:236
+#, c-format
+msgid "%s Information"
+msgstr "%s informacija"
+
+#: ../src/generic/preferencesg.cpp:113
+#, c-format
+msgid "%s Preferences"
+msgstr "%s postavke"
+
+#: ../src/generic/logg.cpp:228
+#, c-format
+msgid "%s Warning"
+msgstr "%s upozorenje"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s ne paše tar zaglavlju za unos '%s'"
+
+#: ../src/common/fldlgcmn.cpp:124
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s datoteka (%s)|%s"
+
+#: ../src/html/helpwnd.cpp:1716
+#, c-format
+msgid "%u of %u"
+msgstr "%u od %u"
+
+#: ../src/common/stockitem.cpp:139
+msgid "&About"
+msgstr "&O programu"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "&Stvarna veličina"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "&Nakon odlomka:"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "%Poravnanje"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "&Primijeni"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "&Primijeni stil"
+
+#: ../src/msw/mdi.cpp:179
+msgid "&Arrange Icons"
+msgstr "&Rasporedi ikone"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "&Uzlazno"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Natrag"
+
+#: ../src/richtext/richtextstylepage.cpp:115
+msgid "&Based on:"
+msgstr "&Bazirano na:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "&Prije odlomka:"
+
+#: ../src/richtext/richtextfontpage.cpp:262
+msgid "&Bg colour:"
+msgstr "Boja &pozadine:"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:298
+msgid "&Blur distance:"
+msgstr "Udaljenost &mutnoće:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Debeli"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "&Dolje"
+
+#: ../src/richtext/richtextborderspage.cpp:345
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextmarginspage.cpp:259
+#: ../src/richtext/richtextmarginspage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr "&Dolje:"
+
+#: ../include/wx/richtext/richtextbuffer.h:3866
+msgid "&Box"
+msgstr "&Okvir"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:146
+msgid "&Bullet style:"
+msgstr "_Stil&Stil znaka nabrajanja:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "&CD-Rom"
+
+#: ../src/generic/wizard.cpp:434 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:402
+#: ../src/common/dlgcmn.cpp:279 ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "&Odustani"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Cascade"
+msgstr "&Kaskada"
+
+#: ../include/wx/richtext/richtextbuffer.h:5960
+msgid "&Cell"
+msgstr "&Ćelija"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "&Slovni znak:"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "&Ukloni"
+
+#: ../src/generic/logg.cpp:516 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1600 ../src/univ/themes/win32.cpp:3756
+msgid "&Close"
+msgstr "&Zatvori"
+
+#: ../src/common/stockitem.cpp:193
+msgid "&Color"
+msgstr "&Boja"
+
+#: ../src/richtext/richtextfontpage.cpp:249
+msgid "&Colour:"
+msgstr "&Boja:"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "&Pretvori"
+
+#: ../src/richtext/richtextctrl.cpp:333 ../src/osx/textctrl_osx.cpp:577
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2508
+msgid "&Copy"
+msgstr "&Kopiraj"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "&Kopiraj URL"
+
+#: ../src/common/headerctrlcmn.cpp:306
+msgid "&Customize..."
+msgstr "&Prilagodi …"
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "Pregled izvještaja o otklanjanju grešaka:"
+
+#: ../src/richtext/richtexttabspage.cpp:138 ../src/richtext/richtextctrl.cpp:335
+#: ../src/osx/textctrl_osx.cpp:579 ../src/common/stockitem.cpp:152
+#: ../src/msw/textctrl.cpp:2510
+msgid "&Delete"
+msgstr "&Izbriši"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "&Izbriši stil …"
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "&Silazno"
+
+#: ../src/generic/logg.cpp:682
+msgid "&Details"
+msgstr "&Detalji"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "&Dolje"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "&Uredi"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "&Uredi stil …"
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "&Izvrši"
+
+#: ../src/common/stockitem.cpp:157
+msgid "&File"
+msgstr "&Datoteka"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Nađi"
+
+#: ../src/generic/wizard.cpp:632
+msgid "&Finish"
+msgstr "&Završi"
+
+#: ../src/common/stockitem.cpp:159
+msgid "&First"
+msgstr "&Prvi"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr "&Lebdeći modus:"
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "&Floppy"
+
+#: ../src/common/stockitem.cpp:194
+msgid "&Font"
+msgstr "&Font"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "&Font obitelj:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Font za razinu …"
+
+#: ../src/richtext/richtextfontpage.cpp:147
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Font:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "&Naprijed"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "&Od:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "Čvrsti &disk"
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+msgid "&Height:"
+msgstr "&Visina:"
+
+#: ../src/generic/wizard.cpp:441 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:734
+#: ../src/common/stockitem.cpp:163
+msgid "&Help"
+msgstr "&Pomoć"
+
+#: ../include/wx/richmsgdlg.h:30
+msgid "&Hide details"
+msgstr "&Sakrij detalje"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Početna"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:212
+msgid "&Horizontal offset:"
+msgstr "&Vodoravni odmak:"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "Uvlaka (u destinkama mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Neodredi"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "&Indeks"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "&Informacije"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Kurziv"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "&Prijeđi na"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Poravnato"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "&Zadnji"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "&Lijevo"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:243
+#: ../src/richtext/richtextborderspage.cpp:411
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:186
+#: ../src/richtext/richtextmarginspage.cpp:300
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "&Lijevo:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "&Prva razine:"
+
+#: ../src/generic/logg.cpp:517
+msgid "&Log"
+msgstr "&Log"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Premjesti"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr "&Premjesti objekt u:"
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "&Mreža"
+
+#: ../src/richtext/richtexttabspage.cpp:132 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Nova"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100 ../src/msw/mdi.cpp:180
+msgid "&Next"
+msgstr "&Sljedeće"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/wizard.cpp:632
+msgid "&Next >"
+msgstr "&Sljedeće >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "&Next Paragraph"
+msgstr "&Sljedeći odlomak"
+
+#: ../src/generic/tipdlg.cpp:240
+msgid "&Next Tip"
+msgstr "&Sljedeći savjet"
+
+#: ../src/richtext/richtextstylepage.cpp:125
+msgid "&Next style:"
+msgstr "&Sljedeći stil:"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:441
+msgid "&No"
+msgstr "&Ne"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "&Napomene:"
+
+#: ../src/richtext/richtextbulletspage.cpp:251
+msgid "&Number:"
+msgstr "&Broj:"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:408 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&U redu"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+msgid "&Open..."
+msgstr "&Otvori …"
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "&Razina pregleda:"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr "&Prijelom stranice"
+
+#: ../src/richtext/richtextctrl.cpp:334 ../src/osx/textctrl_osx.cpp:578
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2509
+msgid "&Paste"
+msgstr "&Zalijepi"
+
+#: ../include/wx/richtext/richtextbuffer.h:5010
+msgid "&Picture"
+msgstr "&Slika"
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "&Veličina:"
+
+#: ../src/richtext/richtexttabspage.cpp:110
+msgid "&Position (tenths of a mm):"
+msgstr "&Pozicija (u desetinkama mm)"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+msgid "&Position mode:"
+msgstr "&Modus pozicije:"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Postavke"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101 ../src/msw/mdi.cpp:181
+msgid "&Previous"
+msgstr "&Prethodno"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+msgid "&Previous Paragraph"
+msgstr "&Prethodni odlomak"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Ispiši …"
+
+#: ../src/richtext/richtextctrl.cpp:339 ../src/richtext/richtextctrl.cpp:5514
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Svojstva"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "&Zatvori"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:574
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2505
+msgid "&Redo"
+msgstr "&Ponovi"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Ponovi "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "&Preimenuj stil …"
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Zamijeni"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "&Ponovi numeriranje"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Obnovi"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "&Desno"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:277
+#: ../src/richtext/richtextborderspage.cpp:445
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:211
+#: ../src/richtext/richtextmarginspage.cpp:325
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "&Desno:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "&Spremi"
+
+#: ../src/common/stockitem.cpp:191
+msgid "&Save as"
+msgstr "&Spremi pod"
+
+#: ../include/wx/richmsgdlg.h:29
+msgid "&See details"
+msgstr "Prikaži detalje"
+
+#: ../src/generic/tipdlg.cpp:236
+msgid "&Show tips at startup"
+msgstr "&Prikaži savjete prilikom pokretanja"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Veličina"
+
+#: ../src/richtext/richtextfontpage.cpp:159
+msgid "&Size:"
+msgstr "&Veličina:"
+
+#: ../src/generic/progdlgg.cpp:252
+msgid "&Skip"
+msgstr "&Preskoči"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "&Spacioniranje (u desetinkama mm)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "Provjera pravopisa"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Zaustavi"
+
+#: ../src/richtext/richtextfontpage.cpp:275 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "&Precrtano"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:106
+msgid "&Style:"
+msgstr "&Stil:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "&Stilovi:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "&Podskupina:"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:209
+msgid "&Symbol:"
+msgstr "&Simbol:"
+
+#: ../src/richtext/richtextborderspage.cpp:381
+#: ../src/richtext/richtextborderspage.cpp:549
+msgid "&Synchronize values"
+msgstr "&Sinkroniziraj vrijednosti"
+
+#: ../include/wx/richtext/richtextbuffer.h:6069
+msgid "&Table"
+msgstr "&Tablica"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "&Gore"
+
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:479
+#: ../src/richtext/richtextmarginspage.cpp:234
+#: ../src/richtext/richtextmarginspage.cpp:348
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+msgid "&Top:"
+msgstr "&Gore:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "&Podcrtaj"
+
+#: ../src/richtext/richtextfontpage.cpp:234
+msgid "&Underlining:"
+msgstr "&Podcrtavanje:"
+
+#: ../src/richtext/richtextctrl.cpp:329 ../src/osx/textctrl_osx.cpp:573
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2504
+msgid "&Undo"
+msgstr "&Poništi"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Poništi "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "&Ukloni uvlaku"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "&Gore"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+msgid "&Vertical alignment:"
+msgstr "&Uspravno poravnanje:"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:235
+msgid "&Vertical offset:"
+msgstr "&Uspravni odmak:"
+
+#: ../src/generic/dbgrptg.cpp:340
+msgid "&View..."
+msgstr "&Prikaz …"
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Debljina:"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+msgid "&Width:"
+msgstr "&Širina:"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327 ../src/aui/tabmdi.cpp:329
+#: ../src/generic/mdig.cpp:294 ../src/generic/mdig.cpp:310
+#: ../src/generic/mdig.cpp:314 ../src/msw/mdi.cpp:78
+msgid "&Window"
+msgstr "&Prozor"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:441
+msgid "&Yes"
+msgstr "&Da"
+
+#: ../src/common/valtext.cpp:256
+#, c-format
+msgid "'%s' contains illegal characters"
+msgstr "'%s' sadržava nedozvoljene slovne znakove"
+
+#: ../src/common/valtext.cpp:254
+#, c-format
+msgid "'%s' doesn't consist only of valid characters"
+msgstr "'%s' ne sadržava samo dozvoljene slovne znakove"
+
+#: ../src/common/config.cpp:519 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' ima dodatne '..', zanemareno."
+
+#: ../src/common/cmdline.cpp:1113 ../src/common/cmdline.cpp:1131
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' nije ispravna numerička vrijednost za opciju '%s'."
+
+#: ../src/common/translation.cpp:1100
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' nije valjani katalog obavijesti."
+
+#: ../src/common/valtext.cpp:165
+#, c-format
+msgid "'%s' is not one of the valid strings"
+msgstr "'%s' nije jedan od valjanih znakovnih nizova"
+
+#: ../src/common/valtext.cpp:167
+#, c-format
+msgid "'%s' is one of the invalid strings"
+msgstr "'%s' je jedan od valjanih znakovnih nizova"
+
+#: ../src/common/textbuf.cpp:237
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' je vjerojatno jedan binarni međuspremnik."
+
+#: ../src/common/valtext.cpp:252
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' treba biti numerički."
+
+#: ../src/common/valtext.cpp:244
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' treba sadržavati samo ASCII slovne znakove."
+
+#: ../src/common/valtext.cpp:246
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' treba sadržavati samo alfabetne slovne znakove."
+
+#: ../src/common/valtext.cpp:248
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' treba sadržavati samo alfabetne ili numeričke slovne znakove."
+
+#: ../src/common/valtext.cpp:250
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' treba sadržavati samo brojke."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:963
+msgid "(Help)"
+msgstr "(pomoć)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:273
+msgid "(None)"
+msgstr "(Bez)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Normalan tekst)"
+
+#: ../src/html/helpwnd.cpp:419 ../src/html/helpwnd.cpp:1106
+#: ../src/html/helpwnd.cpp:1742
+msgid "(bookmarks)"
+msgstr "(knjižne oznake)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:884
+#: ../src/richtext/richtextfontpage.cpp:349
+#: ../src/richtext/richtextfontpage.cpp:353
+#: ../src/richtext/richtextfontpage.cpp:357
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(bez)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:284
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:173
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1152
+msgid ", 64-bit edition"
+msgstr ", 64-bitno izdanje"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:285
+msgid "-"
+msgstr "–"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr "…"
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:140
+msgid "10 x 11 in"
+msgstr "10 × 11 in"
+
+#: ../src/common/paper.cpp:113
+msgid "10 x 14 in"
+msgstr "10 × 14 in"
+
+#: ../src/common/paper.cpp:114
+msgid "11 x 17 in"
+msgstr "11 × 17 in"
+
+#: ../src/common/paper.cpp:184
+msgid "12 x 11 in"
+msgstr "12 × 11 in"
+
+#: ../src/common/paper.cpp:141
+msgid "15 x 11 in"
+msgstr "15 × 11 in"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:132
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "6 3/4 kuverta, 3 5/8 × 6 1/2 in"
+
+#: ../src/common/paper.cpp:139
+msgid "9 x 11 in"
+msgstr "9 × 11 in"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": datoteka ne postoji!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": nepoznata kodna stranica"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": nepoznato kodiranje"
+
+#: ../src/generic/wizard.cpp:443
+msgid "< &Back"
+msgstr "< &Natrag"
+
+#: ../src/osx/carbon/fontdlg.cpp:422 ../src/osx/carbon/fontdlg.cpp:628
+#: ../src/osx/carbon/fontdlg.cpp:648
+msgid ""
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:423 ../src/osx/carbon/fontdlg.cpp:630
+#: ../src/osx/carbon/fontdlg.cpp:650
+msgid ""
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:421 ../src/osx/carbon/fontdlg.cpp:626
+#: ../src/osx/carbon/fontdlg.cpp:646
+msgid ""
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:424 ../src/osx/carbon/fontdlg.cpp:632
+#: ../src/osx/carbon/fontdlg.cpp:652
+msgid ""
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:425 ../src/osx/carbon/fontdlg.cpp:637
+#: ../src/osx/carbon/fontdlg.cpp:656
+msgid ""
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:426 ../src/osx/carbon/fontdlg.cpp:634
+#: ../src/osx/carbon/fontdlg.cpp:654
+msgid ""
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:420
+msgid ""
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:250 ../src/generic/filectrlg.cpp:273
+msgid ""
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:254 ../src/generic/filectrlg.cpp:277
+msgid ""
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:252 ../src/generic/filectrlg.cpp:275
+msgid " "
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:1266
+msgid "Bold italic face. "
+msgstr "Debeli kurzivni rez. "
+
+#: ../src/html/helpwnd.cpp:1270
+msgid "bold italic underlined "
+msgstr "debeli kurziv podcrtano "
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "Bold face. "
+msgstr "Debeli rez. "
+
+#: ../src/html/helpwnd.cpp:1264
+msgid "Italic face. "
+msgstr "Kurzivni rez. "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Izvještaj o otklanjanju grešaka je stvoren u mapi\n"
+
+#: ../src/common/debugrpt.cpp:573
+msgid "A debug report has been generated. It can be found in"
+msgstr "Izvještaj o otklanjanju grešaka je stvoren. Nalazi se u"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Ne prazna kolekcija mora sadržavati 'element' čvorove"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:244
+#: ../src/richtext/richtextbulletspage.cpp:246
+msgid "A standard bullet name."
+msgstr "Standardno ime znaka nabrajanja."
+
+#: ../src/common/paper.cpp:217
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "A0 arak, 841 × 1189 mm"
+
+#: ../src/common/paper.cpp:218
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "A1 arak, 594 × 841 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 × 594 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 ekstra 322 × 445 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 ekstra poprečno 322 × 445 mm"
+
+#: ../src/common/paper.cpp:170
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 rotirano 420 × 297 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 poprečno 297 × 420 mm"
+
+#: ../src/common/paper.cpp:106
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "A3 sheet, 297 × 420 mm"
+
+#: ../src/common/paper.cpp:146
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 ekstra 9.27 × 12.69 in"
+
+#: ../src/common/paper.cpp:153
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 plus 210 × 330 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 rotirano 297 × 210 mm"
+
+#: ../src/common/paper.cpp:148
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 poprečno 210 × 297 mm"
+
+#: ../src/common/paper.cpp:97
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "A4 arak, 210 × 297 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "A4 mali arak, 210 × 297 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 ekstra 174 × 235 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 rotirano 210 × 148 mm"
+
+#: ../src/common/paper.cpp:154
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 poprečno 148 × 210 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "A5 arak, 148 × 210 mm"
+
+#: ../src/common/paper.cpp:164
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 × 148 mm"
+
+#: ../src/common/paper.cpp:177
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 rotirano 148 × 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:529
+#: ../src/osx/carbon/fontdlg.cpp:153
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABĆĐEŠGabčdežg12345"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:403
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/common/stockitem.cpp:139
+msgid "About"
+msgstr "O programu"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/osx/menu_osx.cpp:558
+#: ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "O programu %su"
+
+#: ../src/osx/menu_osx.cpp:560
+msgid "About..."
+msgstr "O programu …"
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr "Apsolutno"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:873
+msgid "ActiveBorder"
+msgstr "ActiveBorder"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:874
+msgid "ActiveCaption"
+msgstr "ActiveCaption"
+
+#: ../src/common/stockitem.cpp:207
+msgid "Actual Size"
+msgstr "Stvarna veličina"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/stockitem.cpp:140 ../src/common/accelcmn.cpp:81
+msgid "Add"
+msgstr "Add"
+
+#: ../src/richtext/richtextbuffer.cpp:11455
+msgid "Add Column"
+msgstr "Dodaj stupac"
+
+#: ../src/richtext/richtextbuffer.cpp:11392
+msgid "Add Row"
+msgstr "Dodaj red"
+
+#: ../src/html/helpwnd.cpp:432
+msgid "Add current page to bookmarks"
+msgstr "Dodaj trenutačnu stranicu u knjižne oznake"
+
+#: ../src/generic/colrdlgg.cpp:366
+msgid "Add to custom colours"
+msgstr "Dodaj proizvoljnu boju"
+
+#: ../include/wx/xtiprop.h:255
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "AddToPropertyCollection je pozvano na generički pristupnik"
+
+#: ../include/wx/xtiprop.h:193
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "AddToPropertyCollection je pozvano bez valjanog dodavača"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "Dodavanje knjige %s"
+
+#: ../src/common/preferencescmn.cpp:43
+msgid "Advanced"
+msgstr "Napredno"
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Nakon odlomka:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Poravnaj u lijevo"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Poravnaj u desno"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+msgid "Alignment"
+msgstr "Poravnanje"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Sve"
+
+#: ../src/generic/filectrlg.cpp:1197 ../src/common/fldlgcmn.cpp:107
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Sve datoteke (%s)|%s"
+
+#: ../include/wx/defs.h:2886
+msgid "All files (*)|*"
+msgstr "Sve datoteke (*)|*"
+
+#: ../include/wx/defs.h:2883
+msgid "All files (*.*)|*.*"
+msgstr "Sve datoteke (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+msgid "All styles"
+msgstr "Svi stilovi"
+
+#: ../src/propgrid/manager.cpp:1528
+msgid "Alphabetic Mode"
+msgstr "Slovni modus"
+
+#: ../src/common/xtistrm.cpp:425
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "Već registrirani objekt je proslijeđen na SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "Već se bira ISP."
+
+#: ../src/common/accelcmn.cpp:331 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr "Alt+"
+
+#: ../src/richtext/richtextborderspage.cpp:577
+#: ../src/richtext/richtextborderspage.cpp:579
+msgid "An optional corner radius for adding rounded corners."
+msgstr "Opcionalni polumjer kuta za dodavanje zaobljenih kutova."
+
+#: ../src/common/debugrpt.cpp:576
+msgid "And includes the following files:\n"
+msgstr "I sadržava sljedeće datoteke:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Datoteka animacije nije vrste %ld."
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:872
+msgid "AppWorkspace"
+msgstr "AppWorkspace"
+
+#: ../src/generic/logg.cpp:1014
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr "Pridodaj log-zapis datoteci '%s' (odabirom [Ne] će biti prepisana)?"
+
+#: ../src/osx/menu_osx.cpp:577 ../src/osx/menu_osx.cpp:585
+msgid "Application"
+msgstr "Aplikacija"
+
+#: ../src/common/stockitem.cpp:141
+msgid "Apply"
+msgstr "Primijeni"
+
+#: ../src/propgrid/advprops.cpp:1609
+msgid "Aqua"
+msgstr "Plavkasta"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:274
+msgid "Arabic"
+msgstr "Arapski"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Arapski (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:672
+#, c-format
+msgid "Argument %u not found."
+msgstr "Argument %u nije nađen."
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1753
+msgid "Arrow"
+msgstr "Strelica"
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr "Umjetnici"
+
+#: ../src/common/stockitem.cpp:195
+msgid "Ascending"
+msgstr "Uzlazno"
+
+#: ../src/generic/filectrlg.cpp:433
+msgid "Attributes"
+msgstr "Svojstva"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:232
+#: ../src/richtext/richtextbulletspage.cpp:234
+msgid "Available fonts."
+msgstr "Dostupni fontovi."
+
+#: ../src/common/paper.cpp:137
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 × 353 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) rotirano 364 × 257 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "B4 kuverta, 250 × 353 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "B4 arak, 250 × 354 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) ekstra 201 × 276 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) rotirano 257 × 182 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) poprečno 182 × 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "B5 kuverta, 176 × 250 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "B5 arak, 182 × 257 millimeter"
+
+#: ../src/common/paper.cpp:182
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 × 182 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) rotirano 182 × 128 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "B6 kuverta, 176 × 125 mm"
+
+#: ../src/common/imagbmp.cpp:531 ../src/common/imagbmp.cpp:561
+#: ../src/common/imagbmp.cpp:576
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: Nije bilo moguće alocirati memoriju."
+
+#: ../src/common/imagbmp.cpp:100
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: Nije bilo moguće spremiti nevaljanu sliku."
+
+#: ../src/common/imagbmp.cpp:356
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: Nije bilo moguće zapisati RGB mapu boja."
+
+#: ../src/common/imagbmp.cpp:490
+msgid "BMP: Couldn't write data."
+msgstr "BMP: Nije bilo moguće zapisati podatke."
+
+#: ../src/common/imagbmp.cpp:246
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Nije bilo moguće zapisati zaglavlje (bitmap) datoteke."
+
+#: ../src/common/imagbmp.cpp:269
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: Nije bilo moguće zapisati zaglavlje (bitmapinfo) datoteke."
+
+#: ../src/common/imagbmp.cpp:140
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage nema vlastitu wxPalette."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/stockitem.cpp:142 ../src/common/accelcmn.cpp:52
+msgid "Back"
+msgstr "Back"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:148
+#: ../src/richtext/richtextformatdlg.cpp:384
+msgid "Background"
+msgstr "Pozadina"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:160
+msgid "Background &colour:"
+msgstr "&Boja pozadine:"
+
+#: ../src/osx/carbon/fontdlg.cpp:220
+msgid "Background colour"
+msgstr "Boja pozadine"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:52
+msgid "Backspace"
+msgstr "Backspace"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Baltički (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Baltički (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Prije odlomka:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:281
+msgid "Bitmap"
+msgstr "Bitmap"
+
+#: ../src/propgrid/advprops.cpp:1594
+msgid "Black"
+msgstr "Crna"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1755
+msgid "Blank"
+msgstr "Prazno"
+
+#: ../src/propgrid/advprops.cpp:1603
+msgid "Blue"
+msgstr "Plava"
+
+#: ../src/generic/colrdlgg.cpp:345
+msgid "Blue:"
+msgstr "Plava:"
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:355
+#: ../src/osx/carbon/fontdlg.cpp:354 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Debeli"
+
+#: ../src/richtext/richtextborderspage.cpp:230
+#: ../src/richtext/richtextborderspage.cpp:388
+msgid "Border"
+msgstr "Obrub"
+
+#: ../src/richtext/richtextformatdlg.cpp:379
+msgid "Borders"
+msgstr "Obrubi"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr "Dolje"
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Donja margina (mm):"
+
+#: ../src/richtext/richtextbuffer.cpp:9383
+msgid "Box Properties"
+msgstr "Svojstva okvira"
+
+#: ../src/richtext/richtextstyles.cpp:1065
+msgid "Box styles"
+msgstr "Stil okvira"
+
+#: ../src/propgrid/advprops.cpp:1602
+msgid "Brown"
+msgstr "Smeđa"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "Pregledaj"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:182
+msgid "Bullet &Alignment:"
+msgstr "Poravnanje znaka nabrajanja:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Stil znaka nabrajanja"
+
+#: ../src/richtext/richtextformatdlg.cpp:359
+msgid "Bullets"
+msgstr "Znakovi nabrajanja"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1756
+msgid "Bullseye"
+msgstr "Meta"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:875
+msgid "ButtonFace"
+msgstr "ButtonFace"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:876
+msgid "ButtonHighlight"
+msgstr "ButtonHighlight"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:877
+msgid "ButtonShadow"
+msgstr "ButtonShadow"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:878
+msgid "ButtonText"
+msgstr "ButtonText"
+
+#: ../src/common/paper.cpp:98
+msgid "C sheet, 17 x 22 in"
+msgstr "C arak, 17 × 22 in"
+
+#: ../src/generic/logg.cpp:514
+msgid "C&lear"
+msgstr "U&kloni"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "B&oja:"
+
+#: ../src/common/paper.cpp:123
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "C3 kuverta, 324 × 458 mm"
+
+#: ../src/common/paper.cpp:124
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "C4 kuverta, 229 × 324 mm"
+
+#: ../src/common/paper.cpp:122
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "C5 kuverta, 162 × 229 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "C6 kuverta, 114 × 162 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "C65 kuverta, 114 × 229 mm"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr "CD-Rom"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "CHM upravljač trenutačno podržava samo lokalne datoteke!"
+
+#: ../src/richtext/richtextfontpage.cpp:282
+msgid "Ca&pitals"
+msgstr "Velika s&lova"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "&Poništavanje nije moguće "
+
+#: ../src/common/image.cpp:2824
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+"Nije moguće automatski odrediti format slike za unos, koji se ne može tražiti."
+
+#: ../src/msw/registry.cpp:506
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "Nije moguće zatvoriti registarski ključ '%s'"
+
+#: ../src/msw/registry.cpp:584
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Nije moguće kopirati vrijednosti nepodržane vrste %d."
+
+#: ../src/msw/registry.cpp:487
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "Nije moguće stvoriti registarski ključ '%s'"
+
+#: ../src/msw/thread.cpp:665
+msgid "Can't create thread"
+msgstr "Nije moguće stvoriti tijek"
+
+#: ../src/msw/window.cpp:3691
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "Nije moguće stvoriti prozor vrste %s"
+
+#: ../src/msw/registry.cpp:777
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "Nije moguće izbrisati ključ '%s'"
+
+#: ../src/msw/iniconf.cpp:458
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "Nije moguće izbrisati INI datoteku '%s'"
+
+#: ../src/msw/registry.cpp:805
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "Nije moguće izbrisati vrijednost '%s' ključa '%s'"
+
+#: ../src/msw/registry.cpp:1171
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "Nije moguće numeriranje podključeva ključa '%s'"
+
+#: ../src/msw/registry.cpp:1132
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "Nije moguće numeriranje vrijednosti ključa '%s'"
+
+#: ../src/msw/registry.cpp:1389
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Nije moguće izvesti vrijednost nepodržane vrste %d."
+
+#: ../src/common/ffile.cpp:254
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "Nije moguće naći trenutačnu poziciju u datoteci '%s'"
+
+#: ../src/msw/registry.cpp:418
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "Nije moguće dobiti informacije o ključu '%s'"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Nije moguće inicijalizirati zlib deflate tijek."
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Nije moguće inicijalizirati zlib inflate tijek."
+
+#: ../src/msw/fswatcher.cpp:476
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr "Nije moguće praćenje promjena za nepostojeći direktorij \"%s\"."
+
+#: ../src/msw/registry.cpp:454
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "Nije moguće otvoriti registarski ključ '%s'"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Nije moguće čitati iz inflate tijeka: %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"Nije moguće čitati iz inflate tijeka: neočekivani kraj datoteke u osnovnom "
+"tijeku."
+
+#: ../src/msw/registry.cpp:1064
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "Nije moguće čitanje vrijednosti od '%s'"
+
+#: ../src/msw/registry.cpp:878 ../src/msw/registry.cpp:910
+#: ../src/msw/registry.cpp:975
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "Nije moguće čitanje vrijednosti od ključa '%s'"
+
+#: ../src/common/image.cpp:2620
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "Nije moguće spremanje slikovne datoteke '%s': nepoznati sufiks."
+
+#: ../src/generic/logg.cpp:573 ../src/generic/logg.cpp:976
+msgid "Can't save log contents to file."
+msgstr "Nije moguće spremiti log sadržaj u datoteku."
+
+#: ../src/msw/thread.cpp:629
+msgid "Can't set thread priority"
+msgstr "Nije moguće postaviti prioritet tijeka"
+
+#: ../src/msw/registry.cpp:896 ../src/msw/registry.cpp:938
+#: ../src/msw/registry.cpp:1081
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "Nije moguće postavljanje vrijednosti od '%s'"
+
+#: ../src/unix/utilsunx.cpp:351
+msgid "Can't write to child process's stdin"
+msgstr "Nije moguće pisanje u stdin podređenog procesa"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "Nije moguće pisati u deflate tijek: %s"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../include/wx/msgdlg.h:279 ../src/richtext/richtextstyledlg.cpp:300
+#: ../src/common/stockitem.cpp:145 ../src/common/accelcmn.cpp:71
+#: ../src/msw/msgdlg.cpp:454 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Cancel"
+
+#: ../src/common/filefn.cpp:1261
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "Nije moguće numerirati datoteke '%s'"
+
+#: ../src/msw/dir.cpp:263
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "Nije moguće numerirati datoteke u mapi '%s'"
+
+#: ../src/msw/dialup.cpp:523
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Nije moguće naći aktivnu vezu pozivanja: %s"
+
+#: ../src/msw/dialup.cpp:827
+msgid "Cannot find the location of address book file"
+msgstr "Nije moguće naći mjesto datoteke adresara"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "Nije moguće dobiti aktivnu instancu \"%s\""
+
+#: ../src/unix/threadpsx.cpp:1035
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr "Nije moguće dobiti raspon prioriteta za pravilo rasporeda %d."
+
+#: ../src/unix/utilsunx.cpp:987
+msgid "Cannot get the hostname"
+msgstr "Nije moguće dobiti ime hosta"
+
+#: ../src/unix/utilsunx.cpp:1023
+msgid "Cannot get the official hostname"
+msgstr "Nije moguće dobiti službeno ime hosta"
+
+#: ../src/msw/dialup.cpp:928
+msgid "Cannot hang up - no active dialup connection."
+msgstr "Nije moguće prekinuti poziv – nema aktivne veze pozivanja."
+
+#: ../include/wx/msw/ole/oleutils.h:51
+msgid "Cannot initialize OLE"
+msgstr "Nije moguće inicijalizirati OLE"
+
+#: ../src/common/socket.cpp:853
+msgid "Cannot initialize sockets"
+msgstr "Nije moguće inicijalizirati priključke"
+
+#: ../src/msw/volume.cpp:619
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "Nije moguće učitati ikone iz '%s'."
+
+#: ../src/xrc/xmlres.cpp:360
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Nije moguće učitati resurse iz '%s'."
+
+#: ../src/xrc/xmlres.cpp:742
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Nije moguće učitati resurse iz datoteke '%s'."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "Nije moguće otvoriti HTML dokument: %s"
+
+#: ../src/html/helpdata.cpp:667
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "Nije moguće otvoriti HTML knjigu pomoći: %s"
+
+#: ../src/html/helpdata.cpp:299
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "Nije moguće otvoriti datoteku sadržaja: %s"
+
+#: ../src/generic/dcpsg.cpp:1667
+msgid "Cannot open file for PostScript printing!"
+msgstr "Nije moguće otvoriti datoteku za ispis u PostScriptu!"
+
+#: ../src/html/helpdata.cpp:313
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "Nije moguće otvoriti datoteku indeksa: %s"
+
+#: ../src/xrc/xmlres.cpp:724
+#, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "Nije moguće otvoriti datoteku resursa '%s'."
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Cannot print empty page."
+msgstr "Nije moguće ispisati praznu stranicu."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "Nije moguće čitati ime vrste od '%s'!"
+
+#: ../src/msw/thread.cpp:888
+#, c-format
+msgid "Cannot resume thread %lx"
+msgstr "Nije moguće nastaviti tijek %lx"
+
+#: ../src/unix/threadpsx.cpp:1016
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "Nije moguće pronaći pravila rasporeda tijeka."
+
+#: ../src/common/intl.cpp:558
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr "Nije moguće postaviti lokalizaciju za \"%s\" jezik."
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:546
+msgid "Cannot start thread: error writing TLS."
+msgstr "Nije moguće započeti tijek: greška prilikom pisanja TLS."
+
+#: ../src/msw/thread.cpp:872
+#, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "Nije moguće obustaviti tijek %lx"
+
+#: ../src/msw/thread.cpp:794
+msgid "Cannot wait for thread termination"
+msgstr "Nije moguće čekati na prekid tijeka"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:75
+msgid "Capital"
+msgstr "Capital"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:879
+msgid "CaptionText"
+msgstr "CaptionText"
+
+#: ../src/html/helpwnd.cpp:533
+msgid "Case sensitive"
+msgstr "Razlikovanje veličine slova"
+
+#: ../src/propgrid/manager.cpp:1509
+msgid "Categorized Mode"
+msgstr "Modus kategorizacije"
+
+#: ../src/richtext/richtextbuffer.cpp:9968
+msgid "Cell Properties"
+msgstr "Svojstva ćelije"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Keltski (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "Cen&trirano"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Centrirano"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Srednjeeuropski (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:187
+msgid "Centre"
+msgstr "Centriraj"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Centriraj tekst."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+msgid "Centred"
+msgstr "Centrirano"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:219
+msgid "Ch&oose..."
+msgstr "O&daberi …"
+
+#: ../src/richtext/richtextbuffer.cpp:4354
+msgid "Change List Style"
+msgstr "Promijeni stil popisa"
+
+#: ../src/richtext/richtextbuffer.cpp:3709
+msgid "Change Object Style"
+msgstr "Promijeni stil objekta"
+
+#: ../src/richtext/richtextbuffer.cpp:3982
+#: ../src/richtext/richtextbuffer.cpp:8129
+msgid "Change Properties"
+msgstr "Promijeni svojstva"
+
+#: ../src/richtext/richtextbuffer.cpp:3526
+msgid "Change Style"
+msgstr "Promijeni stil"
+
+#: ../src/common/fileconf.cpp:341
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+"Promjene neće biti spremljene, kako bi se izbjeglo prepisivanje postojeće "
+"datoteke \"%s\""
+
+#: ../src/gtk/filepicker.cpp:190 ../src/gtk/filedlg.cpp:87
+#, c-format
+msgid "Changing current directory to \"%s\" failed"
+msgstr "Mijenjanje trenutačne mape u \"%s\""
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1757
+msgid "Character"
+msgstr "Slovni znak"
+
+#: ../src/richtext/richtextstyles.cpp:1063
+msgid "Character styles"
+msgstr "Stilovi slovnih znakova"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:161
+#: ../src/richtext/richtextbulletspage.cpp:163
+msgid "Check to add a period after the bullet."
+msgstr "Aktiviraj za dodavanje točke nakon znaka za nabrajanje."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:175
+#: ../src/richtext/richtextbulletspage.cpp:177
+msgid "Check to add a right parenthesis."
+msgstr "Aktiviraj za dodavanje desne zagrade."
+
+#: ../src/richtext/richtextborderspage.cpp:383
+#: ../src/richtext/richtextborderspage.cpp:385
+#: ../src/richtext/richtextborderspage.cpp:551
+#: ../src/richtext/richtextborderspage.cpp:553
+msgid "Check to edit all borders simultaneously."
+msgstr "Aktiviraj za istovremeno dodavanje svih obruba."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:168
+#: ../src/richtext/richtextbulletspage.cpp:170
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Aktiviraj za postavljanje znaka za nabrajanje između zagrada."
+
+#: ../src/richtext/richtextfontpage.cpp:315
+#: ../src/richtext/richtextfontpage.cpp:317
+msgid "Check to indicate right-to-left text layout."
+msgstr "Aktiviraj za određivanje smjera teksta s desna nalijevo."
+
+#: ../src/osx/carbon/fontdlg.cpp:356 ../src/osx/carbon/fontdlg.cpp:358
+msgid "Check to make the font bold."
+msgstr "Aktiviraj za korištenje debelog fonta."
+
+#: ../src/osx/carbon/fontdlg.cpp:363 ../src/osx/carbon/fontdlg.cpp:365
+msgid "Check to make the font italic."
+msgstr "Aktiviraj za korištenje kurzivnog fonta."
+
+#: ../src/osx/carbon/fontdlg.cpp:372 ../src/osx/carbon/fontdlg.cpp:374
+msgid "Check to make the font underlined."
+msgstr "Aktiviraj za korištenje podcrtanog fonta."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Aktiviraj za ponovo numeriranje."
+
+#: ../src/richtext/richtextfontpage.cpp:277
+#: ../src/richtext/richtextfontpage.cpp:279
+msgid "Check to show a line through the text."
+msgstr "Aktiviraj za prikaz crte preko teksta."
+
+#: ../src/richtext/richtextfontpage.cpp:284
+#: ../src/richtext/richtextfontpage.cpp:286
+msgid "Check to show the text in capitals."
+msgstr "Aktiviraj za prikaz teksta verzalnim slovima."
+
+#: ../src/richtext/richtextfontpage.cpp:291
+#: ../src/richtext/richtextfontpage.cpp:293
+msgid "Check to show the text in small capitals."
+msgstr "Aktiviraj za prikaz teksta kapitalkama."
+
+#: ../src/richtext/richtextfontpage.cpp:305
+#: ../src/richtext/richtextfontpage.cpp:307
+msgid "Check to show the text in subscript."
+msgstr "Aktiviraj za prikaz teksta nadignuto."
+
+#: ../src/richtext/richtextfontpage.cpp:298
+#: ../src/richtext/richtextfontpage.cpp:300
+msgid "Check to show the text in superscript."
+msgstr "Aktiviraj za prikaz teksta spušteno."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Check to suppress hyphenation."
+msgstr "Aktiviraj za izostavljanje rastavljanja riječi."
+
+#: ../src/msw/dialup.cpp:763
+msgid "Choose ISP to dial"
+msgstr "Odaberi ISP za biranje"
+
+#: ../src/propgrid/props.cpp:1922
+msgid "Choose a directory:"
+msgstr "Odaberi mapu:"
+
+#: ../src/propgrid/props.cpp:1975
+msgid "Choose a file"
+msgstr "Odaberi datoteku"
+
+#: ../src/generic/colrdlgg.cpp:158 ../src/gtk/colordlg.cpp:54
+msgid "Choose colour"
+msgstr "Odaberi boju"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:77
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Odaberi font"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "Ustanovljena je beskonačna ovisnost u modulu \"%s\"."
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "Zatv&ori"
+
+#: ../src/msw/ole/automtn.cpp:684
+msgid "Class not registered."
+msgstr "Klasa nije registrirana."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/stockitem.cpp:147 ../src/common/accelcmn.cpp:72
+msgid "Clear"
+msgstr "Clear"
+
+#: ../src/generic/logg.cpp:514
+msgid "Clear the log contents"
+msgstr "Očisti log sadržaj"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Klikni za primjenu stila."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:220
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "Click to browse for a symbol."
+msgstr "Klikni za potragu za simbolom."
+
+#: ../src/osx/carbon/fontdlg.cpp:403 ../src/osx/carbon/fontdlg.cpp:405
+msgid "Click to cancel changes to the font."
+msgstr "Klikni za odustajanje od fontovskih izmjena."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Klikni za odustajanje od odabira fonta."
+
+#: ../src/osx/carbon/fontdlg.cpp:384 ../src/osx/carbon/fontdlg.cpp:386
+msgid "Click to change the font colour."
+msgstr "Klikni za promjenu boje fonta."
+
+#: ../src/richtext/richtextfontpage.cpp:267
+#: ../src/richtext/richtextfontpage.cpp:269
+msgid "Click to change the text background colour."
+msgstr "Klikni za promjenu boje pozadine teksta."
+
+#: ../src/richtext/richtextfontpage.cpp:254
+#: ../src/richtext/richtextfontpage.cpp:256
+msgid "Click to change the text colour."
+msgstr "Klikni za promjenu boje teksta."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Klikni za odabir fonta za ovu razinu."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Klikni za zatvaranje ovog prozora."
+
+#: ../src/osx/carbon/fontdlg.cpp:410 ../src/osx/carbon/fontdlg.cpp:412
+msgid "Click to confirm changes to the font."
+msgstr "Klikni za potvrdu fontovske promjene."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Klikni za potvrdu odabira fonta."
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+msgid "Click to create a new box style."
+msgstr "Klikni za stvaranje novog stila okvira."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Klikni za stvaranje novog stila slovnih znakova."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Klikni za stvaranje novog stila popisa."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Klikni za stvaranje novog stila odlomka."
+
+#: ../src/richtext/richtexttabspage.cpp:133
+#: ../src/richtext/richtexttabspage.cpp:135
+msgid "Click to create a new tab position."
+msgstr "Klikni za stvaranje novog tabulatora."
+
+#: ../src/richtext/richtexttabspage.cpp:145
+#: ../src/richtext/richtexttabspage.cpp:147
+msgid "Click to delete all tab positions."
+msgstr "Klikni za uklanjanje svih tabulatora."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Klikni za uklanjanje odabranog stila."
+
+#: ../src/richtext/richtexttabspage.cpp:139
+#: ../src/richtext/richtexttabspage.cpp:141
+msgid "Click to delete the selected tab position."
+msgstr "Klikni za uklanjanje odabranog tabulatora."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Klikni za uređivanje odabranog stila."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Klikni za preimenovanje odabranog stila."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:759
+#: ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Zatvori"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Zatvori sve"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Zatvori trenutačni dokument"
+
+#: ../src/generic/logg.cpp:516
+msgid "Close this window"
+msgstr "Zatvori ovaj prozor"
+
+#. TRANSLATORS: Action for manipulating a tree control
+#: ../src/generic/datavgen.cpp:6006
+msgid "Collapse"
+msgstr "Sažmi"
+
+#: ../src/common/stockitem.cpp:193
+msgid "Color"
+msgstr "Boja"
+
+#: ../src/richtext/richtextformatdlg.cpp:776
+msgid "Colour"
+msgstr "Boja"
+
+#: ../src/msw/colordlg.cpp:158
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Dijalog za boju odabira nije uspjeo, zbog greške %0lx."
+
+#: ../src/osx/carbon/fontdlg.cpp:380
+msgid "Colour:"
+msgstr "Boja:"
+
+#: ../src/generic/datavgen.cpp:6077
+#, c-format
+msgid "Column %u"
+msgstr "Stupac %u"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:114
+msgid "Command"
+msgstr "Command"
+
+#: ../src/common/init.cpp:196
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be ignored."
+msgstr ""
+"Argument naredbenog retka %d nije bilo moguće konvertirati u Unicode i bit će "
+"zanemaren."
+
+#: ../src/msw/fontdlg.cpp:120
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "Uobičajeni dijalog nije uspjeo, sa šifrom greške %0lx."
+
+#: ../src/gtk/window.cpp:4649
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+"Dijeljenje nije podržano u ovom sustavu. Aktiviraj ga u tvom upravljaču "
+"prozora."
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Komprimirana HTML datoteka pomoći (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:444
+msgid "Computer"
+msgstr "Računalo"
+
+#: ../src/common/fileconf.cpp:934
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "Konfiguracijsko ulazno ime ne može početi s '%c'."
+
+#: ../src/generic/filedlgg.cpp:349 ../src/gtk/filedlg.cpp:60
+msgid "Confirm"
+msgstr "Potvrdi"
+
+#: ../src/html/htmlwin.cpp:566
+msgid "Connecting..."
+msgstr "Spajanje …"
+
+#: ../src/html/helpwnd.cpp:475
+msgid "Contents"
+msgstr "Sadržaj"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:880
+msgid "ControlDark"
+msgstr "ControlDark"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:881
+msgid "ControlLight"
+msgstr "ControlLight"
+
+#: ../src/common/strconv.cpp:2262
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "Konverzija u kodnu stranicu '%s' ne radi."
+
+#: ../src/common/stockitem.cpp:149
+msgid "Convert"
+msgstr "Pretvori"
+
+#: ../src/html/htmlwin.cpp:1079
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "Kopirano u međuspremnik:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Kopije:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "Kopiraj"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Kopiraj odabir"
+
+#: ../src/richtext/richtextborderspage.cpp:566
+#: ../src/richtext/richtextborderspage.cpp:601
+msgid "Corner"
+msgstr "Kut"
+
+#: ../src/richtext/richtextborderspage.cpp:575
+msgid "Corner &radius:"
+msgstr "Polumjer kuta:"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "Nije bilo moguće stvoriti privremenu datoteku '%s'"
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "Nije bilo moguće izdvojiti %s u %s: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Nije bilo moguće naći karticu za id"
+
+#: ../src/gtk/notifmsg.cpp:108
+msgid "Could not initalize libnotify."
+msgstr "Nije bilo moguće inicijalizirati libnotify."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "Nije bilo moguće pronaći datoteku '%s'."
+
+#: ../src/common/filefn.cpp:1403
+msgid "Could not set current working directory"
+msgstr "Nije bilo moguće postaviti trenutačno radnu mapu"
+
+#: ../src/common/prntbase.cpp:2015
+msgid "Could not start document preview."
+msgstr "Nije bilo moguće započeti pregled dokumenta."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1132
+msgid "Could not start printing."
+msgstr "Nije bilo moguće započeti ispis."
+
+#: ../src/common/wincmn.cpp:2125
+msgid "Could not transfer data to window"
+msgstr "Nije bilo moguće prebaciti podatke u prozor"
+
+#: ../src/msw/imaglist.cpp:187 ../src/msw/imaglist.cpp:224
+#: ../src/msw/imaglist.cpp:249 ../src/msw/dragimag.cpp:185
+#: ../src/msw/dragimag.cpp:220
+msgid "Couldn't add an image to the image list."
+msgstr "Nije bilo moguće dodati sliku u popis slika."
+
+#: ../src/osx/glcanvas_osx.cpp:414 ../src/unix/glx11.cpp:558
+#: ../src/msw/glcanvas.cpp:616
+msgid "Couldn't create OpenGL context"
+msgstr "Nije bilo moguće stvoriti OpenGL sadržaj"
+
+#: ../src/msw/timer.cpp:134
+msgid "Couldn't create a timer"
+msgstr "Nije bilo moguće stvoriti brojač vremena"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "Nije bilo moguće stvoriti pokrivni prozor"
+
+#: ../src/common/translation.cpp:2024
+msgid "Couldn't enumerate translations"
+msgstr "Nije bilo moguće numerirati prijevode"
+
+#: ../src/common/dynlib.cpp:120
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "Nije bilo moguće naći simbol '%s' u dinamičkoj biblioteci"
+
+#: ../src/msw/thread.cpp:915
+msgid "Couldn't get the current thread pointer"
+msgstr "Nije bilo moguće dobiti trenutačni označivač tijeka"
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "Nije bilo moguće initijalizirati sadržaj pokrivnog prozora"
+
+#: ../src/common/imaggif.cpp:244
+msgid "Couldn't initialize GIF hash table."
+msgstr "Nije bilo moguće initijalizirati GIF hash tablicu."
+
+#: ../src/common/imagpng.cpp:409
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"Nije bilo moguće učitati PNG sliku – datoteka je pokvarena ili nema dovoljno "
+"memorije."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "Nije bilo moguće učitati zvukovne podatke od '%s'."
+
+#: ../src/msw/dirdlg.cpp:435
+msgid "Couldn't obtain folder name"
+msgstr "Nije bilo moguće dobiti ime mape"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Nije bilo moguće otvoriti audio: %s"
+
+#: ../src/msw/ole/dataobj.cpp:377
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "Nije bilo moguće registrirati format međuspremnika '%s'."
+
+#: ../src/msw/listctrl.cpp:869
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr "Nije bilo moguće pronaći informacije o kontrolnoj stavci popisa %d."
+
+#: ../src/common/imagpng.cpp:498 ../src/common/imagpng.cpp:509
+#: ../src/common/imagpng.cpp:519
+msgid "Couldn't save PNG image."
+msgstr "Nije bilo moguće spremiti PNG sliku."
+
+#: ../src/msw/thread.cpp:684
+msgid "Couldn't terminate thread"
+msgstr "Nije bilo moguće završiti tijek"
+
+#: ../src/common/xtistrm.cpp:166
+#, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "Parametar za stvaranje %s, nije nađen u prijavljenim RTTI parametrima"
+
+#: ../src/generic/dirdlgg.cpp:288
+msgid "Create directory"
+msgstr "Stvori mapu"
+
+#: ../src/generic/filedlgg.cpp:212 ../src/generic/dirdlgg.cpp:111
+msgid "Create new directory"
+msgstr "Stvori novu mapu"
+
+#: ../src/xrc/xmlres.cpp:2460
+#, c-format
+msgid "Creating %s \"%s\" failed."
+msgstr "Stvaranje %s \"%s\"."
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1758
+msgid "Cross"
+msgstr "Križić"
+
+#: ../src/common/accelcmn.cpp:333
+msgid "Ctrl+"
+msgstr "Ctrl+"
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/osx/textctrl_osx.cpp:576
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2507
+msgid "Cu&t"
+msgstr "Izr&eži"
+
+#: ../src/generic/filectrlg.cpp:940
+msgid "Current directory:"
+msgstr "Trenutačna mapa:"
+
+#. TRANSLATORS: Custom colour choice entry
+#: ../src/propgrid/advprops.cpp:896 ../src/propgrid/advprops.cpp:1574
+#: ../src/propgrid/advprops.cpp:1612
+msgid "Custom"
+msgstr "Prilagođeno"
+
+#: ../src/gtk/print.cpp:217
+msgid "Custom size"
+msgstr "Prilagođena veličina"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "Prilagodi stupce"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "Izreži"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Izreži odabir"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Ćirilica (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:99
+msgid "D sheet, 22 x 34 in"
+msgstr "D arak, 22 × 34 in"
+
+#: ../src/msw/dde.cpp:703
+msgid "DDE poke request failed"
+msgstr "DDE poke upit nije uspjeo"
+
+#: ../src/common/imagbmp.cpp:1169
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "DIB zaglavlje: Kodiranje se ne poklapa s bit-dubinom."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "DIB Header: Visina slike > 32767 piksela za datoteku."
+
+#: ../src/common/imagbmp.cpp:1066
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "DIB Header: Širina slike > 32767 piksela za datoteku."
+
+#: ../src/common/imagbmp.cpp:1094
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "DIB zaglavlje: Nepoznata bit-dubina u datoteci."
+
+#: ../src/common/imagbmp.cpp:1149
+msgid "DIB Header: Unknown encoding in file."
+msgstr "DIB zaglavlje: Nepoznato kodiranje u datoteci."
+
+#: ../src/common/paper.cpp:121
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "DL kuverta, 110 × 220 mm"
+
+#: ../src/richtext/richtextborderspage.cpp:613
+msgid "Dashed"
+msgstr "Isprekidano"
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Izvještaj o otklanjanju grešaka \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "Izvještaj o otklanjanju grešaka nije bilo moguće stvoriti."
+
+#: ../src/common/debugrpt.cpp:553
+msgid "Debug report generation has failed."
+msgstr "Stvaranje izvještaja o otklanjanju grešaka."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:84
+msgid "Decimal"
+msgstr "Decimal"
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Dekorativni"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1752
+msgid "Default"
+msgstr "Zadano"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Zadano kodiranje"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "Zadani font"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Zadani pisač"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:51
+msgid "Del"
+msgstr "Del"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/richtext/richtextbuffer.cpp:8221 ../src/common/stockitem.cpp:152
+#: ../src/common/accelcmn.cpp:50 ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Delete"
+
+#: ../src/richtext/richtexttabspage.cpp:144
+msgid "Delete A&ll"
+msgstr "Izbriši s&ve"
+
+#: ../src/richtext/richtextbuffer.cpp:11341
+msgid "Delete Column"
+msgstr "Izbriši stupac"
+
+#: ../src/richtext/richtextbuffer.cpp:11291
+msgid "Delete Row"
+msgstr "Izbriši red"
+
+#: ../src/richtext/richtextstyledlg.cpp:782
+msgid "Delete Style"
+msgstr "Izbriši stil"
+
+#: ../src/richtext/richtextctrl.cpp:1345 ../src/richtext/richtextctrl.cpp:1584
+msgid "Delete Text"
+msgstr "Izbriši tekst"
+
+#: ../src/generic/editlbox.cpp:170
+msgid "Delete item"
+msgstr "Izbriši stavku"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Izbriši odabir"
+
+#: ../src/richtext/richtextstyledlg.cpp:782
+#, c-format
+msgid "Delete style %s?"
+msgstr "Izbrisati stil %s?"
+
+#: ../src/unix/snglinst.cpp:301
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Izbrisana je stara datoteka zaključavanja '%s'."
+
+#: ../src/common/secretstore.cpp:220
+#, c-format
+msgid "Deleting password for \"%s/%s\" failed: %s."
+msgstr "Brisanje lozinke za \"%s/%s\": %s."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "Ovisnost \"%s\" o modulu \"%s\" ne postoji."
+
+#: ../src/common/stockitem.cpp:196
+msgid "Descending"
+msgstr "Silazno"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/generic/dirctrlg.cpp:526 ../src/propgrid/advprops.cpp:882
+msgid "Desktop"
+msgstr "Desktop"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Razvijatelji "
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "Razvijatelji"
+
+#: ../src/msw/dialup.cpp:374
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Funkcije nazivanja nisu dostupne jer usluga daljinskog pristupa (RAS) nije "
+"instalirana na ovom računalu. Instaliraj ga."
+
+#: ../src/generic/tipdlg.cpp:211
+msgid "Did you know..."
+msgstr "Da li znaš …"
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr "Došlo je do DirectFB greške %d."
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Mape"
+
+#: ../src/common/filefn.cpp:1183
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "Nije bilo moguće stvoriti mapu '%s'"
+
+#: ../src/common/filefn.cpp:1197
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "Nije bilo moguće izbrisati mapu '%s'"
+
+#: ../src/generic/dirdlgg.cpp:204
+msgid "Directory does not exist"
+msgstr "Mapa ne postoji"
+
+#: ../src/generic/filectrlg.cpp:1399
+msgid "Directory doesn't exist."
+msgstr "Mapa ne postoji."
+
+#: ../src/common/docview.cpp:457
+msgid "Discard changes and reload the last saved version?"
+msgstr "Zanemari promjene i ponovo učitaj posljednju spremljenu verziju?"
+
+#: ../src/html/helpwnd.cpp:502
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Prikaži sve indicirane stavke koje sadržavaju zadani znakovni niz. Pretraga "
+"ne razlikuje veličinu slova."
+
+#: ../src/html/helpwnd.cpp:679
+msgid "Display options dialog"
+msgstr "Dijalog za opcije prikaza"
+
+#: ../src/html/helpwnd.cpp:322
+msgid "Displays help as you browse the books on the left."
+msgstr "Prikazuje pomoć prilikom pregledavanja knjiga na lijevo strani."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:85
+msgid "Divide"
+msgstr "Divide"
+
+#: ../src/common/docview.cpp:533
+#, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "Da li želiš spremiti promjene u %s?"
+
+#: ../src/common/prntbase.cpp:542
+msgid "Document:"
+msgstr "Dokument:"
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Autori dokumentacije "
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "Autori dokumentacije"
+
+#: ../src/common/sizer.cpp:2799
+msgid "Don't Save"
+msgstr "Nemoj spremiti"
+
+#: ../src/html/htmlwin.cpp:633
+msgid "Done"
+msgstr "Gotovo"
+
+#: ../src/generic/progdlgg.cpp:448 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Gotovo."
+
+#: ../src/richtext/richtextborderspage.cpp:612
+msgid "Dotted"
+msgstr "Točkasto"
+
+#: ../src/richtext/richtextborderspage.cpp:614
+msgid "Double"
+msgstr "Duplo"
+
+#: ../src/common/paper.cpp:176
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Japanska dupla razglednica rotirano 148 × 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "Dvostruko korišten id : %d"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+#: ../src/common/accelcmn.cpp:64
+msgid "Down"
+msgstr "Down"
+
+#: ../src/richtext/richtextctrl.cpp:865
+msgid "Drag"
+msgstr "Povuci"
+
+#: ../src/common/paper.cpp:100
+msgid "E sheet, 34 x 44 in"
+msgstr "E arak, 34 × 44 in"
+
+#: ../src/unix/fswatcher_inotify.cpp:561
+msgid "EOF while reading from inotify descriptor"
+msgstr "EOF prilikom čitanja inotify deskriptora"
+
+#: ../src/common/stockitem.cpp:154
+msgid "Edit"
+msgstr "Uredi"
+
+#: ../src/generic/editlbox.cpp:168
+msgid "Edit item"
+msgstr "Uredi stavku"
+
+#: ../include/wx/generic/progdlgg.h:84
+msgid "Elapsed time:"
+msgstr "Proteklo vrijeme:"
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr "Omogući vrijednost visine."
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+msgid "Enable the maximum width value."
+msgstr "Omogući maksimalnu vrijednost širine."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr "Omogući minimalnu vrijednost visine."
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+msgid "Enable the minimum width value."
+msgstr "Omogući minimalnu vrijednost širine."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr "Omogući vrijednost širine."
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+msgid "Enable vertical alignment."
+msgstr "Omogući uspravno poravnanje."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:162
+#: ../src/richtext/richtextbackgroundpage.cpp:164
+msgid "Enables a background colour."
+msgstr "Omogućava pozadinsku boju."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:196
+#: ../src/richtext/richtextbackgroundpage.cpp:198
+msgid "Enables a shadow."
+msgstr "Omogućava sjenu."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:300
+#: ../src/richtext/richtextbackgroundpage.cpp:302
+msgid "Enables the blur distance."
+msgstr "Omogućava udaljenost mutnoće."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:260
+#: ../src/richtext/richtextbackgroundpage.cpp:262
+msgid "Enables the shadow colour."
+msgstr "Omogućava boju sjene."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:327
+#: ../src/richtext/richtextbackgroundpage.cpp:329
+msgid "Enables the shadow opacity."
+msgstr "Omogućava neprozirnost sjene."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:273
+#: ../src/richtext/richtextbackgroundpage.cpp:275
+msgid "Enables the shadow spread."
+msgstr "Omogućava rasprostiranje sjene."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:66
+msgid "End"
+msgstr "End"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:55
+msgid "Enter"
+msgstr "Enter"
+
+#: ../src/richtext/richtextstyledlg.cpp:934
+msgid "Enter a box style name"
+msgstr "Unesi ime stila okvira"
+
+#: ../src/richtext/richtextstyledlg.cpp:606
+msgid "Enter a character style name"
+msgstr "Unesi ime stila slovnih znakova"
+
+#: ../src/richtext/richtextstyledlg.cpp:820
+msgid "Enter a list style name"
+msgstr "Unesi ime stila popisa"
+
+#: ../src/richtext/richtextstyledlg.cpp:893
+msgid "Enter a new style name"
+msgstr "Unesi novo ime stila"
+
+#: ../src/richtext/richtextstyledlg.cpp:654
+msgid "Enter a paragraph style name"
+msgstr "Unesi ime stila odlomka"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "Unesi naredbu za otvaranje datoteke \"%s\":"
+
+#: ../src/generic/helpext.cpp:459
+msgid "Entries found"
+msgstr "Nađeni unosi"
+
+#: ../src/common/paper.cpp:142
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Kuverta pozivnice 220 × 220 mm"
+
+#: ../src/common/config.cpp:469
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr "Proširenje varijable okruženja: nedostaje '%c' na položaju %u u '%s'."
+
+#: ../src/generic/filedlgg.cpp:357 ../src/generic/dirctrlg.cpp:570
+#: ../src/generic/dirctrlg.cpp:588 ../src/generic/dirctrlg.cpp:599
+#: ../src/generic/dirdlgg.cpp:323 ../src/generic/filectrlg.cpp:642
+#: ../src/generic/filectrlg.cpp:756 ../src/generic/filectrlg.cpp:770
+#: ../src/generic/filectrlg.cpp:786 ../src/generic/filectrlg.cpp:1368
+#: ../src/generic/filectrlg.cpp:1399 ../src/gtk/filedlg.cpp:74
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Greška"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "Greška prilikom zatvaranja epoll deskriptora"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+msgid "Error closing kqueue instance"
+msgstr "Greška prilikom zatvaranja kqueue instance"
+
+#: ../src/common/filefn.cpp:1049
+#, c-format
+msgid "Error copying the file '%s' to '%s'."
+msgstr "Greška prilikom kopiranja datoteke '%s' u '%s'."
+
+#: ../src/generic/dirdlgg.cpp:222
+msgid "Error creating directory"
+msgstr "Greška prilikom stvaranja mape"
+
+#: ../src/common/imagbmp.cpp:1181
+msgid "Error in reading image DIB."
+msgstr "Greška prilikom čitanja DIB slike."
+
+#: ../src/propgrid/propgrid.cpp:6696
+#, c-format
+msgid "Error in resource: %s"
+msgstr "Grešk u resursu: %s"
+
+#: ../src/common/fileconf.cpp:422
+msgid "Error reading config options."
+msgstr "Greška prilikom čitanja opcija konfiguracije."
+
+#: ../src/common/fileconf.cpp:1029
+msgid "Error saving user configuration data."
+msgstr "Greška prilikom spremanja podataka korisničke konfiguracije."
+
+#: ../src/gtk/print.cpp:722
+msgid "Error while printing: "
+msgstr "Greška prilikom spisa: "
+
+#: ../src/common/log.cpp:219
+msgid "Error: "
+msgstr "Greška: "
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:69
+msgid "Esc"
+msgstr "Esc"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:70
+msgid "Escape"
+msgstr "Escape"
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Esperanto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+msgid "Estimated time:"
+msgstr "Procijenjeno vrijeme:"
+
+#: ../src/generic/dbgrptg.cpp:234
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Izvršavajuće datoteke (*.exe)|*.exe|"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/stockitem.cpp:155 ../src/common/accelcmn.cpp:78
+msgid "Execute"
+msgstr "Execute"
+
+#: ../src/msw/utilsexc.cpp:876
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "Izvršenje naredbe %s"
+
+#: ../src/common/paper.cpp:105
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executive, 7 1/4 × 10 1/2 in"
+
+#. TRANSLATORS: Action for manipulating a tree control
+#: ../src/generic/datavgen.cpp:6009
+msgid "Expand"
+msgstr "Proširi"
+
+#: ../src/msw/registry.cpp:1240
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr "Izvoz ključa registra: datoteka „%s” već postoji i neće biti prepisana."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Proširena Unix kodna strana za japanski (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "Izvlačenje iz '%s' u '%s'."
+
+#: ../src/common/accelcmn.cpp:249 ../src/common/accelcmn.cpp:344
+msgid "F"
+msgstr "F"
+
+#. TRANSLATORS: Label of font face name
+#: ../src/propgrid/advprops.cpp:672
+msgid "Face Name"
+msgstr "Ime fonta"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Neuspjeli pristup zaključnoj datoteci."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "Neuspjelo dodavanje deskriptora %d epoll deskriptoru %d"
+
+#: ../src/msw/dib.cpp:489
+#, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Neuspjelo alociranje %luKb memorije za bitmap."
+
+#: ../src/common/glcmn.cpp:115
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Neuspjelo određivanje boje za OpenGL"
+
+#: ../src/unix/displayx11.cpp:236
+msgid "Failed to change video mode"
+msgstr "Neuspjelo mijenjanje video modusa"
+
+#: ../src/common/image.cpp:3277
+#, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "Neuspjela provjera formata datoteke slike \"%s\"."
+
+#: ../src/common/debugrpt.cpp:239
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "Neuspjelo sređivanje mape za izještaje o otklanjanju grešaka \"%s\"."
+
+#: ../src/common/filename.cpp:192
+msgid "Failed to close file handle"
+msgstr "Neuspjelo zatvaranje upravljača datotekama"
+
+#: ../src/unix/snglinst.cpp:340
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "Neuspjelo zatvaranje zaključne datoteke '%s'"
+
+#: ../src/msw/clipbrd.cpp:112
+msgid "Failed to close the clipboard."
+msgstr "Neuspjelo zatvaranje međuspremnika."
+
+#: ../src/x11/utils.cpp:208
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "Neuspjelo zatvaranje prikaza \"%s\""
+
+#: ../src/msw/dialup.cpp:797
+msgid "Failed to connect: missing username/password."
+msgstr "Neuspjelo povezivanje: nedostaje korisničko ime/lozinka."
+
+#: ../src/msw/dialup.cpp:743
+msgid "Failed to connect: no ISP to dial."
+msgstr "Neuspjelo povezivanje: nema ISP za biranje"
+
+#: ../src/common/textfile.cpp:203
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Neuspjelo konvertiranje datoteke \"%s\" u Unicode."
+
+#: ../src/generic/logg.cpp:956
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Neuspjelo kopiranje sadržaja dijaloga u međuspremnik."
+
+#: ../src/msw/registry.cpp:692
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Neuspjelo kopiranje registarske vrijednost '%s'"
+
+#: ../src/msw/registry.cpp:701
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "Neuspjelo kopiranje sadržaja registarskog ključa '%s' u '%s'."
+
+#: ../src/common/filefn.cpp:1015
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "Neuspjelo kopiranje datoteke '%s' u '%s'"
+
+#: ../src/msw/registry.cpp:679
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Neuspjelo kopiranje registarskog pod-ključa '%s' u '%s'."
+
+#: ../src/msw/dde.cpp:1070
+msgid "Failed to create DDE string"
+msgstr "Neuspjelo stvaranje DDE znakovnog niza"
+
+#: ../src/msw/mdi.cpp:616
+msgid "Failed to create MDI parent frame."
+msgstr "Neuspjela izrada MDI matičnog okvira."
+
+#: ../src/common/filename.cpp:1027
+msgid "Failed to create a temporary file name"
+msgstr "Neuspjelo stvaranje imena privremene datoteke"
+
+#: ../src/msw/utilsexc.cpp:228
+msgid "Failed to create an anonymous pipe"
+msgstr "Neuspjelo stvaranje anonimnog cjevovoda"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "Neuspjelo stvaranje instance od \"%s\""
+
+#: ../src/msw/dde.cpp:437
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "Neuspjelo povezivanje na server '%s' na temu '%s'"
+
+#: ../src/msw/cursor.cpp:204
+msgid "Failed to create cursor."
+msgstr "Neuspjelo stvaranje pokazivača."
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "Neuspjelo stvaranje direktorija \"%s\""
+
+#: ../src/generic/dirdlgg.cpp:220
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Neuspjela izrada direktorija '%s'\n"
+"(Imaš li potrebna korisnička prava?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "Neuspjelo stvaranje epoll deskriptora"
+
+#: ../src/msw/mimetype.cpp:238
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "Neuspjela izrada registarskog unosa za '%s' datoteka."
+
+#: ../src/msw/fdrepdlg.cpp:409
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr "Neuspjela izrada standardnog traži/nađi dijaloga (kodna greška %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Neuspjelo stvaranje wake up cjevovoda koju koristi petlja događaja."
+
+#: ../src/html/winpars.cpp:730
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Neuspjeo prikaz HTML dokumenta %s kodiranjem"
+
+#: ../src/msw/clipbrd.cpp:124
+msgid "Failed to empty the clipboard."
+msgstr "Neuspjelo pražnjenje međuspremnika."
+
+#: ../src/unix/displayx11.cpp:212
+msgid "Failed to enumerate video modes"
+msgstr "Neuspjelo pobrojavanje video modusa"
+
+#: ../src/msw/dde.cpp:722
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "Neuspjelo stvoriti advise petlju s DDE serverom"
+
+#: ../src/msw/dialup.cpp:629 ../src/msw/dialup.cpp:863
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Neuspjelo stvaranje aktivne veze pozivanja: %s"
+
+#: ../src/unix/utilsunx.cpp:611
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Neuspjelo izvršavanje '%s'\n"
+
+#: ../src/common/debugrpt.cpp:720
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "Neuspjelo izvršavanje curl-a, instaliraj ga u PATH."
+
+#: ../src/msw/ole/automtn.cpp:505
+#, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "Neuspjelo pronalaženje CLSID-a od \"%s\""
+
+#: ../src/common/regex.cpp:431 ../src/common/regex.cpp:479
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "Neuspjeo nalaženje poklapanja ragularnog izraza: %s"
+
+#: ../src/msw/dialup.cpp:695
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Neuspjelo dobivanje ISP imena: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "Neuspjelo dobivanje OLE sučelje automatizacije za \"%s\""
+
+#: ../src/msw/clipbrd.cpp:711
+msgid "Failed to get data from the clipboard"
+msgstr "Neuspjelo dobivanje podataka iz međuspremnika"
+
+#: ../src/common/time.cpp:223
+msgid "Failed to get the local system time"
+msgstr "Neuspjelo dobivanje lokalnog vremena sustava"
+
+#: ../src/common/filefn.cpp:1345
+msgid "Failed to get the working directory"
+msgstr "Neuspjelo dohvaćanje radnog direktorija"
+
+#: ../src/univ/theme.cpp:114
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "Neuspjelo inicijaliziranje grafičkog sučelja: nema ugrađenih tema."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Neuspjelo inicijaliziranje MS HTML pomoći."
+
+#: ../src/msw/glcanvas.cpp:1381
+msgid "Failed to initialize OpenGL"
+msgstr "Neuspjelo inicijaliziranje OpenGL-a"
+
+#: ../src/msw/dialup.cpp:858
+#, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Neuspjelo inicijaliziranje povezivanja: %s"
+
+#: ../src/gtk/textctrl.cpp:1128
+msgid "Failed to insert text in the control."
+msgstr "Neuspjelo umetanje teksta u kontrolu."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Neuspjelo provjeravanje zaključne datoteke '%s'"
+
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "Neuspjelo instaliranje signalnog upravljača"
+
+#: ../src/unix/threadpsx.cpp:1167
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Neuspjelo povezivanje tijeka, otkrivena ja moguća nedostatna memorija – "
+"ponovo pokreni program"
+
+#: ../src/msw/utils.cpp:629
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Neuspjelo nasilno prekidanje procesa %d"
+
+#: ../src/common/image.cpp:2500
+#, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Neuspjelo učitavanje bitmapa \"%s\" iz resursa."
+
+#: ../src/common/image.cpp:2509
+#, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Neuspjelo učitavanje ikone \"%s\" iz resursa."
+
+#: ../src/common/iconbndl.cpp:225
+#, c-format
+msgid "Failed to load icons from resource '%s'."
+msgstr "Neuspjelo učitavanje ikona iz resursa '%s'."
+
+#: ../src/common/iconbndl.cpp:200
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "Neuspjelo učitavanje slike %%d iz datoteke '%s'."
+
+#: ../src/common/iconbndl.cpp:208
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "Neuspjelo učitavanje slike %d iz tijeka."
+
+#: ../src/common/image.cpp:2587 ../src/common/image.cpp:2606
+#, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "Neuspjelo učitavanje slike iz datoteke \"%s\"."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "Neuspjelo učitavanje metafile iz datoteke \"%s\"."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Neuspjelo učitavanje mpr.dll."
+
+#: ../src/msw/utils.cpp:953
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "Neuspjelo učitavanje resursa \"%s\"."
+
+#: ../src/common/dynlib.cpp:92
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "Neuspjelo učitavanje dijeljenje biblioteke \"%s\"."
+
+#: ../src/osx/core/sound.cpp:145
+#, c-format
+msgid "Failed to load sound from \"%s\" (error %d)."
+msgstr "Neuspjelo učitavanje zvuka iz \"%s\". (greška %d)."
+
+#: ../src/msw/utils.cpp:960
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "Neuspjelo zaključavanje resursa \"%s\"."
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "Neuspjelo zaključavanje zaključne datoteke \"%s\"."
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr "Neuspjelo mijenjanje deskriptora %d u epoll deskriptoru %d"
+
+#: ../src/common/filename.cpp:2575
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "Neuspjelo mijenjanje vremena datoteke za '%s'"
+
+#: ../src/common/selectdispatcher.cpp:258
+msgid "Failed to monitor I/O channels"
+msgstr "Neuspjelo praćenje ulaznih/izlaznih kanala"
+
+#: ../src/common/filename.cpp:175
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Neuspjelo otvaranje '%s' za čitanje"
+
+#: ../src/common/filename.cpp:180
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Neuspjelo otvaranje '%s' za pisanje"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "Neuspjelo otvaranje CHM arhive '%s'."
+
+#: ../src/common/utilscmn.cpp:1126
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Neuspjelo otvaranje URL-a \"%s\" u zadanom pregledniku."
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Neuspjelo otvaranje direktorija \"%s\" za praćenje."
+
+#: ../src/x11/utils.cpp:227
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "Neuspjelo otvaranje ekrana \"%s\"."
+
+#: ../src/common/filename.cpp:1062
+msgid "Failed to open temporary file."
+msgstr "Neuspjelo otvaranje privremene datoteke."
+
+#: ../src/msw/clipbrd.cpp:91
+msgid "Failed to open the clipboard."
+msgstr "Neuspjelo otvaranje međuspremnika."
+
+#: ../src/common/translation.cpp:1184
+#, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Neuspjela obrada oblika množine: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1214
+#, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "Neuspjela priprema pokretanja \"%s\"."
+
+#: ../src/msw/clipbrd.cpp:600
+msgid "Failed to put data on the clipboard"
+msgstr "Neuspjelo spremanje podataka u međuspremnik"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Neuspjelo čitanje PID-a iz zaključne datoteke."
+
+#: ../src/common/fileconf.cpp:433
+msgid "Failed to read config options."
+msgstr "Neuspjelo čitanje opcija koniguracije."
+
+#: ../src/common/docview.cpp:681
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "Neuspjelo čitanje dokumenta iz datoteke \"%s\"."
+
+#: ../src/dfb/evtloop.cpp:98
+msgid "Failed to read event from DirectFB pipe"
+msgstr "Neuspjelo čitanje događaja iz DirectFB cjevovoda"
+
+#: ../src/unix/wakeuppipe.cpp:120
+msgid "Failed to read from wake-up pipe"
+msgstr "Neuspjelo čitanje iz wake-up cjevovoda"
+
+#: ../src/unix/utilsunx.cpp:679
+msgid "Failed to redirect child process input/output"
+msgstr "Neuspjelo preusmjeravanje unosa/iznošaja podređenog procesa"
+
+#: ../src/msw/utilsexc.cpp:701
+msgid "Failed to redirect the child process IO"
+msgstr "Neuspjelo preusmjeravanje podređenog procesa ulaza/izlaza"
+
+#: ../src/msw/dde.cpp:288
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Neuspjelo registriranje DDE servera '%s'"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "Neuspjelo pamćenje kodiranja za skupinu znakova '%s'."
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "Neuspjelo uklanjanje datoteke za izvještaj o otklanjanju grešaka \"%s\""
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "Neuspjelo uklanjanje zaključne datoteke '%s'"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "Neuspjelo uklanjanje stare zaključne datoteke '%s'."
+
+#: ../src/msw/registry.cpp:529
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Neuspjelo preimenovanje registarske vrijednost '%s' u '%s'."
+
+#: ../src/common/filefn.cpp:1122
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"Neuspjelo preimenovanje datoteke '%s' u '%s', jer odredišna datoteka već "
+"postoji."
+
+#: ../src/msw/registry.cpp:634
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Neuspjelo preimenovanje registarskog ključa '%s' u '%s'."
+
+#: ../src/common/filename.cpp:2671
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "Neuspjelo dohvaćanje vremena datoteke za '%s'"
+
+#: ../src/msw/dialup.cpp:468
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Neuspjelo dohvaćanje teksta iz RAS poruke o greškama"
+
+#: ../src/msw/clipbrd.cpp:748
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "Neuspjelo dohvaćanje podržavajućih formata za međuspremnik"
+
+#: ../src/common/docview.cpp:652
+#, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Neuspjelo spremanje dokumenta u datoteku \"%s\"."
+
+#: ../src/msw/dib.cpp:269
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Neuspjelo spremanje bitmap slike u datoteku \"%s\"."
+
+#: ../src/msw/dde.cpp:763
+msgid "Failed to send DDE advise notification"
+msgstr "Neuspjelo slanje DDE advise napomena"
+
+#: ../src/common/ftp.cpp:402
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "Neuspjelo postavljanje modusa za FTP prijenos na %s."
+
+#: ../src/msw/clipbrd.cpp:427
+msgid "Failed to set clipboard data."
+msgstr "Neuspjelo postavljanje podataka međuspremnika"
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "Neuspjelo postavljanje korisničkih prava na zaključnu datoteku \"%s\"."
+
+#: ../src/unix/utilsunx.cpp:668
+msgid "Failed to set process priority"
+msgstr "Neuspjelo postavljanje prioriteta za proces"
+
+#: ../src/common/file.cpp:559
+msgid "Failed to set temporary file permissions"
+msgstr "Neuspjelo postavljanje privremenih korisničkih prava"
+
+#: ../src/gtk/textctrl.cpp:1072
+msgid "Failed to set text in the text control."
+msgstr "Neuspjelo postavljanje teksta u tekst kontrole."
+
+#: ../src/unix/threadpsx.cpp:1298
+#, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "Neuspjelo postavljanje razine podudarnosti tijeka na% lu"
+
+#: ../src/unix/threadpsx.cpp:1424
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Neuspjelo postavljanje prioriteta tijeka %d."
+
+#: ../src/unix/utilsunx.cpp:783
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr ""
+"Neuspjelo postavljanje ne-blokirajućeg cjevovoda. Program će možda zastati."
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "Neuspjelo spremanje slike '%s' u VFS memoriju!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr "Neuspjelo prebacivanje DirectFB cjevovod u ne-blokirajući modus"
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr "Neuspjelo prebacivanje wake up cjevovoda u ne-blokirajući modus"
+
+#: ../src/unix/threadpsx.cpp:1605
+msgid "Failed to terminate a thread."
+msgstr "Neuspjelo prekidanje tijeka."
+
+#: ../src/msw/dde.cpp:741
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "Neuspjelo prekidanje advise petlje s DDE serverom"
+
+#: ../src/msw/dialup.cpp:938
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Neuspjelo prekidanje veze pozivanja: %s"
+
+#: ../src/common/filename.cpp:2590
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "Neuspjelo dodirivanje datoteke '%s'"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "Neuspjelo otključavanje zaključne datoteke '%s'"
+
+#: ../src/msw/dde.cpp:309
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "Neuspjelo odjavljivanje DDE servera '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Neuspjelo odjavljivanje deskriptora %d iz epoll deskriptora %d"
+
+#: ../src/common/fileconf.cpp:1006
+msgid "Failed to update user configuration file."
+msgstr "Neuspjelo aktualiziranje datoteke korisničke konfiguracije."
+
+#: ../src/common/debugrpt.cpp:733
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Neuspjeli prijenos izvještaja o ispravljanju grešaka (kôd greške %d)."
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "Neuspjelo pisanje u datoteku za zaključavanje '%s'."
+
+#. TRANSLATORS: Name of Boolean false value
+#: ../src/propgrid/propgrid.cpp:209
+msgid "False"
+msgstr "Netočno"
+
+#. TRANSLATORS: Label of font family
+#: ../src/propgrid/advprops.cpp:694
+msgid "Family"
+msgstr "Obitelj"
+
+#: ../src/common/stockitem.cpp:157
+msgid "File"
+msgstr "Datoteka"
+
+#: ../src/common/docview.cpp:669
+#, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "Nije bilo moguće otvoriti datoteku '%s', za čitanje."
+
+#: ../src/common/docview.cpp:646
+#, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "Nije bilo moguće otvoriti datoteku '%s', za zapisivanje."
+
+#: ../src/generic/filedlgg.cpp:346 ../src/gtk/filedlg.cpp:57
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "Datoteka '%s'već postoji. Sigurno je želiš prepisati?"
+
+#: ../src/common/filefn.cpp:1156
+#, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "Nije bilo moguće ukloniti datoteku '%s'"
+
+#: ../src/common/filefn.cpp:1139
+#, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "Datoteku '%s' nije bilo moguće preimenovati '%s'"
+
+#: ../src/richtext/richtextctrl.cpp:3081 ../src/common/textcmn.cpp:953
+msgid "File couldn't be loaded."
+msgstr "Nije bilo moguće učitati datoteku."
+
+#: ../src/msw/filedlg.cpp:393
+#, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "Greška u dijalogu, sa šifrom greške %0lx."
+
+#: ../src/common/docview.cpp:1789
+msgid "File error"
+msgstr "Greška datoteke"
+
+#: ../src/generic/dirctrlg.cpp:588 ../src/generic/filectrlg.cpp:770
+msgid "File name exists already."
+msgstr "Ime datoteke već postoji."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Datoteke"
+
+#: ../src/common/filefn.cpp:1591
+#, c-format
+msgid "Files (%s)"
+msgstr "Datoteke (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Filtar"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:490
+msgid "Find"
+msgstr "Nađi"
+
+#: ../src/common/stockitem.cpp:159
+msgid "First"
+msgstr "Prvi"
+
+#: ../src/common/prntbase.cpp:1548
+msgid "First page"
+msgstr "Prva stranica"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+msgid "Fixed"
+msgstr "Fiksni"
+
+#: ../src/html/helpwnd.cpp:1206
+msgid "Fixed font:"
+msgstr "Font fiksne širine:"
+
+#: ../src/html/helpwnd.cpp:1269
+msgid "Fixed size face. bold italic "
+msgstr "Font fiksne širine. debeli kurziv "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+msgid "Floating"
+msgstr "Lebdeći"
+
+#: ../src/common/stockitem.cpp:160
+msgid "Floppy"
+msgstr "Floppy"
+
+#: ../src/common/paper.cpp:111
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio, 8 1/2 × 13 in"
+
+#: ../src/richtext/richtextformatdlg.cpp:344 ../src/osx/carbon/fontdlg.cpp:287
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Font"
+
+#: ../src/richtext/richtextfontpage.cpp:221
+msgid "Font &weight:"
+msgstr "&Debljina fonta:"
+
+#: ../src/html/helpwnd.cpp:1207
+msgid "Font size:"
+msgstr "Veličina fonta:"
+
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Font st&yle:"
+msgstr "St&il fonta:"
+
+#: ../src/osx/carbon/fontdlg.cpp:329
+msgid "Font:"
+msgstr "Font:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr "Indeksna datoteka fontova %s je nestala prilikom učitavanja fontova."
+
+#: ../src/unix/utilsunx.cpp:645
+msgid "Fork failed"
+msgstr "Račvanje nije uspjelo"
+
+#: ../src/common/stockitem.cpp:161
+msgid "Forward"
+msgstr "Naprijed"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "Hrefs prema naprijed nisu podržani"
+
+#: ../src/html/helpwnd.cpp:875
+#, c-format
+msgid "Found %i matches"
+msgstr "Nađena su %i poklapanja"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "Od:"
+
+#: ../src/propgrid/advprops.cpp:1604
+msgid "Fuchsia"
+msgstr "Lisičja"
+
+#: ../src/common/imaggif.cpp:138
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: čini se, da je prijenos podataka odrezan."
+
+#: ../src/common/imaggif.cpp:128
+msgid "GIF: error in GIF image format."
+msgstr "GIF: greška u GIF formatu slike."
+
+#: ../src/common/imaggif.cpp:133
+msgid "GIF: not enough memory."
+msgstr "GIF: nema dovoljno memorije."
+
+#: ../src/gtk/window.cpp:4631
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+"Na ovom računalu instalirani GTK+ je pre star za podržavanje dijeljenja "
+"ekrana, instaliraj GTK+ 2.12 ili noviju verziju."
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "GTK+ tema"
+
+#: ../src/common/preferencescmn.cpp:40
+msgid "General"
+msgstr "Općenito"
+
+#: ../src/common/prntbase.cpp:258
+msgid "Generic PostScript"
+msgstr "Generički PostScript"
+
+#: ../src/common/paper.cpp:135
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "Njemački Legal presavijen, 8 1/2 × 13 in"
+
+#: ../src/common/paper.cpp:134
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "Njemački Std presavijen, 8 1/2 × 12 in"
+
+#: ../include/wx/xtiprop.h:184
+msgid "GetProperty called w/o valid getter"
+msgstr "GetProperty je pozvano bez valjanog dobavljača"
+
+#: ../include/wx/xtiprop.h:262
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "GetPropertyCollection je pozvano na generički pristupnik"
+
+#: ../include/wx/xtiprop.h:202
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "GetPropertyCollection je pozvano bez valjanog dobavljača kolekcija"
+
+#: ../src/html/helpwnd.cpp:660
+msgid "Go back"
+msgstr "Idi natrag"
+
+#: ../src/html/helpwnd.cpp:661
+msgid "Go forward"
+msgstr "Idi naprijed"
+
+#: ../src/html/helpwnd.cpp:663
+msgid "Go one level up in document hierarchy"
+msgstr "Idi jednu razinu prema gore u hijerarhiji dokumenata"
+
+#: ../src/generic/filedlgg.cpp:208 ../src/generic/dirdlgg.cpp:116
+msgid "Go to home directory"
+msgstr "Idi na osnovnu mapu"
+
+#: ../src/generic/filedlgg.cpp:205
+msgid "Go to parent directory"
+msgstr "Idi na matičnu mapu"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Grafike su izrađene od "
+
+#: ../src/propgrid/advprops.cpp:1599
+msgid "Gray"
+msgstr "Siva"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:883
+msgid "GrayText"
+msgstr "GrayText"
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Grčki (ISO-8859-7)"
+
+#: ../src/propgrid/advprops.cpp:1600
+msgid "Green"
+msgstr "Zelena"
+
+#: ../src/generic/colrdlgg.cpp:342
+msgid "Green:"
+msgstr "Zelena:"
+
+#: ../src/richtext/richtextborderspage.cpp:615
+msgid "Groove"
+msgstr "Groove"
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Gzip nije podržan od ove verzije zlib-a"
+
+#: ../src/html/helpwnd.cpp:1549
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "HTML pomoćni projekt (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:681
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "HTML sidro %s ne postoji."
+
+#: ../src/html/helpwnd.cpp:1547
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "HTML datoteke (*.html;*.htm)|*.html;*.htm|"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1759
+msgid "Hand"
+msgstr "Ruka"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr "Čvrsti disk"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Hebrejski (ISO-8859-8-E)"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../include/wx/msgdlg.h:280 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/common/accelcmn.cpp:80
+#: ../src/html/helpdlg.cpp:66 ../src/html/helpfrm.cpp:111
+msgid "Help"
+msgstr "Help"
+
+#: ../src/html/helpwnd.cpp:1200
+msgid "Help Browser Options"
+msgstr "Pomoć za opcije preglednika"
+
+#: ../src/generic/helpext.cpp:454 ../src/generic/helpext.cpp:455
+msgid "Help Index"
+msgstr "Pomoć za index"
+
+#: ../src/html/helpwnd.cpp:1531
+msgid "Help Printing"
+msgstr "Pomoć za ispis"
+
+#: ../src/html/helpwnd.cpp:801
+msgid "Help Topics"
+msgstr "Pomoć za teme"
+
+#: ../src/html/helpwnd.cpp:1548
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Pomoćne knjige (*.htb)|*.htb|Pomoćne knjige (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:267
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "Mapa pomoći \"%s\" nije nađena."
+
+#: ../src/generic/helpext.cpp:275
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "Datoteka pomoći \"%s\" nije nađena."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Pomoć: %s"
+
+#: ../src/osx/menu_osx.cpp:577
+#, c-format
+msgid "Hide %s"
+msgstr "Sakrij %s"
+
+#: ../src/osx/menu_osx.cpp:579
+msgid "Hide Others"
+msgstr "Sakrij ostalo"
+
+#: ../src/generic/infobar.cpp:84
+msgid "Hide this notification message."
+msgstr "Sakrij ovu obavijest."
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:884
+msgid "Highlight"
+msgstr "Highlight"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:885
+msgid "HighlightText"
+msgstr "HighlightText"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/stockitem.cpp:164 ../src/common/accelcmn.cpp:65
+msgid "Home"
+msgstr "Home"
+
+#: ../src/generic/dirctrlg.cpp:524
+msgid "Home directory"
+msgstr "Početna mapa (home)"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr "Kako će se objekt postaviti u odnosu na tekst."
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1760
+msgid "I-Beam"
+msgstr "I-greda"
+
+#: ../src/common/imagbmp.cpp:1196
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: Greška prilikom čitanja DIB maske."
+
+#: ../src/common/imagbmp.cpp:1290 ../src/common/imagbmp.cpp:1390
+#: ../src/common/imagbmp.cpp:1405 ../src/common/imagbmp.cpp:1416
+#: ../src/common/imagbmp.cpp:1430 ../src/common/imagbmp.cpp:1478
+#: ../src/common/imagbmp.cpp:1493 ../src/common/imagbmp.cpp:1507
+#: ../src/common/imagbmp.cpp:1518
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: Greška prilikom zapisivanja slike!"
+
+#: ../src/common/imagbmp.cpp:1255
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Slika je pre visoka za ikonu."
+
+#: ../src/common/imagbmp.cpp:1263
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Slika je pre široka za ikonu."
+
+#: ../src/common/imagbmp.cpp:1603
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Nevaljani indeks ikone."
+
+#: ../src/common/imagiff.cpp:758
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: čini se, da je prijenos podataka odrezan."
+
+#: ../src/common/imagiff.cpp:742
+msgid "IFF: error in IFF image format."
+msgstr "IFF: greška u IFF formatu slike."
+
+#: ../src/common/imagiff.cpp:745
+msgid "IFF: not enough memory."
+msgstr "IFF: nema dovoljno memorije."
+
+#: ../src/common/imagiff.cpp:748
+msgid "IFF: unknown error!!!"
+msgstr "IFF: nepoznata greška!!!"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "Japanski (ISO-2022-JP)"
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+"Ako moguće, pokušj promijeniti parametre za poredak stranice, kako bi ispis "
+"ispao uži."
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Ako imaš dodatne informacije za ovaj izvještaj o grešci\n"
+"unesi ih ovdje. Bit će dodane u izvještaj:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Ako ne želiš nastaviti s izvještajem o otklanjanju grešaka, odaberi \"Odustani"
+"\".\n"
+"Time na žalost onemogućuješ ispravljanje grešaka u budućnosti.\n"
+"Ako možeš, molimo te da nastaviš s izradom izvještaja.\n"
+
+#: ../src/msw/registry.cpp:1405
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "Zanemarivanje vrijednosti \"%s\" tipke \"%s\"."
+
+#: ../src/common/xtistrm.cpp:295
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Nevažeći razred objekta (Non-wxEvtHandler) kao izvor događaja"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "Nevažeće brojenje parametara za ConstructObject metodu"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Nevažeće brojenje parametara za Create metodu"
+
+#: ../src/generic/dirctrlg.cpp:570 ../src/generic/filectrlg.cpp:756
+msgid "Illegal directory name."
+msgstr "Nevažeće ime mape."
+
+#: ../src/generic/filectrlg.cpp:1367
+msgid "Illegal file specification."
+msgstr "Nevažeća specifikacija datoteke."
+
+#: ../src/common/image.cpp:2269
+msgid "Image and mask have different sizes."
+msgstr "Slika i maska imaju različite veličine."
+
+#: ../src/common/image.cpp:2746
+#, c-format
+msgid "Image file is not of type %d."
+msgstr "Datoteka slike nije vrste %d."
+
+#: ../src/common/image.cpp:2877
+#, c-format
+msgid "Image is not of type %s."
+msgstr "Slika nije vrste %s."
+
+#: ../src/msw/textctrl.cpp:488
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Stvaranje uređivača bogatog teksta nije moguće, koristi se jednostavni "
+"uređivač. Instaliraj riched32.dll ponovo"
+
+#: ../src/unix/utilsunx.cpp:301
+msgid "Impossible to get child process input"
+msgstr "Nije moguće dobiti unos podređenog procesa"
+
+#: ../src/common/filefn.cpp:1028
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Nije moguće dobiti dozvolu za datoteku '%s'"
+
+#: ../src/common/filefn.cpp:1042
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Nije moguće prepisati datoteku '%s'"
+
+#: ../src/common/filefn.cpp:1097
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Nije moguće postaviti korisnička prava za datoteku '%s'"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:886
+msgid "InactiveBorder"
+msgstr "InactiveBorder"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:887
+msgid "InactiveCaption"
+msgstr "InactiveCaption"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:888
+msgid "InactiveCaptionText"
+msgstr "InactiveCaptionText"
+
+#: ../src/common/gifdecod.cpp:792
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr "Nepravilna veličina GIF okvira (%u, %d) za okvir #%u"
+
+#: ../src/msw/ole/automtn.cpp:635
+msgid "Incorrect number of arguments."
+msgstr "Nepravilan broj argumenata."
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Uvlaka"
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "Indents && Spacing"
+msgstr "Uvlake &i razmaci"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:515
+msgid "Index"
+msgstr "Indeks"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Indijski (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr "Informacije"
+
+#: ../src/common/init.cpp:287
+msgid "Initialization failed in post init, aborting."
+msgstr "Inicijalizacija naknadne inicijalizacije nije uspjela, prekid."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:54
+msgid "Ins"
+msgstr "Ins"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/richtext/richtextsymboldlg.cpp:472 ../src/common/accelcmn.cpp:53
+msgid "Insert"
+msgstr "Insert"
+
+#: ../src/richtext/richtextbuffer.cpp:8067
+msgid "Insert Field"
+msgstr "Umetni polje"
+
+#: ../src/richtext/richtextbuffer.cpp:7978
+#: ../src/richtext/richtextbuffer.cpp:8936
+msgid "Insert Image"
+msgstr "Umetni sliku"
+
+#: ../src/richtext/richtextbuffer.cpp:8025
+msgid "Insert Object"
+msgstr "Umetni objekt"
+
+#: ../src/richtext/richtextctrl.cpp:1286 ../src/richtext/richtextctrl.cpp:1494
+#: ../src/richtext/richtextbuffer.cpp:7822
+#: ../src/richtext/richtextbuffer.cpp:7852
+#: ../src/richtext/richtextbuffer.cpp:7894
+msgid "Insert Text"
+msgstr "Umetni tekst"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr "Umetni prijelom stranice prije odlomka."
+
+#: ../src/richtext/richtextborderspage.cpp:617
+msgid "Inset"
+msgstr "Sužavanje"
+
+#: ../src/gtk/app.cpp:425
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr "Nevaljana GTK+ opcija naredbenog retka, koristi \"%s --help\""
+
+#: ../src/common/imagtiff.cpp:311
+msgid "Invalid TIFF image index."
+msgstr "Nevaljani index TIFF slike."
+
+#: ../src/common/appcmn.cpp:273
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "Nevaljana specifikacija modusa prikaza '%s'."
+
+#: ../src/x11/app.cpp:127
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Nevaljana specifikacija geometrije '%s'"
+
+#: ../src/unix/fswatcher_inotify.cpp:323
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr "Nevaljani inotify događaj za \"%s\""
+
+#: ../src/unix/snglinst.cpp:312
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Nevaljana datoteka za zaključavanje '%s'."
+
+#: ../src/common/translation.cpp:1125
+msgid "Invalid message catalog."
+msgstr "Nevaljani katalog obavijesti."
+
+#: ../src/common/xtistrm.cpp:405 ../src/common/xtistrm.cpp:420
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "Nevaljani ili Null ID objekta je proslijeđen na GetObjectClassInfo"
+
+#: ../src/common/xtistrm.cpp:435
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "Nevaljani ili Null ID objekta je proslijeđen na HasObjectClassInfo"
+
+#: ../src/common/regex.cpp:310
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Nevaljan regularni izraz '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+"Nevaljana vrijedonst %ld za booleov ključ \"%s\" u konfiguracijskoj datoteci."
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:351
+#: ../src/osx/carbon/fontdlg.cpp:361 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Kurziv"
+
+#: ../src/common/paper.cpp:130
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Talijanska kuverta, 110 × 230 mm"
+
+#: ../src/common/imagjpeg.cpp:270
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: Nije bilo moguće učitati – datoteka je vjerojatno oštećena."
+
+#: ../src/common/imagjpeg.cpp:449
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: Nije bilo moguće spremiti sliku."
+
+#: ../src/common/paper.cpp:163
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Japanska dupla razglednica 200 × 148 mm"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Chou #3"
+msgstr "Japanska kuverta Chou #3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Japanska kuverta Chou #3 rotirano"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #4"
+msgstr "Japanska kuverta Chou #4"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Japanska kuverta Chou #4 rotirano"
+
+#: ../src/common/paper.cpp:165
+msgid "Japanese Envelope Kaku #2"
+msgstr "Japanska kuverta Kaku #2"
+
+#: ../src/common/paper.cpp:178
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Japanska kuverta Kaku #2 rotirano"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #3"
+msgstr "Japanska kuverta Kaku #3"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Japanska kuverta Kaku #3 rotirano"
+
+#: ../src/common/paper.cpp:185
+msgid "Japanese Envelope You #4"
+msgstr "Japanska kuverta You #4"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Japanska kuverta You #4 rotirano"
+
+#: ../src/common/paper.cpp:138
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Japanska razglednica 100 × 148 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Japanska razglednica rotirano 148 × 100 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr "Prijeđi na"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Poravnato"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Poravnaj tekst lijevo i desno."
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:265 ../src/common/accelcmn.cpp:347
+msgid "KP_"
+msgstr "KP_"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_Add"
+msgstr "KP_Add"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_Begin"
+msgstr "KP_Begin"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:109
+msgid "KP_Decimal"
+msgstr "KP_Decimal"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_Delete"
+msgstr "KP_Delete"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:110
+msgid "KP_Divide"
+msgstr "KP_Divide"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_Down"
+msgstr "KP_Down"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_End"
+msgstr "KP_End"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_Enter"
+msgstr "KP_Enter"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_Equal"
+msgstr "KP_Equal"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_Home"
+msgstr "KP_Home"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_Insert"
+msgstr "KP_Insert"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_Left"
+msgstr "KP_Left"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_Multiply"
+msgstr "KP_Multiply"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_Next"
+msgstr "KP_Next"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_PageDown"
+msgstr "KP_PageDown"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PageUp"
+msgstr "KP_PageUp"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_Prior"
+msgstr "KP_Prior"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_Right"
+msgstr "KP_Right"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_Separator"
+msgstr "KP_Separator"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_Space"
+msgstr "KP_Space"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:108
+msgid "KP_Subtract"
+msgstr "KP_Subtract"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_Tab"
+msgstr "KP_Tab"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_Up"
+msgstr "KP_Up"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr "Prore&d:"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Položeno"
+
+#: ../src/common/stockitem.cpp:174
+msgid "Last"
+msgstr "Zadnji"
+
+#: ../src/common/prntbase.cpp:1572
+msgid "Last page"
+msgstr "Zadnja stranica"
+
+#: ../src/common/log.cpp:305
+#, c-format
+msgid "Last repeated message (\"%s\", %u time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %u times) wasn't output"
+msgstr[0] "Zadnja ponovljena poruka (\"%s\", %u puta) nije iznešena"
+msgstr[1] "Zadnja ponovljena poruka (\"%s\", %u puta) nije iznešena"
+msgstr[2] "Zadnja ponovljena poruka (\"%s\", %u puta) nije iznešena"
+
+#: ../src/common/paper.cpp:103
+msgid "Ledger, 17 x 11 in"
+msgstr "Ledger, 17 × 11 in"
+
+#. TRANSLATORS: Keystroke for manipulating a tree control
+#. TRANSLATORS: Name of keyboard key
+#: ../src/generic/datavgen.cpp:6146
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:186
+#: ../src/richtext/richtextbulletspage.cpp:189
+#: ../src/richtext/richtextbulletspage.cpp:190
+#: ../src/richtext/richtextsizepage.cpp:249 ../src/common/accelcmn.cpp:61
+msgid "Left"
+msgstr "Left"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Lijevo (prvi redak):"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1761
+msgid "Left Button"
+msgstr "Gumb-Lijevo"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Lijeva margina (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Poravnaj tekst u lijevo."
+
+#: ../src/common/paper.cpp:144
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Legal Extra 9 1/2 x 15 in"
+
+#: ../src/common/paper.cpp:96
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Legal, 8 1/2 x 14 in"
+
+#: ../src/common/paper.cpp:143
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Letter Extra 9 1/2 x 12 in"
+
+#: ../src/common/paper.cpp:149
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "Letter Extra Transverse 9.275 x 12 in"
+
+#: ../src/common/paper.cpp:152
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Letter Plus 8 1/2 x 12.69 in"
+
+#: ../src/common/paper.cpp:169
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Letter Rotated 11 x 8 1/2 in"
+
+#: ../src/common/paper.cpp:101
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Letter Small, 8 1/2 x 11 in"
+
+#: ../src/common/paper.cpp:147
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Letter Transverse 8 1/2 x 11 in"
+
+#: ../src/common/paper.cpp:95
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Letter, 8 1/2 x 11 in"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "Licenca"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Svijetli"
+
+#: ../src/propgrid/advprops.cpp:1608
+msgid "Lime"
+msgstr "Limun"
+
+#: ../src/generic/helpext.cpp:294
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr "%lu. redak datoteke \"%s\" ima nevaljanu sintaksu, preskočeno."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Prored:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "Poveznica je sadržavala '//'; pretvorena je u apsolutnu poveznicu."
+
+#: ../src/richtext/richtextformatdlg.cpp:364
+msgid "List Style"
+msgstr "Stil popisa"
+
+#: ../src/richtext/richtextstyles.cpp:1064
+msgid "List styles"
+msgstr "Stilovi popisa"
+
+#: ../src/richtext/richtextfontpage.cpp:197
+#: ../src/richtext/richtextfontpage.cpp:199
+msgid "Lists font sizes in points."
+msgstr "Popisuje veličine fonta u tiplografskim točkama."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+msgid "Lists the available fonts."
+msgstr "Popisuje dostupne fontove."
+
+#: ../src/common/fldlgcmn.cpp:340
+#, c-format
+msgid "Load %s file"
+msgstr "Učitaj %s datoteku"
+
+#: ../src/html/htmlwin.cpp:597
+msgid "Loading : "
+msgstr "Učitavanje : "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "Datoteka za zaključavanje '%s' ima neipravnog vlasnika."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "Datoteka za zaključavanje '%s' ima neipravna korisnička prava."
+
+#: ../src/generic/logg.cpp:576
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Log je spremljen u datoteku '%s'."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:276
+msgid "Lower case letters"
+msgstr "Mala slova"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Lower case roman numerals"
+msgstr "Mali rimski brojevi"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "MDI child"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Funkcije za MS HTML pomoć nisu dostupne, jer biblioteka za MS HTML pomoć nije "
+"instalirana na ovom računalu. Instaliraj je."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Ma&ksimiraj"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr "MacArapski"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "MacArmenski"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "MacBengalski"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr "MacBurmanski"
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr "MacKeltski"
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr "MacSrednjeeuropskiLatinični"
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "MacKineskiPojednostavljeni"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "MacKineskiTradicionalni"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "MacHrvatski"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "MacĆirilica"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr "MacDevanagarski"
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr "MacDingbats"
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "MacEtiopski"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr "MacProšireniArapski"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "MacGalski"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "MacGruzijski"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "MacGrčki"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr "MacGudžaratski"
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr "MacGurmuški"
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "MacHebrejski"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "MacIslandski"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "MacJapanski"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr "MacKanarezijski"
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr "MacGrafemiTipkovnice"
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr "MacKmerski"
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "MacKorejanski"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr "MacLaoški"
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr "MacMalajalamski"
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "MacMongolski"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr "MacOrijski"
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr "MacLatinični"
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr "MacRumunjski"
+
+#: ../src/common/fmapbase.cpp:216
+msgid "MacSinhalese"
+msgstr "MacSinhalski"
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr "MacSimbolni"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "MacTamilski"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr "MacTeluški"
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "MacTajski"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "MacTibetanski"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "MacTurski"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "MacVijetnamski"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1762
+msgid "Magnifier"
+msgstr "Povećalo"
+
+#: ../src/propgrid/advprops.cpp:2143
+msgid "Make a selection:"
+msgstr "Stvori odabir:"
+
+#: ../src/richtext/richtextformatdlg.cpp:374
+#: ../src/richtext/richtextmarginspage.cpp:171
+msgid "Margins"
+msgstr "Margine"
+
+#: ../src/propgrid/advprops.cpp:1595
+msgid "Maroon"
+msgstr "Kestenjasta"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Usporedi veličinu slova"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+msgid "Max height:"
+msgstr "Maks. visina:"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+msgid "Max width:"
+msgstr "Maks. širina:"
+
+#: ../src/unix/mediactrl.cpp:947
+#, c-format
+msgid "Media playback error: %s"
+msgstr "Greška u pokretanju medija: %s"
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "Memorija VFS već sadržava datoteku '%s'!"
+
+#. TRANSLATORS: Name of keyboard key
+#. TRANSLATORS: Keyword of system colour
+#: ../src/common/accelcmn.cpp:73 ../src/propgrid/advprops.cpp:889
+msgid "Menu"
+msgstr "Menu"
+
+#: ../src/common/msgout.cpp:124
+msgid "Message"
+msgstr "Poruka"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Metalna tema"
+
+#: ../src/msw/ole/automtn.cpp:652
+msgid "Method or property not found."
+msgstr "Metoda ili osobina nisu nađeni."
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Mi&nimiraj"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1763
+msgid "Middle Button"
+msgstr "Gumb-Sredina"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+msgid "Min height:"
+msgstr "Min. visina:"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr "Min. širina:"
+
+#: ../src/msw/ole/automtn.cpp:668
+msgid "Missing a required parameter."
+msgstr "Nedostaje obavezan parametar."
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Moderni"
+
+#: ../src/generic/filectrlg.cpp:427
+msgid "Modified"
+msgstr "Izmijenjeno"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "Inicijalizacija modula \"%s\" nije uspjela"
+
+#: ../src/common/paper.cpp:131
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Monarch kuverta, 3 7/8 × 7 1/2 in"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr "Praćenje promjena pojedinih datoteka se trenutačno ne podržava."
+
+#: ../src/generic/editlbox.cpp:172
+msgid "Move down"
+msgstr "Premjesti se dolje"
+
+#: ../src/generic/editlbox.cpp:171
+msgid "Move up"
+msgstr "Premjesti se gore"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+msgid "Moves the object to the next paragraph."
+msgstr "Premješta objekt u sljedeći odlomak."
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "Moves the object to the previous paragraph."
+msgstr "Premješta objekt u prethodni odlomak."
+
+#: ../src/richtext/richtextbuffer.cpp:9966
+msgid "Multiple Cell Properties"
+msgstr "Višestruka svojstva ćelije"
+
+#: ../src/generic/filectrlg.cpp:424
+msgid "Name"
+msgstr "Ime"
+
+#: ../src/propgrid/advprops.cpp:1596
+msgid "Navy"
+msgstr "Mornarsko plava"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr "Mreža"
+
+#: ../src/common/stockitem.cpp:176
+msgid "New"
+msgstr "Novo"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+msgid "New &Box Style..."
+msgstr "Novi stil &okvira …"
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Novi stil &slovnih znakova …"
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Novi stil &popisa …"
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Novi stil &odlomka …"
+
+#: ../src/richtext/richtextstyledlg.cpp:606
+#: ../src/richtext/richtextstyledlg.cpp:611
+#: ../src/richtext/richtextstyledlg.cpp:654
+#: ../src/richtext/richtextstyledlg.cpp:659
+#: ../src/richtext/richtextstyledlg.cpp:820
+#: ../src/richtext/richtextstyledlg.cpp:825
+#: ../src/richtext/richtextstyledlg.cpp:893
+#: ../src/richtext/richtextstyledlg.cpp:901
+#: ../src/richtext/richtextstyledlg.cpp:934
+#: ../src/richtext/richtextstyledlg.cpp:939
+msgid "New Style"
+msgstr "Novi stil"
+
+#: ../src/generic/editlbox.cpp:169
+msgid "New item"
+msgstr "Nova stavka"
+
+#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:307
+#: ../src/generic/filectrlg.cpp:618 ../src/generic/filectrlg.cpp:627
+msgid "NewName"
+msgstr "NovoIme"
+
+#: ../src/common/prntbase.cpp:1567 ../src/html/helpwnd.cpp:665
+msgid "Next page"
+msgstr "Sljedeća stranica"
+
+#: ../include/wx/msgdlg.h:277 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Ne"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1764
+msgid "No Entry"
+msgstr "Zabranjen ulaz"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "Nijedan upravljač animacijama za vrstu %ld nije određen."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "Nijedan upravljač bitmapa za vrstu %d nije određen."
+
+#: ../src/common/utilscmn.cpp:1077
+msgid "No default application configured for HTML files."
+msgstr "Nije konfigurirana standardna aplikacija za HTML datoteke."
+
+#: ../src/generic/helpext.cpp:445
+msgid "No entries found."
+msgstr "Unosi nisu nađeni."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Nijedan font nije nađen za prikaz teksta, kodiranog u '%s',\n"
+"no dostupno je alternativno kodiranje '%s'.\n"
+"Želiš li koristiti ovo kodiranje (inače ćeš morati odabrati neko drugo)?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Nijedan font nije nađen za prikaz teksta, kodiranog u '%s'.\n"
+"Želiš li odabrati font za ovo kodiranje (inače se tekst s ovim\n"
+"kodiranjem neće pravilno prikazati)?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "Nijedan upravljač za vrstu animacije nije određen."
+
+#: ../src/common/image.cpp:2728
+msgid "No handler found for image type."
+msgstr "Nije nađen upravljač za vrstu slike."
+
+#: ../src/common/image.cpp:2736 ../src/common/image.cpp:2848
+#: ../src/common/image.cpp:2901
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "Nijedan upravljač slikama za vrstu %d nije određen."
+
+#: ../src/common/image.cpp:2871 ../src/common/image.cpp:2915
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "Nijedan upravljač slikama za vrstu %s nije određen."
+
+#: ../src/html/helpwnd.cpp:858
+msgid "No matching page found yet"
+msgstr "Dosada nije nađena odgovarajuće stranica"
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Bez zvuka"
+
+#: ../src/common/image.cpp:2277 ../src/common/image.cpp:2318
+msgid "No unused colour in image being masked."
+msgstr "Nema nekorištenih boja u slici, koja se maskira."
+
+#: ../src/common/image.cpp:3374
+msgid "No unused colour in image."
+msgstr "Nema nekorištenih boja u slici."
+
+#: ../src/generic/helpext.cpp:302
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "Nije nađeno valjano mapiranje u datoteci \"%s\"."
+
+#: ../src/richtext/richtextborderspage.cpp:610
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+msgid "None"
+msgstr "Bez"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Nordic (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normalno"
+
+#: ../src/html/helpwnd.cpp:1263
+msgid "Normal face and underlined . "
+msgstr "Normalni rez i podcrtano . "
+
+#: ../src/html/helpwnd.cpp:1205
+msgid "Normal font:"
+msgstr "Normalni font:"
+
+#: ../src/propgrid/props.cpp:1128
+#, c-format
+msgid "Not %s"
+msgstr "Nije %s"
+
+#: ../include/wx/filename.h:573 ../include/wx/filename.h:578
+msgid "Not available"
+msgstr "Nije dostupno"
+
+#: ../src/richtext/richtextfontpage.cpp:358
+msgid "Not underlined"
+msgstr "Nije podcrtano"
+
+#: ../src/common/paper.cpp:115
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Note, 8 1/2 × 11 in"
+
+#: ../src/generic/notifmsgg.cpp:132
+msgid "Notice"
+msgstr "Napomena"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:105
+msgid "Num *"
+msgstr "Num *"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:106
+msgid "Num +"
+msgstr "Num +"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:107
+msgid "Num ,"
+msgstr "Num ,"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:108
+msgid "Num -"
+msgstr "Num -"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:109
+msgid "Num ."
+msgstr "Num ."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:110
+msgid "Num /"
+msgstr "Num /"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:104
+msgid "Num ="
+msgstr "Num ="
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:101
+msgid "Num Begin"
+msgstr "Num Begin"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:103
+msgid "Num Delete"
+msgstr "Num Delete"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:95
+msgid "Num Down"
+msgstr "Num Down"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:100
+msgid "Num End"
+msgstr "Num End"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:90
+msgid "Num Enter"
+msgstr "Num Enter"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:91
+msgid "Num Home"
+msgstr "Num Home"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:102
+msgid "Num Insert"
+msgstr "Num Insert"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:86
+msgid "Num Lock"
+msgstr "Num Lock"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:97
+msgid "Num Page Down"
+msgstr "Num Page Down"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:96
+msgid "Num Page Up"
+msgstr "Num Page Up"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:94
+msgid "Num Right"
+msgstr "Num Right"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:88
+msgid "Num Space"
+msgstr "Num Space"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:89
+msgid "Num Tab"
+msgstr "Num Tab"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:93
+msgid "Num Up"
+msgstr "Num Up"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:92
+msgid "Num left"
+msgstr "Num left"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:86
+msgid "Num_lock"
+msgstr "Num_lock"
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:279
+msgid "Numbered outline"
+msgstr "Numerirani pregled"
+
+#: ../include/wx/msgdlg.h:278 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:454
+#: ../src/msw/msgdlg.cpp:747 ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "U redu"
+
+#: ../src/msw/ole/automtn.cpp:692
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr "Greška OLE automatizacije u %s: %s"
+
+#: ../include/wx/richtext/richtextimagedlg.h:37
+msgid "Object Properties"
+msgstr "Osobine objekta"
+
+#: ../src/msw/ole/automtn.cpp:660
+msgid "Object implementation does not support named arguments."
+msgstr "Implementacija objekta ne podržava imenovane argumente."
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Objekt mora imati id svojstvo"
+
+#: ../src/propgrid/advprops.cpp:1601
+msgid "Olive"
+msgstr "Maslinasta"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:325
+msgid "Opaci&ty:"
+msgstr "Neprozirnos&t:"
+
+#: ../src/generic/colrdlgg.cpp:354
+msgid "Opacity:"
+msgstr "Neprozirnost:"
+
+#: ../src/common/docview.cpp:1773 ../src/common/docview.cpp:1815
+msgid "Open File"
+msgstr "Otvori datoteku"
+
+#: ../src/html/helpwnd.cpp:671 ../src/html/helpwnd.cpp:1554
+msgid "Open HTML document"
+msgstr "Otvori HTML datoteku"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Otvori datoteku \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+msgid "Open..."
+msgstr "Otvori …"
+
+#: ../src/unix/glx11.cpp:506 ../src/msw/glcanvas.cpp:592
+msgid "OpenGL 3.0 or later is not supported by the OpenGL driver."
+msgstr "OpenGL driver ne podržava OpenGL 3.0 i novije."
+
+#: ../src/generic/dirctrlg.cpp:599 ../src/generic/dirdlgg.cpp:323
+#: ../src/generic/filectrlg.cpp:642 ../src/generic/filectrlg.cpp:786
+msgid "Operation not permitted."
+msgstr "Operacija nije dozvoljena."
+
+#: ../src/common/cmdline.cpp:900
+#, c-format
+msgid "Option '%s' can't be negated"
+msgstr "Nije moguće negirati opciju '%s'"
+
+#: ../src/common/cmdline.cpp:1064
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "Opcija '%s' zahtijeva vrijednost."
+
+#: ../src/common/cmdline.cpp:1147
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "Opcija '%s': Nije moguće konvertirati ’%s’ u datum."
+
+#: ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Opcije"
+
+#: ../src/propgrid/advprops.cpp:1606
+msgid "Orange"
+msgstr "Narančasta"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Položaj"
+
+#: ../src/common/windowid.cpp:242
+msgid "Out of window IDs. Recommend shutting down application."
+msgstr "Van prozorskih ID-a. Preporučava se zatvaranje aplikacije."
+
+#: ../src/richtext/richtextborderspage.cpp:398
+#: ../src/richtext/richtextborderspage.cpp:556
+msgid "Outline"
+msgstr "Kontura"
+
+#: ../src/richtext/richtextborderspage.cpp:618
+msgid "Outset"
+msgstr "Širenje"
+
+#: ../src/msw/ole/automtn.cpp:656
+msgid "Overflow while coercing argument values."
+msgstr "Prekoračenje prilikom prisiljivanja vrijedonsti argumenta."
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "BMP: Nije bilo moguće alocirati memoriju"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: format slike nije podržan"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: nevaljana slika"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: ovo nije PCX datoteka."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: nepoznata greška !!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: broj verzije je pre nizak"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: Nije moguće alocirati memoriju."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: Format datoteke nije prepoznat."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: Datoteka se čini odrezanom."
+
+#: ../src/common/paper.cpp:187
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 × 215 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K rotirano"
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 × 151 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K rotirano"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "PRC 32K(veliki) 97 × 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K(Big) Rotated"
+msgstr "PRC 32K(veliki) rotirano"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "PRC kuverta #1 102 × 165 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "PRC kuverta #1 rotirano 165 × 102 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "PRC kuverta #10 324 × 458 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "PRC kuverta #10 rotirano 458 × 324 mm"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "PRC kuverta #2 102 × 176 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "PRC kuverta #2 rotirano 176 × 102 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "PRC kuverta #3 125 × 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "PRC kuverta #3 rotirano 176 × 125 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "PRC kuverta #4 110 × 208 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "PRC kuverta #4 rotirano 208 × 110 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "PRC kuverta #5 110 × 220 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "PRC kuverta #5 rotirano 220 × 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "PRC kuverta #6 120 × 230 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "PRC kuverta #6 rotirano 230 × 120 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "PRC kuverta #7 160 × 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "PRC kuverta #7 rotirano 230 × 160 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "PRC kuverta #8 120 × 309 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "PRC kuverta #8 rotirano 309 × 120 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "PRC kuverta #9 229 × 324 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "PRC kuverta #9 rotirano 324 × 229 mm"
+
+#: ../src/richtext/richtextmarginspage.cpp:285
+msgid "Padding"
+msgstr "Odmak"
+
+#: ../src/common/prntbase.cpp:2074
+#, c-format
+msgid "Page %d"
+msgstr "Stranica %d"
+
+#: ../src/common/prntbase.cpp:2072
+#, c-format
+msgid "Page %d of %d"
+msgstr "%d. stranica od %d"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:58
+msgid "Page Down"
+msgstr "Page Down"
+
+#: ../src/gtk/print.cpp:826
+msgid "Page Setup"
+msgstr "Postavke stranice"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:57
+msgid "Page Up"
+msgstr "Page Up"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:484
+msgid "Page setup"
+msgstr "Postavke stranice"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:58
+msgid "PageDown"
+msgstr "PageDown"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:57
+msgid "PageUp"
+msgstr "PageUp"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Stranice"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1765
+msgid "Paint Brush"
+msgstr "Kist za bojanje"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Veličina papira"
+
+#: ../src/richtext/richtextstyles.cpp:1062
+msgid "Paragraph styles"
+msgstr "Stilovi odlomaka"
+
+#: ../src/common/xtistrm.cpp:465
+msgid "Passing a already registered object to SetObject"
+msgstr "Slanje već registriranog objekta na SetObject"
+
+#: ../src/common/xtistrm.cpp:476
+msgid "Passing an unknown object to GetObject"
+msgstr "Dodavanje nepoznatog objekta GetObject-u"
+
+#: ../src/richtext/richtextctrl.cpp:3513 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Zalijepi"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Zalijepi odabir"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:74
+msgid "Pause"
+msgstr "Pause"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1766
+msgid "Pencil"
+msgstr "Olovka"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "Peri&od"
+msgstr "T&očka"
+
+#: ../src/generic/filectrlg.cpp:430
+msgid "Permissions"
+msgstr "Korisnička prava"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:60
+msgid "PgDn"
+msgstr "PgDn"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:59
+msgid "PgUp"
+msgstr "PgUp"
+
+#: ../src/richtext/richtextbuffer.cpp:12868
+msgid "Picture Properties"
+msgstr "Svojstva slike"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Stvaranje cjevovoda nije uspjelo"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Odaberi valjani font."
+
+#: ../src/generic/filedlgg.cpp:357 ../src/gtk/filedlg.cpp:73
+msgid "Please choose an existing file."
+msgstr "Odaberi postojeću datoteku."
+
+#: ../src/html/helpwnd.cpp:800
+msgid "Please choose the page to display:"
+msgstr "Odaberi stranicu za prikazivanje:"
+
+#: ../src/msw/dialup.cpp:764
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Odaberi davatelja internetskih usluga s kojim se želiš povezati"
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "Odaberi stupce koje želiš prikazati i odredi njihov raspored:"
+
+#: ../src/common/prntbase.cpp:538
+msgid "Please wait while printing..."
+msgstr "Pričekaj dok traje ispis …"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1767
+msgid "Point Left"
+msgstr "Pokazuje lijevo"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1768
+msgid "Point Right"
+msgstr "Pokazuje desno"
+
+#. TRANSLATORS: Label of font point size
+#: ../src/propgrid/advprops.cpp:662
+msgid "Point Size"
+msgstr "Veličina u tipografskim točkama"
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Uspravno"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+msgid "Position"
+msgstr "Pozicija"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "PostScript datoteka"
+
+#: ../src/common/stockitem.cpp:181
+msgid "Preferences"
+msgstr "Postavke"
+
+#: ../src/osx/menu_osx.cpp:568
+msgid "Preferences..."
+msgstr "Postavke …"
+
+#: ../src/common/prntbase.cpp:546
+msgid "Preparing"
+msgstr "Pripremanje"
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:390
+#: ../src/html/helpwnd.cpp:1222
+msgid "Preview:"
+msgstr "Pregled:"
+
+#: ../src/common/prntbase.cpp:1553 ../src/html/helpwnd.cpp:664
+msgid "Previous page"
+msgstr "Prethodna stranica"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:426 ../src/common/prntbase.cpp:1541
+#: ../src/common/accelcmn.cpp:77 ../src/gtk/print.cpp:620
+#: ../src/gtk/print.cpp:638
+msgid "Print"
+msgstr "Print"
+
+#: ../include/wx/prntbase.h:399 ../src/common/docview.cpp:1268
+msgid "Print Preview"
+msgstr "Pregled ispisa"
+
+#: ../src/common/prntbase.cpp:2015 ../src/common/prntbase.cpp:2057
+#: ../src/common/prntbase.cpp:2065
+msgid "Print Preview Failure"
+msgstr "Neuspjeli pregled ispisa"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Opseg ispisa"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Postavke ispisa"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Ispiši u boji"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print previe&w..."
+msgstr "Pregled ispis&a …"
+
+#: ../src/common/docview.cpp:1262
+msgid "Print preview creation failed."
+msgstr "Stvaranje pregleda ispisa."
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print preview..."
+msgstr "Pregled ispisa …"
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Pripremanje ispisa"
+
+#: ../src/html/helpwnd.cpp:675
+msgid "Print this page"
+msgstr "Ispiši ovu stranicu"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "Ispiši u datoteku"
+
+#: ../src/common/stockitem.cpp:183
+msgid "Print..."
+msgstr "Ispiši …"
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Pisač"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Naredba pisača:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Opcije pisača"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Opcije pisača:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Pisač …"
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Pisač:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:535
+#: ../src/html/htmprint.cpp:277
+msgid "Printing"
+msgstr "Ispisivanje"
+
+#: ../src/common/prntbase.cpp:612
+msgid "Printing "
+msgstr "Ispisivanje "
+
+#: ../src/common/prntbase.cpp:347
+msgid "Printing Error"
+msgstr "Greška prilikom ispisa"
+
+#: ../src/common/prntbase.cpp:565
+#, c-format
+msgid "Printing page %d"
+msgstr "Ispisivanje %d. stranice"
+
+#: ../src/common/prntbase.cpp:570
+#, c-format
+msgid "Printing page %d of %d"
+msgstr "Ispisivanje %d. stranice od %d"
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Ispisivanje %d. stranice …"
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Ispisivanje …"
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:267
+#: ../src/common/docview.cpp:2132
+msgid "Printout"
+msgstr "Ispis"
+
+#: ../src/common/debugrpt.cpp:560
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"Obrada izvještaja o otklanjanju grešaka nije uspjela. Datoteke ostaju u "
+"direktoriju \"% s\"."
+
+#: ../src/common/prntbase.cpp:545
+msgid "Progress:"
+msgstr "Tok:"
+
+#: ../src/common/stockitem.cpp:184
+msgid "Properties"
+msgstr "Svojstva"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "Osobina"
+
+#. TRANSLATORS: Caption of message box displaying any property error
+#: ../src/propgrid/propgrid.cpp:3185 ../src/propgrid/propgrid.cpp:3318
+msgid "Property Error"
+msgstr "Greška u osobini"
+
+#: ../src/propgrid/advprops.cpp:1597
+msgid "Purple"
+msgstr "Ljubičasta"
+
+#: ../src/common/paper.cpp:112
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 × 275 mm"
+
+#: ../src/generic/logg.cpp:1016
+msgid "Question"
+msgstr "Pitanje"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1769
+msgid "Question Arrow"
+msgstr "Strelica-Upitnik"
+
+#: ../src/common/stockitem.cpp:156
+msgid "Quit"
+msgstr "Zatvori"
+
+#: ../src/osx/menu_osx.cpp:585
+#, c-format
+msgid "Quit %s"
+msgstr "Zatvori %s"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Zatvori ovaj program"
+
+#: ../src/common/accelcmn.cpp:338
+msgid "RawCtrl+"
+msgstr "RawCtrl+"
+
+#: ../src/common/ffile.cpp:109 ../src/common/ffile.cpp:133
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Greška u čitanju datoteke '%s'"
+
+#: ../src/common/secretstore.cpp:199
+#, c-format
+msgid "Reading password for \"%s/%s\" failed: %s."
+msgstr "Čitanje lozinke za \"%s/%s\": %s."
+
+#: ../src/common/prntbase.cpp:272
+msgid "Ready"
+msgstr "Spremno"
+
+#: ../src/propgrid/advprops.cpp:1605
+msgid "Red"
+msgstr "Crvena"
+
+#: ../src/generic/colrdlgg.cpp:339
+msgid "Red:"
+msgstr "Crvena:"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "Ponovi"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Ponovi zadnju radnju"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Osvježi"
+
+#: ../src/msw/registry.cpp:626
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "Registarski ključ '%s' već postoji."
+
+#: ../src/msw/registry.cpp:595
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "Registarski ključ '%s' ne postoji; nije ga moguće preimenovati."
+
+#: ../src/msw/registry.cpp:727
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"Registarski ključ '%s' je potreban za normalan rad sustava.\n"
+"Brisanjem će tvoj sustav postati nestabilan:\n"
+"operacija je prekinuta."
+
+#: ../src/msw/registry.cpp:954
+#, c-format
+msgid "Registry value \"%s\" is not binary (but of type %s)"
+msgstr "Registarska vrijednost '%s' nije binarna (ali je vrste %s)"
+
+#: ../src/msw/registry.cpp:917
+#, c-format
+msgid "Registry value \"%s\" is not numeric (but of type %s)"
+msgstr "Registarska vrijednost '%s' nije numerička (ali je vrste %s)"
+
+#: ../src/msw/registry.cpp:1003
+#, c-format
+msgid "Registry value \"%s\" is not text (but of type %s)"
+msgstr "Registarska vrijednost '%s' nije tekst (ali je vrste %s)"
+
+#: ../src/msw/registry.cpp:521
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "Registarska vrijednost '%s' već postoji."
+
+#: ../src/richtext/richtextfontpage.cpp:350
+#: ../src/richtext/richtextfontpage.cpp:354
+msgid "Regular"
+msgstr "Regular"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+msgid "Relative"
+msgstr "Relativno"
+
+#: ../src/generic/helpext.cpp:458
+msgid "Relevant entries:"
+msgstr "Relevantni unosi:"
+
+#: ../include/wx/generic/progdlgg.h:86
+msgid "Remaining time:"
+msgstr "Preostalo vrijeme:"
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Ukloni"
+
+#: ../src/richtext/richtextctrl.cpp:1562
+msgid "Remove Bullet"
+msgstr "Ukloni znak nabrajanja"
+
+#: ../src/html/helpwnd.cpp:433
+msgid "Remove current page from bookmarks"
+msgstr "Ukloni trenutačnu stranicu iz knjižnih oznaka"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"Iscrtač \"%s\" ima nekompatibilnu verziju %d.%d i nije ga moguće učitati."
+
+#: ../src/richtext/richtextbuffer.cpp:4527
+msgid "Renumber List"
+msgstr "Ponovi numeriranje"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "Zamije&ni"
+
+#: ../src/richtext/richtextctrl.cpp:3673 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Zamijeni"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Zamijeni &sve"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Zamijeni odabir"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Zamijeni sa:"
+
+#: ../src/common/valtext.cpp:163
+msgid "Required information entry is empty."
+msgstr "Obavezan unos informacija je prazan."
+
+#: ../src/common/translation.cpp:1975
+#, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "Resurs '%s' nije valjani katalog obavijesti."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:56
+msgid "Return"
+msgstr "Return"
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Vrati na spremljeno"
+
+#: ../src/richtext/richtextborderspage.cpp:616
+msgid "Ridge"
+msgstr "Hrbat"
+
+#: ../src/richtext/richtextfontpage.cpp:313
+msgid "Rig&ht-to-left"
+msgstr "Desn&o-Lijevo"
+
+#. TRANSLATORS: Keystroke for manipulating a tree control
+#. TRANSLATORS: Name of keyboard key
+#: ../src/generic/datavgen.cpp:6149
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextsizepage.cpp:250 ../src/common/accelcmn.cpp:62
+msgid "Right"
+msgstr "Right"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1754
+msgid "Right Arrow"
+msgstr "Strelica-Desno"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1770
+msgid "Right Button"
+msgstr "Gumb-Desno"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Desna margina (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Poravnaj tekst u desno."
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/generic/datavgen.cpp:5916
+#, c-format
+msgid "Row %i"
+msgstr "Red %i"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:239
+msgid "S&tandard bullet name:"
+msgstr "S&tandardno ime znaka nabrajanja:"
+
+#: ../src/common/accelcmn.cpp:268 ../src/common/accelcmn.cpp:350
+msgid "SPECIAL"
+msgstr "SPECIJALNO"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2797
+msgid "Save"
+msgstr "Spremi"
+
+#: ../src/common/fldlgcmn.cpp:342
+#, c-format
+msgid "Save %s file"
+msgstr "Spremi %s datoteku"
+
+#: ../src/generic/logg.cpp:512
+msgid "Save &As..."
+msgstr "Spremi &pod …"
+
+#: ../src/common/docview.cpp:366
+msgid "Save As"
+msgstr "Spremi pod"
+
+#: ../src/common/stockitem.cpp:191
+msgid "Save as"
+msgstr "Spremi pod"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Spremi trenutačan dokument"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Spremi trenutačan dokument pod drugim imenom"
+
+#: ../src/generic/logg.cpp:512
+msgid "Save log contents to file"
+msgstr "Spremi log-sadržaj u datoteku"
+
+#: ../src/common/secretstore.cpp:179
+#, c-format
+msgid "Saving password for \"%s/%s\" failed: %s."
+msgstr "Spremanje lozinke za \"%s/%s\": %s."
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Pismo"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:87
+msgid "Scroll Lock"
+msgstr "Scroll Lock"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:87
+msgid "Scroll_lock"
+msgstr "Scroll_lock"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:890
+msgid "Scrollbar"
+msgstr "Scrollbar"
+
+#: ../src/generic/srchctlg.cpp:56 ../src/html/helpwnd.cpp:535
+#: ../src/html/helpwnd.cpp:550
+msgid "Search"
+msgstr "Traži"
+
+#: ../src/html/helpwnd.cpp:537
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Pretraži sadržaj svih knjiga pomoći, i nađi sva pojavljivanja gore utipkanog "
+"teksta"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Smjer traženja"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Traži:"
+
+#: ../src/html/helpwnd.cpp:1052
+msgid "Search in all books"
+msgstr "Traži u svim knjigama"
+
+#: ../src/html/helpwnd.cpp:857
+msgid "Searching..."
+msgstr "Traženje …"
+
+#: ../src/generic/dirctrlg.cpp:446
+msgid "Sections"
+msgstr "Odjeljci"
+
+#: ../src/common/ffile.cpp:238
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Traži grešku u datoteci '%s'"
+
+#: ../src/common/ffile.cpp:228
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr "Traži grešku u datoteci '%s' (stdio ne podržava velike datoteke)"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:76
+msgid "Select"
+msgstr "Select"
+
+#: ../src/richtext/richtextctrl.cpp:337 ../src/osx/textctrl_osx.cpp:581
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2512
+msgid "Select &All"
+msgstr "Odaberi &sve"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "Odaberi sve"
+
+#: ../src/common/docview.cpp:1895
+msgid "Select a document template"
+msgstr "Odaberi jedan predložak"
+
+#: ../src/common/docview.cpp:1969
+msgid "Select a document view"
+msgstr "Odaberi jedan pogled"
+
+#: ../src/richtext/richtextfontpage.cpp:226
+#: ../src/richtext/richtextfontpage.cpp:228
+msgid "Select regular or bold."
+msgstr "Odaberi regularni ili debeli."
+
+#: ../src/richtext/richtextfontpage.cpp:213
+#: ../src/richtext/richtextfontpage.cpp:215
+msgid "Select regular or italic style."
+msgstr "Odaberi regularni ili kurzivni stil."
+
+#: ../src/richtext/richtextfontpage.cpp:239
+#: ../src/richtext/richtextfontpage.cpp:241
+msgid "Select underlining or no underlining."
+msgstr "Odaberi podcrtavanje ili ne-podcrtavanje."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Odabir"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Odabire razinu popisa za uređivanje."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:82
+msgid "Separator"
+msgstr "Separator"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Potreban je razdvojnik nakon opcije '%s'."
+
+#: ../src/osx/menu_osx.cpp:572
+msgid "Services"
+msgstr "Usluge"
+
+#: ../src/richtext/richtextbuffer.cpp:11217
+msgid "Set Cell Style"
+msgstr "Postavi stil ćelija"
+
+#: ../include/wx/xtiprop.h:175
+msgid "SetProperty called w/o valid setter"
+msgstr "SetProperty je pozvano bez valjanog postavljača"
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Postavljanje …"
+
+#: ../src/msw/dialup.cpp:544
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "Pronađeno je nekoliko aktivnih veza, jedna je nasumce odabrana."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:271
+msgid "Sh&adow spread:"
+msgstr "Rasprostranjenost &sjene:"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:179
+msgid "Shadow"
+msgstr "Sjena"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:258
+msgid "Shadow c&olour:"
+msgstr "&Boja sjene:"
+
+#: ../src/common/accelcmn.cpp:335
+msgid "Shift+"
+msgstr "Shift+"
+
+#: ../src/generic/dirdlgg.cpp:147
+msgid "Show &hidden directories"
+msgstr "Prikaži &skrivene mape"
+
+#: ../src/generic/filectrlg.cpp:983
+msgid "Show &hidden files"
+msgstr "Prikaži &skrivene datoteke"
+
+#: ../src/osx/menu_osx.cpp:580
+msgid "Show All"
+msgstr "Prikaži sve"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Prikaži informativni dijalog"
+
+#: ../src/html/helpwnd.cpp:492
+msgid "Show all"
+msgstr "Prikaži sve"
+
+#: ../src/html/helpwnd.cpp:503
+msgid "Show all items in index"
+msgstr "Prikaži sve stavke u indeksu"
+
+#: ../src/html/helpwnd.cpp:658
+msgid "Show/hide navigation panel"
+msgstr "Prikaži/sakrij navigaciju"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Prikazuje Unicode podskupinu."
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:263
+#: ../src/richtext/richtextbulletspage.cpp:265
+msgid "Shows a preview of the bullet settings."
+msgstr "Prikazuje pregled postavaka znakova nabrajanja."
+
+#: ../src/richtext/richtextfontpage.cpp:330
+#: ../src/richtext/richtextfontpage.cpp:332
+msgid "Shows a preview of the font settings."
+msgstr "Prikazuje pregled font postavaka."
+
+#: ../src/osx/carbon/fontdlg.cpp:394 ../src/osx/carbon/fontdlg.cpp:396
+msgid "Shows a preview of the font."
+msgstr "Prikazuje pregled fonta."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Prikazuje pregled postavaka odlomka."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Prikazuje pregled fonta."
+
+#: ../src/propgrid/advprops.cpp:1607
+msgid "Silver"
+msgstr "Srebrna"
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Jednostavna jednobojna tema"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Jedno"
+
+#: ../src/generic/filectrlg.cpp:425 ../src/richtext/richtextformatdlg.cpp:369
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Veličina"
+
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "Size:"
+msgstr "Veličina:"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1775
+msgid "Sizing"
+msgstr "Skaliranje"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1772
+msgid "Sizing N-S"
+msgstr "Skaliranje S-J"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1771
+msgid "Sizing NE-SW"
+msgstr "Skaliranje SI-JZ"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1773
+msgid "Sizing NW-SE"
+msgstr "Skaliranje SZ-JI"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1774
+msgid "Sizing W-E"
+msgstr "Skaliranje Z-I"
+
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Preskoči"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Nagib"
+
+#: ../src/richtext/richtextfontpage.cpp:289
+msgid "Small C&apitals"
+msgstr "Kapitalke"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:79
+msgid "Snapshot"
+msgstr "Snapshot"
+
+#: ../src/richtext/richtextborderspage.cpp:611
+msgid "Solid"
+msgstr "Ispunjeno"
+
+#: ../src/common/docview.cpp:1791
+msgid "Sorry, could not open this file."
+msgstr "Nažalost nije moguće otvoriti ovu datoteku."
+
+#: ../src/common/prntbase.cpp:2057 ../src/common/prntbase.cpp:2065
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Nažalost nema dovoljno memorije za stvaranje pregleda."
+
+#: ../src/richtext/richtextstyledlg.cpp:611
+#: ../src/richtext/richtextstyledlg.cpp:659
+#: ../src/richtext/richtextstyledlg.cpp:825
+#: ../src/richtext/richtextstyledlg.cpp:901
+#: ../src/richtext/richtextstyledlg.cpp:939
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Nažalost je to ime zauzeto. Odaberi drugo ime."
+
+#: ../src/common/docview.cpp:1814
+msgid "Sorry, the format for this file is unknown."
+msgstr "Nažalost je format datoteke nepoznat."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Zvukovni podaci imaju nepodržani format."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "Zvukovna datoteka '%s' ima nepodržani format."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:67
+msgid "Space"
+msgstr "Space"
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Spacioniranje"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr "Provjera pravopisa"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1776
+msgid "Spraycan"
+msgstr "Sprej limenka"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:282
+msgid "Standard"
+msgstr "Standardno"
+
+#: ../src/common/paper.cpp:104
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Statement, 5 1/2 × 8 1/2 in"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+msgid "Static"
+msgstr "Statično"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "Stanje:"
+
+#: ../src/common/stockitem.cpp:198
+msgid "Stop"
+msgstr "Zaustavi"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr "Precrtano"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "Znakovni niz u boju : Netočna specifikacija boje : %s"
+
+#. TRANSLATORS: Label of font style
+#: ../src/richtext/richtextformatdlg.cpp:339 ../src/propgrid/advprops.cpp:680
+msgid "Style"
+msgstr "Stil"
+
+#: ../include/wx/richtext/richtextstyledlg.h:46
+msgid "Style Organiser"
+msgstr "Upravljač stilova"
+
+#: ../src/osx/carbon/fontdlg.cpp:348
+msgid "Style:"
+msgstr "Stil:"
+
+#: ../src/richtext/richtextfontpage.cpp:303
+msgid "Subscrip&t"
+msgstr "Spuš&teno"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:83
+msgid "Subtract"
+msgstr "Subtract"
+
+#: ../src/richtext/richtextfontpage.cpp:296
+msgid "Supe&rscript"
+msgstr "Na&dignuto"
+
+#: ../src/common/paper.cpp:150
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 × 356 mm"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 × 487 mm"
+
+#: ../src/richtext/richtextfontpage.cpp:320
+msgid "Suppress hyphe&nation"
+msgstr "Izostavi rastavljanje riječi"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Švicarski"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:280
+msgid "Symbol"
+msgstr "Simbol"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:227
+msgid "Symbol &font:"
+msgstr "Simbol-&font:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Simboli"
+
+#: ../src/common/imagtiff.cpp:369 ../src/common/imagtiff.cpp:382
+#: ../src/common/imagtiff.cpp:741
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: Nije moguće alocirati memoriju."
+
+#: ../src/common/imagtiff.cpp:301
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Greška prilikom učitavanja slike."
+
+#: ../src/common/imagtiff.cpp:468
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Greška prilikom čitanja slike."
+
+#: ../src/common/imagtiff.cpp:608
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Greška prilikom spremanja slike."
+
+#: ../src/common/imagtiff.cpp:846
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Greška prilikom zapisivanja slike."
+
+#: ../src/common/imagtiff.cpp:355
+msgid "TIFF: Image size is abnormally big."
+msgstr "TIFF: Slika je abnormalno velika."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:68
+msgid "Tab"
+msgstr "Tab"
+
+#: ../src/richtext/richtextbuffer.cpp:11498
+msgid "Table Properties"
+msgstr "Svojstva tablice"
+
+#: ../src/common/paper.cpp:145
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tabloid Ekstra 11.69 × 18 in"
+
+#: ../src/common/paper.cpp:102
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tabloid, 11 × 17 in"
+
+#: ../src/richtext/richtextformatdlg.cpp:354
+msgid "Tabs"
+msgstr "Tabulatori"
+
+#: ../src/propgrid/advprops.cpp:1598
+msgid "Teal"
+msgstr "Plavozelena"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Pisaći stroj"
+
+#: ../src/common/docview.cpp:1896
+msgid "Templates"
+msgstr "Predlošci"
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Tajlandski (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:619
+msgid "The FTP server doesn't support passive mode."
+msgstr "FTP server ne podržava pasivni modus."
+
+#: ../src/common/ftp.cpp:605
+msgid "The FTP server doesn't support the PORT command."
+msgstr "FTP server ne podržava PORT naredbe."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:151
+#: ../src/richtext/richtextbulletspage.cpp:153
+msgid "The available bullet styles."
+msgstr "Dostupni stilovi znakova nabrajanja."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Dostupni stilovi."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:168
+#: ../src/richtext/richtextbackgroundpage.cpp:170
+msgid "The background colour."
+msgstr "Boja pozadine."
+
+#: ../src/richtext/richtextborderspage.cpp:267
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:301
+#: ../src/richtext/richtextborderspage.cpp:303
+#: ../src/richtext/richtextborderspage.cpp:335
+#: ../src/richtext/richtextborderspage.cpp:337
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:435
+#: ../src/richtext/richtextborderspage.cpp:437
+#: ../src/richtext/richtextborderspage.cpp:469
+#: ../src/richtext/richtextborderspage.cpp:471
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextborderspage.cpp:505
+#: ../src/richtext/richtextborderspage.cpp:537
+#: ../src/richtext/richtextborderspage.cpp:539
+msgid "The border line style."
+msgstr "Stil rubne linije."
+
+#: ../src/richtext/richtextmarginspage.cpp:267
+#: ../src/richtext/richtextmarginspage.cpp:269
+msgid "The bottom margin size."
+msgstr "Veličina donje margine."
+
+#: ../src/richtext/richtextmarginspage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:383
+msgid "The bottom padding size."
+msgstr "Veličina donjeg odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+msgid "The bottom position."
+msgstr "Doljnja pozicija."
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:191
+#: ../src/richtext/richtextbulletspage.cpp:193
+#: ../src/richtext/richtextbulletspage.cpp:214
+#: ../src/richtext/richtextbulletspage.cpp:216
+msgid "The bullet character."
+msgstr "Znak nabrajanja."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "Šifra znaka."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"Kodna stranica '%s' nije poznata. Možeš odabrati\n"
+"neku drugu kodnu stranicu kao zamjenu ili\n"
+"[Odustani] ako izmjena nije moguća"
+
+#: ../src/msw/ole/dataobj.cpp:394
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "Format međuspremnika '%d' ne postoji."
+
+#: ../src/richtext/richtextstylepage.cpp:130
+#: ../src/richtext/richtextstylepage.cpp:132
+msgid "The default style for the next paragraph."
+msgstr "Zadani stil za sljedeći odlomak."
+
+#: ../src/generic/dirdlgg.cpp:202
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"Mapa '%s' ne postoji.\n"
+"Želiš li je sada stvoriti?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"Dokument \"%s\" ne paše na stranicu vodoravno, te će biti odrezana u ispisu.\n"
+"\n"
+"Želiš li ipak nastaviti s ispisom?"
+
+#: ../src/common/docview.cpp:1202
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"Datoteka '%s' ne postoji i ne može se otvoriti.\n"
+"Uklonjena je iz popisa nedavno otvorenih datoteka."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "Uvlaka prvog retka."
+
+#: ../src/gtk/utilsgtk.cpp:481
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr "Sljedeće standardne GTK+ opcije se također podržavaju:\n"
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "Boja fonta."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "Font obitelj."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "Font, iz kojeg se preuzima simbol."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "Veličina fonta."
+
+#: ../src/osx/carbon/fontdlg.cpp:343 ../src/osx/carbon/fontdlg.cpp:345
+msgid "The font size in points."
+msgstr "Veličina fonta u točkama."
+
+#: ../src/richtext/richtextfontpage.cpp:181
+#: ../src/richtext/richtextfontpage.cpp:183
+msgid "The font size units, points or pixels."
+msgstr "Jedinice veličine fonta, u točkama ili pikselima."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "Stil fonta."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "Rez fonta."
+
+#: ../src/common/docview.cpp:1483
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "Format datoteke '%s' nije bilo moguće ustanoviti."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:219
+#: ../src/richtext/richtextbackgroundpage.cpp:221
+msgid "The horizontal offset."
+msgstr "Vodoravni odmak."
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "Lijeva uvlaka."
+
+#: ../src/richtext/richtextmarginspage.cpp:194
+#: ../src/richtext/richtextmarginspage.cpp:196
+msgid "The left margin size."
+msgstr "Veličina lijeve margine."
+
+#: ../src/richtext/richtextmarginspage.cpp:308
+#: ../src/richtext/richtextmarginspage.cpp:310
+msgid "The left padding size."
+msgstr "Veličina lijevog odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+msgid "The left position."
+msgstr "Lijeva pozicija."
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "Prored."
+
+#: ../src/richtext/richtextbulletspage.cpp:255
+#: ../src/richtext/richtextbulletspage.cpp:257
+msgid "The list item number."
+msgstr "Broj stavke u popisu."
+
+#: ../src/msw/ole/automtn.cpp:664
+msgid "The locale ID is unknown."
+msgstr "ID lokalizacije nije poznat."
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+msgid "The object height."
+msgstr "Visina objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+msgid "The object maximum height."
+msgstr "Maksimalna visina objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+msgid "The object maximum width."
+msgstr "Maksimalna širina objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+msgid "The object minimum height."
+msgstr "Minimalna visina objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+msgid "The object minimum width."
+msgstr "Minimalna širina objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+msgid "The object width."
+msgstr "Širina objekta."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "Razina pregleda."
+
+#: ../src/common/log.cpp:277
+#, c-format
+msgid "The previous message repeated %u time."
+msgid_plural "The previous message repeated %u times."
+msgstr[0] "Prethodna obavijest se ponovila %u puta."
+msgstr[1] "Prethodna obavijest se ponovila %u puta."
+msgstr[2] "Prethodna obavijest se ponovila %u puta."
+
+#: ../src/common/log.cpp:270
+msgid "The previous message repeated once."
+msgstr "Prethodna obavijest se ponovila jednom."
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "Prikazani opseg."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"Izvještaj sadržava datoteke, popisane niže. Ako ikoja od njih sadržava "
+"privatne informacije,\n"
+"odznači ih i one će biti uklonjene iz izvještaja.\n"
+
+#: ../src/common/cmdline.cpp:1254
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "Obavezan parametar '%s' nije bio određen."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "Desna uvlaka."
+
+#: ../src/richtext/richtextmarginspage.cpp:219
+#: ../src/richtext/richtextmarginspage.cpp:221
+msgid "The right margin size."
+msgstr "Veličina desne margine."
+
+#: ../src/richtext/richtextmarginspage.cpp:333
+#: ../src/richtext/richtextmarginspage.cpp:335
+msgid "The right padding size."
+msgstr "Veličina desnog odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+msgid "The right position."
+msgstr "Desna pozicija."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:309
+#: ../src/richtext/richtextbackgroundpage.cpp:311
+msgid "The shadow blur distance."
+msgstr "Udaljenost mutnoće sjene."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:266
+#: ../src/richtext/richtextbackgroundpage.cpp:268
+msgid "The shadow colour."
+msgstr "Boja sjene."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:336
+#: ../src/richtext/richtextbackgroundpage.cpp:338
+msgid "The shadow opacity."
+msgstr "Neprozirnost sjene."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:282
+#: ../src/richtext/richtextbackgroundpage.cpp:284
+msgid "The shadow spread."
+msgstr "Rasprostranjenost sjene."
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "Razmak nakon odlomka."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "Razmak prije odlomka."
+
+#: ../src/richtext/richtextstylepage.cpp:110
+#: ../src/richtext/richtextstylepage.cpp:112
+msgid "The style name."
+msgstr "Ime stila."
+
+#: ../src/richtext/richtextstylepage.cpp:120
+#: ../src/richtext/richtextstylepage.cpp:122
+msgid "The style on which this style is based."
+msgstr "Stil, na kojem se ovaj stil zasniva."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "Pregled stilova."
+
+#: ../src/msw/ole/automtn.cpp:680
+msgid "The system cannot find the file specified."
+msgstr "Sustav ne može naći određenu datoteku."
+
+#: ../src/richtext/richtexttabspage.cpp:114
+#: ../src/richtext/richtexttabspage.cpp:116
+msgid "The tab position."
+msgstr "Pozicija tabulatora."
+
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab positions."
+msgstr "Pozicije tabulatora."
+
+#: ../src/richtext/richtextctrl.cpp:3098
+msgid "The text couldn't be saved."
+msgstr "Nije bilo moguće spremiti tekst."
+
+#: ../src/richtext/richtextmarginspage.cpp:242
+#: ../src/richtext/richtextmarginspage.cpp:244
+msgid "The top margin size."
+msgstr "Veličina gornje margine."
+
+#: ../src/richtext/richtextmarginspage.cpp:356
+#: ../src/richtext/richtextmarginspage.cpp:358
+msgid "The top padding size."
+msgstr "Veličina gornjeg odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+msgid "The top position."
+msgstr "Gornja pozicija."
+
+#: ../src/common/cmdline.cpp:1232
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "Vrijednost opcije '%s' mora biti određena."
+
+#: ../src/richtext/richtextborderspage.cpp:585
+#: ../src/richtext/richtextborderspage.cpp:587
+msgid "The value of the corner radius."
+msgstr "Vrijednost radijusa kutova."
+
+#: ../src/msw/dialup.cpp:433
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"Na ovom računalu instalirana verzija usluge daljninskog pristupa (RAS) je pre "
+"stara, nadogradi je (nedostaje potrebna funkcija: %s)."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:242
+#: ../src/richtext/richtextbackgroundpage.cpp:244
+msgid "The vertical offset."
+msgstr "Uspravni odmak."
+
+#: ../src/richtext/richtextprint.cpp:619 ../src/html/htmprint.cpp:745
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Došlo je do problema prilikom postavljanja stranice: možda moraš postaviti "
+"zadani pisač."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated when "
+"it is printed."
+msgstr ""
+"Ovaj dokument ne paše na stranicu vodoravno, te će biti odrezana u ispisu."
+
+#: ../src/common/image.cpp:2854
+#, c-format
+msgid "This is not a %s."
+msgstr "Ovo nije %s."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr "Platforma ne podržava neprozirnost pozadine."
+
+#: ../src/gtk/window.cpp:4660
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild with "
+"GTK+ 2.12 or newer."
+msgstr ""
+"Ovaj je program kompiliran s pre starom verzijom GTK+, ponovo izgradi s GTK+ "
+"2.12 ili novijom verzijom."
+
+#: ../src/msw/thread.cpp:1240
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"Inicijalizacija modula tijeka nije uspjela: nije moguće spremiti vrijednost u "
+"tijek lokalnog spremišta"
+
+#: ../src/unix/threadpsx.cpp:1794
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"Inicijalizacija modula tijeka nije uspjela: izrada ključa tijeka nije uspjela"
+
+#: ../src/msw/thread.cpp:1228
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"Inicijalizacija modula tijeka nije uspjela: nije moguće alocirati indeks u "
+"tijeku lokalnog spremišta"
+
+#: ../src/unix/threadpsx.cpp:1043
+msgid "Thread priority setting is ignored."
+msgstr "Postavka prioriteta tijeka je zanemarena."
+
+#: ../src/msw/mdi.cpp:176
+msgid "Tile &Horizontally"
+msgstr "Poploči vodoravno"
+
+#: ../src/msw/mdi.cpp:177
+msgid "Tile &Vertically"
+msgstr "Poploči uspravno"
+
+#: ../src/common/ftp.cpp:200
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Prekoračenje vremena prilikom čekanja na spajanje s FTP serverom, pokušaj u "
+"pasivnom modusu."
+
+#: ../src/generic/tipdlg.cpp:201
+msgid "Tip of the Day"
+msgstr "Savjet dana"
+
+#: ../src/generic/tipdlg.cpp:140
+msgid "Tips not available, sorry!"
+msgstr "Na žalost nema savjeta!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "Do:"
+
+#: ../src/richtext/richtextbuffer.cpp:8363
+msgid "Too many EndStyle calls!"
+msgstr "Previše EndStyle poziva!"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:891
+msgid "Tooltip"
+msgstr "Tooltip"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:892
+msgid "TooltipText"
+msgstr "TooltipText"
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+msgid "Top"
+msgstr "Gore"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Gornja margina (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Prijevodi od "
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "Prevoditelji"
+
+#. TRANSLATORS: Name of Boolean true value
+#: ../src/propgrid/propgrid.cpp:211
+msgid "True"
+msgstr "Točno"
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr "Pokušaj uklanjanja datoteke '%s' iz memorije VFS, ali nije učitana!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Turski (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:426
+msgid "Type"
+msgstr "Vrsta"
+
+#: ../src/richtext/richtextfontpage.cpp:151
+#: ../src/richtext/richtextfontpage.cpp:153
+msgid "Type a font name."
+msgstr "Upiši ime konta."
+
+#: ../src/richtext/richtextfontpage.cpp:166
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "Type a size in points."
+msgstr "Upiši veličinu u točkama."
+
+#: ../src/msw/ole/automtn.cpp:676
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr "Nepodudaranje vrste u argumentu %u."
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:318
+msgid "Type must have enum - long conversion"
+msgstr "Vrsta mora imati enum - long konverziju"
+
+#: ../src/propgrid/propgridiface.cpp:401
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+"Operacija vrste \"%s\" nije uspjela: Osobina s oznakom \"%s\" je vrste \"%s"
+"\", NE \"%s\"."
+
+#: ../src/common/paper.cpp:133
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "US Std presavijen, 14 7/8 × 11 in"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr "Nije moguće dodati inotify nadzor"
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr "Nije moguće dodati kqueue nadzor"
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr "Nije moguće povezati ručku sa završnim priključkom ulaza/izlaza"
+
+#: ../include/wx/msw/private/fswatcher.h:125
+msgid "Unable to close I/O completion port handle"
+msgstr "Nije moguće stvoriti ručku završnog priključka ulaza/izlaza"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+msgid "Unable to close inotify instance"
+msgstr "Nije moguće zatvoriti inotify instancu"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr "Nije moguće zatvoriti stazu '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "Nije moguće zatvoriti upravljač za '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:273
+msgid "Unable to create I/O completion port"
+msgstr "Nije moguće stvoriti završni priključak ulaza/izlaza"
+
+#: ../src/msw/fswatcher.cpp:84
+msgid "Unable to create IOCP worker thread"
+msgstr "Nije moguće stvoriti tijek završnog priključka ulaza/izlaza"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+msgid "Unable to create inotify instance"
+msgstr "Nije moguće stvoriti inotify instancu"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+msgid "Unable to create kqueue instance"
+msgstr "Nije moguće stvoriti kqueue instancu"
+
+#: ../include/wx/msw/private/fswatcher.h:262
+msgid "Unable to dequeue completion packet"
+msgstr "Nije moguće odraditi dequeue za završni paket"
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr "Nije moguće dobiti događaje iz kqueue"
+
+#: ../src/gtk/app.cpp:435
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr "Nije moguće inicijalizirati GTK+, je li DISPLAY ispravno postavljen?"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr "Nije moguće otvoriti stazu '%s'"
+
+#: ../src/html/htmlwin.cpp:583
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Nije moguće otvoriti traženi HTML dokument: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Nije moguće pokrenuti zvuk asinkronično."
+
+#: ../include/wx/msw/private/fswatcher.h:213
+msgid "Unable to post completion status"
+msgstr "Nije moguće objaviti status svršetka"
+
+#: ../src/unix/fswatcher_inotify.cpp:556
+msgid "Unable to read from inotify descriptor"
+msgstr "Nije moguće čitati iz inotify opisnika"
+
+#: ../src/unix/fswatcher_inotify.cpp:141
+#, c-format
+msgid "Unable to remove inotify watch %i"
+msgstr "Nije moguće ukloniti inotify nadzor %i"
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr "Nije moguće ukloniti kqueue nadzor"
+
+#: ../src/msw/fswatcher.cpp:168
+#, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "Nije moguće postaviti sat za '%s'"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr "Nije moguće pokrenuti tijek završnog priključka ulaza/izlaza"
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Vrati izbrisano"
+
+#: ../src/common/stockitem.cpp:202
+msgid "Underline"
+msgstr "Podcrtaj"
+
+#. TRANSLATORS: Label of underlined font
+#: ../src/richtext/richtextfontpage.cpp:359 ../src/osx/carbon/fontdlg.cpp:370
+#: ../src/propgrid/advprops.cpp:690
+msgid "Underlined"
+msgstr "Podcrtano"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "Poništi"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Poništi posljednju radnju"
+
+#: ../src/common/cmdline.cpp:1029
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Neočekivani znakovi slijede opciju '%s'."
+
+#: ../src/unix/fswatcher_inotify.cpp:274
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr "Neočekivani događaj za \"%s\": nema poklapajućih nadzornih opisnika."
+
+#: ../src/common/cmdline.cpp:1195
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Neočekivani parametar '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr "Stvoren je neočekivani završni priključak ulaza/izlaza"
+
+#: ../src/msw/fswatcher.cpp:70
+msgid "Ungraceful worker thread termination"
+msgstr "Neuredan prekid tijeka"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bit (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 bit Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 bit Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 bit (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 bit Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 bit Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bit (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+msgid "Unindent"
+msgstr "Ukloni uvlaku"
+
+#: ../src/richtext/richtextborderspage.cpp:360
+#: ../src/richtext/richtextborderspage.cpp:362
+msgid "Units for the bottom border width."
+msgstr "Jedinice za debljinu donjeg obruba."
+
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:279
+msgid "Units for the bottom margin."
+msgstr "Jedinice za donju marginu."
+
+#: ../src/richtext/richtextborderspage.cpp:528
+#: ../src/richtext/richtextborderspage.cpp:530
+msgid "Units for the bottom outline width."
+msgstr "Jedinice za debljinu donjeg obrisa."
+
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextmarginspage.cpp:393
+msgid "Units for the bottom padding."
+msgstr "Jedinice za debljinu donjeg odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+msgid "Units for the bottom position."
+msgstr "Jedinice za donju poziciju."
+
+#: ../src/richtext/richtextborderspage.cpp:596
+#: ../src/richtext/richtextborderspage.cpp:598
+msgid "Units for the corner radius."
+msgstr "Jedinice za radijus kutova."
+
+#: ../src/richtext/richtextborderspage.cpp:258
+#: ../src/richtext/richtextborderspage.cpp:260
+msgid "Units for the left border width."
+msgstr "Jedinice za debljinu lijevog obruba."
+
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:206
+msgid "Units for the left margin."
+msgstr "Jedinice za lijevu marginu."
+
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:428
+msgid "Units for the left outline width."
+msgstr "Jedinice za debljinu lijevog obrisa."
+
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:320
+msgid "Units for the left padding."
+msgstr "Jedinice za debljinu lijevog odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+msgid "Units for the left position."
+msgstr "Jedinice za lijevu poziciju."
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+msgid "Units for the maximum object height."
+msgstr "Jedinice za maksimalnu visinu objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+msgid "Units for the maximum object width."
+msgstr "Jedinice za maksimalnu širinu objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+msgid "Units for the minimum object height."
+msgstr "Jedinice za minimalnu visinu objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+msgid "Units for the minimum object width."
+msgstr "Jedinice za minimalnu širinu objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr "Jedinice za visinu objekta."
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr "Jedinice za širinu objekta."
+
+#: ../src/richtext/richtextborderspage.cpp:292
+#: ../src/richtext/richtextborderspage.cpp:294
+msgid "Units for the right border width."
+msgstr "Jedinice za debljinu desnog obruba."
+
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:231
+msgid "Units for the right margin."
+msgstr "Jedinice za desnu marginu."
+
+#: ../src/richtext/richtextborderspage.cpp:460
+#: ../src/richtext/richtextborderspage.cpp:462
+msgid "Units for the right outline width."
+msgstr "Jedinice za debljinu desnog obrisa."
+
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:345
+msgid "Units for the right padding."
+msgstr "Jedinice za debljinu desnog odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+msgid "Units for the right position."
+msgstr "Jedinice za desnu poziciju."
+
+#: ../src/richtext/richtextborderspage.cpp:326
+#: ../src/richtext/richtextborderspage.cpp:328
+msgid "Units for the top border width."
+msgstr "Jedinice za debljinu gornjeg obruba."
+
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:254
+msgid "Units for the top margin."
+msgstr "Jedinice za gornju marginu."
+
+#: ../src/richtext/richtextborderspage.cpp:494
+#: ../src/richtext/richtextborderspage.cpp:496
+msgid "Units for the top outline width."
+msgstr "Jedinice za debljinu gornjeg obrisa."
+
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:368
+msgid "Units for the top padding."
+msgstr "Jedinice za debljinu gornjeg odmaka."
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+msgid "Units for the top position."
+msgstr "Jedinice za gornju poziciju."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:230
+#: ../src/richtext/richtextbackgroundpage.cpp:232
+#: ../src/richtext/richtextbackgroundpage.cpp:253
+#: ../src/richtext/richtextbackgroundpage.cpp:255
+#: ../src/richtext/richtextbackgroundpage.cpp:293
+#: ../src/richtext/richtextbackgroundpage.cpp:295
+#: ../src/richtext/richtextbackgroundpage.cpp:320
+#: ../src/richtext/richtextbackgroundpage.cpp:322
+msgid "Units for this value."
+msgstr "Jedinice za ovu vrijednost."
+
+#: ../src/generic/progdlgg.cpp:353 ../src/generic/progdlgg.cpp:622
+msgid "Unknown"
+msgstr "Nepoznato"
+
+#: ../src/msw/dde.cpp:1174
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Nepoznata DDE greška %08x"
+
+#: ../src/common/xtistrm.cpp:410
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "Nepoznati objekt je proslijeđen na GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:366
+#, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "Nepoznata PNG jedinica rezolucije %d"
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "Nepoznata osobina %s"
+
+#: ../src/common/imagtiff.cpp:529
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "Nepoznata TIFF jedinica rezolucije %d je zanemarena"
+
+#: ../src/unix/dlunix.cpp:160
+msgid "Unknown dynamic library error"
+msgstr "Nepoznata greška dinamičke biblioteke"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Nepoznat kodiranje (%d)"
+
+#: ../src/msw/ole/automtn.cpp:688
+#, c-format
+msgid "Unknown error %08x"
+msgstr "Nepoznata greška %08x"
+
+#: ../src/msw/ole/automtn.cpp:647
+msgid "Unknown exception"
+msgstr "Nepoznata iznimka"
+
+#: ../src/common/image.cpp:2839
+msgid "Unknown image data format."
+msgstr "Nepoznati format slikovnih podataka."
+
+#: ../src/common/cmdline.cpp:914
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "Nepoznata dugačka opcija '%s'"
+
+#: ../src/msw/ole/automtn.cpp:631
+msgid "Unknown name or named argument."
+msgstr "Nepoznato ime ili imenovani argument."
+
+#: ../src/common/cmdline.cpp:929 ../src/common/cmdline.cpp:951
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "Nepoznata opcija '%s'"
+
+#: ../src/common/mimecmn.cpp:225
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Nezatvorena '{' u jednom unosu za mime vrstu %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Bezimena naredba"
+
+#. TRANSLATORS: Text displayed for unspecified value
+#: ../src/propgrid/propgrid.cpp:413
+msgid "Unspecified"
+msgstr "Neodređeno"
+
+#: ../src/msw/clipbrd.cpp:311
+msgid "Unsupported clipboard format."
+msgstr "Nepodržani format međuspremnika."
+
+#: ../src/common/appcmn.cpp:256
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Nepodržana tema '%s'."
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+#: ../src/common/accelcmn.cpp:63
+msgid "Up"
+msgstr "Up"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:275
+msgid "Upper case letters"
+msgstr "Velika slova"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:277
+msgid "Upper case roman numerals"
+msgstr "Veliki rimski brojevi"
+
+#: ../src/common/cmdline.cpp:1326
+#, c-format
+msgid "Usage: %s"
+msgstr "Upotreba: %s"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:194
+msgid "Use &shadow"
+msgstr "Koristi &sjenu"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Koristi trenutačne postavke poravnanja."
+
+#: ../src/common/valtext.cpp:179
+msgid "Validation conflict"
+msgstr "Konflikt u provjeri valjanosti"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "Vrijednost"
+
+#: ../src/propgrid/props.cpp:386 ../src/propgrid/props.cpp:500
+#, c-format
+msgid "Value must be %s or higher."
+msgstr "Vrijednost mora biti %s ili veće."
+
+#: ../src/propgrid/props.cpp:417 ../src/propgrid/props.cpp:531
+#, c-format
+msgid "Value must be %s or less."
+msgstr "Vrijednost mora biti %s ili manje."
+
+#: ../src/propgrid/props.cpp:393 ../src/propgrid/props.cpp:424
+#: ../src/propgrid/props.cpp:507 ../src/propgrid/props.cpp:538
+#, c-format
+msgid "Value must be between %s and %s."
+msgstr "Vrijednost mora biti između %s i %s."
+
+#: ../src/generic/aboutdlgg.cpp:128
+msgid "Version "
+msgstr "Verzija "
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+msgid "Vertical alignment."
+msgstr "Uspravno poravnanje."
+
+#: ../src/generic/filedlgg.cpp:202
+msgid "View files as a detailed view"
+msgstr "Prikaži datoteke s detaljima"
+
+#: ../src/generic/filedlgg.cpp:200
+msgid "View files as a list view"
+msgstr "Prikaži datoteke kao popis"
+
+#: ../src/common/docview.cpp:1970
+msgid "Views"
+msgstr "Prikazi"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1777
+msgid "Wait"
+msgstr "Čekaj"
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1779
+msgid "Wait Arrow"
+msgstr "Strelica-Čekaj"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "Čekanje ulaza/izlaza na epoll deskriptor %d"
+
+#: ../src/common/log.cpp:223
+msgid "Warning: "
+msgstr "Upozorenje: "
+
+#. TRANSLATORS: System cursor name
+#: ../src/propgrid/advprops.cpp:1778
+msgid "Watch"
+msgstr "Sat"
+
+#. TRANSLATORS: Label of font weight
+#: ../src/propgrid/advprops.cpp:685
+msgid "Weight"
+msgstr "Debljina"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Zapadnoeuropski (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Zapadnoeuropski s eurom (ISO 8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Da li je font podcrtan."
+
+#: ../src/propgrid/advprops.cpp:1611
+msgid "White"
+msgstr "Bijela"
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Cijela riječ"
+
+#: ../src/html/helpwnd.cpp:534
+msgid "Whole words only"
+msgstr "Samo cijele riječi"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Win32 tema"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:893
+msgid "Window"
+msgstr "Window"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:894
+msgid "WindowFrame"
+msgstr "WindowFrame"
+
+#. TRANSLATORS: Keyword of system colour
+#: ../src/propgrid/advprops.cpp:895
+msgid "WindowText"
+msgstr "WindowText"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows arapski (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows baltički (CP 1257)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows srednjeeuropski (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows kineski pojednostavljeni (CP 936) or GB-2312"
+
+#: ../src/common/fmapbase.cpp:170
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows kineski tradicionalni (CP 950) or Big-5"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows ćirilica (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows grčki (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows hebrejski (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows japanski (CP 932) or Shift-JIS"
+
+#: ../src/common/fmapbase.cpp:180
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows johapski (CP 1361)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows koreanski (CP 949)"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows tajlandski (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows turski (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows vijetnamski (CP 1258)"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows zapadnoeuropski (CP 1252)"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows/DOS OEM ćirilica (CP 866)"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:111
+msgid "Windows_Left"
+msgstr "Windows_Left"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:113
+msgid "Windows_Menu"
+msgstr "Windows_Menu"
+
+#. TRANSLATORS: Name of keyboard key
+#: ../src/common/accelcmn.cpp:112
+msgid "Windows_Right"
+msgstr "Windows_Right"
+
+#: ../src/common/ffile.cpp:150
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Zapiši grešku za datoteku '%s'"
+
+#: ../src/xml/xml.cpp:914
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "Greška u XML obradi: '%s' u retku br. %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: nepravilni piksel podaci!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: neipravan opis boje u retku br. %d"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: neispravan format zaglavlja!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: nepravilna definicija boje '%s' u retku br. %d!"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: za masku nije preostala nijedna boja!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: odrezani podaci slike u retku br. %d!"
+
+#: ../src/propgrid/advprops.cpp:1610
+msgid "Yellow"
+msgstr "Žuta"
+
+#: ../include/wx/msgdlg.h:276 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Da"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "Ne možeš ukloniti pokrivač, koji nije inicijaliziran"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "Ne možeš inicijirati jedan pokrivač dvaput"
+
+#: ../src/generic/dirdlgg.cpp:287
+msgid "You cannot add a new directory to this section."
+msgstr "Ne možeš dodati novu mapu ovom odjeljku."
+
+#: ../src/propgrid/propgrid.cpp:3299
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+"Uneseni su nevaljane vrijednosti. Pritisni ESC za odustajanje od uređivanja."
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "P&ovećaj"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "U&manji"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1594
+msgid "Zoom In"
+msgstr "Povećaj"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1580
+msgid "Zoom Out"
+msgstr "Umanji"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "Prilagodi &zumiranje"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to Fit"
+msgstr "Prilagodi zumiranje"
+
+#: ../src/msw/dde.cpp:1141
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "DDEML aplikacija je stvorila produljeno stanje."
+
+#: ../src/msw/dde.cpp:1129
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"DDEML funkcija je pozvana bez prethodnog pozivanja funkcije DdeInitialize,\n"
+"ili nevažeći identifikator instance\n"
+"je proslijeđen DDEML funkciji."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "pokušaj klijenta da uspostavi razgovor nije uspjeo."
+
+#: ../src/msw/dde.cpp:1144
+msgid "a memory allocation failed."
+msgstr "alokacija memorije nije uspjela."
+
+#: ../src/msw/dde.cpp:1138
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "jedan parametar nije validiran od DDEML-a."
+
+#: ../src/msw/dde.cpp:1120
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr "vrijeme zahtjeva za sinkroniziranu preporučenu transakciju je isteklo."
+
+#: ../src/msw/dde.cpp:1126
+msgid "a request for a synchronous data transaction has timed out."
+msgstr "vrijeme zahtjeva za sinkroniziranu transakciju podataka je isteklo."
+
+#: ../src/msw/dde.cpp:1135
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr "vrijeme zahtjeva za sinkroniziranu izvršnu transakciju je isteklo."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr "vrijeme zahtjeva za sinkroniziranu guranu transakciju je isteklo."
+
+#: ../src/msw/dde.cpp:1168
+msgid "a request to end an advise transaction has timed out."
+msgstr "vrijeme zahtjeva za prekidom preporučene transakcije je isteklo."
+
+#: ../src/msw/dde.cpp:1162
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"na razgovoru je pokušana transakcija sa strane servera\n"
+"koji je prekinut od strane klijenta ili ga je server prekinuo\n"
+"prije završetka transakcije."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a transaction failed."
+msgstr "jedna transakcija nije uspjela."
+
+#: ../src/common/accelcmn.cpp:189
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"aplikacija inicijalizirana kao APPCLASS_MONITOR\n"
+"je pokušala izvršiti DDE transakciju,\n"
+"ili aplikacija inicijalizirana kao APPCMD_CLIENTONLY\n"
+"je pokušala izvršiti transakcije servera."
+
+#: ../src/msw/dde.cpp:1156
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "interni poziv na funkciju PostMessage nije uspjeo. "
+
+#: ../src/msw/dde.cpp:1165
+msgid "an internal error has occurred in the DDEML."
+msgstr "dogodila se interna greška u DDEML-u."
+
+#: ../src/msw/dde.cpp:1171
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"neispravni identifikator transakcije proslijeđen je DDEML funkciji.\n"
+"Nakon što se aplikacija vrati iz povratnog poziva XTYP_XACT_COMPLETE,\n"
+"identifikator transakcije za taj povratni poziv više nije valjan."
+
+#: ../src/common/zipstrm.cpp:1483
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "pod pretpostavkom da se radi o višedjelnom lančanom zipu"
+
+#: ../src/common/fileconf.cpp:1847
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "pokušaj mijenjanja nepromjenljivog ključa '%s' je zanemaren."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "loši argumenti za funkciju biblioteke"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "loša signatura"
+
+#: ../src/common/zipstrm.cpp:1918
+msgid "bad zipfile offset to entry"
+msgstr "loš odmak zip datoteke na unos"
+
+#: ../src/common/ftp.cpp:403
+msgid "binary"
+msgstr "binarno"
+
+#: ../src/common/fontcmn.cpp:996
+msgid "bold"
+msgstr "debeli"
+
+#: ../src/msw/utils.cpp:1144
+#, c-format
+msgid "build %lu"
+msgstr "gradnja %lu"
+
+#: ../src/common/ffile.cpp:75
+#, c-format
+msgid "can't close file '%s'"
+msgstr "nije moguće zatvoriti datoteku '%s'"
+
+#: ../src/common/file.cpp:245
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "nije moguće zatvoriti desriptora datoteka %d"
+
+#: ../src/common/file.cpp:586
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "nije moguće potvrditi promjene za datoteku '%s'"
+
+#: ../src/common/file.cpp:178
+#, c-format
+msgid "can't create file '%s'"
+msgstr "nije moguće stvoriti datoteku '%s'"
+
+#: ../src/common/fileconf.cpp:1141
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "nije moguće izbrisati datoteku konfiguracije '%s'"
+
+#: ../src/common/file.cpp:495
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr "nije moguće odrediti dosezanje kraja datoteke na deskriptoru %d"
+
+#: ../src/common/zipstrm.cpp:1692
+msgid "can't find central directory in zip"
+msgstr "nije moguće naći osnovnu mapu u zipu"
+
+#: ../src/common/file.cpp:465
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "nije moguće naći duljinu datoteke na deskriptoru datoteka %d"
+
+#: ../src/msw/utils.cpp:341
+msgid "can't find user's HOME, using current directory."
+msgstr "nije moguće pronaći korisnički HOME, koristi se trenutačna mapa."
+
+#: ../src/common/file.cpp:366
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "nije moguće isprazniti deskriptor datoteka %d"
+
+#: ../src/common/file.cpp:422
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "nije moguće dobiti poziciju traženja na deskriptoru datoteka %d"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "nije moguće učitavanje fontova, prekida se"
+
+#: ../src/common/file.cpp:231 ../src/common/ffile.cpp:59
+#, c-format
+msgid "can't open file '%s'"
+msgstr "nije moguće otvoriti datoteku '%s'"
+
+#: ../src/common/fileconf.cpp:320
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "nije moguće otvoriti datoteku globalne konfiguracije '%s'."
+
+#: ../src/common/fileconf.cpp:336
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "nije moguće otvoriti datoteku korisničke konfiguracije '%s'."
+
+#: ../src/common/fileconf.cpp:986
+msgid "can't open user configuration file."
+msgstr "nije moguće otvoriti datoteku korisničke konfiguracije."
+
+#: ../src/common/zipstrm.cpp:579
+msgid "can't re-initialize zlib deflate stream"
+msgstr "nije moguće ponovo inicijalizirati zlib deflate tijek"
+
+#: ../src/common/zipstrm.cpp:604
+msgid "can't re-initialize zlib inflate stream"
+msgstr "nije moguće ponovo inicijalizirati zlib inflate tijek"
+
+#: ../src/common/file.cpp:304
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "nije moguće čitanje iz deskriptora datoteka %d"
+
+#: ../src/common/file.cpp:581
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "nije moguće ukloniti datoteku '%s'"
+
+#: ../src/common/file.cpp:598
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "nije moguće ukloniti privremenu datoteku '%s'"
+
+#: ../src/common/file.cpp:408
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "nije moguće traženje na deskriptor datoteka %d"
+
+#: ../src/common/textfile.cpp:273
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "nije moguće zapisivanje međuspremnika \"%s\" na disk."
+
+#: ../src/common/file.cpp:323
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "nije moguće zapisivanje u deskriptor datoteka %d"
+
+#: ../src/common/fileconf.cpp:1000
+msgid "can't write user configuration file."
+msgstr "nije moguće zapisivanje datoteke korisničke konfiguracije."
+
+#. TRANSLATORS: Checkbox state name
+#: ../src/generic/treelist.cpp:482 ../src/generic/datavgen.cpp:1261
+msgid "checked"
+msgstr "aktivirano"
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "greška u ispitnom zbroju"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "greška u ispitnom zbroju prilikom čitanja zaglavnog bloka"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:226
+#: ../src/richtext/richtextbackgroundpage.cpp:249
+#: ../src/richtext/richtextbackgroundpage.cpp:289
+#: ../src/richtext/richtextbackgroundpage.cpp:316
+#: ../src/richtext/richtextborderspage.cpp:254
+#: ../src/richtext/richtextborderspage.cpp:288
+#: ../src/richtext/richtextborderspage.cpp:322
+#: ../src/richtext/richtextborderspage.cpp:356
+#: ../src/richtext/richtextborderspage.cpp:422
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:490
+#: ../src/richtext/richtextborderspage.cpp:524
+#: ../src/richtext/richtextborderspage.cpp:592
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr "cm"
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "greška u komprimiranju"
+
+#: ../src/common/regex.cpp:236
+msgid "conversion to 8-bit encoding failed"
+msgstr "konverzija u 8-bitno kodiranje"
+
+#: ../src/common/accelcmn.cpp:187
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1500
+msgid "date"
+msgstr "datum"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "greška u dekomprimiranju"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "zadano"
+
+#: ../src/common/cmdline.cpp:1496
+msgid "double"
+msgstr "duplo"
+
+#: ../src/common/debugrpt.cpp:538
+msgid "dump of the process state (binary)"
+msgstr "izvadak statusa procesa (binarno)"
+
+#: ../src/common/datetimefmt.cpp:1969
+msgid "eighteenth"
+msgstr "osamnaesti"
+
+#: ../src/common/datetimefmt.cpp:1959
+msgid "eighth"
+msgstr "osmi"
+
+#: ../src/common/datetimefmt.cpp:1962
+msgid "eleventh"
+msgstr "jedanaesti"
+
+#: ../src/common/fileconf.cpp:1833
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "unos '%s' se pojavljuje višestruko u grupi '%s'"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "greška u formatu podataka"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "greška prilikom otvaranja datoteke"
+
+#: ../src/common/zipstrm.cpp:1778
+msgid "error reading zip central directory"
+msgstr "greška prilikom čitanja osnovne mape zip-a"
+
+#: ../src/common/zipstrm.cpp:1870
+msgid "error reading zip local header"
+msgstr "greška prilikom čitanja lokalnog zaglavlja zip-a"
+
+#: ../src/common/zipstrm.cpp:2531
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "greška prilikom zapisivanja zip unosa '%s': krivi izvor ili duljina"
+
+#: ../src/common/ffile.cpp:188
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "pražnjenje datoteke „%s”"
+
+#. TRANSLATORS: Name of Boolean false value
+#: ../src/generic/datavgen.cpp:1030
+msgid "false"
+msgstr "netočno"
+
+#: ../src/common/datetimefmt.cpp:1966
+msgid "fifteenth"
+msgstr "petnaesti"
+
+#: ../src/common/datetimefmt.cpp:1956
+msgid "fifth"
+msgstr "peti"
+
+#: ../src/common/fileconf.cpp:579
+#, c-format
+msgid "file '%s', line %zu: '%s' ignored after group header."
+msgstr "datoteka '%s', redak %zu: '%s' zanemareno nakon zaglavlja grupe."
+
+#: ../src/common/fileconf.cpp:608
+#, c-format
+msgid "file '%s', line %zu: '=' expected."
+msgstr "datoteka '%s', redak %zu: '=' očekivano."
+
+#: ../src/common/fileconf.cpp:631
+#, c-format
+msgid "file '%s', line %zu: key '%s' was first found at line %d."
+msgstr "datoteka '%s', redak %zu: ključ '%s' je najprije nađen u %d. retku."
+
+#: ../src/common/fileconf.cpp:621
+#, c-format
+msgid "file '%s', line %zu: value for immutable key '%s' ignored."
+msgstr ""
+"datoteka '%s', redak %zu: vrijednost nepromijenjivog ključa '%s' je zanemaren."
+
+#: ../src/common/fileconf.cpp:543
+#, c-format
+msgid "file '%s': unexpected character %c at line %zu."
+msgstr "datoteka '%s': neočevani znak %c u %zu. retku."
+
+#: ../src/richtext/richtextbuffer.cpp:8738
+msgid "files"
+msgstr "datoteke"
+
+#: ../src/common/datetimefmt.cpp:1952
+msgid "first"
+msgstr "prvi"
+
+#: ../src/html/helpwnd.cpp:1252
+msgid "font size"
+msgstr "veličina fonta"
+
+#: ../src/common/datetimefmt.cpp:1965
+msgid "fourteenth"
+msgstr "četrnaesti"
+
+#: ../src/common/datetimefmt.cpp:1955
+msgid "fourth"
+msgstr "četvrti"
+
+#: ../src/common/appbase.cpp:783
+msgid "generate verbose log messages"
+msgstr "stvori opširne log-poruke"
+
+#: ../src/richtext/richtextbuffer.cpp:13138
+#: ../src/richtext/richtextbuffer.cpp:13248
+msgid "image"
+msgstr "slika"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "nepotpuni zaglavni blok u tar"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "nepravilan znakovni niz upravljača događaja, nedostaje točka"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "nepravilna veličina, zadan za tar ulaz"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "nevaljani podaci u proširenom tar zaglavlju"
+
+#: ../src/generic/logg.cpp:1030
+msgid "invalid message box return value"
+msgstr "nevaljana povratna vrijednost okvira za poruke"
+
+#: ../src/common/zipstrm.cpp:1647
+msgid "invalid zip file"
+msgstr "nevaljana zip datoteka"
+
+#: ../src/common/fontcmn.cpp:1001
+msgid "italic"
+msgstr "kurziv"
+
+#: ../src/common/fontcmn.cpp:991
+msgid "light"
+msgstr "svijetli"
+
+#: ../src/common/intl.cpp:303
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "lokalizaciju '%s' nije moguće postaviti."
+
+#: ../src/common/datetimefmt.cpp:2125
+msgid "midnight"
+msgstr "ponoć"
+
+#: ../src/common/datetimefmt.cpp:1970
+msgid "nineteenth"
+msgstr "devetnaesti"
+
+#: ../src/common/datetimefmt.cpp:1960
+msgid "ninth"
+msgstr "deveti"
+
+#: ../src/msw/dde.cpp:1116
+msgid "no DDE error."
+msgstr "bez DDE greške."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "bez greške"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr "nisu nađeni fontovi u %s, koristi se ugrađeni font"
+
+#: ../src/html/helpdata.cpp:657
+msgid "noname"
+msgstr "bezimeno"
+
+#: ../src/common/datetimefmt.cpp:2124
+msgid "noon"
+msgstr "podne"
+
+#: ../src/richtext/richtextstyles.cpp:779
+msgid "normal"
+msgstr "normalni"
+
+#: ../src/common/cmdline.cpp:1492
+msgid "num"
+msgstr "num"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "objekti ne mogu imati XML tekstovne čvorove"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "nema više memorije"
+
+#: ../src/common/debugrpt.cpp:514
+msgid "process context description"
+msgstr "obradi sadržaj opisa"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:227
+#: ../src/richtext/richtextbackgroundpage.cpp:250
+#: ../src/richtext/richtextbackgroundpage.cpp:290
+#: ../src/richtext/richtextbackgroundpage.cpp:317
+#: ../src/richtext/richtextfontpage.cpp:177
+#: ../src/richtext/richtextfontpage.cpp:180
+#: ../src/richtext/richtextborderspage.cpp:255
+#: ../src/richtext/richtextborderspage.cpp:289
+#: ../src/richtext/richtextborderspage.cpp:323
+#: ../src/richtext/richtextborderspage.cpp:357
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:491
+#: ../src/richtext/richtextborderspage.cpp:525
+#: ../src/richtext/richtextborderspage.cpp:593
+msgid "pt"
+msgstr "pt"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:225
+#: ../src/richtext/richtextbackgroundpage.cpp:228
+#: ../src/richtext/richtextbackgroundpage.cpp:229
+#: ../src/richtext/richtextbackgroundpage.cpp:248
+#: ../src/richtext/richtextbackgroundpage.cpp:251
+#: ../src/richtext/richtextbackgroundpage.cpp:252
+#: ../src/richtext/richtextbackgroundpage.cpp:288
+#: ../src/richtext/richtextbackgroundpage.cpp:291
+#: ../src/richtext/richtextbackgroundpage.cpp:292
+#: ../src/richtext/richtextbackgroundpage.cpp:315
+#: ../src/richtext/richtextbackgroundpage.cpp:318
+#: ../src/richtext/richtextbackgroundpage.cpp:319
+#: ../src/richtext/richtextfontpage.cpp:178
+#: ../src/richtext/richtextborderspage.cpp:253
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:257
+#: ../src/richtext/richtextborderspage.cpp:287
+#: ../src/richtext/richtextborderspage.cpp:290
+#: ../src/richtext/richtextborderspage.cpp:291
+#: ../src/richtext/richtextborderspage.cpp:321
+#: ../src/richtext/richtextborderspage.cpp:324
+#: ../src/richtext/richtextborderspage.cpp:325
+#: ../src/richtext/richtextborderspage.cpp:355
+#: ../src/richtext/richtextborderspage.cpp:358
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:421
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:458
+#: ../src/richtext/richtextborderspage.cpp:459
+#: ../src/richtext/richtextborderspage.cpp:489
+#: ../src/richtext/richtextborderspage.cpp:492
+#: ../src/richtext/richtextborderspage.cpp:493
+#: ../src/richtext/richtextborderspage.cpp:523
+#: ../src/richtext/richtextborderspage.cpp:526
+#: ../src/richtext/richtextborderspage.cpp:527
+#: ../src/richtext/richtextborderspage.cpp:591
+#: ../src/richtext/richtextborderspage.cpp:594
+#: ../src/richtext/richtextborderspage.cpp:595
+#: ../src/richtext/richtextmarginspage.cpp:200
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:225
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:248
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:273
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:314
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:339
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:387
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr "px"
+
+#: ../src/common/accelcmn.cpp:193
+msgid "rawctrl"
+msgstr "rawctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "greška u čitanju"
+
+#: ../src/common/zipstrm.cpp:2085
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "čitanje zip tijeka (unos %s): loš crc"
+
+#: ../src/common/zipstrm.cpp:2080
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "čitanje zip tijeka (unos %s): loša duljina"
+
+#: ../src/msw/dde.cpp:1159
+msgid "reentrancy problem."
+msgstr "problema prilikom ponovnog ulaženja."
+
+#: ../src/common/datetimefmt.cpp:1953
+msgid "second"
+msgstr "drugi"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "traži grešku"
+
+#: ../src/common/datetimefmt.cpp:1968
+msgid "seventeenth"
+msgstr "sedamnaesti"
+
+#: ../src/common/datetimefmt.cpp:1958
+msgid "seventh"
+msgstr "sedmi"
+
+#: ../src/common/accelcmn.cpp:191
+msgid "shift"
+msgstr "shift"
+
+#: ../src/common/appbase.cpp:773
+msgid "show this help message"
+msgstr "prikaži ovu obavijest za pomoć"
+
+#: ../src/common/datetimefmt.cpp:1967
+msgid "sixteenth"
+msgstr "šesnaesti"
+
+#: ../src/common/datetimefmt.cpp:1957
+msgid "sixth"
+msgstr "šesti"
+
+#: ../src/common/appcmn.cpp:234
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "odredi prikazni modus, koja će se koristiti (npr.. 640x480-16)"
+
+#: ../src/common/appcmn.cpp:220
+msgid "specify the theme to use"
+msgstr "odredi temu, koja će se koristiti"
+
+#: ../src/richtext/richtextbuffer.cpp:9340
+msgid "standard/circle"
+msgstr "standardno/krug"
+
+#: ../src/richtext/richtextbuffer.cpp:9341
+msgid "standard/circle-outline"
+msgstr "standardno/krug-obrisni"
+
+#: ../src/richtext/richtextbuffer.cpp:9343
+msgid "standard/diamond"
+msgstr "standardno/romb"
+
+#: ../src/richtext/richtextbuffer.cpp:9342
+msgid "standard/square"
+msgstr "standardno/kvadrat"
+
+#: ../src/richtext/richtextbuffer.cpp:9344
+msgid "standard/triangle"
+msgstr "standardno/trokut"
+
+#: ../src/common/zipstrm.cpp:1985
+msgid "stored file length not in Zip header"
+msgstr "spremljena dužina datoteke nije u Zip zaglavlju"
+
+#: ../src/common/cmdline.cpp:1488
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:982
+msgid "strikethrough"
+msgstr "precrtano"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "tar unos nije otvoren"
+
+#: ../src/common/datetimefmt.cpp:1961
+msgid "tenth"
+msgstr "deseti"
+
+#: ../src/msw/dde.cpp:1123
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "odgovor transakciji je prouzročilo, da se postavio DDE_FBUSY bit."
+
+#: ../src/common/datetimefmt.cpp:1954
+msgid "third"
+msgstr "treći"
+
+#: ../src/common/datetimefmt.cpp:1964
+msgid "thirteenth"
+msgstr "trinaesti"
+
+#: ../src/common/datetimefmt.cpp:1758
+msgid "today"
+msgstr "danas"
+
+#: ../src/common/datetimefmt.cpp:1760
+msgid "tomorrow"
+msgstr "sutra"
+
+#: ../src/common/fileconf.cpp:1944
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "prateća obrnuta kosa crta je zanemarena u '%s'"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "prevoditelji"
+
+#. TRANSLATORS: Name of Boolean true value
+#: ../src/generic/datavgen.cpp:1028
+msgid "true"
+msgstr "točno"
+
+#: ../src/common/datetimefmt.cpp:1963
+msgid "twelfth"
+msgstr "dvanaesti"
+
+#: ../src/common/datetimefmt.cpp:1971
+msgid "twentieth"
+msgstr "dvadeseti"
+
+#. TRANSLATORS: Checkbox state name
+#: ../src/generic/treelist.cpp:486 ../src/generic/datavgen.cpp:1263
+msgid "unchecked"
+msgstr "neaktivirano"
+
+#: ../src/common/fontcmn.cpp:802 ../src/common/fontcmn.cpp:978
+msgid "underlined"
+msgstr "podcrtano"
+
+#. TRANSLATORS: Checkbox state name
+#: ../src/generic/treelist.cpp:490
+msgid "undetermined"
+msgstr "neodređeno"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "neočekivani \" na poziciji %d u '%s'."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "neočekivani kraj datoteke"
+
+#: ../src/generic/progdlgg.cpp:370 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "nepoznato"
+
+#: ../src/msw/registry.cpp:150
+#, c-format
+msgid "unknown (%lu)"
+msgstr "nepoznato (%lu)"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "nepoznati razred %s"
+
+#: ../src/common/regex.cpp:258 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "nepoznata greška"
+
+#: ../src/msw/dialup.cpp:471
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "nepoznata greška (kod greške %08x)."
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "nepoznat-%d"
+
+#: ../src/common/docview.cpp:509
+msgid "unnamed"
+msgstr "neimenovano"
+
+#: ../src/common/docview.cpp:1624
+#, c-format
+msgid "unnamed%d"
+msgstr "neimenovano%d"
+
+#: ../src/common/zipstrm.cpp:1999 ../src/common/zipstrm.cpp:2319
+msgid "unsupported Zip compression method"
+msgstr "nepodržana metoda Zip kompresije"
+
+#: ../src/common/translation.cpp:1892
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "koristi se katalog '%s' od '%s'."
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "greška u pisanju"
+
+#: ../src/common/time.cpp:292
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay."
+
+#: ../src/motif/app.cpp:242
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "wxWidgets nisu mogli otvoriti zaslon za '%s': izlaženje."
+
+#: ../src/x11/app.cpp:170
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets nisu mogli otvoriti zaslon. Izlaženje."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1759
+msgid "yesterday"
+msgstr "jučer"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "zlib greška %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "~"
+msgstr "~"
diff --git a/misc/scripts/inc_release b/misc/scripts/inc_release
index 4a81ad9d91..00bd8eee95 100755
--- a/misc/scripts/inc_release
+++ b/misc/scripts/inc_release
@@ -83,9 +83,6 @@ run_sed docs/readme.txt \
"/\//s/$ver_for_sed/$ver_string_new/" \
"/naming: while/s/$ver_for_sed/$ver_string_new/"
-run_sed docs/msw/install.txt \
- "/^wxWidgets\/releases\//s/$ver_for_sed/$ver_string_new/"
-
run_sed docs/doxygen/Doxyfile \
"/^PROJECT_NUMBER/s/$ver_for_sed/$ver_string_new/"
diff --git a/samples/access/Makefile.in b/samples/access/Makefile.in
index f571d79ef2..183006d277 100644
--- a/samples/access/Makefile.in
+++ b/samples/access/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
ACCESSTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/animate/Makefile.in b/samples/animate/Makefile.in
index 89535addaa..4dda2ce105 100644
--- a/samples/animate/Makefile.in
+++ b/samples/animate/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
ANITEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/artprov/Makefile.in b/samples/artprov/Makefile.in
index c0872109c3..22ad1b48fb 100644
--- a/samples/artprov/Makefile.in
+++ b/samples/artprov/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
ARTTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/aui/Makefile.in b/samples/aui/Makefile.in
index 707f37ac52..8e69ef8364 100644
--- a/samples/aui/Makefile.in
+++ b/samples/aui/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
AUIDEMO_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/calendar/Makefile.in b/samples/calendar/Makefile.in
index 98aa08a38e..c3b1cf5db5 100644
--- a/samples/calendar/Makefile.in
+++ b/samples/calendar/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
CALENDAR_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/caret/Makefile.in b/samples/caret/Makefile.in
index 0cde6e4fb8..b5bbac3cf6 100644
--- a/samples/caret/Makefile.in
+++ b/samples/caret/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
CARET_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/clipboard/Makefile.in b/samples/clipboard/Makefile.in
index b19c7f9b16..3b2cbcfe38 100644
--- a/samples/clipboard/Makefile.in
+++ b/samples/clipboard/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
CLIPBOARD_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/collpane/Makefile.in b/samples/collpane/Makefile.in
index 3a87aef156..8eb9e4357a 100644
--- a/samples/collpane/Makefile.in
+++ b/samples/collpane/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
COLLPANE_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/combo/Makefile.in b/samples/combo/Makefile.in
index 977d7b21aa..60e251d7ae 100644
--- a/samples/combo/Makefile.in
+++ b/samples/combo/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
COMBO_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/config/Makefile.in b/samples/config/Makefile.in
index 3b613f8bcb..5a737e2f5c 100644
--- a/samples/config/Makefile.in
+++ b/samples/config/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
CONFTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/dataview/Makefile.in b/samples/dataview/Makefile.in
index 7d9dfdb4fb..dddf56da70 100644
--- a/samples/dataview/Makefile.in
+++ b/samples/dataview/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DATAVIEW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp
index 51273a6106..53a80d920d 100644
--- a/samples/dataview/dataview.cpp
+++ b/samples/dataview/dataview.cpp
@@ -165,11 +165,12 @@ private:
// the controls stored in the various tabs of the main notebook:
- wxDataViewCtrl* m_ctrl[4];
+ wxDataViewCtrl* m_ctrl[5];
// the models associated with the first two DVC:
wxObjectDataPtr m_music_model;
+ wxObjectDataPtr m_long_music_model;
wxObjectDataPtr m_list_model;
// other data:
@@ -287,6 +288,53 @@ private:
};
+// ----------------------------------------------------------------------------
+// MultiLineCustomRenderer
+// ----------------------------------------------------------------------------
+
+class MultiLineCustomRenderer : public wxDataViewCustomRenderer
+{
+public:
+ // a simple renderer that wraps each word on a new line
+ explicit MultiLineCustomRenderer()
+ : wxDataViewCustomRenderer("string", wxDATAVIEW_CELL_INERT, 0)
+ { }
+
+ virtual bool Render(wxRect rect, wxDC *dc, int state) wxOVERRIDE
+ {
+ RenderText(m_value, 0, rect, dc, state);
+ return true;
+ }
+
+ virtual wxSize GetSize() const wxOVERRIDE
+ {
+ wxSize txtSize = GetTextExtent(m_value);
+ int lines = m_value.Freq('\n') + 1;
+ txtSize.SetHeight(txtSize.GetHeight() * lines);
+ return txtSize;
+ }
+
+ virtual bool SetValue(const wxVariant &value) wxOVERRIDE
+ {
+ m_value = value.GetString();
+ m_value.Replace(" ", "\n");
+ return true;
+ }
+
+ virtual bool GetValue(wxVariant &WXUNUSED(value)) const wxOVERRIDE { return true; }
+
+#if wxUSE_ACCESSIBILITY
+ virtual wxString GetAccessibleDescription() const wxOVERRIDE
+ {
+ return m_value;
+ }
+#endif // wxUSE_ACCESSIBILITY
+
+private:
+ wxString m_value;
+};
+
+
// ============================================================================
// implementation
// ============================================================================
@@ -410,7 +458,7 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_BUTTON( ID_SHOW_ATTRIBUTES, MyFrame::OnShowAttributes)
EVT_CHECKBOX( ID_MULTIPLE_SORT, MyFrame::OnMultipleSort)
EVT_CHECKBOX( ID_SORT_BY_FIRST_COLUMN, MyFrame::OnSortByFirstColumn)
-
+
// Fourth page.
EVT_BUTTON( ID_DELETE_TREE_ITEM, MyFrame::OnDeleteTreeItem )
EVT_BUTTON( ID_DELETE_ALL_TREE_ITEMS, MyFrame::OnDeleteAllTreeItems )
@@ -459,6 +507,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int
m_ctrl[1] = NULL;
m_ctrl[2] = NULL;
m_ctrl[3] = NULL;
+ m_ctrl[4] = NULL;
m_eventFromProgram = false;
@@ -606,6 +655,16 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int
fourthPanelSz->Add(button_sizer4);
fourthPanel->SetSizerAndFit(fourthPanelSz);
+ // fifth page of the notebook
+ // ---------------------------
+
+ wxPanel *fifthPanel = new wxPanel(m_notebook, wxID_ANY);
+
+ BuildDataViewCtrl(fifthPanel, 4); // sets m_ctrl[4]
+
+ wxSizer *fifthPanelSz = new wxBoxSizer(wxVERTICAL);
+ fifthPanelSz->Add(m_ctrl[4], 1, wxGROW | wxALL, 5);
+ fifthPanel->SetSizerAndFit(fifthPanelSz);
// complete GUI
@@ -615,6 +674,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int
m_notebook->AddPage(secondPanel, "MyListModel");
m_notebook->AddPage(thirdPanel, "wxDataViewListCtrl");
m_notebook->AddPage(fourthPanel, "wxDataViewTreeCtrl");
+ m_notebook->AddPage(fifthPanel, "wxDataViewTreeCtrl Variable line height");
wxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
@@ -793,7 +853,7 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel, unsigned l
lc->AppendColumn(colRadio, "bool");
lc->AppendTextColumn( "Text" );
- lc->AppendProgressColumn( "Progress" );
+ lc->AppendProgressColumn( "Progress" )->SetMinWidth(100);
wxVector data;
for (unsigned int i=0; i<10; i++)
@@ -837,6 +897,35 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel, unsigned l
tc->Expand(cont);
}
break;
+
+ case 4:
+ {
+ wxASSERT(!m_ctrl[4] && !m_long_music_model);
+ m_ctrl[4] =
+ new wxDataViewCtrl( parent, wxID_ANY, wxDefaultPosition,
+ wxDefaultSize, style | wxDV_VARIABLE_LINE_HEIGHT );
+
+ m_long_music_model = new MyLongMusicTreeModel;
+ m_ctrl[4]->AssociateModel(m_long_music_model.get());
+
+ // column 0 of the view control:
+ MultiLineCustomRenderer *tr =
+ new MultiLineCustomRenderer();
+ wxDataViewColumn *column0 =
+ new wxDataViewColumn("title", tr, 0, 200, wxALIGN_LEFT,
+ wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE);
+ m_ctrl[4]->AppendColumn(column0);
+
+ // column 1 of the view control:
+ tr = new MultiLineCustomRenderer();
+ wxDataViewColumn *column1 =
+ new wxDataViewColumn("artist", tr, 1, 150, wxALIGN_LEFT,
+ wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_REORDERABLE |
+ wxDATAVIEW_COL_RESIZABLE);
+ column1->SetMinWidth(150); // this column can't be resized to be smaller
+ m_ctrl[4]->AppendColumn(column1);
+ }
+ break;
}
}
@@ -1013,6 +1102,8 @@ void MyFrame::OnStyleChange( wxCommandEvent& WXUNUSED(event) )
m_music_model.reset(NULL);
else if (nPanel == 1)
m_list_model.reset(NULL);
+ else if (nPanel == 4)
+ m_long_music_model.reset(NULL);
// rebuild the DVC for the selected panel:
BuildDataViewCtrl((wxPanel*)m_notebook->GetPage(nPanel), nPanel, style);
diff --git a/samples/dataview/mymodels.cpp b/samples/dataview/mymodels.cpp
index fcffc59d69..e00ba68099 100644
--- a/samples/dataview/mymodels.cpp
+++ b/samples/dataview/mymodels.cpp
@@ -312,6 +312,19 @@ unsigned int MyMusicTreeModel::GetChildren( const wxDataViewItem &parent,
}
+// ----------------------------------------------------------------------------
+// MyLongMusicTreeModel
+// ----------------------------------------------------------------------------
+
+MyLongMusicTreeModel::MyLongMusicTreeModel() : MyMusicTreeModel()
+{
+ for (int i = 0; i < 50; i++)
+ {
+ AddToClassical("The Four Seasons", "Antonio Vivaldi", 1721);
+ AddToClassical("La costanza trionfante degl'amori e de gl'odii", "Antonio Vivaldi", 1716);
+ }
+}
+
// ----------------------------------------------------------------------------
// MyListModel
diff --git a/samples/dataview/mymodels.h b/samples/dataview/mymodels.h
index 59d3c984a7..db089197a9 100644
--- a/samples/dataview/mymodels.h
+++ b/samples/dataview/mymodels.h
@@ -188,6 +188,17 @@ private:
};
+// ----------------------------------------------------------------------------
+// MyLongMusicTreeModel
+// ----------------------------------------------------------------------------
+
+class MyLongMusicTreeModel : public MyMusicTreeModel
+{
+public:
+ MyLongMusicTreeModel();
+};
+
+
// ----------------------------------------------------------------------------
// MyListModel
// ----------------------------------------------------------------------------
diff --git a/samples/debugrpt/Makefile.in b/samples/debugrpt/Makefile.in
index 3fcda9313e..a09717f94e 100644
--- a/samples/debugrpt/Makefile.in
+++ b/samples/debugrpt/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DEBUGRPT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/dialogs/Makefile.in b/samples/dialogs/Makefile.in
index f9e618bff3..5c29eb0ef2 100644
--- a/samples/dialogs/Makefile.in
+++ b/samples/dialogs/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DIALOGS_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
@@ -198,6 +198,9 @@ dialogs_sample_rc.o: $(srcdir)/../../samples/sample.rc
dialogs_dialogs.o: $(srcdir)/dialogs.cpp
$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $(srcdir)/dialogs.cpp
+dialogs_fontdlgg.o: $(srcdir)/../../src/generic/fontdlgg.cpp
+ $(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $(srcdir)/../../src/generic/fontdlgg.cpp
+
@COND_SHARED_0_TOOLKIT_MSW_WXUNIV_0@dialogs_colrdlgg.o: $(srcdir)/../../src/generic/colrdlgg.cpp
@COND_SHARED_0_TOOLKIT_MSW_WXUNIV_0@ $(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $(srcdir)/../../src/generic/colrdlgg.cpp
@@ -220,9 +223,6 @@ dialogs_dialogs.o: $(srcdir)/dialogs.cpp
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ $(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $(srcdir)/../../src/generic/filedlgg.cpp
-@COND_SHARED_0_TOOLKIT_MSW_WXUNIV_0@dialogs_fontdlgg.o: $(srcdir)/../../src/generic/fontdlgg.cpp
-@COND_SHARED_0_TOOLKIT_MSW_WXUNIV_0@ $(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $(srcdir)/../../src/generic/fontdlgg.cpp
-
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
diff --git a/samples/dialup/Makefile.in b/samples/dialup/Makefile.in
index 68bd936bf0..fe259471c4 100644
--- a/samples/dialup/Makefile.in
+++ b/samples/dialup/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
NETTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/display/Makefile.in b/samples/display/Makefile.in
index bafb9800c7..919fa34ed0 100644
--- a/samples/display/Makefile.in
+++ b/samples/display/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DISPLAY_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/dll/Makefile.in b/samples/dll/Makefile.in
index 5eec3e1e1a..67fa0f4189 100644
--- a/samples/dll/Makefile.in
+++ b/samples/dll/Makefile.in
@@ -47,7 +47,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
MY_DLL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/dnd/Makefile.in b/samples/dnd/Makefile.in
index f1b6583b40..09eef17aa4 100644
--- a/samples/dnd/Makefile.in
+++ b/samples/dnd/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DND_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/docview/Info.plist b/samples/docview/Info.plist
index e4e80b1619..ef98445d90 100644
--- a/samples/docview/Info.plist
+++ b/samples/docview/Info.plist
@@ -51,7 +51,7 @@
CFBundleExecutable
$(PRODUCT_NAME)
CFBundleGetInfoString
- $(PRODUCT_NAME) version 3.1.2, (c) 2005-2018 wxWidgets
+ $(PRODUCT_NAME) version 3.1.3, (c) 2005-2018 wxWidgets
CFBundleIconFile
doc
CFBundleIdentifier
@@ -66,17 +66,17 @@
it
CFBundleLongVersionString
- 3.1.2, (c) 2005-2018 wxWidgets
+ 3.1.3, (c) 2005-2018 wxWidgets
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.1.2
+ 3.1.3
CFBundleSignature
WXMA
CFBundleVersion
- 3.1.2
+ 3.1.3
CSResourcesFileMapped
LSRequiresCarbon
diff --git a/samples/docview/Makefile.in b/samples/docview/Makefile.in
index 9c174054d5..ed013660c0 100644
--- a/samples/docview/Makefile.in
+++ b/samples/docview/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DOCVIEW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/docview/docview.cpp b/samples/docview/docview.cpp
index 3785a06235..74409d313d 100644
--- a/samples/docview/docview.cpp
+++ b/samples/docview/docview.cpp
@@ -287,7 +287,10 @@ bool MyApp::OnInit()
if ( m_filesFromCmdLine.empty() )
{
+ // on macOS the dialog will be shown by MacNewFile
+#ifndef __WXMAC__
docManager->CreateNewDocument();
+#endif
}
else // we have files to open on command line
{
diff --git a/samples/dragimag/Makefile.in b/samples/dragimag/Makefile.in
index cdcd5c3002..f5974b4ee3 100644
--- a/samples/dragimag/Makefile.in
+++ b/samples/dragimag/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DRAGIMAG_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/drawing/Makefile.in b/samples/drawing/Makefile.in
index 12385f46ea..690ce31287 100644
--- a/samples/drawing/Makefile.in
+++ b/samples/drawing/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
DRAWING_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/erase/Makefile.in b/samples/erase/Makefile.in
index 8c04bfff92..60f1c79ee1 100644
--- a/samples/erase/Makefile.in
+++ b/samples/erase/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
ERASE_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/event/Makefile.in b/samples/event/Makefile.in
index c99d2b6932..ebef4ff7f5 100644
--- a/samples/event/Makefile.in
+++ b/samples/event/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
EVENT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/except/Makefile.in b/samples/except/Makefile.in
index 78abbfb69c..85a876d838 100644
--- a/samples/except/Makefile.in
+++ b/samples/except/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
EXCEPT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/exec/Makefile.in b/samples/exec/Makefile.in
index 4e6222a271..302de8a82e 100644
--- a/samples/exec/Makefile.in
+++ b/samples/exec/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
EXEC_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/font/Makefile.in b/samples/font/Makefile.in
index eca4325ffd..24a137b536 100644
--- a/samples/font/Makefile.in
+++ b/samples/font/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
FONT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/fswatcher/Makefile.in b/samples/fswatcher/Makefile.in
index b88bf03ab5..878268a606 100644
--- a/samples/fswatcher/Makefile.in
+++ b/samples/fswatcher/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
FSWATCHER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/grid/Makefile.in b/samples/grid/Makefile.in
index ba1ff71dc3..6b2f41c7e1 100644
--- a/samples/grid/Makefile.in
+++ b/samples/grid/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
GRID_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp
index 38da7193b9..aaef518711 100644
--- a/samples/grid/griddemo.cpp
+++ b/samples/grid/griddemo.cpp
@@ -555,6 +555,16 @@ GridFrame::GridFrame()
grid->SetCellAlignment(3, 9, wxALIGN_CENTRE, wxALIGN_TOP);
grid->SetCellValue(3, 10, "<- This numeric cell should be centred");
+ grid->SetColFormatDate(13); // Localized by default.
+ grid->SetColFormatDate(14, "%Y-%m-%d"); // ISO 8601 date format.
+
+ grid->SetCellValue(7, 0, "Today");
+ grid->SetCellRenderer(7, 0, new wxGridCellDateRenderer);
+ grid->SetCellEditor(7, 0, new wxGridCellDateEditor);
+ grid->SetCellValue(8, 0, "Tomorrow");
+ grid->SetCellRenderer(8, 0, new wxGridCellDateRenderer("%Y-%m-%d"));
+ grid->SetCellEditor(8, 0, new wxGridCellDateEditor);
+
const wxString choices[] =
{
"Please select a choice",
diff --git a/samples/help/Makefile.in b/samples/help/Makefile.in
index f4fac29686..242dc27163 100644
--- a/samples/help/Makefile.in
+++ b/samples/help/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
HELP_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/htlbox/Makefile.in b/samples/htlbox/Makefile.in
index fe33e17a97..75093b2b44 100644
--- a/samples/htlbox/Makefile.in
+++ b/samples/htlbox/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
HTLBOX_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/html/about/Makefile.in b/samples/html/about/Makefile.in
index 28ab32229b..3da1940d53 100644
--- a/samples/html/about/Makefile.in
+++ b/samples/html/about/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
ABOUT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/html/help/Makefile.in b/samples/html/help/Makefile.in
index e07831b562..244d179c71 100644
--- a/samples/html/help/Makefile.in
+++ b/samples/html/help/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
HTMLHELP_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/html/helpview/Makefile.in b/samples/html/helpview/Makefile.in
index 33739f4716..fd71f74ae4 100644
--- a/samples/html/helpview/Makefile.in
+++ b/samples/html/helpview/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
HELPVIEW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/html/html_samples.bkl b/samples/html/html_samples.bkl
index f147d02f28..102802e4d7 100644
--- a/samples/html/html_samples.bkl
+++ b/samples/html/html_samples.bkl
@@ -2,7 +2,7 @@
-
+
$(id)
all
diff --git a/samples/html/htmlctrl/Makefile.in b/samples/html/htmlctrl/Makefile.in
index 689aaf8eab..edd0c6f43a 100644
--- a/samples/html/htmlctrl/Makefile.in
+++ b/samples/html/htmlctrl/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
HTMLCTRL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/html/htmlctrl/htmlctrl.cpp b/samples/html/htmlctrl/htmlctrl.cpp
index fccc1c748c..7679abcc56 100644
--- a/samples/html/htmlctrl/htmlctrl.cpp
+++ b/samples/html/htmlctrl/htmlctrl.cpp
@@ -66,7 +66,7 @@ public:
// this one is called on application startup and is a good place for the app
// initialization (doing it here and not in the ctor allows to have an error
// return: if OnInit() returns false, the application terminates)
- virtual bool OnInit();
+ virtual bool OnInit() wxOVERRIDE;
};
// Define a new frame type: this is going to be our main frame
diff --git a/samples/html/printing/Makefile.in b/samples/html/printing/Makefile.in
index 250602ff17..354273db3e 100644
--- a/samples/html/printing/Makefile.in
+++ b/samples/html/printing/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
HTMLPRINTING_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/html/test/Makefile.in b/samples/html/test/Makefile.in
index 1b9c6052fa..a5723a79f2 100644
--- a/samples/html/test/Makefile.in
+++ b/samples/html/test/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/html/virtual/Makefile.in b/samples/html/virtual/Makefile.in
index 211077ef89..faa9924287 100644
--- a/samples/html/virtual/Makefile.in
+++ b/samples/html/virtual/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
VIRTUAL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/html/widget/Makefile.in b/samples/html/widget/Makefile.in
index 39a71c056a..a2cb354287 100644
--- a/samples/html/widget/Makefile.in
+++ b/samples/html/widget/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
WIDGET_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/html/zip/Makefile.in b/samples/html/zip/Makefile.in
index 7ed0473a94..65f1a8ecf3 100644
--- a/samples/html/zip/Makefile.in
+++ b/samples/html/zip/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
ZIP_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/image/Makefile.in b/samples/image/Makefile.in
index e2c1229337..6a06bfc027 100644
--- a/samples/image/Makefile.in
+++ b/samples/image/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
IMAGE_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/internat/Makefile.in b/samples/internat/Makefile.in
index 3ef989d92d..c518bb8c60 100644
--- a/samples/internat/Makefile.in
+++ b/samples/internat/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
INTERNAT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/ipc/Makefile.in b/samples/ipc/Makefile.in
index 92ea202001..1743cd69b6 100644
--- a/samples/ipc/Makefile.in
+++ b/samples/ipc/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
IPCCLIENT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/ipc/server.cpp b/samples/ipc/server.cpp
index 54d2763898..cbaf7586e9 100644
--- a/samples/ipc/server.cpp
+++ b/samples/ipc/server.cpp
@@ -268,17 +268,18 @@ void MyServer::Advise()
{
const wxDateTime now = wxDateTime::Now();
- m_connection->Advise(m_connection->m_advise, now.Format());
+ wxString str = wxString::FromUTF8("\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82");
+ m_connection->Advise(m_connection->m_advise, str + " (using UTF-8)");
+ str += " (using wchar_t)";
+ m_connection->Advise(m_connection->m_advise,
+ str.wc_str(), (str.length() + 1)*sizeof(wchar_t),
+ wxIPC_UNICODETEXT);
+
+ // This one uses wxIPC_TEXT by default.
const wxString s = now.FormatTime() + " " + now.FormatDate();
m_connection->Advise(m_connection->m_advise, s.mb_str(), wxNO_LEN);
-#if wxUSE_DDE_FOR_IPC
- wxLogMessage("DDE Advise type argument cannot be wxIPC_PRIVATE. "
- "The client will receive it as wxIPC_TEXT, "
- " and receive the correct no of bytes, "
- "but not print a correct log entry.");
-#endif
char bytes[3] = { '1', '2', '3' };
m_connection->Advise(m_connection->m_advise, bytes, 3, wxIPC_PRIVATE);
}
diff --git a/samples/joytest/Makefile.in b/samples/joytest/Makefile.in
index c8ac8839e9..2ed708d4fa 100644
--- a/samples/joytest/Makefile.in
+++ b/samples/joytest/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
JOYTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/keyboard/Makefile.in b/samples/keyboard/Makefile.in
index 81699ecf03..bc66367950 100644
--- a/samples/keyboard/Makefile.in
+++ b/samples/keyboard/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
KEYBOARD_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/layout/Makefile.in b/samples/layout/Makefile.in
index e5c429f7d5..647d032bf4 100644
--- a/samples/layout/Makefile.in
+++ b/samples/layout/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
LAYOUT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/listctrl/Makefile.in b/samples/listctrl/Makefile.in
index eff840df3f..47db8a86df 100644
--- a/samples/listctrl/Makefile.in
+++ b/samples/listctrl/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
LISTCTRL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/mdi/Makefile.in b/samples/mdi/Makefile.in
index 43aaacff3c..5956c64ea4 100644
--- a/samples/mdi/Makefile.in
+++ b/samples/mdi/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
MDI_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/mediaplayer/Makefile.in b/samples/mediaplayer/Makefile.in
index 66452d80b0..b17a1aa205 100644
--- a/samples/mediaplayer/Makefile.in
+++ b/samples/mediaplayer/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
MEDIAPLAYER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/memcheck/Makefile.in b/samples/memcheck/Makefile.in
index b8df990e07..fdc9eecbd1 100644
--- a/samples/memcheck/Makefile.in
+++ b/samples/memcheck/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
MEMCHECK_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/menu/Makefile.in b/samples/menu/Makefile.in
index 4c0b4ad669..3d0b33925e 100644
--- a/samples/menu/Makefile.in
+++ b/samples/menu/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
MENU_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/minimal/Info_cocoa.plist b/samples/minimal/Info_cocoa.plist
index 42d8369cb5..8b2b276be9 100644
--- a/samples/minimal/Info_cocoa.plist
+++ b/samples/minimal/Info_cocoa.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
$(PRODUCT_NAME)
CFBundleGetInfoString
- $(PRODUCT_NAME) version 3.1.2, (c) 2005-2018 wxWidgets
+ $(PRODUCT_NAME) version 3.1.3, (c) 2005-2018 wxWidgets
CFBundleIconFile
wxmac.icns
CFBundleIdentifier
@@ -22,17 +22,17 @@
it
CFBundleLongVersionString
- 3.1.2, (c) 2005-2018 wxWidgets
+ 3.1.3, (c) 2005-2018 wxWidgets
CFBundleName
$(PRODUCT_NAME)
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.1.2
+ 3.1.3
CFBundleSignature
????
CFBundleVersion
- 3.1.2
+ 3.1.3
NSHumanReadableCopyright
Copyright 2005-2018 wxWidgets
NSPrincipalClass
diff --git a/samples/minimal/Makefile.in b/samples/minimal/Makefile.in
index 602f911640..9414fe380b 100644
--- a/samples/minimal/Makefile.in
+++ b/samples/minimal/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
MINIMAL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp
index f765a70dac..0d91f7fc75 100644
--- a/samples/minimal/minimal.cpp
+++ b/samples/minimal/minimal.cpp
@@ -170,6 +170,7 @@ MyFrame::MyFrame(const wxString& title)
wxButton* aboutBtn = new wxButton(this, wxID_ANY, "About...");
aboutBtn->Bind(wxEVT_BUTTON, &MyFrame::OnAbout, this);
sizer->Add(aboutBtn, wxSizerFlags().Center());
+ SetSizer(sizer);
#endif // wxUSE_MENUS/!wxUSE_MENUS
#if wxUSE_STATUSBAR
diff --git a/samples/nativdlg/Makefile.in b/samples/nativdlg/Makefile.in
index c1fd94a974..9c10d003ae 100644
--- a/samples/nativdlg/Makefile.in
+++ b/samples/nativdlg/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
NATIVDLG_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/notebook/Makefile.in b/samples/notebook/Makefile.in
index 786a2d9335..18f5e8eb6b 100644
--- a/samples/notebook/Makefile.in
+++ b/samples/notebook/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
NOTEBOOK_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/oleauto/Makefile.in b/samples/oleauto/Makefile.in
index 1d0d6e8b7c..4d2bdad54c 100644
--- a/samples/oleauto/Makefile.in
+++ b/samples/oleauto/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
OLEAUTO_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/opengl/cube/Makefile.in b/samples/opengl/cube/Makefile.in
index 93c44642a8..b870a69ad4 100644
--- a/samples/opengl/cube/Makefile.in
+++ b/samples/opengl/cube/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
CUBE_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/opengl/isosurf/Makefile.in b/samples/opengl/isosurf/Makefile.in
index ec6a5136fa..ba6c84ea09 100644
--- a/samples/opengl/isosurf/Makefile.in
+++ b/samples/opengl/isosurf/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
ISOSURF_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/opengl/penguin/Makefile.in b/samples/opengl/penguin/Makefile.in
index cd5d9e0bfa..bf6f92de7b 100644
--- a/samples/opengl/penguin/Makefile.in
+++ b/samples/opengl/penguin/Makefile.in
@@ -44,7 +44,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
PENGUIN_CFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/opengl/pyramid/Makefile.in b/samples/opengl/pyramid/Makefile.in
index fec47d7616..3717f50e3a 100644
--- a/samples/opengl/pyramid/Makefile.in
+++ b/samples/opengl/pyramid/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
PYRAMID_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/ownerdrw/Makefile.in b/samples/ownerdrw/Makefile.in
index e9a805d717..ca632ed03e 100644
--- a/samples/ownerdrw/Makefile.in
+++ b/samples/ownerdrw/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
OWNERDRW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/ownerdrw/ownerdrw.bkl b/samples/ownerdrw/ownerdrw.bkl
index ba1d11fa1a..de97a1d464 100644
--- a/samples/ownerdrw/ownerdrw.bkl
+++ b/samples/ownerdrw/ownerdrw.bkl
@@ -9,7 +9,7 @@
base
ownerdrw.rc
-
+
sound.png nosound.png
diff --git a/samples/popup/Makefile.in b/samples/popup/Makefile.in
index 0bee55e6ae..f5ee9ea45d 100644
--- a/samples/popup/Makefile.in
+++ b/samples/popup/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
POPUP_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/power/Makefile.in b/samples/power/Makefile.in
index 8057d940a3..4a4d3cb1cc 100644
--- a/samples/power/Makefile.in
+++ b/samples/power/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
POWER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/preferences/Makefile.in b/samples/preferences/Makefile.in
index e791885b28..bde2b0b488 100644
--- a/samples/preferences/Makefile.in
+++ b/samples/preferences/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
PREFERENCES_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/printing/Makefile.in b/samples/printing/Makefile.in
index 888a1fe4c1..3e52b7b637 100644
--- a/samples/printing/Makefile.in
+++ b/samples/printing/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
PRINTING_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp
index 682dac26c3..0050833cdc 100644
--- a/samples/printing/printing.cpp
+++ b/samples/printing/printing.cpp
@@ -38,6 +38,7 @@
#if wxUSE_GRAPHICS_CONTEXT
#include "wx/graphics.h"
+ #include "wx/scopedptr.h"
#endif
#ifdef __WXMAC__
@@ -219,7 +220,7 @@ void MyApp::Draw(wxDC&dc)
dc.DrawBitmap( m_bitmap, 10, 10 );
#if wxUSE_GRAPHICS_CONTEXT
- wxGraphicsContext *gc = wxGraphicsContext::CreateFromUnknownDC(dc);
+ wxScopedPtr gc(wxGraphicsContext::CreateFromUnknownDC(dc));
if (gc)
{
@@ -243,12 +244,10 @@ void MyApp::Draw(wxDC&dc)
gc->DrawText(text, 25.0, 60.0);
// draw rectangle around the text
- double w, h, d, el;
- gc->GetTextExtent(text, &w, &h, &d, &el);
+ double w, h;
+ gc->GetTextExtent(text, &w, &h);
gc->SetPen( *wxBLACK_PEN );
gc->DrawRectangle(25.0, 60.0, w, h);
-
- delete gc;
}
#endif
diff --git a/samples/propgrid/Makefile.in b/samples/propgrid/Makefile.in
index e5daff2296..435062c92a 100644
--- a/samples/propgrid/Makefile.in
+++ b/samples/propgrid/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
PROPGRID_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp
index d323873cf1..db343f3a21 100644
--- a/samples/propgrid/propgrid.cpp
+++ b/samples/propgrid/propgrid.cpp
@@ -422,6 +422,7 @@ enum
ID_SETPROPERTYVALUE,
ID_TESTREPLACE,
ID_SETCOLUMNS,
+ ID_SETVIRTWIDTH,
ID_TESTXRC,
ID_ENABLECOMMONVALUES,
ID_SELECTSTYLE,
@@ -522,6 +523,7 @@ wxBEGIN_EVENT_TABLE(FormMain, wxFrame)
EVT_MENU( ID_CATCOLOURS, FormMain::OnCatColours )
EVT_MENU( ID_SETCOLUMNS, FormMain::OnSetColumns )
+ EVT_MENU( ID_SETVIRTWIDTH, FormMain::OnSetVirtualWidth )
EVT_MENU( ID_TESTXRC, FormMain::OnTestXRC )
EVT_MENU( ID_ENABLECOMMONVALUES, FormMain::OnEnableCommonValues )
EVT_MENU( ID_SELECTSTYLE, FormMain::OnSelectStyle )
@@ -1157,7 +1159,8 @@ void FormMain::PopulateWithStandardItems ()
// Set test information for cells in columns 3 and 4
// (reserve column 2 for displaying units)
wxPropertyGridIterator it;
- wxBitmap bmp = wxArtProvider::GetBitmap(wxART_FOLDER);
+ int bmpH = pg->GetGrid()->GetRowHeight() - 2;
+ wxBitmap bmp = wxArtProvider::GetBitmap(wxART_FOLDER, wxART_OTHER, wxSize(bmpH, bmpH));
for ( it = pg->GetGrid()->GetIterator();
!it.AtEnd();
@@ -2119,6 +2122,7 @@ FormMain::FormMain(const wxString& title, const wxPoint& pos, const wxSize& size
menuTry->AppendCheckItem(ID_BOOL_CHECKBOX, "Render Boolean values as checkboxes",
"Renders Boolean values as checkboxes");
menuTry->Append(ID_SETCOLUMNS, "Set Number of Columns" );
+ menuTry->Append(ID_SETVIRTWIDTH, "Set Virtual Width");
menuTry->AppendSeparator();
menuTry->Append(ID_TESTXRC, "Display XRC sample" );
@@ -2571,8 +2575,8 @@ FormMain::OnSetBackgroundColour( wxCommandEvent& event )
if ( col.IsOk() )
{
- bool recursively = (event.GetId()==ID_SETBGCOLOURRECUR) ? true : false;
- pg->SetPropertyBackgroundColour(prop, col, recursively);
+ int flags = (event.GetId()==ID_SETBGCOLOURRECUR) ? wxPG_RECURSE : 0;
+ pg->SetPropertyBackgroundColour(prop, col, flags);
}
}
@@ -2942,6 +2946,26 @@ void FormMain::OnSetColumns( wxCommandEvent& WXUNUSED(event) )
// -----------------------------------------------------------------------
+void FormMain::OnSetVirtualWidth(wxCommandEvent& WXUNUSED(evt))
+{
+ long oldWidth = m_pPropGridManager->GetState()->GetVirtualWidth();
+ long newWidth = oldWidth;
+ {
+ wxNumberEntryDialog dlg(this, "Enter virtual width (-1-2000).", "Width:",
+ "Change Virtual Width", oldWidth, -1, 2000);
+ if ( dlg.ShowModal() == wxID_OK )
+ {
+ newWidth = dlg.GetValue();
+ }
+ }
+ if ( newWidth != oldWidth )
+ {
+ m_pPropGridManager->GetGrid()->SetVirtualWidth((int)newWidth);
+ }
+}
+
+// -----------------------------------------------------------------------
+
void FormMain::OnSetPropertyValue( wxCommandEvent& WXUNUSED(event) )
{
wxPropertyGrid* pg = m_pPropGridManager->GetGrid();
diff --git a/samples/propgrid/propgrid.h b/samples/propgrid/propgrid.h
index 8ed65a21aa..7827ed3395 100644
--- a/samples/propgrid/propgrid.h
+++ b/samples/propgrid/propgrid.h
@@ -198,6 +198,7 @@ public:
void OnCatColoursUpdateUI( wxUpdateUIEvent& event );
void OnCatColours( wxCommandEvent& event );
void OnSetColumns( wxCommandEvent& event );
+ void OnSetVirtualWidth(wxCommandEvent& evt);
void OnMisc( wxCommandEvent& event );
void OnPopulateClick( wxCommandEvent& event );
void OnSetSpinCtrlEditorClick( wxCommandEvent& event );
diff --git a/samples/propgrid/sampleprops.cpp b/samples/propgrid/sampleprops.cpp
index 9a3b7a1b41..c32ec6e7c3 100644
--- a/samples/propgrid/sampleprops.cpp
+++ b/samples/propgrid/sampleprops.cpp
@@ -277,7 +277,7 @@ wxVariant wxPointProperty::ChildChanged( wxVariant& thisValue,
// -----------------------------------------------------------------------
WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(wxDirsProperty, ',',
- "Browse")
+ wxT("Browse")) // This literal has to be of wxChar* type
#if wxUSE_VALIDATORS
@@ -650,16 +650,12 @@ wxValidator* wxArrayDoubleProperty::DoGetValidator() const
#if wxUSE_VALIDATORS
WX_PG_DOGETVALIDATOR_ENTRY()
- wxTextValidator* validator = new wxTextValidator(wxFILTER_INCLUDE_CHAR_LIST);
+ wxTextValidator* validator =
+ new wxNumericPropertyValidator(wxNumericPropertyValidator::Float);
- // Accept characters for numeric elements
- wxNumericPropertyValidator numValidator(wxNumericPropertyValidator::Float);
- wxArrayString incChars(numValidator.GetIncludes());
// Accept also a delimiter and space character
- incChars.Add(m_delimiter);
- incChars.Add(" ");
-
- validator->SetIncludes(incChars);
+ validator->AddCharIncludes(m_delimiter);
+ validator->AddCharIncludes(" ");
WX_PG_DOGETVALIDATOR_EXIT(validator)
#else
diff --git a/samples/regtest/Makefile.in b/samples/regtest/Makefile.in
index 001aa862db..5c919b5d36 100644
--- a/samples/regtest/Makefile.in
+++ b/samples/regtest/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
REGTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/render/Makefile.in b/samples/render/Makefile.in
index ca9053cb44..512fd136c5 100644
--- a/samples/render/Makefile.in
+++ b/samples/render/Makefile.in
@@ -50,8 +50,8 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
WX_RELEASE_NODOT = 31
-WX_VERSION = $(WX_RELEASE).2
-WX_VERSION_NODOT = $(WX_RELEASE_NODOT)2
+WX_VERSION = $(WX_RELEASE).3
+WX_VERSION_NODOT = $(WX_RELEASE_NODOT)3
LIBDIRNAME = $(wx_top_builddir)/lib
PLUGINS_INST_DIR = $(libdir)/wx/$(PLUGIN_VERSION0)
RENDER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
diff --git a/samples/render/makefile.bcc b/samples/render/makefile.bcc
index 65279c4cbe..6c79b4ec41 100644
--- a/samples/render/makefile.bcc
+++ b/samples/render/makefile.bcc
@@ -22,7 +22,7 @@ BCCDIR = $(MAKEDIR)\..
### Variables: ###
WX_RELEASE_NODOT = 31
-WX_VERSION_NODOT = $(WX_RELEASE_NODOT)2
+WX_VERSION_NODOT = $(WX_RELEASE_NODOT)3
COMPILER_PREFIX = bcc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
diff --git a/samples/render/makefile.gcc b/samples/render/makefile.gcc
index 305e82c4de..9b6149be57 100644
--- a/samples/render/makefile.gcc
+++ b/samples/render/makefile.gcc
@@ -14,7 +14,7 @@ include ../../build/msw/config.gcc
CPPDEPS = -MT$@ -MF$@.d -MD -MP
WX_RELEASE_NODOT = 31
-WX_VERSION_NODOT = $(WX_RELEASE_NODOT)2
+WX_VERSION_NODOT = $(WX_RELEASE_NODOT)3
COMPILER_PREFIX = gcc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
diff --git a/samples/render/makefile.vc b/samples/render/makefile.vc
index a5260c882d..a4ccf72d15 100644
--- a/samples/render/makefile.vc
+++ b/samples/render/makefile.vc
@@ -13,7 +13,7 @@
### Variables: ###
WX_RELEASE_NODOT = 31
-WX_VERSION_NODOT = $(WX_RELEASE_NODOT)2
+WX_VERSION_NODOT = $(WX_RELEASE_NODOT)3
COMPILER_PREFIX = vc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(ARCH_SUFFIX)
diff --git a/samples/render/render.bkl b/samples/render/render.bkl
index fc1b708a13..cc60195a63 100644
--- a/samples/render/render.bkl
+++ b/samples/render/render.bkl
@@ -22,5 +22,5 @@
core
base
-
+
diff --git a/samples/render/render_vc7_renddll.vcproj b/samples/render/render_vc7_renddll.vcproj
index dad8bd0396..e8ad523288 100644
--- a/samples/render/render_vc7_renddll.vcproj
+++ b/samples/render/render_vc7_renddll.vcproj
@@ -36,7 +36,7 @@
BufferSecurityCheck="TRUE"
RuntimeTypeInfo="TRUE"
ObjectFile="vc_mswuddll\renddll\"
- ProgramDataBaseFileName="vc_mswuddll\renddll_mswud312_vc.pdb"
+ ProgramDataBaseFileName="vc_mswuddll\renddll_mswud313_vc.pdb"
WarningLevel="4"
SuppressStartupBanner="TRUE"
Detect64BitPortabilityProblems="TRUE"
@@ -47,12 +47,12 @@
Name="VCLinkerTool"
AdditionalOptions=""
AdditionalDependencies="wxmsw31ud_core.lib wxbase31ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib"
- OutputFile="vc_mswuddll\renddll_mswud312_vc.dll"
+ OutputFile="vc_mswuddll\renddll_mswud313_vc.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\..\..\lib\vc_dll"
GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="vc_mswuddll\renddll_mswud312_vc.pdb"
+ ProgramDatabaseFile="vc_mswuddll\renddll_mswud313_vc.pdb"
TargetMachine="1"/>
diff --git a/samples/render/render_vc8_renddll.vcproj b/samples/render/render_vc8_renddll.vcproj
index 336bdf2ef2..dd843c672a 100644
--- a/samples/render/render_vc8_renddll.vcproj
+++ b/samples/render/render_vc8_renddll.vcproj
@@ -62,7 +62,7 @@
BufferSecurityCheck="true"
RuntimeTypeInfo="true"
ObjectFile="vc_mswuddll\renddll\"
- ProgramDataBaseFileName="vc_mswuddll\renddll_mswud312_vc.pdb"
+ ProgramDataBaseFileName="vc_mswuddll\renddll_mswud313_vc.pdb"
WarningLevel="4"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
@@ -84,13 +84,13 @@
Name="VCLinkerTool"
AdditionalOptions=""
AdditionalDependencies="wxmsw31ud_core.lib wxbase31ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib"
- OutputFile="vc_mswuddll\renddll_mswud312_vc.dll"
+ OutputFile="vc_mswuddll\renddll_mswud313_vc.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=".\..\..\lib\vc_dll"
GenerateManifest="true"
GenerateDebugInformation="true"
- ProgramDatabaseFile="vc_mswuddll\renddll_mswud312_vc.pdb"
+ ProgramDatabaseFile="vc_mswuddll\renddll_mswud313_vc.pdb"
TargetMachine="1"
/>
AddTool(wxID_ANY, wxArtProvider::GetBitmap(wxART_REPORT_VIEW, wxART_OTHER, wxSize(16, 15)));
toolbar->AddTool(wxID_ANY, wxArtProvider::GetBitmap(wxART_LIST_VIEW, wxART_OTHER, wxSize(16, 15)));
toolbar->AddSeparator();
- toolbar->AddHybridTool(ID_POSITION_LEFT, position_left_xpm,
+ toolbar->AddHybridTool(ID_POSITION_LEFT, position_left_xpm,
"Align ribbonbar vertically\non the left\nfor demonstration purposes");
- toolbar->AddHybridTool(ID_POSITION_TOP, position_top_xpm,
+ toolbar->AddHybridTool(ID_POSITION_TOP, position_top_xpm,
"Align the ribbonbar horizontally\nat the top\nfor demonstration purposes");
toolbar->AddSeparator();
toolbar->AddHybridTool(wxID_PRINT, wxArtProvider::GetBitmap(wxART_PRINT, wxART_OTHER, wxSize(16, 15)),
@@ -340,7 +340,7 @@ MyFrame::MyFrame()
wxRibbonPanel *shapes_panel = new wxRibbonPanel(home, wxID_ANY, "Shapes", wxBitmap(circle_small_xpm));
wxRibbonButtonBar *shapes = new wxRibbonButtonBar(shapes_panel);
- shapes->AddButton(ID_CIRCLE, "Circle", wxBitmap(circle_xpm), wxBitmap(circle_small_xpm),
+ shapes->AddButton(ID_CIRCLE, "Circle", wxBitmap(circle_xpm), wxBitmap(circle_small_xpm),
wxNullBitmap, wxNullBitmap, wxRIBBON_BUTTON_NORMAL,
"This is a tooltip for the circle button\ndemonstrating another tooltip");
shapes->AddButton(ID_CROSS, "Cross", wxBitmap(cross_xpm), wxEmptyString);
@@ -348,21 +348,21 @@ MyFrame::MyFrame()
shapes->AddButton(ID_SQUARE, "Square", wxBitmap(square_xpm), wxEmptyString);
shapes->AddDropdownButton(ID_POLYGON, "Other Polygon", wxBitmap(hexagon_xpm), wxEmptyString);
- wxRibbonPanel *sizer_panel = new wxRibbonPanel(home, wxID_ANY, "Panel with Sizer",
- wxNullBitmap, wxDefaultPosition, wxDefaultSize,
+ wxRibbonPanel *sizer_panel = new wxRibbonPanel(home, wxID_ANY, "Panel with Sizer",
+ wxNullBitmap, wxDefaultPosition, wxDefaultSize,
wxRIBBON_PANEL_DEFAULT_STYLE);
wxArrayString as;
as.Add("Item 1 using a box sizer now");
as.Add("Item 2 using a box sizer now");
- wxComboBox* sizer_panelcombo = new wxComboBox(sizer_panel, wxID_ANY,
- wxEmptyString,
- wxDefaultPosition, wxDefaultSize,
+ wxComboBox* sizer_panelcombo = new wxComboBox(sizer_panel, wxID_ANY,
+ wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
as, wxCB_READONLY);
- wxComboBox* sizer_panelcombo2 = new wxComboBox(sizer_panel, wxID_ANY,
- wxEmptyString,
- wxDefaultPosition, wxDefaultSize,
+ wxComboBox* sizer_panelcombo2 = new wxComboBox(sizer_panel, wxID_ANY,
+ wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
as, wxCB_READONLY);
sizer_panelcombo->Select(0);
diff --git a/samples/richtext/Makefile.in b/samples/richtext/Makefile.in
index 80965051a3..05908cccc0 100644
--- a/samples/richtext/Makefile.in
+++ b/samples/richtext/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
RICHTEXT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/richtext/richtext.bkl b/samples/richtext/richtext.bkl
index 3a487705e6..beb5b1c834 100644
--- a/samples/richtext/richtext.bkl
+++ b/samples/richtext/richtext.bkl
@@ -14,5 +14,5 @@
base
../sample.rc
-
+
diff --git a/samples/richtext/richtext.cpp b/samples/richtext/richtext.cpp
index aed233df76..3dd3380ae4 100644
--- a/samples/richtext/richtext.cpp
+++ b/samples/richtext/richtext.cpp
@@ -763,7 +763,7 @@ MyFrame::MyFrame(const wxString& title, wxWindowID id, const wxPoint& pos,
#ifdef __WXMAC__
SetWindowVariant(wxWINDOW_VARIANT_SMALL);
#endif
-
+
// set the frame icon
SetIcon(wxICON(sample));
@@ -1247,14 +1247,14 @@ void MyFrame::WriteInitialText()
r.WriteText(msg);
}
}
-
+
// Demonstrate colspan and rowspan
wxRichTextCell* cell = table->GetCell(1, 0);
cell->SetColSpan(2);
r.SetFocusObject(cell);
cell->Clear();
r.WriteText("This cell spans 2 columns");
-
+
cell = table->GetCell(1, 3);
cell->SetRowSpan(2);
r.SetFocusObject(cell);
@@ -2010,7 +2010,7 @@ void MyFrame::OnTableDeleteColumn(wxCommandEvent& WXUNUSED(event))
{
col = table->GetColumnCount() - 1;
}
-
+
table->DeleteColumns(col, 1);
}
}
@@ -2025,7 +2025,7 @@ void MyFrame::OnTableDeleteRow(wxCommandEvent& WXUNUSED(event))
{
row = table->GetRowCount() - 1;
}
-
+
table->DeleteRows(row, 1);
}
}
diff --git a/samples/sashtest/Makefile.in b/samples/sashtest/Makefile.in
index 6cfd9d9796..db9881b7e5 100644
--- a/samples/sashtest/Makefile.in
+++ b/samples/sashtest/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
SASHTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/scroll/Makefile.in b/samples/scroll/Makefile.in
index 9930beb94b..3ad6eaa446 100644
--- a/samples/scroll/Makefile.in
+++ b/samples/scroll/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
SCROLL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp
index fcea79627f..f368805286 100644
--- a/samples/scroll/scroll.cpp
+++ b/samples/scroll/scroll.cpp
@@ -708,9 +708,10 @@ void MyCanvas::OnMouseWheel( wxMouseEvent &event )
int x,y;
CalcUnscrolledPosition( pt.x, pt.y, &x, &y );
wxLogMessage( "Mouse wheel event at: %d %d, scrolled: %d %d\n"
- "Rotation: %d, delta = %d",
+ "Rotation: %d, delta: %d, inverted: %d",
pt.x, pt.y, x, y,
- event.GetWheelRotation(), event.GetWheelDelta() );
+ event.GetWheelRotation(), event.GetWheelDelta(),
+ event.IsWheelInverted() );
event.Skip();
}
diff --git a/samples/shaped/Makefile.in b/samples/shaped/Makefile.in
index 8c4aff2018..4c1ca07753 100644
--- a/samples/shaped/Makefile.in
+++ b/samples/shaped/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
SHAPED_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/sockets/Makefile.in b/samples/sockets/Makefile.in
index d4629cd024..6bbb986e10 100644
--- a/samples/sockets/Makefile.in
+++ b/samples/sockets/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
CLIENT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/sound/Makefile.in b/samples/sound/Makefile.in
index 6a8dc38d2c..6a30445fea 100644
--- a/samples/sound/Makefile.in
+++ b/samples/sound/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
SOUND_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/splash/Makefile.in b/samples/splash/Makefile.in
index ac2b4c0ebd..4b46d4e522 100644
--- a/samples/splash/Makefile.in
+++ b/samples/splash/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
SPLASH_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/splitter/Makefile.in b/samples/splitter/Makefile.in
index d535750ee3..ee9a503134 100644
--- a/samples/splitter/Makefile.in
+++ b/samples/splitter/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
SPLITTER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/statbar/Makefile.in b/samples/statbar/Makefile.in
index c8a90e6cfa..26e9bb1022 100644
--- a/samples/statbar/Makefile.in
+++ b/samples/statbar/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
STATBAR_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/stc/Makefile.in b/samples/stc/Makefile.in
index 5340c09e4c..d0856ece6a 100644
--- a/samples/stc/Makefile.in
+++ b/samples/stc/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
STCTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/stc/edit.cpp b/samples/stc/edit.cpp
index 7e7f412ec2..e9aeac9990 100644
--- a/samples/stc/edit.cpp
+++ b/samples/stc/edit.cpp
@@ -125,8 +125,6 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
long style)
: wxStyledTextCtrl (parent, id, pos, size, style) {
- m_filename = wxEmptyString;
-
m_LineNrID = 0;
m_DividerID = 1;
m_FoldingID = 2;
@@ -760,7 +758,7 @@ EditProperties::EditProperties (Edit *edit,
text = wxString::Format ("%d", edit->GetLexer());
textinfo->Add (new wxStaticText (this, wxID_ANY, text),
0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
- wxString EOLtype = wxEmptyString;
+ wxString EOLtype;
switch (edit->GetEOLMode()) {
case wxSTC_EOL_CR: {EOLtype = "CR (Unix)"; break; }
case wxSTC_EOL_CRLF: {EOLtype = "CRLF (Windows)"; break; }
diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp
index 122626f4fe..e3d6c9a276 100644
--- a/samples/stc/stctest.cpp
+++ b/samples/stc/stctest.cpp
@@ -362,7 +362,7 @@ void AppFrame::OnFileSave (wxCommandEvent &WXUNUSED(event)) {
void AppFrame::OnFileSaveAs (wxCommandEvent &WXUNUSED(event)) {
if (!m_edit) return;
#if wxUSE_FILEDLG
- wxString filename = wxEmptyString;
+ wxString filename;
wxFileDialog dlg (this, "Save file", wxEmptyString, wxEmptyString, "Any file (*)|*", wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (dlg.ShowModal() != wxID_OK) return;
filename = dlg.GetPath();
diff --git a/samples/svg/Makefile.in b/samples/svg/Makefile.in
index 87db8226c8..7c0285736e 100644
--- a/samples/svg/Makefile.in
+++ b/samples/svg/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
SVGTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/taborder/Makefile.in b/samples/taborder/Makefile.in
index 0a30d81ac3..77f9649bb3 100644
--- a/samples/taborder/Makefile.in
+++ b/samples/taborder/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TABORDER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/taskbar/Makefile.in b/samples/taskbar/Makefile.in
index e6a212f580..39b92c1b4a 100644
--- a/samples/taskbar/Makefile.in
+++ b/samples/taskbar/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TASKBAR_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp
index c23cdac061..2278df44cf 100644
--- a/samples/taskbar/tbtest.cpp
+++ b/samples/taskbar/tbtest.cpp
@@ -259,7 +259,7 @@ wxMenu *MyTaskBarIcon::CreatePopupMenu()
submenu->Append(PU_SUB2, "Another submenu");
menu->Append(PU_SUBMAIN, "Submenu", submenu);
/* OSX has built-in quit menu for the dock menu, but not for the status item */
-#ifdef __WXOSX__
+#ifdef __WXOSX__
if ( OSXIsStatusItem() )
#endif
{
diff --git a/samples/taskbarbutton/Makefile.in b/samples/taskbarbutton/Makefile.in
index 6a65986b9b..07515843a7 100644
--- a/samples/taskbarbutton/Makefile.in
+++ b/samples/taskbarbutton/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TASKBARBUTTON_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/text/Makefile.in b/samples/text/Makefile.in
index f7778c3f2c..de583ff90f 100644
--- a/samples/text/Makefile.in
+++ b/samples/text/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TEXT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/text/text.cpp b/samples/text/text.cpp
index a057dbaee4..7e5256b0b9 100644
--- a/samples/text/text.cpp
+++ b/samples/text/text.cpp
@@ -1200,11 +1200,11 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
m_tab = new MyTextCtrl( this, 100, "Multiline, allow processing.",
wxPoint(180,90), wxSize(200,70), wxTE_MULTILINE | wxTE_PROCESS_TAB );
- m_tab->SetClientData((void *)"tab");
+ m_tab->SetClientData((void *)wxS("tab"));
m_enter = new MyTextCtrl( this, 100, "Multiline, allow processing.",
wxPoint(180,170), wxSize(200,70), wxTE_MULTILINE | wxTE_PROCESS_ENTER );
- m_enter->SetClientData((void *)"enter");
+ m_enter->SetClientData((void *)wxS("enter"));
m_textrich = new MyTextCtrl(this, wxID_ANY, "Allows more than 30Kb of text\n"
"(on all Windows versions)\n"
diff --git a/samples/thread/Makefile.in b/samples/thread/Makefile.in
index 3e3110f803..014cdb0e5e 100644
--- a/samples/thread/Makefile.in
+++ b/samples/thread/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
THREAD_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/toolbar/Makefile.in b/samples/toolbar/Makefile.in
index 0590ab4b61..b43c3e5724 100644
--- a/samples/toolbar/Makefile.in
+++ b/samples/toolbar/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TOOLBAR_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/treectrl/Makefile.in b/samples/treectrl/Makefile.in
index 154e961304..cd247dc64f 100644
--- a/samples/treectrl/Makefile.in
+++ b/samples/treectrl/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TREECTRL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/treelist/Makefile.in b/samples/treelist/Makefile.in
index 9bcaa5acf8..592f2aaf59 100644
--- a/samples/treelist/Makefile.in
+++ b/samples/treelist/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TREELIST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/typetest/Makefile.in b/samples/typetest/Makefile.in
index 87b6f9e88a..f4bd31ebfc 100644
--- a/samples/typetest/Makefile.in
+++ b/samples/typetest/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
TYPETEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/uiaction/Makefile.in b/samples/uiaction/Makefile.in
index d2bcb724a6..47dfe935bf 100644
--- a/samples/uiaction/Makefile.in
+++ b/samples/uiaction/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
UIACTION_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/validate/Makefile.in b/samples/validate/Makefile.in
index 4aa492db2c..cbc4e715e8 100644
--- a/samples/validate/Makefile.in
+++ b/samples/validate/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
VALIDATE_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp
index 3f8706ee07..55bf6a0169 100644
--- a/samples/validate/validate.cpp
+++ b/samples/validate/validate.cpp
@@ -40,8 +40,6 @@
// Global data
// ----------------------------------------------------------------------------
-MyData g_data;
-
wxString g_listbox_choices[] =
{"one", "two", "three"};
@@ -51,6 +49,8 @@ wxString g_combobox_choices[] =
wxString g_radiobox_choices[] =
{"green", "yellow", "red"};
+MyData g_data;
+
// ----------------------------------------------------------------------------
// MyData
// ----------------------------------------------------------------------------
@@ -63,6 +63,7 @@ MyData::MyData()
m_string = "Spaces are invalid here";
m_string2 = "Valid text";
m_listbox_choices.Add(0);
+ m_combobox_choice = g_combobox_choices[0];
m_intValue = 0;
m_smallIntValue = 3;
m_doubleValue = 12354.31;
@@ -247,28 +248,19 @@ MyDialog::MyDialog( wxWindow *parent, const wxString& title,
wxFlexGridSizer *flexgridsizer = new wxFlexGridSizer(3, 2, 5, 5);
- // Create and add controls to sizers. Note that a member variable
- // of g_data is bound to each control upon construction. There is
- // currently no easy way to substitute a different validator or a
- // different transfer variable after a control has been constructed.
-
+ // Create and add controls to sizers.
// Pointers to some of these controls are saved in member variables
// so that we can use them elsewhere, like this one.
- m_text = new wxTextCtrl(this, VALIDATE_TEXT, wxEmptyString,
- wxDefaultPosition, wxDefaultSize, 0,
- wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
- m_text->SetToolTip("uses wxTextValidator with wxFILTER_ALPHA");
+ m_text = new wxTextCtrl(this, VALIDATE_TEXT);
+ m_text->SetToolTip("wxTextValidator not set");
+ m_text->SetHint("Enter some text here, please...");
flexgridsizer->Add(m_text, 1, wxGROW);
-
- // Now set a wxTextValidator with an explicit list of characters NOT allowed:
- wxTextValidator textVal(wxFILTER_EMPTY|wxFILTER_EXCLUDE_CHAR_LIST, &g_data.m_string2);
- textVal.SetCharExcludes("bcwyz");
- wxTextCtrl* txt2 =
- new wxTextCtrl(this, VALIDATE_TEXT2, wxEmptyString,
- wxDefaultPosition, wxDefaultSize, 0, textVal);
- txt2->SetToolTip("uses wxTextValidator with wxFILTER_EMPTY|wxFILTER_EXCLUDE_CHAR_LIST to exclude 'bcwyz'");
- flexgridsizer->Add(txt2, 1, wxGROW);
+ // Make it possible to change the wxTextValidator for m_text at runtime.
+ wxButton* const button =
+ new wxButton(this, wxID_ANY, "Set new wxTextValidator...");
+ button->Bind(wxEVT_BUTTON, &MyDialog::OnChangeValidator, this);
+ flexgridsizer->Add(button, wxSizerFlags().Center());
flexgridsizer->Add(new wxListBox((wxWindow*)this, VALIDATE_LIST,
wxDefaultPosition, wxDefaultSize,
@@ -391,17 +383,298 @@ MyDialog::MyDialog( wxWindow *parent, const wxString& title,
// make the dialog a bit bigger than its minimal size:
SetSize(GetBestSize()*1.5);
-}
-bool MyDialog::TransferDataToWindow()
-{
- bool r = wxDialog::TransferDataToWindow();
-
- // These function calls have to be made here, after the
- // dialog has been created.
+ // Now sets the focus to m_text
m_text->SetFocus();
- m_combobox->SetSelection(0);
-
- return r;
}
+void MyDialog::OnChangeValidator(wxCommandEvent& WXUNUSED(event))
+{
+ TextValidatorDialog dialog(this, m_text);
+
+ if ( dialog.ShowModal() == wxID_OK )
+ {
+ dialog.ApplyValidator();
+ }
+}
+
+// ----------------------------------------------------------------------------
+// TextValidatorDialog
+// ----------------------------------------------------------------------------
+
+TextValidatorDialog::TextValidatorDialog(wxWindow *parent, wxTextCtrl* txtCtrl)
+ : wxDialog(parent, wxID_ANY, "wxTextValidator Dialog"),
+ m_txtCtrl(txtCtrl),
+ m_noValidation(true),
+ m_validatorStyle(wxFILTER_NONE)
+{
+ if ( m_txtCtrl )
+ {
+ wxTextValidator* txtValidator =
+ wxDynamicCast(m_txtCtrl->GetValidator(), wxTextValidator);
+
+ if ( txtValidator )
+ {
+ m_validatorStyle = txtValidator->GetStyle();
+
+ if ( m_validatorStyle != wxFILTER_NONE )
+ m_noValidation = false;
+
+ m_charIncludes = txtValidator->GetCharIncludes();
+ m_charExcludes = txtValidator->GetCharExcludes();
+ m_includes = txtValidator->GetIncludes();
+ m_excludes = txtValidator->GetExcludes();
+ }
+ }
+
+ wxFlexGridSizer *fgSizer = new wxFlexGridSizer(2, FromDIP(wxSize(5, 5)));
+ const wxSizerFlags center = wxSizerFlags().CenterVertical();
+
+ const StyleValidator styleVal(&m_validatorStyle);
+
+ wxCheckBox* filterNone = new wxCheckBox(this, Id_None, "wxFILTER_NONE");
+ filterNone->SetValue(m_noValidation);
+ fgSizer->Add(filterNone);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "No filtering takes place."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_Empty, "wxFILTER_EMPTY"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Empty strings are filtered out."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_Ascii, "wxFILTER_ASCII"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Non-ASCII characters are filtered out."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_Alpha, "wxFILTER_ALPHA"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Non-alpha characters are filtered out."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_Alphanumeric, "wxFILTER_ALPHANUMERIC"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Non-alphanumeric characters are filtered out."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_Digits, "wxFILTER_DIGITS"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Non-digit characters are filtered out."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_Numeric, "wxFILTER_NUMERIC"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Non-numeric characters are filtered out."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_IncludeList, "wxFILTER_INCLUDE_LIST"), center)
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxTextCtrl(this, Id_IncludeListTxt), wxSizerFlags().Expand())
+ ->GetWindow()->Bind(wxEVT_KILL_FOCUS, &TextValidatorDialog::OnKillFocus, this);
+
+ fgSizer->Add(new wxCheckBox(this, Id_IncludeCharList, "wxFILTER_INCLUDE_CHAR_LIST"), center)
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxTextCtrl(this, Id_IncludeCharListTxt, wxString(), wxDefaultPosition,
+ wxDefaultSize, 0, wxGenericValidator(&m_charIncludes)),
+ wxSizerFlags().Expand())
+ ->GetWindow()->Bind(wxEVT_KILL_FOCUS, &TextValidatorDialog::OnKillFocus, this);
+
+ fgSizer->Add(new wxCheckBox(this, Id_ExcludeList, "wxFILTER_EXCLUDE_LIST"), center)
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxTextCtrl(this, Id_ExcludeListTxt), wxSizerFlags().Expand())
+ ->GetWindow()->Bind(wxEVT_KILL_FOCUS, &TextValidatorDialog::OnKillFocus, this);
+
+ fgSizer->Add(new wxCheckBox(this, Id_ExcludeCharList, "wxFILTER_EXCLUDE_CHAR_LIST"), center)
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxTextCtrl(this, Id_ExcludeCharListTxt, wxString(), wxDefaultPosition,
+ wxDefaultSize, 0, wxGenericValidator(&m_charExcludes)),
+ wxSizerFlags().Expand())
+ ->GetWindow()->Bind(wxEVT_KILL_FOCUS, &TextValidatorDialog::OnKillFocus, this);
+
+ fgSizer->Add(new wxCheckBox(this, Id_Xdigits, "wxFILTER_XDIGITS"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Non-xdigit characters are filtered out."));
+
+ fgSizer->Add(new wxCheckBox(this, Id_Space, "wxFILTER_SPACE"))
+ ->GetWindow()->SetValidator(styleVal);
+ fgSizer->Add(new wxStaticText(this, wxID_ANY, "Allow spaces."));
+
+ // Set the main sizer.
+ wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );
+
+ mainsizer->Add(fgSizer, wxSizerFlags(1).Border(wxALL, 10).Expand());
+
+ mainsizer->Add(CreateButtonSizer(wxOK | wxCANCEL),
+ wxSizerFlags().Expand().DoubleBorder());
+
+ SetSizer(mainsizer);
+ mainsizer->SetSizeHints(this);
+
+ // Bind event handlers.
+ Bind(wxEVT_CHECKBOX, &TextValidatorDialog::OnChecked, this);
+ Bind(wxEVT_UPDATE_UI, &TextValidatorDialog::OnUpdateUI,
+ this, Id_Ascii, Id_ExcludeCharListTxt);
+}
+
+void TextValidatorDialog::OnUpdateUI(wxUpdateUIEvent& event)
+{
+ event.Enable(!m_noValidation);
+
+ if ( m_noValidation )
+ event.Check(false);
+}
+
+void TextValidatorDialog::OnChecked(wxCommandEvent& event)
+{
+ if ( event.GetId() == Id_None )
+ {
+ m_noValidation = event.IsChecked();
+
+ if ( m_noValidation )
+ {
+ long style = wxFILTER_NONE;
+
+ // we should keep this flag on if it has been set.
+ if ( HasFlag(wxFILTER_EMPTY) )
+ style = wxFILTER_EMPTY;
+
+ m_validatorStyle = style;
+
+ m_charIncludes.clear();
+ m_charExcludes.clear();
+ m_includes.clear();
+ m_excludes.clear();
+ }
+ }
+}
+
+void TextValidatorDialog::OnKillFocus(wxFocusEvent &event)
+{
+ wxTextCtrl* txtCtrl = wxDynamicCast(event.GetEventObject(), wxTextCtrl);
+
+ if ( txtCtrl && txtCtrl->IsModified() )
+ {
+ const int id = event.GetId();
+
+ if ( id == Id_IncludeCharListTxt )
+ {
+ m_charIncludes = txtCtrl->GetValue();
+ }
+ else if ( id == Id_ExcludeCharListTxt )
+ {
+ m_charExcludes = txtCtrl->GetValue();
+ }
+ else if ( id == Id_IncludeListTxt )
+ {
+ m_includes = wxSplit(txtCtrl->GetValue(), ' ');
+ }
+ else if ( id == Id_ExcludeListTxt )
+ {
+ m_excludes = wxSplit(txtCtrl->GetValue(), ' ');
+ }
+ }
+
+ event.Skip();
+}
+
+void TextValidatorDialog::ApplyValidator()
+{
+ if ( !m_txtCtrl )
+ return;
+
+ wxString tooltip = "uses wxTextValidator with ";
+
+ if ( m_noValidation )
+ {
+ tooltip += "wxFILTER_NONE|";
+ }
+ else
+ {
+ if ( HasFlag(wxFILTER_ASCII) )
+ tooltip += "wxFILTER_ASCII|";
+ if ( HasFlag(wxFILTER_ALPHA) )
+ tooltip += "wxFILTER_ALPHA|";
+ if ( HasFlag(wxFILTER_ALPHANUMERIC) )
+ tooltip += "wxFILTER_ALPHANUMERIC|";
+ if ( HasFlag(wxFILTER_DIGITS) )
+ tooltip += "wxFILTER_DIGITS|";
+ if ( HasFlag(wxFILTER_NUMERIC) )
+ tooltip += "wxFILTER_NUMERIC|";
+ if ( HasFlag(wxFILTER_XDIGITS) )
+ tooltip += "wxFILTER_XDIGITS|";
+ if ( HasFlag(wxFILTER_SPACE) )
+ tooltip += "wxFILTER_SPACE|";
+ if ( HasFlag(wxFILTER_INCLUDE_LIST) )
+ tooltip += "wxFILTER_INCLUDE_LIST|";
+ if ( HasFlag(wxFILTER_INCLUDE_CHAR_LIST) )
+ tooltip += "wxFILTER_INCLUDE_CHAR_LIST|";
+ if ( HasFlag(wxFILTER_EXCLUDE_LIST) )
+ tooltip += "wxFILTER_EXCLUDE_LIST|";
+ if ( HasFlag(wxFILTER_EXCLUDE_CHAR_LIST) )
+ tooltip += "wxFILTER_EXCLUDE_CHAR_LIST|";
+ }
+
+ if ( HasFlag(wxFILTER_EMPTY) )
+ {
+ tooltip += "wxFILTER_EMPTY|";
+ }
+
+ tooltip.RemoveLast(); // remove the trailing '|' char.
+
+ if ( !m_charIncludes.empty() )
+ {
+ tooltip += "\nAllowed chars: ";
+ tooltip += m_charIncludes;
+ }
+
+ if ( !m_charExcludes.empty() )
+ {
+ tooltip += "\nDisallowed chars: ";
+ tooltip += m_charExcludes;
+ }
+
+ m_txtCtrl->SetToolTip(tooltip);
+
+ // Prepare and set the wxTextValidator
+ wxTextValidator txtVal(m_validatorStyle, &g_data.m_string);
+ txtVal.SetCharIncludes(m_charIncludes);
+ txtVal.SetCharExcludes(m_charExcludes);
+ txtVal.SetIncludes(m_includes);
+ txtVal.SetExcludes(m_excludes);
+
+ m_txtCtrl->SetValidator(txtVal);
+ m_txtCtrl->SetFocus();
+}
+
+bool TextValidatorDialog::StyleValidator::TransferToWindow()
+{
+ wxASSERT( wxDynamicCast(m_validatorWindow, wxCheckBox) );
+
+ if ( m_style )
+ {
+ wxCheckBox* cb = (wxCheckBox*)GetWindow();
+ if ( !cb )
+ return false;
+
+ const long style = 1 << (cb->GetId()-wxID_HIGHEST-1);
+
+ cb->SetValue((*m_style & style) != 0);
+ }
+
+ return true;
+}
+
+bool TextValidatorDialog::StyleValidator::TransferFromWindow()
+{
+ wxASSERT( wxDynamicCast(m_validatorWindow, wxCheckBox) );
+
+ if ( m_style )
+ {
+ wxCheckBox* cb = (wxCheckBox*)GetWindow();
+ if ( !cb )
+ return false;
+
+ const long style = 1 << (cb->GetId()-wxID_HIGHEST-1);
+
+ if ( cb->IsChecked() )
+ *m_style |= style;
+ else
+ *m_style &= ~style;
+ }
+
+ return true;
+}
diff --git a/samples/validate/validate.h b/samples/validate/validate.h
index 226f703ba3..b482568b63 100644
--- a/samples/validate/validate.h
+++ b/samples/validate/validate.h
@@ -48,7 +48,8 @@ public:
const wxSize& size = wxDefaultSize,
const long style = wxDEFAULT_DIALOG_STYLE);
- bool TransferDataToWindow() wxOVERRIDE;
+ void OnChangeValidator(wxCommandEvent& event);
+
wxTextCtrl *m_text;
wxComboBox *m_combobox;
@@ -56,6 +57,81 @@ public:
wxTextCtrl *m_numericTextDouble;
};
+// ----------------------------------------------------------------------------
+// TextValidatorDialog
+// ----------------------------------------------------------------------------
+class TextValidatorDialog : public wxDialog
+{
+public:
+ TextValidatorDialog(wxWindow *parent, wxTextCtrl* txtCtrl);
+
+ void OnUpdateUI(wxUpdateUIEvent& event);
+ void OnChecked(wxCommandEvent& event);
+ void OnKillFocus( wxFocusEvent &event );
+
+ void ApplyValidator();
+
+private:
+ // Special validator for our checkboxes
+ class StyleValidator : public wxValidator
+ {
+ public:
+ StyleValidator(long* style) { m_style = style; }
+
+ virtual bool Validate(wxWindow *WXUNUSED(parent)) wxOVERRIDE { return true; }
+ virtual wxObject* Clone() const wxOVERRIDE { return new StyleValidator(*this); }
+
+ // Called to transfer data to the window
+ virtual bool TransferToWindow() wxOVERRIDE;
+
+ // Called to transfer data from the window
+ virtual bool TransferFromWindow() wxOVERRIDE;
+
+ private:
+ long* m_style;
+ };
+
+private:
+ bool HasFlag(wxTextValidatorStyle style) const
+ {
+ return (m_validatorStyle & style) != 0;
+ }
+
+ enum
+ {
+ // CheckBoxes Ids (should be in sync with wxTextValidatorStyle)
+ Id_None = wxID_HIGHEST,
+ Id_Empty,
+ Id_Ascii,
+ Id_Alpha,
+ Id_Alphanumeric,
+ Id_Digits,
+ Id_Numeric,
+ Id_IncludeList,
+ Id_IncludeCharList,
+ Id_ExcludeList,
+ Id_ExcludeCharList,
+ Id_Xdigits,
+ Id_Space,
+
+ // TextCtrls Ids
+ Id_IncludeListTxt,
+ Id_IncludeCharListTxt,
+ Id_ExcludeListTxt,
+ Id_ExcludeCharListTxt,
+ };
+
+ wxTextCtrl* const m_txtCtrl;
+
+ bool m_noValidation;
+ long m_validatorStyle;
+
+ wxString m_charIncludes;
+ wxString m_charExcludes;
+ wxArrayString m_includes;
+ wxArrayString m_excludes;
+};
+
class MyData
{
public:
diff --git a/samples/vscroll/Makefile.in b/samples/vscroll/Makefile.in
index 54502ba31d..a4164f294d 100644
--- a/samples/vscroll/Makefile.in
+++ b/samples/vscroll/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
VSTEST_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/webview/Makefile.in b/samples/webview/Makefile.in
index e676594a9b..3fcf4c9bdb 100644
--- a/samples/webview/Makefile.in
+++ b/samples/webview/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
WEBVIEW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp
index 98d0fea071..60160c56ce 100644
--- a/samples/webview/webview.cpp
+++ b/samples/webview/webview.cpp
@@ -322,7 +322,6 @@ WebFrame::WebFrame(const wxString& url) :
// Set find values.
m_findFlags = wxWEBVIEW_FIND_DEFAULT;
- m_findText = wxEmptyString;
m_findCount = 0;
// Create panel for find toolbar.
diff --git a/samples/widgets/Makefile.in b/samples/widgets/Makefile.in
index f265b2360f..f6a64ba453 100644
--- a/samples/widgets/Makefile.in
+++ b/samples/widgets/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
WIDGETS_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/widgets/bmpcombobox.cpp b/samples/widgets/bmpcombobox.cpp
index bf7e7070a2..71a1d20ca4 100644
--- a/samples/widgets/bmpcombobox.cpp
+++ b/samples/widgets/bmpcombobox.cpp
@@ -554,10 +554,6 @@ void BitmapComboBoxWidgetsPage::OnButtonInsert(wxCommandEvent& WXUNUSED(event))
m_textInsert->SetValue(wxString::Format("test item %u", ++s_item));
}
- int sel = m_combobox->GetSelection();
- if ( sel == wxNOT_FOUND )
- sel = m_combobox->GetCount();
-
m_combobox->Insert(s, wxNullBitmap, m_combobox->GetSelection());
}
@@ -718,7 +714,7 @@ void BitmapComboBoxWidgetsPage::LoadWidgetImages( wxArrayString* strings, wxImag
wxBitmap bmp(image);
wxASSERT( bmp.IsOk() );
#else
- wxBitmap bmp(wxNullBitmap);
+ wxBitmap bmp;
#endif
images->Add(bmp);
(*strings)[i] = name;
diff --git a/samples/widgets/button.cpp b/samples/widgets/button.cpp
index 98d9473a39..8b266c247c 100644
--- a/samples/widgets/button.cpp
+++ b/samples/widgets/button.cpp
@@ -115,7 +115,7 @@ protected:
void AddButtonToSizer();
// helper function: create a bitmap for wxBitmapButton
- wxBitmap CreateBitmap(const wxString& label);
+ wxBitmap CreateBitmap(const wxString& label, const wxArtID& type);
// the controls
@@ -133,7 +133,8 @@ protected:
*m_chkUseMarkup,
#endif // wxUSE_MARKUP
*m_chkDefault,
- *m_chkUseBitmapClass;
+ *m_chkUseBitmapClass,
+ *m_chkDisable;
// more checkboxes for wxBitmapButton only
wxCheckBox *m_chkUsePressed,
@@ -216,6 +217,7 @@ ButtonWidgetsPage::ButtonWidgetsPage(WidgetsBookCtrl *book,
#endif // wxUSE_MARKUP
m_chkDefault =
m_chkUseBitmapClass =
+ m_chkDisable =
m_chkUsePressed =
m_chkUseFocused =
m_chkUseCurrent =
@@ -256,6 +258,8 @@ void ButtonWidgetsPage::CreateContent()
"Use wxBitmapButton");
m_chkUseBitmapClass->SetValue(true);
+ m_chkDisable = CreateCheckBoxAndAddToSizer(sizerLeft, "Disable");
+
sizerLeft->AddSpacer(5);
wxSizer *sizerUseLabels =
@@ -280,7 +284,7 @@ void ButtonWidgetsPage::CreateContent()
m_radioImagePos = new wxRadioBox(this, wxID_ANY, "Image &position",
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(dirs), dirs);
- sizerLeft->Add(m_radioImagePos, 0, wxGROW | wxALL, 5);
+ sizerLeft->Add(m_radioImagePos, wxSizerFlags().Expand().Border());
sizerLeft->AddSpacer(15);
// should be in sync with enums Button[HV]Align!
@@ -305,13 +309,13 @@ void ButtonWidgetsPage::CreateContent()
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(valign), valign);
- sizerLeft->Add(m_radioHAlign, 0, wxGROW | wxALL, 5);
- sizerLeft->Add(m_radioVAlign, 0, wxGROW | wxALL, 5);
+ sizerLeft->Add(m_radioHAlign, wxSizerFlags().Expand().Border());
+ sizerLeft->Add(m_radioVAlign, wxSizerFlags().Expand().Border());
- sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
+ sizerLeft->AddSpacer(5);
wxButton *btn = new wxButton(this, ButtonPage_Reset, "&Reset");
- sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
+ sizerLeft->Add(btn, wxSizerFlags().CentreHorizontal().Border(wxALL, 15));
// middle pane
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, "&Operations");
@@ -322,7 +326,7 @@ void ButtonWidgetsPage::CreateContent()
wxID_ANY,
&m_textLabel);
m_textLabel->SetValue("&Press me!");
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
#if wxUSE_COMMANDLINKBUTTON
m_sizerNote = CreateSizerWithTextAndButton(ButtonPage_ChangeNote,
@@ -331,7 +335,7 @@ void ButtonWidgetsPage::CreateContent()
&m_textNote);
m_textNote->SetValue("Writes down button clicks in the log.");
- sizerMiddle->Add(m_sizerNote, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(m_sizerNote, wxSizerFlags().Expand().Border());
#endif
// right pane
@@ -339,9 +343,12 @@ void ButtonWidgetsPage::CreateContent()
m_sizerButton->SetMinSize(150, 0);
// the 3 panes panes compose the window
- sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10);
- sizerTop->Add(sizerMiddle, 1, wxGROW | wxALL, 10);
- sizerTop->Add(m_sizerButton, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
+ sizerTop->Add(sizerLeft,
+ wxSizerFlags(0).Expand().Border((wxALL & ~wxLEFT), 10));
+ sizerTop->Add(sizerMiddle,
+ wxSizerFlags(1).Expand().Border(wxALL, 10));
+ sizerTop->Add(m_sizerButton,
+ wxSizerFlags(1).Expand().Border((wxALL & ~wxRIGHT), 10));
// do create the main control
Reset();
@@ -368,6 +375,7 @@ void ButtonWidgetsPage::Reset()
m_chkUseMarkup->SetValue(false);
#endif // wxUSE_MARKUP
m_chkUseBitmapClass->SetValue(true);
+ m_chkDisable->SetValue(false);
m_chkUsePressed->SetValue(true);
m_chkUseFocused->SetValue(true);
@@ -448,7 +456,9 @@ void ButtonWidgetsPage::CreateButton()
bool showsBitmap = false;
if ( m_chkBitmapOnly->GetValue() )
{
+#if wxUSE_COMMANDLINKBUTTON
m_chkCommandLink->SetValue(false); // wxCommandLinkButton cannot be "Bitmap only"
+#endif
showsBitmap = true;
@@ -456,22 +466,22 @@ void ButtonWidgetsPage::CreateButton()
if ( m_chkUseBitmapClass->GetValue() )
{
bbtn = new wxBitmapButton(this, ButtonPage_Button,
- CreateBitmap("normal"),
+ CreateBitmap("normal", wxART_INFORMATION),
wxDefaultPosition, wxDefaultSize, flags);
}
else
{
bbtn = new wxButton(this, ButtonPage_Button);
- bbtn->SetBitmapLabel(CreateBitmap("normal"));
+ bbtn->SetBitmapLabel(CreateBitmap("normal", wxART_INFORMATION));
}
if ( m_chkUsePressed->GetValue() )
- bbtn->SetBitmapPressed(CreateBitmap("pushed"));
+ bbtn->SetBitmapPressed(CreateBitmap("pushed", wxART_HELP));
if ( m_chkUseFocused->GetValue() )
- bbtn->SetBitmapFocus(CreateBitmap("focused"));
+ bbtn->SetBitmapFocus(CreateBitmap("focused", wxART_ERROR));
if ( m_chkUseCurrent->GetValue() )
- bbtn->SetBitmapCurrent(CreateBitmap("hover"));
+ bbtn->SetBitmapCurrent(CreateBitmap("hover", wxART_WARNING));
if ( m_chkUseDisabled->GetValue() )
- bbtn->SetBitmapDisabled(CreateBitmap("disabled"));
+ bbtn->SetBitmapDisabled(CreateBitmap("disabled", wxART_MISSING_IMAGE));
m_button = bbtn;
#if wxUSE_COMMANDLINKBUTTON
m_cmdLnkButton = NULL;
@@ -529,7 +539,9 @@ void ButtonWidgetsPage::CreateButton()
m_chkTextAndBitmap->Enable(!m_chkBitmapOnly->IsChecked());
m_chkBitmapOnly->Enable(!m_chkTextAndBitmap->IsChecked());
+#if wxUSE_COMMANDLINKBUTTON
m_chkCommandLink->Enable(!m_chkBitmapOnly->IsChecked());
+#endif
m_chkUseBitmapClass->Enable(showsBitmap);
m_chkUsePressed->Enable(showsBitmap);
@@ -543,6 +555,8 @@ void ButtonWidgetsPage::CreateButton()
if ( m_chkDefault->GetValue() )
m_button->SetDefault();
+ m_button->Enable(!m_chkDisable->IsChecked());
+
AddButtonToSizer();
m_sizerButton->Layout();
@@ -597,6 +611,9 @@ void ButtonWidgetsPage::OnButtonChangeLabel(wxCommandEvent& WXUNUSED(event))
m_button->SetLabel(labelText);
}
+ if ( m_chkBitmapOnly->IsChecked() )
+ CreateButton();
+
m_sizerButton->Layout();
}
@@ -618,17 +635,18 @@ void ButtonWidgetsPage::OnButton(wxCommandEvent& WXUNUSED(event))
// bitmap button stuff
// ----------------------------------------------------------------------------
-wxBitmap ButtonWidgetsPage::CreateBitmap(const wxString& label)
+wxBitmap ButtonWidgetsPage::CreateBitmap(const wxString& label, const wxArtID& type)
{
- wxBitmap bmp(180, 70); // shouldn't hardcode but it's simpler like this
+ wxBitmap bmp(FromDIP(wxSize(180, 70))); // shouldn't hardcode but it's simpler like this
wxMemoryDC dc;
dc.SelectObject(bmp);
+ dc.SetFont(GetFont());
dc.SetBackground(*wxCYAN_BRUSH);
dc.Clear();
dc.SetTextForeground(*wxBLACK);
dc.DrawLabel(wxStripMenuCodes(m_textLabel->GetValue()) + "\n"
"(" + label + " state)",
- wxArtProvider::GetBitmap(wxART_INFORMATION),
+ wxArtProvider::GetBitmap(type),
wxRect(10, 10, bmp.GetWidth() - 20, bmp.GetHeight() - 20),
wxALIGN_CENTRE);
diff --git a/samples/widgets/headerctrl.cpp b/samples/widgets/headerctrl.cpp
index 17c28de6e3..db8126ca91 100644
--- a/samples/widgets/headerctrl.cpp
+++ b/samples/widgets/headerctrl.cpp
@@ -28,12 +28,17 @@
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/button.h"
+ #include "wx/checkbox.h"
+ #include "wx/radiobox.h"
#include "wx/sizer.h"
+ #include "wx/statbox.h"
#include "wx/stattext.h"
#endif
#include "wx/headerctrl.h"
+#include "wx/artprov.h"
+
#include "widgets.h"
#include "icons/header.xpm"
@@ -59,9 +64,39 @@ public:
virtual void CreateContent() wxOVERRIDE;
protected:
+ // event handlers
+ void OnStyleCheckOrRadioBox(wxCommandEvent& evt);
+ void OnResetButton(wxCommandEvent& evt);
+ void OnUpdateUIResetButton(wxUpdateUIEvent& evt);
+
+ // reset the header style
+ void ResetHeaderStyle();
+ // compose header style flags based on selections
+ long GetHeaderStyleFlags() const;
+ // reset column style
+ void ResetColumnStyle(int col);
+ // compose columnm style flags based on selections
+ int GetColumnStyleFlags(int col) const;
+ // get columnm alignment flags based on selection
+ wxAlignment GetColumnAlignmentFlag(int col) const;
+
// the control itself and the sizer it is in
wxHeaderCtrlSimple *m_header;
wxSizer *m_sizerHeader;
+ // the check boxes for header styles
+ wxCheckBox *m_chkAllowReorder;
+ wxCheckBox *m_chkAllowHide;
+ wxCheckBox *m_chkBitmapOnRight;
+ // The check boxes for column styles
+ struct
+ {
+ wxCheckBox *chkAllowResize;
+ wxCheckBox *chkAllowReorder;
+ wxCheckBox *chkAllowSort;
+ wxCheckBox *chkAllowHide;
+ wxCheckBox *chkWithBitmap;
+ wxRadioBox *rbAlignments;
+ } m_colSettings[2];
private:
DECLARE_WIDGETS_PAGE(HeaderCtrlWidgetsPage)
@@ -80,30 +115,96 @@ private:
IMPLEMENT_WIDGETS_PAGE(HeaderCtrlWidgetsPage,
"Header", HEADER_CTRL_FAMILY);
+static const wxString gs_colAlignments[] = { "none", "left", "centre", "right" };
+static const wxAlignment gs_colAlignFlags[] = { wxALIGN_NOT, wxALIGN_LEFT, wxALIGN_CENTRE, wxALIGN_RIGHT };
+#define COL_WITH_BITMAP_DEFAULT false
+#define COL_ALIGNMENT_FLAG_DEFAULT wxALIGN_NOT
+#define COL_ALIGNMENT_INDEX_DEFAULT 0
+
void HeaderCtrlWidgetsPage::CreateContent()
{
+ // left pane
+ wxSizer *sizerLeft = new wxBoxSizer(wxVERTICAL);
+
+ // header style
+ wxSizer *sizerHeader = new wxStaticBoxSizer(wxVERTICAL, this, "&Header style");
+ m_chkAllowReorder = CreateCheckBoxAndAddToSizer(sizerHeader, "Allow &reorder");
+ m_chkAllowHide = CreateCheckBoxAndAddToSizer(sizerHeader, "Alow &hide");
+ m_chkBitmapOnRight = CreateCheckBoxAndAddToSizer(sizerHeader, "&Bitmap on right");
+ ResetHeaderStyle();
+ sizerLeft->Add(sizerHeader, wxSizerFlags().Expand());
+
+ // column flags
+ for ( int i = 0; i < (int)WXSIZEOF(m_colSettings); i++ )
+ {
+ wxSizer* sizerCol = new wxStaticBoxSizer(wxVERTICAL, this, wxString::Format("Column %i style", i+1));
+ m_colSettings[i].chkAllowResize = CreateCheckBoxAndAddToSizer(sizerCol, "Allow resize");
+ m_colSettings[i].chkAllowReorder = CreateCheckBoxAndAddToSizer(sizerCol, "Allow reorder");
+ m_colSettings[i].chkAllowSort = CreateCheckBoxAndAddToSizer(sizerCol, "Allow sort");
+ m_colSettings[i].chkAllowHide = CreateCheckBoxAndAddToSizer(sizerCol, "Hidden");
+ m_colSettings[i].chkWithBitmap = CreateCheckBoxAndAddToSizer(sizerCol, "With bitmap");
+ m_colSettings[i].rbAlignments = new wxRadioBox(this, wxID_ANY, "Alignment",
+ wxDefaultPosition, wxDefaultSize, WXSIZEOF(gs_colAlignments), gs_colAlignments,
+ 2, wxRA_SPECIFY_COLS);
+ sizerCol->Add(m_colSettings[i].rbAlignments, wxSizerFlags().Expand().Border(wxALL, 5));
+ ResetColumnStyle(i);
+ sizerLeft->Add(sizerCol, wxSizerFlags().Expand().Border(wxTOP, 15));
+ }
+
+ sizerLeft->Add(5, 5, wxSizerFlags().Expand().Border(wxALL, 5)); // spacer
+ wxButton* btnReset = new wxButton(this, wxID_ANY, "&Reset");
+ sizerLeft->Add(btnReset, wxSizerFlags().CenterHorizontal().Border(wxALL, 15));
+
+ // right pane
m_sizerHeader = new wxStaticBoxSizer(wxVERTICAL, this, "Header");
RecreateWidget();
- wxSizer* const sizerTop = new wxBoxSizer(wxHORIZONTAL);
+ // the 2 panes compose the window
+ wxSizer* sizerTop = new wxBoxSizer(wxHORIZONTAL);
+ sizerTop->Add(sizerLeft, wxSizerFlags().Expand().DoubleBorder());
sizerTop->Add(m_sizerHeader, wxSizerFlags(1).Expand().DoubleBorder());
SetSizer(sizerTop);
+
+ // Bind event handlers
+ m_chkAllowReorder->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ m_chkAllowHide->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ m_chkBitmapOnRight->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ for ( int i = 0; i < (int)WXSIZEOF(m_colSettings); i++ )
+ {
+ m_colSettings[i].chkAllowResize->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ m_colSettings[i].chkAllowReorder->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ m_colSettings[i].chkAllowSort->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ m_colSettings[i].chkAllowHide->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ m_colSettings[i].chkWithBitmap->Bind(wxEVT_CHECKBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ m_colSettings[i].rbAlignments->Bind(wxEVT_RADIOBOX, &HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox, this);
+ }
+ btnReset->Bind(wxEVT_BUTTON, &HeaderCtrlWidgetsPage::OnResetButton, this);
+ btnReset->Bind(wxEVT_UPDATE_UI, &HeaderCtrlWidgetsPage::OnUpdateUIResetButton, this);
}
void HeaderCtrlWidgetsPage::RecreateWidget()
{
m_sizerHeader->Clear(true /* delete windows */);
- int flags = GetAttrs().m_defaultFlags;
-
- flags |= wxHD_DEFAULT_STYLE;
+ long flags = GetAttrs().m_defaultFlags | GetHeaderStyleFlags();
m_header = new wxHeaderCtrlSimple(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
flags);
- m_header->AppendColumn(wxHeaderColumnSimple("First", 100));
- m_header->AppendColumn(wxHeaderColumnSimple("Second", 200));
+ wxASSERT(WXSIZEOF(m_colSettings) == 2);
+ wxHeaderColumnSimple col1("First", 100, GetColumnAlignmentFlag(0), GetColumnStyleFlags(0));
+ if ( m_colSettings[0].chkWithBitmap->IsChecked() )
+ {
+ col1.SetBitmap(wxArtProvider::GetIcon(wxART_ERROR, wxART_BUTTON));
+ }
+ m_header->AppendColumn(col1);
+ wxHeaderColumnSimple col2("Second", 200, GetColumnAlignmentFlag(1), GetColumnStyleFlags(1));
+ if ( m_colSettings[1].chkWithBitmap->IsChecked() )
+ {
+ col2.SetBitmap(wxArtProvider::GetIcon(wxART_QUESTION, wxART_BUTTON));
+ }
+ m_header->AppendColumn(col2);
m_sizerHeader->AddStretchSpacer();
m_sizerHeader->Add(m_header, wxSizerFlags().Expand());
@@ -111,4 +212,92 @@ void HeaderCtrlWidgetsPage::RecreateWidget()
m_sizerHeader->Layout();
}
+void HeaderCtrlWidgetsPage::ResetHeaderStyle()
+{
+ m_chkAllowReorder->SetValue((wxHD_DEFAULT_STYLE & wxHD_ALLOW_REORDER) != 0);
+ m_chkAllowHide->SetValue((wxHD_DEFAULT_STYLE & wxHD_ALLOW_HIDE) != 0);
+ m_chkBitmapOnRight->SetValue((wxHD_DEFAULT_STYLE & wxHD_BITMAP_ON_RIGHT) != 0);
+}
+
+long HeaderCtrlWidgetsPage::GetHeaderStyleFlags() const
+{
+ long flags = 0;
+
+ if ( m_chkAllowReorder->IsChecked() )
+ flags |= wxHD_ALLOW_REORDER;
+ if ( m_chkAllowHide->IsChecked() )
+ flags |= wxHD_ALLOW_HIDE;
+ if ( m_chkBitmapOnRight->IsChecked() )
+ flags |= wxHD_BITMAP_ON_RIGHT;
+
+ return flags;
+}
+
+void HeaderCtrlWidgetsPage::ResetColumnStyle(int col)
+{
+ wxASSERT(col < (int)WXSIZEOF(m_colSettings));
+ m_colSettings[col].chkAllowResize->SetValue((wxCOL_DEFAULT_FLAGS & wxCOL_RESIZABLE) != 0);
+ m_colSettings[col].chkAllowReorder->SetValue((wxCOL_DEFAULT_FLAGS & wxCOL_REORDERABLE) != 0);
+ m_colSettings[col].chkAllowSort->SetValue((wxCOL_DEFAULT_FLAGS & wxCOL_SORTABLE) != 0);
+ m_colSettings[col].chkAllowHide->SetValue((wxCOL_DEFAULT_FLAGS & wxCOL_HIDDEN) != 0);
+ m_colSettings[col].chkWithBitmap->SetValue(COL_WITH_BITMAP_DEFAULT);
+ m_colSettings[col].rbAlignments->SetSelection(COL_ALIGNMENT_INDEX_DEFAULT);
+}
+
+int HeaderCtrlWidgetsPage::GetColumnStyleFlags(int col) const
+{
+ wxASSERT(col < (int)WXSIZEOF(m_colSettings));
+ int flags = 0;
+
+ if ( m_colSettings[col].chkAllowResize->IsChecked() )
+ flags |= wxCOL_RESIZABLE;
+ if ( m_colSettings[col].chkAllowReorder->IsChecked() )
+ flags |= wxCOL_REORDERABLE;
+ if ( m_colSettings[col].chkAllowSort->IsChecked() )
+ flags |= wxCOL_SORTABLE;
+ if ( m_colSettings[col].chkAllowHide->IsChecked() )
+ flags |= wxCOL_HIDDEN;
+
+ return flags;
+}
+
+wxAlignment HeaderCtrlWidgetsPage::GetColumnAlignmentFlag(int col) const
+{
+ wxASSERT(col < (int)WXSIZEOF(m_colSettings));
+ wxASSERT(WXSIZEOF(gs_colAlignments) == WXSIZEOF(gs_colAlignFlags));
+ int sel = m_colSettings[col].rbAlignments->GetSelection();
+ return sel == wxNOT_FOUND ? COL_ALIGNMENT_FLAG_DEFAULT : gs_colAlignFlags[sel];
+}
+
+// ----------------------------------------------------------------------------
+// event handlers
+// ----------------------------------------------------------------------------
+
+void HeaderCtrlWidgetsPage::OnStyleCheckOrRadioBox(wxCommandEvent& WXUNUSED(evt))
+{
+ RecreateWidget();
+}
+
+void HeaderCtrlWidgetsPage::OnResetButton(wxCommandEvent& WXUNUSED(evt))
+{
+ ResetHeaderStyle();
+ for ( int i = 0; i < (int)WXSIZEOF(m_colSettings); i++ )
+ {
+ ResetColumnStyle(i);
+ }
+ RecreateWidget();
+}
+
+void HeaderCtrlWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& evt)
+{
+ bool enable = GetHeaderStyleFlags() != wxHD_DEFAULT_STYLE;
+ for ( int i = 0; !enable && i < (int)WXSIZEOF(m_colSettings); i++ )
+ {
+ enable = enable || GetColumnStyleFlags(i) != wxCOL_DEFAULT_FLAGS
+ || m_colSettings[i].chkWithBitmap->IsChecked() != COL_WITH_BITMAP_DEFAULT
+ || m_colSettings[i].rbAlignments->GetSelection() != COL_ALIGNMENT_INDEX_DEFAULT;
+ }
+ evt.Enable(enable);
+}
+
#endif // wxUSE_HEADERCTRL
diff --git a/samples/widgets/radiobox.cpp b/samples/widgets/radiobox.cpp
index 2d109a51fe..62ab26a598 100644
--- a/samples/widgets/radiobox.cpp
+++ b/samples/widgets/radiobox.cpp
@@ -60,14 +60,6 @@ enum
RadioPage_Radio
};
-// layout direction radiobox selections
-enum
-{
- RadioDir_Default,
- RadioDir_LtoR,
- RadioDir_TtoB
-};
-
// default values for the number of radiobox items
static const unsigned int DEFAULT_NUM_ENTRIES = 12;
static const unsigned int DEFAULT_MAJOR_DIM = 3;
@@ -123,7 +115,6 @@ protected:
wxCheckBox *m_chkSpecifyRows;
wxCheckBox *m_chkEnableItem;
wxCheckBox *m_chkShowItem;
- wxRadioBox *m_radioDir;
// the gauge itself and the sizer it is in
wxRadioBox *m_radio;
@@ -155,6 +146,7 @@ wxBEGIN_EVENT_TABLE(RadioWidgetsPage, WidgetsPage)
EVT_BUTTON(RadioPage_Selection, RadioWidgetsPage::OnButtonSelection)
EVT_BUTTON(RadioPage_Label, RadioWidgetsPage::OnButtonSetLabel)
+ EVT_UPDATE_UI(RadioPage_Reset, RadioWidgetsPage::OnUpdateUIReset)
EVT_UPDATE_UI(RadioPage_Update, RadioWidgetsPage::OnUpdateUIUpdate)
EVT_UPDATE_UI(RadioPage_Selection, RadioWidgetsPage::OnUpdateUISelection)
@@ -197,8 +189,7 @@ RadioWidgetsPage::RadioWidgetsPage(WidgetsBookCtrl *book,
m_textLabelBtns =
m_textLabel = (wxTextCtrl *)NULL;
- m_radio =
- m_radioDir = (wxRadioBox *)NULL;
+ m_radio = (wxRadioBox *)NULL;
m_sizerRadio = (wxSizer *)NULL;
}
@@ -217,43 +208,25 @@ void RadioWidgetsPage::CreateContent()
"Major specifies &rows count"
);
- static const wxString layoutDir[] =
- {
- "default",
- "left to right",
- "top to bottom"
- };
-
- m_radioDir = new wxRadioBox(this, wxID_ANY, "Numbering:",
- wxDefaultPosition, wxDefaultSize,
- WXSIZEOF(layoutDir), layoutDir,
- 1, wxRA_SPECIFY_COLS);
- sizerLeft->Add(m_radioDir, 0, wxGROW | wxALL, 5);
-
- // if it's not defined, we can't change the radiobox direction
-#ifndef wxRA_LEFTTORIGHT
- m_radioDir->Disable();
-#endif // wxRA_LEFTTORIGHT
-
wxSizer *sizerRow;
sizerRow = CreateSizerWithTextAndLabel("&Major dimension:",
wxID_ANY,
&m_textMajorDim);
- sizerLeft->Add(sizerRow, 0, wxGROW | wxALL, 5);
+ sizerLeft->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndLabel("&Number of buttons:",
wxID_ANY,
&m_textNumBtns);
- sizerLeft->Add(sizerRow, 0, wxGROW | wxALL, 5);
+ sizerLeft->Add(sizerRow, wxSizerFlags().Expand().Border());
wxButton *btn;
btn = new wxButton(this, RadioPage_Update, "&Update");
- sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 5);
+ sizerLeft->Add(btn, wxSizerFlags().CentreHorizontal().Border());
- sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
+ sizerLeft->AddSpacer(5);
btn = new wxButton(this, RadioPage_Reset, "&Reset");
- sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
+ sizerLeft->Add(btn, wxSizerFlags().CentreHorizontal().Border(wxALL, 15));
// middle pane
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, "&Change parameters");
@@ -262,25 +235,25 @@ void RadioWidgetsPage::CreateContent()
sizerRow = CreateSizerWithTextAndLabel("Current selection:",
wxID_ANY,
&m_textCurSel);
- sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(RadioPage_Selection,
"&Change selection:",
wxID_ANY,
&m_textSel);
- sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(RadioPage_Label,
"&Label for box:",
wxID_ANY,
&m_textLabel);
- sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(RadioPage_LabelBtn,
"&Label for buttons:",
wxID_ANY,
&m_textLabelBtns);
- sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
m_chkEnableItem = CreateCheckBoxAndAddToSizer(sizerMiddle,
"Disable &2nd item",
@@ -291,16 +264,18 @@ void RadioWidgetsPage::CreateContent()
// right pane
wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
- sizerRight->SetMinSize(150, 0);
m_sizerRadio = sizerRight; // save it to modify it later
Reset();
CreateRadio();
// the 3 panes panes compose the window
- sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10);
- sizerTop->Add(sizerMiddle, 1, wxGROW | wxALL, 10);
- sizerTop->Add(sizerRight, 0, wxGROW | (wxALL & ~wxRIGHT), 10);
+ sizerTop->Add(sizerLeft,
+ wxSizerFlags(0).Expand().Border((wxALL & ~wxLEFT), 10));
+ sizerTop->Add(sizerMiddle,
+ wxSizerFlags(1).Expand().Border(wxALL, 10));
+ sizerTop->Add(sizerRight,
+ wxSizerFlags(0).Expand().Border((wxALL & ~wxRIGHT), 10));
// final initializations
SetSizer(sizerTop);
@@ -320,7 +295,6 @@ void RadioWidgetsPage::Reset()
m_chkSpecifyRows->SetValue(false);
m_chkEnableItem->SetValue(true);
m_chkShowItem->SetValue(true);
- m_radioDir->SetSelection(RadioDir_Default);
}
void RadioWidgetsPage::CreateRadio()
@@ -357,13 +331,13 @@ void RadioWidgetsPage::CreateRadio()
majorDim = DEFAULT_MAJOR_DIM;
}
- wxString *items = new wxString[count];
+ wxArrayString items;
wxString labelBtn = m_textLabelBtns->GetValue();
for ( size_t n = 0; n < count; n++ )
{
- items[n] = wxString::Format("%s %lu",
- labelBtn, (unsigned long)n + 1);
+ items.push_back(wxString::Format("%s %lu",
+ labelBtn, (unsigned long)n + 1));
}
int flags = m_chkSpecifyRows->GetValue() ? wxRA_SPECIFY_ROWS
@@ -371,45 +345,29 @@ void RadioWidgetsPage::CreateRadio()
flags |= GetAttrs().m_defaultFlags;
-#ifdef wxRA_LEFTTORIGHT
- switch ( m_radioDir->GetSelection() )
- {
- default:
- wxFAIL_MSG( "unexpected wxRadioBox layout direction" );
- wxFALLTHROUGH;
-
- case RadioDir_Default:
- break;
-
- case RadioDir_LtoR:
- flags |= wxRA_LEFTTORIGHT;
- break;
-
- case RadioDir_TtoB:
- flags |= wxRA_TOPTOBOTTOM;
- break;
- }
-#endif // wxRA_LEFTTORIGHT
-
m_radio = new wxRadioBox(this, RadioPage_Radio,
m_textLabel->GetValue(),
wxDefaultPosition, wxDefaultSize,
- count, items,
+ items,
majorDim,
flags);
- delete [] items;
-
if ( sel >= 0 && (size_t)sel < count )
{
m_radio->SetSelection(sel);
}
- m_sizerRadio->Add(m_radio, 1, wxGROW);
- m_sizerRadio->Layout();
+ if ( count > TEST_BUTTON )
+ {
+ m_radio->Enable(TEST_BUTTON, m_chkEnableItem->IsChecked());
+ m_radio->Show(TEST_BUTTON, m_chkShowItem->IsChecked());
+ }
- m_chkEnableItem->SetValue(true);
- m_chkEnableItem->SetValue(true);
+ m_sizerRadio->Add(m_radio, wxSizerFlags(1).Expand());
+ Layout();
+
+ m_chkEnableItem->Enable(count > TEST_BUTTON);
+ m_chkShowItem->Enable(count > TEST_BUTTON);
}
// ----------------------------------------------------------------------------
@@ -516,12 +474,18 @@ void RadioWidgetsPage::OnUpdateUIReset(wxUpdateUIEvent& event)
void RadioWidgetsPage::OnUpdateUIEnableItem(wxUpdateUIEvent& event)
{
+ if ( m_radio->GetCount() <= TEST_BUTTON )
+ return;
+
event.SetText(m_radio->IsItemEnabled(TEST_BUTTON) ? "Disable &2nd item"
: "Enable &2nd item");
}
void RadioWidgetsPage::OnUpdateUIShowItem(wxUpdateUIEvent& event)
{
+ if ( m_radio->GetCount() <= TEST_BUTTON )
+ return;
+
event.SetText(m_radio->IsItemShown(TEST_BUTTON) ? "Hide 2nd &item"
: "Show 2nd &item");
}
diff --git a/samples/widgets/slider.cpp b/samples/widgets/slider.cpp
index 33edea188d..32bf2fad60 100644
--- a/samples/widgets/slider.cpp
+++ b/samples/widgets/slider.cpp
@@ -59,6 +59,7 @@ enum
SliderPage_Clear,
SliderPage_SetValue,
SliderPage_SetMinAndMax,
+ SliderPage_SetRange,
SliderPage_SetLineSize,
SliderPage_SetPageSize,
SliderPage_SetTickFreq,
@@ -67,12 +68,15 @@ enum
SliderPage_ValueText,
SliderPage_MinText,
SliderPage_MaxText,
+ SliderPage_RangeMinText,
+ SliderPage_RangeMaxText,
SliderPage_LineSizeText,
SliderPage_PageSizeText,
SliderPage_TickFreqText,
SliderPage_ThumbLenText,
SliderPage_RadioSides,
SliderPage_BothSides,
+ SliderPage_SelectRange,
SliderPage_Slider
};
@@ -107,6 +111,7 @@ protected:
void OnButtonClear(wxCommandEvent& event);
void OnButtonSetValue(wxCommandEvent& event);
void OnButtonSetMinAndMax(wxCommandEvent& event);
+ void OnButtonSetRange(wxCommandEvent& event);
void OnButtonSetLineSize(wxCommandEvent& event);
void OnButtonSetPageSize(wxCommandEvent& event);
void OnButtonSetTickFreq(wxCommandEvent& event);
@@ -118,12 +123,14 @@ protected:
void OnUpdateUIValueButton(wxUpdateUIEvent& event);
void OnUpdateUIMinMaxButton(wxUpdateUIEvent& event);
+ void OnUpdateUIRangeButton(wxUpdateUIEvent& event);
void OnUpdateUILineSize(wxUpdateUIEvent& event);
void OnUpdateUIPageSize(wxUpdateUIEvent& event);
void OnUpdateUITickFreq(wxUpdateUIEvent& event);
void OnUpdateUIThumbLen(wxUpdateUIEvent& event);
void OnUpdateUIRadioSides(wxUpdateUIEvent& event);
void OnUpdateUIBothSides(wxUpdateUIEvent& event);
+ void OnUpdateUISelectRange(wxUpdateUIEvent& event);
void OnUpdateUIResetButton(wxUpdateUIEvent& event);
@@ -147,6 +154,9 @@ protected:
// set the thumb len from the text field value
void DoSetThumbLen();
+ // set the selection range from the text field values
+ void DoSetSelectionRange();
+
// is this slider value in range?
bool IsValidValue(int val) const
{ return (val >= m_min) && (val <= m_max); }
@@ -154,6 +164,9 @@ protected:
// the slider range
int m_min, m_max;
+ // the slider selection range
+ int m_rangeMin, m_rangeMax;
+
// the controls
// ------------
@@ -162,7 +175,8 @@ protected:
*m_chkValueLabel,
*m_chkInverse,
*m_chkTicks,
- *m_chkBothSides;
+ *m_chkBothSides,
+ *m_chkSelectRange;
wxRadioBox *m_radioSides;
@@ -174,6 +188,8 @@ protected:
wxTextCtrl *m_textValue,
*m_textMin,
*m_textMax,
+ *m_textRangeMin,
+ *m_textRangeMax,
*m_textLineSize,
*m_textPageSize,
*m_textTickFreq,
@@ -192,6 +208,7 @@ wxBEGIN_EVENT_TABLE(SliderWidgetsPage, WidgetsPage)
EVT_BUTTON(SliderPage_Reset, SliderWidgetsPage::OnButtonReset)
EVT_BUTTON(SliderPage_SetValue, SliderWidgetsPage::OnButtonSetValue)
EVT_BUTTON(SliderPage_SetMinAndMax, SliderWidgetsPage::OnButtonSetMinAndMax)
+ EVT_BUTTON(SliderPage_SetRange, SliderWidgetsPage::OnButtonSetRange)
EVT_BUTTON(SliderPage_SetLineSize, SliderWidgetsPage::OnButtonSetLineSize)
EVT_BUTTON(SliderPage_SetPageSize, SliderWidgetsPage::OnButtonSetPageSize)
EVT_BUTTON(SliderPage_SetTickFreq, SliderWidgetsPage::OnButtonSetTickFreq)
@@ -199,12 +216,14 @@ wxBEGIN_EVENT_TABLE(SliderWidgetsPage, WidgetsPage)
EVT_UPDATE_UI(SliderPage_SetValue, SliderWidgetsPage::OnUpdateUIValueButton)
EVT_UPDATE_UI(SliderPage_SetMinAndMax, SliderWidgetsPage::OnUpdateUIMinMaxButton)
+ EVT_UPDATE_UI(SliderPage_SetRange, SliderWidgetsPage::OnUpdateUIRangeButton)
EVT_UPDATE_UI(SliderPage_SetLineSize, SliderWidgetsPage::OnUpdateUILineSize)
EVT_UPDATE_UI(SliderPage_SetPageSize, SliderWidgetsPage::OnUpdateUIPageSize)
EVT_UPDATE_UI(SliderPage_SetTickFreq, SliderWidgetsPage::OnUpdateUITickFreq)
EVT_UPDATE_UI(SliderPage_SetThumbLen, SliderWidgetsPage::OnUpdateUIThumbLen)
EVT_UPDATE_UI(SliderPage_RadioSides, SliderWidgetsPage::OnUpdateUIRadioSides)
EVT_UPDATE_UI(SliderPage_BothSides, SliderWidgetsPage::OnUpdateUIBothSides)
+ EVT_UPDATE_UI(SliderPage_SelectRange, SliderWidgetsPage::OnUpdateUISelectRange)
EVT_UPDATE_UI(SliderPage_Reset, SliderWidgetsPage::OnUpdateUIResetButton)
@@ -235,12 +254,15 @@ SliderWidgetsPage::SliderWidgetsPage(WidgetsBookCtrl *book,
// init everything
m_min = 0;
m_max = 100;
+ m_rangeMin = 20;
+ m_rangeMax = 80;
m_chkInverse =
m_chkTicks =
m_chkMinMaxLabels =
m_chkValueLabel =
- m_chkBothSides = (wxCheckBox *)NULL;
+ m_chkBothSides =
+ m_chkSelectRange =(wxCheckBox *)NULL;
m_radioSides = (wxRadioBox *)NULL;
@@ -272,17 +294,20 @@ void SliderWidgetsPage::CreateContent()
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(sides), sides,
1, wxRA_SPECIFY_COLS);
- sizerLeft->Add(m_radioSides, 0, wxGROW | wxALL, 5);
+ sizerLeft->Add(m_radioSides, wxSizerFlags().Expand().Border());
m_chkBothSides = CreateCheckBoxAndAddToSizer
(sizerLeft, "&Both sides", SliderPage_BothSides);
+ m_chkSelectRange = CreateCheckBoxAndAddToSizer
+ (sizerLeft, "&Selection range", SliderPage_SelectRange);
#if wxUSE_TOOLTIPS
m_chkBothSides->SetToolTip("\"Both sides\" is only supported \nin Universal");
+ m_chkSelectRange->SetToolTip("\"Select range\" is only supported \nin wxMSW");
#endif // wxUSE_TOOLTIPS
- sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
+ sizerLeft->AddSpacer(5);
wxButton *btn = new wxButton(this, SliderPage_Reset, "&Reset");
- sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
+ sizerLeft->Add(btn, wxSizerFlags().CentreHorizontal().Border(wxALL, 15));
// middle pane
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, "&Change slider value");
@@ -294,13 +319,13 @@ void SliderWidgetsPage::CreateContent()
&text);
text->SetEditable(false);
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetValue,
"Set &value",
SliderPage_ValueText,
&m_textValue);
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetMinAndMax,
"&Min and max",
@@ -308,26 +333,39 @@ void SliderWidgetsPage::CreateContent()
&m_textMin);
m_textMax = new wxTextCtrl(this, SliderPage_MaxText, wxEmptyString);
- sizerRow->Add(m_textMax, 1, wxLEFT | wxALIGN_CENTRE_VERTICAL, 5);
+ sizerRow->Add(m_textMax, wxSizerFlags(1).CentreVertical().Border(wxLEFT));
m_textMin->SetValue( wxString::Format("%d", m_min) );
m_textMax->SetValue( wxString::Format("%d", m_max) );
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
+
+ sizerRow = CreateSizerWithTextAndButton(SliderPage_SetRange,
+ "&Selection",
+ SliderPage_RangeMinText,
+ &m_textRangeMin);
+
+ m_textRangeMax = new wxTextCtrl(this, SliderPage_RangeMaxText, wxEmptyString);
+ sizerRow->Add(m_textRangeMax, wxSizerFlags(1).CentreVertical().Border(wxLEFT));
+
+ m_textRangeMin->SetValue( wxString::Format("%d", m_rangeMin) );
+ m_textRangeMax->SetValue( wxString::Format("%d", m_rangeMax) );
+
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetLineSize,
"Li&ne size",
SliderPage_LineSizeText,
&m_textLineSize);
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetPageSize,
"P&age size",
SliderPage_PageSizeText,
&m_textPageSize);
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetTickFreq,
"Tick &frequency",
@@ -336,30 +374,29 @@ void SliderWidgetsPage::CreateContent()
m_textTickFreq->SetValue("10");
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetThumbLen,
"Thumb &length",
SliderPage_ThumbLenText,
&m_textThumbLen);
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
// right pane
wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
- sizerRight->SetMinSize(150, 40);
m_sizerSlider = sizerRight; // save it to modify it later
Reset();
CreateSlider();
- m_textLineSize->SetValue(wxString::Format("%d", m_slider->GetLineSize()));
- m_textPageSize->SetValue(wxString::Format("%d", m_slider->GetPageSize()));
-
// the 3 panes panes compose the window
- sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10);
- sizerTop->Add(sizerMiddle, 0, wxGROW | wxALL, 10);
- sizerTop->Add(sizerRight, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
+ sizerTop->Add(sizerLeft,
+ wxSizerFlags(0).Expand().Border((wxALL & ~wxLEFT), 10));
+ sizerTop->Add(sizerMiddle,
+ wxSizerFlags(1).Expand().Border(wxALL, 10));
+ sizerTop->Add(sizerRight,
+ wxSizerFlags(1).Expand().Border((wxALL & ~wxRIGHT), 10));
// final initializations
SetSizer(sizerTop);
@@ -376,6 +413,7 @@ void SliderWidgetsPage::Reset()
m_chkValueLabel->SetValue(true);
m_chkMinMaxLabels->SetValue(true);
m_chkBothSides->SetValue(false);
+ m_chkSelectRange->SetValue(false);
m_radioSides->SetSelection(SliderTicks_None);
}
@@ -438,11 +476,16 @@ void SliderWidgetsPage::CreateSlider()
flags |= wxSL_BOTH;
}
+ if ( m_chkSelectRange->GetValue() )
+ {
+ flags |= wxSL_SELRANGE;
+ }
+
int val = m_min;
if ( m_slider )
{
int valOld = m_slider->GetValue();
- if ( !IsValidValue(valOld) )
+ if ( IsValidValue(valOld) )
{
val = valOld;
}
@@ -466,21 +509,30 @@ void SliderWidgetsPage::CreateSlider()
if ( m_slider->HasFlag(wxSL_VERTICAL) )
{
- m_sizerSlider->Add(0, 0, 1);
- m_sizerSlider->Add(m_slider, 0, wxGROW | wxALL, 5);
- m_sizerSlider->Add(0, 0, 1);
+ m_sizerSlider->AddStretchSpacer(1);
+ m_sizerSlider->Add(m_slider, wxSizerFlags(0).Expand().Border());
+ m_sizerSlider->AddStretchSpacer(1);
}
else
{
- m_sizerSlider->Add(m_slider, 1, wxCENTRE | wxALL, 5);
+ m_sizerSlider->Add(m_slider, wxSizerFlags(1).Centre().Border());
}
+ m_textLineSize->SetValue(wxString::Format("%d", m_slider->GetLineSize()));
+ m_textPageSize->SetValue(wxString::Format("%d", m_slider->GetPageSize()));
+ m_textThumbLen->SetValue(wxString::Format("%d", m_slider->GetThumbLength()));
+
if ( m_chkTicks->GetValue() )
{
DoSetTickFreq();
}
- m_sizerSlider->Layout();
+ if ( m_chkSelectRange->GetValue() )
+ {
+ DoSetSelectionRange();
+ }
+
+ Layout();
}
void SliderWidgetsPage::DoSetLineSize()
@@ -543,6 +595,39 @@ void SliderWidgetsPage::DoSetThumbLen()
}
m_slider->SetThumbLength(len);
+
+ if ( m_slider->GetThumbLength() != len )
+ {
+ wxLogWarning(wxString::Format("Invalid thumb length in slider: %d",
+ m_slider->GetThumbLength()));
+ }
+
+ Layout();
+}
+
+void SliderWidgetsPage::DoSetSelectionRange()
+{
+ long minNew,
+ maxNew = 0; // init to suppress compiler warning
+ if ( !m_textRangeMin->GetValue().ToLong(&minNew) ||
+ !m_textRangeMax->GetValue().ToLong(&maxNew) ||
+ minNew >= maxNew || minNew < m_min || maxNew > m_max )
+ {
+ wxLogWarning("Invalid selection range for the slider.");
+
+ return;
+ }
+
+ m_rangeMin = minNew;
+ m_rangeMax = maxNew;
+
+ m_slider->SetSelection(m_rangeMin, m_rangeMax);
+
+ if ( m_slider->GetSelStart() != m_rangeMin ||
+ m_slider->GetSelEnd() != m_rangeMax )
+ {
+ wxLogWarning("Invalid selection range in slider.");
+ }
}
// ----------------------------------------------------------------------------
@@ -601,6 +686,11 @@ void SliderWidgetsPage::OnButtonSetMinAndMax(wxCommandEvent& WXUNUSED(event))
}
}
+void SliderWidgetsPage::OnButtonSetRange(wxCommandEvent& WXUNUSED(event))
+{
+ DoSetSelectionRange();
+}
+
void SliderWidgetsPage::OnButtonSetValue(wxCommandEvent& WXUNUSED(event))
{
long val;
@@ -656,6 +746,17 @@ void SliderWidgetsPage::OnUpdateUIMinMaxButton(wxUpdateUIEvent& event)
mn < mx);
}
+void SliderWidgetsPage::OnUpdateUIRangeButton(wxUpdateUIEvent& event)
+{
+ long mn, mx;
+ event.Enable( m_chkSelectRange->GetValue() &&
+ m_textRangeMin->GetValue().ToLong(&mn) &&
+ m_textRangeMax->GetValue().ToLong(&mx) &&
+ mn < mx &&
+ mn >= m_min && mx <= m_max );
+
+}
+
void SliderWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
{
event.Enable( m_chkInverse->GetValue() ||
@@ -663,6 +764,7 @@ void SliderWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
!m_chkValueLabel->GetValue() ||
!m_chkMinMaxLabels->GetValue() ||
m_chkBothSides->GetValue() ||
+ m_chkSelectRange->GetValue() ||
m_radioSides->GetSelection() != SliderTicks_None );
}
@@ -684,12 +786,21 @@ void SliderWidgetsPage::OnUpdateUIRadioSides(wxUpdateUIEvent& event)
void SliderWidgetsPage::OnUpdateUIBothSides(wxUpdateUIEvent& event)
{
#if defined(__WXMSW__) || defined(__WXUNIVERSAL__)
- event.Enable( m_chkTicks->GetValue() );
+ event.Enable( true );
#else
event.Enable( false );
#endif // defined(__WXMSW__) || defined(__WXUNIVERSAL__)
}
+void SliderWidgetsPage::OnUpdateUISelectRange(wxUpdateUIEvent& event)
+{
+#if defined(__WXMSW__)
+ event.Enable( true );
+#else
+ event.Enable( false );
+#endif // defined(__WXMSW__)
+}
+
void SliderWidgetsPage::OnSlider(wxScrollEvent& event)
{
wxASSERT_MSG( event.GetInt() == m_slider->GetValue(),
diff --git a/samples/widgets/spinbtn.cpp b/samples/widgets/spinbtn.cpp
index 067a3af999..2d371e8103 100644
--- a/samples/widgets/spinbtn.cpp
+++ b/samples/widgets/spinbtn.cpp
@@ -557,12 +557,31 @@ void SpinBtnWidgetsPage::OnSpinBtn(wxSpinEvent& event)
void SpinBtnWidgetsPage::OnSpinBtnUp(wxSpinEvent& event)
{
+ // Demonstrate that these events can be vetoed to prevent the control value
+ // from changing.
+ if ( event.GetInt() == 11 )
+ {
+ wxLogMessage("Spin button prevented from going up to 11 (still %d)",
+ m_spinbtn->GetValue());
+ event.Veto();
+ return;
+ }
+
wxLogMessage( "Spin button value incremented, will be %d (was %d)",
event.GetInt(), m_spinbtn->GetValue() );
}
void SpinBtnWidgetsPage::OnSpinBtnDown(wxSpinEvent& event)
{
+ // Also demonstrate that vetoing the event but then skipping the handler
+ // doesn't actually apply the veto.
+ if ( event.GetInt() == 0 )
+ {
+ wxLogMessage("Spin button change not effectively vetoed, will become 0");
+ event.Veto();
+ event.Skip();
+ }
+
wxLogMessage( "Spin button value decremented, will be %d (was %d)",
event.GetInt(), m_spinbtn->GetValue() );
}
diff --git a/samples/widgets/toggle.cpp b/samples/widgets/toggle.cpp
index d435642951..43a4e3f103 100644
--- a/samples/widgets/toggle.cpp
+++ b/samples/widgets/toggle.cpp
@@ -108,20 +108,26 @@ protected:
// (re)create the toggle
void CreateToggle();
+ // add m_button to m_sizerButton using current value of m_chkFit
+ void AddButtonToSizer();
+
// helper function: create a bitmap for wxBitmapToggleButton
- wxBitmap CreateBitmap(const wxString& label);
+ wxBitmap CreateBitmap(const wxString& label, const wxArtID& type);
// the controls
// ------------
+ wxCheckBox *m_chkFit,
+ *m_chkDisable;
+
#if wxUSE_MARKUP
wxCheckBox *m_chkUseMarkup;
#endif // wxUSE_MARKUP
+
#ifdef wxHAS_BITMAPTOGGLEBUTTON
// the check/radio boxes for styles
wxCheckBox *m_chkBitmapOnly,
*m_chkTextAndBitmap,
- *m_chkFit,
*m_chkUseBitmapClass;
// more checkboxes for wxBitmapToggleButton only
@@ -138,11 +144,7 @@ protected:
#endif // wxHAS_BITMAPTOGGLEBUTTON
// the checkbox itself and the sizer it is in
-#ifdef wxHAS_ANY_BUTTON
wxToggleButton *m_toggle;
-#else
- wxToggleButtonBase *m_toggle;
-#endif // wxHAS_ANY_BUTTON
wxSizer *m_sizerToggle;
// the text entries for command parameters
@@ -183,14 +185,17 @@ ToggleWidgetsPage::ToggleWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
:WidgetsPage(book, imaglist, toggle_xpm)
{
+ m_chkFit =
+ m_chkDisable = (wxCheckBox *)NULL;
+
#if wxUSE_MARKUP
m_chkUseMarkup = (wxCheckBox *)NULL;
#endif // wxUSE_MARKUP
+
#ifdef wxHAS_BITMAPTOGGLEBUTTON
// init everything
m_chkBitmapOnly =
m_chkTextAndBitmap =
- m_chkFit =
m_chkUseBitmapClass =
m_chkUsePressed =
m_chkUseFocused =
@@ -220,17 +225,21 @@ void ToggleWidgetsPage::CreateContent()
#ifdef wxHAS_BITMAPTOGGLEBUTTON
m_chkBitmapOnly = CreateCheckBoxAndAddToSizer(sizerLeft, "&Bitmap only");
m_chkTextAndBitmap = CreateCheckBoxAndAddToSizer(sizerLeft, "Text &and bitmap");
- m_chkFit = CreateCheckBoxAndAddToSizer(sizerLeft, "&Fit exactly");
#endif // wxHAS_BITMAPTOGGLEBUTTON
+
#if wxUSE_MARKUP
m_chkUseMarkup = CreateCheckBoxAndAddToSizer(sizerLeft, "Interpret &markup");
#endif // wxUSE_MARKUP
+ m_chkFit = CreateCheckBoxAndAddToSizer(sizerLeft, "&Fit exactly");
+ m_chkDisable = CreateCheckBoxAndAddToSizer(sizerLeft, "Disable");
+
#ifdef wxHAS_BITMAPTOGGLEBUTTON
m_chkUseBitmapClass = CreateCheckBoxAndAddToSizer(sizerLeft,
"Use wxBitmapToggleButton");
m_chkUseBitmapClass->SetValue(true);
+
sizerLeft->AddSpacer(5);
wxSizer *sizerUseLabels =
@@ -255,7 +264,7 @@ void ToggleWidgetsPage::CreateContent()
m_radioImagePos = new wxRadioBox(this, wxID_ANY, "Image &position",
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(dirs), dirs);
- sizerLeft->Add(m_radioImagePos, 0, wxGROW | wxALL, 5);
+ sizerLeft->Add(m_radioImagePos, wxSizerFlags().Expand().Border());
sizerLeft->AddSpacer(15);
// should be in sync with enums Toggle[HV]Align!
@@ -280,14 +289,14 @@ void ToggleWidgetsPage::CreateContent()
wxDefaultPosition, wxDefaultSize,
WXSIZEOF(valign), valign);
- sizerLeft->Add(m_radioHAlign, 0, wxGROW | wxALL, 5);
- sizerLeft->Add(m_radioVAlign, 0, wxGROW | wxALL, 5);
+ sizerLeft->Add(m_radioHAlign, wxSizerFlags().Expand().Border());
+ sizerLeft->Add(m_radioVAlign, wxSizerFlags().Expand().Border());
#endif // wxHAS_BITMAPTOGGLEBUTTON
- sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
+ sizerLeft->AddSpacer(5);
wxButton *btn = new wxButton(this, TogglePage_Reset, "&Reset");
- sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
+ sizerLeft->Add(btn, wxSizerFlags().CentreHorizontal().Border(wxALL, 15));
// middle pane
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, "&Operations");
@@ -299,16 +308,19 @@ void ToggleWidgetsPage::CreateContent()
&m_textLabel);
m_textLabel->SetValue("&Toggle me!");
- sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(sizerRow, wxSizerFlags().Expand().Border());
// right pane
m_sizerToggle = new wxBoxSizer(wxHORIZONTAL);
m_sizerToggle->SetMinSize(150, 0);
// the 3 panes panes compose the window
- sizerTop->Add(sizerLeft, 0, (wxALL & ~wxLEFT), 10);
- sizerTop->Add(sizerMiddle, 1, wxGROW | wxALL, 10);
- sizerTop->Add(m_sizerToggle, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
+ sizerTop->Add(sizerLeft,
+ wxSizerFlags(0).Expand().Border((wxALL & ~wxLEFT), 10));
+ sizerTop->Add(sizerMiddle,
+ wxSizerFlags(1).Expand().Border(wxALL, 10));
+ sizerTop->Add(m_sizerToggle,
+ wxSizerFlags(1).Expand().Border((wxALL & ~wxRIGHT), 10));
// do create the main control
Reset();
@@ -319,13 +331,17 @@ void ToggleWidgetsPage::CreateContent()
void ToggleWidgetsPage::Reset()
{
-#ifdef wxHAS_BITMAPTOGGLEBUTTON
- m_chkBitmapOnly->SetValue(false);
+
m_chkFit->SetValue(true);
- m_chkTextAndBitmap->SetValue(false);
+ m_chkDisable->SetValue(false);
+
#if wxUSE_MARKUP
m_chkUseMarkup->SetValue(false);
#endif // wxUSE_MARKUP
+
+#ifdef wxHAS_BITMAPTOGGLEBUTTON
+ m_chkBitmapOnly->SetValue(false);
+ m_chkTextAndBitmap->SetValue(false);
m_chkUseBitmapClass->SetValue(true);
m_chkUsePressed->SetValue(true);
@@ -370,6 +386,7 @@ void ToggleWidgetsPage::CreateToggle()
}
int flags = GetAttrs().m_defaultFlags;
+
#ifdef wxHAS_BITMAPTOGGLEBUTTON
switch ( m_radioHAlign->GetSelection() )
{
@@ -407,9 +424,7 @@ void ToggleWidgetsPage::CreateToggle()
flags |= wxBU_BOTTOM;
break;
}
-#endif // wxHAS_BITMAPTOGGLEBUTTON
-#ifdef wxHAS_BITMAPTOGGLEBUTTON
bool showsBitmap = false;
if ( m_chkBitmapOnly->GetValue() )
{
@@ -419,23 +434,21 @@ void ToggleWidgetsPage::CreateToggle()
if ( m_chkUseBitmapClass->GetValue() )
{
btgl = new wxBitmapToggleButton(this, TogglePage_Picker,
- CreateBitmap("normal"));
+ CreateBitmap("normal", wxART_INFORMATION));
}
else
{
btgl = new wxToggleButton(this, TogglePage_Picker, "");
- btgl->SetBitmapLabel(CreateBitmap("normal"));
+ btgl->SetBitmapLabel(CreateBitmap("normal", wxART_INFORMATION));
}
-#ifdef wxHAS_ANY_BUTTON
if ( m_chkUsePressed->GetValue() )
- btgl->SetBitmapPressed(CreateBitmap("pushed"));
+ btgl->SetBitmapPressed(CreateBitmap("pushed", wxART_HELP));
if ( m_chkUseFocused->GetValue() )
- btgl->SetBitmapFocus(CreateBitmap("focused"));
+ btgl->SetBitmapFocus(CreateBitmap("focused", wxART_ERROR));
if ( m_chkUseCurrent->GetValue() )
- btgl->SetBitmapCurrent(CreateBitmap("hover"));
+ btgl->SetBitmapCurrent(CreateBitmap("hover", wxART_WARNING));
if ( m_chkUseDisabled->GetValue() )
- btgl->SetBitmapDisabled(CreateBitmap("disabled"));
-#endif // wxHAS_ANY_BUTTON
+ btgl->SetBitmapDisabled(CreateBitmap("disabled", wxART_MISSING_IMAGE));
m_toggle = btgl;
}
else // normal button
@@ -448,7 +461,6 @@ void ToggleWidgetsPage::CreateToggle()
m_toggle->SetValue(value);
#ifdef wxHAS_BITMAPTOGGLEBUTTON
-#ifdef wxHAS_ANY_BUTTON
if ( !showsBitmap && m_chkTextAndBitmap->GetValue() )
{
showsBitmap = true;
@@ -470,9 +482,9 @@ void ToggleWidgetsPage::CreateToggle()
if ( m_chkUseDisabled->GetValue() )
m_toggle->SetBitmapDisabled(wxArtProvider::GetIcon(wxART_MISSING_IMAGE, wxART_BUTTON));
}
-#endif // wxHAS_ANY_BUTTON
m_chkUseBitmapClass->Enable(showsBitmap);
+ m_chkTextAndBitmap->Enable(!m_chkBitmapOnly->IsChecked());
m_chkUsePressed->Enable(showsBitmap);
m_chkUseFocused->Enable(showsBitmap);
@@ -480,12 +492,27 @@ void ToggleWidgetsPage::CreateToggle()
m_chkUseDisabled->Enable(showsBitmap);
#endif // wxHAS_BITMAPTOGGLEBUTTON
- m_sizerToggle->Add(0, 0, 1, wxCENTRE);
- m_sizerToggle->Add(m_toggle, 1, wxCENTRE);
- m_sizerToggle->Add(0, 0, 1, wxCENTRE);
+ m_toggle->Enable(!m_chkDisable->IsChecked());
+
+ AddButtonToSizer();
+
m_sizerToggle->Layout();
}
+void ToggleWidgetsPage::AddButtonToSizer()
+{
+ if ( m_chkFit->GetValue() )
+ {
+ m_sizerToggle->AddStretchSpacer(1);
+ m_sizerToggle->Add(m_toggle, wxSizerFlags(0).Centre().Border());
+ m_sizerToggle->AddStretchSpacer(1);
+ }
+ else // take up the entire space
+ {
+ m_sizerToggle->Add(m_toggle, wxSizerFlags(1).Expand().Border());
+ }
+}
+
// ----------------------------------------------------------------------------
// event handlers
// ----------------------------------------------------------------------------
@@ -512,6 +539,11 @@ void ToggleWidgetsPage::OnButtonChangeLabel(wxCommandEvent& WXUNUSED(event))
else
#endif // wxUSE_MARKUP
m_toggle->SetLabel(labelText);
+
+#ifdef wxHAS_BITMAPTOGGLEBUTTON
+ if ( m_chkBitmapOnly->IsChecked() )
+ CreateToggle();
+#endif // wxHAS_BITMAPTOGGLEBUTTON
}
#ifdef wxHAS_BITMAPTOGGLEBUTTON
@@ -519,17 +551,18 @@ void ToggleWidgetsPage::OnButtonChangeLabel(wxCommandEvent& WXUNUSED(event))
// bitmap toggle button stuff
// ----------------------------------------------------------------------------
-wxBitmap ToggleWidgetsPage::CreateBitmap(const wxString& label)
+wxBitmap ToggleWidgetsPage::CreateBitmap(const wxString& label, const wxArtID& type)
{
- wxBitmap bmp(180, 70); // shouldn't hardcode but it's simpler like this
+ wxBitmap bmp(FromDIP(wxSize(180, 70))); // shouldn't hardcode but it's simpler like this
wxMemoryDC dc;
dc.SelectObject(bmp);
+ dc.SetFont(GetFont());
dc.SetBackground(*wxCYAN_BRUSH);
dc.Clear();
dc.SetTextForeground(*wxBLACK);
dc.DrawLabel(wxStripMenuCodes(m_textLabel->GetValue()) + "\n"
"(" + label + " state)",
- wxArtProvider::GetBitmap(wxART_INFORMATION),
+ wxArtProvider::GetBitmap(type),
wxRect(10, 10, bmp.GetWidth() - 20, bmp.GetHeight() - 20),
wxALIGN_CENTRE);
diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp
index 381011490d..0d26fc05e8 100644
--- a/samples/widgets/widgets.cpp
+++ b/samples/widgets/widgets.cpp
@@ -492,7 +492,7 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
wxVERTICAL);
m_lboxLog = new wxListBox(m_panel, wxID_ANY);
- sizerDown->Add(m_lboxLog, 1, wxGROW | wxALL, 5);
+ sizerDown->Add(m_lboxLog, wxSizerFlags(1).Expand().Border());
sizerDown->SetMinSize(100, 150);
#else
wxSizer *sizerDown = new wxBoxSizer(wxVERTICAL);
@@ -503,16 +503,16 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
#if USE_LOG
btn = new wxButton(m_panel, Widgets_ClearLog, "Clear &log");
sizerBtns->Add(btn);
- sizerBtns->Add(10, 0); // spacer
+ sizerBtns->AddSpacer(10);
#endif // USE_LOG
btn = new wxButton(m_panel, Widgets_Quit, "E&xit");
sizerBtns->Add(btn);
- sizerDown->Add(sizerBtns, 0, wxALL | wxALIGN_RIGHT, 5);
+ sizerDown->Add(sizerBtns, wxSizerFlags().Border().Right());
// put everything together
- sizerTop->Add(m_book, 1, wxGROW | (wxALL & ~(wxTOP | wxBOTTOM)), 10);
- sizerTop->Add(0, 5, 0, wxGROW); // spacer in between
- sizerTop->Add(sizerDown, 0, wxGROW | (wxALL & ~wxTOP), 10);
+ sizerTop->Add(m_book, wxSizerFlags(1).Expand().DoubleBorder(wxALL & ~(wxTOP | wxBOTTOM)));
+ sizerTop->AddSpacer(5);
+ sizerTop->Add(sizerDown, wxSizerFlags(0).Expand().DoubleBorder(wxALL & ~wxTOP));
m_panel->SetSizer(sizerTop);
@@ -639,7 +639,7 @@ void WidgetsFrame::InitBook()
#if USE_TREEBOOK
// for treebook page #0 is empty parent page only so select the first page
// with some contents
- if ( !pageSet )
+ if ( !pageSet || !m_book->GetCurrentPage() )
m_book->SetSelection(1);
// but ensure that the top of the tree is shown nevertheless
@@ -648,7 +648,7 @@ void WidgetsFrame::InitBook()
wxTreeItemIdValue cookie;
tree->EnsureVisible(tree->GetFirstChild(tree->GetRootItem(), cookie));
#else
- if ( !pageSet )
+ if ( !pageSet || !m_book->GetCurrentPage() )
{
// for other books set selection twice to force connected event handler
// to force lazy creation of initial visible content
@@ -1347,8 +1347,8 @@ wxSizer *WidgetsPage::CreateSizerWithText(wxControl *control,
wxTextCtrl *text = new wxTextCtrl(this, id, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
- sizerRow->Add(control, 0, wxRIGHT | wxALIGN_CENTRE_VERTICAL, 5);
- sizerRow->Add(text, 1, wxLEFT | wxALIGN_CENTRE_VERTICAL, 5);
+ sizerRow->Add(control, wxSizerFlags(0).Border(wxRIGHT).CentreVertical());
+ sizerRow->Add(text, wxSizerFlags(1).Border(wxLEFT).CentreVertical());
if ( ppText )
*ppText = text;
@@ -1379,8 +1379,8 @@ wxCheckBox *WidgetsPage::CreateCheckBoxAndAddToSizer(wxSizer *sizer,
wxWindowID id)
{
wxCheckBox *checkbox = new wxCheckBox(this, id, label);
- sizer->Add(checkbox, 0, wxLEFT | wxRIGHT, 5);
- sizer->Add(0, 2, 0, wxGROW); // spacer
+ sizer->Add(checkbox, wxSizerFlags().HorzBorder());
+ sizer->AddSpacer(2);
return checkbox;
}
diff --git a/samples/wizard/Makefile.in b/samples/wizard/Makefile.in
index e41b114c12..7f148d0184 100644
--- a/samples/wizard/Makefile.in
+++ b/samples/wizard/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
WIZARD_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/wrapsizer/Makefile.in b/samples/wrapsizer/Makefile.in
index d60de26e90..6e3a077752 100644
--- a/samples/wrapsizer/Makefile.in
+++ b/samples/wrapsizer/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
WRAPSIZER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
diff --git a/samples/xrc/Makefile.in b/samples/xrc/Makefile.in
index 9b11053827..0be5bdf309 100644
--- a/samples/xrc/Makefile.in
+++ b/samples/xrc/Makefile.in
@@ -42,7 +42,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
XRCDEMO_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/xrc/rc/artprov.xrc b/samples/xrc/rc/artprov.xrc
index a3bdc9823e..eefb80b405 100644
--- a/samples/xrc/rc/artprov.xrc
+++ b/samples/xrc/rc/artprov.xrc
@@ -37,7 +37,7 @@
derivdlg.xpm
-
+
wxALIGN_CENTRE|wxALL
5
diff --git a/samples/xrc/rc/menu.xrc b/samples/xrc/rc/menu.xrc
index 5ea4737a81..e154d358f0 100644
--- a/samples/xrc/rc/menu.xrc
+++ b/samples/xrc/rc/menu.xrc
@@ -29,7 +29,7 @@
_Non-Derived Dialog Example
basicdlg.xpm
The basic instance of wxDialog loaded via XRC
-
+
+
-
+
+
+
+
-
+
-
+
+
wxALIGN_CENTRE|wxALL
5
Get latest update at www.mycompany.com/download/win
-
+
wxALIGN_CENTRE|wxALL
5
Get latest update at www.mycompany.com/download/unix
-
+
wxALIGN_CENTRE|wxALL
5
Get latest update at www.mycompany.com/download/os2
-
+
wxALIGN_CENTRE|wxALL
diff --git a/samples/xrc/rc/toolbar.xrc b/samples/xrc/rc/toolbar.xrc
index 6aef017c25..4b84ac0340 100644
--- a/samples/xrc/rc/toolbar.xrc
+++ b/samples/xrc/rc/toolbar.xrc
@@ -19,12 +19,12 @@
Controls Example
controls.xpm
A notebook displaying all the wxWidgets controls
-
+
Uncentered Example
uncenter.xpm
Disable autocentering of a dialog on its parent
-
+
aui.xpm
@@ -40,7 +40,7 @@
Custom Class Example
custclas.xpm
Embed your own custom classes into an XRC
-
+
Platform Specific Example
platform.xpm
@@ -55,7 +55,7 @@
Variable Expansion Example
variable.xpm
Replace variables in the XRC file at runtime
-
+
-
+
diff --git a/samples/xti/Makefile.in b/samples/xti/Makefile.in
index 0c3d89dc77..be6d626f69 100644
--- a/samples/xti/Makefile.in
+++ b/samples/xti/Makefile.in
@@ -41,7 +41,7 @@ wx_top_builddir = @wx_top_builddir@
DESTDIR =
WX_RELEASE = 3.1
-WX_VERSION = $(WX_RELEASE).2
+WX_VERSION = $(WX_RELEASE).3
LIBDIRNAME = $(wx_top_builddir)/lib
XTI_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
diff --git a/samples/xti/classlist.cpp b/samples/xti/classlist.cpp
index e32e708b02..55849d0d70 100644
--- a/samples/xti/classlist.cpp
+++ b/samples/xti/classlist.cpp
@@ -2,7 +2,7 @@
// Name: classlist.cpp
// Purpose: ClassListDialog implementation
// Author: Francesco Montorsi
-// Modified by:
+// Modified by:
// Created: 03/06/2007 14:49:55
// Copyright: (c) 2007 Francesco Montorsi
// Licence: wxWindows licence
@@ -12,7 +12,7 @@
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-
+
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
@@ -53,15 +53,15 @@ ClassListDialog::ClassListDialog()
Init();
}
-ClassListDialog::ClassListDialog( wxWindow* parent, wxWindowID id,
- const wxString& caption, const wxPoint& pos,
+ClassListDialog::ClassListDialog( wxWindow* parent, wxWindowID id,
+ const wxString& caption, const wxPoint& pos,
const wxSize& size, long style )
{
Init();
Create(parent, id, caption, pos, size, style);
}
-bool ClassListDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption,
+bool ClassListDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption,
const wxPoint& pos, const wxSize& size, long style )
{
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
@@ -101,14 +101,14 @@ void ClassListDialog::CreateControls()
// filters
wxBoxSizer* filters = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(filters, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
- filters->Add(new wxCheckBox(this, ID_SHOW_ONLY_XTI,
+ filters->Add(new wxCheckBox(this, ID_SHOW_ONLY_XTI,
"Show only classes with eXtended infos"));
filters->AddSpacer(10);
filters->Add(new wxCheckBox(this, ID_SHOW_PROPERTIES_RECURSIVELY,
"Show properties of parent classes"));
// show how many have we filtered out
- m_pClassCountText = new wxStaticText( this, wxID_STATIC,
+ m_pClassCountText = new wxStaticText( this, wxID_STATIC,
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
wxDefaultPosition, wxDefaultSize, 0 );
m_pClassCountText->SetFont(wxFontInfo(8).Family(wxFONTFAMILY_SWISS).Bold());
@@ -182,7 +182,7 @@ int ClassListDialog::AddClassesWithParent(const wxClassInfo *parent, const wxTre
wxString(ci->GetBaseClassName2()) == parent->GetClassName())
{
wxTreeItemId child = m_pParentTreeCtrl->AppendItem(id, ci->GetClassName());
-
+
// update the name of this child with the count of the children classes
int ret = AddClassesWithParent(ci, child);
m_pParentTreeCtrl->SetItemText(child,
@@ -190,7 +190,7 @@ int ClassListDialog::AddClassesWithParent(const wxClassInfo *parent, const wxTre
wxString::Format(" [%d]", ret));
count += ret+1;
}
-
+
ci = ci->GetNext();
}
@@ -281,7 +281,7 @@ void ClassListDialog::UpdateFilterText()
// how many are we showing
m_pClassCountText->SetLabel(
wxString::Format(
- "Showing %d classes on a total of %d registered classes in wxXTI.",
+ "Showing %d classes on a total of %d registered classes in wxXTI.",
m_nCount, m_nTotalCount));
}
@@ -386,7 +386,7 @@ wxString DumpPropertyAccessor(const wxPropertyAccessor *acc, int indent)
if (!acc)
return ind + "no property accessors";
-
+
if (acc->HasSetter())
infostr << ind << "setter name: " << acc->GetSetterName();
if (acc->HasCollectionGetter())
@@ -442,7 +442,7 @@ wxString DumpHandlerInfo(const wxHandlerInfo *phdlr, int indent)
if (!phdlr)
return ind + "none";
- infostr << ind << "event class: " <<
+ infostr << ind << "event class: " <<
(phdlr->GetEventClassInfo() ? phdlr->GetEventClassInfo()->GetClassName() : "none");
return infostr;
diff --git a/samples/xti/classlist.h b/samples/xti/classlist.h
index 56c97203bc..2874ccfb18 100644
--- a/samples/xti/classlist.h
+++ b/samples/xti/classlist.h
@@ -2,7 +2,7 @@
// Name: classlist.h
// Purpose: ClassListDialog definition
// Author: Francesco Montorsi
-// Modified by:
+// Modified by:
// Created: 03/06/2007 14:49:55
// Copyright: (c) 2007 Francesco Montorsi
// Licence: wxWindows licence
@@ -42,7 +42,7 @@
// ----------------------------------------------------------------------------
class ClassListDialog: public wxDialog
-{
+{
// we explicitly don't want to use the following macro:
// wxDECLARE_DYNAMIC_CLASS( ClassListDialog );
// as otherwise the ClassListDialog class would appear in the list
@@ -52,17 +52,17 @@ class ClassListDialog: public wxDialog
public:
// Constructors
ClassListDialog();
- ClassListDialog( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME,
- const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE,
- const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION,
- const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE,
+ ClassListDialog( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME,
+ const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE,
+ const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION,
+ const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE,
long style = SYMBOL_CLASSLISTDIALOG_STYLE );
// Creation
- bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME,
- const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE,
- const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION,
- const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE,
+ bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME,
+ const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE,
+ const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION,
+ const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE,
long style = SYMBOL_CLASSLISTDIALOG_STYLE );
// Destructor
diff --git a/samples/xti/codereadercallback.cpp b/samples/xti/codereadercallback.cpp
index 9ed6e423f4..658301167a 100644
--- a/samples/xti/codereadercallback.cpp
+++ b/samples/xti/codereadercallback.cpp
@@ -113,7 +113,7 @@ class WXDLLIMPEXP_BASE wxObjectConstructorWriter: public wxObjectWriterFunctor
{
public:
wxObjectConstructorWriter(const wxClassTypeInfo* cti,
- wxObjectCodeReaderCallback* writer) :
+ wxObjectCodeReaderCallback* writer) :
m_cti(cti),m_writer(writer)
{}
@@ -194,20 +194,20 @@ void wxObjectCodeReaderCallback::CreateObject(int objectID,
)
{
int i;
- m_source += ( wxString::Format( "\t%s->Create(",
+ m_source += ( wxString::Format( "\t%s->Create(",
m_data->GetObjectName(objectID) ) );
for (i = 0; i < paramCount; i++)
{
if ( objectIDValues[i] != wxInvalidObjectID )
{
- wxString str =
- wxString::Format( "%s",
+ wxString str =
+ wxString::Format( "%s",
m_data->GetObjectName( objectIDValues[i] ) );
m_source += ( str );
}
else
{
- m_source += (
+ m_source += (
wxString::Format( "%s", ValueAsCode(params[i]) ) );
}
if (i < paramCount - 1)
@@ -236,11 +236,11 @@ void wxObjectCodeReaderCallback::ConstructObject(int objectID,
for (i = 0; i < paramCount; i++)
{
if ( objectIDValues[i] != wxInvalidObjectID )
- m_source += ( wxString::Format( "%s",
+ m_source += ( wxString::Format( "%s",
m_data->GetObjectName( objectIDValues[i] ) ) );
else
{
- m_source += (
+ m_source += (
wxString::Format( "%s", ValueAsCode(params[i]) ) );
}
if (i < paramCount - 1)
@@ -308,7 +308,7 @@ void wxObjectCodeReaderCallback::SetConnect(int eventSourceObjectID,
wxString ehsource = m_data->GetObjectName( eventSourceObjectID );
wxString ehsink = m_data->GetObjectName(eventSinkObjectID);
wxString ehsinkClass = eventSinkClassInfo->GetClassName();
- const wxEventSourceTypeInfo *delegateTypeInfo =
+ const wxEventSourceTypeInfo *delegateTypeInfo =
wx_dynamic_cast(const wxEventSourceTypeInfo*, delegateInfo->GetTypeInfo());
if ( delegateTypeInfo )
{
@@ -316,7 +316,7 @@ void wxObjectCodeReaderCallback::SetConnect(int eventSourceObjectID,
wxString handlerName = handlerInfo->GetName();
wxString code =
- wxString::Format(
+ wxString::Format(
"\t%s->Connect( %s->GetId(), %d, "
"(wxObjectEventFunction)(wxEventFunction) & %s::%s, NULL, %s );",
ehsource, ehsource, eventType, ehsinkClass,
diff --git a/samples/xti/codereadercallback.h b/samples/xti/codereadercallback.h
index d6050a8662..0763d0c5c8 100644
--- a/samples/xti/codereadercallback.h
+++ b/samples/xti/codereadercallback.h
@@ -39,8 +39,8 @@ public:
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
wxStringToAnyHashMap &metadata);
- // initialize the already allocated object having the ID objectID
- // with the Create method creation parameters which are objects are
+ // initialize the already allocated object having the ID objectID
+ // with the Create method creation parameters which are objects are
// having their Ids passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void CreateObject(int objectID,
@@ -52,9 +52,9 @@ public:
wxStringToAnyHashMap &metadata
);
- // construct the new object on the heap, that object will have the
- // passed in ID (for objects that don't support allocate-create type
- // of creation) creation parameters which are objects are having their
+ // construct the new object on the heap, that object will have the
+ // passed in ID (for objects that don't support allocate-create type
+ // of creation) creation parameters which are objects are having their
// Ids passed in objectIDValues having objectId <> wxInvalidObjectID
virtual void ConstructObject(int objectID,
@@ -65,8 +65,8 @@ public:
const wxClassInfo **objectClassInfos,
wxStringToAnyHashMap &metadata);
- // destroy the heap-allocated object having the ID objectID, this may
- // be used if an object is embedded in another object and set via value
+ // destroy the heap-allocated object having the ID objectID, this may
+ // be used if an object is embedded in another object and set via value
// semantics, so the intermediate object can be destroyed after safely
virtual void DestroyObject(int objectID, wxClassInfo *classInfo);
diff --git a/samples/xti/xti.bkl b/samples/xti/xti.bkl
index 136616225c..e3d8f23398 100644
--- a/samples/xti/xti.bkl
+++ b/samples/xti/xti.bkl
@@ -6,7 +6,7 @@
xti.cpp classlist.cpp codereadercallback.cpp
-
+
core
xml
base
diff --git a/samples/xti/xti.cpp b/samples/xti/xti.cpp
index a3faa0bb3e..99094fbf47 100644
--- a/samples/xti/xti.cpp
+++ b/samples/xti/xti.cpp
@@ -170,14 +170,14 @@ MyFrame::MyFrame(const wxString& title)
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(Minimal_About, "&About\tF1", "Show about dialog");
- fileMenu->Append(Minimal_Persist, "Persist a wxFrame to XML...",
+ fileMenu->Append(Minimal_Persist, "Persist a wxFrame to XML...",
"Creates a wxFrame using wxXTI and saves its description as XML");
- fileMenu->Append(Minimal_Depersist, "Depersist XML file...",
+ fileMenu->Append(Minimal_Depersist, "Depersist XML file...",
"Loads the description of wxFrame from XML");
- fileMenu->Append(Minimal_GenerateCode, "Generate code for a wxFrame saved to XML...",
+ fileMenu->Append(Minimal_GenerateCode, "Generate code for a wxFrame saved to XML...",
"Generates the C++ code which belong to a persisted wxFrame");
fileMenu->AppendSeparator();
- fileMenu->Append(Minimal_DumpClasses, "Dump registered classes...",
+ fileMenu->Append(Minimal_DumpClasses, "Dump registered classes...",
"Dumps the description of all wxWidgets classes registered in XTI");
fileMenu->AppendSeparator();
fileMenu->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program");
@@ -204,8 +204,8 @@ MyFrame::MyFrame(const wxString& title)
// XTI sample code
// ----------------------------------------------------------------------------
-// this is the kind of source code that would end up being generated by a
-// designer corresponding to the information we are setting up via RTTI
+// this is the kind of source code that would end up being generated by a
+// designer corresponding to the information we are setting up via RTTI
// in the CreateFrameRTTI function:
//
// class MyXTIFrame : public wxFrame
@@ -271,17 +271,17 @@ public:
}
virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer),
- const wxObject *object,
- const wxClassInfo* WXUNUSED(classInfo),
- const wxPropertyInfo *propInfo,
- const wxObject *&eventSink,
- const wxHandlerInfo* &handlerInfo )
+ const wxObject *object,
+ const wxClassInfo* WXUNUSED(classInfo),
+ const wxPropertyInfo *propInfo,
+ const wxObject *&eventSink,
+ const wxHandlerInfo* &handlerInfo )
{
- // this approach would be used if the handler would not
- // be connected really in the designer, so we have to supply
+ // this approach would be used if the handler would not
+ // be connected really in the designer, so we have to supply
// the information
const wxObject* but = wxAnyGetAsObjectPtr( m_frame->GetProperty("Button") );
- if ( object == but &&
+ if ( object == but &&
propInfo == wxCLASSINFO( wxButton )->FindPropertyInfo("OnClick") )
{
eventSink = m_frame;
@@ -296,7 +296,7 @@ private:
wxDynamicObject *m_frame;
};
-// sometimes linkers (at least MSVC and GCC ones) optimize the final EXE
+// sometimes linkers (at least MSVC and GCC ones) optimize the final EXE
// even in debug mode pruning the object files which he "thinks" are useless;
// thus the classes defined in those files won't be available in the XTI
// table and the program will fail to allocate them.
@@ -314,17 +314,17 @@ void RegisterFrameRTTI()
{
// set up the RTTI info for a class (MyXTIFrame) which
// is not defined anywhere in this program
- wxDynamicClassInfo *dyninfo =
+ wxDynamicClassInfo *dyninfo =
wx_dynamic_cast( wxDynamicClassInfo *, wxClassInfo::FindClass("MyXTIFrame"));
if ( dyninfo == NULL )
{
dyninfo = new wxDynamicClassInfo("myxtiframe.h",
- "MyXTIFrame",
+ "MyXTIFrame",
CLASSINFO(wxFrame) );
// this class has a property named "Button" and the relative handler:
dyninfo->AddProperty("Button", wxGetTypeInfo((wxButton**) NULL));
- dyninfo->AddHandler("ButtonClickHandler",
+ dyninfo->AddHandler("ButtonClickHandler",
NULL /* no instance of the handler method */, CLASSINFO( wxEvent ) );
}
}
@@ -339,7 +339,7 @@ wxDynamicObject* CreateFrameRTTI()
wxFrame* frame;
wxClassInfo *info = wxClassInfo::FindClass("MyXTIFrame");
wxASSERT( info );
- wxDynamicObject* frameWrapper =
+ wxDynamicObject* frameWrapper =
wx_dynamic_cast(wxDynamicObject*, info->CreateObject() );
Params[0] = wxAny((wxWindow*)(NULL));
Params[1] = wxAny(wxWindowID(baseID++));
@@ -532,7 +532,7 @@ bool SaveFrameRTTI(const wxString &testFileName, wxDynamicObject *frame)
{
// setup the XML document
wxXmlDocument xml;
- wxXmlNode *root = new wxXmlNode(wxXML_ELEMENT_NODE,
+ wxXmlNode *root = new wxXmlNode(wxXML_ELEMENT_NODE,
"TestXTI", "This is the content");
xml.SetRoot(root);
@@ -542,7 +542,7 @@ bool SaveFrameRTTI(const wxString &testFileName, wxDynamicObject *frame)
// write the given wxObject into the XML document
wxStringToAnyHashMap empty;
- writer.WriteObject( frame, frame->GetClassInfo(), &persister,
+ writer.WriteObject( frame, frame->GetClassInfo(), &persister,
wxString("myTestFrame"), empty );
return xml.Save(testFileName);
@@ -568,8 +568,8 @@ wxDynamicObject* LoadFrameRTTI(const wxString &fileName)
bool GenerateFrameRTTICode(const wxString &inFileName, const wxString &outFileName)
{
- // is loading the streamed out component from xml and writing code that
- // will create the same component
+ // is loading the streamed out component from xml and writing code that
+ // will create the same component
wxFFileOutputStream fos( outFileName );
wxTextOutputStream tos( fos );
@@ -585,7 +585,7 @@ bool GenerateFrameRTTICode(const wxString &inFileName, const wxString &outFileNa
return false;
// read the XML file using the wxObjectCodeReaderCallback
-
+
wxString headerincludes;
wxString sourcecode;
wxObjectCodeReaderCallback Callbacks(headerincludes,sourcecode);
@@ -595,7 +595,7 @@ bool GenerateFrameRTTICode(const wxString &inFileName, const wxString &outFileNa
Reader.ReadObject( wxString("myTestFrame"), &Callbacks );
// header preamble
- tos <<
+ tos <<
"#include \"wx/wxprec.h\" \n#ifdef __BORLANDC__\n#pragma hdrstop\n#endif\n#ifndef WX_PRECOMP\n#include \"wx/wx.h\" \n#endif\n\n";
// add object includes
tos.WriteString( headerincludes );
@@ -629,7 +629,7 @@ void MyFrame::OnPersist(wxCommandEvent& WXUNUSED(event))
// ask the user where to save it
wxFileDialog dlg(this, "Where should the frame be saved?",
- wxEmptyString, "test.xml", "XML files (*.xml)|*.xml",
+ wxEmptyString, "test.xml", "XML files (*.xml)|*.xml",
wxFD_SAVE);
if (dlg.ShowModal() == wxID_CANCEL)
return;
@@ -649,7 +649,7 @@ void MyFrame::OnDepersist(wxCommandEvent& WXUNUSED(event))
{
// ask the user which file to load
wxFileDialog dlg(this, "Which file contains the frame to depersist?",
- wxEmptyString, "test.xml", "XML files (*.xml)|*.xml",
+ wxEmptyString, "test.xml", "XML files (*.xml)|*.xml",
wxFD_OPEN);
if (dlg.ShowModal() == wxID_CANCEL)
return;
@@ -679,14 +679,14 @@ void MyFrame::OnGenerateCode(wxCommandEvent& WXUNUSED(event))
{
// ask the user which file to load
wxFileDialog dlg(this, "Which file contains the frame to work on?",
- wxEmptyString, "test.xml", "XML files (*.xml)|*.xml",
+ wxEmptyString, "test.xml", "XML files (*.xml)|*.xml",
wxFD_OPEN);
if (dlg.ShowModal() == wxID_CANCEL)
return;
// ask the user which file to load
wxFileDialog dlg2(this, "Where should the C++ code be saved?",
- wxEmptyString, "test.cpp", "Source files (*.cpp)|*.cpp",
+ wxEmptyString, "test.cpp", "Source files (*.cpp)|*.cpp",
wxFD_SAVE);
if (dlg2.ShowModal() == wxID_CANCEL)
return;
@@ -704,13 +704,13 @@ void MyFrame::OnGenerateCode(wxCommandEvent& WXUNUSED(event))
wxStringOutputStream str;
f.Read(str);
- wxDialog dlg(this, wxID_ANY, "Generated code",
+ wxDialog dlg(this, wxID_ANY, "Generated code",
wxDefaultPosition, wxDefaultSize,
wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE);
wxPanel *panel = new wxPanel(&dlg);
wxSizer *sz = new wxBoxSizer(wxVERTICAL);
- sz->Add(new wxTextCtrl(panel, wxID_ANY, str.GetString(),
- wxDefaultPosition, wxDefaultSize,
+ sz->Add(new wxTextCtrl(panel, wxID_ANY, str.GetString(),
+ wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE|wxTE_READONLY|wxTE_DONTWRAP),
1, wxGROW|wxALL, 5);
sz->Add(new wxButton(panel, wxID_OK), 0, wxALIGN_RIGHT|wxALL, 5);
diff --git a/setup.h.in b/setup.h.in
index 9f703405c1..b33699b9c9 100644
--- a/setup.h.in
+++ b/setup.h.in
@@ -714,6 +714,8 @@
#define wxUSE_INICONF 0
+#define wxUSE_WINSOCK2 0
+
#define wxUSE_DATEPICKCTRL_GENERIC 0
diff --git a/setup.h_vms b/setup.h_vms
index 47a90bd472..3f1e13a045 100644
--- a/setup.h_vms
+++ b/setup.h_vms
@@ -3,7 +3,7 @@
* Template for the set.h file for VMS *
* Created from setup.h_in *
* Author : J.Jansen (joukj@hrem.nano.tudelft.nl) *
- * Date : 30 August 2018 *
+ * Date : 31 January 2019 *
* *
*****************************************************************************/
@@ -770,6 +770,9 @@ typedef pid_t GPid;
#define wxUSE_INICONF 0
+#define wxUSE_WINSOCK2 0
+
+
#define wxUSE_DATEPICKCTRL_GENERIC 0
#define wxUSE_TIMEPICKCTRL_GENERIC 0
diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp
index f31bb456a9..1e7a55062f 100644
--- a/src/aui/auibar.cpp
+++ b/src/aui/auibar.cpp
@@ -162,10 +162,7 @@ void wxAuiGenericToolBarArt::UpdateColoursFromSystem()
{
m_baseColour = GetBaseColor();
m_highlightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
- wxColor darker1Colour = m_baseColour.ChangeLightness(85);
- wxColor darker2Colour = m_baseColour.ChangeLightness(75);
wxColor darker3Colour = m_baseColour.ChangeLightness(60);
- wxColor darker4Colour = m_baseColour.ChangeLightness(50);
wxColor darker5Colour = m_baseColour.ChangeLightness(40);
int pen_width = wxWindow::FromDIP(1, NULL);
diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp
index 9bfe2a7589..a6081dd787 100644
--- a/src/aui/auibook.cpp
+++ b/src/aui/auibook.cpp
@@ -26,6 +26,7 @@
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
+ #include "wx/frame.h"
#endif
#include "wx/aui/tabmdi.h"
@@ -413,6 +414,9 @@ void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd)
if (!raw_dc || !raw_dc->IsOk())
return;
+ if (m_rect.IsEmpty())
+ return;
+
wxMemoryDC dc;
// use the same layout direction as the window DC uses to ensure that the
@@ -787,11 +791,7 @@ bool wxAuiTabContainer::IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWin
if (offset == 0)
offset += m_art->GetIndentSize();
- wxRect active_rect;
-
wxRect rect = m_rect;
- rect.y = 0;
- rect.height = m_rect.height;
// See if the given page is visible at the given tab offset (effectively scroll position)
for (i = tabOffset; i < page_count; ++i)
@@ -799,7 +799,6 @@ bool wxAuiTabContainer::IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWin
wxAuiNotebookPage& page = m_pages.Item(i);
wxAuiTabContainerButton& tab_button = m_tabCloseButtons.Item(i);
- rect.x = offset;
rect.width = m_rect.width - right_buttons_width - offset - wnd->FromDIP(2);
if (rect.width <= 0)
@@ -3358,10 +3357,37 @@ void wxAuiNotebook::SetPageSize (const wxSize& WXUNUSED(size))
wxFAIL_MSG("Not implemented for wxAuiNotebook");
}
-int wxAuiNotebook::HitTest (const wxPoint& WXUNUSED(pt), long* WXUNUSED(flags)) const
+int wxAuiNotebook::HitTest (const wxPoint &pt, long *flags) const
{
- wxFAIL_MSG("Not implemented for wxAuiNotebook");
- return wxNOT_FOUND;
+ wxWindow *w = NULL;
+ long position = wxBK_HITTEST_NOWHERE;
+ const wxAuiPaneInfoArray& all_panes = const_cast(m_mgr).GetAllPanes();
+ const size_t pane_count = all_panes.GetCount();
+ for (size_t i = 0; i < pane_count; ++i)
+ {
+ if (all_panes.Item(i).name == wxT("dummy"))
+ continue;
+
+ wxTabFrame* tabframe = (wxTabFrame*) all_panes.Item(i).window;
+ if (tabframe->m_tab_rect.Contains(pt))
+ {
+ wxPoint tabpos = tabframe->m_tabs->ScreenToClient(ClientToScreen(pt));
+ if (tabframe->m_tabs->TabHitTest(tabpos.x, tabpos.y, &w))
+ position = wxBK_HITTEST_ONITEM;
+ break;
+ }
+ else if (tabframe->m_rect.Contains(pt))
+ {
+ w = tabframe->m_tabs->GetWindowFromIdx(tabframe->m_tabs->GetActivePage());
+ if (w)
+ position = wxBK_HITTEST_ONPAGE;
+ break;
+ }
+ }
+
+ if (flags)
+ *flags = position;
+ return w ? GetPageIndex(w) : wxNOT_FOUND;
}
int wxAuiNotebook::GetPageImage(size_t WXUNUSED(n)) const
@@ -3380,10 +3406,10 @@ int wxAuiNotebook::ChangeSelection(size_t n)
return DoModifySelection(n, false);
}
-bool wxAuiNotebook::AddPage(wxWindow *page, const wxString &text, bool select,
+bool wxAuiNotebook::AddPage(wxWindow *page, const wxString &text, bool select,
int imageId)
{
- if(HasImageList())
+ if(HasImageList())
{
return AddPage(page, text, select, GetImageList()->GetBitmap(imageId));
}
@@ -3403,13 +3429,13 @@ bool wxAuiNotebook::DeleteAllPages()
return true;
}
-bool wxAuiNotebook::InsertPage(size_t index, wxWindow *page,
- const wxString &text, bool select,
+bool wxAuiNotebook::InsertPage(size_t index, wxWindow *page,
+ const wxString &text, bool select,
int imageId)
{
if(HasImageList())
{
- return InsertPage(index, page, text, select,
+ return InsertPage(index, page, text, select,
GetImageList()->GetBitmap(imageId));
}
else
@@ -3418,6 +3444,163 @@ bool wxAuiNotebook::InsertPage(size_t index, wxWindow *page,
}
}
+namespace
+{
+
+// Helper class to calculate the best size of a wxAuiNotebook
+class wxAuiLayoutObject
+{
+public:
+ enum
+ {
+ DockDir_Center,
+ DockDir_Left,
+ DockDir_Right,
+ DockDir_Vertical, // Merge elements from here vertically
+ DockDir_Top,
+ DockDir_Bottom,
+ DockDir_None
+ };
+
+ wxAuiLayoutObject(const wxSize &size, const wxAuiPaneInfo &pInfo)
+ : m_size(size)
+ {
+ m_pInfo = &pInfo;
+ /*
+ To speed up the sorting of the panes, the direction is mapped to a
+ useful increasing value. This avoids complicated comparison of the
+ enum values during the sort. The size calculation is done from the
+ inner to the outermost direction. Therefore CENTER < LEFT/RIGHT <
+ TOP/BOTTOM (It doesn't matter it LEFT or RIGHT is done first, as
+ both extend the best size horizontally; the same applies for
+ TOP/BOTTOM in vertical direction)
+ */
+ switch ( pInfo.dock_direction )
+ {
+ case wxAUI_DOCK_CENTER: m_dir = DockDir_Center; break;
+ case wxAUI_DOCK_LEFT: m_dir = DockDir_Left; break;
+ case wxAUI_DOCK_RIGHT: m_dir = DockDir_Right; break;
+ case wxAUI_DOCK_TOP: m_dir = DockDir_Top; break;
+ case wxAUI_DOCK_BOTTOM: m_dir = DockDir_Bottom; break;
+ default: m_dir = DockDir_None;
+ }
+ }
+ void MergeLayout(const wxAuiLayoutObject &lo2)
+ {
+ if ( this == &lo2 )
+ return;
+
+ bool mergeHorizontal;
+ if ( m_pInfo->dock_layer != lo2.m_pInfo->dock_layer || m_dir != lo2.m_dir )
+ mergeHorizontal = lo2.m_dir < DockDir_Vertical;
+ else if ( m_pInfo->dock_row != lo2.m_pInfo->dock_row )
+ mergeHorizontal = true;
+ else
+ mergeHorizontal = lo2.m_dir >= DockDir_Vertical;
+
+ if ( mergeHorizontal )
+ {
+ m_size.x += lo2.m_size.x;
+ if ( lo2.m_size.y > m_size.y )
+ m_size.y = lo2.m_size.y;
+ }
+ else
+ {
+ if ( lo2.m_size.x > m_size.x )
+ m_size.x = lo2.m_size.x;
+ m_size.y += lo2.m_size.y;
+ }
+ }
+
+ wxSize m_size;
+ const wxAuiPaneInfo *m_pInfo;
+ unsigned char m_dir;
+
+ /*
+ As the caulculation is done from the inner to the outermost pane, the
+ panes are sorted in the following order: layer, direction, row,
+ position.
+ */
+ bool operator<(const wxAuiLayoutObject& lo2) const
+ {
+ int diff = m_pInfo->dock_layer - lo2.m_pInfo->dock_layer;
+ if ( diff )
+ return diff < 0;
+ diff = m_dir - lo2.m_dir;
+ if ( diff )
+ return diff < 0;
+ diff = m_pInfo->dock_row - lo2.m_pInfo->dock_row;
+ if ( diff )
+ return diff < 0;
+ return m_pInfo->dock_pos < lo2.m_pInfo->dock_pos;
+ }
+};
+
+} // anonymous namespace
+
+wxSize wxAuiNotebook::DoGetBestSize() const
+{
+ /*
+ The best size of the wxAuiNotebook is a combination of all panes inside
+ the object. To be able to efficiently calculate the dimensions (i.e.
+ without iterating over the panes multiple times) the panes need to be
+ processed in a specific order. Therefore we need to collect them in the
+ following variable which is sorted later on.
+ */
+ wxVector layouts;
+ const wxAuiPaneInfoArray& all_panes =
+ const_cast(m_mgr).GetAllPanes();
+ const size_t pane_count = all_panes.GetCount();
+ const int tabHeight = GetTabCtrlHeight();
+ for ( size_t n = 0; n < pane_count; ++n )
+ {
+ const wxAuiPaneInfo &pInfo = all_panes[n];
+ if ( pInfo.name == wxT("dummy") || pInfo.IsFloating() )
+ continue;
+
+ const wxTabFrame* tabframe = (wxTabFrame*) all_panes.Item(n).window;
+ const wxAuiNotebookPageArray &pages = tabframe->m_tabs->GetPages();
+
+ wxSize bestPageSize;
+ for ( size_t pIdx = 0; pIdx < pages.GetCount(); pIdx++ )
+ bestPageSize.IncTo(pages[pIdx].window->GetBestSize());
+
+ bestPageSize.y += tabHeight;
+ // Store the current pane with its largest window dimensions
+ layouts.push_back(wxAuiLayoutObject(bestPageSize, pInfo));
+ }
+
+ if ( layouts.empty() )
+ return wxSize(0, 0);
+
+ wxVectorSort(layouts);
+
+ /*
+ The sizes of the panes are merged here. As the center pane is always at
+ position 0 all sizes are merged there. As panes can be stacked using
+ the dock_pos property, different positions are merged at the first
+ (i.e. dock_pos = 0) element before being merged with the center pane.
+ */
+ size_t pos = 0;
+ for ( size_t n = 1; n < layouts.size(); n++ )
+ {
+ if ( layouts[n].m_pInfo->dock_layer == layouts[pos].m_pInfo->dock_layer &&
+ layouts[n].m_dir == layouts[pos].m_dir &&
+ layouts[n].m_pInfo->dock_row == layouts[pos].m_pInfo->dock_row )
+ {
+ layouts[pos].MergeLayout(layouts[n]);
+ }
+ else
+ {
+ layouts[0].MergeLayout(layouts[pos]);
+ pos = n;
+ }
+ }
+ layouts[0].MergeLayout(layouts[pos]);
+
+ return layouts[0].m_size;
+}
+
int wxAuiNotebook::DoModifySelection(size_t n, bool events)
{
wxWindow* wnd = m_tabs.GetWindowFromIdx(n);
diff --git a/src/aui/barartmsw.cpp b/src/aui/barartmsw.cpp
index b479bc31a2..ee1b4b10e4 100644
--- a/src/aui/barartmsw.cpp
+++ b/src/aui/barartmsw.cpp
@@ -13,6 +13,8 @@
#pragma hdrstop
#endif
+#if wxUSE_AUI && wxUSE_UXTHEME
+
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
#include "wx/dcclient.h"
@@ -25,8 +27,6 @@
#include "wx/msw/uxtheme.h"
#include "wx/msw/private.h"
-#if wxUSE_AUI
-
wxAuiMSWToolBarArt::wxAuiMSWToolBarArt()
{
if ( wxUxThemeIsActive() )
@@ -470,4 +470,4 @@ int wxAuiMSWToolBarArt::ShowDropDown(wxWindow* wnd,
return wxAuiGenericToolBarArt::ShowDropDown(wnd, items);
}
-#endif // wxUSE_AUI
+#endif // wxUSE_AUI && wxUSE_UXTHEME
diff --git a/src/aui/descrip.mms b/src/aui/descrip.mms
index 9eb2dff9e7..0361253ab8 100644
--- a/src/aui/descrip.mms
+++ b/src/aui/descrip.mms
@@ -48,7 +48,7 @@ OBJECTS = dockart.obj,floatpane.obj,framemanager.obj,auibook.obj,tabmdi.obj,\
SOURCES = dockart.cpp floatpane.cpp framemanager.cpp auibook.cpp tabmdi.cpp \
auibar.cpp tabart.cpp
-
+
all : $(SOURCES)
$(MMS)$(MMSQUALIFIERS) $(OBJECTS)
.ifdef __WXMOTIF__
diff --git a/src/aui/dockart.cpp b/src/aui/dockart.cpp
index 47f6fd0d63..3e38798baa 100644
--- a/src/aui/dockart.cpp
+++ b/src/aui/dockart.cpp
@@ -751,10 +751,7 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc,
wxRect rect = _rect;
- int old_y = rect.y;
rect.y = rect.y + (rect.height/2) - (bmp.GetScaledHeight()/2);
- rect.height = old_y + rect.height - rect.y - 1;
-
if (button_state == wxAUI_BUTTON_STATE_PRESSED)
{
diff --git a/src/aui/floatpane.cpp b/src/aui/floatpane.cpp
index 73cf587436..80dee278c7 100644
--- a/src/aui/floatpane.cpp
+++ b/src/aui/floatpane.cpp
@@ -52,8 +52,8 @@ wxAuiFloatingFrame::wxAuiFloatingFrame(wxWindow* parent,
(pane.HasMaximizeButton()?wxMAXIMIZE_BOX:0) |
(pane.IsFixed()?0:wxRESIZE_BORDER)
)
+ , m_ownerMgr(owner_mgr)
{
- m_ownerMgr = owner_mgr;
m_moving = false;
m_mgr.SetManagedWindow(this);
m_solidDrag = true;
diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp
index 206a114dd8..bf97bfa093 100644
--- a/src/aui/framemanager.cpp
+++ b/src/aui/framemanager.cpp
@@ -612,7 +612,6 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
{
m_action = actionNone;
m_actionWindow = NULL;
- m_lastMouseMove = wxPoint();
m_hoverButton = NULL;
m_art = new wxAuiDefaultDockArt;
m_hintWnd = NULL;
@@ -1762,17 +1761,14 @@ void wxAuiManager::GetPanePositionsAndSizes(wxAuiDockInfo& dock,
if (action_pane == -1)
return;
- offset = 0;
for (pane_i = action_pane-1; pane_i >= 0; --pane_i)
{
int amount = positions[pane_i+1] - (positions[pane_i] + sizes[pane_i]);
if (amount >= 0)
- offset += amount;
+ ;
else
positions[pane_i] -= -amount;
-
- offset += sizes[pane_i];
}
// if the dock mode is fixed, make sure none of the panes
diff --git a/src/aui/tabart.cpp b/src/aui/tabart.cpp
index 25acae3f78..4258a143fe 100644
--- a/src/aui/tabart.cpp
+++ b/src/aui/tabart.cpp
@@ -155,30 +155,25 @@ static const unsigned char list_bits[] = {
// -- wxAuiGenericTabArt class implementation --
wxAuiGenericTabArt::wxAuiGenericTabArt()
+ : m_normalFont(*wxNORMAL_FONT)
+ , m_selectedFont(m_normalFont)
+ , m_activeCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK))
+ , m_disabledCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)))
+ , m_activeLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK))
+ , m_disabledLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)))
+ , m_activeRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK))
+ , m_disabledRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)))
+ , m_activeWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK))
+ , m_disabledWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)))
{
- m_normalFont = *wxNORMAL_FONT;
- m_selectedFont = *wxNORMAL_FONT;
m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
m_measuringFont = m_selectedFont;
m_fixedTabWidth = wxWindow::FromDIP(100, NULL);
m_tabCtrlHeight = 0;
+ m_flags = 0;
UpdateColoursFromSystem();
-
- m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK);
- m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128));
-
- m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK);
- m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128));
-
- m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK);
- m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128));
-
- m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK);
- m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128));
-
- m_flags = 0;
}
wxAuiGenericTabArt::~wxAuiGenericTabArt()
@@ -892,9 +887,17 @@ void wxAuiGenericTabArt::SetActiveColour(const wxColour& colour)
// -- wxAuiSimpleTabArt class implementation --
wxAuiSimpleTabArt::wxAuiSimpleTabArt()
+ : m_normalFont(*wxNORMAL_FONT)
+ , m_selectedFont(m_normalFont)
+ , m_activeCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK))
+ , m_disabledCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)))
+ , m_activeLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK))
+ , m_disabledLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)))
+ , m_activeRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK))
+ , m_disabledRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)))
+ , m_activeWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK))
+ , m_disabledWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)))
{
- m_normalFont = *wxNORMAL_FONT;
- m_selectedFont = *wxNORMAL_FONT;
m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
m_measuringFont = m_selectedFont;
@@ -913,17 +916,6 @@ wxAuiSimpleTabArt::wxAuiSimpleTabArt()
m_selectedBkBrush = wxBrush(selectedtabColour);
m_selectedBkPen = wxPen(selectedtabColour);
- m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK);
- m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128));
-
- m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK);
- m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128));
-
- m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK);
- m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128));
-
- m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK);
- m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128));
}
wxAuiSimpleTabArt::~wxAuiSimpleTabArt()
diff --git a/src/aui/tabartmsw.cpp b/src/aui/tabartmsw.cpp
index 9f17fa27fe..de069d1f4d 100644
--- a/src/aui/tabartmsw.cpp
+++ b/src/aui/tabartmsw.cpp
@@ -13,6 +13,8 @@
#pragma hdrstop
#endif
+#if wxUSE_AUI && wxUSE_UXTHEME && !defined(__WXUNIVERSAL__)
+
#ifndef WX_PRECOMP
#include "wx/dc.h"
#endif
@@ -23,8 +25,6 @@
#include "wx/msw/private.h"
#include "wx/renderer.h"
-#if wxUSE_AUI && !defined(__WXUNIVERSAL__)
-
wxAuiMSWTabArt::wxAuiMSWTabArt()
{
m_closeBtnSize = wxDefaultSize;
@@ -469,4 +469,4 @@ bool wxAuiMSWTabArt::IsThemed() const
}
-#endif // wxUSE_AUI
+#endif // wxUSE_AUI && wxUSE_UXTHEME && !defined(__WXUNIVERSAL__)
diff --git a/src/common/arrstr.cpp b/src/common/arrstr.cpp
index 721a63f50b..e78f8259b5 100644
--- a/src/common/arrstr.cpp
+++ b/src/common/arrstr.cpp
@@ -59,6 +59,24 @@ wxArrayString::wxArrayString(size_t sz, const wxString* a)
#include "wx/arrstr.h"
+#if __cplusplus >= 201103L
+
+int wxArrayString::Index(const wxString& str, bool bCase, bool WXUNUSED(bFromEnd)) const
+{
+ int n = 0;
+ for ( const auto& s: *this )
+ {
+ if ( s.IsSameAs(str, bCase) )
+ return n;
+
+ ++n;
+ }
+
+ return wxNOT_FOUND;
+}
+
+#else // C++98 version
+
#include "wx/beforestd.h"
#include
#include "wx/afterstd.h"
@@ -130,9 +148,20 @@ wxStringCompareLess wxStringCompare(F f)
return wxStringCompareLess(f);
}
+#endif // C++11/C++98
+
void wxArrayString::Sort(CompareFunction function)
{
- std::sort(begin(), end(), wxStringCompare(function));
+ std::sort(begin(), end(),
+#if __cplusplus >= 201103L
+ [function](const wxString& s1, const wxString& s2)
+ {
+ return function(s1, s2) < 0;
+ }
+#else // C++98 version
+ wxStringCompare(function)
+#endif // C++11/C++98
+ );
}
void wxArrayString::Sort(bool reverseOrder)
@@ -155,7 +184,16 @@ int wxSortedArrayString::Index(const wxString& str,
"search parameters ignored for sorted array" );
wxSortedArrayString::const_iterator
- it = std::lower_bound(begin(), end(), str, wxStringCompare(wxStringCmp()));
+ it = std::lower_bound(begin(), end(), str,
+#if __cplusplus >= 201103L
+ [](const wxString& s1, const wxString& s2)
+ {
+ return s1 < s2;
+ }
+#else // C++98 version
+ wxStringCompare(wxStringCmp())
+#endif // C++11/C++98
+ );
if ( it == end() || str.Cmp(*it) != 0 )
return wxNOT_FOUND;
diff --git a/src/common/bmpbtncmn.cpp b/src/common/bmpbtncmn.cpp
index ff2ea043ce..039f977c54 100644
--- a/src/common/bmpbtncmn.cpp
+++ b/src/common/bmpbtncmn.cpp
@@ -103,13 +103,13 @@ GetCloseButtonBitmap(wxWindow *win,
const wxColour& colBg,
int flags = 0)
{
+ // size is physical here because it comes from wxArtProvider::GetSizeHint
wxBitmap bmp;
- bmp.CreateScaled(size.x, size.y, wxBITMAP_SCREEN_DEPTH, win->GetContentScaleFactor());
+ bmp.Create(size.x, size.y, wxBITMAP_SCREEN_DEPTH);
wxMemoryDC dc(bmp);
dc.SetBackground(colBg);
dc.Clear();
- wxRendererNative::Get().
- DrawTitleBarBitmap(win, dc, win->FromDIP(size), wxTITLEBAR_BUTTON_CLOSE, flags);
+ wxRendererNative::Get().DrawTitleBarBitmap(win, dc, size, wxTITLEBAR_BUTTON_CLOSE, flags);
return bmp;
}
diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp
index 014a57ecbb..1173d007d8 100644
--- a/src/common/cmdline.cpp
+++ b/src/common/cmdline.cpp
@@ -156,9 +156,8 @@ struct wxCmdLineOption: public wxCmdLineArgImpl
wxCmdLineParamType typ,
int fl)
: wxCmdLineArgImpl(k, shrt, lng, typ)
+ , description(desc)
{
- description = desc;
-
flags = fl;
}
@@ -395,13 +394,13 @@ wxCmdLineArgs::const_iterator wxCmdLineArgs::const_iterator::operator -- (int)
// ----------------------------------------------------------------------------
wxCmdLineParserData::wxCmdLineParserData()
+#ifdef __UNIX_LIKE__
+ : m_switchChars("-")
+#else // !Unix
+ : m_switchChars("/-")
+#endif
{
m_enableLongOptions = true;
-#ifdef __UNIX_LIKE__
- m_switchChars = wxT("-");
-#else // !Unix
- m_switchChars = wxT("/-");
-#endif
}
namespace
diff --git a/src/common/cmdproc.cpp b/src/common/cmdproc.cpp
index 09fb2c8478..e54d318815 100644
--- a/src/common/cmdproc.cpp
+++ b/src/common/cmdproc.cpp
@@ -44,9 +44,9 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject);
// ----------------------------------------------------------------------------
wxCommand::wxCommand(bool canUndoIt, const wxString& name)
+ : m_commandName(name)
{
m_canUndo = canUndoIt;
- m_commandName = name;
}
// ----------------------------------------------------------------------------
@@ -54,19 +54,15 @@ wxCommand::wxCommand(bool canUndoIt, const wxString& name)
// ----------------------------------------------------------------------------
wxCommandProcessor::wxCommandProcessor(int maxCommands)
+#if wxUSE_ACCEL
+ : m_undoAccelerator('\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString())
+ , m_redoAccelerator('\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString())
+#endif // wxUSE_ACCEL
{
m_maxNoCommands = maxCommands;
#if wxUSE_MENUS
m_commandEditMenu = NULL;
#endif // wxUSE_MENUS
-
-#if wxUSE_ACCEL
- m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString();
- m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString();
-#endif // wxUSE_ACCEL
-
- m_lastSavedCommand =
- m_currentCommand = wxList::compatibility_iterator();
}
wxCommandProcessor::~wxCommandProcessor()
diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp
index 3b10be6285..92b8ba4633 100644
--- a/src/common/cmndata.cpp
+++ b/src/common/cmndata.cpp
@@ -57,6 +57,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject);
// ----------------------------------------------------------------------------
wxPrintData::wxPrintData()
+ : m_paperSize(wxDefaultSize)
{
m_bin = wxPRINTBIN_DEFAULT;
m_media = wxPRINTMEDIA_DEFAULT;
@@ -74,7 +75,6 @@ wxPrintData::wxPrintData()
// we intentionally don't initialize paper id and size at all, like this
// the default system settings will be used for them
m_paperId = wxPAPER_NONE;
- m_paperSize = wxDefaultSize;
m_privData = NULL;
m_privDataLen = 0;
@@ -202,6 +202,7 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData)
}
wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
+ : m_printData(printData)
{
m_printFromPage = 1;
m_printToPage = 0;
@@ -221,7 +222,6 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
m_printEnablePageNumbers = true;
m_printEnablePrintToFile = true;
m_printEnableHelp = false;
- m_printData = printData;
}
wxPrintDialogData::~wxPrintDialogData()
@@ -257,8 +257,6 @@ void wxPrintDialogData::operator=(const wxPrintData& data)
wxPageSetupDialogData::wxPageSetupDialogData()
{
- m_paperSize = wxSize(0,0);
-
CalculatePaperSizeFromId();
m_minMarginTopLeft =
@@ -283,13 +281,8 @@ wxPageSetupDialogData::wxPageSetupDialogData(const wxPageSetupDialogData& dialog
}
wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData)
+ : m_printData(printData)
{
- m_paperSize = wxSize(0,0);
- m_minMarginTopLeft =
- m_minMarginBottomRight =
- m_marginTopLeft =
- m_marginBottomRight = wxPoint(0,0);
-
// Flags
m_defaultMinMargins = false;
m_enableMargins = true;
@@ -299,8 +292,6 @@ wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData)
m_enableHelp = false;
m_getDefaultInfo = false;
- m_printData = printData;
-
// The wxPrintData paper size overrides these values, unless the size cannot
// be found.
CalculatePaperSizeFromId();
diff --git a/src/common/containr.cpp b/src/common/containr.cpp
index 380a13571a..bdf72218af 100644
--- a/src/common/containr.cpp
+++ b/src/common/containr.cpp
@@ -242,7 +242,7 @@ void wxControlContainer::SetLastFocus(wxWindow *win)
// within the same group. Used by wxSetFocusToChild
// --------------------------------------------------------------------
-#if wxUSE_RADIOBTN
+#if wxUSE_RADIOBTN
wxRadioButton* wxGetPreviousButtonInGroup(wxRadioButton *btn)
{
diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp
index 3b0627b903..cb1c0fcf41 100644
--- a/src/common/ctrlcmn.cpp
+++ b/src/common/ctrlcmn.cpp
@@ -118,8 +118,12 @@ void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
bool wxControlBase::SetFont(const wxFont& font)
{
+ if ( !wxWindow::SetFont(font) )
+ return false;
+
InvalidateBestSize();
- return wxWindow::SetFont(font);
+
+ return true;
}
// wxControl-specific processing after processing the update event
diff --git a/src/common/datetimefmt.cpp b/src/common/datetimefmt.cpp
index d1454c28d1..d0fc9fcc98 100644
--- a/src/common/datetimefmt.cpp
+++ b/src/common/datetimefmt.cpp
@@ -844,7 +844,7 @@ wxDateTime::ParseRfc822Date(const wxString& date, wxString::const_iterator *end)
wxDateTime_t sec = 0;
if ( *p == ':' )
{
- p++;
+ ++p;
if ( !wxIsdigit(*p) )
return false;
@@ -1033,7 +1033,7 @@ wxDateTime::ParseFormat(const wxString& date,
// spaces in the input
while ( input != end && wxIsspace(*input) )
{
- input++;
+ ++input;
}
}
else // !space
@@ -1772,7 +1772,7 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end)
wxString::const_iterator p = pBegin;
while ( p != pEnd && wxIsspace(*p) )
- p++;
+ ++p;
// some special cases
static struct
diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp
index 8b070995d8..47000e5f1f 100644
--- a/src/common/dcbase.cpp
+++ b/src/common/dcbase.cpp
@@ -331,6 +331,7 @@ wxDCImpl::wxDCImpl( wxDC *owner )
, m_scaleX(1.0), m_scaleY(1.0)
, m_signX(1), m_signY(1)
, m_contentScaleFactor(1)
+ , m_mm_to_pix_x(0.0), m_mm_to_pix_y(0.0)
, m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
, m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0)
, m_logicalFunction(wxCOPY)
@@ -348,11 +349,6 @@ wxDCImpl::wxDCImpl( wxDC *owner )
#endif // wxUSE_PALETTE
{
m_owner = owner;
-
- m_mm_to_pix_x = (double)wxGetDisplaySize().GetWidth() /
- (double)wxGetDisplaySizeMM().GetWidth();
- m_mm_to_pix_y = (double)wxGetDisplaySize().GetHeight() /
- (double)wxGetDisplaySizeMM().GetHeight();
}
wxDCImpl::~wxDCImpl()
@@ -517,16 +513,16 @@ void wxDCImpl::SetMapMode( wxMappingMode mode )
switch (mode)
{
case wxMM_TWIPS:
- SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y );
+ SetLogicalScale( twips2mm*GetMMToPXx(), twips2mm*GetMMToPXy() );
break;
case wxMM_POINTS:
- SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y );
+ SetLogicalScale( pt2mm*GetMMToPXx(), pt2mm*GetMMToPXy() );
break;
case wxMM_METRIC:
- SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y );
+ SetLogicalScale( GetMMToPXx(), GetMMToPXy() );
break;
case wxMM_LOMETRIC:
- SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 );
+ SetLogicalScale( GetMMToPXx()/10.0, GetMMToPXy()/10.0 );
break;
default:
case wxMM_TEXT:
@@ -1441,3 +1437,25 @@ float wxDCImpl::GetFontPointSizeAdjustment(float dpi)
const wxSize screenPPI = wxGetDisplayPPI();
return float(screenPPI.y) / dpi;
}
+
+double wxDCImpl::GetMMToPXx() const
+{
+ if ( wxIsNullDouble(m_mm_to_pix_x) )
+ {
+ m_mm_to_pix_x = (double)wxGetDisplaySize().GetWidth() /
+ (double)wxGetDisplaySizeMM().GetWidth();
+ }
+
+ return m_mm_to_pix_x;
+}
+
+double wxDCImpl::GetMMToPXy() const
+{
+ if ( wxIsNullDouble(m_mm_to_pix_x) )
+ {
+ m_mm_to_pix_y = (double)wxGetDisplaySize().GetHeight() /
+ (double)wxGetDisplaySizeMM().GetHeight();
+ }
+
+ return m_mm_to_pix_y;
+}
diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp
index 5812e393f3..802ba8bf6a 100644
--- a/src/common/dcgraph.cpp
+++ b/src/common/dcgraph.cpp
@@ -106,9 +106,8 @@ wxGCDC::wxGCDC(const wxEnhMetaFileDC& dc)
#endif
wxGCDC::wxGCDC(wxGraphicsContext* context) :
- wxDC( new wxGCDCImpl( this ) )
+ wxDC(new wxGCDCImpl(this, context))
{
- SetGraphicsContext(context);
}
wxGCDC::wxGCDC() :
@@ -122,6 +121,12 @@ wxGCDC::~wxGCDC()
wxIMPLEMENT_ABSTRACT_CLASS(wxGCDCImpl, wxDCImpl);
+wxGCDCImpl::wxGCDCImpl(wxDC *owner, wxGraphicsContext* context) :
+ wxDCImpl(owner)
+{
+ Init(context);
+}
+
wxGCDCImpl::wxGCDCImpl( wxDC *owner ) :
wxDCImpl( owner )
{
@@ -390,9 +395,9 @@ void wxGCDCImpl::DoGetSizeMM( int* width, int* height ) const
GetOwner()->GetSize( &w, &h );
if (width)
- *width = long( double(w) / (m_scaleX * m_mm_to_pix_x) );
+ *width = long( double(w) / (m_scaleX * GetMMToPXx()) );
if (height)
- *height = long( double(h) / (m_scaleY * m_mm_to_pix_y) );
+ *height = long( double(h) / (m_scaleY * GetMMToPXy()) );
}
void wxGCDCImpl::SetTextForeground( const wxColour &col )
diff --git a/src/common/dcsvg.cpp b/src/common/dcsvg.cpp
index 2913548a12..ff212b8829 100644
--- a/src/common/dcsvg.cpp
+++ b/src/common/dcsvg.cpp
@@ -442,10 +442,10 @@ wxSVGFileDCImpl::~wxSVGFileDCImpl()
void wxSVGFileDCImpl::DoGetSizeMM(int *width, int *height) const
{
if (width)
- *width = wxRound( (double)m_width / m_mm_to_pix_x );
+ *width = wxRound( (double)m_width / GetMMToPXx() );
if (height)
- *height = wxRound( (double)m_height / m_mm_to_pix_y );
+ *height = wxRound( (double)m_height / GetMMToPXy() );
}
wxSize wxSVGFileDCImpl::GetPPI() const
diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp
index a7a6803bb3..9f8ffb9936 100644
--- a/src/common/dlgcmn.cpp
+++ b/src/common/dlgcmn.cpp
@@ -273,12 +273,7 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
if (flags & wxCANCEL)
{
- // Avoid Cmd+C closing dialog on Mac.
- wxString cancelLabel(_("&Cancel"));
-#ifdef __WXMAC__
- cancelLabel.Replace("&",wxEmptyString);
-#endif
- wxButton *cancel = new wxButton(this, wxID_CANCEL, cancelLabel);
+ wxButton *cancel = new wxButton(this, wxID_CANCEL);
sizer->AddButton(cancel);
}
diff --git a/src/common/docview.cpp b/src/common/docview.cpp
index 54c4f6a5f7..8f958f4777 100644
--- a/src/common/docview.cpp
+++ b/src/common/docview.cpp
@@ -824,15 +824,15 @@ wxDocTemplate::wxDocTemplate(wxDocManager *manager,
wxClassInfo *docClassInfo,
wxClassInfo *viewClassInfo,
long flags)
+ : m_fileFilter(filter)
+ , m_directory(dir)
+ , m_description(descr)
+ , m_defaultExt(ext)
+ , m_docTypeName(docTypeName)
+ , m_viewTypeName(viewTypeName)
{
m_documentManager = manager;
- m_description = descr;
- m_directory = dir;
- m_defaultExt = ext;
- m_fileFilter = filter;
m_flags = flags;
- m_docTypeName = docTypeName;
- m_viewTypeName = viewTypeName;
m_documentManager->AssociateTemplate(this);
m_docClassInfo = docClassInfo;
@@ -1179,7 +1179,6 @@ void wxDocManager::DoOpenMRUFile(unsigned n)
if ( filename.empty() )
return;
- wxString errMsg; // must contain exactly one "%s" if non-empty
if ( wxFile::Exists(filename) )
{
// Try to open it but don't give an error if it failed: this could be
@@ -1805,7 +1804,18 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
// first choose the template using the extension, if this fails (i.e.
// wxFileSelectorEx() didn't fill it), then use the path
if ( FilterIndex != -1 )
+ {
theTemplate = templates[FilterIndex];
+ if ( theTemplate )
+ {
+ // But don't use this template if it doesn't match the path as
+ // can happen if the user specified the extension explicitly
+ // but didn't bother changing the filter.
+ if ( !theTemplate->FileMatchesTemplate(path) )
+ theTemplate = NULL;
+ }
+ }
+
if ( !theTemplate )
theTemplate = FindTemplateForPath(path);
if ( !theTemplate )
diff --git a/src/common/dpycmn.cpp b/src/common/dpycmn.cpp
index 6171335b1a..85262ae042 100644
--- a/src/common/dpycmn.cpp
+++ b/src/common/dpycmn.cpp
@@ -113,6 +113,11 @@ wxDisplay::wxDisplay(const wxWindow* window)
return Factory().GetFromWindow(window);
}
+/* static */ void wxDisplay::InvalidateCache()
+{
+ Factory().InvalidateCache();
+}
+
// ----------------------------------------------------------------------------
// functions forwarded to wxDisplayImpl
// ----------------------------------------------------------------------------
@@ -229,13 +234,15 @@ wxSize wxDisplayImpl::GetPPI() const
// wxDisplayFactory implementation
// ============================================================================
-wxDisplayFactory::~wxDisplayFactory()
+void wxDisplayFactory::ClearImpls()
{
for ( size_t n = 0; n < m_impls.size(); ++n )
{
// It can be null, that's ok.
delete m_impls[n];
}
+
+ m_impls.clear();
}
int wxDisplayFactory::GetFromWindow(const wxWindow *window)
diff --git a/src/common/event.cpp b/src/common/event.cpp
index 14721de2d6..52b7d90819 100644
--- a/src/common/event.cpp
+++ b/src/common/event.cpp
@@ -373,8 +373,8 @@ wxEventFunctor::~wxEventFunctor()
*/
wxEvent::wxEvent(int theId, wxEventType commandType)
+ : m_eventType(commandType)
{
- m_eventType = commandType;
m_eventObject = NULL;
m_timeStamp = 0;
m_id = theId;
@@ -577,6 +577,7 @@ wxMouseEvent::wxMouseEvent(wxEventType commandType)
m_wheelAxis = wxMOUSE_WHEEL_VERTICAL;
m_wheelRotation = 0;
m_wheelDelta = 0;
+ m_wheelInverted = false;
m_linesPerAction = 0;
m_columnsPerAction = 0;
m_magnification = 0.0f;
@@ -601,10 +602,11 @@ void wxMouseEvent::Assign(const wxMouseEvent& event)
m_wheelRotation = event.m_wheelRotation;
m_wheelDelta = event.m_wheelDelta;
+ m_wheelInverted = event.m_wheelInverted;
m_linesPerAction = event.m_linesPerAction;
m_columnsPerAction = event.m_columnsPerAction;
m_wheelAxis = event.m_wheelAxis;
-
+
m_magnification = event.m_magnification;
}
@@ -754,12 +756,12 @@ wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const
// ----------------------------------------------------------------------------
wxKeyEvent::wxKeyEvent(wxEventType type)
+#if wxUSE_UNICODE
+ : m_uniChar(WXK_NONE)
+#endif
{
m_eventType = type;
m_keyCode = WXK_NONE;
-#if wxUSE_UNICODE
- m_uniChar = WXK_NONE;
-#endif
m_x =
m_y = wxDefaultCoord;
diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp
index 54c0698ef4..7767791433 100644
--- a/src/common/fontcmn.cpp
+++ b/src/common/fontcmn.cpp
@@ -439,8 +439,7 @@ bool wxFontBase::operator==(const wxFont& font) const
// in wxGTK1 GetPixelSize() calls GetInternalFont() which uses
// operator==() resulting in infinite recursion so we can't use it
// in that port
- // in wxQT, GetPixelSize is too slow to be used here
-#if (!defined(__WXGTK__) || defined(__WXGTK20__)) && !defined(__WXQT__)
+#if (!defined(__WXGTK__) || defined(__WXGTK20__))
GetPixelSize() == font.GetPixelSize() &&
#endif
GetFamily() == font.GetFamily() &&
diff --git a/src/common/fontmgrcmn.cpp b/src/common/fontmgrcmn.cpp
index 39fc9e4ac5..d4464f16b1 100644
--- a/src/common/fontmgrcmn.cpp
+++ b/src/common/fontmgrcmn.cpp
@@ -251,9 +251,8 @@ wxFontMgrFontRefData::wxFontMgrFontRefData(int size,
}
wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data)
+ : m_info(data.m_info)
{
- m_info = data.m_info;
-
m_fontFace = data.m_fontFace;
m_fontBundle = data.m_fontBundle;
m_fontValid = data.m_fontValid;
diff --git a/src/common/fs_inet.cpp b/src/common/fs_inet.cpp
index 6f3ff4fc56..b32aa26950 100644
--- a/src/common/fs_inet.cpp
+++ b/src/common/fs_inet.cpp
@@ -105,7 +105,6 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs),
if (url.GetError() == wxURL_NOERR)
{
wxInputStream *s = url.GetInputStream();
- wxString content = url.GetProtocol().GetContentType();
if (s)
{
wxString tmpfile =
@@ -117,9 +116,16 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs),
}
delete s;
+ // Content-Type header, as defined by the RFC 2045, has the form of
+ // "type/subtype" optionally followed by (multiple) "; parameter"
+ // and we need just the MIME type here.
+ const wxString& content = url.GetProtocol().GetContentType();
+ wxString mimetype = content.BeforeFirst(';');
+ mimetype.Trim();
+
return new wxFSFile(new wxTemporaryFileInputStream(tmpfile),
right,
- content,
+ mimetype,
GetAnchor(location)
#if wxUSE_DATETIME
, wxDateTime::Now()
diff --git a/src/common/gbsizer.cpp b/src/common/gbsizer.cpp
index 3b291872a4..7ee9b8273a 100644
--- a/src/common/gbsizer.cpp
+++ b/src/common/gbsizer.cpp
@@ -497,13 +497,12 @@ wxSize wxGridBagSizer::CalcMin()
for (idx=0; idx < m_rows; idx++)
height += m_rowHeights[idx] + ( idx == m_rows-1 ? 0 : m_vgap );
- m_calculatedMinSize = wxSize(width, height);
- return m_calculatedMinSize;
+ return wxSize(width, height);
}
-void wxGridBagSizer::RecalcSizes()
+void wxGridBagSizer::RepositionChildren(const wxSize& minSize)
{
// We can't lay out our elements if we don't have at least a single row and
// a single column. Notice that this may happen even if we have some
@@ -519,7 +518,7 @@ void wxGridBagSizer::RecalcSizes()
m_cols = m_colWidths.GetCount();
int idx, width, height;
- AdjustForGrowables(sz);
+ AdjustForGrowables(sz, minSize);
// Find the start positions on the window of the rows and columns
wxArrayInt rowpos;
diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp
index 03dd583ca1..5512f93407 100644
--- a/src/common/glcmn.cpp
+++ b/src/common/glcmn.cpp
@@ -45,7 +45,7 @@ void wxGLAttribsBase::AddAttribBits(int searchVal, int combineVal)
// Search for searchVal
wxVector::iterator it = m_GLValues.begin();
while ( it != m_GLValues.end() && *it != searchVal )
- it++;
+ ++it;
// Have we searchVal?
if ( it != m_GLValues.end() )
{
diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp
index 1f4f74cc7c..e558a254f3 100644
--- a/src/common/graphcmn.cpp
+++ b/src/common/graphcmn.cpp
@@ -604,9 +604,9 @@ void wxGraphicsContext::Flush()
{
}
-void wxGraphicsContext::EnableOffset(bool enable)
-{
- m_enableOffset = enable;
+void wxGraphicsContext::EnableOffset(bool enable)
+{
+ m_enableOffset = enable;
}
#if 0
@@ -779,7 +779,7 @@ void wxGraphicsContext::DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDou
void wxGraphicsContext::ClearRectangle( wxDouble WXUNUSED(x), wxDouble WXUNUSED(y), wxDouble WXUNUSED(w), wxDouble WXUNUSED(h))
{
-
+
}
void wxGraphicsContext::DrawEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h)
@@ -989,45 +989,7 @@ wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp
wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc)
{
-#ifndef wxNO_RTTI
- if ( const wxWindowDC *windc = dynamic_cast(&dc) )
- return Create(*windc);
-
- if ( const wxMemoryDC *memdc = dynamic_cast(&dc) )
- return Create(*memdc);
-
-#if wxUSE_PRINTING_ARCHITECTURE
- if ( const wxPrinterDC *printdc = dynamic_cast(&dc) )
- return Create(*printdc);
-#endif
-
-#ifdef __WXMSW__
-#if wxUSE_ENH_METAFILE
- if ( const wxEnhMetaFileDC *mfdc = dynamic_cast(&dc) )
- return Create(*mfdc);
-#endif
-#endif
-#else // wxNO_RTTI
- if ( const wxWindowDC *windc = wxDynamicCast(&dc, wxWindowDC) )
- return Create(*windc);
-
- if ( const wxMemoryDC *memdc = wxDynamicCast(&dc, wxMemoryDC) )
- return Create(*memdc);
-
-#if wxUSE_PRINTING_ARCHITECTURE
- if ( const wxPrinterDC *printdc = wxDynamicCast(&dc, wxPrinterDC) )
- return Create(*printdc);
-#endif
-
-#ifdef __WXMSW__
-#if wxUSE_ENH_METAFILE
- if ( const wxEnhMetaFileDC *mfdc = wxDynamicCast(&dc, wxEnhMetaFileDC) )
- return Create(*mfdc);
-#endif
-#endif
-#endif // !wxNO_RTTI/wxNO_RTTI
-
- return NULL;
+ return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromUnknownDC(dc);
}
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
@@ -1070,4 +1032,27 @@ wxGraphicsContext* wxGraphicsContext::Create()
wxIMPLEMENT_ABSTRACT_CLASS(wxGraphicsRenderer, wxObject);
+wxGraphicsContext* wxGraphicsRenderer::CreateContextFromUnknownDC(const wxDC& dc)
+{
+ if ( const wxWindowDC *windc = wxDynamicCast(&dc, wxWindowDC) )
+ return CreateContext(*windc);
+
+ if ( const wxMemoryDC *memdc = wxDynamicCast(&dc, wxMemoryDC) )
+ return CreateContext(*memdc);
+
+#if wxUSE_PRINTING_ARCHITECTURE
+ if ( const wxPrinterDC *printdc = wxDynamicCast(&dc, wxPrinterDC) )
+ return CreateContext(*printdc);
+#endif
+
+#ifdef __WXMSW__
+#if wxUSE_ENH_METAFILE
+ if ( const wxEnhMetaFileDC *mfdc = wxDynamicCast(&dc, wxEnhMetaFileDC) )
+ return CreateContext(*mfdc);
+#endif
+#endif
+
+ return NULL;
+}
+
#endif // wxUSE_GRAPHICS_CONTEXT
diff --git a/src/common/headerctrlcmn.cpp b/src/common/headerctrlcmn.cpp
index 54bb90119e..2f5eeff7a7 100644
--- a/src/common/headerctrlcmn.cpp
+++ b/src/common/headerctrlcmn.cpp
@@ -386,6 +386,10 @@ bool wxHeaderCtrlBase::ShowCustomizeDialog()
// wxHeaderCtrlSimple implementation
// ============================================================================
+wxBEGIN_EVENT_TABLE(wxHeaderCtrlSimple, wxHeaderCtrl)
+ EVT_HEADER_RESIZING(wxID_ANY, wxHeaderCtrlSimple::OnHeaderResizing)
+wxEND_EVENT_TABLE()
+
void wxHeaderCtrlSimple::Init()
{
m_sortKey = wxNO_COLUMN;
@@ -466,6 +470,12 @@ wxHeaderCtrlSimple::UpdateColumnWidthToFit(unsigned int idx, int widthTitle)
return true;
}
+void wxHeaderCtrlSimple::OnHeaderResizing(wxHeaderCtrlEvent& evt)
+{
+ m_cols[evt.GetColumn()].SetWidth(evt.GetWidth());
+ Refresh();
+}
+
// ============================================================================
// wxHeaderCtrlEvent implementation
// ============================================================================
diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp
index 0b7c485321..2e4f1dfe9c 100644
--- a/src/common/imagpng.cpp
+++ b/src/common/imagpng.cpp
@@ -42,9 +42,6 @@
// local functions
// ----------------------------------------------------------------------------
-// init the alpha channel for the image and fill it with 1s up to (x, y)
-static unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y);
-
// is the pixel with this value of alpha a fully opaque one?
static inline
bool IsOpaque(unsigned char a)
@@ -110,7 +107,7 @@ struct wxPNGImageData
wxPNGImageData()
{
lines = NULL;
- numLines = 0;
+ m_buf = NULL;
info_ptr = (png_infop) NULL;
png_ptr = (png_structp) NULL;
ok = false;
@@ -122,23 +119,21 @@ struct wxPNGImageData
if ( !lines )
return false;
- for ( png_uint_32 n = 0; n < height; n++ )
- {
- lines[n] = (unsigned char *)malloc( (size_t)(width * 4));
- if ( lines[n] )
- ++numLines;
- else
- return false;
- }
+ const size_t w = width * size_t(4);
+ m_buf = static_cast(malloc(w * height));
+ if (!m_buf)
+ return false;
+
+ lines[0] = m_buf;
+ for (png_uint_32 i = 1; i < height; i++)
+ lines[i] = lines[i - 1] + w;
return true;
}
~wxPNGImageData()
{
- for ( unsigned int n = 0; n < numLines; n++ )
- free( lines[n] );
-
+ free(m_buf);
free( lines );
if ( png_ptr )
@@ -153,7 +148,7 @@ struct wxPNGImageData
void DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo);
unsigned char** lines;
- png_uint_32 numLines;
+ unsigned char* m_buf;
png_infop info_ptr;
png_structp png_ptr;
bool ok;
@@ -209,6 +204,8 @@ PNGLINKAGEMODE wx_PNG_error(png_structp png_ptr, png_const_charp message)
// LoadFile() helpers
// ----------------------------------------------------------------------------
+// init the alpha channel for the image and fill it with 1s up to (x, y)
+static
unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y)
{
// create alpha channel
@@ -218,13 +215,10 @@ unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y)
// set alpha for the pixels we had so far
png_uint_32 end = y * image->GetWidth() + x;
- for ( png_uint_32 i = 0; i < end; i++ )
- {
- // all the previous pixels were opaque
- *alpha++ = 0xff;
- }
+ // all the previous pixels were opaque
+ memset(alpha, 0xff, end);
- return alpha;
+ return alpha + end;
}
// ----------------------------------------------------------------------------
@@ -246,39 +240,12 @@ static
void CopyDataFromPNG(wxImage *image,
unsigned char **lines,
png_uint_32 width,
- png_uint_32 height,
- int color_type)
+ png_uint_32 height)
{
// allocated on demand if we have any non-opaque pixels
unsigned char *alpha = NULL;
unsigned char *ptrDst = image->GetData();
- if ( !(color_type & PNG_COLOR_MASK_COLOR) )
- {
- // grey image: GAGAGA... where G == grey component and A == alpha
- for ( png_uint_32 y = 0; y < height; y++ )
- {
- const unsigned char *ptrSrc = lines[y];
- for ( png_uint_32 x = 0; x < width; x++ )
- {
- unsigned char g = *ptrSrc++;
- unsigned char a = *ptrSrc++;
-
- // the first time we encounter a transparent pixel we must
- // allocate alpha channel for the image
- if ( !IsOpaque(a) && !alpha )
- alpha = InitAlpha(image, x, y);
-
- if ( alpha )
- *alpha++ = a;
-
- *ptrDst++ = g;
- *ptrDst++ = g;
- *ptrDst++ = g;
- }
- }
- }
- else // colour image: RGBRGB...
{
for ( png_uint_32 y = 0; y < height; y++ )
{
@@ -290,7 +257,8 @@ void CopyDataFromPNG(wxImage *image,
unsigned char b = *ptrSrc++;
unsigned char a = *ptrSrc++;
- // the logic here is the same as for the grey case
+ // the first time we encounter a transparent pixel we must
+ // allocate alpha channel for the image
if ( !IsOpaque(a) && !alpha )
alpha = InitAlpha(image, x, y);
@@ -320,7 +288,7 @@ void
wxPNGImageData::DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo)
{
png_uint_32 width, height = 0;
- int bit_depth, color_type, interlace_type;
+ int bit_depth, color_type;
image->Destroy();
@@ -346,7 +314,7 @@ wxPNGImageData::DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo)
return;
png_read_info( png_ptr, info_ptr );
- png_get_IHDR( png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL );
+ png_get_IHDR( png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL );
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_expand( png_ptr );
@@ -355,6 +323,7 @@ wxPNGImageData::DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo)
if (bit_depth < 8)
png_set_expand( png_ptr );
+ png_set_gray_to_rgb(png_ptr);
png_set_strip_16( png_ptr );
png_set_packing( png_ptr );
if (png_get_valid( png_ptr, info_ptr, PNG_INFO_tRNS))
@@ -440,7 +409,7 @@ wxPNGImageData::DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo)
// loaded successfully, now init wxImage with this data
- CopyDataFromPNG(image, lines, width, height, color_type);
+ CopyDataFromPNG(image, lines, width, height);
// This will indicate to the caller that loading succeeded.
ok = true;
diff --git a/src/common/list.cpp b/src/common/list.cpp
index decaf8bb36..64bfbcb9a9 100644
--- a/src/common/list.cpp
+++ b/src/common/list.cpp
@@ -147,16 +147,6 @@ void wxListBase::Init(wxKeyType keyType)
m_keyType = keyType;
}
-wxListBase::wxListBase(size_t count, void *elements[])
-{
- Init();
-
- for ( size_t n = 0; n < count; n++ )
- {
- Append(elements[n]);
- }
-}
-
void wxListBase::DoCopy(const wxListBase& list)
{
wxASSERT_MSG( !list.m_destroy,
diff --git a/src/common/memory.cpp b/src/common/memory.cpp
index a2ad41e444..2795070054 100644
--- a/src/common/memory.cpp
+++ b/src/common/memory.cpp
@@ -27,7 +27,7 @@
#include "wx/app.h"
#include "wx/hash.h"
#include "wx/log.h"
- #include "wx/wxcrtvararg.h" // for wxVsnprintf
+ #include "wx/wxcrtvararg.h" // for wxVsnprintf
#endif
#if wxUSE_THREADS
@@ -321,7 +321,7 @@ void wxMemStruct::PrintNode ()
msg += wxT("object");
wxString msg2;
- msg2.Printf(wxT(" at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize());
+ msg2.Printf(wxT(" at %#zx, size %d"), wxPtrToUInt(GetActualData()), (int)RequestSize());
msg += msg2;
wxLogMessage(msg);
@@ -334,7 +334,7 @@ void wxMemStruct::PrintNode ()
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
msg += wxT("non-object data");
wxString msg2;
- msg2.Printf(wxT(" at 0x%lX, size %d\n"), (long)GetActualData(), (int)RequestSize());
+ msg2.Printf(wxT(" at %#zx, size %d\n"), wxPtrToUInt(GetActualData()), (int)RequestSize());
msg += msg2;
wxLogMessage(msg);
@@ -367,7 +367,7 @@ void wxMemStruct::Dump ()
msg += wxT("unknown object class");
wxString msg2;
- msg2.Printf(wxT(" at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize());
+ msg2.Printf(wxT(" at %#zx, size %d"), wxPtrToUInt(GetActualData()), (int)RequestSize());
msg += msg2;
wxDebugContext::OutputDumpLine(msg.c_str());
@@ -379,7 +379,7 @@ void wxMemStruct::Dump ()
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
wxString msg2;
- msg2.Printf(wxT("non-object data at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize() );
+ msg2.Printf(wxT("non-object data at %#zx, size %d"), wxPtrToUInt(GetActualData()), (int)RequestSize() );
msg += msg2;
wxDebugContext::OutputDumpLine(msg.c_str());
}
diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp
index 1c6fd085df..47428befa5 100644
--- a/src/common/menucmn.cpp
+++ b/src/common/menucmn.cpp
@@ -59,7 +59,7 @@ wxEND_FLAGS( wxMenuStyle )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxMenu, wxEvtHandler, "wx/menu.h");
wxCOLLECTION_TYPE_INFO( wxMenuItem *, wxMenuItemList ) ;
-#if wxUSE_EXTENDED_RTTI
+#if wxUSE_EXTENDED_RTTI
template<> void wxCollectionToVariantArray( wxMenuItemList const &theList,
wxAnyList &value)
{
@@ -91,7 +91,7 @@ wxBEGIN_FLAGS( wxMenuBarStyle )
wxFLAGS_MEMBER(wxMB_DOCKABLE)
wxEND_FLAGS( wxMenuBarStyle )
-#if wxUSE_EXTENDED_RTTI
+#if wxUSE_EXTENDED_RTTI
// the negative id would lead the window (its superclass !) to
// vetoe streaming out otherwise
bool wxMenuBarStreamingCallback( const wxObject *WXUNUSED(object), wxObjectWriter *,
@@ -105,7 +105,7 @@ wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuBar, wxWindow, "wx/menu.h", \
wxMenuBarStreamingCallback)
-#if wxUSE_EXTENDED_RTTI
+#if wxUSE_EXTENDED_RTTI
WX_DEFINE_LIST( wxMenuInfoHelperList )
wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxMenuInfoHelper, wxObject, "wx/menu.h");
@@ -124,7 +124,7 @@ wxCONSTRUCTOR_2( wxMenuInfoHelper, wxMenu*, Menu, wxString, Title )
wxCOLLECTION_TYPE_INFO( wxMenuInfoHelper *, wxMenuInfoHelperList ) ;
-template<> void wxCollectionToVariantArray( wxMenuInfoHelperList const &theList,
+template<> void wxCollectionToVariantArray( wxMenuInfoHelperList const &theList,
wxAnyList &value)
{
wxListCollectionToAnyList( theList, value ) ;
@@ -141,7 +141,7 @@ wxEMPTY_HANDLERS_TABLE(wxMenuBar)
wxCONSTRUCTOR_DUMMY( wxMenuBar )
-#if wxUSE_EXTENDED_RTTI
+#if wxUSE_EXTENDED_RTTI
const wxMenuInfoHelperList& wxMenuBarBase::GetMenuInfos() const
{
diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp
index ae86108b92..175fcb205e 100644
--- a/src/common/mimecmn.cpp
+++ b/src/common/mimecmn.cpp
@@ -156,12 +156,11 @@ void wxFileTypeInfo::VarArgInit(const wxString *mimeType,
wxFileTypeInfo::wxFileTypeInfo(const wxArrayString& sArray)
+ : m_mimeType(sArray[0u])
+ , m_openCmd( sArray[1u])
+ , m_printCmd(sArray[2u])
+ , m_desc( sArray[3u])
{
- m_mimeType = sArray [0u];
- m_openCmd = sArray [1u];
- m_printCmd = sArray [2u];
- m_desc = sArray [3u];
-
size_t count = sArray.GetCount();
for ( size_t i = 4; i < count; i++ )
{
diff --git a/src/common/notifmsgcmn.cpp b/src/common/notifmsgcmn.cpp
index 10033b96f9..326c66981a 100644
--- a/src/common/notifmsgcmn.cpp
+++ b/src/common/notifmsgcmn.cpp
@@ -70,7 +70,7 @@ void wxNotificationMessageBase::SetParent(wxWindow *parent)
void wxNotificationMessageBase::SetFlags(int flags)
{
wxASSERT_MSG(flags == wxICON_INFORMATION ||
- flags == wxICON_WARNING || flags == wxICON_ERROR ||
+ flags == wxICON_WARNING || flags == wxICON_ERROR ||
flags == 0,
"Invalid icon flags specified");
diff --git a/src/common/paper.cpp b/src/common/paper.cpp
index 753978dd76..47c60a2e92 100644
--- a/src/common/paper.cpp
+++ b/src/common/paper.cpp
@@ -55,10 +55,10 @@ wxPrintPaperType::wxPrintPaperType()
}
wxPrintPaperType::wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h)
+ : m_paperName(name)
{
m_paperId = paperId;
m_platformId = platformId;
- m_paperName = name;
m_width = w;
m_height = h;
}
diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp
index eb046f1840..dd52c006d8 100644
--- a/src/common/prntbase.cpp
+++ b/src/common/prntbase.cpp
@@ -589,8 +589,8 @@ void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
wxIMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject);
wxPrintout::wxPrintout(const wxString& title)
+ : m_printoutTitle(title)
{
- m_printoutTitle = title ;
m_printoutDC = NULL;
m_pageWidthMM = 0;
m_pageHeightMM = 0;
diff --git a/src/common/rearrangectrl.cpp b/src/common/rearrangectrl.cpp
index 75170d35dc..ef917518f1 100644
--- a/src/common/rearrangectrl.cpp
+++ b/src/common/rearrangectrl.cpp
@@ -70,7 +70,6 @@ bool wxRearrangeList::Create(wxWindow *parent,
}
// do create the real control
- m_order.reserve(count);
if ( !wxCheckListBox::Create(parent, id, pos, size, itemsInOrder,
style, validator, name) )
return false;
@@ -84,9 +83,10 @@ bool wxRearrangeList::Create(wxWindow *parent,
// which would also update m_order itself.
wxCheckListBox::Check(n);
}
- m_order[n] = order[n];
}
+ m_order = order;
+
return true;
}
diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp
index 9bc0d295fb..651af1c48f 100644
--- a/src/common/sizer.cpp
+++ b/src/common/sizer.cpp
@@ -984,16 +984,23 @@ void wxSizer::FitInside( wxWindow *window )
window->SetVirtualSize( size );
}
+void wxSizer::RecalcSizes()
+{
+ // It is recommended to override RepositionChildren() in the derived
+ // classes, but if they don't do it, this method must be overridden.
+ wxFAIL_MSG( wxS("Must be overridden if RepositionChildren() is not") );
+}
+
void wxSizer::Layout()
{
// (re)calculates minimums needed for each item and other preparations
// for layout
- CalcMin();
+ const wxSize minSize = CalcMin();
// Applies the layout and repositions/resizes the items
wxWindow::ChildrenRepositioningGuard repositionGuard(m_containingWindow);
- RecalcSizes();
+ RepositionChildren(minSize);
}
void wxSizer::SetSizeHints( wxWindow *window )
@@ -1457,7 +1464,7 @@ int wxGridSizer::CalcRowsCols(int& nrows, int& ncols) const
return nitems;
}
-void wxGridSizer::RecalcSizes()
+void wxGridSizer::RepositionChildren(const wxSize& WXUNUSED(minSize))
{
int nitems, nrows, ncols;
if ( (nitems = CalcRowsCols(nrows, ncols)) == 0 )
@@ -1625,7 +1632,7 @@ wxFlexGridSizer::~wxFlexGridSizer()
{
}
-void wxFlexGridSizer::RecalcSizes()
+void wxFlexGridSizer::RepositionChildren(const wxSize& minSize)
{
int nrows, ncols;
if ( !CalcRowsCols(nrows, ncols) )
@@ -1634,7 +1641,7 @@ void wxFlexGridSizer::RecalcSizes()
const wxPoint pt(GetPosition());
const wxSize sz(GetSize());
- AdjustForGrowables(sz);
+ AdjustForGrowables(sz, minSize);
wxSizerItemList::const_iterator i = m_children.begin();
const wxSizerItemList::const_iterator end = m_children.end();
@@ -1707,16 +1714,8 @@ static int SumArraySizes(const wxArrayInt& sizes, int gap)
return total;
}
-void wxFlexGridSizer::FindWidthsAndHeights(int nrows, int ncols)
+wxSize wxFlexGridSizer::FindWidthsAndHeights(int WXUNUSED(nrows), int ncols)
{
- // We have to recalculate the sizes in case the item minimum size has
- // changed since the previous layout, or the item has been hidden using
- // wxSizer::Show(). If all the items in a row/column are hidden, the final
- // dimension of the row/column will be -1, indicating that the column
- // itself is hidden.
- m_rowHeights.assign(nrows, -1);
- m_colWidths.assign(ncols, -1);
-
// n is the index of the item in left-to-right top-to-bottom order
size_t n = 0;
for ( wxSizerItemList::iterator i = m_children.begin();
@@ -1742,8 +1741,8 @@ void wxFlexGridSizer::FindWidthsAndHeights(int nrows, int ncols)
AdjustForFlexDirection();
- m_calculatedMinSize = wxSize(SumArraySizes(m_colWidths, m_hgap),
- SumArraySizes(m_rowHeights, m_vgap));
+ return wxSize(SumArraySizes(m_colWidths, m_hgap),
+ SumArraySizes(m_rowHeights, m_vgap));
}
wxSize wxFlexGridSizer::CalcMin()
@@ -1775,11 +1774,7 @@ wxSize wxFlexGridSizer::CalcMin()
}
}
- // The stage of looking for max values in each row/column has been
- // made a separate function, since it's reused in AdjustForGrowables.
- FindWidthsAndHeights(nrows,ncols);
-
- return m_calculatedMinSize;
+ return FindWidthsAndHeights(nrows,ncols);
}
void wxFlexGridSizer::AdjustForFlexDirection()
@@ -1893,7 +1888,7 @@ DoAdjustForGrowables(int delta,
}
}
-void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz)
+void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz, const wxSize& minSize)
{
#if wxDEBUG_LEVEL
// by the time this function is called, the sizer should be already fully
@@ -1931,7 +1926,7 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz)
{
DoAdjustForGrowables
(
- sz.x - m_calculatedMinSize.x,
+ sz.x - minSize.x,
m_growableCols,
m_colWidths,
m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableColsProportions
@@ -1949,7 +1944,7 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz)
i != m_children.end();
++i )
{
- didAdjustMinSize |= (*i)->InformFirstDirection(wxHORIZONTAL, m_colWidths[col], sz.y - m_calculatedMinSize.y);
+ didAdjustMinSize |= (*i)->InformFirstDirection(wxHORIZONTAL, m_colWidths[col], sz.y - minSize.y);
if ( ++col == ncols )
col = 0;
}
@@ -1959,7 +1954,7 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz)
{
DoAdjustForGrowables
(
- sz.x - m_calculatedMinSize.x,
+ sz.x - minSize.x,
m_growableCols,
m_colWidths,
m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableColsProportions
@@ -1974,7 +1969,7 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz)
// should treat all rows as having proportion of 1 then
DoAdjustForGrowables
(
- sz.y - m_calculatedMinSize.y,
+ sz.y - minSize.y,
m_growableRows,
m_rowHeights,
m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableRowsProportions
@@ -2123,9 +2118,9 @@ namespace
{
/*
- Helper of RecalcSizes(): checks if there is enough remaining space for the
- min size of the given item and returns its min size or the entire remaining
- space depending on which one is greater.
+ Helper of RepositionChildren(): checks if there is enough remaining space
+ for the min size of the given item and returns its min size or the entire
+ remaining space depending on which one is greater.
This function updates the remaining space parameter to account for the size
effectively allocated to the item.
@@ -2163,7 +2158,7 @@ GetMinOrRemainingSize(int orient, const wxSizerItem *item, int *remainingSpace_)
} // anonymous namespace
-void wxBoxSizer::RecalcSizes()
+void wxBoxSizer::RepositionChildren(const wxSize& minSize)
{
if ( m_children.empty() )
return;
@@ -2173,7 +2168,7 @@ void wxBoxSizer::RecalcSizes()
// the amount of free space which we should redistribute among the
// stretchable items (i.e. those with non zero proportion)
- int delta = totalMajorSize - GetSizeInMajorDir(m_calculatedMinSize);
+ int delta = totalMajorSize - GetSizeInMajorDir(minSize);
// declare loop variables used below:
wxSizerItemList::const_iterator i; // iterator in m_children list
@@ -2492,7 +2487,7 @@ void wxBoxSizer::RecalcSizes()
wxSize wxBoxSizer::CalcMin()
{
m_totalProportion = 0;
- m_calculatedMinSize = wxSize(0, 0);
+ wxSize minSize;
// The minimal size for the sizer should be big enough to allocate its
// element at least its minimal size but also, and this is the non trivial
@@ -2523,19 +2518,19 @@ wxSize wxBoxSizer::CalcMin()
else // fixed size item
{
// Just account for its size directly
- SizeInMajorDir(m_calculatedMinSize) += GetSizeInMajorDir(sizeMinThis);
+ SizeInMajorDir(minSize) += GetSizeInMajorDir(sizeMinThis);
}
// In the transversal direction we just need to find the maximum.
- if ( GetSizeInMinorDir(sizeMinThis) > GetSizeInMinorDir(m_calculatedMinSize) )
- SizeInMinorDir(m_calculatedMinSize) = GetSizeInMinorDir(sizeMinThis);
+ if ( GetSizeInMinorDir(sizeMinThis) > GetSizeInMinorDir(minSize) )
+ SizeInMinorDir(minSize) = GetSizeInMinorDir(sizeMinThis);
}
// Using the max ratio ensures that the min size is big enough for all
// items to have their min size and satisfy the proportions among them.
- SizeInMajorDir(m_calculatedMinSize) += (int)(maxMinSizeToProp*m_totalProportion);
+ SizeInMajorDir(minSize) += (int)(maxMinSizeToProp*m_totalProportion);
- return m_calculatedMinSize;
+ return minSize;
}
bool
@@ -2604,7 +2599,7 @@ wxStaticBoxSizer::~wxStaticBoxSizer()
m_staticBox->WXDestroyWithoutChildren();
}
-void wxStaticBoxSizer::RecalcSizes()
+void wxStaticBoxSizer::RepositionChildren(const wxSize& minSize)
{
int top_border, other_border;
m_staticBox->GetBordersForSizer(&top_border, &other_border);
@@ -2621,7 +2616,7 @@ void wxStaticBoxSizer::RecalcSizes()
#if defined( __WXGTK20__ )
// if the wxStaticBox has created a wxPizza to contain its children
// (see wxStaticBox::AddChild) then we need to place the items it contains
- // in the wxBoxSizer::RecalcSizes() call below using coordinates relative
+ // in the base class version called below using coordinates relative
// to the top-left corner of the staticbox:
m_position.x = m_position.y = 0;
#elif defined(__WXOSX__) && wxOSX_USE_COCOA
@@ -2630,7 +2625,7 @@ void wxStaticBoxSizer::RecalcSizes()
m_position.x = m_position.y = 10;
#else
// if the wxStaticBox has children, then these windows must be placed
- // by the wxBoxSizer::RecalcSizes() call below using coordinates relative
+ // by the base class version called below using coordinates relative
// to the top-left corner of the staticbox (but unlike wxGTK, we need
// to keep in count the static borders here!):
m_position.x = other_border;
@@ -2646,7 +2641,7 @@ void wxStaticBoxSizer::RecalcSizes()
m_position.y += top_border;
}
- wxBoxSizer::RecalcSizes();
+ wxBoxSizer::RepositionChildren(minSize);
m_position = old_pos;
m_size = old_size;
diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp
index 88f22fe95d..560322317a 100644
--- a/src/common/strconv.cpp
+++ b/src/common/strconv.cpp
@@ -1425,7 +1425,7 @@ size_t wxMBConvUTF8::FromWChar(char *buf, size_t n,
len += cnt + 1;
if (buf)
{
- *buf++ = (char) ((-128 >> cnt) | ((cc >> (cnt * 6)) & (0x3f >> cnt)));
+ *buf++ = (char) ((~0x7fu >> cnt) | ((cc >> (cnt * 6)) & (0x3f >> cnt)));
while (cnt--)
*buf++ = (char) (0x80 | ((cc >> (cnt * 6)) & 0x3f));
}
diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp
index 7dc3421d4a..fe7628d6d5 100644
--- a/src/common/textfile.cpp
+++ b/src/common/textfile.cpp
@@ -105,7 +105,7 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
// the beginning of the current line, changes inside the loop
wxString::const_iterator lineStart = str.begin();
const wxString::const_iterator end = str.end();
- for ( wxString::const_iterator p = lineStart; p != end; p++ )
+ for ( wxString::const_iterator p = lineStart; p != end; ++p )
{
const wxChar ch = *p;
if ( ch == '\r' || ch == '\n' )
@@ -129,7 +129,7 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
// DOS EOL is the only one consisting of two chars, not one.
if ( lineType == wxTextFileType_Dos )
- p++;
+ ++p;
lineStart = p + 1;
}
diff --git a/src/common/translation.cpp b/src/common/translation.cpp
index 7d9937cd18..bf92ed2942 100644
--- a/src/common/translation.cpp
+++ b/src/common/translation.cpp
@@ -127,7 +127,7 @@ wxString GetPreferredUILanguageFallback(const wxArrayString& WXUNUSED(available)
#ifdef __WINDOWS__
-wxString GetPreferredUILanguage(const wxArrayString& available, wxArrayString& allPreferred)
+wxString GetPreferredUILanguage(const wxArrayString& available)
{
typedef BOOL (WINAPI *GetUserPreferredUILanguages_t)(DWORD, PULONG, PWSTR, PULONG);
static GetUserPreferredUILanguages_t s_pfnGetUserPreferredUILanguages = NULL;
@@ -172,20 +172,18 @@ wxString GetPreferredUILanguage(const wxArrayString& available, wxArrayString& a
wxString lang(*j);
lang.Replace("-", "_");
if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND )
- allPreferred.Add(lang);
+ return lang;
size_t pos = lang.find('_');
if ( pos != wxString::npos )
{
lang = lang.substr(0, pos);
if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND )
- allPreferred.Add(lang);
+ return lang;
}
}
}
}
}
- if ( !allPreferred.empty() )
- return allPreferred[0];
return GetPreferredUILanguageFallback(available);
}
@@ -209,7 +207,7 @@ void LogTraceArray(const char *prefix, CFArrayRef arr)
#endif // wxUSE_LOG_TRACE
-wxString GetPreferredUILanguage(const wxArrayString& available, wxArrayString &allPreferred)
+wxString GetPreferredUILanguage(const wxArrayString& available)
{
wxStringToStringHashMap availableNormalized;
wxCFRef availableArr(
@@ -233,19 +231,17 @@ wxString GetPreferredUILanguage(const wxArrayString& available, wxArrayString &a
LogTraceArray(" - system preferred languages", prefArr);
unsigned prefArrLength = CFArrayGetCount(prefArr);
- for ( size_t x = 0; x < prefArrLength; ++x )
+ if ( prefArrLength > 0 )
{
// Lookup the name in 'available' by index -- we need to get the
// original value corresponding to the normalized one chosen.
- wxString lang(wxCFStringRef::AsString((CFStringRef)CFArrayGetValueAtIndex(prefArr, x)));
+ wxString lang(wxCFStringRef::AsString((CFStringRef)CFArrayGetValueAtIndex(prefArr, 0)));
wxStringToStringHashMap::const_iterator i = availableNormalized.find(lang);
if ( i == availableNormalized.end() )
- allPreferred.push_back(lang);
+ return lang;
else
- allPreferred.push_back(i->second);
+ return i->second;
}
- if ( allPreferred.empty() == false )
- return allPreferred[0];
return GetPreferredUILanguageFallback(available);
}
@@ -259,7 +255,7 @@ wxString GetPreferredUILanguage(const wxArrayString& available, wxArrayString &a
// The LANGUAGE variable may contain a colon separated list of language
// codes in the order of preference.
// http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
-wxString GetPreferredUILanguage(const wxArrayString& available, wxArrayString &allPreferred)
+wxString GetPreferredUILanguage(const wxArrayString& available)
{
wxString languageFromEnv;
wxArrayString preferred;
@@ -287,17 +283,15 @@ wxString GetPreferredUILanguage(const wxArrayString& available, wxArrayString &a
{
wxString lang(*j);
if ( available.Index(lang) != wxNOT_FOUND )
- allPreferred.Add(lang);
+ return lang;
size_t pos = lang.find('_');
if ( pos != wxString::npos )
{
lang = lang.substr(0, pos);
if ( available.Index(lang) != wxNOT_FOUND )
- allPreferred.Add(lang);
+ return lang;
}
}
- if ( allPreferred.empty() == false )
- return allPreferred[0];
return GetPreferredUILanguageFallback(available);
}
@@ -1555,9 +1549,9 @@ bool wxTranslations::AddCatalog(const wxString& domain,
wxLanguage msgIdLanguage)
{
const wxString msgIdLang = wxLocale::GetLanguageCanonicalName(msgIdLanguage);
- const wxArrayString domain_langs = GetAcceptableTranslations(domain, msgIdLanguage);
+ const wxString domain_lang = GetBestTranslation(domain, msgIdLang);
- if ( domain_langs.empty() )
+ if ( domain_lang.empty() )
{
wxLogTrace(TRACE_I18N,
wxS("no suitable translation for domain '%s' found"),
@@ -1565,30 +1559,11 @@ bool wxTranslations::AddCatalog(const wxString& domain,
return false;
}
- bool success = false;
- for ( wxArrayString::const_iterator lang = domain_langs.begin();
- lang != domain_langs.end();
- ++lang )
- {
- wxLogTrace(TRACE_I18N,
- wxS("adding '%s' translation for domain '%s' (msgid language '%s')"),
- *lang, domain, msgIdLang);
+ wxLogTrace(TRACE_I18N,
+ wxS("adding '%s' translation for domain '%s' (msgid language '%s')"),
+ domain_lang, domain, msgIdLang);
- // No use loading languages that are less preferred than the
- // msgid language, as by definition it contains all the strings
- // in the msgid language.
- if ( msgIdLang == *lang )
- break;
-
- // We determine success by the success of loading/failing to load
- // the most preferred (i.e. the first one) language's catalog:
- if ( lang == domain_langs.begin() )
- success = LoadCatalog(domain, *lang, msgIdLang);
- else
- LoadCatalog(domain, *lang, msgIdLang);
- }
-
- return success;
+ return LoadCatalog(domain, domain_lang, msgIdLang);
}
@@ -1675,37 +1650,20 @@ wxString wxTranslations::GetBestTranslation(const wxString& domain,
wxString wxTranslations::GetBestTranslation(const wxString& domain,
const wxString& msgIdLanguage)
{
- const wxArrayString allGoodOnes = GetAcceptableTranslations(domain, msgIdLanguage);
+ // explicitly set language should always be respected
+ if ( !m_lang.empty() )
+ return m_lang;
- wxLogTrace(TRACE_I18N, " => using language '%s'", allGoodOnes[0]);
- return allGoodOnes[0];
-}
-
-wxArrayString wxTranslations::GetAcceptableTranslations(const wxString& domain,
- wxLanguage msgIdLanguage)
-{
- const wxString lang = wxLocale::GetLanguageCanonicalName(msgIdLanguage);
- return GetAcceptableTranslations(domain, lang);
-}
-
-wxArrayString wxTranslations::GetAcceptableTranslations(const wxString& domain,
- const wxString& msgIdLanguage)
-{
wxArrayString available(GetAvailableTranslations(domain));
// it's OK to have duplicates, so just add msgid language
available.push_back(msgIdLanguage);
available.push_back(msgIdLanguage.BeforeFirst('_'));
- wxLogTrace(TRACE_I18N, "choosing best languages for domain '%s'", domain);
+ wxLogTrace(TRACE_I18N, "choosing best language for domain '%s'", domain);
LogTraceArray(" - available translations", available);
- wxArrayString allPreferred;
- GetPreferredUILanguage(available, allPreferred);
-
- // explicitly set language should always be preferred the most
- if ( !m_lang.empty() )
- allPreferred.insert(allPreferred.begin(), m_lang);
-
- return allPreferred;
+ const wxString lang = GetPreferredUILanguage(available);
+ wxLogTrace(TRACE_I18N, " => using language '%s'", lang);
+ return lang;
}
diff --git a/src/common/treebase.cpp b/src/common/treebase.cpp
index b71e2d07a0..49c0151b97 100644
--- a/src/common/treebase.cpp
+++ b/src/common/treebase.cpp
@@ -153,12 +153,12 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
wxTreeEvent::wxTreeEvent(const wxTreeEvent & event)
: wxNotifyEvent(event)
+ , m_evtKey(event.m_evtKey)
+ , m_pointDrag(event.m_pointDrag)
+ , m_label(event.m_label)
{
- m_evtKey = event.m_evtKey;
m_item = event.m_item;
m_itemOld = event.m_itemOld;
- m_pointDrag = event.m_pointDrag;
- m_label = event.m_label;
m_editCancelled = event.m_editCancelled;
}
diff --git a/src/common/uiactioncmn.cpp b/src/common/uiactioncmn.cpp
index 3c9b41fadb..eeaf01ef93 100644
--- a/src/common/uiactioncmn.cpp
+++ b/src/common/uiactioncmn.cpp
@@ -89,7 +89,7 @@ bool wxUIActionSimulatorImpl::MouseDragDrop(long x1, long y1, long x2, long y2,
MouseDown(button);
MouseMove(x2, y2);
MouseUp(button);
-
+
return true;
}
diff --git a/src/common/uri.cpp b/src/common/uri.cpp
index e46b0e13d4..4dba8acff7 100644
--- a/src/common/uri.cpp
+++ b/src/common/uri.cpp
@@ -532,6 +532,21 @@ const char* wxURI::ParsePath(const char* uri)
return uri;
const bool isAbs = *uri == '/';
+
+ // From RFC 3986: when authority is present, the path must either be empty
+ // or begin with a slash ("/") character. When authority is not present,
+ // the path cannot begin with two slashes.
+ if ( m_userinfo.empty() && m_server.empty() && m_port.empty() )
+ {
+ if ( isAbs && uri[1] == '/' )
+ return uri;
+ }
+ else
+ {
+ if ( !isAbs )
+ return uri;
+ }
+
if ( isAbs )
m_path += *uri++;
diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp
index 04f85840e2..7da7621209 100644
--- a/src/common/valtext.cpp
+++ b/src/common/valtext.cpp
@@ -23,6 +23,7 @@
#include
#include "wx/textctrl.h"
#include "wx/combobox.h"
+ #include "wx/log.h"
#include "wx/utils.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
@@ -76,25 +77,6 @@ wxTextValidator::wxTextValidator(const wxTextValidator& val)
void wxTextValidator::SetStyle(long style)
{
m_validatorStyle = style;
-
-#if wxDEBUG_LEVEL
- int check;
- check = (int)HasFlag(wxFILTER_ALPHA) + (int)HasFlag(wxFILTER_ALPHANUMERIC) +
- (int)HasFlag(wxFILTER_DIGITS) + (int)HasFlag(wxFILTER_NUMERIC);
- wxASSERT_MSG(check <= 1,
- "It makes sense to use only one of the wxFILTER_ALPHA/wxFILTER_ALPHANUMERIC/"
- "wxFILTER_SIMPLE_NUMBER/wxFILTER_NUMERIC styles");
-
- wxASSERT_MSG(((int)HasFlag(wxFILTER_INCLUDE_LIST) + (int)HasFlag(wxFILTER_INCLUDE_CHAR_LIST) <= 1) &&
- ((int)HasFlag(wxFILTER_EXCLUDE_LIST) + (int)HasFlag(wxFILTER_EXCLUDE_CHAR_LIST) <= 1),
- "Using both wxFILTER_[IN|EX]CLUDE_LIST _and_ wxFILTER_[IN|EX]CLUDE_CHAR_LIST "
- "doesn't work since wxTextValidator internally uses the same array for both");
-
- check = (int)HasFlag(wxFILTER_INCLUDE_LIST) + (int)HasFlag(wxFILTER_INCLUDE_CHAR_LIST) +
- (int)HasFlag(wxFILTER_EXCLUDE_LIST) + (int)HasFlag(wxFILTER_EXCLUDE_CHAR_LIST);
- wxASSERT_MSG(check <= 1,
- "Using both an include/exclude list may lead to unexpected results");
-#endif // wxDEBUG_LEVEL
}
bool wxTextValidator::Copy(const wxTextValidator& val)
@@ -102,10 +84,12 @@ bool wxTextValidator::Copy(const wxTextValidator& val)
wxValidator::Copy(val);
m_validatorStyle = val.m_validatorStyle;
- m_stringValue = val.m_stringValue;
+ m_stringValue = val.m_stringValue;
- m_includes = val.m_includes;
- m_excludes = val.m_excludes;
+ m_charIncludes = val.m_charIncludes;
+ m_charExcludes = val.m_charExcludes;
+ m_includes = val.m_includes;
+ m_excludes = val.m_excludes;
return true;
}
@@ -153,25 +137,7 @@ bool wxTextValidator::Validate(wxWindow *parent)
if ( !text )
return false;
- wxString val(text->GetValue());
-
- wxString errormsg;
-
- // We can only do some kinds of validation once the input is complete, so
- // check for them here:
- if ( HasFlag(wxFILTER_EMPTY) && val.empty() )
- errormsg = _("Required information entry is empty.");
- else if ( HasFlag(wxFILTER_INCLUDE_LIST) && m_includes.Index(val) == wxNOT_FOUND )
- errormsg = wxString::Format(_("'%s' is not one of the valid strings"), val);
- else if ( HasFlag(wxFILTER_EXCLUDE_LIST) && m_excludes.Index(val) != wxNOT_FOUND )
- errormsg = wxString::Format(_("'%s' is one of the invalid strings"), val);
- else if ( !(errormsg = IsValid(val)).empty() )
- {
- // NB: this format string should always contain exactly one '%s'
- wxString buf;
- buf.Printf(errormsg, val.c_str());
- errormsg = buf;
- }
+ const wxString& errormsg = IsValid(text->GetValue());
if ( !errormsg.empty() )
{
@@ -215,89 +181,98 @@ bool wxTextValidator::TransferFromWindow()
return true;
}
-// IRIX mipsPro refuses to compile wxStringCheck() if func is inline so
-// let's work around this by using this non-template function instead of
-// wxStringCheck(). And while this might be fractionally less efficient because
-// the function call won't be inlined like this, we don't care enough about
-// this to add extra #ifs for non-IRIX case.
-namespace
+wxString wxTextValidator::IsValid(const wxString& str) const
{
+ if ( HasFlag(wxFILTER_EMPTY) && str.empty() )
+ return _("Required information entry is empty.");
+ else if ( IsExcluded(str) )
+ return wxString::Format(_("'%s' is one of the invalid strings"), str);
+ else if ( !IsIncluded(str) )
+ return wxString::Format(_("'%s' is not one of the valid strings"), str);
-bool CheckString(bool (*func)(const wxUniChar&), const wxString& str)
-{
- for ( wxString::const_iterator i = str.begin(); i != str.end(); ++i )
+ // check the whole string for invalid chars.
+ for ( wxString::const_iterator i = str.begin(), end = str.end();
+ i != end; ++i )
{
- if ( !func(*i) )
- return false;
+ if ( !IsValidChar(*i) )
+ {
+ return wxString::Format(
+ _("'%s' contains invalid character(s)"), str);
+ }
}
- return true;
+ return wxString();
}
-} // anonymous namespace
-
-wxString wxTextValidator::IsValid(const wxString& val) const
-{
- // wxFILTER_EMPTY is checked for in wxTextValidator::Validate
-
- if ( HasFlag(wxFILTER_ASCII) && !val.IsAscii() )
- return _("'%s' should only contain ASCII characters.");
- if ( HasFlag(wxFILTER_ALPHA) && !CheckString(wxIsalpha, val) )
- return _("'%s' should only contain alphabetic characters.");
- if ( HasFlag(wxFILTER_ALPHANUMERIC) && !CheckString(wxIsalnum, val) )
- return _("'%s' should only contain alphabetic or numeric characters.");
- if ( HasFlag(wxFILTER_DIGITS) && !CheckString(wxIsdigit, val) )
- return _("'%s' should only contain digits.");
- if ( HasFlag(wxFILTER_NUMERIC) && !wxIsNumeric(val) )
- return _("'%s' should be numeric.");
- if ( HasFlag(wxFILTER_INCLUDE_CHAR_LIST) && !ContainsOnlyIncludedCharacters(val) )
- return _("'%s' doesn't consist only of valid characters");
- if ( HasFlag(wxFILTER_EXCLUDE_CHAR_LIST) && ContainsExcludedCharacters(val) )
- return _("'%s' contains illegal characters");
-
- return wxEmptyString;
-}
-
-bool wxTextValidator::ContainsOnlyIncludedCharacters(const wxString& val) const
-{
- for ( wxString::const_iterator i = val.begin(); i != val.end(); ++i )
- if (m_includes.Index((wxString) *i) == wxNOT_FOUND)
- // one character of 'val' is NOT present in m_includes...
- return false;
-
- // all characters of 'val' are present in m_includes
- return true;
-}
-
-bool wxTextValidator::ContainsExcludedCharacters(const wxString& val) const
-{
- for ( wxString::const_iterator i = val.begin(); i != val.end(); ++i )
- if (m_excludes.Index((wxString) *i) != wxNOT_FOUND)
- // one character of 'val' is present in m_excludes...
- return true;
-
- // all characters of 'val' are NOT present in m_excludes
- return false;
-}
void wxTextValidator::SetCharIncludes(const wxString& chars)
{
- wxArrayString arr;
+ m_charIncludes.clear();
- for ( wxString::const_iterator i = chars.begin(); i != chars.end(); ++i )
- arr.Add(*i);
+ AddCharIncludes(chars);
+}
- SetIncludes(arr);
+void wxTextValidator::AddCharIncludes(const wxString& chars)
+{
+ m_charIncludes += chars;
}
void wxTextValidator::SetCharExcludes(const wxString& chars)
{
- wxArrayString arr;
+ m_charExcludes.clear();
- for ( wxString::const_iterator i = chars.begin(); i != chars.end(); ++i )
- arr.Add(*i);
+ AddCharExcludes(chars);
+}
- SetExcludes(arr);
+void wxTextValidator::AddCharExcludes(const wxString& chars)
+{
+ m_charExcludes += chars;
+}
+
+void wxTextValidator::SetIncludes(const wxArrayString& includes)
+{
+ // preserve compatibily with versions prior 3.1.3 which used m_includes
+ // to store the list of char includes.
+ if ( HasFlag(wxFILTER_INCLUDE_CHAR_LIST) )
+ {
+ for ( wxArrayString::const_iterator i = includes.begin(),
+ end = includes.end(); i != end; ++i )
+ {
+ AddCharIncludes(*i);
+ }
+
+ return;
+ }
+
+ m_includes = includes;
+}
+
+void wxTextValidator::AddInclude(const wxString& include)
+{
+ m_includes.push_back(include);
+}
+
+void wxTextValidator::SetExcludes(const wxArrayString& excludes)
+{
+ // preserve compatibily with versions prior 3.1.3 which used m_excludes
+ // to store the list of char excludes.
+ if ( HasFlag(wxFILTER_EXCLUDE_CHAR_LIST) )
+ {
+ for ( wxArrayString::const_iterator i = excludes.begin(),
+ end = excludes.end(); i != end; ++i )
+ {
+ AddCharExcludes(*i);
+ }
+
+ return;
+ }
+
+ m_excludes = excludes;
+}
+
+void wxTextValidator::AddExclude(const wxString& exclude)
+{
+ m_excludes.push_back(exclude);
}
void wxTextValidator::OnChar(wxKeyEvent& event)
@@ -313,7 +288,7 @@ void wxTextValidator::OnChar(wxKeyEvent& event)
int keyCode = event.GetUnicodeKey();
#else // !wxUSE_UNICODE
int keyCode = event.GetKeyCode();
- if (keyCode > WXK_START)
+ if ( keyCode > WXK_START )
return;
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
@@ -321,8 +296,8 @@ void wxTextValidator::OnChar(wxKeyEvent& event)
if (keyCode < WXK_SPACE || keyCode == WXK_DELETE)
return;
- wxString str((wxUniChar)keyCode, 1);
- if (IsValid(str).empty())
+ // Filter out invalid characters
+ if ( IsValidChar(static_cast(keyCode)) )
return;
if ( !wxValidator::IsSilent() )
@@ -332,6 +307,71 @@ void wxTextValidator::OnChar(wxKeyEvent& event)
event.Skip(false);
}
+bool wxTextValidator::IsValidChar(const wxUniChar& c) const
+{
+ if ( !m_validatorStyle ) // no filtering if HasFlag(wxFILTER_NONE)
+ return true;
+
+ if ( IsCharExcluded(c) ) // disallow any char in the m_charExcludes.
+ return false;
+
+ if ( IsCharIncluded(c) ) // allow any char in the m_charIncludes.
+ return true;
+
+ if ( !HasFlag(wxFILTER_CC) )
+ {
+ // Validity is entirely determined by the exclude/include char lists
+ // and this character is in neither, so consider that it is valid if
+ // and only if we accept anything.
+ return !HasFlag(wxFILTER_INCLUDE_CHAR_LIST);
+ }
+
+ if ( HasFlag(wxFILTER_SPACE) && wxIsspace(c) )
+ return true;
+ if ( HasFlag(wxFILTER_ASCII) && c.IsAscii() )
+ return true;
+ if ( HasFlag(wxFILTER_NUMERIC) && wxIsNumeric(c) )
+ return true;
+ if ( HasFlag(wxFILTER_ALPHANUMERIC) && wxIsalnum(c) )
+ return true;
+ if ( HasFlag(wxFILTER_ALPHA) && wxIsalpha(c) )
+ return true;
+ if ( HasFlag(wxFILTER_DIGITS) && wxIsdigit(c) )
+ return true;
+ if ( HasFlag(wxFILTER_XDIGITS) && wxIsxdigit(c) )
+ return true;
+
+ // If we are here, this means that the char c does not belong to any of the
+ // character classes checked above (e.g. emoji chars) so just return false.
+
+ return false;
+}
+
+// kept for compatibility reasons.
+bool wxTextValidator::ContainsOnlyIncludedCharacters(const wxString& str) const
+{
+ for ( wxString::const_iterator i = str.begin(), end = str.end();
+ i != end; ++i )
+ {
+ if ( !IsCharIncluded(*i) )
+ return false;
+ }
+
+ return true;
+}
+
+// kept for compatibility reasons.
+bool wxTextValidator::ContainsExcludedCharacters(const wxString& str) const
+{
+ for ( wxString::const_iterator i = str.begin(), end = str.end();
+ i != end; ++i )
+ {
+ if ( IsCharExcluded(*i) )
+ return true;
+ }
+
+ return false;
+}
#endif
// wxUSE_VALIDATORS && (wxUSE_TEXTCTRL || wxUSE_COMBOBOX)
diff --git a/src/common/variant.cpp b/src/common/variant.cpp
index e11e43dfe6..75546b07b4 100644
--- a/src/common/variant.cpp
+++ b/src/common/variant.cpp
@@ -77,18 +77,17 @@ void wxVariant::Clear()
wxVariant::wxVariant(const wxVariant& variant)
: wxObject()
+ , m_name(variant.m_name)
{
if (!variant.IsNull())
Ref(variant);
-
- m_name = variant.m_name;
}
wxVariant::wxVariant(wxVariantData* data, const wxString& name) // User-defined data
: wxObject()
+ , m_name(name)
{
m_refData = data;
- m_name = name;
}
wxVariant::~wxVariant()
@@ -690,8 +689,8 @@ bool wxVariant::GetBool() const
class WXDLLIMPEXP_BASE wxVariantDataChar: public wxVariantData
{
public:
- wxVariantDataChar() { m_value = 0; }
- wxVariantDataChar(const wxUniChar& value) { m_value = value; }
+ wxVariantDataChar() : m_value(0) { }
+ wxVariantDataChar(const wxUniChar& value) : m_value(value) { }
inline wxUniChar GetValue() const { return m_value; }
inline void SetValue(const wxUniChar& value) { m_value = value; }
@@ -844,7 +843,7 @@ class WXDLLIMPEXP_BASE wxVariantDataString: public wxVariantData
{
public:
wxVariantDataString() { }
- wxVariantDataString(const wxString& value) { m_value = value; }
+ wxVariantDataString(const wxString& value) : m_value(value) { }
inline wxString GetValue() const { return m_value; }
inline void SetValue(const wxString& value) { m_value = value; }
@@ -1278,7 +1277,7 @@ class wxVariantDataDateTime: public wxVariantData
{
public:
wxVariantDataDateTime() { }
- wxVariantDataDateTime(const wxDateTime& value) { m_value = value; }
+ wxVariantDataDateTime(const wxDateTime& value) : m_value(value) { }
inline wxDateTime GetValue() const { return m_value; }
inline void SetValue(const wxDateTime& value) { m_value = value; }
@@ -1411,7 +1410,7 @@ class wxVariantDataArrayString: public wxVariantData
{
public:
wxVariantDataArrayString() { }
- wxVariantDataArrayString(const wxArrayString& value) { m_value = value; }
+ wxVariantDataArrayString(const wxArrayString& value) : m_value(value) { }
wxArrayString GetValue() const { return m_value; }
void SetValue(const wxArrayString& value) { m_value = value; }
@@ -1538,8 +1537,8 @@ wxArrayString wxVariant::GetArrayString() const
class WXDLLIMPEXP_BASE wxVariantDataLongLong : public wxVariantData
{
public:
- wxVariantDataLongLong() { m_value = 0; }
- wxVariantDataLongLong(wxLongLong value) { m_value = value; }
+ wxVariantDataLongLong() : m_value(0) { }
+ wxVariantDataLongLong(wxLongLong value) : m_value(value) { }
wxLongLong GetValue() const { return m_value; }
void SetValue(wxLongLong value) { m_value = value; }
@@ -1737,8 +1736,8 @@ wxLongLong wxVariant::GetLongLong() const
class WXDLLIMPEXP_BASE wxVariantDataULongLong : public wxVariantData
{
public:
- wxVariantDataULongLong() { m_value = 0; }
- wxVariantDataULongLong(wxULongLong value) { m_value = value; }
+ wxVariantDataULongLong() : m_value(0) { }
+ wxVariantDataULongLong(wxULongLong value) : m_value(value) { }
wxULongLong GetValue() const { return m_value; }
void SetValue(wxULongLong value) { m_value = value; }
diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp
index f5c4cd7b7c..1073c4ea4e 100644
--- a/src/common/wincmn.cpp
+++ b/src/common/wincmn.cpp
@@ -269,6 +269,8 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase);
// the default initialization
wxWindowBase::wxWindowBase()
+ : m_virtualSize(wxDefaultSize)
+ , m_bestSizeCache(wxDefaultSize)
{
// no window yet, no parent nor children
m_parent = NULL;
@@ -280,9 +282,6 @@ wxWindowBase::wxWindowBase()
m_minHeight =
m_maxHeight = wxDefaultCoord;
- // invalidiated cache value
- m_bestSizeCache = wxDefaultSize;
-
// window are created enabled and visible by default
m_isShown =
m_isEnabled = true;
@@ -340,8 +339,6 @@ wxWindowBase::wxWindowBase()
m_accessible = NULL;
#endif
- m_virtualSize = wxDefaultSize;
-
m_scrollHelper = NULL;
m_windowVariant = wxWINDOW_VARIANT_NORMAL;
diff --git a/src/common/wrapsizer.cpp b/src/common/wrapsizer.cpp
index 90118e3c74..155eb95341 100644
--- a/src/common/wrapsizer.cpp
+++ b/src/common/wrapsizer.cpp
@@ -92,8 +92,8 @@ void wxWrapSizer::ClearRows()
{
// all elements of the row sizers are also elements of this one (we
// directly add pointers to elements of our own m_children list to the row
- // sizers in RecalcSizes()), so we need to detach them from the row sizer
- // to avoid double deletion
+ // sizers in RepositionChildren()), so we need to detach them from the row
+ // sizer to avoid double deletion
wxSizerItemList& rows = m_rows.GetChildren();
for ( wxSizerItemList::iterator i = rows.begin(),
end = rows.end();
@@ -485,7 +485,7 @@ void wxWrapSizer::FinishRow(size_t n,
AdjustLastRowItemProp(n, itemLast);
}
-void wxWrapSizer::RecalcSizes()
+void wxWrapSizer::RepositionChildren(const wxSize& WXUNUSED(minSize))
{
// First restore any proportions we may have changed and remove the old rows
ClearRows();
diff --git a/src/common/xpmdecod.cpp b/src/common/xpmdecod.cpp
index 4449f2a699..7c7df92bad 100644
--- a/src/common/xpmdecod.cpp
+++ b/src/common/xpmdecod.cpp
@@ -812,7 +812,7 @@ wxImage wxXPMDecoder::ReadData(const char* const* xpm_data)
unsigned char* g = new unsigned char[colors_cnt];
unsigned char* b = new unsigned char[colors_cnt];
- for (it = clr_tbl.begin(), i = 0; it != clr_tbl.end(); it++, i++)
+ for (it = clr_tbl.begin(), i = 0; it != clr_tbl.end(); ++it, ++i)
{
r[i] = it->second.R;
g[i] = it->second.G;
diff --git a/src/common/xtistrm.cpp b/src/common/xtistrm.cpp
index b4ec20d411..42f69dc72d 100644
--- a/src/common/xtistrm.cpp
+++ b/src/common/xtistrm.cpp
@@ -71,8 +71,8 @@ void wxObjectWriter::ClearObjectContext()
m_data->m_nextId = 0;
}
-void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *classInfo,
- wxObjectWriterCallback *writercallback, const wxString &name,
+void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *classInfo,
+ wxObjectWriterCallback *writercallback, const wxString &name,
const wxStringToAnyHashMap &metadata )
{
DoBeginWriteTopLevelEntry( name );
@@ -80,8 +80,8 @@ void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *clas
DoEndWriteTopLevelEntry( name );
}
-void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *classInfo,
- wxObjectWriterCallback *writercallback, bool isEmbedded,
+void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *classInfo,
+ wxObjectWriterCallback *writercallback, bool isEmbedded,
const wxStringToAnyHashMap &metadata )
{
if ( !classInfo->BeforeWriteObject( object, this, writercallback, metadata) )
@@ -115,8 +115,8 @@ void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *clas
}
void wxObjectWriter::FindConnectEntry(const wxEvtHandler * evSource,
- const wxEventSourceTypeInfo* dti,
- const wxObject* &sink,
+ const wxEventSourceTypeInfo* dti,
+ const wxObject* &sink,
const wxHandlerInfo *&handler)
{
size_t cookie;
@@ -146,8 +146,8 @@ void wxObjectWriter::FindConnectEntry(const wxEvtHandler * evSource,
}
}
}
-void wxObjectWriter::WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
- wxObjectWriterCallback *writercallback,
+void wxObjectWriter::WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
+ wxObjectWriterCallback *writercallback,
wxObjectWriterInternalPropertiesData * data )
{
wxPropertyInfoMap map;
@@ -195,13 +195,13 @@ public:
wxObjectPropertyWriter(const wxClassTypeInfo* cti,
wxObjectWriterCallback *writercallback,
wxObjectWriter* writer,
- wxStringToAnyHashMap &props) :
+ wxStringToAnyHashMap &props) :
m_cti(cti),m_persister(writercallback),m_writer(writer),m_props(props)
{}
virtual void operator()(const wxObject *vobj)
{
- m_writer->WriteObject( vobj, (vobj ? vobj->GetClassInfo() : m_cti->GetClassInfo() ),
+ m_writer->WriteObject( vobj, (vobj ? vobj->GetClassInfo() : m_cti->GetClassInfo() ),
m_persister, m_cti->GetKind()== wxT_OBJECT, m_props );
}
private:
@@ -211,8 +211,8 @@ private:
wxStringToAnyHashMap& m_props;
};
-void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
- const wxPropertyInfo* pi, wxObjectWriterCallback *writercallback,
+void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
+ const wxPropertyInfo* pi, wxObjectWriterCallback *writercallback,
wxObjectWriterInternalPropertiesData *WXUNUSED(data) )
{
if ( pi->GetFlags() & wxPROP_DONT_STREAM )
@@ -227,7 +227,7 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c
{
wxAnyList data;
pi->GetAccessor()->GetPropertyCollection(obj, data);
- const wxTypeInfo * elementType =
+ const wxTypeInfo * elementType =
wx_dynamic_cast( const wxCollectionTypeInfo*, pi->GetTypeInfo() )->GetElementType();
if ( !data.empty() )
{
@@ -238,7 +238,7 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c
const wxAny* valptr = *iter;
if ( writercallback->BeforeWriteProperty( this, obj, pi, *valptr ) )
{
- const wxClassTypeInfo* cti =
+ const wxClassTypeInfo* cti =
wx_dynamic_cast( const wxClassTypeInfo*, elementType );
if ( cti )
{
@@ -260,7 +260,7 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c
}
else
{
- const wxEventSourceTypeInfo* dti =
+ const wxEventSourceTypeInfo* dti =
wx_dynamic_cast( const wxEventSourceTypeInfo* , pi->GetTypeInfo() );
if ( dti )
{
@@ -278,7 +278,7 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c
DoBeginWriteProperty( pi );
if ( IsObjectKnown( sink ) )
{
- DoWriteDelegate( obj, ci, pi, sink, GetObjectID( sink ),
+ DoWriteDelegate( obj, ci, pi, sink, GetObjectID( sink ),
sink->GetClassInfo(), handler );
DoEndWriteProperty( pi );
}
@@ -307,7 +307,7 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c
if ( pi->GetFlags() & wxPROP_ENUM_STORE_LONG )
{
- const wxEnumTypeInfo *eti =
+ const wxEnumTypeInfo *eti =
wx_dynamic_cast(const wxEnumTypeInfo*, pi->GetTypeInfo() );
if ( eti )
{
@@ -320,7 +320,7 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c
}
// avoid streaming out default values
- if ( pi->GetTypeInfo()->HasStringConverters() &&
+ if ( pi->GetTypeInfo()->HasStringConverters() &&
!pi->GetDefaultValue().IsNull() ) // TODO Verify
{
if ( wxAnyGetAsString(value) == wxAnyGetAsString(pi->GetDefaultValue()) )
@@ -328,7 +328,7 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c
}
// avoid streaming out null objects
- const wxClassTypeInfo* cti =
+ const wxClassTypeInfo* cti =
wx_dynamic_cast( const wxClassTypeInfo* , pi->GetTypeInfo() );
if ( cti && cti->GetKind() == wxT_OBJECT_PTR && wxAnyGetAsObjectPtr(value) == NULL )
@@ -583,7 +583,7 @@ void wxObjectRuntimeReaderCallback::SetPropertyAsObject(int objectID,
wxObject *o, *valo;
o = m_data->GetObject(objectID);
valo = m_data->GetObject(valueObjectId);
- const wxClassInfo* valClassInfo =
+ const wxClassInfo* valClassInfo =
(wx_dynamic_cast(const wxClassTypeInfo*,propertyInfo->GetTypeInfo()))->GetClassInfo();
// if this is a dynamic object and we are asked for another class
@@ -605,14 +605,14 @@ void wxObjectRuntimeReaderCallback::SetConnect(int eventSourceObjectID,
const wxHandlerInfo* handlerInfo,
int eventSinkObjectID )
{
- wxEvtHandler *ehsource =
+ wxEvtHandler *ehsource =
wx_dynamic_cast( wxEvtHandler* , m_data->GetObject( eventSourceObjectID ) );
- wxEvtHandler *ehsink =
+ wxEvtHandler *ehsink =
wx_dynamic_cast( wxEvtHandler *,m_data->GetObject(eventSinkObjectID) );
if ( ehsource && ehsink )
{
- const wxEventSourceTypeInfo *delegateTypeInfo =
+ const wxEventSourceTypeInfo *delegateTypeInfo =
wx_dynamic_cast(const wxEventSourceTypeInfo*,delegateInfo->GetTypeInfo());
if( delegateTypeInfo && delegateTypeInfo->GetLastEventType() == -1 )
{
@@ -622,7 +622,7 @@ void wxObjectRuntimeReaderCallback::SetConnect(int eventSourceObjectID,
}
else
{
- for ( wxEventType iter = delegateTypeInfo->GetEventType();
+ for ( wxEventType iter = delegateTypeInfo->GetEventType();
iter <= delegateTypeInfo->GetLastEventType(); ++iter )
{
ehsource->Connect( -1, iter,
@@ -656,9 +656,9 @@ void wxObjectRuntimeReaderCallback::AddToPropertyCollectionAsObject(int objectID
wxObject *o, *valo;
o = m_data->GetObject(objectID);
valo = m_data->GetObject(valueObjectId);
- const wxCollectionTypeInfo * collectionTypeInfo =
+ const wxCollectionTypeInfo * collectionTypeInfo =
wx_dynamic_cast( const wxCollectionTypeInfo *, propertyInfo->GetTypeInfo() );
- const wxClassInfo* valClassInfo =
+ const wxClassInfo* valClassInfo =
(wx_dynamic_cast(const wxClassTypeInfo*,collectionTypeInfo->GetElementType()))->GetClassInfo();
// if this is a dynamic object and we are asked for another class
diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp
index a14bd674ef..cd72d411d7 100644
--- a/src/common/zipstrm.cpp
+++ b/src/common/zipstrm.cpp
@@ -1073,7 +1073,6 @@ bool wxZipEntry::LoadExtraInfo(const char* extraData, wxUint16 extraLen, bool lo
// promoted to int, which has range large enough to deal with any value
// of the field length.
extraData += fieldLen + 4;
- extraLen -= fieldLen + 4;
}
// extraInfo had unknown format
diff --git a/src/dfb/dc.cpp b/src/dfb/dc.cpp
index a65f9bca0b..b718de4c98 100644
--- a/src/dfb/dc.cpp
+++ b/src/dfb/dc.cpp
@@ -51,11 +51,6 @@ void wxDFBDCImpl::DFBInit(const wxIDirectFBSurfacePtr& surface)
wxCHECK_RET( surface != NULL, "invalid surface" );
- m_mm_to_pix_x = (double)wxGetDisplaySize().GetWidth() /
- (double)wxGetDisplaySizeMM().GetWidth();
- m_mm_to_pix_y = (double)wxGetDisplaySize().GetHeight() /
- (double)wxGetDisplaySizeMM().GetHeight();
-
SetFont(DEFAULT_FONT);
SetPen(DEFAULT_PEN);
SetBrush(DEFAULT_BRUSH);
@@ -563,15 +558,15 @@ void wxDFBDCImpl::DoGetSizeMM(int *width, int *height) const
int w = 0;
int h = 0;
GetSize(&w, &h);
- if ( width ) *width = int(double(w) / (m_userScaleX*m_mm_to_pix_x));
- if ( height ) *height = int(double(h) / (m_userScaleY*m_mm_to_pix_y));
+ if ( width ) *width = int(double(w) / (m_userScaleX*GetMMToPXx()));
+ if ( height ) *height = int(double(h) / (m_userScaleY*GetMMToPXy()));
}
wxSize wxDFBDCImpl::GetPPI() const
{
#warning "move this to common code?"
- return wxSize(int(double(m_mm_to_pix_x) * inches2mm),
- int(double(m_mm_to_pix_y) * inches2mm));
+ return wxSize(int(double(GetMMToPXx()) * inches2mm),
+ int(double(GetMMToPXy()) * inches2mm));
}
diff --git a/src/generic/accel.cpp b/src/generic/accel.cpp
index 10288b59cf..e4382f455d 100644
--- a/src/generic/accel.cpp
+++ b/src/generic/accel.cpp
@@ -54,8 +54,8 @@ public:
wxAccelRefData(const wxAccelRefData& data)
: wxObjectRefData()
+ , m_accels(data.m_accels)
{
- m_accels = data.m_accels;
}
virtual ~wxAccelRefData()
diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp
index 448a58bf5b..d398cc1c5a 100644
--- a/src/generic/datavgen.cpp
+++ b/src/generic/datavgen.cpp
@@ -53,6 +53,7 @@
#include "wx/stopwatch.h"
#include "wx/weakref.h"
#include "wx/generic/private/markuptext.h"
+#include "wx/generic/private/rowheightcache.h"
#include "wx/generic/private/widthcalc.h"
#if wxUSE_ACCESSIBILITY
#include "wx/private/markupparser.h"
@@ -180,7 +181,8 @@ wxTextCtrl *CreateEditorTextCtrl(wxWindow *parent, const wxRect& labelRect, cons
void wxDataViewColumn::Init(int width, wxAlignment align, int flags)
{
- m_width = width;
+ m_width =
+ m_manuallySetWidth = width;
m_minWidth = 0;
m_align = align;
m_flags = flags;
@@ -709,6 +711,9 @@ public:
bool Cleared();
void Resort()
{
+ if ( m_rowHeightCache )
+ m_rowHeightCache->Clear();
+
if (!IsVirtualList())
{
m_root->Resort(this);
@@ -821,6 +826,7 @@ public:
int GetLineStart( unsigned int row ) const; // row * m_lineHeight in fixed mode
int GetLineHeight( unsigned int row ) const; // m_lineHeight in fixed mode
int GetLineAt( unsigned int y ) const; // y / m_lineHeight in fixed mode
+ int QueryAndCacheLineHeight(unsigned int row, wxDataViewItem item) const;
void SetRowHeight( int lineHeight ) { m_lineHeight = lineHeight; }
int GetRowHeight() const { return m_lineHeight; }
@@ -910,6 +916,7 @@ private:
bool m_hasFocus;
bool m_useCellFocus;
bool m_currentColSetByKeyboard;
+ HeightCache *m_rowHeightCache;
#if wxUSE_DRAG_AND_DROP
int m_dragCount;
@@ -1344,8 +1351,8 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxDataViewProgressRenderer, wxDataViewRenderer);
wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label,
const wxString &varianttype, wxDataViewCellMode mode, int align ) :
wxDataViewRenderer( varianttype, mode, align )
+ , m_label(label)
{
- m_label = label;
m_value = 0;
}
@@ -1514,8 +1521,8 @@ class wxBitmapCanvas: public wxWindow
public:
wxBitmapCanvas( wxWindow *parent, const wxBitmap &bitmap, const wxSize &size ) :
wxWindow( parent, wxID_ANY, wxPoint(0,0), size )
+ , m_bitmap(bitmap)
{
- m_bitmap = bitmap;
Bind(wxEVT_PAINT, &wxBitmapCanvas::OnPaint, this);
}
@@ -1946,6 +1953,14 @@ wxDataViewMainWindow::wxDataViewMainWindow( wxDataViewCtrl *parent, wxWindowID i
m_useCellFocus = false;
m_currentRow = (unsigned)-1;
m_lineHeight = GetDefaultRowHeight();
+ if (GetOwner()->HasFlag(wxDV_VARIABLE_LINE_HEIGHT))
+ {
+ m_rowHeightCache = new HeightCache();
+ }
+ else
+ {
+ m_rowHeightCache = NULL;
+ }
#if wxUSE_DRAG_AND_DROP
m_dragCount = 0;
@@ -1982,6 +1997,7 @@ wxDataViewMainWindow::~wxDataViewMainWindow()
{
DestroyTree();
delete m_renameTimer;
+ delete m_rowHeightCache;
}
@@ -2439,6 +2455,24 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
colRect.x += colRect.width;
}
}
+ else // Not using column focus.
+ {
+ flags |= wxCONTROL_CURRENT | wxCONTROL_FOCUSED;
+
+ // We still need to show the current item if it's not
+ // selected.
+ if ( !selected )
+ {
+ wxRendererNative::Get().DrawFocusRect
+ (
+ this,
+ dc,
+ rowRect,
+ flags
+ );
+ }
+ //else: The current item is selected, will be drawn below.
+ }
}
// draw selection and whole-item focus:
@@ -2449,7 +2483,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
this,
dc,
rowRect,
- flags | wxCONTROL_CURRENT
+ flags
);
}
}
@@ -2734,11 +2768,15 @@ bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxData
wxDataViewVirtualListModel *list_model =
(wxDataViewVirtualListModel*) GetModel();
m_count = list_model->GetCount();
-
- m_selection.OnItemsInserted(GetRowByItem(item), 1);
}
else
{
+ if ( m_rowHeightCache )
+ {
+ // specific position (row) is unclear, so clear whole height cache
+ m_rowHeightCache->Clear();
+ }
+
wxDataViewTreeNode *parentNode = FindNode(parent);
if ( !parentNode )
@@ -2820,6 +2858,8 @@ bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxData
InvalidateCount();
}
+ m_selection.OnItemsInserted(GetRowByItem(item), 1);
+
GetOwner()->InvalidateColBestWidths();
UpdateDisplay();
@@ -2880,6 +2920,9 @@ bool wxDataViewMainWindow::ItemDeleted(const wxDataViewItem& parent,
return true;
}
+ if ( m_rowHeightCache )
+ m_rowHeightCache->Remove(GetRowByItem(parent) + itemPosInNode);
+
// Delete the item from wxDataViewTreeNode representation:
const int itemsDeleted = 1 + itemNode->GetSubTreeCount();
@@ -2944,6 +2987,9 @@ bool wxDataViewMainWindow::DoItemChanged(const wxDataViewItem & item, int view_c
{
if ( !IsVirtualList() )
{
+ if ( m_rowHeightCache )
+ m_rowHeightCache->Remove(GetRowByItem(item));
+
// Move this node to its new correct place after it was updated.
//
// In principle, we could skip the call to PutInSortOrder() if the modified
@@ -2994,6 +3040,9 @@ bool wxDataViewMainWindow::Cleared()
m_selection.Clear();
m_currentRow = (unsigned)-1;
+ if ( m_rowHeightCache )
+ m_rowHeightCache->Clear();
+
if (GetModel())
{
BuildTree( GetModel() );
@@ -3321,147 +3370,132 @@ wxRect wxDataViewMainWindow::GetLinesRect( unsigned int rowFrom, unsigned int ro
int wxDataViewMainWindow::GetLineStart( unsigned int row ) const
{
- const wxDataViewModel *model = GetModel();
+ // check for the easy case first
+ if ( !m_rowHeightCache || !GetOwner()->HasFlag(wxDV_VARIABLE_LINE_HEIGHT) )
+ return row * m_lineHeight;
- if (GetOwner()->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT)
+ int start = 0;
+ if ( m_rowHeightCache->GetLineStart(row, start) )
+ return start;
+
+ unsigned int r;
+ for (r = 0; r < row; r++)
{
- // TODO make more efficient
-
- int start = 0;
-
- unsigned int r;
- for (r = 0; r < row; r++)
+ int height = 0;
+ if ( !m_rowHeightCache->GetLineHeight(r, height) )
{
- const wxDataViewTreeNode* node = GetTreeNodeByRow(r);
- if (!node) return start;
+ // row height not in cache -> get it from the renderer...
+ wxDataViewItem item = GetItemByRow(r);
+ if (!item)
+ break;
- wxDataViewItem item = node->GetItem();
-
- unsigned int cols = GetOwner()->GetColumnCount();
- unsigned int col;
- int height = m_lineHeight;
- for (col = 0; col < cols; col++)
- {
- const wxDataViewColumn *column = GetOwner()->GetColumn(col);
- if (column->IsHidden())
- continue; // skip it!
-
- if ((col != 0) &&
- model->IsContainer(item) &&
- !model->HasContainerColumns(item))
- continue; // skip it!
-
- wxDataViewRenderer *renderer =
- const_cast(column->GetRenderer());
- renderer->PrepareForItem(model, item, column->GetModelColumn());
-
- height = wxMax( height, renderer->GetSize().y );
- }
-
- start += height;
+ height = QueryAndCacheLineHeight(r, item);
}
- return start;
- }
- else
- {
- return row * m_lineHeight;
+ start += height;
}
+
+ return start;
}
int wxDataViewMainWindow::GetLineAt( unsigned int y ) const
{
- const wxDataViewModel *model = GetModel();
-
// check for the easy case first
- if ( !GetOwner()->HasFlag(wxDV_VARIABLE_LINE_HEIGHT) )
+ if ( !m_rowHeightCache || !GetOwner()->HasFlag(wxDV_VARIABLE_LINE_HEIGHT) )
return y / m_lineHeight;
- // TODO make more efficient
unsigned int row = 0;
+ if ( m_rowHeightCache->GetLineAt(y, row) )
+ return row;
+
+ // OnPaint asks GetLineAt for the very last y position and this is always
+ // below the last item (--> an invalid item). To prevent iterating over all
+ // items, check if y is below the last row.
+ // Because this is done very often (for each repaint) its worth to handle
+ // this special case separately.
+ int height = 0;
+ int start = 0;
+ unsigned int rowCount = GetRowCount();
+ if (rowCount == 0 ||
+ (m_rowHeightCache->GetLineInfo(rowCount - 1, start, height) &&
+ y >= static_cast(start + height)))
+ {
+ return rowCount;
+ }
+
+ // sum all item heights until y is reached
unsigned int yy = 0;
for (;;)
{
- const wxDataViewTreeNode* node = GetTreeNodeByRow(row);
- if (!node)
+ height = 0;
+ if ( !m_rowHeightCache->GetLineHeight(row, height) )
{
- // not really correct...
- return row + ((y-yy) / m_lineHeight);
- }
+ // row height not in cache -> get it from the renderer...
+ wxDataViewItem item = GetItemByRow(row);
+ if ( !item )
+ {
+ wxASSERT(row >= GetRowCount());
+ break;
+ }
- wxDataViewItem item = node->GetItem();
-
- unsigned int cols = GetOwner()->GetColumnCount();
- unsigned int col;
- int height = m_lineHeight;
- for (col = 0; col < cols; col++)
- {
- const wxDataViewColumn *column = GetOwner()->GetColumn(col);
- if (column->IsHidden())
- continue; // skip it!
-
- if ((col != 0) &&
- model->IsContainer(item) &&
- !model->HasContainerColumns(item))
- continue; // skip it!
-
- wxDataViewRenderer *renderer =
- const_cast(column->GetRenderer());
- renderer->PrepareForItem(model, item, column->GetModelColumn());
-
- height = wxMax( height, renderer->GetSize().y );
+ height = QueryAndCacheLineHeight(row, item);
}
yy += height;
if (y < yy)
- return row;
+ break;
row++;
}
+ return row;
}
int wxDataViewMainWindow::GetLineHeight( unsigned int row ) const
{
- const wxDataViewModel *model = GetModel();
-
- if (GetOwner()->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT)
- {
- wxASSERT( !IsVirtualList() );
-
- const wxDataViewTreeNode* node = GetTreeNodeByRow(row);
- // wxASSERT( node );
- if (!node) return m_lineHeight;
-
- wxDataViewItem item = node->GetItem();
-
- int height = m_lineHeight;
-
- unsigned int cols = GetOwner()->GetColumnCount();
- unsigned int col;
- for (col = 0; col < cols; col++)
- {
- const wxDataViewColumn *column = GetOwner()->GetColumn(col);
- if (column->IsHidden())
- continue; // skip it!
-
- if ((col != 0) &&
- model->IsContainer(item) &&
- !model->HasContainerColumns(item))
- continue; // skip it!
-
- wxDataViewRenderer *renderer =
- const_cast(column->GetRenderer());
- renderer->PrepareForItem(model, item, column->GetModelColumn());
-
- height = wxMax( height, renderer->GetSize().y );
- }
-
- return height;
- }
- else
- {
+ // check for the easy case first
+ if ( !m_rowHeightCache || !GetOwner()->HasFlag(wxDV_VARIABLE_LINE_HEIGHT) )
return m_lineHeight;
+
+ int height = 0;
+ if ( m_rowHeightCache->GetLineHeight(row, height) )
+ return height;
+
+ wxDataViewItem item = GetItemByRow(row);
+ if ( !item )
+ return m_lineHeight;
+
+ height = QueryAndCacheLineHeight(row, item);
+ return height;
+}
+
+int wxDataViewMainWindow::QueryAndCacheLineHeight(unsigned int row, wxDataViewItem item) const
+{
+ const wxDataViewModel *model = GetModel();
+ int height = m_lineHeight;
+ unsigned int cols = GetOwner()->GetColumnCount();
+ unsigned int col;
+ for (col = 0; col < cols; col++)
+ {
+ const wxDataViewColumn *column = GetOwner()->GetColumn(col);
+ if (column->IsHidden())
+ continue; // skip it!
+
+ if ((col != 0) &&
+ model->IsContainer(item) &&
+ !model->HasContainerColumns(item))
+ continue; // skip it!
+
+ wxDataViewRenderer *renderer =
+ const_cast(column->GetRenderer());
+ renderer->PrepareForItem(model, item, column->GetModelColumn());
+
+ height = wxMax(height, renderer->GetSize().y);
}
+
+ // ... and store the height in the cache
+ m_rowHeightCache->Put(row, height);
+
+ return height;
}
@@ -3602,6 +3636,13 @@ void wxDataViewMainWindow::Expand( unsigned int row )
if (!node->HasChildren())
return;
+ if ( m_rowHeightCache )
+ {
+ // Expand makes new rows visible thus we invalidates all following
+ // rows in the height cache
+ m_rowHeightCache->Remove(row);
+ }
+
if (!node->IsOpen())
{
if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_EXPANDING, node->GetItem()) )
@@ -3651,6 +3692,13 @@ void wxDataViewMainWindow::Collapse(unsigned int row)
if (!node->HasChildren())
return;
+ if ( m_rowHeightCache )
+ {
+ // Collapse hides rows thus we invalidates all following
+ // rows in the height cache
+ m_rowHeightCache->Remove(row);
+ }
+
if (node->IsOpen())
{
if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSING,node->GetItem()) )
@@ -4525,14 +4573,6 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
return;
}
- if(event.ButtonDown())
- {
- // Not skipping button down events would prevent the system from
- // setting focus to this window as most (all?) of them do by default,
- // so skip it to enable default handling.
- event.Skip();
- }
-
int x = event.GetX();
int y = event.GetY();
m_owner->CalcUnscrolledPosition( x, y, &x, &y );
@@ -4560,6 +4600,20 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
const unsigned int current = GetLineAt( y );
const wxDataViewItem item = GetItemByRow(current);
+ if(event.ButtonDown())
+ {
+ // Not skipping button down events would prevent the system from
+ // setting focus to this window as most (all?) of them do by default,
+ // so skip it to enable default handling.
+ event.Skip();
+
+ // Also stop editing if any mouse button is pressed: this is not really
+ // necessary for the left button, as it would result in a focus loss
+ // that would make the editor close anyhow, but we do need to do it for
+ // the other ones and it does no harm to do it for the left one too.
+ FinishEditing();
+ }
+
// Handle right clicking here, before everything else as context menu
// events should be sent even when we click outside of any item, unlike all
// the other ones.
@@ -5016,20 +5070,25 @@ void wxDataViewMainWindow::UpdateColumnSizes()
int lastColX = colswidth - lastCol->GetWidth();
if ( lastColX < fullWinWidth )
{
- int desiredWidth = wxMax(fullWinWidth - lastColX, lastCol->GetMinWidth());
- if ( !lastCol->WXUpdateWidth(desiredWidth) )
+ const int availableWidth = fullWinWidth - lastColX;
+
+ // Never make the column automatically smaller than the last width it
+ // was explicitly given nor its minimum width.
+ if ( availableWidth <= wxMax(lastCol->GetMinWidth(),
+ lastCol->WXGetManuallySetWidth()) )
{
- // The column width didn't change, no need to do anything else.
return;
}
+ lastCol->WXUpdateWidth(availableWidth);
+
// All columns fit on screen, so we don't need horizontal scrolling.
// To prevent flickering scrollbar when resizing the window to be
// narrower, force-set the virtual width to 0 here. It will eventually
// be corrected at idle time.
SetVirtualSize(0, m_virtualSize.y);
- RefreshRect(wxRect(lastColX, 0, fullWinWidth - lastColX, GetSize().y));
+ RefreshRect(wxRect(lastColX, 0, availableWidth, GetSize().y));
}
else
{
@@ -5042,8 +5101,6 @@ void wxDataViewMainWindow::UpdateColumnSizes()
// wxDataViewCtrl
//-----------------------------------------------------------------------------
-WX_DEFINE_LIST(wxDataViewColumnList)
-
wxIMPLEMENT_DYNAMIC_CLASS(wxDataViewCtrl, wxDataViewCtrlBase);
wxBEGIN_EVENT_TABLE(wxDataViewCtrl, wxDataViewCtrlBase)
EVT_SIZE(wxDataViewCtrl::OnSize)
@@ -5054,8 +5111,7 @@ wxDataViewCtrl::~wxDataViewCtrl()
if (m_notifier)
GetModel()->RemoveNotifier( m_notifier );
- m_cols.Clear();
- m_colsBestWidths.clear();
+ DoClearColumns();
#if wxUSE_ACCESSIBILITY
SetAccessible(NULL);
@@ -5065,7 +5121,6 @@ wxDataViewCtrl::~wxDataViewCtrl()
void wxDataViewCtrl::Init()
{
- m_cols.DeleteContents(true);
m_notifier = NULL;
m_headerArea = NULL;
@@ -5166,9 +5221,6 @@ wxSize wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize& size)
void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
{
- if ( m_clientArea && GetColumnCount() )
- m_clientArea->UpdateColumnSizes();
-
// We need to override OnSize so that our scrolled
// window a) does call Layout() to use sizers for
// positioning the controls but b) does not query
@@ -5178,6 +5230,11 @@ void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
Layout();
+ // Update the last column size to take all the available space. Note that
+ // this must be done after calling Layout() to update m_clientArea size.
+ if ( m_clientArea && GetColumnCount() )
+ m_clientArea->UpdateColumnSizes();
+
AdjustScrollbars();
// We must redraw the headers if their height changed. Normally this
@@ -5315,7 +5372,7 @@ bool wxDataViewCtrl::AppendColumn( wxDataViewColumn *col )
if (!wxDataViewCtrlBase::AppendColumn(col))
return false;
- m_cols.Append( col );
+ m_cols.push_back( col );
m_colsBestWidths.push_back(CachedColWidthInfo());
OnColumnsCountChanged();
return true;
@@ -5326,7 +5383,7 @@ bool wxDataViewCtrl::PrependColumn( wxDataViewColumn *col )
if (!wxDataViewCtrlBase::PrependColumn(col))
return false;
- m_cols.Insert( col );
+ m_cols.insert(m_cols.begin(), col);
m_colsBestWidths.insert(m_colsBestWidths.begin(), CachedColWidthInfo());
OnColumnsCountChanged();
return true;
@@ -5337,7 +5394,7 @@ bool wxDataViewCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *col )
if (!wxDataViewCtrlBase::InsertColumn(pos,col))
return false;
- m_cols.Insert( pos, col );
+ m_cols.insert(m_cols.begin() + pos, col);
m_colsBestWidths.insert(m_colsBestWidths.begin() + pos, CachedColWidthInfo());
OnColumnsCountChanged();
return true;
@@ -5386,7 +5443,7 @@ void wxDataViewCtrl::DoSetIndent()
unsigned int wxDataViewCtrl::GetColumnCount() const
{
- return m_cols.GetCount();
+ return m_cols.size();
}
bool wxDataViewCtrl::SetRowHeight( int lineHeight )
@@ -5538,12 +5595,12 @@ void wxDataViewCtrl::ColumnMoved(wxDataViewColumn *col, unsigned int new_pos)
bool wxDataViewCtrl::DeleteColumn( wxDataViewColumn *column )
{
- wxDataViewColumnList::compatibility_iterator ret = m_cols.Find( column );
- if (!ret)
+ const int idx = GetColumnIndex(column);
+ if ( idx == wxNOT_FOUND )
return false;
- m_colsBestWidths.erase(m_colsBestWidths.begin() + GetColumnIndex(column));
- m_cols.Erase(ret);
+ m_colsBestWidths.erase(m_colsBestWidths.begin() + idx);
+ m_cols.erase(m_cols.begin() + idx);
if ( m_clientArea->GetCurrentColumn() == column )
m_clientArea->ClearCurrentColumn();
@@ -5553,10 +5610,20 @@ bool wxDataViewCtrl::DeleteColumn( wxDataViewColumn *column )
return true;
}
+void wxDataViewCtrl::DoClearColumns()
+{
+ typedef wxVector::const_iterator citer;
+ for ( citer it = m_cols.begin(); it != m_cols.end(); ++it )
+ delete *it;
+}
+
bool wxDataViewCtrl::ClearColumns()
{
SetExpanderColumn(NULL);
- m_cols.Clear();
+
+ DoClearColumns();
+
+ m_cols.clear();
m_sortingColumnIdxs.clear();
m_colsBestWidths.clear();
diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp
index 7a405e2c9b..df0ac9c572 100644
--- a/src/generic/datectlg.cpp
+++ b/src/generic/datectlg.cpp
@@ -262,9 +262,7 @@ private:
if ( m_combo )
{
- wxArrayString allowedChars;
- for ( wxChar c = wxT('0'); c <= wxT('9'); c++ )
- allowedChars.Add(wxString(c, 1));
+ wxString allowedChars = wxS("0123456789");
const wxChar *p2 = m_format.c_str();
while ( *p2 )
@@ -272,12 +270,12 @@ private:
if ( *p2 == '%')
p2 += 2;
else
- allowedChars.Add(wxString(*p2++, 1));
+ allowedChars << (*p2++); // append char
}
#if wxUSE_VALIDATORS
wxTextValidator tv(wxFILTER_INCLUDE_CHAR_LIST);
- tv.SetIncludes(allowedChars);
+ tv.SetCharIncludes(allowedChars);
m_combo->SetValidator(tv);
#endif
diff --git a/src/generic/descrip.mms b/src/generic/descrip.mms
index 082f7d5917..2d671b3751 100644
--- a/src/generic/descrip.mms
+++ b/src/generic/descrip.mms
@@ -2,7 +2,7 @@
# *
# Make file for VMS *
# Author : J.Jansen (joukj@hrem.nano.tudelft.nl) *
-# Date : 14 June 2016 *
+# Date : 1 February 2019 *
# *
#*****************************************************************************
.first
@@ -95,7 +95,8 @@ OBJECTS = \
editlbox.obj,datavgen.obj,dbgrptg.obj,dragimgg.obj,\
richmsgdlgg.obj,commandlinkbuttong.obj,spinctlg.obj,\
markuptext.obj,bannerwindow.obj,timectrlg.obj,richtooltipg.obj\
- ,statbmpg.obj,splash.obj,collheaderctrlg.obj,graphicc.obj
+ ,statbmpg.obj,splash.obj,collheaderctrlg.obj,graphicc.obj,\
+ rowheightcache.obj
SOURCES = \
aboutdlgg.cpp,\
@@ -168,7 +169,8 @@ SOURCES = \
datavgen.cpp,dbgrptg.cpp,dragimgg.cpp,richmsgdlgg.cpp,\
commandlinkbuttong.cpp,spinctlg.cpp markuptext.cpp \
bannerwindow.cpp timectrlg.cpp richtooltipg.cpp statbmpg.cpp \
- textmeasure.cpp collheaderctrlg.cpp graphicc.cpp
+ textmeasure.cpp collheaderctrlg.cpp graphicc.cpp \
+ rowheightcache.cpp
.ifdef __WXMOTIF__
OBJECTS0=statusbr.obj,statline.obj,notebook.obj,spinctlg.obj,collpaneg.obj,\
@@ -314,3 +316,4 @@ textmeasure.obj : textmeasure.cpp
editlbox.obj : editlbox.cpp
collheaderctrlg.obj : collheaderctrlg.cpp
graphicc.obj : graphicc.cpp
+rowheightcache.obj : rowheightcache.cpp
diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp
index 84ceb8b97d..f5cc1e418d 100644
--- a/src/generic/dirctrlg.cpp
+++ b/src/generic/dirctrlg.cpp
@@ -283,9 +283,9 @@ static int wxCMPFUNC_CONV wxDirCtrlStringCompareFunction(const wxString& strFirs
wxDirItemData::wxDirItemData(const wxString& path, const wxString& name,
bool isDir)
+ : m_path(path)
+ , m_name(name)
{
- m_path = path;
- m_name = name;
/* Insert logic to detect hidden files here
* In UnixLand we just check whether the first char is a dot
* For FileNameFromPath read LastDirNameInThisPath ;-) */
@@ -694,7 +694,7 @@ void wxGenericDirCtrl::PopulateNode(wxTreeItemId parentId)
wxASSERT(data);
- wxString search,path,filename;
+ wxString path;
wxString dirName(data->m_path);
@@ -1441,10 +1441,10 @@ public:
};
wxFileIconsTable::wxFileIconsTable()
+ : m_size(16, 16)
{
m_HashTable = NULL;
m_smallImageList = NULL;
- m_size = wxSize(16, 16);
}
wxFileIconsTable::~wxFileIconsTable()
diff --git a/src/generic/dragimgg.cpp b/src/generic/dragimgg.cpp
index 270717a63b..9de2d1c401 100644
--- a/src/generic/dragimgg.cpp
+++ b/src/generic/dragimgg.cpp
@@ -211,7 +211,6 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
// dragged.
wxSize clientSize;
- wxPoint pt;
if (!m_fullScreen)
{
clientSize = window->GetClientSize();
@@ -225,7 +224,6 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
clientSize.x = w; clientSize.y = h;
if (rect)
{
- pt.x = m_boundingRect.x; pt.y = m_boundingRect.y;
clientSize.x = m_boundingRect.width; clientSize.y = m_boundingRect.height;
}
else
diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp
index ebebea96df..f855e1e37e 100644
--- a/src/generic/graphicc.cpp
+++ b/src/generic/graphicc.cpp
@@ -1869,7 +1869,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
#endif
#ifdef __WXQT__
- m_qtPainter = (QPainter*) dc.GetHandle();
+ m_qtPainter = static_cast(dc.GetHandle());
// create a internal buffer (fallback if cairo_qt_surface is missing)
m_qtImage = new QImage(width, height, QImage::Format_ARGB32_Premultiplied);
// clear the buffer to be painted over the current contents
@@ -2084,7 +2084,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC&
#endif
#ifdef __WXQT__
- m_qtPainter = NULL;
+ m_qtPainter = static_cast(dc.GetHandle());
// create a internal buffer (fallback if cairo_qt_surface is missing)
m_qtImage = new QImage(width, height, QImage::Format_ARGB32_Premultiplied);
// clear the buffer to be painted over the current contents
@@ -2234,6 +2234,11 @@ wxCairoContext::wxCairoContext(wxGraphicsRenderer* renderer, HWND hWnd)
wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context )
: wxGraphicsContext(renderer)
{
+#ifdef __WXQT__
+ m_qtPainter = NULL;
+ m_qtImage = NULL;
+ m_qtSurface = NULL;
+#endif
#ifdef __WXMSW__
m_mswSurface = NULL;
m_mswStateSavedDC = 0;
@@ -2288,6 +2293,11 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window)
wxCairoContext::wxCairoContext(wxGraphicsRenderer* renderer) :
wxGraphicsContext(renderer)
{
+#ifdef __WXQT__
+ m_qtPainter = NULL;
+ m_qtImage = NULL;
+ m_qtSurface = NULL;
+#endif
#ifdef __WXMSW__
m_mswSurface = NULL;
m_mswStateSavedDC = 0;
@@ -2566,6 +2576,7 @@ void wxCairoContext::Flush()
if ( m_qtSurface )
{
cairo_surface_flush(m_qtSurface);
+ m_qtPainter->drawImage( 0,0, *m_qtImage );
}
#endif
}
@@ -3319,13 +3330,13 @@ wxGraphicsRenderer* wxGraphicsRenderer::GetCairoRenderer()
#endif // wxUSE_CAIRO/!wxUSE_CAIRO
-// MSW and OS X have their own native default renderers, but the other ports
-// use Cairo by default
-#if !(defined(__WXMSW__) || defined(__WXOSX__))
+// MSW and OS X and Qt on Windows have their own native default renderers, but the other ports
+// use Cairo by default.
+#if !(defined(__WXMSW__) || defined(__WXOSX__) || (defined(__WXQT__) && defined(__WIN32__)))
wxGraphicsRenderer* wxGraphicsRenderer::GetDefaultRenderer()
{
return GetCairoRenderer();
}
-#endif // !(__WXMSW__ || __WXOSX__)
+#endif // !(__WXMSW__ || __WXOSX__ || (defined(__WXQT__) && defined(__WIN32__)))
#endif // wxUSE_GRAPHICS_CONTEXT
diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp
index f6993de388..a193972da3 100644
--- a/src/generic/grid.cpp
+++ b/src/generic/grid.cpp
@@ -7865,6 +7865,16 @@ void wxGrid::SetColFormatFloat(int col, int width, int precision)
SetColFormatCustom(col, typeName);
}
+void wxGrid::SetColFormatDate(int col, const wxString& format)
+{
+ wxString typeName = wxGRID_VALUE_DATE;
+ if ( !format.empty() )
+ {
+ typeName << ':' << format;
+ }
+ SetColFormatCustom(col, typeName);
+}
+
void wxGrid::SetColFormatCustom(int col, const wxString& typeName)
{
wxGridCellAttr *attr = m_table->GetAttr(-1, col, wxGridCellAttr::Col );
@@ -9364,6 +9374,15 @@ int wxGridTypeRegistry::FindDataType(const wxString& typeName)
}
else
#endif // wxUSE_COMBOBOX
+#if wxUSE_DATEPICKCTRL
+ if ( typeName == wxGRID_VALUE_DATE )
+ {
+ RegisterDataType(wxGRID_VALUE_DATE,
+ new wxGridCellDateRenderer,
+ new wxGridCellDateEditor);
+ }
+ else
+#endif // wxUSE_DATEPICKCTRL
{
return wxNOT_FOUND;
}
diff --git a/src/generic/gridctrl.cpp b/src/generic/gridctrl.cpp
index ecd8ac5d13..e4f8df8ffd 100644
--- a/src/generic/gridctrl.cpp
+++ b/src/generic/gridctrl.cpp
@@ -77,28 +77,27 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
#if wxUSE_DATETIME
-// Enables a grid cell to display a formatted date and or time
+// Enables a grid cell to display a formatted date
-wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat)
+wxGridCellDateRenderer::wxGridCellDateRenderer(const wxString& outformat)
{
- m_iformat = informat;
- m_oformat = outformat;
+ if ( outformat.empty() )
+ {
+ m_oformat = "%x"; // Localized date representation.
+ }
+ else
+ {
+ m_oformat = outformat;
+ }
m_tz = wxDateTime::Local;
- m_dateDef = wxDefaultDateTime;
}
-wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const
+wxGridCellRenderer *wxGridCellDateRenderer::Clone() const
{
- wxGridCellDateTimeRenderer *renderer = new wxGridCellDateTimeRenderer;
- renderer->m_iformat = m_iformat;
- renderer->m_oformat = m_oformat;
- renderer->m_dateDef = m_dateDef;
- renderer->m_tz = m_tz;
-
- return renderer;
+ return new wxGridCellDateRenderer(*this);
}
-wxString wxGridCellDateTimeRenderer::GetString(const wxGrid& grid, int row, int col)
+wxString wxGridCellDateRenderer::GetString(const wxGrid& grid, int row, int col)
{
wxGridTableBase *table = grid.GetTable();
@@ -121,8 +120,7 @@ wxString wxGridCellDateTimeRenderer::GetString(const wxGrid& grid, int row, int
if (!hasDatetime )
{
text = table->GetValue(row, col);
- const char * const end = val.ParseFormat(text, m_iformat, m_dateDef);
- hasDatetime = end && !*end;
+ hasDatetime = Parse(text, val);
}
if ( hasDatetime )
@@ -132,12 +130,18 @@ wxString wxGridCellDateTimeRenderer::GetString(const wxGrid& grid, int row, int
return text;
}
-void wxGridCellDateTimeRenderer::Draw(wxGrid& grid,
- wxGridCellAttr& attr,
- wxDC& dc,
- const wxRect& rectCell,
- int row, int col,
- bool isSelected)
+bool wxGridCellDateRenderer::Parse(const wxString& text, wxDateTime& result)
+{
+ wxString::const_iterator end;
+ return result.ParseDate(text, &end) && end == text.end();
+}
+
+void wxGridCellDateRenderer::Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rectCell,
+ int row, int col,
+ bool isSelected)
{
wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected);
@@ -154,20 +158,41 @@ void wxGridCellDateTimeRenderer::Draw(wxGrid& grid,
grid.DrawTextRectangle(dc, GetString(grid, row, col), rect, hAlign, vAlign);
}
-wxSize wxGridCellDateTimeRenderer::GetBestSize(wxGrid& grid,
- wxGridCellAttr& attr,
- wxDC& dc,
- int row, int col)
+wxSize wxGridCellDateRenderer::GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col)
{
return DoGetBestSize(attr, dc, GetString(grid, row, col));
}
-void wxGridCellDateTimeRenderer::SetParameters(const wxString& params)
+void wxGridCellDateRenderer::SetParameters(const wxString& params)
{
if (!params.empty())
m_oformat=params;
}
+
+// Enables a grid cell to display a formatted date and or time
+
+wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat)
+ : wxGridCellDateRenderer(outformat)
+ , m_iformat(informat)
+ , m_dateDef(wxDefaultDateTime)
+{
+}
+
+wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const
+{
+ return new wxGridCellDateTimeRenderer(*this);
+}
+
+bool wxGridCellDateTimeRenderer::Parse(const wxString& text, wxDateTime& result)
+{
+ const char * const end = result.ParseFormat(text, m_iformat, m_dateDef);
+ return end && !*end;
+}
+
#endif // wxUSE_DATETIME
// ----------------------------------------------------------------------------
diff --git a/src/generic/grideditors.cpp b/src/generic/grideditors.cpp
index 0fd043ad10..f8a3eb7871 100644
--- a/src/generic/grideditors.cpp
+++ b/src/generic/grideditors.cpp
@@ -38,6 +38,7 @@
#include "wx/tokenzr.h"
#include "wx/renderer.h"
#include "wx/headerctrl.h"
+#include "wx/datectrl.h"
#include "wx/generic/gridsel.h"
#include "wx/generic/grideditors.h"
@@ -1710,5 +1711,162 @@ wxGridCellAutoWrapStringEditor::Create(wxWindow* parent,
wxTE_MULTILINE | wxTE_RICH);
}
+#if wxUSE_DATEPICKCTRL
+
+// ----------------------------------------------------------------------------
+// wxGridCellDateEditor
+// ----------------------------------------------------------------------------
+
+#if defined ( __WXGTK__ )
+// Desired behavior is to close the editor control on ESC without updating the
+// table, and to close with update on ENTER. On wxMSW wxWANTS_CHARS is enough
+// for that, but on wxGTK a bit of special processing is required to forward
+// some of the key events from wxDatePickerCtrl to the generic cell editor
+// event handler.
+struct wxGridCellDateEditorKeyHandler
+{
+ explicit wxGridCellDateEditorKeyHandler(wxGridCellEditorEvtHandler* handler)
+ : m_handler(handler)
+ {}
+
+ void operator()(wxKeyEvent& event) const
+ {
+ switch ( event.GetKeyCode() )
+ {
+ case WXK_ESCAPE:
+ m_handler->OnKeyDown(event);
+ break;
+
+ case WXK_RETURN:
+ case WXK_NUMPAD_ENTER:
+ wxPostEvent(m_handler, wxCommandEvent(wxEVT_GRID_HIDE_EDITOR));
+ event.Skip();
+ break;
+
+ default:
+ event.Skip();
+ break;
+ }
+ }
+
+ wxGridCellEditorEvtHandler* m_handler;
+};
+#endif // __WXGTK__
+
+void wxGridCellDateEditor::Create(wxWindow* parent, wxWindowID id,
+ wxEvtHandler* evtHandler)
+{
+ m_control = new wxDatePickerCtrl(parent, id,
+ wxDefaultDateTime,
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxDP_DEFAULT |
+ wxDP_SHOWCENTURY |
+ wxWANTS_CHARS);
+
+ wxGridCellEditor::Create(parent, id, evtHandler);
+
+#if defined ( __WXGTK__ )
+ // Install a handler for ESC and ENTER keys.
+ wxGridCellEditorEvtHandler* handler =
+ wxDynamicCast(evtHandler, wxGridCellEditorEvtHandler);
+ if ( handler )
+ {
+ handler->Bind(wxEVT_CHAR, wxGridCellDateEditorKeyHandler(handler));
+ }
+#endif // __WXGTK__
+}
+
+void wxGridCellDateEditor::SetSize(const wxRect& r)
+{
+ wxASSERT_MSG(m_control, "The wxGridCellDateEditor must be created first!");
+
+ const wxSize bestSize = DatePicker()->GetBestSize();
+
+ wxRect rect(r.GetPosition(), bestSize);
+
+ // Allow edit picker to become a bit wider, if necessary, but no more than
+ // twice as wide as the best width, otherwise they just look ugly.
+ if ( r.GetWidth() > bestSize.GetWidth() )
+ {
+ rect.SetWidth(wxMin(r.GetWidth(), 2*bestSize.GetWidth()));
+ }
+
+ wxGridCellEditor::SetSize(rect);
+}
+
+void wxGridCellDateEditor::BeginEdit(int row, int col, wxGrid* grid)
+{
+ wxASSERT_MSG(m_control, "The wxGridCellDateEditor must be created first!");
+
+ const wxString dateStr = grid->GetTable()->GetValue(row, col);
+ if ( !m_value.ParseDate(dateStr) )
+ {
+ // Invalidate m_value, so that it always compares different
+ // to any value returned from DatePicker()->GetValue().
+ m_value = wxDefaultDateTime;
+ }
+ else
+ {
+ DatePicker()->SetValue(m_value);
+ }
+
+ DatePicker()->SetFocus();
+}
+
+bool wxGridCellDateEditor::EndEdit(int WXUNUSED(row), int WXUNUSED(col),
+ const wxGrid* WXUNUSED(grid),
+ const wxString& WXUNUSED(oldval),
+ wxString *newval)
+{
+ wxASSERT_MSG(m_control, "The wxGridCellDateEditor must be created first!");
+
+ const wxDateTime date = DatePicker()->GetValue();
+
+ if ( m_value == date )
+ {
+ return false;
+ }
+
+ m_value = date;
+
+ if ( newval )
+ {
+ *newval = m_value.FormatISODate();
+ }
+
+ return true;
+}
+
+void wxGridCellDateEditor::ApplyEdit(int row, int col, wxGrid* grid)
+{
+ grid->GetTable()->SetValue(row, col, m_value.FormatISODate());
+}
+
+void wxGridCellDateEditor::Reset()
+{
+ wxASSERT_MSG(m_control, "The wxGridCellDateEditor must be created first!");
+
+ m_value = DatePicker()->GetValue();
+}
+
+wxGridCellEditor *wxGridCellDateEditor::Clone() const
+{
+ return new wxGridCellDateEditor();
+}
+
+wxString wxGridCellDateEditor::GetValue() const
+{
+ wxASSERT_MSG(m_control, "The wxGridCellDateEditor must be created first!");
+
+ return DatePicker()->GetValue().FormatISODate();
+}
+
+wxDatePickerCtrl* wxGridCellDateEditor::DatePicker() const
+{
+ return static_cast(m_control);
+}
+
+#endif // wxUSE_DATEPICKCTRL
#endif // wxUSE_GRID
diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp
index d3fa849ad4..4529a849c3 100644
--- a/src/generic/headerctrlg.cpp
+++ b/src/generic/headerctrlg.cpp
@@ -686,8 +686,11 @@ void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
wxASSERT_MSG( !IsResizing(), "reentering column resize mode?" );
StartOrContinueResizing(col, xPhysical);
}
- else // on column itself
+ // on column itself - both header and column must have the appropriate
+ // flags to allow dragging the column
+ else if ( HasFlag(wxHD_ALLOW_REORDER) && GetColumn(col).IsReorderable() )
{
+
// start dragging the column
wxASSERT_MSG( !IsReordering(), "reentering column move mode?" );
diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp
index a8070ef340..971c2ee875 100644
--- a/src/generic/helpext.cpp
+++ b/src/generic/helpext.cpp
@@ -134,7 +134,8 @@ public:
wxString doc;
wxExtHelpMapEntry(int iid, wxString const &iurl, wxString const &idoc)
- { entryid = iid; url = iurl; doc = idoc; }
+ : entryid(iid), url(iurl), doc(idoc)
+ { }
};
void wxExtHelpController::DeleteList()
diff --git a/src/generic/htmllbox.cpp b/src/generic/htmllbox.cpp
index 507badf53b..cc7ef82ac1 100644
--- a/src/generic/htmllbox.cpp
+++ b/src/generic/htmllbox.cpp
@@ -672,6 +672,18 @@ void wxSimpleHtmlListBox::Clear()
void wxSimpleHtmlListBox::DoDeleteOneItem(unsigned int n)
{
+ // For consistency with the other wxItemContainer-derived classes, deselect
+ // the currently selected item if it, or any item before it, is being
+ // deleted, from a single-selection control.
+ if ( !HasMultipleSelection() )
+ {
+ const int sel = GetSelection();
+ if ( sel != wxNOT_FOUND && static_cast(sel) >= n )
+ {
+ SetSelection(wxNOT_FOUND);
+ }
+ }
+
m_items.RemoveAt(n);
m_HTMLclientData.RemoveAt(n);
diff --git a/src/generic/markuptext.cpp b/src/generic/markuptext.cpp
index e49938ccab..c1e7239f01 100644
--- a/src/generic/markuptext.cpp
+++ b/src/generic/markuptext.cpp
@@ -123,8 +123,6 @@ public:
m_dc(dc),
m_rect(rect),
m_flags(flags)
- {
- m_pos = m_rect.x;
// We don't initialize the base class initial text background colour to
// the valid value because we want to be able to detect when we revert
@@ -134,7 +132,9 @@ public:
// background isn't used anyhow when the background mode is transparent
// but it might affect the caller if it sets the background mode to
// opaque and draws some text after using us.
- m_origTextBackground = dc.GetTextBackground();
+ , m_origTextBackground(dc.GetTextBackground())
+ , m_pos(m_rect.x)
+ {
}
virtual void OnAttrStart(const Attr& attr) wxOVERRIDE
diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp
index 12fb482dec..404ed62ed0 100644
--- a/src/generic/odcombo.cpp
+++ b/src/generic/odcombo.cpp
@@ -240,7 +240,7 @@ void wxVListBoxComboPopup::SendComboBoxEvent( int selection )
evt.SetInt(selection);
// Set client data, if any
- if ( selection >= 0 && (int)m_clientDatas.GetCount() > selection )
+ if ( selection >= 0 && (int)m_clientDatas.size() > selection )
{
void* clientData = m_clientDatas[selection];
if ( m_clientDataItemsType == wxClientData_Object )
@@ -523,7 +523,7 @@ void wxVListBoxComboPopup::Insert( const wxString& item, int pos )
m_strings.Insert(item,pos);
if ( (int)m_clientDatas.size() >= pos )
- m_clientDatas.Insert(NULL, pos);
+ m_clientDatas.insert(m_clientDatas.begin()+pos, NULL);
m_widths.insert(m_widths.begin()+pos, -1);
m_widthsDirty = true;
@@ -578,11 +578,11 @@ void wxVListBoxComboPopup::ClearClientDatas()
{
if ( m_clientDataItemsType == wxClientData_Object )
{
- for ( size_t i=0; i::iterator it = m_clientDatas.begin(); it != m_clientDatas.end(); ++it )
+ delete (wxClientData*) *it;
}
- m_clientDatas.Empty();
+ m_clientDatas.clear();
m_clientDataItemsType = wxClientData_None;
}
@@ -600,21 +600,18 @@ void wxVListBoxComboPopup::SetItemClientData( unsigned int n,
void* wxVListBoxComboPopup::GetItemClientData(unsigned int n) const
{
- if ( m_clientDatas.GetCount() > n )
- return m_clientDatas[n];
-
- return NULL;
+ return n < m_clientDatas.size() ? m_clientDatas[n] : NULL;
}
void wxVListBoxComboPopup::Delete( unsigned int item )
{
// Remove client data, if set
- if ( m_clientDatas.GetCount() )
+ if ( !m_clientDatas.empty() )
{
if ( m_clientDataItemsType == wxClientData_Object )
delete (wxClientData*) m_clientDatas[item];
- m_clientDatas.RemoveAt(item);
+ m_clientDatas.erase(m_clientDatas.begin()+item);
}
m_strings.RemoveAt(item);
diff --git a/src/generic/richtooltipg.cpp b/src/generic/richtooltipg.cpp
index b774341d33..1905538a08 100644
--- a/src/generic/richtooltipg.cpp
+++ b/src/generic/richtooltipg.cpp
@@ -47,7 +47,10 @@
#include "wx/textwrapper.h"
#ifdef __WXMSW__
- #include "wx/msw/uxtheme.h"
+ #if wxUSE_UXTHEME
+ #include "wx/msw/uxtheme.h"
+ #define HAVE_MSW_THEME
+ #endif
#endif
// ----------------------------------------------------------------------------
@@ -86,7 +89,7 @@ public:
// Determine the appropriate title font for the current platform.
titleFont = labelTitle->GetFont();
-#ifdef __WXMSW__
+#ifdef HAVE_MSW_THEME
// When using themes MSW tooltips use larger bluish version of the
// normal font.
if ( UseTooltipTheme() )
@@ -110,7 +113,7 @@ public:
labelTitle->SetForegroundColour(wxRGBToColour(c));
}
else
-#endif // __WXMSW__
+#endif // HAVE_MSW_THEME
{
// Everything else, including "classic" MSW look uses just the
// bold version of the base font.
@@ -132,7 +135,7 @@ public:
wxTextSizerWrapper wrapper(this);
wxSizer* sizerText = wrapper.CreateSizer(message, -1 /* No wrapping */);
-#ifdef __WXMSW__
+#ifdef HAVE_MSW_THEME
if ( icon.IsOk() && UseTooltipTheme() )
{
// Themed tooltips under MSW align the text with the title, not
@@ -144,7 +147,7 @@ public:
sizerText = sizerTextIndent;
}
-#endif // !__WXMSW__
+#endif // HAVE_MSW_THEME
sizerTop->Add(sizerText,
wxSizerFlags().DoubleBorder(wxLEFT|wxRIGHT|wxBOTTOM)
.Centre());
@@ -167,7 +170,7 @@ public:
if ( !colStart.IsOk() )
{
// Determine the best colour(s) to use on our own.
-#ifdef __WXMSW__
+#ifdef HAVE_MSW_THEME
if ( UseTooltipTheme() )
{
wxUxThemeHandle hTheme(GetParent(), L"TOOLTIP");
@@ -198,7 +201,7 @@ public:
colEnd = wxRGBToColour(c2);
}
else
-#endif // __WXMSW__
+#endif // HAVE_MSW_THEME
{
colStart = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK);
}
@@ -270,26 +273,26 @@ protected:
}
private:
-#ifdef __WXMSW__
+#ifdef HAVE_MSW_THEME
// Returns non-NULL theme only if we're using Win7-style tooltips.
static bool UseTooltipTheme()
{
// Even themed applications under XP still use "classic" tooltips.
if ( wxGetWinVersion() <= wxWinVersion_XP )
return false;
- else
- return wxUxThemeIsActive();
+ else
+ return wxUxThemeIsActive();
}
-#endif // __WXMSW__
+#endif // HAVE_MSW_THEME
// For now we just hard code the tip height, would be nice to do something
// smarter in the future.
static int GetTipHeight()
{
-#ifdef __WXMSW__
+#ifdef HAVE_MSW_THEME
if ( UseTooltipTheme() )
return 20;
-#endif // __WXMSW__
+#endif // HAVE_MSW_THEME
return 15;
}
diff --git a/src/generic/rowheightcache.cpp b/src/generic/rowheightcache.cpp
new file mode 100644
index 0000000000..3eb0e68a24
--- /dev/null
+++ b/src/generic/rowheightcache.cpp
@@ -0,0 +1,332 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: generic/rowheightcache.cpp
+// Purpose: height cache of rows in a dataview
+// Author: Jens Goepfert (mail@jensgoepfert.de)
+// Created: 2018-03-06
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#endif // WX_PRECOMP
+
+#include "wx/generic/private/rowheightcache.h"
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// RowRanges
+// ----------------------------------------------------------------------------
+
+void RowRanges::Add(unsigned int row)
+{
+ size_t count = m_ranges.size();
+ size_t rngIdx = 0;
+ for (rngIdx = 0; rngIdx < count; ++rngIdx)
+ {
+ RowRange &rng = m_ranges[rngIdx];
+
+ if (row >= rng.from && rng.to > row)
+ {
+ // index already in range
+ return;
+ }
+
+ if (row == rng.from - 1)
+ {
+ // extend range at the beginning (to the left)
+ rng.from = row;
+ // no cleanup necessary
+ return;
+ }
+ if (row == rng.to)
+ {
+ // extend range at the end (set to row+1 because 'to' is not
+ // including)
+ rng.to = row + 1;
+ CleanUp(rngIdx);
+ return;
+ }
+
+ if (rng.from > row + 1)
+ {
+ // this range is already behind row index, so break here and insert
+ // a new range before
+ break;
+ }
+ }
+
+ RowRange newRange;
+ newRange.from = row;
+ newRange.to = row + 1;
+ m_ranges.insert(m_ranges.begin() + rngIdx, newRange);
+}
+
+void RowRanges::Remove(unsigned int row)
+{
+ size_t count = m_ranges.size();
+ size_t rngIdx = 0;
+ while (rngIdx < count)
+ {
+ RowRange &rng = m_ranges[rngIdx];
+ if (rng.from >= row)
+ {
+ // this range starts behind row index, so remove it
+ m_ranges.erase(m_ranges.begin() + rngIdx);
+ count--;
+ continue;
+ }
+ if (rng.to > row)
+ {
+ // this ranges includes row, so cut off at row index to exclude row
+ rng.to = row;
+ }
+
+ rngIdx += 1;
+ }
+}
+
+
+void RowRanges::CleanUp(unsigned int idx)
+{
+ size_t count = m_ranges.size();
+
+ wxCHECK_RET( idx < count, "Wrong index" );
+
+ size_t rngIdx = 0;
+ if (idx > 0)
+ {
+ // start one RowRange before
+ rngIdx = idx - 1;
+ }
+
+ RowRange *prevRng = &m_ranges[rngIdx];
+ rngIdx++;
+ while (rngIdx <= idx + 1 && rngIdx < count)
+ {
+ RowRange &rng = m_ranges[rngIdx];
+
+ if (prevRng->to == rng.from)
+ {
+ // this range starts where the previous range began, so remove this
+ // and set the to-value of the previous range to the to-value of
+ // this range
+ prevRng->to = rng.to;
+ m_ranges.erase(m_ranges.begin() + rngIdx);
+ count--;
+ continue;
+ }
+
+ prevRng = &rng;
+ rngIdx += 1;
+ }
+}
+
+bool RowRanges::Has(unsigned int row) const
+{
+ size_t count = m_ranges.size();
+ for (size_t rngIdx = 0; rngIdx < count; rngIdx++)
+ {
+ const RowRange &rng = m_ranges[rngIdx];
+ if (rng.from <= row && row < rng.to)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+unsigned int RowRanges::CountAll() const
+{
+ unsigned int ctr = 0;
+ size_t count = m_ranges.size();
+ for (size_t rngIdx = 0; rngIdx < count; rngIdx++)
+ {
+ const RowRange &rng = m_ranges[rngIdx];
+ ctr += rng.to - rng.from;
+ }
+ return ctr;
+}
+
+unsigned int RowRanges::CountTo(unsigned int row) const
+{
+ unsigned int ctr = 0;
+ size_t count = m_ranges.size();
+ for (size_t rngIdx = 0; rngIdx < count; rngIdx++)
+ {
+ const RowRange &rng = m_ranges[rngIdx];
+ if (rng.from > row)
+ {
+ break;
+ }
+ else if (rng.to < row)
+ {
+ ctr += rng.to - rng.from;
+ }
+ else
+ {
+ ctr += row - rng.from;
+ break;
+ }
+ }
+ return ctr;
+}
+
+// ----------------------------------------------------------------------------
+// HeightCache
+// ----------------------------------------------------------------------------
+
+bool HeightCache::GetLineInfo(unsigned int row, int &start, int &height)
+{
+ int y = 0;
+ bool found = false;
+ HeightToRowRangesMap::iterator it;
+ for (it = m_heightToRowRange.begin(); it != m_heightToRowRange.end(); ++it)
+ {
+ int rowHeight = it->first;
+ RowRanges* rowRanges = it->second;
+ if (rowRanges->Has(row))
+ {
+ height = rowHeight;
+ found = true;
+ }
+ y += rowHeight * (rowRanges->CountTo(row));
+ }
+ if (found)
+ {
+ start = y;
+ }
+ return found;
+}
+
+bool HeightCache::GetLineStart(unsigned int row, int &start)
+{
+ int height = 0;
+ return GetLineInfo(row, start, height);
+}
+
+bool HeightCache::GetLineHeight(unsigned int row, int &height)
+{
+ HeightToRowRangesMap::iterator it;
+ for (it = m_heightToRowRange.begin(); it != m_heightToRowRange.end(); ++it)
+ {
+ int rowHeight = it->first;
+ RowRanges* rowRanges = it->second;
+ if (rowRanges->Has(row))
+ {
+ height = rowHeight;
+ return true;
+ }
+ }
+ return false;
+}
+
+bool HeightCache::GetLineAt(int y, unsigned int &row)
+{
+ unsigned int total = 0;
+ HeightToRowRangesMap::iterator it;
+ for (it = m_heightToRowRange.begin(); it != m_heightToRowRange.end(); ++it)
+ {
+ RowRanges* rowRanges = it->second;
+ total += rowRanges->CountAll();
+ }
+
+ if (total == 0)
+ {
+ return false;
+ }
+
+ int lo = 0;
+ int hi = total;
+ int start, height;
+ while (lo < hi)
+ {
+ int mid = (lo + hi) / 2;
+ if (GetLineInfo(mid, start, height))
+ {
+ if (start + height <= y)
+ {
+ lo = mid + 1;
+ }
+ else
+ {
+ hi = mid;
+ }
+ }
+ else
+ {
+ // should never happen, except the HeightCache has gaps which is an
+ // invalid state
+ return false;
+ }
+ }
+ if (GetLineInfo(lo, start, height))
+ {
+ if (y < start)
+ {
+ // given y point is before the first row
+ return false;
+ }
+ row = lo;
+ return true;
+ }
+ else
+ {
+ // given y point is after the last row
+ return false;
+ }
+}
+
+void HeightCache::Put(unsigned int row, int height)
+{
+ RowRanges *rowRanges = m_heightToRowRange[height];
+ if (rowRanges == NULL)
+ {
+ rowRanges = new RowRanges();
+ m_heightToRowRange[height] = rowRanges;
+ }
+ rowRanges->Add(row);
+}
+
+void HeightCache::Remove(unsigned int row)
+{
+ HeightToRowRangesMap::iterator it;
+ for (it = m_heightToRowRange.begin(); it != m_heightToRowRange.end(); ++it)
+ {
+ RowRanges* rowRanges = it->second;
+ rowRanges->Remove(row);
+ }
+}
+
+void HeightCache::Clear()
+{
+ HeightToRowRangesMap::iterator it;
+ for (it = m_heightToRowRange.begin(); it != m_heightToRowRange.end(); ++it)
+ {
+ RowRanges* rowRanges = it->second;
+ delete rowRanges;
+ }
+ m_heightToRowRange.clear();
+}
+
+HeightCache::~HeightCache()
+{
+ Clear();
+}
diff --git a/src/generic/splash.cpp b/src/generic/splash.cpp
index 6094bd190c..add0af2271 100644
--- a/src/generic/splash.cpp
+++ b/src/generic/splash.cpp
@@ -144,8 +144,8 @@ wxSplashScreenWindow::wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* par
wxWindowID id, const wxPoint& pos,
const wxSize& size, long style)
: wxWindow(parent, id, pos, size, style)
+ , m_bitmap(bitmap)
{
- m_bitmap = bitmap;
#if !defined(__WXGTK__) && wxUSE_PALETTE
bool hiColour = (wxDisplayDepth() >= 16) ;
diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp
index e0d5c1900c..e3849e3326 100644
--- a/src/generic/splitter.cpp
+++ b/src/generic/splitter.cpp
@@ -120,7 +120,6 @@ void wxSplitterWindow::Init()
m_sashPosition = 0;
m_requestedSashPosition = INT_MAX;
m_sashGravity = 0.0;
- m_lastSize = wxSize(0,0);
m_minimumPaneSize = 0;
m_sashCursorWE = wxCursor(wxCURSOR_SIZEWE);
m_sashCursorNS = wxCursor(wxCURSOR_SIZENS);
diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp
index e6cc4b1977..88091fd239 100644
--- a/src/generic/srchctlg.cpp
+++ b/src/generic/srchctlg.cpp
@@ -222,6 +222,12 @@ protected:
void OnPaint(wxPaintEvent&)
{
wxPaintDC dc(this);
+
+ // Clear the background in case of a user bitmap with alpha channel
+ dc.SetBrush(m_search->GetBackgroundColour());
+ dc.Clear();
+
+ // Draw the bitmap
dc.DrawBitmap(m_bmp, 0,0, true);
}
@@ -480,9 +486,8 @@ void wxSearchCtrl::LayoutControls()
wxSize sizeText = m_text->GetBestSize();
// make room for the search menu & clear button
int horizontalBorder = FromDIP(1) + ( sizeText.y - sizeText.y * 14 / 21 ) / 2;
- int x = horizontalBorder;
- width -= horizontalBorder*2;
- if (width < 0) width = 0;
+ int x = 0;
+ int textWidth = width;
wxSize sizeSearch(0,0);
wxSize sizeCancel(0,0);
@@ -492,11 +497,14 @@ void wxSearchCtrl::LayoutControls()
{
sizeSearch = m_searchButton->GetBestSize();
searchMargin = FromDIP(MARGIN);
+ x += horizontalBorder;
+ textWidth -= horizontalBorder;
}
if ( IsCancelButtonVisible() )
{
sizeCancel = m_cancelButton->GetBestSize();
cancelMargin = FromDIP(MARGIN);
+ textWidth -= horizontalBorder;
}
if ( sizeSearch.x + sizeCancel.x > width )
@@ -506,15 +514,18 @@ void wxSearchCtrl::LayoutControls()
searchMargin = 0;
cancelMargin = 0;
}
- wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin - FromDIP(1);
+ textWidth -= sizeSearch.x + sizeCancel.x + searchMargin + cancelMargin + FromDIP(1);
if (textWidth < 0) textWidth = 0;
// position the subcontrols inside the client area
- m_searchButton->SetSize(x, (height - sizeSearch.y) / 2,
- sizeSearch.x, sizeSearch.y);
- x += sizeSearch.x;
- x += searchMargin;
+ if ( IsSearchButtonVisible() )
+ {
+ m_searchButton->SetSize(x, (height - sizeSearch.y) / 2,
+ sizeSearch.x, sizeSearch.y);
+ x += sizeSearch.x;
+ x += searchMargin;
+ }
#ifdef __WXMSW__
// The text control is too high up on Windows; normally a text control looks OK because
@@ -528,12 +539,12 @@ void wxSearchCtrl::LayoutControls()
m_text->SetSize(x, textY, textWidth, height-textY);
x += textWidth;
- x += cancelMargin;
- if ( m_cancelButton )
+ if ( IsCancelButtonVisible() )
{
+ x += cancelMargin;
m_cancelButton->SetSize(x, (height - sizeCancel.y) / 2,
- sizeCancel.x, height);
+ sizeCancel.x, sizeCancel.y);
}
}
@@ -1134,6 +1145,10 @@ wxBitmap wxSearchCtrl::RenderCancelBitmap( int x, int y )
};
mem.DrawPolygon(WXSIZEOF(handlePolygon2),handlePolygon2,multiplier*lineStartBase,multiplier*(x-lineStartBase));
+ // Stop drawing on the bitmap before possibly calling RescaleBitmap()
+ // below.
+ mem.SelectObject(wxNullBitmap);
+
//===============================================================================
// end drawing code
//===============================================================================
@@ -1198,10 +1213,10 @@ void wxSearchCtrl::RecalcBitmaps()
if (
!m_cancelBitmap.IsOk() ||
m_cancelBitmap.GetHeight() != bitmapHeight ||
- m_cancelBitmap.GetWidth() != bitmapHeight
+ m_cancelBitmap.GetWidth() != bitmapWidth
)
{
- m_cancelBitmap = RenderCancelBitmap(bitmapHeight,bitmapHeight); // square
+ m_cancelBitmap = RenderCancelBitmap(bitmapWidth,bitmapHeight);
m_cancelButton->SetBitmapLabel(m_cancelBitmap);
}
// else this bitmap was set by user, don't alter
diff --git a/src/generic/timectrlg.cpp b/src/generic/timectrlg.cpp
index efa0af028d..bdad97617e 100644
--- a/src/generic/timectrlg.cpp
+++ b/src/generic/timectrlg.cpp
@@ -211,6 +211,21 @@ private:
AppendDigitToCurrentField(key - '0');
}
break;
+ case WXK_NUMPAD0:
+ case WXK_NUMPAD1:
+ case WXK_NUMPAD2:
+ case WXK_NUMPAD3:
+ case WXK_NUMPAD4:
+ case WXK_NUMPAD5:
+ case WXK_NUMPAD6:
+ case WXK_NUMPAD7:
+ case WXK_NUMPAD8:
+ case WXK_NUMPAD9:
+ if ( m_currentField != Field_AMPM )
+ {
+ AppendDigitToCurrentField(key - WXK_NUMPAD0);
+ }
+ break;
case 'A':
case 'P':
diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp
index 3960216686..cefb6c9f58 100644
--- a/src/generic/wizard.cpp
+++ b/src/generic/wizard.cpp
@@ -433,12 +433,7 @@ void wxWizard::AddButtonRow(wxBoxSizer *mainColumn)
m_finishLabel = _("&Finish");
m_btnNext = new wxButton(this, wxID_FORWARD, m_nextLabel);
- // Avoid Cmd+C closing dialog on Mac.
- wxString cancelLabel(_("&Cancel"));
-#ifdef __WXMAC__
- cancelLabel.Replace("&",wxEmptyString);
-#endif
- wxButton *btnCancel=new wxButton(this, wxID_CANCEL, cancelLabel, wxDefaultPosition, wxDefaultSize, buttonStyle);
+ wxButton *btnCancel=new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, buttonStyle);
#ifndef __WXMAC__
if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON)
btnHelp=new wxButton(this, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, buttonStyle);
diff --git a/src/gtk/anybutton.cpp b/src/gtk/anybutton.cpp
index 0742eed15f..9859016a37 100644
--- a/src/gtk/anybutton.cpp
+++ b/src/gtk/anybutton.cpp
@@ -69,10 +69,13 @@ wxgtk_button_released_callback(GtkWidget *WXUNUSED(widget), wxAnyButton *button)
// wxAnyButton
//-----------------------------------------------------------------------------
-bool wxAnyButton::Enable( bool enable )
+void wxAnyButton::DoEnable(bool enable)
{
- if (!base_type::Enable(enable))
- return false;
+ // See wxWindow::DoEnable()
+ if ( !m_widget )
+ return;
+
+ base_type::DoEnable(enable);
gtk_widget_set_sensitive(gtk_bin_get_child(GTK_BIN(m_widget)), enable);
@@ -80,8 +83,6 @@ bool wxAnyButton::Enable( bool enable )
GTKFixSensitivity();
GTKUpdateBitmap();
-
- return true;
}
GdkWindow *wxAnyButton::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
diff --git a/src/gtk/assertdlg_gtk.cpp b/src/gtk/assertdlg_gtk.cpp
index 34c193bdde..b7d90a5f93 100644
--- a/src/gtk/assertdlg_gtk.cpp
+++ b/src/gtk/assertdlg_gtk.cpp
@@ -489,9 +489,9 @@ static void gtk_assert_dialog_class_init(gpointer g_class, void*)
"True "
"True "
"etched-in "
+ "180 "
""
""
- "180 "
"True "
"True "
"backtrace_list_store "
@@ -755,11 +755,11 @@ static void gtk_assert_dialog_init(GTypeInstance* instance, void*)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
+ gtk_widget_set_size_request(GTK_WIDGET(sw), -1, 180);
gtk_box_pack_start (GTK_BOX(vbox), sw, TRUE, TRUE, 8);
/* add the treeview to the scrollable window */
dlg->treeview = gtk_assert_dialog_create_backtrace_list_model ();
- gtk_widget_set_size_request (GTK_WIDGET(dlg->treeview), -1, 180);
gtk_container_add (GTK_CONTAINER (sw), dlg->treeview);
/* create button's hbox */
@@ -841,12 +841,12 @@ gchar *gtk_assert_dialog_get_backtrace (GtkAssertDialog *dlg)
g_return_val_if_fail (GTK_IS_ASSERT_DIALOG (dlg), NULL);
model = gtk_tree_view_get_model (GTK_TREE_VIEW(dlg->treeview));
- string = g_string_new("");
/* iterate over the list */
if (!gtk_tree_model_get_iter_first (model, &iter))
return NULL;
+ string = g_string_new("");
do
{
/* append this stack frame's info to the string */
@@ -879,13 +879,13 @@ gchar *gtk_assert_dialog_get_backtrace (GtkAssertDialog *dlg)
void gtk_assert_dialog_set_message(GtkAssertDialog *dlg, const gchar *msg)
{
+ g_return_if_fail (GTK_IS_ASSERT_DIALOG (dlg));
/* prepend and append the tag
NOTE: g_markup_printf_escaped() is not used because it's available
only for glib >= 2.4 */
gchar *escaped_msg = g_markup_escape_text (msg, -1);
gchar *decorated_msg = g_strdup_printf ("%s ", escaped_msg);
- g_return_if_fail (GTK_IS_ASSERT_DIALOG (dlg));
gtk_label_set_markup (GTK_LABEL(dlg->message), decorated_msg);
g_free (decorated_msg);
diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp
index 4fe673d2bc..a903929e4d 100644
--- a/src/gtk/brush.cpp
+++ b/src/gtk/brush.cpp
@@ -24,17 +24,17 @@ class wxBrushRefData: public wxGDIRefData
{
public:
wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID)
+ : m_colour(colour)
{
m_style = style;
- m_colour = colour;
}
wxBrushRefData( const wxBrushRefData& data )
: wxGDIRefData()
+ , m_colour(data.m_colour)
+ , m_stipple(data.m_stipple)
{
m_style = data.m_style;
- m_stipple = data.m_stipple;
- m_colour = data.m_colour;
}
bool operator == (const wxBrushRefData& data) const
diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp
index 401f94358d..d11c7ef205 100644
--- a/src/gtk/checkbox.cpp
+++ b/src/gtk/checkbox.cpp
@@ -222,17 +222,17 @@ void wxCheckBox::SetLabel( const wxString& label )
GTKSetLabelForLabel(GTK_LABEL(m_widgetLabel), label);
}
-bool wxCheckBox::Enable( bool enable )
+void wxCheckBox::DoEnable(bool enable)
{
- if (!base_type::Enable(enable))
- return false;
+ if ( !m_widgetLabel )
+ return;
+
+ base_type::DoEnable(enable);
gtk_widget_set_sensitive( m_widgetLabel, enable );
if (enable)
GTKFixSensitivity();
-
- return true;
}
void wxCheckBox::DoApplyWidgetStyle(GtkRcStyle *style)
diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp
index 772e2f8c8a..85e1e37af7 100644
--- a/src/gtk/control.cpp
+++ b/src/gtk/control.cpp
@@ -267,6 +267,18 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
attr.font = wxFont(info);
gdk_rgba_free(fc);
gdk_rgba_free(bc);
+
+ // Go up the parent chain for a background color
+ while (attr.colBg.Alpha() == 0 && (widget = gtk_widget_get_parent(widget)))
+ {
+ sc = gtk_widget_get_style_context(widget);
+ gtk_style_context_save(sc);
+ gtk_style_context_set_state(sc, stateFlag);
+ gtk_style_context_get(sc, stateFlag, "background-color", &bc, NULL);
+ gtk_style_context_restore(sc);
+ attr.colBg = wxColour(*bc);
+ gdk_rgba_free(bc);
+ }
#else
GtkStyle* style;
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
index d2c1abf352..d17c2dd2fd 100644
--- a/src/gtk/dataview.cpp
+++ b/src/gtk/dataview.cpp
@@ -320,9 +320,9 @@ class wxGtkTreeModelNode
public:
wxGtkTreeModelNode( wxGtkTreeModelNode* parent, const wxDataViewItem &item,
wxDataViewCtrlInternal *internal )
+ : m_item(item)
{
m_parent = parent;
- m_item = item;
m_internal = internal;
}
@@ -2771,8 +2771,8 @@ wxIMPLEMENT_CLASS(wxDataViewProgressRenderer, wxDataViewCustomRenderer);
wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label,
const wxString &varianttype, wxDataViewCellMode mode, int align ) :
wxDataViewCustomRenderer( varianttype, mode, align, true )
+ , m_label(label)
{
- m_label = label;
m_value = 0;
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_progress_new();
@@ -2870,8 +2870,8 @@ wxSize wxDataViewProgressRenderer::GetSize() const
wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices,
wxDataViewCellMode mode, int alignment ) :
wxDataViewCustomRenderer( "string", mode, alignment, true )
+ , m_choices(choices)
{
- m_choices = choices;
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_combo_new();
GtkListStore *store = gtk_list_store_new( 1, G_TYPE_STRING );
for (size_t n = 0; n < m_choices.GetCount(); n++)
@@ -4591,11 +4591,14 @@ gtk_dataview_button_press_callback( GtkWidget *WXUNUSED(widget),
// If the right click is on an item that isn't selected, select it, as is
// commonly done. Do not do it if the item under mouse is already selected,
// because it could be a part of multi-item selection.
- GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dv->GtkGetTreeView()));
- if ( !gtk_tree_selection_path_is_selected(selection, path) )
+ if ( path )
{
- gtk_tree_selection_unselect_all(selection);
- gtk_tree_selection_select_path(selection, path);
+ GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dv->GtkGetTreeView()));
+ if ( !gtk_tree_selection_path_is_selected(selection, path) )
+ {
+ gtk_tree_selection_unselect_all(selection);
+ gtk_tree_selection_select_path(selection, path);
+ }
}
wxDataViewEvent
diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp
index a41910ac32..016c7cd4de 100644
--- a/src/gtk/dc.cpp
+++ b/src/gtk/dc.cpp
@@ -506,8 +506,8 @@ void wxGTKDCImpl::DoGetSizeMM( int* width, int* height ) const
int w = 0;
int h = 0;
GetOwner()->GetSize( &w, &h );
- if (width) *width = int( double(w) / (m_userScaleX*m_mm_to_pix_x) );
- if (height) *height = int( double(h) / (m_userScaleY*m_mm_to_pix_y) );
+ if (width) *width = int( double(w) / (m_userScaleX*GetMMToPXx()) );
+ if (height) *height = int( double(h) / (m_userScaleY*GetMMToPXy()) );
}
// Resolution in pixels per logical inch
diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp
index 52349d0e0a..feea364099 100644
--- a/src/gtk/dcclient.cpp
+++ b/src/gtk/dcclient.cpp
@@ -2072,7 +2072,7 @@ void wxWindowDCImpl::ComputeScaleAndOrigin()
// Resolution in pixels per logical inch
wxSize wxWindowDCImpl::GetPPI() const
{
- return wxSize( (int) (m_mm_to_pix_x * 25.4 + 0.5), (int) (m_mm_to_pix_y * 25.4 + 0.5));
+ return wxSize( (int) (GetMMToPXx() * 25.4 + 0.5), (int) (GetMMToPXy() * 25.4 + 0.5));
}
int wxWindowDCImpl::GetDepth() const
diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp
index 0a0f6a8c0f..954fb060a0 100644
--- a/src/gtk/listbox.cpp
+++ b/src/gtk/listbox.cpp
@@ -497,6 +497,25 @@ void wxListBox::DoDeleteOneItem(unsigned int n)
// this returns false if iter is invalid (e.g. deleting item at end) but
// since we don't use iter, we ignore the return value
gtk_list_store_remove(m_liststore, &iter);
+
+#ifdef __WXGTK3__
+ // Invalidate selection in a single-selection control for consistency with
+ // MSW and GTK+ 2 where this happens automatically when deleting the
+ // selected item or any item before it.
+ if ( !HasMultipleSelection() )
+ {
+ const int sel = GetSelection();
+ if ( sel != wxNOT_FOUND && static_cast(sel) >= n )
+ {
+ // Don't call SetSelection() from here, it's not totally clear if
+ // it is safe to do, so just do this at GTK+ level.
+ gtk_tree_selection_unselect_all
+ (
+ gtk_tree_view_get_selection(m_treeview)
+ );
+ }
+ }
+#endif // __WXGTK3__
}
// ----------------------------------------------------------------------------
diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp
index 71bd4d8ec2..a47d136a1e 100644
--- a/src/gtk/notebook.cpp
+++ b/src/gtk/notebook.cpp
@@ -464,7 +464,12 @@ bool wxNotebook::InsertPage( size_t position,
pageData->m_label, false, false, m_padding);
gtk_widget_show_all(pageData->m_box);
+
+ // Inserting the page may generate selection changing events that are not
+ // expected here: we will send them ourselves below if necessary.
+ g_signal_handlers_block_by_func(m_widget, (void*)switch_page, this);
gtk_notebook_insert_page(notebook, win->m_widget, pageData->m_box, position);
+ g_signal_handlers_unblock_by_func(m_widget, (void*)switch_page, this);
/* apply current style */
#ifdef __WXGTK3__
@@ -478,10 +483,7 @@ bool wxNotebook::InsertPage( size_t position,
}
#endif
- if (select && GetPageCount() > 1)
- {
- SetSelection( position );
- }
+ DoSetSelectionAfterInsertion(position, select);
InvalidateBestSize();
return true;
diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp
index 3db6ead31e..e47aa44818 100644
--- a/src/gtk/pen.cpp
+++ b/src/gtk/pen.cpp
@@ -36,23 +36,23 @@ public:
wxPenRefData( const wxPenRefData& data )
: wxGDIRefData()
+ , m_colour(data.m_colour)
{
m_style = data.m_style;
m_width = data.m_width;
m_joinStyle = data.m_joinStyle;
m_capStyle = data.m_capStyle;
- m_colour = data.m_colour;
m_countDashes = data.m_countDashes;
m_dash = data.m_dash;
}
wxPenRefData( const wxPenInfo& info )
+ : m_colour(info.GetColour())
{
m_width = info.GetWidth();
m_style = info.GetStyle();
m_joinStyle = info.GetJoin();
m_capStyle = info.GetCap();
- m_colour = info.GetColour();
m_countDashes = info.GetDashes(const_cast(&m_dash));
}
diff --git a/src/gtk/print.cpp b/src/gtk/print.cpp
index 2a5fde7348..247d294f9e 100644
--- a/src/gtk/print.cpp
+++ b/src/gtk/print.cpp
@@ -1210,9 +1210,8 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxGtkPrinterDCImpl, wxDCImpl);
wxGtkPrinterDCImpl::wxGtkPrinterDCImpl(wxPrinterDC *owner, const wxPrintData& data)
: wxDCImpl( owner )
+ , m_printData(data)
{
- m_printData = data;
-
wxGtkPrintNativeData *native =
(wxGtkPrintNativeData*) m_printData.GetNativeData();
diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp
index b75e127ecd..c93fde74d2 100644
--- a/src/gtk/radiobox.cpp
+++ b/src/gtk/radiobox.cpp
@@ -487,8 +487,18 @@ void wxRadioBox::SetString(unsigned int item, const wxString& label)
bool wxRadioBox::Enable( bool enable )
{
- if ( !wxControl::Enable( enable ) )
- return false;
+ // Explicitly forward to the base class just because we need to override
+ // this function to prevent it from being hidden by Enable(int, bool)
+ // overload.
+ return wxControl::Enable(enable);
+}
+
+void wxRadioBox::DoEnable(bool enable)
+{
+ if ( !m_widget )
+ return;
+
+ wxControl::DoEnable(enable);
wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.GetFirst();
while (node)
@@ -503,8 +513,6 @@ bool wxRadioBox::Enable( bool enable )
if (enable)
GTKFixSensitivity();
-
- return true;
}
bool wxRadioBox::Enable(unsigned int item, bool enable)
diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp
index 9b87a178ad..b77a52cdd6 100644
--- a/src/gtk/radiobut.cpp
+++ b/src/gtk/radiobut.cpp
@@ -149,17 +149,17 @@ bool wxRadioButton::GetValue() const
return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_widget)) != 0;
}
-bool wxRadioButton::Enable( bool enable )
+void wxRadioButton::DoEnable(bool enable)
{
- if (!base_type::Enable(enable))
- return false;
+ if ( !m_widget )
+ return;
+
+ base_type::DoEnable(enable);
gtk_widget_set_sensitive(gtk_bin_get_child(GTK_BIN(m_widget)), enable);
if (enable)
GTKFixSensitivity();
-
- return true;
}
void wxRadioButton::DoApplyWidgetStyle(GtkRcStyle *style)
diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp
index a0a3ebef55..56f86fb1f0 100644
--- a/src/gtk/spinbutt.cpp
+++ b/src/gtk/spinbutt.cpp
@@ -173,16 +173,16 @@ void wxSpinButton::SetRange(int minVal, int maxVal)
GtkEnableEvents();
}
-bool wxSpinButton::Enable( bool enable )
+void wxSpinButton::DoEnable(bool enable)
{
- if (!base_type::Enable(enable))
- return false;
+ if ( !m_widget )
+ return;
+
+ base_type::DoEnable(enable);
// Work around lack of visual update when enabling
if (enable)
GTKFixSensitivity(false /* fix even if not under mouse */);
-
- return true;
}
void wxSpinButton::GtkDisableEvents() const
diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp
index b8551d37c7..fe47602ac6 100644
--- a/src/gtk/textctrl.cpp
+++ b/src/gtk/textctrl.cpp
@@ -1350,17 +1350,14 @@ void wxTextCtrl::SetEditable( bool editable )
}
}
-bool wxTextCtrl::Enable( bool enable )
+void wxTextCtrl::DoEnable(bool enable)
{
- if (!wxWindowBase::Enable(enable))
- {
- // nothing to do
- return false;
- }
+ if ( !m_text )
+ return;
+
+ wxTextCtrlBase::DoEnable(enable);
gtk_widget_set_sensitive( m_text, enable );
-
- return true;
}
void wxTextCtrl::MarkDirty()
diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp
index e440422ab7..375912170f 100644
--- a/src/gtk/window.cpp
+++ b/src/gtk/window.cpp
@@ -1071,14 +1071,10 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
wxLogTrace(TRACE_KEYS, wxT("\t-> wxKeyCode %ld"), key_code);
- // sending unknown key events doesn't really make sense
- if ( !key_code )
- return false;
-
event.m_keyCode = key_code;
#if wxUSE_UNICODE
- event.m_uniChar = gdk_keyval_to_unicode(key_code);
+ event.m_uniChar = gdk_keyval_to_unicode(key_code ? key_code : gdk_event->keyval);
if ( !event.m_uniChar && event.m_keyCode <= WXK_DELETE )
{
// Set Unicode key code to the ASCII equivalent for compatibility. E.g.
@@ -1086,6 +1082,13 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
// codes of 13.
event.m_uniChar = event.m_keyCode;
}
+
+ // sending unknown key events doesn't really make sense
+ if ( !key_code && !event.m_uniChar )
+ return false;
+#else
+ if (!key_code)
+ return false;
#endif // wxUSE_UNICODE
// now fill all the other fields
@@ -1815,19 +1818,6 @@ gtk_window_motion_notify_callback( GtkWidget * WXUNUSED(widget),
wxCOMMON_CALLBACK_PROLOGUE(gdk_event, win);
- if (gdk_event->is_hint)
- {
- int x = 0;
- int y = 0;
-#ifdef __WXGTK3__
- gdk_window_get_device_position(gdk_event->window, gdk_event->device, &x, &y, NULL);
-#else
- gdk_window_get_pointer(gdk_event->window, &x, &y, NULL);
-#endif
- gdk_event->x = x;
- gdk_event->y = y;
- }
-
g_lastMouseEvent = (GdkEvent*) gdk_event;
wxMouseEvent event( wxEVT_MOTION );
@@ -1875,6 +1865,20 @@ gtk_window_motion_notify_callback( GtkWidget * WXUNUSED(widget),
g_lastMouseEvent = NULL;
+ // Request additional motion events. Done at the end to increase the
+ // chances that lower priority events requested by the handler above, such
+ // as painting, can be processed before the next motion event occurs.
+ // Otherwise a long-running handler can cause paint events to be entirely
+ // blocked while the mouse is moving.
+ if (gdk_event->is_hint)
+ {
+#ifdef __WXGTK3__
+ gdk_event_request_motions(gdk_event);
+#else
+ gdk_window_get_pointer(gdk_event->window, NULL, NULL, NULL);
+#endif
+ }
+
return ret;
}
@@ -2216,10 +2220,28 @@ size_allocate(GtkWidget* WXUNUSED_IN_GTK2(widget), GtkAllocation* alloc, wxWindo
#if GTK_CHECK_VERSION(3,14,0)
if (wx_is_at_least_gtk3(14))
{
+ // Prevent under-allocated widgets from drawing outside their allocation
GtkAllocation clip;
gtk_widget_get_clip(widget, &clip);
if (clip.width > w || clip.height > h)
- gtk_widget_set_clip(widget, alloc);
+ {
+ GtkStyleContext* sc = gtk_widget_get_style_context(widget);
+ int outline_offset, outline_width;
+ gtk_style_context_get(sc, gtk_style_context_get_state(sc),
+ "outline-offset", &outline_offset, "outline-width", &outline_width, NULL);
+ const int outline = outline_offset + outline_width;
+ GtkAllocation a = *alloc;
+ if (outline > 0)
+ {
+ // Allow enough room for focus indicator "outline", it's drawn
+ // outside of GtkCheckButton allocation with Adwaita theme
+ a.x -= outline;
+ a.y -= outline;
+ a.width += outline + outline;
+ a.height += outline + outline;
+ }
+ gtk_widget_set_clip(widget, &a);
+ }
}
#endif
if (win->m_wxwindow)
@@ -2913,6 +2935,11 @@ void wxWindowGTK::PostCreation()
SetLayoutDirection(wxLayout_Default);
+ // if the window had been disabled before being created, it should be
+ // created in the initially disabled state
+ if ( !m_isEnabled )
+ DoEnable(false);
+
// unless the window was created initially hidden (i.e. Hide() had been
// called before Create()), we should show it at GTK+ level as well
if (m_isShown)
@@ -4196,7 +4223,12 @@ bool wxWindowGTK::IsShown() const
void wxWindowGTK::DoEnable( bool enable )
{
- wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+ if ( !m_widget )
+ {
+ // The window can be disabled before being created, so just don't do
+ // anything in this case and, in particular, don't assert.
+ return;
+ }
gtk_widget_set_sensitive( m_widget, enable );
if (m_wxwindow && (m_wxwindow != m_widget))
diff --git a/src/gtk1/dc.cpp b/src/gtk1/dc.cpp
index 7c75e571f2..77f130450c 100644
--- a/src/gtk1/dc.cpp
+++ b/src/gtk1/dc.cpp
@@ -50,8 +50,8 @@ void wxGTKDCImpl::DoGetSizeMM( int* width, int* height ) const
int w = 0;
int h = 0;
GetSize( &w, &h );
- if (width) *width = int( double(w) / (m_userScaleX*m_mm_to_pix_x) );
- if (height) *height = int( double(h) / (m_userScaleY*m_mm_to_pix_y) );
+ if (width) *width = int( double(w) / (m_userScaleX*GetMMToPXx()) );
+ if (height) *height = int( double(h) / (m_userScaleY*GetMMToPXy()) );
}
// Resolution in pixels per logical inch
diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp
index 623f049e72..4d3e9d120a 100644
--- a/src/gtk1/dcclient.cpp
+++ b/src/gtk1/dcclient.cpp
@@ -2113,7 +2113,7 @@ void wxWindowDCImpl::ComputeScaleAndOrigin()
// Resolution in pixels per logical inch
wxSize wxWindowDCImpl::GetPPI() const
{
- return wxSize( (int) (m_mm_to_pix_x * 25.4 + 0.5), (int) (m_mm_to_pix_y * 25.4 + 0.5));
+ return wxSize( (int) (GetMMToPXx() * 25.4 + 0.5), (int) (GetMMToPXy() * 25.4 + 0.5));
}
int wxWindowDCImpl::GetDepth() const
diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp
index 763516e1e5..3a93267e49 100644
--- a/src/html/helpdata.cpp
+++ b/src/html/helpdata.cpp
@@ -803,9 +803,9 @@ wxString wxHtmlHelpData::FindPageById(int id)
wxHtmlSearchStatus::wxHtmlSearchStatus(wxHtmlHelpData* data, const wxString& keyword,
bool case_sensitive, bool whole_words_only,
const wxString& book)
+ : m_Keyword(keyword)
{
m_Data = data;
- m_Keyword = keyword;
wxHtmlBookRecord* bookr = NULL;
if (!book.empty())
{
diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp
index 5befc5879f..617309a56f 100644
--- a/src/html/htmlwin.cpp
+++ b/src/html/htmlwin.cpp
@@ -59,9 +59,9 @@ public:
wxHtmlWinAutoScrollTimer(wxScrolledWindow *win,
wxEventType eventTypeToSend,
int pos, int orient)
+ : m_eventType(eventTypeToSend)
{
m_win = win;
- m_eventType = eventTypeToSend;
m_pos = pos;
m_orient = orient;
}
@@ -128,7 +128,7 @@ void wxHtmlWinAutoScrollTimer::Notify()
class WXDLLIMPEXP_HTML wxHtmlHistoryItem
{
public:
- wxHtmlHistoryItem(const wxString& p, const wxString& a) {m_Page = p, m_Anchor = a, m_Pos = 0;}
+ wxHtmlHistoryItem(const wxString& p, const wxString& a) : m_Page(p), m_Anchor(a), m_Pos(0) { }
int GetPos() const {return m_Pos;}
void SetPos(int p) {m_Pos = p;}
const wxString& GetPage() const {return m_Page;}
diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp
index d537b54dcc..a456e5e38f 100644
--- a/src/html/m_image.cpp
+++ b/src/html/m_image.cpp
@@ -253,8 +253,8 @@ class wxHtmlImageMapCell : public wxHtmlCell
wxHtmlImageMapCell::wxHtmlImageMapCell( wxString &name )
+ : m_Name(name)
{
- m_Name = name ;
}
wxHtmlLinkInfo *wxHtmlImageMapCell::GetLink( int x, int y ) const
@@ -359,6 +359,7 @@ wxHtmlImageCell::wxHtmlImageCell(wxHtmlWindowInterface *windowIface,
wxFSFile *input, double scaleHDPI,
int w, bool wpercent, int h, bool hpresent, double scale, int align,
const wxString& mapname) : wxHtmlCell()
+ , m_mapName(mapname)
{
m_windowIface = windowIface;
m_scale = scale;
@@ -370,7 +371,6 @@ wxHtmlImageCell::wxHtmlImageCell(wxHtmlWindowInterface *windowIface,
m_bmpWpercent = wpercent;
m_bmpHpresent = hpresent;
m_imageMap = NULL;
- m_mapName = mapname;
SetCanLiveOnPagebreak(false);
#if wxUSE_GIF && wxUSE_TIMER
m_gifDecoder = NULL;
diff --git a/src/html/m_links.cpp b/src/html/m_links.cpp
index 66dbb10a3b..5acfea0973 100644
--- a/src/html/m_links.cpp
+++ b/src/html/m_links.cpp
@@ -32,7 +32,7 @@ private:
public:
wxHtmlAnchorCell(const wxString& name) : wxHtmlCell()
- { m_AnchorName = name; }
+ , m_AnchorName(name) { }
void Draw(wxDC& WXUNUSED(dc),
int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(view_y1), int WXUNUSED(view_y2),
diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp
index 908c8f76d1..c79c4eb07d 100644
--- a/src/motif/dc.cpp
+++ b/src/motif/dc.cpp
@@ -87,9 +87,9 @@ void wxMotifDCImpl::DoGetSizeMM( int* width, int* height ) const
GetSize( &w, &h );
if ( width )
- *width = int( double(w) / (m_scaleX*m_mm_to_pix_x) );
+ *width = int( double(w) / (m_scaleX*GetMMToPXx()) );
if ( height )
- *height = int( double(h) / (m_scaleY*m_mm_to_pix_y) );
+ *height = int( double(h) / (m_scaleY*GetMMToPXy()) );
}
// Resolution in pixels per logical inch
diff --git a/src/msw/artmsw.cpp b/src/msw/artmsw.cpp
index 1d836fd56e..93171b3b0c 100644
--- a/src/msw/artmsw.cpp
+++ b/src/msw/artmsw.cpp
@@ -137,6 +137,21 @@ MSWGetBitmapFromIconLocation(const TCHAR* path, int index, const wxSize& size)
return wxBitmap(icon);
}
+#if !wxUSE_UNICODE
+
+// SHSTOCKICONINFO always uses WCHAR, even in ANSI build, so we need to convert
+// it to TCHAR, which is just CHAR in this case, used by the other functions.
+// Provide an overload doing it as this keeps the code in the main function
+// clean and this entire block (inside !wxUSE_UNICODE check) can be just
+// removed when support for ANSI build is finally dropped.
+wxBitmap
+MSWGetBitmapFromIconLocation(const WCHAR* path, int index, const wxSize& size)
+{
+ return MSWGetBitmapFromIconLocation(wxString(path).mb_str(), index, size);
+}
+
+#endif // !wxUSE_UNICODE
+
wxBitmap
MSWGetBitmapForPath(const wxString& path, const wxSize& size, DWORD uFlags = 0)
{
diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp
index 2923f575c7..c46abf2fa0 100644
--- a/src/msw/combo.cpp
+++ b/src/msw/combo.cpp
@@ -37,9 +37,7 @@
#include "wx/combo.h"
#include "wx/msw/registry.h"
-#if wxUSE_UXTHEME
#include "wx/msw/uxtheme.h"
-#endif
#include "wx/msw/dc.h"
#define NATIVE_TEXT_INDENT_XP 4
@@ -87,7 +85,6 @@ bool wxComboCtrl::Create(wxWindow *parent,
if ( !border )
{
-#if wxUSE_UXTHEME
if ( wxUxThemeIsActive() )
{
// For XP, have 1-width custom border, for older version use sunken
@@ -95,7 +92,6 @@ bool wxComboCtrl::Create(wxWindow *parent,
m_widthCustomBorder = 1;
}
else
-#endif
border = wxBORDER_SUNKEN;
style = (style & ~(wxBORDER_MASK)) | border;
@@ -112,10 +108,8 @@ bool wxComboCtrl::Create(wxWindow *parent,
name) )
return false;
-#if wxUSE_UXTHEME
if ( wxUxThemeIsActive() && ::wxGetWinVersion() >= wxWinVersion_Vista )
m_iFlags |= wxCC_BUTTON_STAYS_DOWN |wxCC_BUTTON_COVERS_BORDER;
-#endif
if ( style & wxCC_STD_BUTTON )
m_iFlags |= wxCC_POPUP_ON_MOUSE_UP;
diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp
index 3bce3361fc..2bcbea8e2b 100644
--- a/src/msw/dcprint.cpp
+++ b/src/msw/dcprint.cpp
@@ -137,9 +137,8 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name,
wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printData ) :
wxMSWDCImpl( owner )
+ , m_printData(printData)
{
- m_printData = printData;
-
m_isInteractive = false;
m_hDC = wxGetPrinterDC(printData);
diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp
index ccea317306..245a1f3de2 100644
--- a/src/msw/dde.cpp
+++ b/src/msw/dde.cpp
@@ -742,6 +742,14 @@ bool wxDDEConnection::StopAdvise(const wxString& item)
return ok;
}
+// Small helper function converting the data from the format used by the given
+// conversion to UTF-8.
+static
+wxCharBuffer ConvertToUTF8(const wxMBConv& conv, const void* data, size_t size)
+{
+ return wxConvUTF8.cWC2MB(conv.cMB2WC((const char*)data, size, NULL));
+}
+
// Calls that SERVER can make
bool wxDDEConnection::DoAdvise(const wxString& item,
const void *data,
@@ -750,10 +758,55 @@ bool wxDDEConnection::DoAdvise(const wxString& item,
{
HSZ item_atom = DDEGetAtom(item);
HSZ topic_atom = DDEGetAtom(m_topicName);
- m_sendingData = data; // mrf: potential for scope problems here?
- m_dataSize = size;
- // wxIPC_PRIVATE does not succeed, so use text instead
- m_dataType = format == wxIPC_PRIVATE ? wxIPC_TEXT : format;
+
+ // Define the buffer which, if it's used at all, needs to stay alive until
+ // after DdePostAdvise() call which uses it.
+ wxCharBuffer buf;
+
+ // As we always use CF_TEXT for XTYP_ADVSTART, we have to use wxIPC_TEXT
+ // here, even if a different format was specified for this value. Of
+ // course, this can only be done for just a few of the formats, so check
+ // that we have one of them here.
+ switch ( format )
+ {
+ case wxIPC_TEXT:
+ case wxIPC_OEMTEXT:
+ case wxIPC_UTF8TEXT:
+ case wxIPC_PRIVATE:
+ // Use the data directly.
+ m_sendingData = data;
+ m_dataSize = size;
+ break;
+
+ case wxIPC_UTF16TEXT:
+ case wxIPC_UTF32TEXT:
+ // We need to convert the data to UTF-8 as UTF-16 or 32 would
+ // appear as mojibake in the client when received as CF_TEXT.
+ buf = format == wxIPC_UTF16TEXT
+ ? ConvertToUTF8(wxMBConvUTF16(), data, size)
+ : ConvertToUTF8(wxMBConvUTF32(), data, size);
+
+ m_sendingData = buf.data();
+ m_dataSize = buf.length();
+ break;
+
+ case wxIPC_INVALID:
+ case wxIPC_BITMAP:
+ case wxIPC_METAFILE:
+ case wxIPC_SYLK:
+ case wxIPC_DIF:
+ case wxIPC_TIFF:
+ case wxIPC_DIB:
+ case wxIPC_PALETTE:
+ case wxIPC_PENDATA:
+ case wxIPC_RIFF:
+ case wxIPC_WAVE:
+ case wxIPC_ENHMETAFILE:
+ case wxIPC_FILENAME:
+ case wxIPC_LOCALE:
+ wxFAIL_MSG( "Unsupported IPC format for Advise()" );
+ return false;
+ };
bool ok = DdePostAdvise(DDEIdInst, topic_atom, item_atom) != 0;
if ( !ok )
@@ -986,7 +1039,7 @@ _DDECallback(UINT wType,
connection->m_dataSize,
0,
hsz2,
- connection->m_dataType,
+ wFmt,
0
);
@@ -1008,18 +1061,34 @@ _DDECallback(UINT wType,
DWORD len = DdeGetData(hData, NULL, 0, 0);
- void *data = connection->GetBufferAtLeast(len);
+ char* const data = (char *)connection->GetBufferAtLeast(len);
wxASSERT_MSG(data != NULL,
wxT("Buffer too small in _DDECallback (XTYP_ADVDATA)") );
DdeGetData(hData, (LPBYTE)data, len, 0);
DdeFreeDataHandle(hData);
+
+ // We always get data in CF_TEXT format, but it could
+ // actually be UTF-8, so try recovering the original format
+ // if possible.
+ if ( wFmt != CF_TEXT )
+ {
+ wxLogDebug("Unexpected format %02x in XTYP_ADVDATA", wFmt);
+ return (DDERETURN)DDE_FNOTPROCESSED;
+ }
+
+ wxIPCFormat format;
+ if ( wxConvUTF8.ToWChar(NULL, 0, data, len) != wxCONV_FAILED )
+ format = wxIPC_UTF8TEXT;
+ else
+ format = wxIPC_TEXT;
+
if ( connection->OnAdvise(connection->m_topicName,
item_name,
data,
(int)len,
- (wxIPCFormat) wFmt) )
+ format) )
{
return (DDERETURN)(DWORD)DDE_FACK;
}
diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp
index 04f2e83f5e..dbe22e39d9 100644
--- a/src/msw/dir.cpp
+++ b/src/msw/dir.cpp
@@ -204,9 +204,9 @@ private:
// ----------------------------------------------------------------------------
wxDirData::wxDirData(const wxString& dirname)
- : m_dirname(dirname)
+ : m_finddata(InitFindData())
+ , m_dirname(dirname)
{
- m_finddata = InitFindData();
}
wxDirData::~wxDirData()
diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp
index 0c6e38681d..5a0b7bd17a 100644
--- a/src/msw/filedlg.cpp
+++ b/src/msw/filedlg.cpp
@@ -656,8 +656,7 @@ int wxFileDialog::ShowModal()
m_filterIndex = (int)of.nFilterIndex - 1;
- if ( !of.nFileExtension ||
- (of.nFileExtension && fileNameBuffer[of.nFileExtension] == wxT('\0')) )
+ if ( !of.nFileExtension || fileNameBuffer[of.nFileExtension] == wxT('\0') )
{
// User has typed a filename without an extension:
const wxChar* extension = filterBuffer.t_str();
diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp
index b5fd506d77..2588f4e9c1 100644
--- a/src/msw/glcanvas.cpp
+++ b/src/msw/glcanvas.cpp
@@ -376,7 +376,7 @@ wxGLAttributes& wxGLAttributes::Level(int val)
AddAttribute(WGL_NUMBER_OVERLAYS_ARB);
AddAttribute(val);
}
- else if ( val < 0 )
+ else
{
AddAttribute(WGL_NUMBER_UNDERLAYS_ARB);
AddAttribute(-val);
diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp
index ebecbeb72a..e5309c9bf7 100644
--- a/src/msw/graphics.cpp
+++ b/src/msw/graphics.cpp
@@ -336,6 +336,14 @@ public:
REAL size,
int style,
const wxColour& col);
+
+ // This ctor takes ownership of the brush.
+ wxGDIPlusFontData(wxGraphicsRenderer* renderer,
+ const wxString& name,
+ REAL size,
+ int style,
+ Brush* textBrush);
+
~wxGDIPlusFontData();
virtual Brush* GetGDIPlusBrush() { return m_textBrush; }
@@ -347,7 +355,16 @@ private :
void Init(const wxString& name,
REAL size,
int style,
- const wxColour& col);
+ Brush* textBrush);
+
+ // Common part of ctors taking wxColour.
+ void Init(const wxString& name,
+ REAL size,
+ int style,
+ const wxColour& col)
+ {
+ Init(name, size, style, new SolidBrush(wxColourToColor(col)));
+ }
Brush* m_textBrush;
Font* m_font;
@@ -432,9 +449,6 @@ public:
Graphics* GetGraphics() const { return m_context; }
protected:
-
- wxDouble m_fontScaleRatio;
-
// Used from ctors (including those in the derived classes) and takes
// ownership of the graphics pointer that must be non-NULL.
void Init(Graphics* graphics, int width, int height);
@@ -507,8 +521,41 @@ class wxGDIPlusPrintingContext : public wxGDIPlusContext
{
public:
wxGDIPlusPrintingContext( wxGraphicsRenderer* renderer, const wxDC& dc );
- virtual ~wxGDIPlusPrintingContext() { }
-protected:
+
+ // Override to scale the font proportionally to the DPI.
+ virtual void SetFont(const wxGraphicsFont& font) wxOVERRIDE
+ {
+ // The casts here are safe because we're only supposed to be passed
+ // fonts created by this renderer.
+ Font* const f = static_cast(font.GetRefData())->GetGDIPlusFont();
+ Brush* const b = static_cast(font.GetRefData())->GetGDIPlusBrush();
+
+ // To scale the font, we need to create a new one which means
+ // retrieving all the parameters originally used to create the font.
+ FontFamily ffamily;
+ f->GetFamily(&ffamily);
+
+ WCHAR familyName[LF_FACESIZE];
+ ffamily.GetFamilyName(familyName);
+
+ wxGraphicsFont fontScaled;
+ fontScaled.SetRefData(new wxGDIPlusFontData
+ (
+ GetRenderer(),
+ familyName,
+ f->GetSize() / m_fontScaleRatio,
+ f->GetStyle(),
+ b->Clone()
+ ));
+ wxGDIPlusContext::SetFont(fontScaled);
+ }
+
+private:
+ // This is logically const ratio between this context DPI and the standard
+ // one which is used for scaling the fonts used with this context: without
+ // this, the fonts wouldn't have the correct size, even though we
+ // explicitly create them using UnitPoint units.
+ wxDouble m_fontScaleRatio;
};
//-----------------------------------------------------------------------------
@@ -983,7 +1030,7 @@ void
wxGDIPlusFontData::Init(const wxString& name,
REAL size,
int style,
- const wxColour& col)
+ Brush* textBrush)
{
#if wxUSE_PRIVATE_FONTS
// If the user has registered any private fonts, they should be used in
@@ -1015,7 +1062,7 @@ wxGDIPlusFontData::Init(const wxString& name,
m_font = new Font(name.wc_str(), size, style, UnitPoint);
}
- m_textBrush = new SolidBrush(wxColourToColor(col));
+ m_textBrush = textBrush;
}
wxGDIPlusFontData::wxGDIPlusFontData( wxGraphicsRenderer* renderer,
@@ -1046,6 +1093,16 @@ wxGDIPlusFontData::wxGDIPlusFontData(wxGraphicsRenderer* renderer,
Init(name, size, style, col);
}
+wxGDIPlusFontData::wxGDIPlusFontData(wxGraphicsRenderer* renderer,
+ const wxString& name,
+ REAL size,
+ int style,
+ Brush* brush)
+ : wxGraphicsObjectRefData(renderer)
+{
+ Init(name, size, style, brush);
+}
+
wxGDIPlusFontData::~wxGDIPlusFontData()
{
delete m_textBrush;
@@ -1687,7 +1744,6 @@ void wxGDIPlusContext::Init(Graphics* graphics, int width, int height)
m_state2 = 0;
m_width = width;
m_height = height;
- m_fontScaleRatio = 1.0;
m_context->SetTextRenderingHint(TextRenderingHintSystemDefault);
m_context->SetPixelOffsetMode(PixelOffsetModeHalf);
@@ -2111,33 +2167,38 @@ void wxGDIPlusContext::GetTextExtent( const wxString &str, wxDouble *width, wxDo
wxCHECK_RET( !m_font.IsNull(), wxT("wxGDIPlusContext::GetTextExtent - no valid font set") );
wxWCharBuffer s = str.wc_str( *wxConvUI );
- FontFamily ffamily ;
Font* f = ((wxGDIPlusFontData*)m_font.GetRefData())->GetGDIPlusFont();
- f->GetFamily(&ffamily) ;
+ // Get the font metrics if we actually need them.
+ if ( descent || externalLeading || (height && str.empty()) )
+ {
+ FontFamily ffamily ;
+ f->GetFamily(&ffamily) ;
- REAL factorY = m_fontScaleRatio;
+ // Notice that we must use the real font style or the results would be
+ // incorrect for italic/bold fonts.
+ const INT style = f->GetStyle();
+ const REAL size = f->GetSize();
+ const REAL emHeight = ffamily.GetEmHeight(style);
+ REAL rDescent = ffamily.GetCellDescent(style) * size / emHeight;
+ REAL rAscent = ffamily.GetCellAscent(style) * size / emHeight;
+ REAL rHeight = ffamily.GetLineSpacing(style) * size / emHeight;
- // Notice that we must use the real font style or the results would be
- // incorrect for italic/bold fonts.
- const INT style = f->GetStyle();
- const REAL size = f->GetSize();
- const REAL emHeight = ffamily.GetEmHeight(style);
- REAL rDescent = ffamily.GetCellDescent(style) * size / emHeight;
- REAL rAscent = ffamily.GetCellAscent(style) * size / emHeight;
- REAL rHeight = ffamily.GetLineSpacing(style) * size / emHeight;
+ if ( height && str.empty() )
+ *height = rHeight;
+ if ( descent )
+ *descent = rDescent;
+ if ( externalLeading )
+ *externalLeading = rHeight - rAscent - rDescent;
+ }
- if ( height )
- *height = rHeight * factorY;
- if ( descent )
- *descent = rDescent * factorY;
- if ( externalLeading )
- *externalLeading = (rHeight - rAscent - rDescent) * factorY;
// measuring empty strings is not guaranteed, so do it by hand
if ( str.IsEmpty())
{
if ( width )
*width = 0 ;
+
+ // Height already assigned above if necessary.
}
else
{
@@ -2271,7 +2332,7 @@ wxGDIPlusPrintingContext::wxGDIPlusPrintingContext( wxGraphicsRenderer* renderer
// We use this modifier when measuring fonts. It is needed because the
// page scale is modified above.
- m_fontScaleRatio = context->GetDpiY() / 72.0;
+ m_fontScaleRatio = context->GetDpiY() / 96.0;
}
//-----------------------------------------------------------------------------
diff --git a/src/msw/headerctrl.cpp b/src/msw/headerctrl.cpp
index 966f6b04e5..d02cd7c7da 100644
--- a/src/msw/headerctrl.cpp
+++ b/src/msw/headerctrl.cpp
@@ -317,35 +317,28 @@ void wxHeaderCtrl::DoInsertItem(const wxHeaderColumn& col, unsigned int idx)
if ( HasFlag(wxHD_BITMAP_ON_RIGHT) )
hdi.fmt |= HDF_BITMAP_ON_RIGHT;
- if ( bmp.IsOk() )
+ const int bmpWidth = bmp.GetWidth(),
+ bmpHeight = bmp.GetHeight();
+
+ if ( !m_imageList )
{
- const int bmpWidth = bmp.GetWidth(),
- bmpHeight = bmp.GetHeight();
-
- if ( !m_imageList )
- {
- m_imageList = new wxImageList(bmpWidth, bmpHeight);
- (void) // suppress mingw32 warning about unused computed value
- Header_SetImageList(GetHwnd(), GetHimagelistOf(m_imageList));
- }
- else // already have an image list
- {
- // check that all bitmaps we use have the same size
- int imageWidth,
- imageHeight;
- m_imageList->GetSize(0, imageWidth, imageHeight);
-
- wxASSERT_MSG( imageWidth == bmpWidth && imageHeight == bmpHeight,
- "all column bitmaps must have the same size" );
- }
-
- m_imageList->Add(bmp);
- hdi.iImage = m_imageList->GetImageCount() - 1;
+ m_imageList = new wxImageList(bmpWidth, bmpHeight);
+ (void) // suppress mingw32 warning about unused computed value
+ Header_SetImageList(GetHwnd(), GetHimagelistOf(m_imageList));
}
- else // no bitmap but we still need to update the item
+ else // already have an image list
{
- hdi.iImage = I_IMAGENONE;
+ // check that all bitmaps we use have the same size
+ int imageWidth,
+ imageHeight;
+ m_imageList->GetSize(0, imageWidth, imageHeight);
+
+ wxASSERT_MSG( imageWidth == bmpWidth && imageHeight == bmpHeight,
+ "all column bitmaps must have the same size" );
}
+
+ m_imageList->Add(bmp);
+ hdi.iImage = m_imageList->GetImageCount() - 1;
}
if ( col.GetAlignment() != wxALIGN_NOT )
@@ -747,7 +740,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
// HDN_ITEMCHANGED
// In both cases last HDN_ITEMCHANGING notification is sent
// after HDN_ENDTRACK so we have to skip it.
- if ( nmhdr->pitem && (nmhdr->pitem->mask & HDI_WIDTH) && m_isColBeingResized )
+ if ( nmhdr->pitem && (nmhdr->pitem->mask & HDI_WIDTH) )
{
// prevent the column from being shrunk beneath its min width
width = nmhdr->pitem->cxy;
@@ -757,13 +750,19 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
// happening
veto = true;
}
- else // width is acceptable
+ // width is acceptable and notification arrived before HDN_ENDTRACK
+ else if ( m_isColBeingResized )
{
// generate the resizing event from here as we don't seem
// to be getting HDN_TRACK events at all, at least with
// comctl32.dll v6
evtType = wxEVT_HEADER_RESIZING;
}
+ // else
+ // Nnotification arriving after HDN_ENDTRACK is handled normally
+ // by the control but EVT_HEADER_RESIZING event cannot be generated
+ // because EVT_HEADER_END_RESIZE finalizing the resizing has been
+ // already emitted.
}
break;
diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp
index 33828288a4..b710efaac8 100644
--- a/src/msw/imaglist.cpp
+++ b/src/msw/imaglist.cpp
@@ -70,7 +70,6 @@ static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask);
wxImageList::wxImageList()
{
m_hImageList = 0;
- m_size = wxSize(0,0);
}
// Creates an image list
diff --git a/src/msw/mediactrl_wmp10.cpp b/src/msw/mediactrl_wmp10.cpp
index c220a5a6fb..06ab5d889d 100644
--- a/src/msw/mediactrl_wmp10.cpp
+++ b/src/msw/mediactrl_wmp10.cpp
@@ -105,6 +105,7 @@ const IID IID_IWMPPlayer2 = {0x0E6B01D1,0xD407,0x4C85,{0xBF,0x5F,0x1C,0x01,0xF6,
const IID IID_IWMPCore2 = {0xBC17E5B7,0x7561,0x4C18,{0xBB,0x90,0x17,0xD4,0x85,0x77,0x56,0x59}};
const IID IID_IWMPCore3 = {0x7587C667,0x628F,0x499F,{0x88,0xE7,0x6A,0x6F,0x4E,0x88,0x84,0x64}};
const IID IID_IWMPNetwork = {0xEC21B779,0xEDEF,0x462D,{0xBB,0xA4,0xAD,0x9D,0xDE,0x2B,0x29,0xA7}};
+const IID IID_IWMPControls2 = {0x6F030D25,0x0890,0x480F,{0x97, 0x75, 0x1F,0x7E,0x40,0xAB,0x5B,0x8E}};
enum WMPOpenState
{
@@ -265,6 +266,12 @@ public:
};
+struct IWMPControls2 : public IWMPControls
+{
+public:
+ virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE step(
+ /* [in] */ long lStep ) = 0;
+};
struct IWMPSettings : public IDispatch
{
@@ -665,6 +672,8 @@ public:
IWMPPlayer* m_pWMPPlayer; // Main activex interface
IWMPSettings* m_pWMPSettings; // Settings such as volume
IWMPControls* m_pWMPControls; // Control interface (play etc.)
+ IWMPControls2* m_pWMPControls2; // Control interface (play etc.)
+
wxSize m_bestSize; // Actual movie size
bool m_bWasStateChanged; // See the "introduction"
@@ -717,7 +726,8 @@ wxWMP10MediaBackend::wxWMP10MediaBackend()
#endif
m_pWMPPlayer(NULL),
m_pWMPSettings(NULL),
- m_pWMPControls(NULL)
+ m_pWMPControls(NULL),
+ m_pWMPControls2(NULL)
{
m_evthandler = NULL;
@@ -749,6 +759,8 @@ wxWMP10MediaBackend::~wxWMP10MediaBackend()
m_pWMPSettings->Release();
if (m_pWMPControls)
m_pWMPControls->Release();
+ if (m_pWMPControls2)
+ m_pWMPControls2->Release();
}
}
@@ -787,6 +799,8 @@ bool wxWMP10MediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
wxLogSysError(wxT("Could not obtain controls from WMP10!"));
return false;
}
+ if (m_pWMPControls )
+ m_pWMPControls->QueryInterface(IID_IWMPControls2, (void**)&m_pWMPControls2);
}
#endif
@@ -1136,8 +1150,18 @@ bool wxWMP10MediaBackend::Stop()
//---------------------------------------------------------------------------
bool wxWMP10MediaBackend::SetPosition(wxLongLong where)
{
+ // The display does not update if only put_currentPosition is called.
+ // We have to find the time for the previous frame, set the control
+ // to that position and then tell it to step forward one frame. This
+ // forces the control to draw the frame to the screen, otherwise we get
+ // just a black screen.
+
+ double timePerFrameInMSec = 0;
+ if (m_pWMPControls2)
+ timePerFrameInMSec = 1000 / GetPlaybackRate();
+
HRESULT hr = m_pWMPControls->put_currentPosition(
- ((LONGLONG)where.GetValue()) / 1000.0
+ ((LONGLONG)where.GetValue() - timePerFrameInMSec) / 1000.0
);
if(FAILED(hr))
{
@@ -1145,6 +1169,10 @@ bool wxWMP10MediaBackend::SetPosition(wxLongLong where)
return false;
}
+ if (m_pWMPControls2)
+ m_pWMPControls2->step(1);
+
+
return true;
}
diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp
index f39af0763f..1c53d8de1d 100644
--- a/src/msw/menuitem.cpp
+++ b/src/msw/menuitem.cpp
@@ -165,7 +165,10 @@ class MenuDrawData
public:
// Wrapper around standard MARGINS structure providing some helper
// functions and automatically initializing the margin fields to 0.
- struct Margins : MARGINS
+ struct Margins
+#if wxUSE_UXTHEME
+ : MARGINS
+#endif // wxUSE_UXTHEME
{
Margins()
{
@@ -193,6 +196,12 @@ public:
rect.right += cyTopHeight;
rect.bottom += cyBottomHeight;
}
+
+#if !wxUSE_UXTHEME
+ // When MARGINS struct is not available, we need to define the fields
+ // we use ourselves.
+ int cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight;
+#endif // !wxUSE_UXTHEME
};
Margins ItemMargin; // popup item margins
diff --git a/src/msw/popupwin.cpp b/src/msw/popupwin.cpp
index 3784c52a98..525fd29469 100644
--- a/src/msw/popupwin.cpp
+++ b/src/msw/popupwin.cpp
@@ -64,13 +64,24 @@ WXDWORD wxPopupWindow::MSWGetStyle(long flags, WXDWORD *exstyle) const
// we only honour the border flags, the others don't make sense for us
WXDWORD style = wxWindow::MSWGetStyle(flags & wxBORDER_MASK, exstyle);
- // We need to be a popup (i.e. not a child) window in order to not be
- // confined to the parent window area, as is required for a drop down, for
- // example. Old implementation used WS_CHILD and made this window a child
- // of the desktop window, but this resulted in problems with handling input
- // in the popup children, and so was changed to the current version.
- style &= ~WS_CHILD;
- style |= WS_POPUP;
+ // wxMSW uses 2 rather different implementations of wxPopupWindow
+ // internally, each one with its own limitations, so we allow specifying
+ // wxPU_CONTAINS_CONTROLS flag to select which one is used. The default is
+ // to use a child window of the desktop for the popup, which is compatible
+ // with the previous wxWidgets versions and works well for simple popups,
+ // but many standard controls can't work as children of such a window
+ // because it doesn't accept focus. So an alternative implementation for
+ // the popups that will contain such controls is available, but this one
+ // has problems due to the fact that it does take focus and not only can
+ // (and does) this break existing code, but it also prevents the parent
+ // window from keeping focus while showing the popup, as must be done when
+ // using auto-completion tooltips, for example. So neither implementation
+ // can be used in all cases and you have to explicitly choose your poison.
+ if ( HasFlag(wxPU_CONTAINS_CONTROLS) )
+ {
+ style &= ~WS_CHILD;
+ style |= WS_POPUP;
+ }
if ( exstyle )
{
@@ -81,6 +92,31 @@ WXDWORD wxPopupWindow::MSWGetStyle(long flags, WXDWORD *exstyle) const
return style;
}
+WXHWND wxPopupWindow::MSWGetParent() const
+{
+ if ( HasFlag(wxPU_CONTAINS_CONTROLS) )
+ {
+ return wxPopupWindowBase::MSWGetParent();
+ }
+ else
+ {
+ // we must be a child of the desktop to be able to extend beyond the
+ // parent window client area (like the comboboxes drop downs do)
+ return (WXHWND)::GetDesktopWindow();
+ }
+}
+
+void wxPopupWindow::SetFocus()
+{
+ // Focusing on a popup window does not work on MSW unless WS_POPUP style
+ // is set. Since this is only the case if the style wxPU_CONTAINS_CONTROLS
+ // is used, we'll handle the focus in that case and otherwise do nothing.
+ if ( HasFlag(wxPU_CONTAINS_CONTROLS) )
+ {
+ wxPopupWindowBase::SetFocus();
+ }
+}
+
bool wxPopupWindow::Show(bool show)
{
// It's important to update wxCurrentPopupWindow before showing the window,
@@ -88,7 +124,30 @@ bool wxPopupWindow::Show(bool show)
// from inside Show() so that it knows to remain [appearing] active.
wxCurrentPopupWindow = show ? this : NULL;
- return wxPopupWindowBase::Show(show);
+ if ( HasFlag(wxPU_CONTAINS_CONTROLS) )
+ {
+ return wxPopupWindowBase::Show(show);
+ }
+ else
+ {
+ if ( !wxWindowMSW::Show(show) )
+ return false;
+
+ if ( show )
+ {
+ // raise to top of z order
+ if ( !::SetWindowPos(GetHwnd(), HWND_TOP, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE) )
+ {
+ wxLogLastError(wxT("SetWindowPos"));
+ }
+
+ // and set it as the foreground window so the mouse can be captured
+ ::SetForegroundWindow(GetHwnd());
+ }
+
+ return true;
+ }
}
// ----------------------------------------------------------------------------
diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp
index 43a69bbc3e..c0b93032a7 100644
--- a/src/msw/radiobox.cpp
+++ b/src/msw/radiobox.cpp
@@ -586,10 +586,9 @@ wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const
reinterpret_cast(const_cast(this))).y / 2;
// and also wide enough for its label
- int widthLabel;
- GetTextExtent(GetLabelText(), &widthLabel, NULL);
- if ( widthLabel > width )
- width = widthLabel;
+ int widthBox = wxStaticBox::DoGetBestSize().x;
+ if ( widthBox > width )
+ width = widthBox;
return wxSize(width, height);
}
diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp
index e4c1134024..00c3fa93b4 100644
--- a/src/msw/radiobut.cpp
+++ b/src/msw/radiobut.cpp
@@ -92,7 +92,7 @@ void wxRadioButton::SetValue(bool value)
else // owner drawn buttons don't react to this message
Refresh();
- if ( !value )
+ if ( !value || HasFlag(wxRB_SINGLE) )
return;
// if we set the value of one radio button we also must clear all the other
diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp
index cd99974bf5..558107053f 100644
--- a/src/msw/slider.cpp
+++ b/src/msw/slider.cpp
@@ -54,8 +54,7 @@ enum
// the gaps between the slider and the labels, in pixels
const int HGAP = 5;
const int VGAP = 4;
-// these 2 values are arbitrary:
-const int THUMB = 24;
+// this value is arbitrary:
const int TICK = 8;
} // anonymous namespace
@@ -194,6 +193,9 @@ WXDWORD wxSlider::MSWGetStyle(long style, WXDWORD *exstyle) const
// TBS_HORZ, TBS_RIGHT and TBS_BOTTOM are 0 but do include them for clarity
msStyle |= style & wxSL_VERTICAL ? TBS_VERT : TBS_HORZ;
+ // allow setting thumb size
+ msStyle |= TBS_FIXEDLENGTH;
+
if ( style & wxSL_BOTH )
{
// this fully specifies the style combined with TBS_VERT/HORZ above
@@ -390,6 +392,9 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
return;
}
+ const int thumbSize = GetThumbLength();
+ const int tickSize = FromDIP(TICK);
+
int minLabelWidth,
maxLabelWidth;
const int labelHeight = GetLabelsSize(&minLabelWidth, &maxLabelWidth);
@@ -401,10 +406,10 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
}
int tickOffset = 0;
- if ( HasFlag(wxSL_TICKS))
- tickOffset = TICK;
- if ( HasFlag(wxSL_BOTH))
- tickOffset *= 2;
+ if ( HasFlag(wxSL_TICKS) )
+ tickOffset = tickSize;
+ if ( HasFlag(wxSL_BOTH) )
+ tickOffset *= 2;
// be careful to position the slider itself after moving the labels as
// otherwise our GetBoundingBox(), which is called from WM_SIZE handler,
@@ -419,7 +424,7 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
sliderOffset += longestLabelWidth + HGAP;
}
- int labelHeightUsed = 0 ;
+ int labelHeightUsed = 0;
if ( HasFlag(wxSL_MIN_MAX_LABELS) )
{
@@ -429,9 +434,12 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
if ( HasFlag(wxSL_LEFT) )
{
// Label aligned to the left edge of the slider.
- xPos = sliderOffset + tickOffset;
- holdTopX = xPos;
- holdBottomX = xPos;
+ xPos = sliderOffset + thumbSize / 2;
+ if ( HasFlag(wxSL_TICKS) )
+ xPos += tickSize;
+
+ holdTopX = xPos - minLabelWidth / 2;
+ holdBottomX = xPos - maxLabelWidth / 2;
if ( holdTopX + minLabelWidth > width )
holdTopX = width - minLabelWidth;
if ( holdBottomX + maxLabelWidth > width )
@@ -440,24 +448,18 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
else // wxSL_RIGHT
{
// Label aligned to the right edge of the slider.
- if ( HasFlag(wxSL_BOTH) )
- xPos = sliderOffset + THUMB + tickOffset/2;
- else
- xPos = sliderOffset + THUMB;
+ xPos = sliderOffset + thumbSize / 2;
+ if ( HasFlag(wxSL_TICKS) && HasFlag(wxSL_BOTH) )
+ xPos += tickSize;
- holdTopX = xPos - minLabelWidth;
- holdBottomX = xPos - maxLabelWidth;
+ holdTopX = xPos - minLabelWidth / 2;
+ holdBottomX = xPos - maxLabelWidth / 2;
if ( holdTopX < 0 )
holdTopX = 0;
if ( holdBottomX < 0 )
holdBottomX = 0;
}
- if ( HasFlag(wxSL_INVERSE) )
- {
- wxSwap(holdTopX, holdBottomX);
- }
-
DoMoveSibling((HWND)(*m_labels)[SliderLabel_Min],
x + holdTopX,
y,
@@ -467,14 +469,14 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
y + height - labelHeight,
maxLabelWidth, labelHeight);
- labelHeightUsed = labelHeight ;
+ labelHeightUsed = labelHeight;
}
if ( HasFlag(wxSL_VALUE_LABEL) )
{
DoMoveSibling((HWND)(*m_labels)[SliderLabel_Value],
- x + ( HasFlag(wxSL_LEFT) ? THUMB + tickOffset + HGAP : 0 ),
- y + (height - labelHeight)/2,
+ x + ( HasFlag(wxSL_LEFT) ? thumbSize + tickOffset + HGAP : 0 ),
+ y + (height - labelHeight) / 2,
longestLabelWidth, labelHeight);
}
@@ -482,27 +484,27 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
wxSliderBase::DoMoveWindow(
x + sliderOffset,
y + labelHeightUsed,
- THUMB + tickOffset,
+ thumbSize + tickOffset,
height - (labelHeightUsed * 2));
}
else // horizontal
{
int yLabelMinMax =
- (y + ((THUMB + tickOffset) / 2)) - (labelHeight / 2);
+ ((thumbSize + tickOffset) / 2) - (labelHeight / 2);
int xLabelValue =
- x + minLabelWidth +
- ((width - (minLabelWidth + maxLabelWidth)) / 2) -
+ minLabelWidth +
+ ((width - (minLabelWidth + maxLabelWidth)) / 2) -
(longestLabelWidth / 2);
- int ySlider = y;
- int minLabelWidthUsed = 0 ;
- int maxLabelWidthUsed = 0 ;
+ int ySlider = 0;
+ int minLabelWidthUsed = 0;
+ int maxLabelWidthUsed = 0;
if ( HasFlag(wxSL_VALUE_LABEL) )
{
DoMoveSibling((HWND)(*m_labels)[SliderLabel_Value],
- xLabelValue,
- y + (HasFlag(wxSL_BOTTOM) ? 0 : THUMB + tickOffset),
+ x + xLabelValue,
+ y + (HasFlag(wxSL_BOTTOM) ? 0 : thumbSize + tickOffset),
longestLabelWidth, labelHeight);
if ( HasFlag(wxSL_BOTTOM) )
@@ -516,36 +518,38 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
{
DoMoveSibling((HWND)(*m_labels)[SliderLabel_Min],
x,
- yLabelMinMax,
+ y + yLabelMinMax,
minLabelWidth, labelHeight);
DoMoveSibling((HWND)(*m_labels)[SliderLabel_Max],
x + width - maxLabelWidth,
- yLabelMinMax,
+ y + yLabelMinMax,
maxLabelWidth, labelHeight);
- minLabelWidthUsed = minLabelWidth + VGAP ;
- maxLabelWidthUsed = maxLabelWidth + VGAP ;
+ minLabelWidthUsed = minLabelWidth + VGAP;
+ maxLabelWidthUsed = maxLabelWidth + VGAP;
}
// position the slider itself along the top/bottom edge
wxSliderBase::DoMoveWindow(
x + minLabelWidthUsed,
- ySlider,
+ y + ySlider,
width - (minLabelWidthUsed + maxLabelWidthUsed),
- THUMB + tickOffset);
+ thumbSize + tickOffset);
}
}
wxSize wxSlider::DoGetBestSize() const
{
// this value is arbitrary:
- static const int length = 100;
+ static const int length = FromDIP(100);
+ const int thumbSize = GetThumbLength();
+ const int tickSize = FromDIP(TICK);
int *width;
wxSize size;
if ( HasFlag(wxSL_VERTICAL) )
{
- size.Set(THUMB, length);
+ size.Set(thumbSize, length);
width = &size.x;
if ( m_labels )
@@ -559,7 +563,7 @@ wxSize wxSlider::DoGetBestSize() const
if ( HasFlag(wxSL_VALUE_LABEL) )
size.x += longestLabelWidth + HGAP;
- if (HasFlag(wxSL_MIN_MAX_LABELS))
+ if ( HasFlag(wxSL_MIN_MAX_LABELS) )
{
size.x = wxMax(size.x, longestLabelWidth);
size.y += hLabel * 2;
@@ -568,7 +572,7 @@ wxSize wxSlider::DoGetBestSize() const
}
else // horizontal
{
- size.Set(length, THUMB);
+ size.Set(length, thumbSize);
width = &size.y;
if ( m_labels )
@@ -588,10 +592,10 @@ wxSize wxSlider::DoGetBestSize() const
// need extra space to show ticks
if ( HasFlag(wxSL_TICKS) )
{
- *width += TICK;
+ *width += tickSize;
// and maybe twice as much if we show them on both sides
if ( HasFlag(wxSL_BOTH) )
- *width += TICK;
+ *width += tickSize;
}
return size;
}
@@ -649,7 +653,7 @@ void wxSlider::SetRange(int minValue, int maxValue)
if ( m_labels )
{
- Move(wxDefaultPosition); // Force a re-layout the labels.
+ Move(wxDefaultPosition, wxSIZE_FORCE); // Force a re-layout the labels.
// Update the label with the value adjusted by the control as
// old value can be out of the new range.
@@ -730,6 +734,8 @@ void wxSlider::SetSelection(int minPos, int maxPos)
void wxSlider::SetThumbLength(int len)
{
::SendMessage(GetHwnd(), TBM_SETTHUMBLENGTH, (WPARAM) len, (LPARAM) 0);
+
+ InvalidateBestSize();
}
int wxSlider::GetThumbLength() const
diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp
index fbb9e2b387..058e08ed3d 100644
--- a/src/msw/spinctrl.cpp
+++ b/src/msw/spinctrl.cpp
@@ -244,6 +244,7 @@ void wxSpinCtrl::NormalizeValue()
if ( changed )
{
+ m_oldValue = value;
SendSpinUpdate(value);
}
}
@@ -666,10 +667,7 @@ void wxSpinCtrl::SendSpinUpdate(int value)
wxSpinEvent event(wxEVT_SPINCTRL, GetId());
event.SetEventObject(this);
event.SetInt(value);
-
(void)HandleWindowEvent(event);
-
- m_oldValue = value;
}
bool wxSpinCtrl::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
@@ -687,7 +685,10 @@ bool wxSpinCtrl::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
// might be using 32 bit range.
int new_value = GetValue();
if (m_oldValue != new_value)
- SendSpinUpdate( new_value );
+ {
+ m_oldValue = new_value;
+ SendSpinUpdate(new_value);
+ }
return true;
}
diff --git a/src/msw/taskbarbutton.cpp b/src/msw/taskbarbutton.cpp
index c7df79b056..7aa6719890 100644
--- a/src/msw/taskbarbutton.cpp
+++ b/src/msw/taskbarbutton.cpp
@@ -882,20 +882,7 @@ bool wxTaskBarButtonImpl::InsertThumbBarButton(size_t pos,
wxThumbBarButton* wxTaskBarButtonImpl::RemoveThumbBarButton(
wxThumbBarButton *button)
{
- for ( wxThumbBarButtons::iterator iter = m_thumbBarButtons.begin();
- iter != m_thumbBarButtons.end();
- ++iter )
- {
- if ( button == *iter )
- {
- m_thumbBarButtons.erase(iter);
- button->SetParent(NULL);
- InitOrUpdateThumbBarButtons();
- return *iter;
- }
- }
-
- return NULL;
+ return RemoveThumbBarButton(button->GetID());
}
wxThumbBarButton* wxTaskBarButtonImpl::RemoveThumbBarButton(int id)
@@ -904,12 +891,13 @@ wxThumbBarButton* wxTaskBarButtonImpl::RemoveThumbBarButton(int id)
iter != m_thumbBarButtons.end();
++iter )
{
- if ( id == (*iter)->GetID() )
+ wxThumbBarButton* button = *iter;
+ if ( id == button->GetID() )
{
m_thumbBarButtons.erase(iter);
- (*iter)->SetParent(NULL);
+ button->SetParent(NULL);
InitOrUpdateThumbBarButtons();
- return *iter;
+ return button;
}
}
@@ -1391,10 +1379,11 @@ wxTaskBarJumpListImpl::RemoveCustomCategory(const wxString& title)
it != m_customCategories.end();
++it )
{
- if ( (*it)->GetTitle() == title )
+ wxTaskBarJumpListCategory* tbJlCat = *it;
+ if ( tbJlCat->GetTitle() == title )
{
m_customCategories.erase(it);
- return *it;
+ return tbJlCat;
}
}
diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp
index b883d9d8f9..d7c4cfc79f 100644
--- a/src/msw/toplevel.cpp
+++ b/src/msw/toplevel.cpp
@@ -605,6 +605,16 @@ bool wxTopLevelWindowMSW::Show(bool show)
DoShowWindow(nShowCmd);
+ if ( show && nShowCmd == SW_MAXIMIZE )
+ {
+ // We don't receive WM_SHOWWINDOW when shown in the maximized state,
+ // cf. https://docs.microsoft.com/en-us/windows/desktop/winmsg/wm-showwindow
+ // and so we have to issue the event ourselves in this case.
+ wxShowEvent event(GetId(), true);
+ event.SetEventObject(this);
+ AddPendingEvent(event);
+ }
+
return true;
}
diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp
index 2f98e83e0d..c5a4e7f34d 100644
--- a/src/msw/webview_ie.cpp
+++ b/src/msw/webview_ie.cpp
@@ -110,6 +110,10 @@ bool wxWebViewIE::Create(wxWindow* parent,
EnableControlFeature(21 /* FEATURE_DISABLE_NAVIGATION_SOUNDS */);
+ // Make behaviour consistent with the other backends when loading localhost
+ // pages without any physical network connection.
+ SetOfflineMode(false);
+
LoadURL(url);
return true;
}
@@ -541,15 +545,13 @@ bool wxWebViewIE::IsOfflineMode()
void wxWebViewIE::SetOfflineMode(bool offline)
{
- // FIXME: the wxWidgets docs do not really document what the return
- // parameter of PutProperty is
#if wxDEBUG_LEVEL
- const bool success =
+ const HRESULT success =
#endif
m_ie.PutProperty("Offline", (offline ?
VARIANT_TRUE :
VARIANT_FALSE));
- wxASSERT(success);
+ wxASSERT(SUCCEEDED(success));
}
bool wxWebViewIE::IsBusy() const
@@ -855,7 +857,7 @@ wxString wxWebViewIE::GetPageText() const
}
}
-bool wxWebViewIE::MSWSetModernEmulationLevel(bool modernLevel)
+bool wxWebViewIE::MSWSetEmulationLevel(wxWebViewIE_EmulationLevel level)
{
// Registry key where emulation level for programs are set
static const wxChar* IE_EMULATION_KEY =
@@ -870,12 +872,9 @@ bool wxWebViewIE::MSWSetModernEmulationLevel(bool modernLevel)
}
const wxString programName = wxGetFullModuleName().AfterLast('\\');
- if ( modernLevel )
+ if ( level != wxWEBVIEWIE_EMU_DEFAULT )
{
- // IE8 (8000) is sufficiently modern for our needs, see
- // https://msdn.microsoft.com/library/ee330730.aspx#browser_emulation
- // for other values that could be used here.
- if ( !key.SetValue(programName, 8000) )
+ if ( !key.SetValue(programName, level) )
{
wxLogWarning(_("Failed to set web view to modern emulation level"));
return false;
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
index e17b851b59..8ef8e639e3 100644
--- a/src/msw/window.cpp
+++ b/src/msw/window.cpp
@@ -58,8 +58,9 @@
#include "wx/ownerdrw.h"
#endif
-#include "wx/hashmap.h"
+#include "wx/display.h"
#include "wx/evtloop.h"
+#include "wx/hashmap.h"
#include "wx/popupwin.h"
#include "wx/power.h"
#include "wx/scopeguard.h"
@@ -1518,6 +1519,9 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
// wxTopLevelWindow) should remove WS_CHILD in their MSWGetStyle()
WXDWORD style = WS_CHILD;
+ if ( !IsThisEnabled() )
+ style |= WS_DISABLED;
+
// using this flag results in very significant reduction in flicker,
// especially with controls inside the static boxes (as the interior of the
// box is not redrawn twice), but sometimes results in redraw problems, so
@@ -3725,7 +3729,12 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
}
wxUxThemeHandle hTheme((const wxWindow *)this, L"EDIT");
- RECT rcClient = { 0, 0, 0, 0 };
+
+ // There is no need to initialize rcClient: either it will
+ // be done by GetThemeBackgroundContentRect() or we'll do
+ // it below if it fails.
+ RECT rcClient;
+
wxClientDC dc((wxWindow *)this);
wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();
@@ -3734,20 +3743,25 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
hTheme,
GetHdcOf(*impl),
EP_EDITTEXT,
- ETS_NORMAL,
+ IsEnabled() ? ETS_NORMAL : ETS_DISABLED,
rect,
- &rcClient) == S_OK )
+ &rcClient) != S_OK )
{
- InflateRect(&rcClient, -1, -1);
- if (wParam)
- csparam->rgrc[0] = rcClient;
- else
- *((RECT*)lParam) = rcClient;
-
- // WVR_REDRAW triggers a bug whereby child windows are moved up and left,
- // so don't use.
- // rc.result = WVR_REDRAW;
+ // If GetThemeBackgroundContentRect() failed, as can
+ // happen with at least some custom themes, just use
+ // the original client rectangle.
+ rcClient = *rect;
}
+
+ InflateRect(&rcClient, -1, -1);
+ if (wParam)
+ csparam->rgrc[0] = rcClient;
+ else
+ *((RECT*)lParam) = rcClient;
+
+ // WVR_REDRAW triggers a bug whereby child windows are moved up and left,
+ // so don't use.
+ // rc.result = WVR_REDRAW;
}
}
break;
@@ -3770,28 +3784,37 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
wxCopyRectToRECT(GetSize(), rcBorder);
RECT rcClient;
- ::GetThemeBackgroundContentRect(
- hTheme, GetHdcOf(*impl), EP_EDITTEXT, ETS_NORMAL, &rcBorder, &rcClient);
+
+ const int nState = IsEnabled() ? ETS_NORMAL : ETS_DISABLED;
+
+ if ( ::GetThemeBackgroundContentRect
+ (
+ hTheme,
+ GetHdcOf(*impl),
+ EP_EDITTEXT,
+ nState,
+ &rcBorder,
+ &rcClient
+ ) != S_OK )
+ {
+ // As above in WM_NCCALCSIZE, fall back on something
+ // reasonable for themes which don't implement this
+ // function.
+ rcClient = rcBorder;
+ }
+
InflateRect(&rcClient, -1, -1);
::ExcludeClipRect(GetHdcOf(*impl), rcClient.left, rcClient.top,
rcClient.right, rcClient.bottom);
// Make sure the background is in a proper state
- if (::IsThemeBackgroundPartiallyTransparent(hTheme, EP_EDITTEXT, ETS_NORMAL))
+ if (::IsThemeBackgroundPartiallyTransparent(hTheme, EP_EDITTEXT, nState))
{
::DrawThemeParentBackground(GetHwnd(), GetHdcOf(*impl), &rcBorder);
}
// Draw the border
- int nState;
- if ( !IsEnabled() )
- nState = ETS_DISABLED;
- // should we check this?
- //else if ( ::GetWindowLong(GetHwnd(), GWL_STYLE) & ES_READONLY)
- // nState = ETS_READONLY;
- else
- nState = ETS_NORMAL;
::DrawThemeBackground(hTheme, GetHdcOf(*impl), EP_EDITTEXT, nState, &rcBorder, NULL);
}
}
@@ -4689,6 +4712,8 @@ bool wxWindowMSW::HandleSysColorChange()
bool wxWindowMSW::HandleDisplayChange()
{
+ wxDisplay::InvalidateCache();
+
wxDisplayChangedEvent event;
event.SetEventObject(this);
diff --git a/src/osx/carbon/dataobj.cpp b/src/osx/carbon/dataobj.cpp
index 059d766350..cb1abf26de 100644
--- a/src/osx/carbon/dataobj.cpp
+++ b/src/osx/carbon/dataobj.cpp
@@ -469,14 +469,20 @@ bool wxDataObject::GetFromPasteboard( void * pb )
{
// revert the translation and decomposition to arrive at a proper utf8 string again
CFURLRef url = CFURLCreateWithBytes( kCFAllocatorDefault, CFDataGetBytePtr( flavorData ), flavorDataSize, kCFStringEncodingUTF8, NULL );
- CFStringRef cfString = CFURLCopyFileSystemPath( url, kCFURLPOSIXPathStyle );
- CFRelease( url );
- CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, cfString);
- CFRelease( cfString );
- CFStringNormalize(cfMutableString,kCFStringNormalizationFormC);
- wxString path = wxCFStringRef(cfMutableString).AsString();
- if (!path.empty())
- filenamesPassed += path + wxT("\n");
+ if ( url )
+ {
+ CFStringRef cfString = CFURLCopyFileSystemPath( url, kCFURLPOSIXPathStyle );
+ CFRelease( url );
+ if ( cfString )
+ {
+ CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, cfString);
+ CFRelease( cfString );
+ CFStringNormalize(cfMutableString,kCFStringNormalizationFormC);
+ wxString path = wxCFStringRef(cfMutableString).AsString();
+ if (!path.empty())
+ filenamesPassed += path + wxT("\n");
+ }
+ }
}
else
{
diff --git a/src/osx/carbon/dcprint.cpp b/src/osx/carbon/dcprint.cpp
index 9c12d4b688..977b94078f 100644
--- a/src/osx/carbon/dcprint.cpp
+++ b/src/osx/carbon/dcprint.cpp
@@ -260,9 +260,9 @@ wxSize wxMacCarbonPrinterDC::GetPPI() const
wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printdata )
: wxGCDCImpl( owner )
+ , m_printData(printdata)
{
m_ok = false ;
- m_printData = printdata ;
m_printData.ConvertToNative() ;
m_nativePrinterDC = wxNativePrinterDC::Create( &m_printData ) ;
if ( m_nativePrinterDC )
diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp
index 73f22a35fb..93d0ffe7c2 100644
--- a/src/osx/carbon/font.cpp
+++ b/src/osx/carbon/font.cpp
@@ -244,8 +244,8 @@ namespace
wxFontRefData::wxFontRefData(const wxFontRefData& data)
: wxGDIRefData()
+ , m_info(data.m_info)
{
- m_info = data.m_info;
m_ctFont = data.m_ctFont;
m_ctFontAttributes = data.m_ctFontAttributes;
m_cgFont = data.m_cgFont;
diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp
index 6ff597cd02..0fe428cd20 100644
--- a/src/osx/carbon/graphics.cpp
+++ b/src/osx/carbon/graphics.cpp
@@ -830,8 +830,8 @@ private :
};
wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col) : wxGraphicsObjectRefData( renderer )
+ , m_colour(col)
{
- m_colour = col;
m_underlined = font.GetUnderlined();
m_strikethrough = font.GetStrikethrough();
@@ -2213,6 +2213,7 @@ void wxMacCoreGraphicsContext::Rotate( wxDouble angle )
void wxMacCoreGraphicsContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h )
{
#if wxOSX_USE_COCOA
+ if (EnsureIsValid())
{
CGRect r = CGRectMake( (CGFloat) x , (CGFloat) y , (CGFloat) w , (CGFloat) h );
wxOSXDrawNSImage( m_cgContext, &r, bmp.GetImage());
diff --git a/src/osx/cocoa/appprogress.mm b/src/osx/cocoa/appprogress.mm
index 80e86cb765..350190e136 100644
--- a/src/osx/cocoa/appprogress.mm
+++ b/src/osx/cocoa/appprogress.mm
@@ -42,15 +42,21 @@
[m_progIndicator setBezeled:YES];
[m_progIndicator setMinValue:0];
[m_progIndicator setMaxValue:1];
- [m_progIndicator release];
[self setProgress:0.0];
}
return self;
}
+- (void)dealloc
+{
+ [m_progIndicator release];
+ [super dealloc];
+}
+
- (void)setProgress: (double)value
{
[m_progIndicator setHidden:NO];
+ [m_progIndicator setIndeterminate:NO];
[m_progIndicator setDoubleValue:value];
[m_dockTile display];
@@ -58,6 +64,7 @@
- (void)setIndeterminate: (bool)indeterminate
{
+ [m_progIndicator setHidden:NO];
[m_progIndicator setIndeterminate:indeterminate];
[m_dockTile display];
@@ -65,7 +72,9 @@
- (void)reset
{
- [m_dockTile setContentView:nil];
+ [m_progIndicator setHidden:YES];
+
+ [m_dockTile display];
}
@end
@@ -73,7 +82,7 @@
wxAppProgressIndicator::wxAppProgressIndicator(wxWindow* WXUNUSED(parent), int maxValue ):
m_maxValue(maxValue)
{
- wxAppProgressDockIcon* dockIcon = [[[wxAppProgressDockIcon alloc] init] retain];
+ wxAppProgressDockIcon* dockIcon = [[wxAppProgressDockIcon alloc] init];
m_dockIcon = dockIcon;
}
diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm
index a63c37c7c1..efcc3cb52c 100644
--- a/src/osx/cocoa/button.mm
+++ b/src/osx/cocoa/button.mm
@@ -187,9 +187,18 @@ void wxButtonCocoaImpl::SetAcceleratorFromLabel(const wxString& label)
{
wxString accelstring(label[accelPos + 1]); // Skip '&' itself
accelstring.MakeLower();
- wxCFStringRef cfText(accelstring);
- [GetNSButton() setKeyEquivalent:cfText.AsNSString()];
- [GetNSButton() setKeyEquivalentModifierMask:NSCommandKeyMask];
+ // Avoid Cmd+C closing dialog on Mac.
+ if (accelstring == "c" && GetWXPeer()->GetId() == wxID_CANCEL)
+ {
+ [GetNSButton() setKeyEquivalent:@""];
+ }
+ else
+ {
+ wxString cancelLabel(_("&Cancel"));
+ wxCFStringRef cfText(accelstring);
+ [GetNSButton() setKeyEquivalent:cfText.AsNSString()];
+ [GetNSButton() setKeyEquivalentModifierMask:NSCommandKeyMask];
+ }
}
else
{
diff --git a/src/osx/cocoa/glcanvas.mm b/src/osx/cocoa/glcanvas.mm
index de9ff18901..59c572e73b 100644
--- a/src/osx/cocoa/glcanvas.mm
+++ b/src/osx/cocoa/glcanvas.mm
@@ -140,6 +140,15 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *GLAttrs,
return YES;
}
+// for special keys
+
+- (void)doCommandBySelector:(SEL)aSelector
+{
+ wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
+ if (impl)
+ impl->doCommandBySelector(aSelector, self, _cmd);
+}
+
@end
bool wxGLCanvas::DoCreate(wxWindow *parent,
@@ -149,7 +158,6 @@ bool wxGLCanvas::DoCreate(wxWindow *parent,
long style,
const wxString& name)
{
-
DontCreatePeer();
if ( !wxWindow::Create(parent, id, pos, size, style, name) )
@@ -159,13 +167,12 @@ bool wxGLCanvas::DoCreate(wxWindow *parent,
NSRect r = wxOSXGetFrameForControl( this, pos , size ) ;
wxNSCustomOpenGLView* v = [[wxNSCustomOpenGLView alloc] initWithFrame:r];
- wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( this, v );
+ wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( this, v, wxWidgetImpl::Widget_UserKeyEvents | wxWidgetImpl::Widget_UserMouseEvents );
SetPeer(c);
MacPostControlCreate(pos, size) ;
return true;
}
-
wxGLCanvas::~wxGLCanvas()
{
if ( m_glFormat )
diff --git a/src/osx/cocoa/msgdlg.mm b/src/osx/cocoa/msgdlg.mm
index ffaf9438ca..83b3b74d4f 100644
--- a/src/osx/cocoa/msgdlg.mm
+++ b/src/osx/cocoa/msgdlg.mm
@@ -31,7 +31,7 @@ namespace
{
NSAlertStyle GetAlertStyleFromWXStyle( long style )
{
- if (style & wxICON_WARNING)
+ if (style & (wxICON_WARNING | wxICON_ERROR))
{
// NSCriticalAlertStyle should only be used for questions where
// caution is needed per the OS X HIG. wxICON_WARNING alone doesn't
@@ -42,8 +42,6 @@ namespace
else
return NSWarningAlertStyle;
}
- else if (style & wxICON_ERROR)
- return NSWarningAlertStyle;
else
return NSInformationalAlertStyle;
}
diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm
index dfab030e94..089a1eef7c 100644
--- a/src/osx/cocoa/textctrl.mm
+++ b/src/osx/cocoa/textctrl.mm
@@ -759,6 +759,7 @@ wxNSTextViewControl::wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w, long s
if ( !wxPeer->HasFlag(wxTE_RICH | wxTE_RICH2) )
{
[tv setRichText:NO];
+ [tv setUsesFontPanel:NO];
}
if ( wxPeer->HasFlag(wxTE_AUTO_URL) )
diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm
index d41809fd1a..0efbf083ab 100644
--- a/src/osx/cocoa/utils.mm
+++ b/src/osx/cocoa/utils.mm
@@ -68,6 +68,7 @@ void wxBell()
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
+ [NSApp stop:nil];
wxTheApp->OSXOnDidFinishLaunching();
}
@@ -325,7 +326,6 @@ void wxBell()
// here we subclass NSApplication, for the purpose of being able to override sendEvent.
@interface wxNSApplication : NSApplication
{
- BOOL firstPass;
}
- (id)init;
@@ -340,7 +340,7 @@ void wxBell()
{
if ( self = [super init] )
{
- firstPass = YES;
+ // further init
}
return self;
}
@@ -370,14 +370,7 @@ void wxBell()
if ([anEvent type] == NSKeyUp && ([anEvent modifierFlags] & NSCommandKeyMask))
[[self keyWindow] sendEvent:anEvent];
else
- [super sendEvent:anEvent];
-
- if ( firstPass )
- {
- [NSApp stop:nil];
- firstPass = NO;
- return;
- }
+ [super sendEvent:anEvent];
}
@end
@@ -416,12 +409,6 @@ bool wxApp::DoInitGui()
appcontroller = OSXCreateAppController();
[[NSApplication sharedApplication] setDelegate:(id )appcontroller];
[NSColor setIgnoresAlpha:NO];
-
- // calling finishLaunching so early before running the loop seems to trigger some 'MenuManager compatibility' which leads
- // to the duplication of menus under 10.5 and a warning under 10.6
-#if 0
- [NSApp finishLaunching];
-#endif
}
gNSLayoutManager = [[NSLayoutManager alloc] init];
diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm
index 45cfdd7c37..fa157a9442 100644
--- a/src/osx/cocoa/window.mm
+++ b/src/osx/cocoa/window.mm
@@ -719,9 +719,10 @@ void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEve
}
wxevent.m_wheelDelta = 10;
+ wxevent.m_wheelInverted = [nsEvent isDirectionInvertedFromDevice];
wxevent.m_linesPerAction = 1;
wxevent.m_columnsPerAction = 1;
-
+
if ( fabs(deltaX) > fabs(deltaY) )
{
// wx conventions for horizontal are inverted from vertical (originating from native msw behavior)
@@ -897,7 +898,7 @@ static void SetDrawingEnabledIfFrozenRecursive(wxWidgetCocoaImpl *impl, bool ena
- (BOOL) canBecomeKeyView
{
wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
- if ( viewimpl && viewimpl->IsUserPane() && viewimpl->GetWXPeer() )
+ if ( viewimpl && viewimpl->HasUserKeyHandling() && viewimpl->GetWXPeer() )
return viewimpl->GetWXPeer()->AcceptsFocus();
return NO;
}
@@ -1454,7 +1455,7 @@ void wxWidgetCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd)
{
// for plain NSView mouse events would propagate to parents otherwise
// scrollwheel events have to be propagated if not handled in all cases
- if (!IsUserPane() || [event type] == NSScrollWheel )
+ if (!HasUserMouseHandling() || [event type] == NSScrollWheel )
{
wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
superimpl(slf, (SEL)_cmd, event);
@@ -2101,7 +2102,7 @@ void wxCocoaGesturesImpl::TouchesEnded(NSEvent* event)
void wxWidgetCocoaImpl::insertText(NSString* text, WXWidget slf, void *_cmd)
{
bool result = false;
- if ( IsUserPane() && !m_hasEditor && [text length] > 0)
+ if ( HasUserKeyHandling() && !m_hasEditor && [text length] > 0)
{
if ( m_lastKeyDownEvent!=NULL && [text isEqualToString:[m_lastKeyDownEvent characters]])
{
@@ -2190,7 +2191,7 @@ bool wxWidgetCocoaImpl::performKeyEquivalent(WX_NSEvent event, WXWidget slf, voi
bool wxWidgetCocoaImpl::acceptsFirstResponder(WXWidget slf, void *_cmd)
{
- if ( IsUserPane() )
+ if ( HasUserKeyHandling() )
return m_wxPeer->AcceptsFocus();
else
{
@@ -2512,22 +2513,23 @@ void wxOSXCocoaClassAddWXMethods(Class c, wxOSXSkipOverrides skipFlags)
wxIMPLEMENT_DYNAMIC_CLASS(wxWidgetCocoaImpl , wxWidgetImpl);
-wxWidgetCocoaImpl::wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, bool isRootControl, bool isUserPane ) :
- wxWidgetImpl( peer, isRootControl, isUserPane )
+wxWidgetCocoaImpl::wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, int flags ) :
+wxWidgetImpl( peer, flags )
{
Init();
m_osxView = w;
-
+
// check if the user wants to create the control initially hidden
if ( !peer->IsShown() )
SetVisibility(false);
-
+
// gc aware handling
if ( m_osxView )
CFRetain(m_osxView);
[m_osxView release];
}
+
wxWidgetCocoaImpl::wxWidgetCocoaImpl()
{
Init();
@@ -3525,7 +3527,7 @@ bool wxWidgetCocoaImpl::EnableTouchEvents(int eventsMask)
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
if ( wxPlatformInfo::Get().CheckOSVersion(10, 10) )
{
- if ( IsUserPane() )
+ if ( HasUserMouseHandling() )
{
if ( eventsMask == wxTOUCH_NONE )
{
@@ -3658,7 +3660,7 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
return true;
}
- if ( IsUserPane() && [event type] == NSKeyDown)
+ if ( HasUserKeyHandling() && [event type] == NSKeyDown)
{
// Don't fire wxEVT_KEY_DOWN here in order to allow IME to intercept
// some key events. If the event is not handled by IME, either
@@ -3817,7 +3819,7 @@ wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WX
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSView* v = [[wxNSView alloc] initWithFrame:r];
- wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v, false, true );
+ wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v, Widget_IsUserPane );
return c;
}
@@ -3829,7 +3831,7 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
if ( now->IsNativeWindowWrapper() )
{
NSView* cv = [tlw contentView];
- c = new wxWidgetCocoaImpl( now, cv, true );
+ c = new wxWidgetCocoaImpl( now, cv, Widget_IsRoot );
if ( cv != nil )
{
// increase ref count, because the impl destructor will decrement it again
@@ -3841,7 +3843,7 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
else
{
wxNSView* v = [[wxNSView alloc] initWithFrame:[[tlw contentView] frame]];
- c = new wxWidgetCocoaImpl( now, v, true );
+ c = new wxWidgetCocoaImpl( now, v, Widget_IsRoot );
c->InstallEventHandler();
[tlw setContentView:v];
}
diff --git a/src/osx/core/sound.cpp b/src/osx/core/sound.cpp
index 1c5ec6e2dc..e81a4d7826 100644
--- a/src/osx/core/sound.cpp
+++ b/src/osx/core/sound.cpp
@@ -58,6 +58,7 @@ wxOSXAudioToolboxSoundData::wxOSXAudioToolboxSoundData(SystemSoundID soundID) :
wxOSXAudioToolboxSoundData::~wxOSXAudioToolboxSoundData()
{
DoStop();
+ AudioServicesDisposeSystemSoundID (m_soundID);
}
void
@@ -95,8 +96,6 @@ void wxOSXAudioToolboxSoundData::DoStop()
{
m_playing = false;
AudioServicesRemoveSystemSoundCompletion(m_soundID);
- AudioServicesDisposeSystemSoundID (m_soundID);
-
wxSound::SoundStopped(this);
}
}
diff --git a/src/osx/fswatcher_fsevents.cpp b/src/osx/fswatcher_fsevents.cpp
index b90f96febf..8d60e17994 100644
--- a/src/osx/fswatcher_fsevents.cpp
+++ b/src/osx/fswatcher_fsevents.cpp
@@ -419,8 +419,8 @@ bool wxFsEventsFileSystemWatcher::RemoveAll()
FSEventStreamStop(it->second);
FSEventStreamInvalidate(it->second);
FSEventStreamRelease(it->second);
- it++;
- ret |= true;
+ ++it;
+ ret = true;
}
m_streams.clear();
return ret;
@@ -499,7 +499,7 @@ int wxFsEventsFileSystemWatcher::GetWatchedPaths(wxArrayString* paths) const
}
wxFileSystemWatcherBase::GetWatchedPaths(paths);
FSEventStreamRefMap::const_iterator it = m_streams.begin();
- for ( ; it != m_streams.end(); it++ )
+ for ( ; it != m_streams.end(); ++it )
{
paths->push_back(it->first);
}
diff --git a/src/osx/iphone/nonownedwnd.mm b/src/osx/iphone/nonownedwnd.mm
index 2da94aba87..2b15df7144 100644
--- a/src/osx/iphone/nonownedwnd.mm
+++ b/src/osx/iphone/nonownedwnd.mm
@@ -354,7 +354,7 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
[contentview setController:controller];
[contentview setHidden:YES];
- wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, true );
+ wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, Widget_IsRoot );
impl->InstallEventHandler();
if ([toplevelwindow respondsToSelector:@selector(setRootViewController:)])
diff --git a/src/osx/iphone/utils.mm b/src/osx/iphone/utils.mm
index af0239e939..3863f68d97 100644
--- a/src/osx/iphone/utils.mm
+++ b/src/osx/iphone/utils.mm
@@ -257,7 +257,7 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const
CGContextTranslateCTM( context, -subrect->x, -subrect->y ) ;
UIGraphicsPushContext(context);
- [ (NSView*) m_window->GetHandle() drawRect:CGRectMake(left, top, width, height ) ];
+ [ (UIView*) m_window->GetHandle() drawRect:CGRectMake(left, top, width, height ) ];
UIGraphicsPopContext();
CGContextRestoreGState(context);
diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm
index d29beb7035..607c92f839 100644
--- a/src/osx/iphone/window.mm
+++ b/src/osx/iphone/window.mm
@@ -334,8 +334,8 @@ void wxOSXIPhoneClassAddWXMethods(Class c)
wxIMPLEMENT_DYNAMIC_CLASS(wxWidgetIPhoneImpl , wxWidgetImpl);
-wxWidgetIPhoneImpl::wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl, bool isUserPane ) :
- wxWidgetImpl( peer, isRootControl, isUserPane ), m_osxView(w)
+wxWidgetIPhoneImpl::wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, int flags ) :
+ wxWidgetImpl( peer, flags ), m_osxView(w)
{
}
@@ -821,7 +821,7 @@ wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WX
sv.clipsToBounds = YES;
sv.contentMode = UIViewContentModeRedraw;
sv.clearsContextBeforeDrawing = NO;
- wxWidgetIPhoneImpl* c = new wxWidgetIPhoneImpl( wxpeer, v, false, true );
+ wxWidgetIPhoneImpl* c = new wxWidgetIPhoneImpl( wxpeer, v, Widget_IsUserPane );
return c;
}
diff --git a/src/osx/pen.cpp b/src/osx/pen.cpp
index 40c9fba41b..3a485a6f9d 100644
--- a/src/osx/pen.cpp
+++ b/src/osx/pen.cpp
@@ -70,6 +70,7 @@ wxPenRefData::wxPenRefData()
wxPenRefData::wxPenRefData(const wxPenRefData& data)
: wxGDIRefData()
+ , m_colour(data.m_colour)
{
m_style = data.m_style;
m_width = data.m_width;
@@ -77,7 +78,6 @@ wxPenRefData::wxPenRefData(const wxPenRefData& data)
m_cap = data.m_cap;
m_nbDash = data.m_nbDash;
m_dash = data.m_dash;
- m_colour = data.m_colour;
}
wxPenRefData::wxPenRefData(const wxPenInfo& info)
diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp
index be965a4890..fa6349c560 100644
--- a/src/osx/window_osx.cpp
+++ b/src/osx/window_osx.cpp
@@ -621,11 +621,6 @@ void wxWindowMac::SetDropTarget(wxDropTarget *pDropTarget)
GetPeer()->SetDropTarget(m_dropTarget) ;
}
-// Old-style File Manager Drag & Drop
-void wxWindowMac::DragAcceptFiles(bool WXUNUSED(accept))
-{
- // TODO:
-}
#endif
// From a wx position / size calculate the appropriate size of the native control
@@ -2223,7 +2218,7 @@ void wxWindowMac::MacRepositionScrollBars()
bool wxWindowMac::AcceptsFocus() const
{
- if ( GetPeer() == NULL || GetPeer()->IsUserPane() )
+ if ( GetPeer() == NULL || GetPeer()->HasUserKeyHandling() )
return wxWindowBase::AcceptsFocus();
else
return GetPeer()->CanFocus();
@@ -2631,7 +2626,7 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
// moved the ordinary key event sending AFTER the accel evaluation
#if wxUSE_ACCEL
- if ( !handled && event.GetEventType() == wxEVT_KEY_DOWN)
+ if (event.GetEventType() == wxEVT_KEY_DOWN)
{
wxWindow *ancestor = this;
while (ancestor)
@@ -2741,11 +2736,23 @@ void wxWidgetImpl::RemoveAssociation(WXWidget control)
wxIMPLEMENT_ABSTRACT_CLASS(wxWidgetImpl, wxObject);
-wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , bool isRootControl, bool isUserPane )
+wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , int flags )
+{
+ Init();
+ m_isRootControl = flags & Widget_IsRoot;
+ m_isUserPane = flags & Widget_IsUserPane;
+ m_wantsUserKey = m_isUserPane || (flags & Widget_UserKeyEvents);
+ m_wantsUserMouse = m_isUserPane || (flags & Widget_UserMouseEvents);
+ m_wxPeer = peer;
+ m_shouldSendEvents = true;
+}
+
+wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , bool isRootControl, bool isUserPane, bool wantsUserKey )
{
Init();
m_isRootControl = isRootControl;
m_isUserPane = isUserPane;
+ m_wantsUserKey = wantsUserKey;
m_wxPeer = peer;
m_shouldSendEvents = true;
}
@@ -2763,6 +2770,8 @@ wxWidgetImpl::~wxWidgetImpl()
void wxWidgetImpl::Init()
{
m_isRootControl = false;
+ m_wantsUserKey = false;
+ m_wantsUserMouse = false;
m_wxPeer = NULL;
m_needsFocusRect = false;
m_needsFrame = true;
diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp
index fce63e54bd..f4a954495a 100644
--- a/src/propgrid/editors.cpp
+++ b/src/propgrid/editors.cpp
@@ -797,7 +797,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
cis = GetImageSize(p, item);
}
- if ( rect.x < 0 )
+ if ( rect.x + rect.width < 0 )
{
// Default measure behaviour (no flexible, custom paint image only)
if ( rect.width < 0 )
@@ -824,143 +824,131 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
wxDC& dc = *pDc;
dc.SetBrush(*wxWHITE_BRUSH);
- if ( rect.x >= 0 )
+ //
+ // DrawItem call
+ wxPGCellRenderer* renderer = NULL;
+ const wxPGChoiceEntry* cell = NULL;
+
+ wxPoint pt(rect.x + wxPG_CONTROL_MARGIN - wxPG_CHOICEXADJUST - 1,
+ rect.y + 1);
+
+ int renderFlags = wxPGCellRenderer::DontUseCellColours;
+ bool useCustomPaintProcedure;
+
+ // If custom image had some size, we will start from the assumption
+ // that custom paint procedure is required
+ if ( cis.x > 0 )
+ useCustomPaintProcedure = true;
+ else
+ useCustomPaintProcedure = false;
+
+ if ( flags & wxODCB_PAINTING_SELECTED )
+ renderFlags |= wxPGCellRenderer::Selected;
+
+ if ( flags & wxODCB_PAINTING_CONTROL )
{
- //
- // DrawItem call
- wxPGCellRenderer* renderer = NULL;
- const wxPGChoiceEntry* cell = NULL;
+ renderFlags |= wxPGCellRenderer::Control;
- wxPoint pt(rect.x + wxPG_CONTROL_MARGIN - wxPG_CHOICEXADJUST - 1,
- rect.y + 1);
-
- int renderFlags = wxPGCellRenderer::DontUseCellColours;
- bool useCustomPaintProcedure;
-
- // If custom image had some size, we will start from the assumption
- // that custom paint procedure is required
- if ( cis.x > 0 )
- useCustomPaintProcedure = true;
- else
+ // If wxPG_PROP_CUSTOMIMAGE was set, then that means any custom
+ // image will not appear on the control row (it may be too
+ // large to fit, for instance). Also do not draw custom image
+ // if no choice was selected.
+ if ( !p->HasFlag(wxPG_PROP_CUSTOMIMAGE) || item < 0 )
useCustomPaintProcedure = false;
-
- if ( flags & wxODCB_PAINTING_SELECTED )
- renderFlags |= wxPGCellRenderer::Selected;
-
- if ( flags & wxODCB_PAINTING_CONTROL )
- {
- renderFlags |= wxPGCellRenderer::Control;
-
- // If wxPG_PROP_CUSTOMIMAGE was set, then that means any custom
- // image will not appear on the control row (it may be too
- // large to fit, for instance). Also do not draw custom image
- // if no choice was selected.
- if ( !p->HasFlag(wxPG_PROP_CUSTOMIMAGE) || item < 0 )
- useCustomPaintProcedure = false;
- }
- else
- {
- renderFlags |= wxPGCellRenderer::ChoicePopup;
-
- // For consistency, always use normal font when drawing drop down
- // items
- dc.SetFont(GetFont());
- }
-
- // If not drawing a selected popup item, then give property's
- // value image a chance.
- if ( p->GetValueImage() && item != pCb->GetSelection() )
- useCustomPaintProcedure = false;
- // If current choice had a bitmap set by the application, then
- // use it instead of any custom paint procedure
- // (only if not drawn in the control field).
- else if ( itemBitmap && !(flags & wxODCB_PAINTING_CONTROL) )
- useCustomPaintProcedure = false;
-
- if ( useCustomPaintProcedure )
- {
- pt.x += wxCC_CUSTOM_IMAGE_MARGIN1;
- wxRect r(pt, cis);
-
- if ( flags & wxODCB_PAINTING_CONTROL )
- {
- //r.width = cis.x;
- r.height = wxPG_STD_CUST_IMAGE_HEIGHT(m_lineHeight);
- }
-
- paintdata.m_drawnWidth = r.width;
-
- dc.SetPen(m_colPropFore);
- if ( comValIndex >= 0 )
- {
- const wxPGCommonValue* cv = GetCommonValue(comValIndex);
- renderer = cv->GetRenderer();
- r.width = rect.width;
- renderer->Render( dc, r, this, p, m_selColumn, comValIndex, renderFlags );
- return;
- }
- else if ( item >= 0 )
- {
- p->OnCustomPaint( dc, r, paintdata );
- }
- else
- {
- dc.DrawRectangle( r );
- }
-
- pt.x += paintdata.m_drawnWidth + wxCC_CUSTOM_IMAGE_MARGIN2 - 1;
- }
- else
- {
- // TODO: This aligns text so that it seems to be horizontally
- // on the same line as property values. Not really
- // sure if it is needed, but seems to not cause any harm.
- pt.x -= 1;
-
- if ( item < 0 && (flags & wxODCB_PAINTING_CONTROL) )
- item = pCb->GetSelection();
-
- if ( choices.IsOk() && item >= 0 && comValIndex < 0 )
- {
- // This aligns bitmap horizontally so that it is
- // on the same position as bitmap drawn for static content
- // (without editor).
- wxRect r(rect);
- r.x -= 1;
-
- cell = &choices.Item(item);
- renderer = wxPGGlobalVars->m_defaultRenderer;
- int imageOffset = renderer->PreDrawCell(dc, r, *cell,
- renderFlags );
- if ( imageOffset )
- imageOffset += wxCC_CUSTOM_IMAGE_MARGIN1 +
- wxCC_CUSTOM_IMAGE_MARGIN2;
- pt.x += imageOffset;
- }
- }
-
- //
- // Draw text
- //
-
- pt.y += (rect.height-m_fontHeight)/2 - 1;
-
- pt.x += 1;
-
- dc.DrawText( text, pt.x + wxPG_XBEFORETEXT, pt.y );
-
- if ( renderer )
- renderer->PostDrawCell(dc, this, *cell, renderFlags);
}
else
{
- //
- // MeasureItem call
+ renderFlags |= wxPGCellRenderer::ChoicePopup;
- p->OnCustomPaint( dc, rect, paintdata );
- rect.height = paintdata.m_drawnHeight + 2;
- rect.width = cis.x + wxCC_CUSTOM_IMAGE_MARGIN1 + wxCC_CUSTOM_IMAGE_MARGIN2 + 9;
+ // For consistency, always use normal font when drawing drop down
+ // items
+ dc.SetFont(GetFont());
}
+
+ // If not drawing a selected popup item, then give property's
+ // value image a chance.
+ if ( p->GetValueImage() && item != pCb->GetSelection() )
+ useCustomPaintProcedure = false;
+ // If current choice had a bitmap set by the application, then
+ // use it instead of any custom paint procedure
+ // (only if not drawn in the control field).
+ else if ( itemBitmap && !(flags & wxODCB_PAINTING_CONTROL) )
+ useCustomPaintProcedure = false;
+
+ if ( useCustomPaintProcedure )
+ {
+ pt.x += wxCC_CUSTOM_IMAGE_MARGIN1;
+ wxRect r(pt, cis);
+
+ if ( flags & wxODCB_PAINTING_CONTROL )
+ {
+ //r.width = cis.x;
+ r.height = wxPG_STD_CUST_IMAGE_HEIGHT(m_lineHeight);
+ }
+
+ paintdata.m_drawnWidth = r.width;
+
+ dc.SetPen(m_colPropFore);
+ if ( comValIndex >= 0 )
+ {
+ const wxPGCommonValue* cv = GetCommonValue(comValIndex);
+ renderer = cv->GetRenderer();
+ r.width = rect.width;
+ renderer->Render( dc, r, this, p, m_selColumn, comValIndex, renderFlags );
+ return;
+ }
+ else if ( item >= 0 )
+ {
+ p->OnCustomPaint( dc, r, paintdata );
+ }
+ else
+ {
+ dc.DrawRectangle( r );
+ }
+
+ pt.x += paintdata.m_drawnWidth + wxCC_CUSTOM_IMAGE_MARGIN2 - 1;
+ }
+ else
+ {
+ // TODO: This aligns text so that it seems to be horizontally
+ // on the same line as property values. Not really
+ // sure if it is needed, but seems to not cause any harm.
+ pt.x -= 1;
+
+ if ( item < 0 && (flags & wxODCB_PAINTING_CONTROL) )
+ item = pCb->GetSelection();
+
+ if ( choices.IsOk() && item >= 0 && comValIndex < 0 )
+ {
+ // This aligns bitmap horizontally so that it is
+ // on the same position as bitmap drawn for static content
+ // (without editor).
+ wxRect r(rect);
+ r.x -= 1;
+
+ cell = &choices.Item(item);
+ renderer = wxPGGlobalVars->m_defaultRenderer;
+ int imageOffset = renderer->PreDrawCell(dc, r, *cell,
+ renderFlags );
+ if ( imageOffset )
+ imageOffset += wxCC_CUSTOM_IMAGE_MARGIN1 +
+ wxCC_CUSTOM_IMAGE_MARGIN2;
+ pt.x += imageOffset;
+ }
+ }
+
+ //
+ // Draw text
+ //
+
+ pt.y += (rect.height-m_fontHeight)/2 - 1;
+
+ pt.x += 1;
+
+ dc.DrawText( text, pt.x + wxPG_XBEFORETEXT, pt.y );
+
+ if ( renderer )
+ renderer->PostDrawCell(dc, this, *cell, renderFlags);
}
static
@@ -1436,13 +1424,9 @@ enum
const int wxSCB_SETVALUE_CYCLE = 2;
-static void DrawSimpleCheckBox( wxWindow* win, wxDC& dc, const wxRect& rect,
- int box_h, int state )
+static void DrawSimpleCheckBox(wxWindow* win, wxDC& dc, const wxRect& rect, int state)
{
#if wxPG_USE_RENDERER_NATIVE
- // Box rectangle
- wxRect r(rect.x+wxPG_XBEFORETEXT, rect.y+((rect.height-box_h)/2),
- box_h, box_h);
int cbFlags = 0;
if ( state & wxSCB_STATE_UNSPECIFIED )
@@ -1466,13 +1450,10 @@ static void DrawSimpleCheckBox( wxWindow* win, wxDC& dc, const wxRect& rect,
#endif
}
- wxRendererNative::Get().DrawCheckBox(win, dc, r, cbFlags);
+ wxRendererNative::Get().DrawCheckBox(win, dc, rect, cbFlags);
#else
wxUnusedVar(win);
- // Box rectangle
- wxRect r(rect.x+wxPG_XBEFORETEXT, rect.y+((rect.height-box_h)/2),
- box_h, box_h);
wxColour useCol = dc.GetTextForeground();
if ( state & wxSCB_STATE_UNSPECIFIED )
@@ -1480,6 +1461,7 @@ static void DrawSimpleCheckBox( wxWindow* win, wxDC& dc, const wxRect& rect,
useCol = wxColour(220, 220, 220);
}
+ wxRect r(rect);
// Draw check mark first because it is likely to overdraw the
// surrounding rectangle.
if ( state & wxSCB_STATE_CHECKED )
@@ -1541,15 +1523,29 @@ public:
SetFont( parent->GetFont() );
m_state = 0;
- m_boxHeight = 12;
-
+ SetBoxHeight(12);
SetBackgroundStyle( wxBG_STYLE_PAINT );
}
virtual ~wxSimpleCheckBox();
+
+ void SetBoxHeight(int height)
+ {
+ m_boxHeight = height;
+ // Box rectangle
+ wxRect rect(GetClientSize());
+ rect.y += 1;
+ rect.width += 1;
+ m_boxRect = GetBoxRect(rect, m_boxHeight);
+ }
+
+ static wxRect GetBoxRect(const wxRect& r, int box_h)
+ {
+ return wxRect(r.x + wxPG_XBEFORETEXT, r.y + ((r.height - box_h) / 2), box_h, box_h);
+ }
+
int m_state;
- int m_boxHeight;
private:
void OnPaint( wxPaintEvent& event );
@@ -1558,11 +1554,15 @@ private:
void OnResize( wxSizeEvent& event )
{
+ SetBoxHeight(m_boxHeight); // Recalculate box rectangle
Refresh();
event.Skip();
}
void OnLeftClickActivate( wxCommandEvent& evt );
+ int m_boxHeight;
+ wxRect m_boxRect;
+
wxDECLARE_EVENT_TABLE();
};
@@ -1583,17 +1583,13 @@ wxSimpleCheckBox::~wxSimpleCheckBox()
void wxSimpleCheckBox::OnPaint( wxPaintEvent& WXUNUSED(event) )
{
- wxRect rect(GetClientSize());
wxAutoBufferedPaintDC dc(this);
- dc.Clear();
-
- rect.y += 1;
- rect.width += 1;
wxColour bgcol = GetBackgroundColour();
+ dc.SetBackground(wxBrush(bgcol));
+ dc.Clear();
dc.SetBrush( bgcol );
dc.SetPen( bgcol );
- dc.DrawRectangle( rect );
dc.SetTextForeground(GetForegroundColour());
@@ -1602,13 +1598,12 @@ void wxSimpleCheckBox::OnPaint( wxPaintEvent& WXUNUSED(event) )
GetFont().GetWeight() == wxFONTWEIGHT_BOLD )
state |= wxSCB_STATE_BOLD;
- DrawSimpleCheckBox(this, dc, rect, m_boxHeight, state);
+ DrawSimpleCheckBox(this, dc, m_boxRect, state);
}
void wxSimpleCheckBox::OnLeftClick( wxMouseEvent& event )
{
- if ( (event.m_x > (wxPG_XBEFORETEXT-2)) &&
- (event.m_x <= (wxPG_XBEFORETEXT-2+m_boxHeight)) )
+ if ( m_boxRect.Contains(event.GetPosition()) )
{
SetValue(wxSCB_SETVALUE_CYCLE);
}
@@ -1643,11 +1638,11 @@ void wxSimpleCheckBox::SetValue( int value )
void wxSimpleCheckBox::OnLeftClickActivate( wxCommandEvent& evt )
{
- // Construct mouse pseudo-event for initial mouse click
- wxMouseEvent mouseEvt(wxEVT_LEFT_DOWN);
- mouseEvt.m_x = evt.GetInt();
- mouseEvt.m_y = evt.GetExtraLong();
- OnLeftClick(mouseEvt);
+ wxPoint pt(evt.GetInt(), evt.GetExtraLong());
+ if ( m_boxRect.Contains(pt) )
+ {
+ SetValue(wxSCB_SETVALUE_CYCLE);
+ }
}
wxPGWindowList wxPGCheckBoxEditor::CreateControls( wxPropertyGrid* propGrid,
@@ -1706,7 +1701,9 @@ void wxPGCheckBoxEditor::DrawValue( wxDC& dc, const wxRect& rect,
state |= wxSCB_STATE_UNSPECIFIED;
}
- DrawSimpleCheckBox(property->GetGrid(), dc, rect, dc.GetCharHeight(), state);
+ // Box rectangle
+ wxRect r = wxSimpleCheckBox::GetBoxRect(rect, dc.GetCharHeight());
+ DrawSimpleCheckBox(property->GetGrid(), dc, r, state);
}
void wxPGCheckBoxEditor::UpdateControl( wxPGProperty* property,
@@ -1721,7 +1718,7 @@ void wxPGCheckBoxEditor::UpdateControl( wxPGProperty* property,
cb->m_state = wxSCB_STATE_UNSPECIFIED;
wxPropertyGrid* propGrid = property->GetGrid();
- cb->m_boxHeight = propGrid->GetFontHeight();
+ cb->SetBoxHeight(propGrid->GetFontHeight());
cb->Refresh();
}
@@ -1791,7 +1788,8 @@ void wxPropertyGrid::CorrectEditorWidgetSizeX()
int secWid = 0;
// Use fixed selColumn 1 for main editor widgets
- int newSplitterx = m_pState->DoGetSplitterPosition(0);
+ int newSplitterx;
+ CalcScrolledPosition(m_pState->DoGetSplitterPosition(0), 0, &newSplitterx, NULL);
int newWidth = newSplitterx + m_pState->GetColumnWidth(1);
if ( m_wndEditor2 )
diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp
index 9437e48c89..fa5b37792a 100644
--- a/src/propgrid/manager.cpp
+++ b/src/propgrid/manager.cpp
@@ -229,8 +229,9 @@ void wxPropertyGridPage::DoSetSplitterPosition( int pos,
class wxPGHeaderCtrl : public wxHeaderCtrl
{
public:
- wxPGHeaderCtrl(wxPropertyGridManager* manager) :
- wxHeaderCtrl()
+ wxPGHeaderCtrl(wxPropertyGridManager* manager, wxWindowID id, const wxPoint& pos,
+ const wxSize& size, long style) :
+ wxHeaderCtrl(manager, id, pos, size, style)
{
m_manager = manager;
EnsureColumnCount(2);
@@ -242,8 +243,11 @@ public:
virtual ~wxPGHeaderCtrl()
{
- for (size_t i = 0; i < m_columns.size(); i++ )
- delete m_columns[i];
+ for (wxVector::const_iterator it = m_columns.begin();
+ it != m_columns.end(); ++it)
+ {
+ delete *it;
+ }
}
void OnPageChanged(const wxPropertyGridPage* page)
@@ -321,7 +325,7 @@ private:
else if ( i == colCount-1 )
{
// Compensate for the internal border and scrollbar
- int margin = pg->GetMarginWidth() + borderWidth + sbWidth;
+ int margin = borderWidth;
colWidth += margin;
colMinWidth += margin;
@@ -378,8 +382,12 @@ private:
}
else if ( evtType == wxEVT_HEADER_BEGIN_RESIZE )
{
+ // Don't allow resizing the rightmost column
+ // (like it's not allowed for the rightmost wxPropertyGrid splitter)
+ if ( col == (int)m_page->GetColumnCount() - 1 )
+ hcEvent->Veto();
// Never allow column resize if layout is static
- if ( m_manager->HasFlag(wxPG_STATIC_SPLITTER) )
+ else if ( m_manager->HasFlag(wxPG_STATIC_SPLITTER) )
hcEvent->Veto();
// Allow application to veto dragging
else if ( pg->SendEvent(wxEVT_PG_COL_BEGIN_DRAG,
@@ -513,7 +521,7 @@ void wxPropertyGridManager::Init1()
m_extraHeight = 0;
m_dragStatus = 0;
- m_onSplitter = 0;
+ m_onSplitter = false;
m_iFlags = 0;
}
@@ -1630,12 +1638,9 @@ void wxPropertyGridManager::RecreateControls()
#if wxUSE_HEADERCTRL
if ( m_showHeader )
{
-
if ( !m_pHeaderCtrl )
{
- wxPGHeaderCtrl* hc = new wxPGHeaderCtrl(this);
- hc->Create(this, wxID_ANY);
- m_pHeaderCtrl = hc;
+ m_pHeaderCtrl = new wxPGHeaderCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
}
else
{
@@ -1790,7 +1795,7 @@ void wxPropertyGridManager::OnToolbarClick( wxCommandEvent &event )
if ( DoSelectPage(index) )
{
// Event dispatching must be last.
- m_pPropGrid->SendEvent( wxEVT_PG_PAGE_CHANGED, NULL );
+ m_pPropGrid->SendEvent( wxEVT_PG_PAGE_CHANGED, (wxPGProperty*)NULL );
}
else
{
@@ -1936,6 +1941,7 @@ void wxPropertyGridManager::ReconnectEventHandlers(wxWindowID oldId, wxWindowID
oldId);
Unbind(wxEVT_PG_COL_DRAGGING, &wxPropertyGridManager::OnPGColDrag, this,
oldId);
+ Unbind(wxEVT_PG_HSCROLL, &wxPropertyGridManager::OnPGScrollH, this, oldId);
}
if (newId != wxID_NONE)
@@ -1944,6 +1950,7 @@ void wxPropertyGridManager::ReconnectEventHandlers(wxWindowID oldId, wxWindowID
newId);
Bind(wxEVT_PG_COL_DRAGGING, &wxPropertyGridManager::OnPGColDrag, this,
newId);
+ Bind(wxEVT_PG_HSCROLL, &wxPropertyGridManager::OnPGScrollH, this, newId);
}
}
@@ -1970,6 +1977,16 @@ wxPropertyGridManager::OnPGColDrag( wxPropertyGridEvent& WXUNUSED(event) )
#endif
}
+void wxPropertyGridManager::OnPGScrollH(wxPropertyGridEvent& evt)
+{
+#if wxUSE_HEADERCTRL
+ if ( m_pHeaderCtrl )
+ {
+ m_pHeaderCtrl->ScrollWindow(evt.GetInt(), 0);
+ }
+#endif // wxUSE_HEADERCTRL
+}
+
// -----------------------------------------------------------------------
void wxPropertyGridManager::OnResize( wxSizeEvent& WXUNUSED(event) )
@@ -2014,7 +2031,7 @@ void wxPropertyGridManager::OnMouseEntry( wxMouseEvent& WXUNUSED(event) )
// Correct cursor. This is required at least for wxGTK, for which
// setting button's cursor to *wxSTANDARD_CURSOR does not work.
SetCursor( wxNullCursor );
- m_onSplitter = 0;
+ m_onSplitter = false;
}
// -----------------------------------------------------------------------
@@ -2060,7 +2077,7 @@ void wxPropertyGridManager::OnMouseMove( wxMouseEvent &event )
if ( y >= m_splitterY && y < (m_splitterY+m_splitterHeight+2) )
{
SetCursor ( m_cursorSizeNS );
- m_onSplitter = 1;
+ m_onSplitter = true;
}
else
{
@@ -2068,7 +2085,7 @@ void wxPropertyGridManager::OnMouseMove( wxMouseEvent &event )
{
SetCursor ( wxNullCursor );
}
- m_onSplitter = 0;
+ m_onSplitter = false;
}
}
}
diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp
index 9716d3676d..700eef79ac 100644
--- a/src/propgrid/property.cpp
+++ b/src/propgrid/property.cpp
@@ -1380,8 +1380,6 @@ void wxPGProperty::OnCustomPaint( wxDC& dc,
wxCHECK_RET( bmp && bmp->IsOk(), wxS("invalid bitmap") );
- wxCHECK_RET( rect.x >= 0, wxS("unexpected measure call") );
-
dc.DrawBitmap(*bmp,rect.x,rect.y);
}
diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp
index 87b3eef99f..01b8759733 100644
--- a/src/propgrid/propgrid.cpp
+++ b/src/propgrid/propgrid.cpp
@@ -516,7 +516,7 @@ wxPropertyGrid::~wxPropertyGrid()
size_t i;
#if wxUSE_THREADS
- wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
+ wxCriticalSectionLocker lock(wxPGGlobalVars->m_critSect);
#endif
//
@@ -841,7 +841,7 @@ bool wxPropertyGrid::AddToSelectionFromInputEvent( wxPGProperty* prop,
{
// Allow right-click for context menu without
// disturbing the selection.
- if ( GetSelectedProperties().size() <= 1 ||
+ if ( selection.size() <= 1 ||
!alreadySelected )
return DoSelectAndEdit(prop, colIndex, selFlags);
return true;
@@ -854,7 +854,7 @@ bool wxPropertyGrid::AddToSelectionFromInputEvent( wxPGProperty* prop,
}
else if ( mouseEvent->ShiftDown() )
{
- if ( selection.size() > 0 && !prop->IsCategory() )
+ if ( !selection.empty() && !prop->IsCategory() )
addToExistingSelection = 2;
else
addToExistingSelection = 1;
@@ -870,7 +870,7 @@ bool wxPropertyGrid::AddToSelectionFromInputEvent( wxPGProperty* prop,
{
res = DoAddToSelection(prop, selFlags);
}
- else if ( GetSelectedProperties().size() > 1 )
+ else if ( selection.size() > 1 )
{
res = DoRemoveFromSelection(prop, selFlags);
}
@@ -1275,6 +1275,38 @@ bool wxPropertyGrid::Reparent( wxWindowBase *newParent )
return res;
}
+// -----------------------------------------------------------------------
+
+void wxPropertyGrid::ScrollWindow(int dx, int dy, const wxRect* rect)
+{
+ wxControl::ScrollWindow(dx, dy, rect);
+ if ( dx != 0 )
+ {
+ // Notify wxPropertyGridManager about the grid being scrolled horizontally
+ // to scroll the column header, if present.
+ SendEvent(wxEVT_PG_HSCROLL, dx);
+ }
+}
+// -----------------------------------------------------------------------
+
+void wxPropertyGrid::SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
+ int noUnitsX, int noUnitsY,
+ int xPos, int yPos, bool noRefresh)
+{
+ int oldX;
+ CalcUnscrolledPosition(0, 0, &oldX, NULL);
+ wxScrollHelper::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY,
+ noUnitsX, noUnitsY, xPos, yPos, noRefresh);
+ int newX;
+ CalcUnscrolledPosition(0, 0, &newX, NULL);
+ if ( newX != oldX )
+ {
+ // Notify wxPropertyGridManager about the grid being scrolled horizontally
+ // to scroll the column header, if present.
+ SendEvent(wxEVT_PG_HSCROLL, oldX - newX);
+ }
+}
+
// -----------------------------------------------------------------------
// wxPropertyGrid Font and Colour Methods
// -----------------------------------------------------------------------
@@ -1861,19 +1893,14 @@ void wxPropertyGrid::OnPaint( wxPaintEvent& WXUNUSED(event) )
}
// Find out where the window is scrolled to
- int vy; // Top of the client
- GetViewStart(NULL, &vy);
+ int vx, vy;
+ GetViewStart(&vx, &vy);
+ vx *= wxPG_PIXELS_PER_UNIT;
vy *= wxPG_PIXELS_PER_UNIT;
// Update everything inside the box
wxRect r = GetUpdateRegion().GetBox();
-
- r.y += vy;
-
- // FIXME: This is just a workaround for a bug that causes splitters not
- // to paint when other windows are being dragged over the grid.
- r.x = 0;
- r.width = GetClientSize().x;
+ r.Offset(vx, vy);
// Repaint this rectangle
DrawItems(*dcPtr, r.y, r.y + r.height-1, &r);
@@ -2028,7 +2055,7 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
#if WXWIN_COMPATIBILITY_3_0
int wxPropertyGrid::DoDrawItemsBase( wxDC& dc,
const wxRect* itemsRect,
- bool isBuffered ) const
+ bool WXUNUSED(isBuffered) ) const
#else
int wxPropertyGrid::DoDrawItems( wxDC& dc,
const wxRect* itemsRect ) const
@@ -2043,8 +2070,9 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
if ( !lastItem )
lastItem = GetLastItem( wxPG_ITERATE_VISIBLE );
- int vy;
- GetViewStart(NULL, &vy);
+ int vx, vy;
+ GetViewStart(&vx, &vy);
+ vx *= wxPG_PIXELS_PER_UNIT;
vy *= wxPG_PIXELS_PER_UNIT;
if ( IsFrozen() || m_height < 1 || firstItem == NULL )
@@ -2090,22 +2118,10 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
long windowStyle = m_windowStyle;
-#if WXWIN_COMPATIBILITY_3_0
- int xRelMod = 0;
-
- if ( isBuffered )
- {
- xRelMod = itemsRect->x;
- // itemsRect conversion
- firstItemTopY -= vy;
- lastItemBottomY -= vy;
- }
-#else
- int xRelMod = itemsRect->x;
+ int xRelMod = vx;
// itemsRect conversion
firstItemTopY -= vy;
lastItemBottomY -= vy;
-#endif
int x = m_marginWidth - xRelMod;
@@ -2124,11 +2140,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
wxBrush capbgbrush(m_colCapBack,wxBRUSHSTYLE_SOLID);
wxPen linepen(m_colLine,1,wxPENSTYLE_SOLID);
- wxColour selBackCol;
- if ( isPgEnabled )
- selBackCol = m_colSelBack;
- else
- selBackCol = m_colMargin;
+ wxColour selBackCol = isPgEnabled ? m_colSelBack : m_colMargin;
// pen that has same colour as text
wxPen outlinepen(m_colPropFore,1,wxPENSTYLE_SOLID);
@@ -2148,8 +2160,6 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
const wxVector& colWidths = state->m_colWidths;
const unsigned int colCount = state->GetColumnCount();
- // TODO: Only render columns that are within clipping region.
-
dc.SetFont(normalFont);
wxPropertyGridConstIterator it( state, wxPG_ITERATE_VISIBLE, firstItem );
@@ -2180,7 +2190,27 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
wxPGProperty* nextP = visPropArray[0];
- int gridWidth = state->GetVirtualWidth();
+ // Calculate splitters positions
+ wxVector splitterPos;
+ splitterPos.reserve(colCount);
+ int sx = x;
+ for (wxVector::const_iterator cit = colWidths.begin(); cit != colWidths.end(); ++cit)
+ {
+ sx += *cit;
+ splitterPos.push_back(sx);
+ }
+
+ int viewLeftEdge = itemsRect->x - vx;
+ int viewRightEdge = viewLeftEdge + itemsRect->width - 1;
+ // Determine columns range to be drawn
+ unsigned int firstCol = 0;
+ while ( firstCol < colCount-1 && splitterPos[firstCol] < viewLeftEdge )
+ firstCol++;
+ unsigned int lastCol = firstCol;
+ while ( lastCol < colCount-1 && splitterPos[lastCol] < viewRightEdge )
+ lastCol++;
+ // Calculate position of the right edge of the last cell
+ int cellX = splitterPos[lastCol]+ 1;
y = firstItemTopY;
for ( unsigned int arrInd=1;
@@ -2190,7 +2220,6 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
wxPGProperty* p = nextP;
nextP = visPropArray[arrInd];
- int rowHeight = m_fontHeight+(m_spacingy*2)+1;
int textMarginHere = x;
int renderFlags = 0;
@@ -2239,12 +2268,9 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
}
// Splitters
- int sx = x;
-
- for ( unsigned int si = 0; si < colCount; si++ )
+ for (unsigned int i = firstCol; i <= lastCol; i++)
{
- sx += colWidths[si];
- dc.DrawLine( sx, y, sx, y2 );
+ dc.DrawLine(splitterPos[i], y, splitterPos[i], y2);
}
// Horizontal Line, below
@@ -2253,7 +2279,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
nextP && nextP->IsCategory() )
dc.SetPen(m_colCapBack);
- dc.DrawLine( greyDepthX, y2-1, gridWidth-xRelMod, y2-1 );
+ dc.DrawLine(greyDepthX, y2 - 1, cellX, y2 - 1);
//
// Need to override row colours?
@@ -2289,10 +2315,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
else if ( isPgEnabled )
{
rowFgCol = m_colPropFore;
- if ( p == firstSelected )
- rowBgCol = m_colMargin;
- else
- rowBgCol = selBackCol;
+ rowBgCol = p == firstSelected ? m_colMargin : selBackCol;
}
else
{
@@ -2335,8 +2358,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
lh );
// Default cell rect fill the entire row
- wxRect cellRect(greyDepthX, y,
- gridWidth - greyDepth + 2, rowHeight-1 );
+ wxRect cellRect(greyDepthX, y, cellX - greyDepthX, lh-1);
bool isCategory = p->IsCategory();
@@ -2373,20 +2395,16 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
cellRect.x += 1;
}
- int firstCellWidth = colWidths[0] - (greyDepthX - m_marginWidth);
+ int firstCellWidth = colWidths[0] - (greyDepth - m_marginWidth);
int firstCellX = cellRect.x;
// Calculate cellRect.x for the last cell
- unsigned int ci = 0;
- int cellX = x + 1;
- for ( ci = 0; ci < colCount; ci++ )
- cellX += colWidths[ci];
cellRect.x = cellX;
// Draw cells from back to front so that we can easily tell if the
// cell on the right was empty from text
bool prevFilled = true;
- ci = colCount;
+ unsigned int ci = lastCol + 1;
do
{
ci--;
@@ -2450,10 +2468,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
{
dc.SetBrush(m_colPropBack);
dc.SetPen(m_colPropBack);
- if ( p->IsEnabled() )
- dc.SetTextForeground(m_colPropFore);
- else
- dc.SetTextForeground(m_colDisPropFore);
+ dc.SetTextForeground(p->IsEnabled() ? m_colPropFore : m_colDisPropFore);
}
}
else
@@ -2500,16 +2515,21 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
prevFilled = true;
}
- dc.DestroyClippingRegion(); // Is this really necessary?
+ dc.DestroyClippingRegion();
}
- while ( ci > 0 );
+ while ( ci > firstCol );
if ( fontChanged )
dc.SetFont(normalFont);
- y += rowHeight;
+ y += lh;
}
+ // Clear empty space beyond the right edge of the grid
+ dc.SetPen(wxPen(m_colEmptySpace));
+ dc.SetBrush(wxBrush(m_colEmptySpace));
+ dc.DrawRectangle(cellX, firstItemTopY, viewRightEdge - cellX + 1, lastItemBottomY - firstItemTopY);
+
return y - 1 + vy;
}
@@ -2575,8 +2595,7 @@ void wxPropertyGrid::DrawItems( const wxPGProperty* p1, const wxPGProperty* p2 )
GetViewStart(&vx, &vy);
vx *= wxPG_PIXELS_PER_UNIT;
vy *= wxPG_PIXELS_PER_UNIT;
- r.x -= vx;
- r.y -= vy;
+ r.Offset(-vx, -vy);
RefreshRect(r);
Update();
}
@@ -2801,17 +2820,17 @@ void wxPropertyGrid::DoSetSplitterPosition( int newxpos,
if ( ( newxpos < wxPG_DRAG_MARGIN ) )
return;
- wxPropertyGridPageState* state = m_pState;
-
if ( flags & wxPG_SPLITTER_FROM_EVENT )
- state->m_dontCenterSplitter = true;
+ m_pState->m_dontCenterSplitter = true;
- state->DoSetSplitterPosition(newxpos, splitterIndex, flags);
+ m_pState->DoSetSplitterPosition(newxpos, splitterIndex, flags);
if ( flags & wxPG_SPLITTER_REFRESH )
{
if ( GetSelection() )
+ {
CorrectEditorWidgetSizeX();
+ }
Refresh();
}
@@ -2823,12 +2842,18 @@ void wxPropertyGrid::DoSetSplitterPosition( int newxpos,
void wxPropertyGrid::ResetColumnSizes( bool enableAutoResizing )
{
- wxPropertyGridPageState* state = m_pState;
- if ( state )
- state->ResetColumnSizes(0);
+ if ( m_pState )
+ {
+ m_pState->ResetColumnSizes(0);
+ if ( GetSelection() )
+ {
+ CorrectEditorWidgetSizeX();
+ }
+ Refresh();
- if ( enableAutoResizing && HasFlag(wxPG_SPLITTER_AUTO_CENTER) )
- m_pState->m_dontCenterSplitter = false;
+ if ( enableAutoResizing && HasFlag(wxPG_SPLITTER_AUTO_CENTER) )
+ m_pState->m_dontCenterSplitter = false;
+ }
}
// -----------------------------------------------------------------------
@@ -2849,8 +2874,8 @@ void wxPropertyGrid::CenterSplitter( bool enableAutoResizing )
// it itself will be returned
wxPGProperty* wxPropertyGrid::GetNearestPaintVisible( wxPGProperty* p ) const
{
- int vx,vy1;// Top left corner of client
- GetViewStart(&vx,&vy1);
+ int vy1;// Top left corner of client
+ GetViewStart(NULL,&vy1);
vy1 *= wxPG_PIXELS_PER_UNIT;
int vy2 = vy1 + m_height;
@@ -3246,8 +3271,6 @@ bool wxPropertyGrid::DoOnValidationFailure( wxPGProperty* property, wxVariant& W
cell.SetBgCol(vfbBg);
}
- DrawItemAndChildren(property);
-
if ( property == GetSelection() )
{
SetInternalFlag(wxPG_FL_CELL_OVERRIDES_SEL);
@@ -3259,6 +3282,8 @@ bool wxPropertyGrid::DoOnValidationFailure( wxPGProperty* property, wxVariant& W
editor->SetBackgroundColour(vfbBg);
}
}
+
+ DrawItemAndChildren(property);
}
if ( vfb & (wxPG_VFB_SHOW_MESSAGE |
@@ -3738,6 +3763,7 @@ wxRect wxPropertyGrid::GetEditorWidgetRect( wxPGProperty* p, int column ) const
int vx, vy; // Top left corner of client
GetViewStart(&vx, &vy);
+ vx *= wxPG_PIXELS_PER_UNIT;
vy *= wxPG_PIXELS_PER_UNIT;
if ( column == 1 )
@@ -3760,7 +3786,7 @@ wxRect wxPropertyGrid::GetEditorWidgetRect( wxPGProperty* p, int column ) const
return wxRect
(
- splitterX+imageOffset+wxPG_XBEFOREWIDGET+wxPG_CONTROL_MARGIN+1,
+ splitterX+imageOffset+wxPG_XBEFOREWIDGET+wxPG_CONTROL_MARGIN+1-vx,
itemy-vy,
colEnd-splitterX-wxPG_XBEFOREWIDGET-wxPG_CONTROL_MARGIN-imageOffset-1,
m_lineHeight-1
@@ -3816,12 +3842,8 @@ wxSize wxPropertyGrid::GetImageSize( wxPGProperty* p, int item ) const
// takes scrolling into account
void wxPropertyGrid::ImprovedClientToScreen( int* px, int* py )
{
- int vx, vy;
- GetViewStart(&vx,&vy);
- vy*=wxPG_PIXELS_PER_UNIT;
- vx*=wxPG_PIXELS_PER_UNIT;
- *px -= vx;
- *py -= vy;
+ wxASSERT(px && py);
+ CalcScrolledPosition(*px, *py, px, py);
ClientToScreen( px, py );
}
@@ -3829,14 +3851,7 @@ void wxPropertyGrid::ImprovedClientToScreen( int* px, int* py )
wxPropertyGridHitTestResult wxPropertyGrid::HitTest( const wxPoint& pt ) const
{
- wxPoint pt2;
- GetViewStart(&pt2.x,&pt2.y);
- pt2.x *= wxPG_PIXELS_PER_UNIT;
- pt2.y *= wxPG_PIXELS_PER_UNIT;
- pt2.x += pt.x;
- pt2.y += pt.y;
-
- return m_pState->HitTest(pt2);
+ return m_pState->HitTest(CalcUnscrolledPosition(pt));
}
// -----------------------------------------------------------------------
@@ -4136,7 +4151,9 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
{
int propY = p->GetY2(m_lineHeight);
- int splitterX = GetSplitterPosition();
+ int splitterX;
+ CalcScrolledPosition(GetSplitterPosition(), 0, &splitterX, NULL);
+
m_editorFocused = false;
m_iFlags |= wxPG_FL_PRIMARY_FILLS_ENTIRE;
@@ -4221,7 +4238,6 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
if ( p->HasFlag(wxPG_PROP_MODIFIED) &&
(m_windowStyle & wxPG_BOLD_MODIFIED) )
SetCurControlBoldFont();
-
// Store x relative to splitter (we'll need it).
m_ctrlXAdjust = m_wndEditor->GetPosition().x - splitterX;
@@ -4607,7 +4623,9 @@ void wxPropertyGrid::RecalculateVirtualSize( int forceXPos )
m_pState->CheckColumnWidths();
if ( GetSelection() )
+ {
CorrectEditorWidgetSizeX();
+ }
m_iFlags &= ~wxPG_FL_RECALCULATING_VIRTUAL_SIZE;
}
@@ -4685,6 +4703,8 @@ void wxPropertyGrid::SetVirtualWidth( int width )
SetInternalFlag(wxPG_FL_HAS_VIRTUAL_WIDTH);
}
m_pState->SetVirtualWidth( width );
+ RecalculateVirtualSize();
+ Refresh();
}
void wxPropertyGrid::SetFocusOnCanvas()
@@ -4726,7 +4746,7 @@ void wxPropertyGrid::SetFocusOnCanvas()
// selFlags uses same values DoSelectProperty's flags
// Returns true if event was vetoed.
-bool wxPropertyGrid::SendEvent( int eventType, wxPGProperty* p,
+bool wxPropertyGrid::SendEvent( wxEventType eventType, wxPGProperty* p,
wxVariant* pValue,
unsigned int selFlags,
unsigned int column )
@@ -4764,6 +4784,21 @@ bool wxPropertyGrid::SendEvent( int eventType, wxPGProperty* p,
return evt.WasVetoed();
}
+void wxPropertyGrid::SendEvent(wxEventType eventType, int intVal)
+{
+ wxPropertyGridEvent evt(eventType, m_eventObject->GetId());
+ evt.SetPropertyGrid(this);
+ evt.SetEventObject(m_eventObject);
+ evt.SetProperty(NULL);
+ evt.SetColumn(0);
+ evt.SetInt(intVal);
+
+ wxPropertyGridEvent* prevProcessedEvent = m_processedEvent;
+ m_processedEvent = &evt;
+ m_eventObject->HandleWindowEvent(evt);
+ m_processedEvent = prevProcessedEvent;
+}
+
// -----------------------------------------------------------------------
// Return false if should be skipped
@@ -4869,7 +4904,7 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even
m_propHover,
NULL,
wxPG_SEL_NOVALIDATE,
- (unsigned int)m_draggedSplitter);
+ 0); // dragged splitter is always 0 here
}
}
else if ( m_dragStatus == 0 )
@@ -4906,11 +4941,10 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even
m_draggedSplitter = splitterHit;
m_dragOffset = splitterHitOffset;
- #if wxPG_REFRESH_CONTROLS
- // Fixes button disappearance bug
if ( m_wndEditor2 )
- m_wndEditor2->Show ( false );
- #endif
+ {
+ m_wndEditor2->Hide();
+ }
m_startingSplitterX = x - splitterHitOffset;
}
@@ -4976,9 +5010,7 @@ bool wxPropertyGrid::HandleMouseDoubleClick( int WXUNUSED(x),
if ( m_propHover )
{
// Select property here as well
- wxPGProperty* p = m_propHover;
-
- AddToSelectionFromInputEvent(p, m_colHover, &event);
+ AddToSelectionFromInputEvent(m_propHover, m_colHover, &event);
// Send double-click event.
SendEvent( wxEVT_PG_DOUBLE_CLICK, m_propHover );
@@ -5271,11 +5303,10 @@ bool wxPropertyGrid::HandleMouseUp( int x, unsigned int WXUNUSED(y),
m_wndEditor->Show ( true );
}
- #if wxPG_REFRESH_CONTROLS
- // Fixes button disappearance bug
if ( m_wndEditor2 )
- m_wndEditor2->Show ( true );
- #endif
+ {
+ m_wndEditor2->Show(true);
+ }
// This clears the focus.
m_editorFocused = false;
@@ -5453,9 +5484,12 @@ bool wxPropertyGrid::OnMouseChildCommon( wxMouseEvent &event, int* px, int *py )
int splitterX = GetSplitterPosition();
wxRect r = topCtrlWnd->GetRect();
+ int ux, uy;
+ CalcUnscrolledPosition(r.x + x, r.y + y, &ux, &uy);
+
if ( !m_dragStatus &&
- x > (splitterX-r.x+wxPG_SPLITTERX_DETECTMARGIN2) &&
- y >= 0 && y < r.height \
+ ux > (splitterX + wxPG_SPLITTERX_DETECTMARGIN2) &&
+ y >= 0 && y < r.height
)
{
if ( m_curcursor != wxCURSOR_ARROW ) CustomSetCursor ( wxCURSOR_ARROW );
@@ -5463,8 +5497,14 @@ bool wxPropertyGrid::OnMouseChildCommon( wxMouseEvent &event, int* px, int *py )
}
else
{
- CalcUnscrolledPosition( event.m_x + r.x, event.m_y + r.y, \
- px, py );
+ if ( px )
+ {
+ *px = ux;
+ }
+ if ( py )
+ {
+ *py = uy;
+ }
return true;
}
return false;
@@ -6283,6 +6323,7 @@ wxDEFINE_EVENT( wxEVT_PG_LABEL_EDIT_ENDING, wxPropertyGridEvent );
wxDEFINE_EVENT( wxEVT_PG_COL_BEGIN_DRAG, wxPropertyGridEvent );
wxDEFINE_EVENT( wxEVT_PG_COL_DRAGGING, wxPropertyGridEvent );
wxDEFINE_EVENT( wxEVT_PG_COL_END_DRAG, wxPropertyGridEvent );
+wxDEFINE_EVENT( wxEVT_PG_HSCROLL, wxPropertyGridEvent);
// -----------------------------------------------------------------------
@@ -6327,7 +6368,7 @@ void wxPropertyGridEvent::OnPropertyGridSet()
return;
#if wxUSE_THREADS
- wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
+ wxCriticalSectionLocker lock(wxPGGlobalVars->m_critSect);
#endif
m_pg->m_liveEvents.push_back(this);
}
@@ -6339,7 +6380,7 @@ wxPropertyGridEvent::~wxPropertyGridEvent()
if ( m_pg )
{
#if wxUSE_THREADS
- wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
+ wxCriticalSectionLocker lock(wxPGGlobalVars->m_critSect);
#endif
// Use iterate from the back since it is more likely that the event
diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp
index 307753986e..04b7760101 100644
--- a/src/propgrid/propgridiface.cpp
+++ b/src/propgrid/propgridiface.cpp
@@ -915,22 +915,19 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const
//
// Save state on page basis
- unsigned int pageIndex = 0;
- wxArrayPtrVoid pageStates;
-
- for (;;)
+ wxVector pageStates;
+ for (int pageIndex = 0; ; pageIndex++)
{
wxPropertyGridPageState* page = GetPageState(pageIndex);
if ( !page ) break;
- pageStates.Add(page);
-
- pageIndex++;
+ pageStates.push_back(page);
}
- for ( pageIndex=0; pageIndex < pageStates.size(); pageIndex++ )
+ for (wxVector::const_iterator it_ps = pageStates.begin();
+ it_ps != pageStates.end(); ++it_ps)
{
- wxPropertyGridPageState* pageState = (wxPropertyGridPageState*) pageStates[pageIndex];
+ wxPropertyGridPageState* pageState = *it_ps;
if ( includedStates & SelectionState )
{
diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp
index 6d11d450a1..d53e1ac4de 100644
--- a/src/propgrid/propgridpagestate.cpp
+++ b/src/propgrid/propgridpagestate.cpp
@@ -981,7 +981,7 @@ wxSize wxPropertyGridPageState::DoFitColumns( bool WXUNUSED(allowGridResize) )
// Expand last one to fill the width
int remaining = m_width - accWid;
- m_colWidths[GetColumnCount()-1] += remaining;
+ m_colWidths.back() += remaining;
m_dontCenterSplitter = true;
@@ -1008,39 +1008,14 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
wxPropertyGrid* pg = GetGrid();
- unsigned int i;
- unsigned int lastColumn = m_colWidths.size() - 1;
- int width = m_width;
int clientWidth = pg->GetClientSize().x;
- //
- // Column to reduce, if needed. Take last one that exceeds minimum width.
- int reduceCol = -1;
-
wxLogTrace("propgrid",
wxS("ColumnWidthCheck (virtualWidth: %i, clientWidth: %i)"),
- width, clientWidth);
+ m_width, clientWidth);
- //
- // Check min sizes
- for ( i=0; iGetMarginWidth();
- for ( i=0; i(m_colWidths, pg->GetMarginWidth());
wxLogTrace("propgrid",
wxS(" HasVirtualWidth: %i colsWidth: %i"),
@@ -1049,30 +1024,36 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
// Then mode-based requirement
if ( !pg->HasVirtualWidth() )
{
- int widthHigher = width - colsWidth;
+ int widthHigher = m_width - colsWidth;
// Adapt colsWidth to width
- if ( colsWidth < width )
+ if ( colsWidth < m_width )
{
// Increase column
wxLogTrace("propgrid",
wxS(" Adjust last column to %i"),
- m_colWidths[lastColumn] + widthHigher);
- m_colWidths[lastColumn] = m_colWidths[lastColumn] + widthHigher;
+ m_colWidths.back() + widthHigher);
+ m_colWidths.back() += widthHigher;
}
- else if ( colsWidth > width )
+ else if ( colsWidth > m_width )
{
- // Reduce column
- if ( reduceCol != -1 )
+ widthHigher = -widthHigher;
+ // Always reduce the last column that is larger than minimum size
+ // (looks nicer, even with auto-centering enabled).
+ for (int reduceCol = (int)m_colWidths.size() - 1; reduceCol >= 0 && widthHigher > 0; reduceCol--)
{
- wxLogTrace("propgrid",
- wxS(" Reduce column %i (by %i)"),
- reduceCol, -widthHigher);
+ // Reduce column, if possible.
+ if ( m_colWidths[reduceCol] > GetColumnMinWidth(reduceCol) )
+ {
+ int d = wxMin(m_colWidths[reduceCol] - GetColumnMinWidth(reduceCol), widthHigher);
+ wxLogTrace("propgrid", wxS(" Reduce column %i (by %i)"), reduceCol, d);
- // Reduce widest column, and recheck
- m_colWidths[reduceCol] = m_colWidths[reduceCol] + widthHigher;
- CheckColumnWidths();
+ m_colWidths[reduceCol] -= d;
+ colsWidth -= d;
+ widthHigher -= d;
+ }
}
+ m_width = colsWidth;
}
}
else
@@ -1080,7 +1061,7 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
// Only check colsWidth against clientWidth
if ( colsWidth < clientWidth )
{
- m_colWidths[lastColumn] = m_colWidths[lastColumn] + (clientWidth-colsWidth);
+ m_colWidths.back() += (clientWidth-colsWidth);
}
m_width = colsWidth;
@@ -1090,9 +1071,9 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
pg->RecalculateVirtualSize();
}
- for ( i=0; i(m_columnProportions, 0);
int puwid = (m_pPropGrid->m_width*256) / psum;
int cpos = 0;
// Convert proportion to splitter positions
- for ( i=0; i<(m_colWidths.size() - 1); i++ )
+ for (size_t i=0; i<(m_colWidths.size() - 1); i++)
{
int cwid = (puwid*m_columnProportions[i]) / 256;
cpos += cwid;
- DoSetSplitterPosition(cpos, i,
+ DoSetSplitterPosition(cpos, (int)i,
setSplitterFlags);
}
}
diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp
index 0d4b3ead19..8957bb5d59 100644
--- a/src/propgrid/props.cpp
+++ b/src/propgrid/props.cpp
@@ -160,47 +160,44 @@ wxNumericPropertyValidator::
wxNumericPropertyValidator( NumericType numericType, int base )
: wxTextValidator(wxFILTER_INCLUDE_CHAR_LIST)
{
- wxArrayString arr;
- arr.Add(wxS("0"));
- arr.Add(wxS("1"));
- arr.Add(wxS("2"));
- arr.Add(wxS("3"));
- arr.Add(wxS("4"));
- arr.Add(wxS("5"));
- arr.Add(wxS("6"));
- arr.Add(wxS("7"));
+ long style = GetStyle();
- if ( base >= 10 )
+ wxString allowedChars;
+
+ switch ( base )
{
- arr.Add(wxS("8"));
- arr.Add(wxS("9"));
- if ( base >= 16 )
- {
- arr.Add(wxS("a")); arr.Add(wxS("A"));
- arr.Add(wxS("b")); arr.Add(wxS("B"));
- arr.Add(wxS("c")); arr.Add(wxS("C"));
- arr.Add(wxS("d")); arr.Add(wxS("D"));
- arr.Add(wxS("e")); arr.Add(wxS("E"));
- arr.Add(wxS("f")); arr.Add(wxS("F"));
- }
+ case 2:
+ allowedChars += wxS("01");
+ break;
+ case 8:
+ allowedChars += wxS("01234567");
+ break;
+ case 10:
+ style |= wxFILTER_DIGITS;
+ break;
+ case 16:
+ style |= wxFILTER_XDIGITS;
+ break;
+
+ default:
+ wxLogWarning( _("Unknown base %d. Base 10 will be used."), base );
+ style |= wxFILTER_DIGITS;
}
if ( numericType == Signed )
{
- arr.Add(wxS("+"));
- arr.Add(wxS("-"));
+ allowedChars += wxS("-+");
}
else if ( numericType == Float )
{
- arr.Add(wxS("+"));
- arr.Add(wxS("-"));
- arr.Add(wxS("e")); arr.Add(wxS("E"));
+ allowedChars += wxS("-+eE");
// Use locale-specific decimal point
- arr.Add(wxString::Format(wxS("%g"), 1.1)[1]);
+ allowedChars += wxString::Format(wxS("%g"), 1.1)[1];
}
- SetIncludes(arr);
+ SetStyle(style);
+ SetCharIncludes(allowedChars);
}
bool wxNumericPropertyValidator::Validate(wxWindow* parent)
@@ -1437,11 +1434,6 @@ bool wxEnumProperty::ValueFromInt_(wxVariant& value, int* pIndex, int intVal, in
return false;
}
-void
-wxEnumProperty::OnValidationFailure( wxVariant& WXUNUSED(pendingValue) )
-{
-}
-
void wxEnumProperty::SetIndex( int index )
{
m_index = index;
@@ -2021,15 +2013,7 @@ wxValidator* wxFileProperty::GetClassValidator()
static wxString v;
wxTextValidator* validator = new wxTextValidator(wxFILTER_EXCLUDE_CHAR_LIST,&v);
- wxArrayString exChars;
- exChars.Add(wxS("?"));
- exChars.Add(wxS("*"));
- exChars.Add(wxS("|"));
- exChars.Add(wxS("<"));
- exChars.Add(wxS(">"));
- exChars.Add(wxS("\""));
-
- validator->SetExcludes(exChars);
+ validator->SetCharExcludes(wxString("?*|<>\""));
WX_PG_DOGETVALIDATOR_EXIT(validator)
#else
@@ -2405,23 +2389,12 @@ wxPGArrayEditorDialog::wxPGArrayEditorDialog()
void wxPGArrayEditorDialog::Init()
{
+ m_elb = NULL;
+ m_elbSubPanel = NULL;
m_lastFocused = NULL;
m_hasCustomNewAction = false;
m_itemPendingAtIndex = -1;
-}
-
-// -----------------------------------------------------------------------
-
-wxPGArrayEditorDialog::wxPGArrayEditorDialog( wxWindow *parent,
- const wxString& message,
- const wxString& caption,
- long style,
- const wxPoint& pos,
- const wxSize& sz )
- : wxDialog()
-{
- Init();
- Create(parent,message,caption,style,pos,sz);
+ m_modified = false;
}
// -----------------------------------------------------------------------
@@ -2464,6 +2437,12 @@ bool wxPGArrayEditorDialog::Create( wxWindow *parent,
wxEL_ALLOW_EDIT |
wxEL_ALLOW_DELETE);
+ // Set custom text for "New" button, if provided
+ if ( !m_customNewButtonText.empty() )
+ {
+ m_elb->GetNewButton()->SetToolTip(m_customNewButtonText);
+ }
+
// Populate the list box
wxArrayString arr;
for ( unsigned int i=0; iToString() ), parent );
-
+
// Set a property to save wx Command to send when activated
s->setProperty( "wxQt_Command", e->GetCommand() );
@@ -75,23 +75,24 @@ wxAcceleratorTable::wxAcceleratorTable()
wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
{
m_refData = new wxAccelRefData;
-
+
for ( int i = 0; i < n; i++ )
{
M_ACCELDATA->m_accels.Append( new wxAcceleratorEntry( entries[i] ) );
}
}
-QList< QShortcut* > *wxAcceleratorTable::ConvertShortcutTable( QWidget *parent ) const
-{
- QList< QShortcut* > *qtList = new QList< QShortcut* >;
-
- for ( wxAccelList::compatibility_iterator node = M_ACCELDATA->m_accels.GetFirst(); node; node = node->GetNext() )
+wxVector wxAcceleratorTable::ConvertShortcutTable( QWidget *parent ) const
+{
+ wxVector shortcuts;
+
+ for ( wxAccelList::compatibility_iterator node = M_ACCELDATA->m_accels.GetFirst();
+ node; node = node->GetNext() )
{
- qtList->push_back(ConvertAccelerator( node->GetData(), parent ));
+ shortcuts.push_back(ConvertAccelerator(node->GetData(), parent));
}
-
- return qtList;
+
+ return shortcuts;
}
wxObjectRefData *wxAcceleratorTable::CreateRefData() const
diff --git a/src/qt/anybutton.cpp b/src/qt/anybutton.cpp
index dc56780af2..acb5f4c6fd 100644
--- a/src/qt/anybutton.cpp
+++ b/src/qt/anybutton.cpp
@@ -27,6 +27,8 @@ public:
wxQtPushButton( wxWindow *parent, wxAnyButton *handler);
private:
+ virtual bool event(QEvent* e) wxOVERRIDE;
+ void action(); // press, release
void clicked(bool);
};
@@ -34,18 +36,50 @@ wxQtPushButton::wxQtPushButton(wxWindow *parent, wxAnyButton *handler)
: wxQtEventSignalHandler< QPushButton, wxAnyButton >( parent, handler )
{
connect(this, &QPushButton::clicked, this, &wxQtPushButton::clicked);
+ connect(this, &QPushButton::pressed, this, &wxQtPushButton::action);
+ connect(this, &QPushButton::released, this, &wxQtPushButton::action);
}
-void wxQtPushButton::clicked( bool WXUNUSED(checked) )
+void wxQtPushButton::clicked(bool checked)
{
wxAnyButton *handler = GetHandler();
if ( handler )
{
- wxCommandEvent event( wxEVT_BUTTON, handler->GetId() );
+ wxCommandEvent event( handler->GetEventType(), handler->GetId() );
+ if ( isCheckable() ) // toggle buttons
+ {
+ event.SetInt(checked);
+ }
EmitEvent( event );
}
}
+void wxQtPushButton::action()
+{
+ GetHandler()->QtUpdateState();
+}
+
+bool wxQtPushButton::event(QEvent* e)
+{
+ switch ( e->type() )
+ {
+ case QEvent::EnabledChange:
+ case QEvent::Enter:
+ case QEvent::Leave:
+ case QEvent::FocusIn:
+ case QEvent::FocusOut:
+ GetHandler()->QtUpdateState();
+ }
+
+ return QPushButton::event(e);
+}
+
+wxAnyButton::wxAnyButton() :
+ m_qtPushButton(NULL)
+{
+}
+
+
void wxAnyButton::QtCreate(wxWindow *parent)
{
// create the default push button (used in button and bmp button)
@@ -54,12 +88,17 @@ void wxAnyButton::QtCreate(wxWindow *parent)
void wxAnyButton::QtSetBitmap( const wxBitmap &bitmap )
{
+ wxCHECK_RET(m_qtPushButton, "Invalid button.");
+
// load the bitmap and resize the button:
QPixmap *pixmap = bitmap.GetHandle();
- m_qtPushButton->setIcon( QIcon( *pixmap ));
- m_qtPushButton->setIconSize( pixmap->rect().size() );
+ if ( pixmap != NULL )
+ {
+ m_qtPushButton->setIcon(QIcon(*pixmap));
+ m_qtPushButton->setIconSize(pixmap->rect().size());
- m_bitmap = bitmap;
+ InvalidateBestSize();
+ }
}
void wxAnyButton::SetLabel( const wxString &label )
@@ -74,38 +113,57 @@ QWidget *wxAnyButton::GetHandle() const
wxBitmap wxAnyButton::DoGetBitmap(State state) const
{
- return state == State_Normal ? m_bitmap : wxNullBitmap;
+ return state < State_Max ? m_bitmaps[state] : wxNullBitmap;
}
void wxAnyButton::DoSetBitmap(const wxBitmap& bitmap, State which)
{
- switch ( which )
+ wxCHECK_RET(which < State_Max, "Invalid state");
+
+ // Cache the bitmap.
+ m_bitmaps[which] = bitmap;
+
+ // Replace current bitmap only if the button is in the same state.
+ if ( which == QtGetCurrentState() )
{
- case State_Normal:
- QtSetBitmap(bitmap);
- InvalidateBestSize();
- break;
-
- case State_Pressed:
- wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Pressed ));
- break;
-
- case State_Current:
- wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Current ));
- break;
-
- case State_Focused:
- wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Focused ));
- break;
-
- case State_Disabled:
- wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Disabled ));
- break;
-
- case State_Max:
- wxMISSING_IMPLEMENTATION( wxSTRINGIZE( State_Max ));
-
+ QtUpdateState();
}
}
+wxAnyButton::State wxAnyButton::QtGetCurrentState() const
+{
+ wxCHECK_MSG(m_qtPushButton, State_Normal, "Invalid button.");
+
+ if ( !m_qtPushButton->isEnabled() )
+ {
+ return State_Disabled;
+ }
+
+ if ( m_qtPushButton->isChecked() || m_qtPushButton->isDown() )
+ {
+ return State_Pressed;
+ }
+
+ if ( HasCapture() || m_qtPushButton->hasMouseTracking() || m_qtPushButton->underMouse() )
+ {
+ return State_Current;
+ }
+
+ if ( m_qtPushButton->hasFocus() )
+ {
+ return State_Focused;
+ }
+
+ return State_Normal;
+}
+
+void wxAnyButton::QtUpdateState()
+{
+ State state = QtGetCurrentState();
+
+ // Update the bitmap
+ const wxBitmap& bmp = m_bitmaps[state];
+ QtSetBitmap(bmp.IsOk() ? bmp : m_bitmaps[State_Normal]);
+}
+
#endif // wxHAS_ANY_BUTTON
diff --git a/src/qt/app.cpp b/src/qt/app.cpp
index 93f0ccd3d8..a1a4b67d72 100644
--- a/src/qt/app.cpp
+++ b/src/qt/app.cpp
@@ -15,21 +15,20 @@
#include
#include
-wxIMPLEMENT_DYNAMIC_CLASS(wxApp, wxAppBase);
+wxIMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler);
wxApp::wxApp()
{
- m_qtApplication = NULL;
+ m_qtArgc = 0;
}
wxApp::~wxApp()
{
- // Only delete if the app was actually initialized
- if ( m_qtApplication != NULL )
+ // Delete command line arguments
+ for ( int i = 0; i < m_qtArgc; ++i )
{
- m_qtApplication->deleteLater();
- delete [] m_qtArgv;
+ delete m_qtArgv[i];
}
}
@@ -47,7 +46,7 @@ bool wxApp::Initialize( int &argc, wxChar **argv )
// TODO: Check whether new/strdup etc. can be replaced with std::vector<>.
// Clone and store arguments
- m_qtArgv = new char *[argc + 1];
+ m_qtArgv.reset(new char* [argc + 1]);
for ( int i = 0; i < argc; i++ )
{
m_qtArgv[i] = wxStrdupA(wxConvUTF8.cWX2MB(argv[i]));
@@ -55,7 +54,7 @@ bool wxApp::Initialize( int &argc, wxChar **argv )
m_qtArgv[argc] = NULL;
m_qtArgc = argc;
- m_qtApplication = new QApplication( m_qtArgc, m_qtArgv );
+ m_qtApplication.reset(new QApplication(m_qtArgc, m_qtArgv.get()));
// Use the args returned by Qt as it may have deleted (processed) some of them
// Using QApplication::arguments() forces argument processing
@@ -67,7 +66,7 @@ bool wxApp::Initialize( int &argc, wxChar **argv )
* deleted as they are internally kept by Qt in a list after calling arguments().
* However, there isn't any guarantee of that in the docs, so we keep arguments
* ourselves and only delete then after the QApplication is deleted */
-
+
// Qt changed the arguments
delete [] argv;
argv = new wxChar *[qtArgs.size() + 1];
diff --git a/src/qt/apptraits.cpp b/src/qt/apptraits.cpp
index 3f44fd8f8e..cb2bad3378 100644
--- a/src/qt/apptraits.cpp
+++ b/src/qt/apptraits.cpp
@@ -33,7 +33,7 @@ wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer)
// void wxGUIAppTraits::MutexGuiEnter()
// {
// }
-//
+//
// void wxGUIAppTraits::MutexGuiLeave()
// {
// }
@@ -53,17 +53,3 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer,
return wxPORT_QT;
}
-
-//#############################################################################
-
-// this one fails to link under Windows; why is src/msw/basemsw.cpp picked up???
-#if wxUSE_CONSOLE_EVENTLOOP && !defined(__WINDOWS__)
-
-wxEventLoopBase *wxConsoleAppTraits::CreateEventLoop()
-{
- return new wxEventLoop();
-}
-
-#endif
-
-//#############################################################################
diff --git a/src/qt/bitmap.cpp b/src/qt/bitmap.cpp
index 6f632a1931..28c5d2d30a 100644
--- a/src/qt/bitmap.cpp
+++ b/src/qt/bitmap.cpp
@@ -32,33 +32,33 @@
static wxImage ConvertImage( QImage qtImage )
{
bool hasAlpha = qtImage.hasAlphaChannel();
-
+
int numPixels = qtImage.height() * qtImage.width();
//Convert to ARGB32 for scanLine
qtImage = qtImage.convertToFormat(QImage::Format_ARGB32);
-
+
unsigned char *data = (unsigned char *)malloc(sizeof(char) * 3 * numPixels);
unsigned char *startData = data;
-
+
unsigned char *alpha = NULL;
if (hasAlpha)
alpha = (unsigned char *)malloc(sizeof(char) * numPixels);
unsigned char *startAlpha = alpha;
-
+
for (int y = 0; y < qtImage.height(); y++)
{
QRgb *line = (QRgb*)qtImage.scanLine(y);
-
+
for (int x = 0; x < qtImage.width(); x++)
{
QRgb colour = line[x];
-
+
data[0] = qRed(colour);
data[1] = qGreen(colour);
data[2] = qBlue(colour);
-
+
if (hasAlpha)
{
alpha[0] = qAlpha(colour);
@@ -79,7 +79,7 @@ static QImage ConvertImage( const wxImage &image )
bool hasMask = image.HasMask();
QImage qtImage( wxQtConvertSize( image.GetSize() ),
( (hasAlpha || hasMask ) ? QImage::Format_ARGB32 : QImage::Format_RGB32 ) );
-
+
unsigned char *data = image.GetData();
unsigned char *alpha = hasAlpha ? image.GetAlpha() : NULL;
QRgb colour;
@@ -91,7 +91,7 @@ static QImage ConvertImage( const wxImage &image )
image.GetOrFindMaskColour( &r, &g, &b );
maskedColour = ( r << 16 ) + ( g << 8 ) + b;
}
-
+
for (int y = 0; y < image.GetHeight(); y++)
{
for (int x = 0; x < image.GetWidth(); x++)
@@ -103,14 +103,14 @@ static QImage ConvertImage( const wxImage &image )
}
else
colour = 0;
-
+
colour += (data[0] << 16) + (data[1] << 8) + data[2];
if ( hasMask && colour != maskedColour )
colour += 0xFF000000; // 255 << 24
-
+
qtImage.setPixel(x, y, colour);
-
+
data += 3;
}
}
@@ -125,7 +125,7 @@ class wxBitmapRefData: public wxGDIRefData
{
public:
wxBitmapRefData() { m_mask = NULL; }
-
+
wxBitmapRefData( int width, int height, int depth )
{
if (depth == 1)
@@ -134,16 +134,17 @@ class wxBitmapRefData: public wxGDIRefData
m_qtPixmap = QPixmap( width, height );
m_mask = NULL;
}
-
+
wxBitmapRefData( QPixmap pix )
+ : m_qtPixmap(pix)
{
- m_qtPixmap = pix;
m_mask = NULL;
}
virtual ~wxBitmapRefData() { delete m_mask; }
QPixmap m_qtPixmap;
+ QImage m_rawPixelSource;
wxMask *m_mask;
private:
@@ -230,7 +231,7 @@ bool wxBitmap::Create(int width, int height, int depth )
{
UnRef();
m_refData = new wxBitmapRefData(width, height, depth);
-
+
return true;
}
@@ -291,14 +292,14 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect& rect) const
bool wxBitmap::SaveFile(const wxString &name, wxBitmapType type,
const wxPalette *WXUNUSED(palette) ) const
-{
+{
#if wxUSE_IMAGE
//Try to save using wx
wxImage image = ConvertToImage();
if (image.IsOk() && image.SaveFile(name, type))
return true;
#endif
-
+
//Try to save using Qt
const char* type_name = NULL;
switch (type)
@@ -358,7 +359,7 @@ bool wxBitmap::LoadFile(const wxString &name, wxBitmapType type)
{
//Try to load using Qt
AllocExclusive();
-
+
//TODO: Use passed image type instead of auto-detection
return M_PIXDATA.load(wxQtConvertString(name));
}
@@ -409,17 +410,19 @@ void wxBitmap::SetDepth(int depth)
void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
{
void* bits = NULL;
- // allow access if bpp is valid and matches existence of alpha
- if ( !M_PIXDATA.isNull() )
+
+ wxBitmapRefData *refData = static_cast(m_refData);
+
+ // allow access if bpp is valid
+ if ( !refData->m_qtPixmap.isNull() )
{
- QImage qimage = M_PIXDATA.toImage();
- bool hasAlpha = M_PIXDATA.hasAlphaChannel();
- if ((bpp == 24 && !hasAlpha) || (bpp == 32 && hasAlpha))
+ if ( bpp == 32 )
{
- data.m_height = qimage.height();
- data.m_width = qimage.width();
- data.m_stride = qimage.bytesPerLine();
- bits = (void*) qimage.bits();
+ refData->m_rawPixelSource = refData->m_qtPixmap.toImage().convertToFormat(QImage::Format_RGBA8888);
+ data.m_height = refData->m_rawPixelSource.height();
+ data.m_width = refData->m_rawPixelSource.width();
+ data.m_stride = refData->m_rawPixelSource.bytesPerLine();
+ bits = refData->m_rawPixelSource.bits();
}
}
return bits;
@@ -427,7 +430,9 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
void wxBitmap::UngetRawData(wxPixelDataBase& WXUNUSED(data))
{
- wxMISSING_IMPLEMENTATION( __FUNCTION__ );
+ wxBitmapRefData *refData = static_cast(m_refData);
+ refData->m_qtPixmap = QPixmap::fromImage(refData->m_rawPixelSource);
+ refData->m_rawPixelSource = QImage();
}
QPixmap *wxBitmap::GetHandle() const
@@ -473,11 +478,14 @@ wxMask::wxMask(const wxMask &mask)
wxMask& wxMask::operator=(const wxMask &mask)
{
- delete m_qtBitmap;
- QBitmap *mask_bmp = mask.GetHandle();
- m_qtBitmap = mask_bmp ? new QBitmap(*mask_bmp) : NULL;
+ if (this != &mask)
+ {
+ delete m_qtBitmap;
+ QBitmap *mask_bmp = mask.GetHandle();
+ m_qtBitmap = mask_bmp ? new QBitmap(*mask_bmp) : NULL;
+ }
return *this;
-}
+}
wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour)
{
diff --git a/src/qt/brush.cpp b/src/qt/brush.cpp
index 9c16a35c9d..3e23b8f7a5 100644
--- a/src/qt/brush.cpp
+++ b/src/qt/brush.cpp
@@ -15,6 +15,7 @@
#include
+wxIMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject);
static Qt::BrushStyle ConvertBrushStyle(wxBrushStyle style)
{
@@ -44,7 +45,7 @@ static Qt::BrushStyle ConvertBrushStyle(wxBrushStyle style)
case wxBRUSHSTYLE_VERTICAL_HATCH:
return Qt::VerPattern;
-
+
case wxBRUSHSTYLE_STIPPLE:
case wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE:
case wxBRUSHSTYLE_STIPPLE_MASK:
@@ -61,24 +62,25 @@ static Qt::BrushStyle ConvertBrushStyle(wxBrushStyle style)
class wxBrushRefData: public wxGDIRefData
{
public:
- wxBrushRefData()
+ wxBrushRefData() :
+ m_style(wxBRUSHSTYLE_INVALID)
{
}
-
+
wxBrushRefData( const wxBrushRefData& data )
- : wxGDIRefData()
+ : m_qtBrush(data.m_qtBrush)
{
- m_qtBrush = data.m_qtBrush;
+ m_style = data.m_style;
}
-
+
bool operator == (const wxBrushRefData& data) const
{
return m_qtBrush == data.m_qtBrush;
}
-
+
QBrush m_qtBrush;
- // To keep if mask is stippled
+ // To keep if mask is stippled
wxBrushStyle m_style;
};
@@ -153,9 +155,9 @@ void wxBrush::SetStipple(const wxBitmap& stipple)
bool wxBrush::operator==(const wxBrush& brush) const
{
if (m_refData == brush.m_refData) return true;
-
+
if (!m_refData || !brush.m_refData) return false;
-
+
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
}
diff --git a/src/qt/button.cpp b/src/qt/button.cpp
index 7b7a2e992e..aa61ab127a 100644
--- a/src/qt/button.cpp
+++ b/src/qt/button.cpp
@@ -43,9 +43,9 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id,
const wxSize& size, long style,
const wxValidator& validator,
const wxString& name )
-{
+{
QtCreate(parent);
- SetLabel( wxIsStockID( id ) ? wxGetStockLabel( id ) : label );
+ SetLabel( label.IsEmpty() && wxIsStockID( id ) ? wxGetStockLabel( id ) : label );
return QtCreateControl( parent, id, pos, size, style, validator, name );
}
diff --git a/src/qt/calctrl.cpp b/src/qt/calctrl.cpp
index cc051c09dc..180a07b642 100644
--- a/src/qt/calctrl.cpp
+++ b/src/qt/calctrl.cpp
@@ -136,6 +136,10 @@ bool wxCalendarCtrl::SetDate(const wxDateTime& date)
if ( !m_qtCalendar )
return false;
+ if ( wxQtConvertDate( date ) > m_qtCalendar->maximumDate() ||
+ wxQtConvertDate( date ) < m_qtCalendar->minimumDate() )
+ return false;
+
m_qtCalendar->blockSignals(true);
m_qtCalendar->setSelectedDate(wxQtConvertDate(date));
m_qtCalendar->blockSignals(false);
@@ -171,12 +175,21 @@ bool wxCalendarCtrl::GetDateRange(wxDateTime *lowerdate,
if ( !m_qtCalendar )
return false;
- if (lowerdate)
- *lowerdate = wxQtConvertDate(m_qtCalendar->minimumDate());
- if (upperdate)
- *upperdate = wxQtConvertDate(m_qtCalendar->maximumDate());
+ bool status = false;
- return true;
+ if ( lowerdate )
+ {
+ *lowerdate = wxQtConvertDate(m_qtCalendar->minimumDate());
+ status = true;
+ }
+
+ if ( upperdate )
+ {
+ *upperdate = wxQtConvertDate(m_qtCalendar->maximumDate());
+ status = true;
+ }
+
+ return status;
}
// Copied from wxMSW
@@ -312,7 +325,7 @@ void wxCalendarCtrl::SetAttr(size_t day, wxCalendarDateAttr *attr)
// wxFont is not implemented yet
//if ( attr->HasFont() )
// format.setFont(attr->GetFont().GetQFont());
-
+
m_qtCalendar->setDateTextFormat(date, format);
}
@@ -325,8 +338,8 @@ QWidget *wxCalendarCtrl::GetHandle() const
wxQtCalendarWidget::wxQtCalendarWidget( wxWindow *parent, wxCalendarCtrl *handler )
: wxQtEventSignalHandler< QCalendarWidget, wxCalendarCtrl >( parent, handler )
+ , m_date(selectedDate())
{
- m_date = selectedDate();
connect(this, &QCalendarWidget::selectionChanged, this, &wxQtCalendarWidget::selectionChanged);
connect(this, &QCalendarWidget::activated, this, &wxQtCalendarWidget::activated);
}
diff --git a/src/qt/checkbox.cpp b/src/qt/checkbox.cpp
index c248531f72..234462d642 100644
--- a/src/qt/checkbox.cpp
+++ b/src/qt/checkbox.cpp
@@ -46,7 +46,8 @@ void wxQtCheckBox::clicked( bool checked )
}
-wxCheckBox::wxCheckBox()
+wxCheckBox::wxCheckBox() :
+ m_qtCheckBox(NULL)
{
}
@@ -117,7 +118,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateValue() const
case Qt::Checked:
return wxCHK_CHECKED;
-
+
case Qt::PartiallyChecked:
return wxCHK_UNDETERMINED;
}
diff --git a/src/qt/choice.cpp b/src/qt/choice.cpp
index 19d074284a..9399820bf6 100644
--- a/src/qt/choice.cpp
+++ b/src/qt/choice.cpp
@@ -10,7 +10,40 @@
#include "wx/choice.h"
#include "wx/qt/private/winevent.h"
+
#include
+#include
+
+namespace
+{
+
+class LexicalSortProxyModel : public QSortFilterProxyModel
+{
+public:
+ explicit LexicalSortProxyModel(QObject* owner) : QSortFilterProxyModel(owner) {}
+
+ bool lessThan( const QModelIndex &left, const QModelIndex &right ) const wxOVERRIDE
+ {
+ const QVariant leftData = sourceModel()->data( left );
+ const QVariant rightData = sourceModel()->data( right );
+
+ if ( leftData.type() != QVariant::String )
+ return false;
+
+ int insensitiveResult = QString::compare(
+ leftData.value(),
+ rightData.value(),
+ Qt::CaseInsensitive );
+
+ if ( insensitiveResult == 0 )
+ {
+ return QString::compare( leftData.value(),
+ rightData.value() ) < 0;
+ }
+
+ return insensitiveResult < 0;
+ }
+};
class wxQtChoice : public wxQtEventSignalHandler< QComboBox, wxChoice >
{
@@ -36,11 +69,22 @@ void wxQtChoice::activated(int WXUNUSED(index))
handler->SendSelectionChangedEvent(wxEVT_CHOICE);
}
+} // anonymous namespace
-wxChoice::wxChoice()
+
+wxChoice::wxChoice() :
+ m_qtComboBox(NULL)
{
}
+void wxChoice::QtInitSort( QComboBox *combo )
+{
+ QSortFilterProxyModel *proxyModel = new LexicalSortProxyModel(combo);
+ proxyModel->setSourceModel(combo->model());
+ combo->model()->setParent(proxyModel);
+ combo->setModel(proxyModel);
+}
+
wxChoice::wxChoice( wxWindow *parent, wxWindowID id,
const wxPoint& pos,
@@ -89,6 +133,8 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
{
m_qtComboBox = new wxQtChoice( parent, this );
+ QtInitSort( m_qtComboBox );
+
while ( n-- > 0 )
m_qtComboBox->addItem( wxQtConvertString( *choices++ ));
@@ -126,7 +172,9 @@ void wxChoice::SetString(unsigned int n, const wxString& s)
void wxChoice::SetSelection(int n)
{
+ m_qtComboBox->blockSignals(true);
m_qtComboBox->setCurrentIndex(n);
+ m_qtComboBox->blockSignals(false);
}
int wxChoice::GetSelection() const
@@ -141,13 +189,44 @@ int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items,
wxClientDataType type)
{
InvalidateBestSize();
+
+ // Hack: to avoid resorting the model many times in DoInsertOneItem(),
+ // which will be called for each item from DoInsertItemsInLoop(), reset the
+ // wxCB_SORT style if we have it temporarily and only sort once at the end.
+ bool wasSorted = false;
+ if ( IsSorted() )
+ {
+ wasSorted = true;
+ ToggleWindowStyle(wxCB_SORT);
+ }
+
int n = DoInsertItemsInLoop(items, pos, clientData, type);
+
+ if ( wasSorted )
+ {
+ // Restore the flag turned off above.
+ ToggleWindowStyle(wxCB_SORT);
+
+ // And actually sort items now.
+ m_qtComboBox->model()->sort(0);
+ }
+
return n;
}
int wxChoice::DoInsertOneItem(const wxString& item, unsigned int pos)
{
+ // Maintain unselected state
+ const bool unselected = m_qtComboBox->currentIndex() == -1;
+
m_qtComboBox->insertItem(pos, wxQtConvertString(item));
+
+ if ( IsSorted() )
+ m_qtComboBox->model()->sort(0);
+
+ if ( unselected )
+ m_qtComboBox->setCurrentIndex(-1);
+
return pos;
}
@@ -171,6 +250,12 @@ void wxChoice::DoClear()
void wxChoice::DoDeleteOneItem(unsigned int pos)
{
+ const int selection = GetSelection();
+
+ if ( selection >= 0 && static_cast(selection) == pos )
+ {
+ SetSelection( wxNOT_FOUND );
+ }
m_qtComboBox->removeItem(pos);
}
diff --git a/src/qt/clipbrd.cpp b/src/qt/clipbrd.cpp
index 5479fe3109..0a9dc2902d 100644
--- a/src/qt/clipbrd.cpp
+++ b/src/qt/clipbrd.cpp
@@ -96,7 +96,7 @@ bool wxClipboard::AddData( wxDataObject *data )
// how to add timestamp?
- // Unfortunately I cannot find a way to use the qt clipboard with
+ // Unfortunately I cannot find a way to use the qt clipboard with
// a callback to select the data type, so I must copy it all here
for ( size_t i = 0; i < count; i++ )
@@ -109,7 +109,7 @@ bool wxClipboard::AddData( wxDataObject *data )
QByteArray bytearray(size, 0);
data->GetDataHere(format, bytearray.data());
- MimeData->setData(wxQtConvertString(format.m_MimeType), bytearray);
+ MimeData->setData(wxQtConvertString(format.GetMimeType()), bytearray);
}
delete data;
@@ -142,9 +142,9 @@ bool wxClipboard::GetData( wxDataObject& data )
for ( size_t i = 0; i < count; i++ )
{
const wxDataFormat format(formats[i]);
-
+
// is this format supported by clipboard ?
- if( !MimeData->hasFormat(wxQtConvertString(format.m_MimeType)) )
+ if( !MimeData->hasFormat(wxQtConvertString(format.GetMimeType())) )
continue;
wxTextDataObject *textdata = dynamic_cast(&data);
@@ -152,7 +152,7 @@ bool wxClipboard::GetData( wxDataObject& data )
textdata->SetText(wxQtConvertString(MimeData->text()));
else
{
- QByteArray bytearray = MimeData->data( wxQtConvertString(format.m_MimeType) ).data();
+ QByteArray bytearray = MimeData->data( wxQtConvertString(format.GetMimeType()) ).data();
data.SetData(format, bytearray.size(), bytearray.constData());
}
@@ -170,7 +170,7 @@ void wxClipboard::Clear()
bool wxClipboard::IsSupported( const wxDataFormat& format )
{
const QMimeData *data = QtClipboard->mimeData( (QClipboard::Mode)Mode() );
- return data->hasFormat(wxQtConvertString(format.m_MimeType));
+ return data->hasFormat(wxQtConvertString(format.GetMimeType()));
}
bool wxClipboard::IsSupportedAsync(wxEvtHandler *sink)
diff --git a/src/qt/colordlg.cpp b/src/qt/colordlg.cpp
index 5781bd61c2..201bc1b33f 100644
--- a/src/qt/colordlg.cpp
+++ b/src/qt/colordlg.cpp
@@ -21,6 +21,8 @@ public:
{ }
};
+wxIMPLEMENT_DYNAMIC_CLASS(wxColourDialog,wxDialog)
+
bool wxColourDialog::Create(wxWindow *parent, wxColourData *data )
{
m_qtWindow = new wxQtColorDialog( parent, this );
@@ -43,9 +45,9 @@ wxColourData &wxColourDialog::GetColourData()
{
for (int i=0; icustomColor(i));
-
+
m_data.SetColour(GetQColorDialog()->currentColor());
-
+
return m_data;
}
diff --git a/src/qt/combobox.cpp b/src/qt/combobox.cpp
index 1080721625..9189d068fa 100644
--- a/src/qt/combobox.cpp
+++ b/src/qt/combobox.cpp
@@ -23,15 +23,38 @@ public:
virtual void showPopup() wxOVERRIDE;
virtual void hidePopup() wxOVERRIDE;
+ class IgnoreTextChange
+ {
+ public:
+ // Note that wxComboBox inherits its QComboBox pointer from wxChoice,
+ // where it can't be stored as wxQtComboBox, but its dynamic type is
+ // nevertheless always wxQtComboBox, so the cast below is safe.
+ explicit IgnoreTextChange(QComboBox *combo)
+ : m_combo(static_cast(combo))
+ {
+ m_combo->m_textChangeIgnored = true;
+ }
+
+ ~IgnoreTextChange()
+ {
+ m_combo->m_textChangeIgnored = false;
+ }
+
+ private:
+ wxQtComboBox* m_combo;
+ };
+
private:
void activated(int index);
void editTextChanged(const QString &text);
+
+ bool m_textChangeIgnored;
};
wxQtComboBox::wxQtComboBox( wxWindow *parent, wxComboBox *handler )
- : wxQtEventSignalHandler< QComboBox, wxComboBox >( parent, handler )
+ : wxQtEventSignalHandler< QComboBox, wxComboBox >( parent, handler ),
+ m_textChangeIgnored( false )
{
- setEditable( true );
connect(this, static_cast(&QComboBox::activated),
this, &wxQtComboBox::activated);
connect(this, &QComboBox::editTextChanged,
@@ -61,6 +84,9 @@ void wxQtComboBox::activated(int WXUNUSED(index))
void wxQtComboBox::editTextChanged(const QString &text)
{
+ if ( m_textChangeIgnored )
+ return;
+
wxComboBox *handler = GetHandler();
if ( handler )
{
@@ -70,6 +96,11 @@ void wxQtComboBox::editTextChanged(const QString &text)
}
}
+void wxComboBox::SetSelection( int n )
+{
+ wxQtComboBox::IgnoreTextChange ignore( m_qtComboBox );
+ wxChoice::SetSelection( n );
+}
wxComboBox::wxComboBox()
{
@@ -112,8 +143,9 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxValidator& validator,
const wxString& name )
{
- return Create( parent, id, value, pos, size, choices.size(), &choices[ 0 ],
- style, validator, name );
+ const wxString *pChoices = choices.size() ? &choices[ 0 ] : NULL;
+ return Create(parent, id, value, pos, size, choices.size(), pChoices,
+ style, validator, name );
}
@@ -127,6 +159,9 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxString& name )
{
m_qtComboBox = new wxQtComboBox( parent, this );
+ m_qtComboBox->setEditable(!(style & wxCB_READONLY));
+ QtInitSort( m_qtComboBox );
+
while ( n-- > 0 )
m_qtComboBox->addItem( wxQtConvertString( *choices++ ));
m_qtComboBox->setEditText( wxQtConvertString( value ));
@@ -134,12 +169,74 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
return QtCreateControl( parent, id, pos, size, style, validator, name );
}
+void wxComboBox::SetActualValue(const wxString &value)
+{
+ if ( IsReadOnly() )
+ {
+ SetStringSelection( value );
+ }
+ else
+ {
+ wxTextEntry::SetValue(value);
+ m_qtComboBox->setEditText( wxQtConvertString(value) );
+ }
+}
+
+bool wxComboBox::IsReadOnly() const
+{
+ return HasFlag( wxCB_READONLY );
+}
+
void wxComboBox::SetValue(const wxString& value)
{
- if ( HasFlag(wxCB_READONLY) )
- SetStringSelection(value);
+ SetActualValue( value );
+
+ if ( !IsReadOnly() )
+ SetInsertionPoint( 0 );
+}
+
+void wxComboBox::ChangeValue(const wxString &value)
+{
+ wxQtComboBox::IgnoreTextChange ignore( m_qtComboBox );
+ SetValue( value );
+}
+
+void wxComboBox::AppendText(const wxString &value)
+{
+ SetActualValue( GetValue() + value );
+}
+
+void wxComboBox::Replace(long from, long to, const wxString &value)
+{
+ const wxString original( GetValue() );
+
+ if ( to < 0 )
+ {
+ to = original.length();
+ }
+
+ if ( from == 0 )
+ {
+ SetActualValue( value + original.substr(to, original.length()) );
+ }
+
+ wxString front = original.substr( 0, from ) + value;
+
+ long iPoint = front.length();
+ if ( front.length() <= original.length() )
+ {
+ SetActualValue( front + original.substr(to, original.length()) );
+ }
else
- wxTextEntry::SetValue(value);
+ {
+ SetActualValue( front );
+ }
+ SetInsertionPoint( iPoint );
+}
+
+void wxComboBox::WriteText(const wxString &value)
+{
+ m_qtComboBox->lineEdit()->insert( wxQtConvertString( value ) );
}
wxString wxComboBox::DoGetValue() const
@@ -159,21 +256,48 @@ void wxComboBox::Dismiss()
void wxComboBox::Clear()
{
- wxTextEntry::Clear();
+ if ( !IsReadOnly() )
+ wxTextEntry::Clear();
+
wxItemContainer::Clear();
}
void wxComboBox::SetSelection( long from, long to )
{
- // SelectAll uses -1 to -1, adjust for qt:
- if (from == -1 && to == -1)
+ if ( from == -1 )
{
from = 0;
+ }
+ if ( to == -1 )
+ {
to = GetValue().length();
}
+
+ SetInsertionPoint( from );
// use the inner text entry widget (note that can be null if not editable)
if ( m_qtComboBox->lineEdit() != NULL )
- m_qtComboBox->lineEdit()->setSelection(from, to);
+ {
+ m_qtComboBox->lineEdit()->setSelection( from, to - from );
+ }
+}
+
+void wxComboBox::SetInsertionPoint( long pos )
+{
+ // check if pos indicates end of text:
+ if ( pos == -1 )
+ m_qtComboBox->lineEdit()->end( false );
+ else
+ m_qtComboBox->lineEdit()->setCursorPosition( pos );
+}
+
+long wxComboBox::GetInsertionPoint() const
+{
+ long selectionStart = m_qtComboBox->lineEdit()->selectionStart();
+
+ if ( selectionStart >= 0 )
+ return selectionStart;
+
+ return m_qtComboBox->lineEdit()->cursorPosition();
}
void wxComboBox::GetSelection(long* from, long* to) const
diff --git a/src/qt/control.cpp b/src/qt/control.cpp
index eacb2409a1..057619ab7a 100644
--- a/src/qt/control.cpp
+++ b/src/qt/control.cpp
@@ -58,9 +58,12 @@ bool wxControl::QtCreateControl( wxWindow *parent, wxWindowID id,
// Let Qt handle the background:
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
- PostCreation(false);
- return CreateControl( parent, id, pos, size, style, validator, name );
+ if (!CreateControl( parent, id, pos, size, style, validator, name ))
+ return false;
+
+ PostCreation(false);
+ return true;
}
wxSize wxControl::DoGetBestSize() const
diff --git a/src/qt/converter.cpp b/src/qt/converter.cpp
index fbc14a34c3..df4d69c99c 100644
--- a/src/qt/converter.cpp
+++ b/src/qt/converter.cpp
@@ -13,61 +13,14 @@
#pragma hdrstop
#endif
-#include
-#include
#include
-#include
#if wxUSE_DATETIME
#include "wx/datetime.h"
#include
#endif // wxUSE_DATETIME
-#include "wx/kbdstate.h"
-#include "wx/gdicmn.h"
-#include "wx/gdicmn.h"
-
-
-wxPoint wxQtConvertPoint( const QPoint &point )
-{
- if (point.isNull())
- return wxDefaultPosition;
-
- return wxPoint( point.x(), point.y() );
-}
-
-QPoint wxQtConvertPoint( const wxPoint &point )
-{
- if (point == wxDefaultPosition)
- return QPoint();
-
- return QPoint( point.x, point.y );
-}
-
-
-QRect wxQtConvertRect( const wxRect &rect )
-{
- return QRect( rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight() );
-}
-
-wxRect wxQtConvertRect( const QRect &rect )
-{
- return wxRect( rect.x(), rect.y(), rect.width(), rect.height() );
-}
-
-// TODO: Check whether QString::toStdString/QString::toStdWString might be faster
-
-wxString wxQtConvertString( const QString &str )
-{
- return wxString( str.toUtf8().data(), wxConvUTF8 );
-}
-
-QString wxQtConvertString( const wxString &str )
-{
- return QString( str.utf8_str() );
-}
-
-
+#include "wx/qt/private/converter.h"
#if wxUSE_DATETIME
@@ -92,22 +45,6 @@ QDate wxQtConvertDate(const wxDateTime& date)
#endif // wxUSE_DATETIME
-wxSize wxQtConvertSize( const QSize &size )
-{
- if (size.isNull())
- return wxDefaultSize;
-
- return wxSize(size.width(), size.height());
-}
-
-QSize wxQtConvertSize( const wxSize &size )
-{
- if (size == wxDefaultSize)
- return QSize();
-
- return QSize(size.GetWidth(), size.GetHeight());
-}
-
Qt::Orientation wxQtConvertOrientation( long style, wxOrientation defaultOrientation )
{
if (( style & ( wxHORIZONTAL | wxVERTICAL )) == 0 )
diff --git a/src/qt/cursor.cpp b/src/qt/cursor.cpp
index 880a2799fa..0acde39f70 100644
--- a/src/qt/cursor.cpp
+++ b/src/qt/cursor.cpp
@@ -108,7 +108,7 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
GetHandle() = QBitmap();
return;
}
-// case wxCURSOR_ARROW:
+// case wxCURSOR_ARROW:
case wxCURSOR_DEFAULT: qt_cur = Qt::ArrowCursor; break;
// case wxCURSOR_RIGHT_ARROW:
case wxCURSOR_HAND: qt_cur = Qt::OpenHandCursor; break;
@@ -129,7 +129,7 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
/* case wxCURSOR_PAINT_BRUSH:
case wxCURSOR_MAGNIFIER:
case wxCURSOR_CHAR:
- case wxCURSOR_LEFT_BUTTON:
+ case wxCURSOR_LEFT_BUTTON:
case wxCURSOR_MIDDLE_BUTTON:
case wxCURSOR_RIGHT_BUTTON:
case wxCURSOR_BULLSEYE:
@@ -154,7 +154,7 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
void wxCursor::InitFromImage( const wxImage & image )
{
AllocExclusive();
- GetHandle() = QCursor(*wxBitmap(image).GetHandle(),
+ GetHandle() = QCursor(*wxBitmap(image).GetHandle(),
image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ?
image.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X) : -1,
image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ?
diff --git a/src/qt/dataobj.cpp b/src/qt/dataobj.cpp
index 27108b1a46..f8ba76bcc2 100644
--- a/src/qt/dataobj.cpp
+++ b/src/qt/dataobj.cpp
@@ -12,19 +12,16 @@
#pragma hdrstop
#endif
-#include "wx/qt/private/converter.h"
-#include "wx/qt/private/utils.h"
#include "wx/dataobj.h"
+#include "wx/scopedarray.h"
-#include
-
-wxDataFormat::wxDataFormat()
+namespace
{
-}
-static wxString DataFormatIdToMimeType( wxDataFormatId formatId )
+wxString DataFormatIdToMimeType(wxDataFormatId formatId)
{
- switch(formatId) {
+ switch ( formatId )
+ {
case wxDF_TEXT: return "text/plain";
case wxDF_BITMAP: return "image/bmp";
case wxDF_TIFF: return "image/tiff";
@@ -45,139 +42,115 @@ static wxString DataFormatIdToMimeType( wxDataFormatId formatId )
case wxDF_PRIVATE:
case wxDF_INVALID:
case wxDF_MAX:
- break;
+ default:
+ return "";
}
- return "";
}
-wxDataFormat::wxDataFormat( wxDataFormatId formatId )
+} // anonymous namespace
+
+wxDataFormat::wxDataFormat(wxDataFormatId formatId)
{
- m_MimeType = DataFormatIdToMimeType(formatId);
+ SetType(formatId);
}
wxDataFormat::wxDataFormat(const wxString &id)
{
- m_MimeType = id;
+ SetId(id);
}
-wxDataFormat::wxDataFormat(const wxChar *id)
+const wxString& wxDataFormat::GetMimeType() const
{
- m_MimeType = id;
+ return m_mimeType;
}
-wxDataFormat::wxDataFormat(const QString &id)
+void wxDataFormat::SetMimeType(const wxString& mimeType)
{
- m_MimeType = wxQtConvertString(id);
+ m_mimeType = mimeType;
+ m_formatId = wxDF_INVALID;
}
-void wxDataFormat::SetId( const wxChar *id )
+void wxDataFormat::SetId(const wxString& id)
{
- m_MimeType = id;
+ SetMimeType(id);
}
-void wxDataFormat::SetId( const wxString& id )
+const wxString& wxDataFormat::GetId() const
{
- m_MimeType = id;
-}
-
-wxString wxDataFormat::GetId() const
-{
- return m_MimeType;
+ return m_mimeType;
}
wxDataFormatId wxDataFormat::GetType() const
{
- wxMISSING_IMPLEMENTATION( "wxDataFormat GetType" );
- return wxDataFormatId();
+ return m_formatId;
}
-void wxDataFormat::SetType( wxDataFormatId WXUNUSED(type) )
+void wxDataFormat::SetType(wxDataFormatId formatId)
{
- wxMISSING_IMPLEMENTATION( "wxDataFormat SetType" );
+ m_mimeType = DataFormatIdToMimeType(formatId);
+ m_formatId = formatId;
}
bool wxDataFormat::operator==(wxDataFormatId format) const
{
- return m_MimeType == DataFormatIdToMimeType(format);
+ return m_mimeType == DataFormatIdToMimeType(format)
+ && m_formatId == format;
}
bool wxDataFormat::operator!=(wxDataFormatId format) const
{
- return m_MimeType != DataFormatIdToMimeType(format);
+ return !operator==(format);
}
bool wxDataFormat::operator==(const wxDataFormat& format) const
{
- return m_MimeType == format.m_MimeType;
+ // If mime types match, then that's good enough.
+ // (Could be comparing a standard constructed format to a
+ // custom constructed one, where both are actually the same.)
+ if (!m_mimeType.empty() && m_mimeType == format.m_mimeType)
+ return true;
+
+ return m_mimeType == format.m_mimeType
+ && m_formatId == format.m_formatId;
}
bool wxDataFormat::operator!=(const wxDataFormat& format) const
{
- return m_MimeType != format.m_MimeType;
+ return !operator==(format);
}
-//#############################################################################
+//############################################################################
wxDataObject::wxDataObject()
{
- m_qtMimeData = new QMimeData;
}
wxDataObject::~wxDataObject()
{
- delete m_qtMimeData;
}
-bool wxDataObject::IsSupportedFormat(const wxDataFormat& format, Direction) const
+bool wxDataObject::IsSupportedFormat(const wxDataFormat& format,
+ Direction dir) const
{
- return wxDataFormat(format) != wxDF_INVALID;
-}
-wxDataFormat wxDataObject::GetPreferredFormat(Direction) const
-{
- /* formats are in order of preference */
- if (m_qtMimeData->formats().count())
- return m_qtMimeData->formats().first();
-
- return wxDataFormat();
-}
-
-size_t wxDataObject::GetFormatCount(Direction) const
-{
- return m_qtMimeData->formats().count();
-}
-
-void wxDataObject::GetAllFormats(wxDataFormat *formats, Direction) const
-{
- int i = 0;
- foreach (QString format, m_qtMimeData->formats())
+ const size_t formatCount = GetFormatCount(dir);
+ if ( formatCount == 1 )
{
- formats[i] = format;
- i++;
+ return format == GetPreferredFormat();
}
+
+ wxScopedArray formats(formatCount);
+ GetAllFormats(formats.get(), dir);
+
+ for ( size_t n = 0; n < formatCount; ++n )
+ {
+ if ( formats[n] == format )
+ return true;
+ }
+
+ return false;
}
-size_t wxDataObject::GetDataSize(const wxDataFormat& format) const
-{
- return m_qtMimeData->data( wxQtConvertString(format.m_MimeType) ).count();
-}
-
-bool wxDataObject::GetDataHere(const wxDataFormat& format, void *buf) const
-{
- if (!m_qtMimeData->hasFormat(wxQtConvertString(format.m_MimeType)))
- return false;
-
- QByteArray data = m_qtMimeData->data( wxQtConvertString(format.m_MimeType) ).data();
- memcpy(buf, data.constData(), data.size());
- return true;
-}
-
-bool wxDataObject::SetData(const wxDataFormat& format, size_t len, const void * buf)
-{
- QByteArray bytearray((const char*)buf, len);
- m_qtMimeData->setData(wxQtConvertString(format.m_MimeType), bytearray);
-
- return true;
-}
+//############################################################################
wxBitmapDataObject::wxBitmapDataObject()
{
@@ -187,10 +160,26 @@ wxBitmapDataObject::wxBitmapDataObject( const wxBitmap &WXUNUSED(bitmap) )
{
}
+//#############################################################################
+// ----------------------------------------------------------------------------
+// wxTextDataObject
+// ---------------------------------------------------------------------------
+
+#if wxUSE_UNICODE
+void wxTextDataObject::GetAllFormats(wxDataFormat *formats,
+ wxDataObjectBase::Direction WXUNUSED(dir)) const
+{
+ formats[0] = wxDataFormat(wxDF_UNICODETEXT);
+ formats[1] = wxDataFormat(wxDF_TEXT);
+}
+#endif
+
+//#############################################################################
+
wxFileDataObject::wxFileDataObject()
{
}
-
+
void wxFileDataObject::AddFile( const wxString &WXUNUSED(filename) )
{
diff --git a/src/qt/dc.cpp b/src/qt/dc.cpp
index 6fb5ed0e5a..5f1324abe9 100644
--- a/src/qt/dc.cpp
+++ b/src/qt/dc.cpp
@@ -43,11 +43,13 @@ static void SetBrushColour( QPainter *qtPainter, QColor col )
qtPainter->setBrush( b );
}
+wxIMPLEMENT_CLASS(wxQtDCImpl,wxDCImpl);
+
wxQtDCImpl::wxQtDCImpl( wxDC *owner )
: wxDCImpl( owner )
{
- m_clippingRegion = new wxRegion;
- m_qtImage = NULL;
+ m_qtPixmap = NULL;
+ m_qtPainter = NULL;
m_rasterColourOp = wxQtNONE;
m_qtPenColor = new QColor;
m_qtBrushColor = new QColor;
@@ -65,7 +67,6 @@ wxQtDCImpl::~wxQtDCImpl()
delete m_qtPainter;
}
- delete m_clippingRegion;
delete m_qtPenColor;
delete m_qtBrushColor;
}
@@ -85,7 +86,7 @@ void wxQtDCImpl::QtPreparePainter( )
if (m_clipping)
{
- wxRegionIterator ri(*m_clippingRegion);
+ wxRegionIterator ri(m_clippingRegion);
bool append = false;
while (ri.HaveRects())
{
@@ -93,7 +94,7 @@ void wxQtDCImpl::QtPreparePainter( )
m_qtPainter->setClipRect( r.x, r.y, r.width, r.height,
append ? Qt::IntersectClip : Qt::ReplaceClip );
append = true;
- ri++;
+ ++ri;
}
}
}
@@ -115,14 +116,50 @@ bool wxQtDCImpl::CanGetTextExtent() const
void wxQtDCImpl::DoGetSize(int *width, int *height) const
{
- if (width) *width = m_qtPainter->device()->width();
- if (height) *height = m_qtPainter->device()->height();
+ QPaintDevice *pDevice = m_qtPainter->device();
+
+ int deviceWidth;
+ int deviceHeight;
+
+ if ( pDevice )
+ {
+ deviceWidth = pDevice->width();
+ deviceHeight = pDevice->height();
+ }
+ else
+ {
+ deviceWidth = 0;
+ deviceHeight = 0;
+
+ }
+ if ( width )
+ *width = deviceWidth;
+ if ( height )
+ *height = deviceHeight;
}
void wxQtDCImpl::DoGetSizeMM(int* width, int* height) const
{
- if (width) *width = m_qtPainter->device()->widthMM();
- if (height) *height = m_qtPainter->device()->heightMM();
+ QPaintDevice *pDevice = m_qtPainter->device();
+
+ int deviceWidthMM;
+ int deviceHeightMM;
+
+ if ( pDevice )
+ {
+ deviceWidthMM = pDevice->widthMM();
+ deviceHeightMM = pDevice->heightMM();
+ }
+ else
+ {
+ deviceWidthMM = 0;
+ deviceHeightMM = 0;
+ }
+
+ if ( width )
+ *width = deviceWidthMM;
+ if ( height )
+ *height = deviceHeightMM;
}
int wxQtDCImpl::GetDepth() const
@@ -220,7 +257,7 @@ void wxQtDCImpl::SetLogicalFunction(wxRasterOperationMode function)
{
m_logicalFunction = function;
- wxQtRasterColourOp rasterColourOp;
+ wxQtRasterColourOp rasterColourOp = wxQtNONE;
switch ( function )
{
case wxCLEAR: // 0
@@ -229,7 +266,6 @@ void wxQtDCImpl::SetLogicalFunction(wxRasterOperationMode function)
break;
case wxXOR: // src XOR dst
m_qtPainter->setCompositionMode( QPainter::RasterOp_SourceXorDestination );
- rasterColourOp = wxQtNONE;
break;
case wxINVERT: // NOT dst => dst XOR WHITE
m_qtPainter->setCompositionMode( QPainter::RasterOp_SourceXorDestination );
@@ -241,35 +277,27 @@ void wxQtDCImpl::SetLogicalFunction(wxRasterOperationMode function)
break;
case wxAND_REVERSE: // src AND (NOT dst)
m_qtPainter->setCompositionMode( QPainter::RasterOp_SourceAndNotDestination );
- rasterColourOp = wxQtNONE;
break;
case wxCOPY: // src
m_qtPainter->setCompositionMode( QPainter::CompositionMode_SourceOver );
- rasterColourOp = wxQtNONE;
break;
case wxAND: // src AND dst
m_qtPainter->setCompositionMode( QPainter::RasterOp_SourceAndDestination );
- rasterColourOp = wxQtNONE;
break;
case wxAND_INVERT: // (NOT src) AND dst
m_qtPainter->setCompositionMode( QPainter::RasterOp_NotSourceAndDestination );
- rasterColourOp = wxQtNONE;
break;
case wxNO_OP: // dst
- m_qtPainter->setCompositionMode( QPainter::QPainter::CompositionMode_DestinationOver );
- rasterColourOp = wxQtNONE;
+ m_qtPainter->setCompositionMode( QPainter::CompositionMode_DestinationOver );
break;
case wxNOR: // (NOT src) AND (NOT dst)
m_qtPainter->setCompositionMode( QPainter::RasterOp_NotSourceAndNotDestination );
- rasterColourOp = wxQtNONE;
break;
case wxEQUIV: // (NOT src) XOR dst
m_qtPainter->setCompositionMode( QPainter::RasterOp_NotSourceXorDestination );
- rasterColourOp = wxQtNONE;
break;
case wxSRC_INVERT: // (NOT src)
m_qtPainter->setCompositionMode( QPainter::RasterOp_NotSource );
- rasterColourOp = wxQtNONE;
break;
case wxOR_INVERT: // (NOT src) OR dst
m_qtPainter->setCompositionMode( QPainter::RasterOp_SourceOrDestination );
@@ -277,11 +305,9 @@ void wxQtDCImpl::SetLogicalFunction(wxRasterOperationMode function)
break;
case wxNAND: // (NOT src) OR (NOT dst)
m_qtPainter->setCompositionMode( QPainter::RasterOp_NotSourceOrNotDestination );
- rasterColourOp = wxQtNONE;
break;
case wxOR: // src OR dst
m_qtPainter->setCompositionMode( QPainter::RasterOp_SourceOrDestination );
- rasterColourOp = wxQtNONE;
break;
case wxSET: // 1
m_qtPainter->setCompositionMode( QPainter::CompositionMode_SourceOver );
@@ -389,6 +415,17 @@ void wxQtDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y,
}
else
{
+ if ( width < 0 )
+ {
+ width = -width;
+ x -= width - 1;
+ }
+ if ( height < 0 )
+ {
+ height = -height;
+ y -= height - 1;
+ }
+
if (m_qtPainter->isActive())
{
// Set QPainter clipping (intersection if not the first one)
@@ -399,17 +436,21 @@ void wxQtDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y,
// Set internal state for getters
/* Note: Qt states that QPainter::clipRegion() may be slow, so we
* keep the region manually, which should be faster */
- if ( m_clipping )
- m_clippingRegion->Union( wxRect( x, y, width, height ) );
- else
- m_clippingRegion->Intersect( wxRect( x, y, width, height ) );
+ if ( !m_clipping || m_clippingRegion.IsEmpty() )
+ {
+ int dcwidth, dcheight;
+ DoGetSize(&dcwidth, &dcheight);
- wxRect clipRect = m_clippingRegion->GetBox();
+ m_clippingRegion = wxRegion(0, 0, dcwidth, dcheight);
+ }
+ m_clippingRegion.Intersect( wxRect(x, y, width, height) );
+
+ wxRect clipRect = m_clippingRegion.GetBox();
m_clipX1 = clipRect.GetLeft();
- m_clipX2 = clipRect.GetRight();
+ m_clipX2 = clipRect.GetRight() + 1;
m_clipY1 = clipRect.GetTop();
- m_clipY2 = clipRect.GetBottom();
+ m_clipY2 = clipRect.GetBottom() + 1;
m_clipping = true;
}
}
@@ -438,16 +479,16 @@ void wxQtDCImpl::DoSetDeviceClippingRegion(const wxRegion& region)
/* Note: Qt states that QPainter::clipRegion() may be slow, so we
* keep the region manually, which should be faster */
if ( m_clipping )
- m_clippingRegion->Union( region );
+ m_clippingRegion.Union( region );
else
- m_clippingRegion->Intersect( region );
+ m_clippingRegion.Intersect( region );
- wxRect clipRect = m_clippingRegion->GetBox();
+ wxRect clipRect = m_clippingRegion.GetBox();
m_clipX1 = clipRect.GetLeft();
- m_clipX2 = clipRect.GetRight();
+ m_clipX2 = clipRect.GetRight() + 1;
m_clipY1 = clipRect.GetTop();
- m_clipY2 = clipRect.GetBottom();
+ m_clipY2 = clipRect.GetBottom() + 1;
m_clipping = true;
}
}
@@ -455,7 +496,7 @@ void wxQtDCImpl::DoSetDeviceClippingRegion(const wxRegion& region)
void wxQtDCImpl::DestroyClippingRegion()
{
wxDCImpl::DestroyClippingRegion();
- m_clippingRegion->Clear();
+ m_clippingRegion.Clear();
if (m_qtPainter->isActive())
m_qtPainter->setClipping( false );
@@ -485,15 +526,18 @@ bool wxQtDCImpl::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
if ( col )
{
- wxCHECK_MSG( m_qtImage != NULL, false, "This DC doesn't support GetPixel()" );
-
- QColor pixel = m_qtImage->pixel( x, y );
+ wxCHECK_MSG( m_qtPixmap != NULL, false, "This DC doesn't support GetPixel()" );
+ QPixmap pixmap1px = m_qtPixmap->copy( x, y, 1, 1 );
+ QImage image = pixmap1px.toImage();
+ QColor pixel = image.pixel( 0, 0 );
col->Set( pixel.red(), pixel.green(), pixel.blue(), pixel.alpha() );
return true;
}
else
+ {
return false;
+ }
}
void wxQtDCImpl::DoDrawPoint(wxCoord x, wxCoord y)
@@ -585,29 +629,13 @@ void wxQtDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y,
void wxQtDCImpl::DoDrawEllipse(wxCoord x, wxCoord y,
wxCoord width, wxCoord height)
{
- QBrush savedBrush;
- int penWidth = m_qtPainter->pen().width();
+ const int penWidth = m_qtPainter->pen().width();
x += penWidth / 2;
y += penWidth / 2;
width -= penWidth;
height -= penWidth;
- if ( m_pen.IsNonTransparent() )
- {
- // Save pen/brush
- savedBrush = m_qtPainter->brush();
- // Fill with text background color ("no fill" like in wxGTK):
- m_qtPainter->setBrush(QBrush(m_textBackgroundColour.GetQColor()));
- }
-
- // Draw
m_qtPainter->drawEllipse( x, y, width, height );
-
- if ( m_pen.IsNonTransparent() )
- {
- //Restore saved settings
- m_qtPainter->setBrush(savedBrush);
- }
}
void wxQtDCImpl::DoCrossHair(wxCoord x, wxCoord y)
@@ -750,23 +778,31 @@ bool wxQtDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
{
wxQtDCImpl *implSource = (wxQtDCImpl*)source->GetImpl();
- QImage *qtSource = implSource->GetQImage();
+ QPixmap *qtSource = implSource->GetQPixmap();
// Not a CHECK on purpose
if ( !qtSource )
return false;
- QImage qtSourceConverted = *qtSource;
- if ( !useMask )
- qtSourceConverted = qtSourceConverted.convertToFormat( QImage::Format_RGB32 );
-
// Change logical function
wxRasterOperationMode savedMode = GetLogicalFunction();
SetLogicalFunction( rop );
- m_qtPainter->drawImage( QRect( xdest, ydest, width, height ),
- qtSourceConverted,
- QRect( xsrc, ysrc, width, height ) );
+ if ( useMask )
+ {
+ m_qtPainter->drawPixmap( QRect( xdest, ydest, width, height ),
+ *qtSource,
+ QRect( xsrc, ysrc, width, height ) );
+ }
+ else
+ {
+ QImage qtSourceConverted = qtSource->toImage();
+ qtSourceConverted = qtSourceConverted.convertToFormat(QImage::Format_RGB32);
+
+ m_qtPainter->drawImage( QRect( xdest, ydest, width, height ),
+ qtSourceConverted,
+ QRect( xsrc, ysrc, width, height ) );
+ }
SetLogicalFunction( savedMode );
diff --git a/src/qt/dcclient.cpp b/src/qt/dcclient.cpp
index 696b69e2d4..6ce6a4ff2e 100644
--- a/src/qt/dcclient.cpp
+++ b/src/qt/dcclient.cpp
@@ -27,11 +27,36 @@
//##############################################################################
+namespace
+{
+class QtPictureSetter
+{
+public:
+ QtPictureSetter(wxWindow *window, QPicture *pict)
+ : m_window( window )
+ {
+ m_window->QtSetPicture( pict );
+ }
+
+ ~QtPictureSetter()
+ {
+ m_window->QtSetPicture( NULL );
+ }
+
+private:
+ wxWindow* const m_window;
+
+ wxDECLARE_NO_COPY_CLASS(QtPictureSetter);
+};
+}
+
+
+wxIMPLEMENT_CLASS(wxWindowDCImpl,wxQtDCImpl);
+
wxWindowDCImpl::wxWindowDCImpl( wxDC *owner )
: wxQtDCImpl( owner )
{
m_window = NULL;
- m_qtImage = NULL;
m_ok = false;
m_qtPainter = new QPainter();
}
@@ -40,7 +65,6 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *win )
: wxQtDCImpl( owner )
{
m_window = win;
- m_qtImage = NULL;
m_qtPainter = m_window->QtGetPainter();
// if we're not inside a Paint event, painter will invalid
m_ok = m_qtPainter != NULL;
@@ -54,18 +78,18 @@ wxWindowDCImpl::~wxWindowDCImpl()
}
if ( m_window )
{
- // do not destroy as it is owned by the window
+ // do not destroy in base class as it is owned by the window
m_qtPainter = NULL;
}
}
//##############################################################################
+wxIMPLEMENT_CLASS(wxClientDCImpl,wxWindowDCImpl);
wxClientDCImpl::wxClientDCImpl( wxDC *owner )
: wxWindowDCImpl( owner )
{
- m_window = NULL;
}
wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *win )
@@ -73,8 +97,9 @@ wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *win )
{
m_window = win;
- QPicture *pic = win->QtGetPicture();
- m_ok = m_qtPainter->begin( pic );
+ m_pict.reset(new QPicture());
+ m_ok = m_qtPainter->begin( m_pict.get() );
+
QtPreparePainter();
}
@@ -87,10 +112,11 @@ wxClientDCImpl::~wxClientDCImpl()
{
m_qtPainter->end();
m_ok = false;
- QPicture *pict = m_window->QtGetPicture();
if ( m_window != NULL )
{
+ QtPictureSetter pictureSetter(m_window, m_pict.get());
+
// get the inner widget in scroll areas:
QWidget *widget;
if ( m_window->QtGetScrollBarsContainer() )
@@ -101,25 +127,30 @@ wxClientDCImpl::~wxClientDCImpl()
}
// force paint event if there is something to replay and
// if not currently inside a paint event (to avoid recursion)
- QRect rect = pict->boundingRect();
- if ( !pict->isNull() && !widget->paintingActive() && !rect.isEmpty() )
+ QRect rect = m_pict->boundingRect();
+ if ( !m_pict->isNull() && !widget->paintingActive() && !rect.isEmpty() )
{
// only force the update of the rect affected by the DC
- widget->repaint( rect );
+ widget->update( rect );
}
else
{
// Not drawing anything, reset picture to avoid issues in handler
- pict->setData( NULL, 0 );
+ m_pict->setData( NULL, 0 );
}
+
// let destroy the m_qtPainter (see inherited classes destructors)
m_window = NULL;
}
}
+
+ // Painter will be deleted by base class
}
//##############################################################################
+wxIMPLEMENT_CLASS(wxPaintDCImpl,wxClientDCImpl);
+
wxPaintDCImpl::wxPaintDCImpl( wxDC *owner )
: wxWindowDCImpl( owner )
{
diff --git a/src/qt/dcmemory.cpp b/src/qt/dcmemory.cpp
index 3f85c3e3db..ab06f32cdd 100644
--- a/src/qt/dcmemory.cpp
+++ b/src/qt/dcmemory.cpp
@@ -13,10 +13,11 @@
#include
+wxIMPLEMENT_CLASS(wxMemoryDCImpl,wxQtDCImpl);
+
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
: wxQtDCImpl( owner )
{
- m_qtImage = NULL;
m_ok = false;
m_qtPainter = new QPainter();
}
@@ -24,7 +25,6 @@ wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap )
: wxQtDCImpl( owner )
{
- m_qtImage = NULL;
m_ok = false;
m_qtPainter = new QPainter();
DoSelect( bitmap );
@@ -33,7 +33,6 @@ wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap )
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *WXUNUSED(dc) )
: wxQtDCImpl( owner )
{
- m_qtImage = NULL;
m_ok = false;
m_qtPainter = new QPainter();
}
@@ -50,34 +49,21 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
{
// Finish the painting in the intermediate image device:
m_qtPainter->end();
-
- if (m_selected.IsOk() && !m_selected.GetHandle()->isNull())
- {
- // Copy intermediate image to the bitmap
- m_qtPainter->begin( m_selected.GetHandle() );
- m_qtPainter->drawImage( QPoint( 0, 0 ), *m_qtImage );
- m_qtPainter->end();
- }
m_ok = false;
}
// clean up the intermediate image device:
- if ( m_qtImage )
- {
- delete m_qtImage;
- m_qtImage = NULL;
- }
-
m_selected = bitmap;
- if ( bitmap.IsOk() && !bitmap.GetHandle()->isNull() ) {
- QPixmap pixmap(*bitmap.GetHandle());
- // apply mask before converting to image
- if ( bitmap.GetMask() && bitmap.GetMask()->GetHandle() )
- pixmap.setMask(*bitmap.GetMask()->GetHandle());
- // create the intermediate image for the pixmap:
- m_qtImage = new QImage( pixmap.toImage() );
+ m_qtPixmap = bitmap.GetHandle();
+ if ( bitmap.IsOk() && !m_qtPixmap->isNull() )
+ {
+ // apply mask before drawing
+ wxMask *mask = bitmap.GetMask();
+ if ( mask && mask->GetHandle() )
+ m_qtPixmap->setMask(*mask->GetHandle());
+
// start drawing on the intermediary device:
- m_ok = m_qtPainter->begin( m_qtImage );
+ m_ok = m_qtPainter->begin( m_qtPixmap );
SetPen(m_pen);
SetBrush(m_brush);
diff --git a/src/qt/dcprint.cpp b/src/qt/dcprint.cpp
index 11a3d59d48..74e4dceae0 100644
--- a/src/qt/dcprint.cpp
+++ b/src/qt/dcprint.cpp
@@ -11,6 +11,8 @@
#include "wx/dcprint.h"
#include "wx/qt/dcprint.h"
+wxIMPLEMENT_CLASS(wxPrinterDCImpl,wxDCImpl)
+
wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData & )
: wxDCImpl( owner )
{
diff --git a/src/qt/dcscreen.cpp b/src/qt/dcscreen.cpp
index b42445ea3a..1f08768ec0 100644
--- a/src/qt/dcscreen.cpp
+++ b/src/qt/dcscreen.cpp
@@ -16,17 +16,16 @@
#include
#include
-wxIMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl);
+wxIMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxQtDCImpl);
wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner )
: wxWindowDCImpl( owner )
{
- m_qtImage = NULL;
}
wxScreenDCImpl::~wxScreenDCImpl( )
{
- delete m_qtImage;
+ delete m_qtPixmap;
}
void wxScreenDCImpl::DoGetSize(int *width, int *height) const
@@ -34,19 +33,10 @@ void wxScreenDCImpl::DoGetSize(int *width, int *height) const
wxDisplaySize(width, height);
}
-bool wxScreenDCImpl::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
-{
-// const_cast(this)->GetQImage();
-// return wxQtDCImpl::DoGetPixel(x, y, col);
- x = y = 0;
- col = 0;
- return false;
-}
-
// defered allocation for blit
-QImage *wxScreenDCImpl::GetQImage()
+QPixmap *wxScreenDCImpl::GetQPixmap()
{
- if ( !m_qtImage )
- m_qtImage = new QImage(QApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId()).toImage());
- return m_qtImage;
+ if ( !m_qtPixmap )
+ m_qtPixmap = new QPixmap(QApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId()));
+ return m_qtPixmap;
}
diff --git a/src/qt/dialog.cpp b/src/qt/dialog.cpp
index 6c99788e2e..f19fd41f63 100644
--- a/src/qt/dialog.cpp
+++ b/src/qt/dialog.cpp
@@ -8,6 +8,7 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/modalhook.h"
#include "wx/dialog.h"
#include "wx/qt/private/utils.h"
#include "wx/qt/private/winevent.h"
@@ -59,17 +60,26 @@ bool wxDialog::Create( wxWindow *parent, wxWindowID id,
style |= wxTAB_TRAVERSAL;
m_qtWindow = new wxQtDialog( parent, this );
-
+
+ if ( !wxTopLevelWindow::Create( parent, id, title, pos, size, style, name ) )
+ return false;
+
PostCreation();
- return wxTopLevelWindow::Create( parent, id, title, pos, size, style, name );
+ return true;
}
int wxDialog::ShowModal()
{
+ WX_HOOK_MODAL_DIALOG();
wxCHECK_MSG( GetHandle() != NULL, -1, "Invalid dialog" );
- bool ret = GetDialogHandle()->exec();
+ QDialog *qDialog = GetDialogHandle();
+ qDialog->setModal(true);
+
+ Show(true);
+
+ bool ret = qDialog->exec();
if ( GetReturnCode() == 0 )
return ret ? wxID_OK : wxID_CANCEL;
return GetReturnCode();
@@ -90,6 +100,25 @@ bool wxDialog::IsModal() const
return GetDialogHandle()->isModal();
}
+bool wxDialog::Show(bool show)
+{
+ if ( show == IsShown() )
+ return false;
+
+ if ( !show && IsModal() )
+ EndModal(wxID_CANCEL);
+
+ if ( show && CanDoLayoutAdaptation() )
+ DoLayoutAdaptation();
+
+ const bool ret = wxDialogBase::Show(show);
+
+ if (show)
+ InitDialog();
+
+ return ret;
+}
+
QDialog *wxDialog::GetDialogHandle() const
{
return static_cast(m_qtWindow);
diff --git a/src/qt/dnd.cpp b/src/qt/dnd.cpp
index 7e99e94ec2..4e5af17028 100644
--- a/src/qt/dnd.cpp
+++ b/src/qt/dnd.cpp
@@ -11,53 +11,380 @@
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
+#include "wx/scopedarray.h"
+#include "wx/window.h"
-wxDropTarget::wxDropTarget(wxDataObject *WXUNUSED(dataObject))
+#include "wx/qt/private/converter.h"
+
+#include
+#include
+#include
+#include
+
+namespace
{
+
+wxDragResult DropActionToDragResult(Qt::DropAction action)
+{
+ switch ( action )
+ {
+ case Qt::IgnoreAction:
+ return wxDragCancel;
+ case Qt::CopyAction:
+ return wxDragCopy;
+ case Qt::MoveAction:
+ case Qt::TargetMoveAction:
+ return wxDragMove;
+ case Qt::LinkAction:
+ return wxDragLink;
+ }
+
+ wxFAIL_MSG("Illegal drop action");
+ return wxDragNone;
+}
+
+Qt::DropAction DragResultToDropAction(wxDragResult result)
+{
+ switch ( result )
+ {
+ case wxDragCopy:
+ return Qt::CopyAction;
+ case wxDragMove:
+ return Qt::MoveAction;
+ case wxDragLink:
+ return Qt::LinkAction;
+ case wxDragError:
+ case wxDragNone:
+ case wxDragCancel:
+ return Qt::IgnoreAction;
+ }
+
+ wxFAIL_MSG("Illegal drag result");
+ return Qt::IgnoreAction;
+}
+
+void AddDataFormat(wxDataObject* dataObject,
+ QMimeData* mimeData,
+ const wxDataFormat& format)
+{
+ const size_t data_size = dataObject->GetDataSize(format);
+
+ QByteArray data(static_cast(data_size), Qt::Initialization());
+ dataObject->GetDataHere(format, data.data());
+
+ mimeData->setData(wxQtConvertString(format.GetMimeType()), data);
+}
+
+QMimeData* CreateMimeData(wxDataObject* dataObject)
+{
+ QMimeData* mimeData = new QMimeData();
+
+ const size_t count = dataObject->GetFormatCount();
+
+ wxScopedArray array(dataObject->GetFormatCount());
+ dataObject->GetAllFormats(array.get());
+
+ for ( size_t i = 0; i < count; i++ )
+ {
+ AddDataFormat(dataObject, mimeData, array[i]);
+ }
+
+ return mimeData;
+}
+
+void SetDragCursor(QDrag& drag,
+ const wxCursor& cursor,
+ Qt::DropAction action)
+{
+ if ( cursor.IsOk() )
+ drag.setDragCursor(cursor.GetHandle().pixmap(), action);
+}
+
+class PendingMimeDataSetter
+{
+public:
+ PendingMimeDataSetter(const QMimeData*& targetMimeData,
+ const QMimeData* mimeData)
+ : m_targetMimeData(targetMimeData)
+ {
+ m_targetMimeData = mimeData;
+ }
+
+ ~PendingMimeDataSetter()
+ {
+ m_targetMimeData = NULL;
+ }
+
+private:
+ const QMimeData*& m_targetMimeData;
+};
+
+} // anonymous namespace
+
+class wxDropTarget::Impl : public QObject
+{
+public:
+ explicit Impl(wxDropTarget* dropTarget)
+ : m_dropTarget(dropTarget),
+ m_widget(NULL),
+ m_pendingMimeData(NULL)
+ {
+ }
+
+ ~Impl()
+ {
+ Disconnect();
+ }
+
+ void ConnectTo(QWidget* widget)
+ {
+ Disconnect();
+
+ m_widget = widget;
+
+ if ( m_widget != NULL )
+ {
+ m_widget->setAcceptDrops(true);
+ m_widget->installEventFilter(this);
+ }
+ }
+
+ void Disconnect()
+ {
+ if ( m_widget != NULL )
+ {
+ m_widget->setAcceptDrops(false);
+ m_widget->removeEventFilter(this);
+ m_widget = NULL;
+ }
+ }
+
+ virtual bool eventFilter(QObject* watched, QEvent* event) wxOVERRIDE
+ {
+ if ( m_dropTarget != NULL )
+ {
+ switch ( event->type() )
+ {
+ case QEvent::Drop:
+ OnDrop(event);
+ return true;
+
+ case QEvent::DragEnter:
+ OnEnter(event);
+ return true;
+
+ case QEvent::DragMove:
+ OnMove(event);
+ return true;
+
+ case QEvent::DragLeave:
+ OnLeave(event);
+ return true;
+
+ default:
+ break;
+ }
+ }
+
+ return QObject::eventFilter(watched, event);
+ }
+
+ void OnEnter(QEvent* event)
+ {
+ QDragEnterEvent *e = static_cast(event);
+
+ const PendingMimeDataSetter setter(m_pendingMimeData, e->mimeData());
+
+ if ( !CanDropHere() )
+ {
+ e->setDropAction(Qt::IgnoreAction);
+ return;
+ }
+
+ event->accept();
+
+ const QPoint where = e->pos();
+ const wxDragResult proposedResult =
+ DropActionToDragResult(e->proposedAction());
+ const wxDragResult result = m_dropTarget->OnEnter(where.x(),
+ where.y(),
+ proposedResult);
+
+ e->setDropAction(DragResultToDropAction(result));
+ }
+
+ void OnLeave(QEvent* event)
+ {
+ event->accept();
+ m_dropTarget->OnLeave();
+ }
+
+ void OnMove(QEvent* event)
+ {
+ event->accept();
+
+ QDragMoveEvent *e = static_cast(event);
+
+ const PendingMimeDataSetter setter(m_pendingMimeData, e->mimeData());
+
+ const QPoint where = e->pos();
+ const wxDragResult proposedResult =
+ DropActionToDragResult(e->proposedAction());
+ const wxDragResult result = m_dropTarget->OnDragOver(where.x(),
+ where.y(),
+ proposedResult);
+
+ e->setDropAction(DragResultToDropAction(result));
+ }
+
+ void OnDrop(QEvent* event)
+ {
+ event->accept();
+
+ const QDropEvent *e = static_cast(event);
+
+ const PendingMimeDataSetter setter(m_pendingMimeData, e->mimeData());
+
+ const QPoint where = e->pos();
+ if ( m_dropTarget->OnDrop(where.x(), where.y()) )
+ {
+ m_dropTarget->OnData(where.x(),
+ where.y(),
+ DropActionToDragResult(e->dropAction()));
+ }
+ }
+
+ const QMimeData* GetMimeData() const
+ {
+ return m_pendingMimeData;
+ }
+
+private:
+
+ bool CanDropHere() const
+ {
+ return !m_dropTarget->GetMatchingPair().GetMimeType().empty();
+ }
+
+ wxDropTarget* m_dropTarget;
+ QWidget* m_widget;
+ const QMimeData* m_pendingMimeData;
+};
+
+wxDropTarget::wxDropTarget(wxDataObject *dataObject)
+ : wxDropTargetBase(dataObject),
+ m_pImpl(new Impl(this))
+{
+}
+
+wxDropTarget::~wxDropTarget()
+{
+ delete m_pImpl;
}
bool wxDropTarget::OnDrop(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
{
- return false;
+ return true;
}
-wxDragResult wxDropTarget::OnData(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult WXUNUSED(def))
+wxDragResult wxDropTarget::OnData(wxCoord WXUNUSED(x),
+ wxCoord WXUNUSED(y),
+ wxDragResult def)
{
- return wxDragResult();
+ return GetData() ? def : wxDragNone;
}
bool wxDropTarget::GetData()
{
- return false;
+ const wxDataFormat droppedFormat = GetMatchingPair();
+
+ const wxString& mimeType = droppedFormat.GetMimeType();
+ if ( mimeType.empty() )
+ return false;
+
+ const QString qMimeType = wxQtConvertString(mimeType);
+ const QByteArray data = m_pImpl->GetMimeData()->data(qMimeType);
+
+ return m_dataObject->SetData(droppedFormat, data.size(), data.data());
}
wxDataFormat wxDropTarget::GetMatchingPair()
{
- wxFAIL_MSG("wxDropTarget::GetMatchingPair() not implemented in src/qt/dnd.cpp");
- return wxDF_INVALID;
+ const QMimeData* mimeData = m_pImpl->GetMimeData();
+ if ( mimeData == NULL || m_dataObject == NULL )
+ return wxFormatInvalid;
+
+ const QStringList formats = mimeData->formats();
+ for ( int i = 0; i < formats.count(); ++i )
+ {
+ const wxDataFormat format(wxQtConvertString(formats[i]));
+
+ if ( m_dataObject->IsSupportedFormat(format) )
+ {
+ return format;
+ }
+ }
+ return wxFormatInvalid;
}
-//##############################################################################
+void wxDropTarget::ConnectTo(QWidget* widget)
+{
+ m_pImpl->ConnectTo(widget);
+}
+void wxDropTarget::Disconnect()
+{
+ m_pImpl->Disconnect();
+}
-wxDropSource::wxDropSource( wxWindow *WXUNUSED(win),
- const wxIcon &WXUNUSED(copy),
- const wxIcon &WXUNUSED(move),
- const wxIcon &WXUNUSED(none))
+//###########################################################################
+
+wxDropSource::wxDropSource(wxWindow *win,
+ const wxCursor ©,
+ const wxCursor &move,
+ const wxCursor &none)
+ : wxDropSourceBase(copy, move, none),
+ m_parentWindow(win)
{
}
-wxDropSource::wxDropSource( wxDataObject& WXUNUSED(data),
- wxWindow *WXUNUSED(win),
- const wxIcon &WXUNUSED(copy),
- const wxIcon &WXUNUSED(move),
- const wxIcon &WXUNUSED(none))
+wxDropSource::wxDropSource(wxDataObject& data,
+ wxWindow *win,
+ const wxCursor ©,
+ const wxCursor &move,
+ const wxCursor &none)
+ : wxDropSourceBase(copy, move, none),
+ m_parentWindow(win)
{
+ SetData(data);
}
-wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags))
+wxDragResult wxDropSource::DoDragDrop(int flags /*=wxDrag_CopyOnly*/)
{
- return wxDragResult();
+ wxCHECK_MSG(m_data != NULL, wxDragNone,
+ wxT("No data in wxDropSource!"));
+
+ wxCHECK_MSG(m_parentWindow != NULL, wxDragNone,
+ wxT("NULL parent window in wxDropSource!"));
+
+ QDrag drag(m_parentWindow->GetHandle());
+ drag.setMimeData(CreateMimeData(m_data));
+
+ SetDragCursor(drag, m_cursorCopy, Qt::CopyAction);
+ SetDragCursor(drag, m_cursorMove, Qt::MoveAction);
+ SetDragCursor(drag, m_cursorStop, Qt::IgnoreAction);
+
+ const Qt::DropActions actions =
+ flags == wxDrag_CopyOnly
+ ? Qt::CopyAction
+ : Qt::CopyAction | Qt::MoveAction;
+
+ const Qt::DropAction defaultAction =
+ flags == wxDrag_DefaultMove
+ ? Qt::MoveAction
+ : Qt::CopyAction;
+
+ return DropActionToDragResult(drag.exec(actions, defaultAction));
}
#endif // wxUSE_DRAG_AND_DROP
diff --git a/src/qt/evtloop.cpp b/src/qt/evtloop.cpp
index 2cb13ba0f6..0f88c0f4ad 100644
--- a/src/qt/evtloop.cpp
+++ b/src/qt/evtloop.cpp
@@ -17,37 +17,52 @@
#include
#include
#include
+#include
#include
-class wxQtIdleTimer : public QTimer
+class wxQtIdleTimer : public QTimer, public wxRefCounter
{
public:
- wxQtIdleTimer( wxQtEventLoopBase *eventLoop );
+ wxQtIdleTimer();
+ ~wxQtIdleTimer();
virtual bool eventFilter( QObject * watched, QEvent * event );
private:
void idle();
-
-private:
- wxQtEventLoopBase *m_eventLoop;
+ void ScheduleIdleCheck();
};
-wxQtIdleTimer::wxQtIdleTimer( wxQtEventLoopBase *eventLoop )
+wxQtIdleTimer::wxQtIdleTimer()
{
- m_eventLoop = eventLoop;
+ // We need a QCoreApplication for event loops, create it here if it doesn't
+ // already exist as we can't modify wxAppConsole
+ if ( !QCoreApplication::instance() )
+ {
+ new QApplication(wxAppConsole::GetInstance()->argc, wxAppConsole::GetInstance()->argv);
+ }
- connect( this, &QTimer::timeout, this, &wxQtIdleTimer::idle );
- setSingleShot( true );
- start( 0 );
+
+ // Pass all events to the idle timer, so it can be restarted each time
+ // an event is received
+ qApp->installEventFilter(this);
+
+ connect(this, &QTimer::timeout, this, &wxQtIdleTimer::idle);
+ setSingleShot(true);
+}
+
+
+wxQtIdleTimer::~wxQtIdleTimer()
+{
+ qApp->removeEventFilter(this);
}
bool wxQtIdleTimer::eventFilter( QObject *WXUNUSED( watched ), QEvent *WXUNUSED( event ) )
{
// Called for each Qt event, start with timeout 0 (run as soon as idle)
if ( !isActive() )
- start( 0 );
+ ScheduleIdleCheck();
return false; // Continue handling the event
}
@@ -57,76 +72,73 @@ void wxQtIdleTimer::idle()
// Process pending events
if ( wxTheApp )
wxTheApp->ProcessPendingEvents();
-
+
// Send idle event
- if ( m_eventLoop->ProcessIdle() )
- start( 0 );
+ if (wxTheApp->ProcessIdle())
+ ScheduleIdleCheck();
+}
+
+
+namespace
+{
+ wxObjectDataPtr gs_idleTimer;
+}
+
+void wxQtIdleTimer::ScheduleIdleCheck()
+{
+ wxQtEventLoopBase *eventLoop = static_cast(wxEventLoop::GetActive());
+ if ( eventLoop )
+ eventLoop->ScheduleIdleCheck();
}
wxQtEventLoopBase::wxQtEventLoopBase()
{
- // We need a QCoreApplication for event loops, create it here if it doesn't
- // already exist as we can't modify wxAppConsole
- if ( !QCoreApplication::instance() )
- {
- new QApplication( wxAppConsole::GetInstance()->argc, wxAppConsole::GetInstance()->argv );
- }
-
// Create an idle timer to run each time there are no events (timeout = 0)
- m_qtIdleTimer = new wxQtIdleTimer( this );
+ if ( !gs_idleTimer )
+ gs_idleTimer.reset(new wxQtIdleTimer());
- // Pass all events to the idle timer, so it can be restarted each time
- // an event is received
- qApp->installEventFilter( m_qtIdleTimer );
+ m_qtIdleTimer = gs_idleTimer;
+ m_qtEventLoop = new QEventLoop;
}
wxQtEventLoopBase::~wxQtEventLoopBase()
{
- delete m_qtIdleTimer;
+ //Clear the shared timer if this is the only external reference to it
+ if ( gs_idleTimer->GetRefCount() <= 2 )
+ gs_idleTimer.reset(NULL);
+
+ delete m_qtEventLoop;
}
void wxQtEventLoopBase::ScheduleExit(int rc)
{
wxCHECK_RET( IsInsideRun(), wxT("can't call ScheduleExit() if not started") );
m_shouldExit = true;
- QCoreApplication::exit( rc );
+ m_qtEventLoop->exit(rc);
}
int wxQtEventLoopBase::DoRun()
{
- int ret;
-
- // This is placed inside of a loop to take into account nested event loops
- while ( !m_shouldExit )
- {
- // This will print Qt warnins if app already started:
- // "QCoreApplication::exec: The event loop is already running"
- // TODO: check the loopLevel (nested) like in wxGTK
- ret = QCoreApplication::exec();
- // process pending events (if exec was started previously)
- // TODO: use a real new QEventLoop() ?
- QCoreApplication::processEvents();
- }
+ const int ret = m_qtEventLoop->exec();
OnExit();
return ret;
}
bool wxQtEventLoopBase::Pending() const
{
- return QCoreApplication::hasPendingEvents();
+ QAbstractEventDispatcher *instance = QAbstractEventDispatcher::instance();
+ return instance->hasPendingEvents();
}
bool wxQtEventLoopBase::Dispatch()
{
- QCoreApplication::processEvents();
-
+ m_qtEventLoop->processEvents();
return true;
}
int wxQtEventLoopBase::DispatchTimeout(unsigned long timeout)
{
- QCoreApplication::processEvents( QEventLoop::AllEvents, timeout );
-
+ m_qtEventLoop->processEvents(QEventLoop::AllEvents, timeout);
return true;
}
@@ -139,13 +151,26 @@ void wxQtEventLoopBase::WakeUp()
void wxQtEventLoopBase::DoYieldFor(long eventsToProcess)
{
- while (wxTheApp && wxTheApp->Pending())
- // TODO: implement event filtering using the eventsToProcess mask
- wxTheApp->Dispatch();
+
+ QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents;
+
+ if ( !(eventsToProcess & wxEVT_CATEGORY_USER_INPUT) )
+ flags |= QEventLoop::ExcludeUserInputEvents;
+
+ if ( !(eventsToProcess & wxEVT_CATEGORY_SOCKET) )
+ flags |= QEventLoop::ExcludeSocketNotifiers;
+
+ m_qtEventLoop->processEvents(flags);
wxEventLoopBase::DoYieldFor(eventsToProcess);
}
+void wxQtEventLoopBase::ScheduleIdleCheck()
+{
+ if ( IsInsideRun() && !m_shouldExit )
+ m_qtIdleTimer->start(0);
+}
+
#if wxUSE_EVENTLOOP_SOURCE
template
@@ -239,16 +264,6 @@ wxEventLoopSourcesManagerBase* wxAppTraits::GetEventLoopSourcesManager()
#endif
-wxEventLoopSource *wxQtEventLoopBase::AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags)
-{
- wxGUIAppTraits *AppTraits = dynamic_cast(wxApp::GetTraitsIfExists());
-
- if ( AppTraits )
- return AppTraits->GetEventLoopSourcesManager()->AddSourceForFD(fd, handler, flags);
-
- return NULL;
-}
-
#endif // wxUSE_EVENTLOOP_SOURCE
//#############################################################################
diff --git a/src/qt/filedlg.cpp b/src/qt/filedlg.cpp
index da26127ef0..04408ac8ea 100644
--- a/src/qt/filedlg.cpp
+++ b/src/qt/filedlg.cpp
@@ -38,7 +38,7 @@ public:
if (style & wxFD_SAVE)
setAcceptMode(AcceptSave);
-
+
if (style & wxFD_CHANGE_DIR)
connect(this, &QDialog::accepted, this, &wxQtFileDialog::changeDirectory);
}
diff --git a/src/qt/font.cpp b/src/qt/font.cpp
index 7e328d099a..f9e5b1fd9b 100644
--- a/src/qt/font.cpp
+++ b/src/qt/font.cpp
@@ -135,7 +135,7 @@ public:
if ( info.IsUsingSizeInPixels() )
m_nativeFontInfo.SetPixelSize(info.GetPixelSize());
else
- m_nativeFontInfo.SetFractionalPointSize(info.GetFractionalPointSize());
+ m_nativeFontInfo.SetSizeOrDefault(info.GetFractionalPointSize());
m_nativeFontInfo.SetStyle(info.GetStyle());
m_nativeFontInfo.SetWeight(info.GetWeight());
@@ -236,11 +236,21 @@ bool wxFont::Create(wxSize size, wxFontFamily family, wxFontStyle style,
return true;
}
+int wxFont::GetPointSize() const
+{
+ return M_FONTDATA.wxNativeFontInfo::GetPointSize();
+}
+
float wxFont::GetFractionalPointSize() const
{
return M_FONTDATA.GetFractionalPointSize();
}
+wxSize wxFont::GetPixelSize() const
+{
+ return M_FONTDATA.GetPixelSize();
+}
+
wxFontStyle wxFont::GetStyle() const
{
return M_FONTDATA.GetStyle();
@@ -271,6 +281,12 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
return &M_FONTDATA;
}
+bool wxFont::GetStrikethrough() const
+{
+ return M_FONTDATA.GetStrikethrough();
+}
+
+
void wxFont::SetFractionalPointSize(float pointSize)
{
AllocExclusive();
@@ -278,6 +294,13 @@ void wxFont::SetFractionalPointSize(float pointSize)
M_FONTDATA.SetFractionalPointSize(pointSize);
}
+void wxFont::SetPixelSize(const wxSize& pixelSize)
+{
+ AllocExclusive();
+
+ M_FONTDATA.SetPixelSize(pixelSize);
+}
+
bool wxFont::SetFaceName(const wxString& facename)
{
AllocExclusive();
@@ -313,6 +336,13 @@ void wxFont::SetUnderlined( bool underlined )
M_FONTDATA.SetUnderlined(underlined);
}
+void wxFont::SetStrikethrough(bool strikethrough)
+{
+ AllocExclusive();
+
+ M_FONTDATA.SetStrikethrough(strikethrough);
+}
+
void wxFont::SetEncoding(wxFontEncoding encoding)
{
AllocExclusive();
@@ -320,6 +350,18 @@ void wxFont::SetEncoding(wxFontEncoding encoding)
M_FONTDATA.SetEncoding(encoding);
}
+void wxFont::DoSetNativeFontInfo(const wxNativeFontInfo& info)
+{
+ SetFractionalPointSize(info.GetPointSize());
+ SetFamily(info.GetFamily());
+ SetStyle(info.GetStyle());
+ SetNumericWeight(info.GetWeight());
+ SetUnderlined(info.GetUnderlined());
+ SetStrikethrough(info.GetStrikethrough());
+ SetFaceName(info.GetFaceName());
+ SetEncoding(info.GetEncoding());
+}
+
wxGDIRefData *wxFont::CreateGDIRefData() const
{
return new wxFontRefData;
@@ -353,6 +395,11 @@ float wxNativeFontInfo::GetFractionalPointSize() const
return m_qtFont.pointSizeF();
}
+wxSize wxNativeFontInfo::GetPixelSize() const
+{
+ return wxSize(0, m_qtFont.pixelSize());
+}
+
wxFontStyle wxNativeFontInfo::GetStyle() const
{
switch (m_qtFont.style())
@@ -451,10 +498,7 @@ wxFontFamily wxNativeFontInfo::GetFamily() const
wxFontEncoding wxNativeFontInfo::GetEncoding() const
{
-// QFontInfo info = QFontInfo(m_qtFont);
- wxMISSING_IMPLEMENTATION( __FUNCTION__ );
-
- return wxFONTENCODING_MAX;
+ return wxFONTENCODING_UTF8;
}
void wxNativeFontInfo::SetFractionalPointSize(float pointsize)
@@ -469,18 +513,28 @@ void wxNativeFontInfo::SetPixelSize(const wxSize& size)
void wxNativeFontInfo::SetStyle(wxFontStyle style)
{
- switch(style)
+ QFont::Style qtStyle;
+
+ switch ( style )
{
case wxFONTSTYLE_ITALIC:
- m_qtFont.setStyle(QFont::StyleItalic);
+ qtStyle = QFont::StyleItalic;
break;
+
case wxFONTSTYLE_NORMAL:
- m_qtFont.setStyle(QFont::StyleNormal);
+ qtStyle = QFont::StyleNormal;
break;
+
case wxFONTSTYLE_SLANT:
- m_qtFont.setStyle(QFont::StyleOblique);
+ qtStyle = QFont::StyleOblique;
break;
+
+ case wxFONTSTYLE_MAX:
+ wxFAIL_MSG("unknown font style");
+ return;
}
+
+ m_qtFont.setStyle(qtStyle);
}
void wxNativeFontInfo::SetNumericWeight(int weight)
@@ -501,7 +555,7 @@ void wxNativeFontInfo::SetStrikethrough(bool strikethrough)
bool wxNativeFontInfo::SetFaceName(const wxString& facename)
{
m_qtFont.setFamily(wxQtConvertString(facename));
- // qt uses a "font matching algoritm" so the font will be allways valid
+ // Qt uses a "font matching algorithm" so the font will be always valid
return true;
}
diff --git a/src/qt/fontenum.cpp b/src/qt/fontenum.cpp
index c47692ee36..51f7270ef7 100644
--- a/src/qt/fontenum.cpp
+++ b/src/qt/fontenum.cpp
@@ -9,11 +9,28 @@
#include "wx/wxprec.h"
#include "wx/fontenum.h"
+#include "wx/qt/private/converter.h"
-bool wxFontEnumerator::EnumerateFacenames( wxFontEncoding WXUNUSED(encoding),
- bool WXUNUSED(fixedWidthOnly))
+#include
+#include
+
+bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding WXUNUSED(encoding), bool fixedWidthOnly)
{
- return false;
+ QFontDatabase fontDatabase;
+ const QStringList allFonts = fontDatabase.families(QFontDatabase::Any);
+ for( QStringList::const_iterator i = allFonts.begin(); i != allFonts.end(); ++i )
+ {
+ const QString& fontFamily = *i;
+ if ( !fixedWidthOnly || fontDatabase.isFixedPitch(fontFamily) )
+ {
+ if ( !OnFacename(wxQtConvertString(fontFamily)) )
+ {
+ break;
+ }
+ }
+ }
+
+ return true;
}
bool wxFontEnumerator::EnumerateEncodings(const wxString& WXUNUSED(facename))
diff --git a/src/qt/fontutil.cpp b/src/qt/fontutil.cpp
index 3ce79b04d0..24e1d454b0 100644
--- a/src/qt/fontutil.cpp
+++ b/src/qt/fontutil.cpp
@@ -33,7 +33,7 @@ bool wxGetNativeFontEncoding(wxFontEncoding WXUNUSED(encoding),
wxNativeEncodingInfo *info)
{
*info = wxNativeEncodingInfo();
-
+
return false;
}
diff --git a/src/qt/frame.cpp b/src/qt/frame.cpp
index 41322c3733..2492927aff 100644
--- a/src/qt/frame.cpp
+++ b/src/qt/frame.cpp
@@ -44,16 +44,6 @@ class wxQtCentralWidget : public wxQtEventSignalHandler< QScrollArea, wxFrame >
};
-wxFrame::wxFrame()
-{
-}
-
-wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString& title,
- const wxPoint& pos, const wxSize& size, long style, const wxString& name )
-{
- Create( parent, id, title, pos, size, style, name );
-}
-
wxFrame::~wxFrame()
{
// central widget should be deleted by qt when the main window is destroyed
@@ -70,9 +60,11 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString& title,
GetQMainWindow()->setCentralWidget( new wxQtCentralWidget( parent, this ) );
- PostCreation();
+ if ( !wxFrameBase::Create( parent, id, title, pos, size, style, name ) )
+ return false;
- return wxFrameBase::Create( parent, id, title, pos, size, style, name );
+ PostCreation();
+ return true;
}
void wxFrame::SetMenuBar( wxMenuBar *menuBar )
@@ -118,16 +110,22 @@ void wxFrame::SetToolBar(wxToolBar *toolbar)
int area = 0;
if ( toolbar != NULL )
{
- if (toolbar->HasFlag(wxTB_LEFT)) area |= Qt::LeftToolBarArea;
- if (toolbar->HasFlag(wxTB_RIGHT)) area |= Qt::RightToolBarArea;
- if (toolbar->HasFlag(wxTB_TOP)) area |= Qt::TopToolBarArea;
- if (toolbar->HasFlag(wxTB_BOTTOM)) area |= Qt::BottomToolBarArea;
+ if (toolbar->HasFlag(wxTB_LEFT)) { area = Qt::LeftToolBarArea; }
+ else if (toolbar->HasFlag(wxTB_RIGHT)) { area = Qt::RightToolBarArea; }
+ else if (toolbar->HasFlag(wxTB_BOTTOM)){ area = Qt::BottomToolBarArea;}
+ else { area = Qt::TopToolBarArea; }
- GetQMainWindow()->addToolBar((Qt::ToolBarArea)area, toolbar->GetQToolBar());
+ // We keep the current toolbar handle in our own member variable
+ // because we can't get it from half-destroyed wxToolBar when it calls
+ // this function from wxToolBarBase dtor.
+ m_qtToolBar = toolbar->GetQToolBar();
+
+ GetQMainWindow()->addToolBar((Qt::ToolBarArea)area, m_qtToolBar);
}
else if ( m_frameToolBar != NULL )
{
- GetQMainWindow()->removeToolBar(m_frameToolBar->GetQToolBar());
+ GetQMainWindow()->removeToolBar(m_qtToolBar);
+ m_qtToolBar = NULL;
}
wxFrameBase::SetToolBar( toolbar );
}
@@ -136,7 +134,9 @@ void wxFrame::SetWindowStyleFlag( long style )
{
wxWindow::SetWindowStyleFlag( style );
- Qt::WindowFlags qtFlags = GetQMainWindow()->windowFlags();
+ QMainWindow *qtFrame = GetQMainWindow();
+ Qt::WindowFlags qtFlags = qtFrame->windowFlags();
+ qtFlags |= Qt::CustomizeWindowHint;
if ( HasFlag( wxFRAME_TOOL_WINDOW ) )
{
@@ -144,7 +144,47 @@ void wxFrame::SetWindowStyleFlag( long style )
qtFlags |= Qt::Tool;
}
- GetQMainWindow()->setWindowFlags( qtFlags );
+ if ( HasFlag(wxCAPTION) )
+ {
+ qtFlags |= Qt::WindowTitleHint;
+ }
+
+ if ( HasFlag(wxSYSTEM_MENU) )
+ {
+ qtFlags |= Qt::WindowSystemMenuHint;
+ }
+
+ if ( HasFlag(wxSTAY_ON_TOP) )
+ {
+ qtFlags |= Qt::WindowStaysOnTopHint;
+ }
+
+ if ( HasFlag(wxMINIMIZE_BOX) )
+ {
+ qtFlags |= Qt::WindowMinimizeButtonHint;
+ }
+
+ if ( HasFlag(wxMAXIMIZE_BOX) )
+ {
+ qtFlags |= Qt::WindowMaximizeButtonHint;
+ }
+
+ if ( HasFlag(wxCLOSE_BOX) )
+ {
+ qtFlags |= Qt::WindowCloseButtonHint;
+ }
+
+ if ( HasFlag(wxNO_BORDER) )
+ {
+ // Note any of the other window decoration hints (e.g.
+ // Qt::WindowCloseButtonHint, Qt::WindowTitleHint) override this style.
+ // It doesn't seem possible to create a QMainWindow with a title bar
+ // but without a resize border.
+ qtFlags |= Qt::FramelessWindowHint;
+ }
+
+ qtFrame->setWindowFlags(qtFlags);
+
}
void wxFrame::AddChild( wxWindowBase *child )
@@ -179,7 +219,7 @@ void wxFrame::DoGetClientSize(int *width, int *height) const
}
- if ( QMenuBar *qmb = GetQMainWindow()->menuBar() )
+ if ( QWidget *qmb = GetQMainWindow()->menuWidget() )
{
*height -= qmb->geometry().height();
}
@@ -202,4 +242,5 @@ wxQtMainWindow::wxQtMainWindow( wxWindow *parent, wxFrame *handler )
wxQtCentralWidget::wxQtCentralWidget( wxWindow *parent, wxFrame *handler )
: wxQtEventSignalHandler< QScrollArea, wxFrame >( parent, handler )
{
+ setFocusPolicy(Qt::NoFocus);
}
diff --git a/src/qt/gauge.cpp b/src/qt/gauge.cpp
index 8952043db8..38df21aa35 100644
--- a/src/qt/gauge.cpp
+++ b/src/qt/gauge.cpp
@@ -29,7 +29,8 @@ wxQtProgressBar::wxQtProgressBar( wxWindow *parent, wxGauge *handler )
}
-wxGauge::wxGauge()
+wxGauge::wxGauge() :
+ m_qtProgressBar(NULL)
{
}
diff --git a/src/qt/graphics.cpp b/src/qt/graphics.cpp
new file mode 100644
index 0000000000..be97b85cfe
--- /dev/null
+++ b/src/qt/graphics.cpp
@@ -0,0 +1,1407 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: src/qt/graphics.cpp
+// Purpose: Graphics context methods for the Qt platform
+// Author: Jay Nabonne
+// Created: 2018-12-13
+// Copyright: (c) Jay Nabonne
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#if defined(__BORLANDC__)
+ #pragma hdrstop
+#endif
+
+#if wxUSE_GRAPHICS_CONTEXT
+
+#include
+#include
+#include
+#include
+
+#ifndef WX_PRECOMP
+ #include "wx/bitmap.h"
+ #include "wx/icon.h"
+ #include "wx/dcclient.h"
+ #include "wx/dcmemory.h"
+ #include "wx/dcprint.h"
+ #include "wx/window.h"
+#endif
+
+#include "wx/graphics.h"
+#include "wx/scopedptr.h"
+#include "wx/tokenzr.h"
+
+#include "wx/private/graphics.h"
+
+namespace
+{
+
+// Ensure that the given painter is active by calling begin() if it isn't. If
+// it already is, don't do anything.
+class EnsurePainterIsActive
+{
+public:
+ explicit EnsurePainterIsActive(QPainter* painter)
+ : m_painter(painter),
+ m_wasActive(painter->isActive())
+ {
+ if ( !m_wasActive )
+ m_painter->begin(&m_picture);
+ }
+
+ ~EnsurePainterIsActive()
+ {
+ if ( !m_wasActive )
+ m_painter->end();
+ }
+
+private:
+ QPainter* m_painter;
+ QPicture m_picture;
+ bool m_wasActive;
+
+ wxDECLARE_NO_COPY_CLASS(EnsurePainterIsActive);
+};
+
+} // anonymous namespace
+
+class WXDLLIMPEXP_CORE wxQtBrushData : public wxGraphicsObjectRefData
+{
+public:
+ wxQtBrushData(wxGraphicsRenderer* renderer)
+ : wxGraphicsObjectRefData(renderer)
+ {
+ }
+
+ wxQtBrushData(wxGraphicsRenderer* renderer, const wxBrush& wxbrush)
+ : wxGraphicsObjectRefData(renderer),
+ m_brush(wxbrush.GetHandle())
+ {
+ }
+
+ void CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
+ wxDouble x2, wxDouble y2,
+ const wxGraphicsGradientStops& stops)
+ {
+ QLinearGradient gradient(x1, y1, x2, y2);
+ SetStops(gradient, stops);
+ m_brush = QBrush(gradient);
+ }
+
+ void CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
+ wxDouble xc, wxDouble yc,
+ wxDouble radius,
+ const wxGraphicsGradientStops& stops)
+ {
+ QRadialGradient gradient(QPointF(xc, yc), radius, QPointF(xo, yo));
+ SetStops(gradient, stops);
+ m_brush = QBrush(gradient);
+ }
+
+ const QBrush& getBrush() const
+ {
+ return m_brush;
+ }
+
+private:
+ static void
+ SetStops(QGradient& gradient, const wxGraphicsGradientStops& stops)
+ {
+ QGradientStops qstops;
+ for ( size_t i = 0; i < stops.GetCount(); ++i )
+ {
+ const wxGraphicsGradientStop stop = stops.Item(i);
+ qstops.append(QGradientStop(stop.GetPosition(),
+ stop.GetColour().GetQColor()));
+ }
+
+ gradient.setStops(qstops);
+ }
+
+ QBrush m_brush;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtBrushData);
+};
+
+class WXDLLIMPEXP_CORE wxQtPenData : public wxGraphicsObjectRefData
+{
+public:
+ wxQtPenData(wxGraphicsRenderer* renderer, const wxGraphicsPenInfo& info)
+ : wxGraphicsObjectRefData(renderer),
+ m_pen(CreatePenFromInfo(info))
+ {
+ }
+
+ const QPen& GetPen() const
+ {
+ return m_pen;
+ }
+
+private:
+ static QPen CreatePenFromInfo(const wxGraphicsPenInfo& info)
+ {
+ wxPen wxpen(info.GetColour(), info.GetWidth(), info.GetStyle());
+ wxpen.SetDashes(info.GetDashCount(), info.GetDash());
+ wxpen.SetJoin(info.GetJoin());
+ wxpen.SetCap(info.GetCap());
+ switch ( info.GetStyle() )
+ {
+ case wxPENSTYLE_STIPPLE:
+ case wxPENSTYLE_STIPPLE_MASK:
+ case wxPENSTYLE_STIPPLE_MASK_OPAQUE:
+ {
+ wxpen.SetStipple(info.GetStipple());
+ break;
+ }
+ default:
+ break;
+ }
+
+ return wxpen.GetHandle();
+ }
+ QPen m_pen;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtPenData);
+};
+
+class WXDLLIMPEXP_CORE wxQtBitmapData : public wxGraphicsBitmapData
+{
+public:
+ wxQtBitmapData(wxGraphicsRenderer* renderer, QPixmap* pixmap)
+ : wxGraphicsBitmapData(renderer),
+ m_pixmap(pixmap)
+ {
+ }
+
+ wxQtBitmapData(wxGraphicsRenderer* renderer, const wxBitmap& bmp)
+ : wxGraphicsBitmapData(renderer),
+ m_pixmap(bmp.GetHandle())
+ {
+ }
+
+ QPixmap* GetPixmap() const
+ {
+ return m_pixmap;
+ }
+
+ virtual void* GetNativeBitmap() const wxOVERRIDE
+ {
+ return m_pixmap;
+ }
+
+ static const QPixmap* GetPixmapFromBitmap(const wxGraphicsBitmap& bitmap)
+ {
+ const wxQtBitmapData* const
+ data = static_cast(bitmap.GetBitmapData());
+ return data->GetPixmap();
+ }
+
+
+#if wxUSE_IMAGE
+ wxImage DoConvertToImage() const
+ {
+ wxBitmap bitmap(*m_pixmap);
+ return bitmap.ConvertToImage();
+ }
+#endif // wxUSE_IMAGE
+
+private:
+ QPixmap* m_pixmap;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtBitmapData);
+};
+
+
+class WXDLLIMPEXP_CORE wxQtMatrixData : public wxGraphicsMatrixData
+{
+public:
+ explicit wxQtMatrixData(wxGraphicsRenderer* renderer)
+ : wxGraphicsMatrixData(renderer),
+ m_transform(new QTransform)
+ {
+ }
+
+ wxQtMatrixData(wxGraphicsRenderer* renderer, const QTransform& transform)
+ : wxGraphicsMatrixData(renderer),
+ m_transform(new QTransform(transform))
+ {
+ }
+
+ virtual ~wxQtMatrixData()
+ {
+ delete m_transform;
+ }
+
+ virtual wxGraphicsObjectRefData* Clone() const wxOVERRIDE
+ {
+ wxQtMatrixData* newMatrix = new wxQtMatrixData(m_renderer);
+ *newMatrix->m_transform = *m_transform;
+ return newMatrix;
+ }
+
+ // concatenates the matrix
+ virtual void Concat(const wxGraphicsMatrixData *t) wxOVERRIDE
+ {
+ const wxQtMatrixData* rhs = static_cast(t);
+ *m_transform = *rhs->m_transform* (*m_transform);
+ }
+
+ // sets the matrix to the respective values
+ virtual void Set(wxDouble a = 1.0, wxDouble b = 0.0,
+ wxDouble c = 0.0, wxDouble d = 1.0,
+ wxDouble tx = 0.0, wxDouble ty = 0.0) wxOVERRIDE
+ {
+ m_transform->setMatrix(a, b, 0.0,
+ c, d, 0.0,
+ tx, ty, 1.0);
+ }
+
+ // gets the component values of the matrix
+ virtual void Get(wxDouble* a, wxDouble* b,
+ wxDouble* c, wxDouble* d,
+ wxDouble* tx, wxDouble* ty) const wxOVERRIDE
+ {
+ if ( a )
+ *a = m_transform->m11();
+ if ( b )
+ *b = m_transform->m12();
+ if ( c )
+ *c = m_transform->m21();
+ if ( d )
+ *d = m_transform->m22();
+ if ( tx )
+ *tx = m_transform->m31();
+ if ( ty )
+ *ty = m_transform->m32();
+ }
+
+ // makes this the inverse matrix
+ virtual void Invert() wxOVERRIDE
+ {
+ bool invertible = false;
+ const QTransform invTransform = m_transform->inverted(&invertible);
+ if ( invertible )
+ {
+ *m_transform = invTransform;
+ }
+ }
+
+ // returns true if the elements of the transformation matrix are equal ?
+ virtual bool IsEqual(const wxGraphicsMatrixData* t) const wxOVERRIDE
+ {
+ const wxQtMatrixData* rhs = static_cast(t);
+ return *m_transform == *rhs->m_transform;
+ }
+
+ // return true if this is the identity matrix
+ virtual bool IsIdentity() const wxOVERRIDE
+ {
+ return m_transform->isIdentity();
+ }
+
+ //
+ // transformation
+ //
+
+ // add the translation to this matrix
+ virtual void Translate(wxDouble dx, wxDouble dy) wxOVERRIDE
+ {
+ m_transform->translate(dx, dy);
+ }
+
+ // add the scale to this matrix
+ virtual void Scale(wxDouble xScale, wxDouble yScale) wxOVERRIDE
+ {
+ m_transform->scale(xScale, yScale);
+ }
+
+ // add the rotation to this matrix (radians)
+ virtual void Rotate(wxDouble angle) wxOVERRIDE
+ {
+ m_transform->rotateRadians(angle);
+ }
+
+ //
+ // apply the transforms
+ //
+
+ // applies that matrix to the point
+ virtual void TransformPoint(wxDouble *x, wxDouble *y) const wxOVERRIDE
+ {
+ qreal transformed_x, transformed_y;
+ m_transform->map(static_cast(*x), static_cast(*y),
+ &transformed_x, &transformed_y);
+ *x = transformed_x;
+ *y = transformed_y;
+ }
+
+ // applies the matrix except for translations
+ virtual void TransformDistance(wxDouble *dx, wxDouble *dy) const wxOVERRIDE
+ {
+ const QTransform untransTransform(
+ m_transform->m11(),
+ m_transform->m12(),
+ m_transform->m13(),
+ m_transform->m21(),
+ m_transform->m22(),
+ m_transform->m23(),
+ 0.0,
+ 0.0,
+ 1.0);
+
+ qreal transformed_x, transformed_y;
+ untransTransform.map(static_cast(*dx), static_cast(*dy),
+ &transformed_x, &transformed_y);
+
+ *dx = transformed_x;
+ *dy = transformed_y;
+ }
+
+ // returns the native representation
+ virtual void* GetNativeMatrix() const wxOVERRIDE
+ {
+ return static_cast(m_transform);
+ }
+
+ const QTransform& GetQTransform() const
+ {
+ return *m_transform;
+ }
+private:
+ QTransform* m_transform;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtMatrixData);
+};
+
+class wxQtFontData : public wxGraphicsObjectRefData
+{
+public:
+ wxQtFontData(wxGraphicsRenderer* renderer,
+ const wxFont& font,
+ const wxColour& col)
+ : wxGraphicsObjectRefData(renderer),
+ m_font(font.GetHandle()),
+ m_color(col.GetQColor())
+ {
+ }
+
+ wxQtFontData(
+ wxGraphicsRenderer* renderer,
+ double sizeInPixels,
+ const wxString& facename,
+ int flags,
+ const wxColour& col)
+ : wxGraphicsObjectRefData(renderer),
+ m_color(col.GetQColor())
+ {
+ m_font.setFamily(QString(facename));
+ m_font.setPixelSize(static_cast(sizeInPixels));
+ if ( flags & wxFONTFLAG_LIGHT )
+ m_font.setWeight(QFont::Light);
+ if ( flags & wxFONTFLAG_BOLD )
+ m_font.setWeight(QFont::Bold);
+ if ( flags & (wxFONTFLAG_ITALIC | wxFONTFLAG_SLANT) )
+ m_font.setItalic(true);
+ if ( flags & wxFONTFLAG_ANTIALIASED )
+ m_font.setStyleStrategy(QFont::PreferAntialias);
+ if ( flags & wxFONTFLAG_NOT_ANTIALIASED )
+ m_font.setStyleStrategy(QFont::NoAntialias);
+ if ( flags & wxFONTFLAG_UNDERLINED )
+ m_font.setUnderline(true);
+ if ( flags & wxFONTFLAG_STRIKETHROUGH )
+ m_font.setStrikeOut(true);
+ }
+
+ const QFont& GetFont() const
+ {
+ return m_font;
+ }
+
+ const QColor& GetColor() const
+ {
+ return m_color;
+ }
+
+private:
+ QFont m_font;
+ QColor m_color;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtFontData);
+};
+
+//-----------------------------------------------------------------------------
+// wxQtGraphicsPathData
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxQtGraphicsPathData : public wxGraphicsPathData
+{
+public:
+ wxQtGraphicsPathData(wxGraphicsRenderer* renderer)
+ : wxGraphicsPathData(renderer),
+ m_path(new QPainterPath()),
+ m_current_subpath_start(-1)
+ {
+ }
+
+ ~wxQtGraphicsPathData()
+ {
+ delete m_path;
+ }
+
+ virtual wxGraphicsObjectRefData *Clone() const wxOVERRIDE
+ {
+ return new wxQtGraphicsPathData(*this);
+ }
+
+ //
+ // These are the path primitives from which everything else can be
+ // constructed.
+ //
+
+ // begins a new subpath at (x,y)
+ virtual void MoveToPoint(wxDouble x, wxDouble y) wxOVERRIDE
+ {
+ m_path->moveTo(x, y);
+ m_current_subpath_start = m_path->elementCount() - 1;
+ }
+
+ // adds a straight line from the current point to (x,y)
+ // if there is no current path, it is equivalent to a moveTo.
+ virtual void AddLineToPoint(wxDouble x, wxDouble y) wxOVERRIDE
+ {
+ if ( !HasCurrentSubpath() )
+ MoveToPoint(x, y);
+ else
+ m_path->lineTo(x, y);
+ }
+
+ // adds a cubic Bezier curve from the current point, using two control
+ // points and an end point
+ virtual void
+ AddCurveToPoint(wxDouble cx1, wxDouble cy1,
+ wxDouble cx2, wxDouble cy2,
+ wxDouble x, wxDouble y) wxOVERRIDE
+ {
+ if ( !HasCurrentSubpath() )
+ MoveToPoint(cx1, cy1);
+ m_path->cubicTo(QPointF(cx1, cy1), QPointF(cx2, cy2), QPointF(x, y));
+ }
+
+ // adds an arc of a circle centering at (x,y) with radius (r) from
+ // startAngle to endAngle
+ virtual void
+ AddArc(wxDouble x, wxDouble y, wxDouble r,
+ wxDouble startAngle, wxDouble endAngle,
+ bool clockwise) wxOVERRIDE
+ {
+ const bool fixupFirst = !HasCurrentSubpath();
+ if ( fixupFirst )
+ MoveToPoint(x, y);
+
+ qreal arcLength;
+ if ( clockwise )
+ {
+ if ( endAngle < startAngle )
+ endAngle += 2* M_PI;
+ arcLength = -wxRadToDeg(endAngle - startAngle);
+ }
+ else
+ {
+ if ( endAngle > startAngle )
+ endAngle -= 2* M_PI;
+ arcLength = -wxRadToDeg(endAngle - startAngle);
+ }
+ m_path->arcTo(x-r, y-r, r*2, r*2, -wxRadToDeg(startAngle), arcLength);
+ if ( fixupFirst )
+ {
+ QPainterPath::Element
+ element = m_path->elementAt(m_current_subpath_start+1);
+ m_path->setElementPositionAt(m_current_subpath_start,
+ element.x, element.y);
+ }
+ }
+
+ // gets the last point of the current path, (0,0) if not yet set
+ virtual void GetCurrentPoint(wxDouble* x, wxDouble* y) const wxOVERRIDE
+ {
+ QPointF position = m_path->currentPosition();
+ *x = position.x();
+ *y = position.y();
+ }
+
+ // adds another path
+ virtual void AddPath(const wxGraphicsPathData* path) wxOVERRIDE
+ {
+ const wxQtGraphicsPathData*
+ pathAdded = static_cast(path);
+ m_path->addPath(*pathAdded->m_path);
+ }
+
+ // closes the current sub-path
+ virtual void CloseSubpath() wxOVERRIDE
+ {
+ // Current position must be end of last path after close, not (0,0) as
+ // Qt sets.
+ if ( !HasCurrentSubpath() )
+ return;
+
+ const QPainterPath::Element
+ firstElement = m_path->elementAt(m_current_subpath_start);
+
+ m_path->closeSubpath();
+ MoveToPoint(firstElement.x, firstElement.y);
+ }
+
+ //
+ // These are convenience functions which - if not available natively will
+ // be assembled using the primitives from above
+ //
+
+ // appends a circle as a new closed subpath
+ virtual void AddCircle(wxDouble x, wxDouble y, wxDouble r) wxOVERRIDE
+ {
+ m_path->addEllipse(x - r, y - r, r*2, r*2);
+ }
+
+ // appends an ellipse as a new closed subpath fitting the passed rectangle
+ virtual void
+ AddEllipse(wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE
+ {
+ m_path->addEllipse(x, y, w, h);
+ }
+
+ // returns the native path
+ virtual void* GetNativePath() const wxOVERRIDE
+ {
+ return static_cast(m_path);
+ }
+
+ // give the native path returned by GetNativePath() back (there might be
+ // some deallocations necessary)
+ virtual void UnGetNativePath(void *) const wxOVERRIDE
+ {
+ }
+
+ // transforms each point of this path by the matrix
+ virtual void Transform(const wxGraphicsMatrixData* matrix) wxOVERRIDE
+ {
+ const wxQtMatrixData*
+ qmatrix = static_cast(matrix);
+ *m_path = qmatrix->GetQTransform().map(*m_path);
+ }
+
+ // gets the bounding box enclosing all points (possibly including control
+ // points)
+ virtual void
+ GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const wxOVERRIDE
+ {
+ QRectF boundingRect = m_path->controlPointRect();
+
+ if ( !boundingRect.isValid() )
+ boundingRect = QRectF();
+
+ if ( x ) *x = boundingRect.left();
+ if ( y ) *y = boundingRect.top();
+ if ( w ) *w = boundingRect.width();
+ if ( h ) *h = boundingRect.height();
+ }
+
+ virtual bool
+ Contains(wxDouble x, wxDouble y,
+ wxPolygonFillMode /*fillStyle = wxWINDING_RULE*/) const wxOVERRIDE
+ {
+ return m_path->contains(QPointF(x, y));
+ }
+
+private:
+ // for Clone
+ wxQtGraphicsPathData(const wxQtGraphicsPathData& rhs)
+ : wxGraphicsPathData(rhs.GetRenderer()),
+ m_path(new QPainterPath(*rhs.m_path)),
+ m_current_subpath_start(rhs.m_current_subpath_start)
+ {
+ }
+
+ bool HasCurrentSubpath() const
+ {
+ return m_current_subpath_start != -1;
+ }
+
+ QPainterPath* m_path;
+ int m_current_subpath_start;
+
+ wxQtGraphicsPathData& operator=(const wxQtGraphicsPathData&);
+};
+
+class WXDLLIMPEXP_CORE wxQtGraphicsContext : public wxGraphicsContext
+{
+ void InitFromDC(const wxDC& dc)
+ {
+ m_qtPainter = static_cast(dc.GetHandle());
+
+ const wxSize sz = dc.GetSize();
+ m_width = sz.x;
+ m_height = sz.y;
+ }
+
+protected:
+ // Use the specified painter and take ownership of it, i.e. it will be
+ // destroyed in this class dtor.
+ void AttachPainter(QPainter* painter)
+ {
+ m_qtPainter = painter;
+
+ // Ensure that it will be destroyed when this object is.
+ m_ownedPainter.reset(m_qtPainter);
+ }
+
+ wxQtGraphicsContext(wxGraphicsRenderer* renderer)
+ : wxGraphicsContext(renderer),
+ m_qtPainter(NULL)
+ {
+ }
+
+public:
+ wxQtGraphicsContext(wxGraphicsRenderer* renderer, QPaintDevice* device)
+ : wxGraphicsContext(renderer)
+ {
+ AttachPainter(new QPainter(device));
+
+ m_width = device->width();
+ m_height = device->height();
+ }
+
+ wxQtGraphicsContext(wxGraphicsRenderer* renderer, const wxWindowDC& dc)
+ : wxGraphicsContext(renderer)
+ {
+ InitFromDC(dc);
+ }
+
+ wxQtGraphicsContext(wxGraphicsRenderer* renderer, const wxMemoryDC& dc)
+ : wxGraphicsContext(renderer)
+ {
+ InitFromDC(dc);
+ }
+
+#if wxUSE_PRINTING_ARCHITECTURE
+ wxQtGraphicsContext(wxGraphicsRenderer* renderer, const wxPrinterDC& dc)
+ : wxGraphicsContext(renderer)
+ {
+ InitFromDC(dc);
+ }
+
+#endif
+
+ wxQtGraphicsContext(wxGraphicsRenderer* renderer, wxWindow *window)
+ : wxGraphicsContext(renderer)
+ {
+ m_qtPainter = static_cast(window->QtGetPainter());
+
+ const wxSize sz = window->GetClientSize();
+ m_width = sz.x;
+ m_height = sz.y;
+ }
+
+ virtual bool ShouldOffset() const wxOVERRIDE
+ {
+ return false;
+ }
+
+ virtual void Clip(const wxRegion& region) wxOVERRIDE
+ {
+ m_qtPainter->setClipRegion(region.GetHandle());
+ }
+
+ // clips drawings to the rect
+ virtual void Clip(wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE
+ {
+ m_qtPainter->setClipRect(x, y, w, h);
+ }
+
+ // resets the clipping to original extent
+ virtual void ResetClip() wxOVERRIDE
+ {
+ m_qtPainter->setClipping(false);
+ }
+
+ // returns bounding box of the clipping region
+ virtual void
+ GetClipBox(wxDouble* x, wxDouble* y, wxDouble* w, wxDouble* h) wxOVERRIDE
+ {
+ const QRectF box = m_qtPainter->clipBoundingRect();
+ if ( x )
+ *x = box.left();
+ if ( y )
+ *y = box.top();
+ if ( w )
+ *w = box.width();
+ if ( h )
+ *h = box.height();
+ }
+
+ virtual void* GetNativeContext() wxOVERRIDE
+ {
+ return static_cast(m_qtPainter);
+ }
+
+ virtual bool SetAntialiasMode(wxAntialiasMode antialias) wxOVERRIDE
+ {
+ bool enableAA = false;
+ switch ( antialias )
+ {
+ case wxANTIALIAS_DEFAULT:
+ enableAA = true;
+ break;
+
+ case wxANTIALIAS_NONE:
+ enableAA = false;
+ break;
+ }
+
+ m_qtPainter->setRenderHints(QPainter::Antialiasing |
+ QPainter::TextAntialiasing,
+ enableAA);
+
+ m_antialias = antialias;
+ return true;
+ }
+
+ virtual bool
+ SetInterpolationQuality(wxInterpolationQuality interpolation) wxOVERRIDE
+ {
+ m_qtPainter->setRenderHint(QPainter::SmoothPixmapTransform,
+ interpolation == wxINTERPOLATION_BEST);
+ m_interpolation = interpolation;
+ return true;
+ }
+
+ virtual bool SetCompositionMode(wxCompositionMode composition) wxOVERRIDE
+ {
+ QPainter::CompositionMode q_composition_mode;
+ switch ( composition )
+ {
+ case wxCOMPOSITION_CLEAR:
+ q_composition_mode = QPainter::CompositionMode_Clear;
+ break;
+ case wxCOMPOSITION_SOURCE:
+ q_composition_mode = QPainter::CompositionMode_Source;
+ break;
+ case wxCOMPOSITION_OVER:
+ q_composition_mode = QPainter::CompositionMode_SourceOver;
+ break;
+ case wxCOMPOSITION_IN:
+ q_composition_mode = QPainter::CompositionMode_SourceIn;
+ break;
+ case wxCOMPOSITION_OUT:
+ q_composition_mode = QPainter::CompositionMode_SourceOut;
+ break;
+ case wxCOMPOSITION_ATOP:
+ q_composition_mode = QPainter::CompositionMode_SourceAtop;
+ break;
+ case wxCOMPOSITION_DEST:
+ q_composition_mode = QPainter::CompositionMode_Destination;
+ break;
+ case wxCOMPOSITION_DEST_OVER:
+ q_composition_mode = QPainter::CompositionMode_DestinationOver;
+ break;
+ case wxCOMPOSITION_DEST_IN:
+ q_composition_mode = QPainter::CompositionMode_DestinationIn;
+ break;
+ case wxCOMPOSITION_DEST_OUT:
+ q_composition_mode = QPainter::CompositionMode_DestinationOut;
+ break;
+ case wxCOMPOSITION_DEST_ATOP:
+ q_composition_mode = QPainter::CompositionMode_DestinationAtop;
+ break;
+ case wxCOMPOSITION_XOR:
+ q_composition_mode = QPainter::CompositionMode_Xor;
+ break;
+ case wxCOMPOSITION_ADD:
+ q_composition_mode = QPainter::CompositionMode_Plus;
+ break;
+ default:
+ return false;
+ }
+ m_qtPainter->setCompositionMode(q_composition_mode);
+ m_composition = composition;
+ return true;
+ }
+
+ virtual void BeginLayer(wxDouble /*opacity*/) wxOVERRIDE
+ {
+ wxFAIL_MSG("BeginLayer not implemented");
+ }
+
+ virtual void EndLayer() wxOVERRIDE
+ {
+ wxFAIL_MSG("EndLayer not implemented");
+ }
+
+ virtual void StrokePath(const wxGraphicsPath& p) wxOVERRIDE
+ {
+ if ( m_pen.IsNull() )
+ {
+ return;
+ }
+
+ const QPainterPath*
+ pathData = static_cast(p.GetNativePath());
+ const QPen&
+ pen = static_cast(m_pen.GetRefData())->GetPen();
+ m_qtPainter->strokePath(*pathData, pen);
+ }
+
+ virtual void
+ FillPath(const wxGraphicsPath& p,
+ wxPolygonFillMode /*fillStyle = wxWINDING_RULE*/) wxOVERRIDE
+ {
+ if ( m_brush.IsNull() )
+ {
+ return;
+ }
+
+ const QPainterPath*
+ pathData = static_cast(p.GetNativePath());
+ const QBrush&
+ brush = static_cast(m_brush.GetRefData())->getBrush();
+ m_qtPainter->fillPath(*pathData, brush);
+ }
+
+ virtual void
+ ClearRectangle(wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE
+ {
+ m_qtPainter->fillRect(x, y, w, h, QBrush(QColor(0, 0, 0, 0)));
+ }
+
+ virtual void Translate(wxDouble dx, wxDouble dy) wxOVERRIDE
+ {
+ m_qtPainter->translate(dx, dy);
+ }
+
+ virtual void Scale(wxDouble xScale, wxDouble yScale) wxOVERRIDE
+ {
+ m_qtPainter->scale(xScale, yScale);
+ }
+
+ virtual void Rotate(wxDouble angle) wxOVERRIDE
+ {
+ // wx angle is in radians. Qt angle is in degrees.
+ m_qtPainter->rotate(wxRadToDeg(angle));
+ }
+
+ // concatenates this transform with the current transform of this context
+ virtual void ConcatTransform(const wxGraphicsMatrix& matrix) wxOVERRIDE
+ {
+ wxGraphicsMatrix currentMatrix = GetTransform();
+ currentMatrix.Concat(matrix);
+ SetTransform(currentMatrix);
+ }
+
+ // sets the transform of this context
+ virtual void SetTransform(const wxGraphicsMatrix& matrix) wxOVERRIDE
+ {
+ const wxQtMatrixData*
+ qmatrix = static_cast(matrix.GetRefData());
+ m_qtPainter->setTransform(qmatrix->GetQTransform());
+ }
+
+ // gets the matrix of this context
+ virtual wxGraphicsMatrix GetTransform() const wxOVERRIDE
+ {
+ const QTransform& transform = m_qtPainter->transform();
+ wxGraphicsMatrix m;
+ m.SetRefData(new wxQtMatrixData(GetRenderer(), transform));
+ return m;
+ }
+
+ virtual void
+ DrawBitmap(const wxGraphicsBitmap& bmp,
+ wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE
+ {
+ const QPixmap* pixmap = wxQtBitmapData::GetPixmapFromBitmap(bmp);
+ m_qtPainter->drawPixmap(x, y, w, h, *pixmap);
+ }
+
+ virtual void
+ DrawBitmap(const wxBitmap& bmp,
+ wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE
+ {
+ DoDrawBitmap(bmp, x, y, w, h, true);
+ }
+
+ virtual void
+ DrawIcon(const wxIcon& icon,
+ wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE
+ {
+ DoDrawBitmap(icon, x, y, w, h, true);
+ }
+
+ virtual void PushState() wxOVERRIDE
+ {
+ m_qtPainter->save();
+ }
+
+ virtual void PopState() wxOVERRIDE
+ {
+ m_qtPainter->restore();
+ }
+
+ virtual void Flush() wxOVERRIDE
+ {
+ }
+
+ virtual void GetTextExtent(const wxString& str,
+ wxDouble *width,
+ wxDouble *height,
+ wxDouble *descent,
+ wxDouble *externalLeading) const wxOVERRIDE
+ {
+ wxCHECK_RET( !m_font.IsNull(),
+ "wxQtContext::GetTextExtent - no valid font set" );
+
+ EnsurePainterIsActive active(m_qtPainter);
+
+ const wxQtFontData*
+ fontData = static_cast(m_font.GetRefData());
+ m_qtPainter->setFont(fontData->GetFont());
+
+ const QFontMetrics metrics = m_qtPainter->fontMetrics();
+ const QRect boundingRect = metrics.boundingRect(QString(str));
+
+ if ( width )
+ *width = boundingRect.width();
+ if ( height )
+ *height = boundingRect.height();
+ if ( descent )
+ *descent = metrics.descent();
+ if ( externalLeading )
+ *externalLeading = metrics.leading() - (metrics.ascent() + metrics.descent());
+ }
+
+ virtual void
+ GetPartialTextExtents(const wxString& text,
+ wxArrayDouble& widths) const wxOVERRIDE
+ {
+ wxCHECK_RET( !m_font.IsNull(),
+ "wxQtContext::GetPartialTextExtents - no valid font set" );
+
+ EnsurePainterIsActive active(m_qtPainter);
+
+ const wxQtFontData*
+ fontData = static_cast(m_font.GetRefData());
+ m_qtPainter->setFont(fontData->GetFont());
+
+ const QFontMetrics metrics = m_qtPainter->fontMetrics();
+
+ const size_t textLength = text.length();
+
+ widths.clear();
+ widths.insert(widths.end(), textLength, 0);
+
+ for ( size_t i = 0; i < textLength; ++i )
+ {
+ const wxString subString = text.substr(0, i+1);
+ const QRect
+ boundingRect = metrics.boundingRect(QString(subString));
+ widths[i] = boundingRect.width();
+ }
+ }
+
+protected:
+ virtual void
+ DoDrawText(const wxString& str, wxDouble x, wxDouble y) wxOVERRIDE
+ {
+ wxCHECK_RET( !m_font.IsNull(),
+ "wxQtContext::DrawText - no valid font set" );
+
+ const wxQtFontData*
+ fontData = static_cast(m_font.GetRefData());
+
+ m_qtPainter->setFont(fontData->GetFont());
+ m_qtPainter->setPen(QPen(fontData->GetColor()));
+
+ QFontMetrics metrics = m_qtPainter->fontMetrics();
+
+ wxStringTokenizer tokenizer(str, "\n");
+ while ( tokenizer.HasMoreTokens() )
+ {
+ const wxString line = tokenizer.GetNextToken();
+ m_qtPainter->drawText(x, y + metrics.ascent(), QString(line));
+ y += metrics.lineSpacing();
+ }
+ }
+
+ void
+ DoDrawBitmap(const wxBitmap& bmp,
+ wxDouble x, wxDouble y,
+ wxDouble w, wxDouble h, bool useMask) const
+ {
+ QPixmap pix = *bmp.GetHandle();
+
+ if (useMask && bmp.GetMask() && bmp.GetMask()->GetHandle())
+ pix.setMask(*bmp.GetMask()->GetHandle());
+
+ m_qtPainter->drawPixmap(x, y, w, h, pix);
+ }
+
+ QPainter* m_qtPainter;
+
+private:
+ // This pointer may be empty if we don't own m_qtPainter.
+ wxScopedPtr m_ownedPainter;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtGraphicsContext);
+};
+
+class wxQtMeasuringContext : public wxQtGraphicsContext
+{
+public:
+ wxQtMeasuringContext(wxGraphicsRenderer* renderer)
+ : wxQtGraphicsContext(renderer)
+ {
+ AttachPainter(new QPainter());
+ }
+};
+
+class wxQtImageContext : public wxQtGraphicsContext
+{
+public:
+ wxQtImageContext(wxGraphicsRenderer* renderer, wxImage& image) :
+ wxQtGraphicsContext(renderer),
+ m_image(image)
+ {
+ const wxBitmap wxbitmap(image);
+ m_pixmap = *wxbitmap.GetHandle();
+ AttachPainter(new QPainter(&m_pixmap));
+ }
+
+ ~wxQtImageContext()
+ {
+ wxQtBitmapData bitmap(GetRenderer(), &m_pixmap);
+ m_image = bitmap.DoConvertToImage();
+ }
+
+private:
+ QPixmap m_pixmap;
+ wxImage& m_image;
+};
+
+//-----------------------------------------------------------------------------
+// wxQtGraphicsRenderer declaration
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxQtGraphicsRenderer : public wxGraphicsRenderer
+{
+public:
+ wxQtGraphicsRenderer() {}
+
+ virtual ~wxQtGraphicsRenderer() {}
+
+ // Context
+
+ virtual wxGraphicsContext* CreateContext(const wxWindowDC& dc) wxOVERRIDE;
+ virtual wxGraphicsContext* CreateContext(const wxMemoryDC& dc) wxOVERRIDE;
+#if wxUSE_PRINTING_ARCHITECTURE
+ virtual wxGraphicsContext* CreateContext(const wxPrinterDC& dc) wxOVERRIDE;
+#endif
+
+ virtual wxGraphicsContext* CreateContextFromNativeContext(void* context) wxOVERRIDE;
+
+ virtual wxGraphicsContext* CreateContextFromNativeWindow(void* window) wxOVERRIDE;
+
+#if wxUSE_IMAGE
+ virtual wxGraphicsContext* CreateContextFromImage(wxImage& image) wxOVERRIDE;
+#endif // wxUSE_IMAGE
+
+ virtual wxGraphicsContext* CreateContext(wxWindow* window) wxOVERRIDE;
+
+ virtual wxGraphicsContext* CreateMeasuringContext() wxOVERRIDE;
+
+ // Path
+
+ virtual wxGraphicsPath CreatePath() wxOVERRIDE;
+
+ // Matrix
+
+ virtual wxGraphicsMatrix CreateMatrix(wxDouble a = 1.0, wxDouble b = 0.0,
+ wxDouble c = 0.0, wxDouble d = 1.0,
+ wxDouble tx = 0.0, wxDouble ty = 0.0) wxOVERRIDE;
+
+ virtual wxGraphicsPen CreatePen(const wxGraphicsPenInfo& info) wxOVERRIDE;
+
+ virtual wxGraphicsBrush CreateBrush(const wxBrush& brush) wxOVERRIDE;
+
+ virtual wxGraphicsBrush
+ CreateLinearGradientBrush(wxDouble x1, wxDouble y1,
+ wxDouble x2, wxDouble y2,
+ const wxGraphicsGradientStops& stops) wxOVERRIDE;
+
+ virtual wxGraphicsBrush
+ CreateRadialGradientBrush(wxDouble xo, wxDouble yo,
+ wxDouble xc, wxDouble yc,
+ wxDouble radius,
+ const wxGraphicsGradientStops& stops) wxOVERRIDE;
+
+ // sets the font
+ virtual wxGraphicsFont CreateFont(const wxFont& font,
+ const wxColour& col = *wxBLACK) wxOVERRIDE;
+ virtual wxGraphicsFont CreateFont(double sizeInPixels,
+ const wxString& facename,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxColour& col = *wxBLACK) wxOVERRIDE;
+
+ // create a native bitmap representation
+ virtual wxGraphicsBitmap CreateBitmap(const wxBitmap& bitmap) wxOVERRIDE;
+#if wxUSE_IMAGE
+ virtual wxGraphicsBitmap CreateBitmapFromImage(const wxImage& image) wxOVERRIDE;
+ virtual wxImage CreateImageFromBitmap(const wxGraphicsBitmap& bmp) wxOVERRIDE;
+#endif // wxUSE_IMAGE
+
+ // create a graphics bitmap from a native bitmap
+ virtual wxGraphicsBitmap CreateBitmapFromNativeBitmap(void* bitmap) wxOVERRIDE;
+
+ // create a subimage from a native image representation
+ virtual wxGraphicsBitmap CreateSubBitmap(const wxGraphicsBitmap& bitmap,
+ wxDouble x, wxDouble y,
+ wxDouble w, wxDouble h) wxOVERRIDE;
+
+ virtual wxString GetName() const wxOVERRIDE;
+ virtual void GetVersion(int *major,
+ int *minor,
+ int *micro) const wxOVERRIDE;
+
+ wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxQtGraphicsRenderer);
+};
+
+//-----------------------------------------------------------------------------
+// wxQtGraphicsRenderer implementation
+//-----------------------------------------------------------------------------
+
+wxIMPLEMENT_DYNAMIC_CLASS(wxQtGraphicsRenderer, wxGraphicsRenderer);
+
+wxGraphicsContext* wxQtGraphicsRenderer::CreateContext(const wxWindowDC& dc)
+{
+ return new wxQtGraphicsContext(this, dc);
+}
+
+wxGraphicsContext* wxQtGraphicsRenderer::CreateContext(const wxMemoryDC& dc)
+{
+ return new wxQtGraphicsContext(this, dc);
+}
+
+#if wxUSE_PRINTING_ARCHITECTURE
+wxGraphicsContext* wxQtGraphicsRenderer::CreateContext(const wxPrinterDC& dc)
+{
+ return new wxQtGraphicsContext(this, dc);
+}
+#endif
+
+wxGraphicsContext*
+wxQtGraphicsRenderer::CreateContextFromNativeContext(void* context)
+{
+ return new wxQtGraphicsContext(this, static_cast(context));
+}
+
+wxGraphicsContext*
+wxQtGraphicsRenderer::CreateContextFromNativeWindow(void* window)
+{
+ return new wxQtGraphicsContext(this, static_cast(window));
+}
+
+#if wxUSE_IMAGE
+wxGraphicsContext* wxQtGraphicsRenderer::CreateContextFromImage(wxImage& image)
+{
+ return new wxQtImageContext(this, image);
+}
+#endif // wxUSE_IMAGE
+
+wxGraphicsContext* wxQtGraphicsRenderer::CreateMeasuringContext()
+{
+ return new wxQtMeasuringContext(this);
+}
+
+wxGraphicsContext* wxQtGraphicsRenderer::CreateContext(wxWindow* window)
+{
+ return new wxQtGraphicsContext(this, window);
+}
+
+// Path
+
+wxGraphicsPath wxQtGraphicsRenderer::CreatePath()
+{
+ wxGraphicsPath path;
+ path.SetRefData(new wxQtGraphicsPathData(this));
+ return path;
+}
+
+// Matrix
+
+wxGraphicsMatrix wxQtGraphicsRenderer::CreateMatrix(wxDouble a, wxDouble b,
+ wxDouble c, wxDouble d,
+ wxDouble tx, wxDouble ty)
+
+{
+ wxGraphicsMatrix m;
+ wxQtMatrixData* data = new wxQtMatrixData(this);
+ data->Set(a, b, c, d, tx, ty);
+ m.SetRefData(data);
+ return m;
+}
+
+wxGraphicsPen wxQtGraphicsRenderer::CreatePen(const wxGraphicsPenInfo& info)
+{
+ wxGraphicsPen p;
+ if ( info.GetStyle() != wxPENSTYLE_TRANSPARENT )
+ {
+ p.SetRefData(new wxQtPenData(this, info));
+ }
+ return p;
+}
+
+wxGraphicsBrush wxQtGraphicsRenderer::CreateBrush(const wxBrush& brush)
+{
+ wxGraphicsBrush p;
+ if ( brush.IsOk() && brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT )
+ {
+ p.SetRefData(new wxQtBrushData(this, brush));
+ }
+ return p;
+}
+
+wxGraphicsBrush wxQtGraphicsRenderer::CreateLinearGradientBrush(
+ wxDouble x1, wxDouble y1,
+ wxDouble x2, wxDouble y2,
+ const wxGraphicsGradientStops& stops)
+{
+ wxGraphicsBrush p;
+ wxQtBrushData* d = new wxQtBrushData(this);
+ d->CreateLinearGradientBrush(x1, y1, x2, y2, stops);
+ p.SetRefData(d);
+ return p;
+}
+
+wxGraphicsBrush wxQtGraphicsRenderer::CreateRadialGradientBrush(
+ wxDouble xo, wxDouble yo,
+ wxDouble xc, wxDouble yc, wxDouble r,
+ const wxGraphicsGradientStops& stops)
+{
+ wxGraphicsBrush p;
+ wxQtBrushData* d = new wxQtBrushData(this);
+ d->CreateRadialGradientBrush(xo, yo, xc, yc, r, stops);
+ p.SetRefData(d);
+ return p;
+}
+
+wxGraphicsFont
+wxQtGraphicsRenderer::CreateFont(const wxFont& font, const wxColour& col)
+{
+ wxGraphicsFont p;
+ if ( font.IsOk() )
+ {
+ p.SetRefData(new wxQtFontData(this, font, col));
+ }
+ return p;
+}
+
+wxGraphicsFont wxQtGraphicsRenderer::CreateFont(
+ double sizeInPixels,
+ const wxString& facename,
+ int flags,
+ const wxColour& col)
+{
+ wxGraphicsFont font;
+ font.SetRefData(new wxQtFontData(this, sizeInPixels, facename, flags, col));
+ return font;
+}
+
+wxGraphicsBitmap wxQtGraphicsRenderer::CreateBitmap(const wxBitmap& bmp)
+{
+ wxGraphicsBitmap p;
+ if ( bmp.IsOk() )
+ {
+ p.SetRefData(new wxQtBitmapData(this, bmp));
+ }
+ return p;
+}
+
+#if wxUSE_IMAGE
+
+wxGraphicsBitmap
+wxQtGraphicsRenderer::CreateBitmapFromImage(const wxImage& image)
+{
+ wxGraphicsBitmap bmp;
+ if ( image.IsOk() )
+ {
+ bmp.SetRefData(new wxQtBitmapData(this, image));
+ }
+ return bmp;
+}
+
+wxImage wxQtGraphicsRenderer::CreateImageFromBitmap(const wxGraphicsBitmap& bmp)
+{
+ const wxQtBitmapData* const
+ data = static_cast(bmp.GetBitmapData());
+ return data->DoConvertToImage();
+}
+#endif // wxUSE_IMAGE
+
+wxGraphicsBitmap
+wxQtGraphicsRenderer::CreateBitmapFromNativeBitmap(void* bitmap)
+{
+ wxGraphicsBitmap p;
+ if ( bitmap != NULL )
+ {
+ p.SetRefData(new wxQtBitmapData(this, (QPixmap*)bitmap));
+ }
+ return p;
+}
+
+wxGraphicsBitmap
+wxQtGraphicsRenderer::CreateSubBitmap(const wxGraphicsBitmap& bitmap,
+ wxDouble x, wxDouble y,
+ wxDouble w, wxDouble h)
+{
+ wxCHECK_MSG(!bitmap.IsNull(), wxNullGraphicsBitmap, wxS("Invalid bitmap"));
+
+ const QPixmap* sourcePixmap = wxQtBitmapData::GetPixmapFromBitmap(bitmap);
+ wxCHECK_MSG(sourcePixmap, wxNullGraphicsBitmap, wxS("Invalid bitmap"));
+
+ const int srcWidth = sourcePixmap->width();
+ const int srcHeight = sourcePixmap->height();
+ const int dstWidth = wxRound(w);
+ const int dstHeight = wxRound(h);
+
+ wxCHECK_MSG(x >= 0.0 && y >= 0.0 && dstWidth > 0 && dstHeight > 0 &&
+ x + dstWidth <= srcWidth && y + dstHeight <= srcHeight,
+ wxNullGraphicsBitmap, wxS("Invalid bitmap region"));
+
+ QPixmap* subPixmap = new QPixmap(sourcePixmap->copy(x, y, w, h));
+
+ wxGraphicsBitmap bmpRes;
+ bmpRes.SetRefData(new wxQtBitmapData(this, subPixmap));
+ return bmpRes;
+}
+
+wxString wxQtGraphicsRenderer::GetName() const
+{
+ return "qt";
+}
+
+void wxQtGraphicsRenderer::GetVersion(int *major, int *minor, int *micro) const
+{
+ if ( major ) *major = QT_VERSION_MAJOR;
+ if ( minor ) *minor = QT_VERSION_MINOR;
+ if ( micro ) *micro = QT_VERSION_PATCH;
+}
+
+static wxQtGraphicsRenderer gs_qtGraphicsRenderer;
+
+wxGraphicsRenderer* wxGraphicsRenderer::GetDefaultRenderer()
+{
+ return &gs_qtGraphicsRenderer;
+}
+
+#endif // wxUSE_GRAPHICS_CONTEXT
diff --git a/src/qt/listbox.cpp b/src/qt/listbox.cpp
index 9723399523..6b5152b60b 100644
--- a/src/qt/listbox.cpp
+++ b/src/qt/listbox.cpp
@@ -45,7 +45,8 @@ void wxQtListWidget::doubleClicked( const QModelIndex &index )
}
-wxListBox::wxListBox()
+wxListBox::wxListBox() :
+ m_qtListWidget(NULL)
{
Init();
}
@@ -85,9 +86,9 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
const wxValidator& validator,
const wxString& name)
{
- Init();
+ DoCreate(parent, style);
+
QListWidgetItem* item;
- m_qtWindow = m_qtListWidget = new wxQtListWidget( parent, this );
while ( n-- > 0 )
{
@@ -106,17 +107,50 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
bool wxListBox::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
- const wxArrayString& WXUNUSED(choices),
+ const wxArrayString& choices,
long style,
const wxValidator& validator,
const wxString& name)
{
- Init();
- m_qtWindow = m_qtListWidget = new wxQtListWidget( parent, this );
+ DoCreate(parent, style);
+
+ QStringList items;
+
+ for (size_t i = 0; i < choices.size(); ++i)
+ items.push_back(wxQtConvertString(choices[i]));
+
+ m_qtListWidget->addItems(items);
return wxListBoxBase::Create( parent, id, pos, size, style, validator, name );
}
+void wxListBox::DoCreate(wxWindow* parent, long style)
+{
+ Init();
+
+ m_qtWindow =
+ m_qtListWidget = new wxQtListWidget( parent, this );
+
+ if ( style & wxLB_SORT )
+ {
+ m_qtListWidget->setSortingEnabled(true);
+ }
+
+ // The following styles are mutually exclusive
+ if ( style & wxLB_SINGLE )
+ {
+ m_qtListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+ }
+ else if ( style & wxLB_MULTIPLE )
+ {
+ m_qtListWidget->setSelectionMode(QAbstractItemView::MultiSelection);
+ }
+ else if ( style & wxLB_EXTENDED )
+ {
+ wxMISSING_IMPLEMENTATION( wxSTRINGIZE( wxLB_EXTENDED ));
+ }
+}
+
void wxListBox::Init()
{
#if wxUSE_CHECKLISTBOX
@@ -130,9 +164,16 @@ bool wxListBox::IsSelected(int n) const
return item->isSelected();
}
-int wxListBox::GetSelections(wxArrayInt& WXUNUSED(aSelections)) const
+int wxListBox::GetSelections(wxArrayInt& aSelections) const
{
- return 0;
+ aSelections.clear();
+
+ Q_FOREACH(QListWidgetItem* l, m_qtListWidget->selectedItems())
+ {
+ aSelections.push_back( m_qtListWidget->row(l) );
+ }
+
+ return aSelections.size();
}
unsigned wxListBox::GetCount() const
@@ -141,13 +182,13 @@ unsigned wxListBox::GetCount() const
}
wxString wxListBox::GetString(unsigned int n) const
-{
+{
QListWidgetItem* item = m_qtListWidget->item(n);
wxCHECK_MSG(item != NULL, wxString(), wxT("wrong listbox index") );
return wxQtConvertString( item->text() );
}
-void wxListBox::SetString(unsigned int n, const wxString& WXUNUSED(s))
+void wxListBox::SetString(unsigned int n, const wxString& s)
{
QListWidgetItem* item = m_qtListWidget->item(n);
wxCHECK_RET(item != NULL, wxT("wrong listbox index") );
@@ -156,20 +197,36 @@ void wxListBox::SetString(unsigned int n, const wxString& WXUNUSED(s))
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
item->setCheckState(Qt::Unchecked);
}
+ item->setText(wxQtConvertString(s));
}
int wxListBox::GetSelection() const
{
- return m_qtListWidget->currentIndex().row();
+ if ( m_qtListWidget->selectedItems().empty() )
+ {
+ return wxNOT_FOUND;
+ }
+
+
+ QListWidgetItem* item = m_qtListWidget->selectedItems().first();
+
+ return m_qtListWidget->row(item);
}
-void wxListBox::DoSetFirstItem(int WXUNUSED(n))
+void wxListBox::DoSetFirstItem(int n)
{
+ m_qtListWidget->scrollToItem(m_qtListWidget->item(n), QAbstractItemView::PositionAtTop);
}
void wxListBox::DoSetSelection(int n, bool select)
{
- return m_qtListWidget->setCurrentRow(n, select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect );
+ if ( n == wxNOT_FOUND )
+ {
+ UnSelectAll();
+ return;
+ }
+
+ m_qtListWidget->setItemSelected( m_qtListWidget->item(n), select);
}
int wxListBox::DoInsertItems(const wxArrayStringsAdapter & items,
@@ -235,3 +292,11 @@ QScrollArea *wxListBox::QtGetScrollBarsContainer() const
{
return (QScrollArea *) m_qtListWidget;
}
+
+void wxListBox::UnSelectAll()
+{
+ Q_FOREACH(QListWidgetItem* l, m_qtListWidget->selectedItems())
+ {
+ m_qtListWidget->setItemSelected( l, false );
+ }
+}
diff --git a/src/qt/listctrl.cpp b/src/qt/listctrl.cpp
index 8a087ef07d..2c13dd1f40 100644
--- a/src/qt/listctrl.cpp
+++ b/src/qt/listctrl.cpp
@@ -13,6 +13,9 @@
#endif
#include
+#include
+#include
+#include
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
@@ -20,9 +23,105 @@
#include "wx/listctrl.h"
#include "wx/imaglist.h"
+#include "wx/recguard.h"
+
#include "wx/qt/private/winevent.h"
-#include
+namespace
+{
+
+// wxQT Doesn't have a mechanism for "adopting" external widgets so we have to
+// create an instance of wxTextCtrl rather than adopting the control QT would
+// create.
+//
+// Unfortunately the factory is given an internal widget as the parent for
+// editor.
+//
+// To work around these issues we create a wxTextCtl parented by the wxListCtrl
+// then recalculate its position relative to the internal widget.
+class wxQtListTextCtrl : public wxTextCtrl
+{
+public:
+ wxQtListTextCtrl(wxWindow* parent, QWidget* actualParent)
+ : wxTextCtrl(parent, wxID_ANY, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
+ wxNO_BORDER),
+ m_actualParent(actualParent),
+ m_moving(0)
+ {
+
+ Bind(wxEVT_MOVE, &wxQtListTextCtrl::onMove, this);
+ }
+
+ void onMove(wxMoveEvent &event)
+ {
+ // QWidget::move generates a QMoveEvent so we need to guard against
+ // reentrant calls.
+ wxRecursionGuard guard(m_moving);
+ if ( guard.IsInside() )
+ {
+ event.Skip();
+ return;
+ }
+
+ const QPoint eventPosition = wxQtConvertPoint(event.GetPosition());
+ const QPoint globalPosition = m_actualParent->mapToGlobal(eventPosition);
+
+ // For some reason this always gives us the offset from the header info
+ // the internal control. So we need to treat this as an offset rather
+ // than a position.
+ QWidget* widget = GetHandle();
+ const QPoint offset = widget->mapFromGlobal(globalPosition);
+
+ widget->move(eventPosition + offset);
+ }
+
+private:
+ QWidget* m_actualParent;
+ wxRecursionGuardFlag m_moving;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtListTextCtrl);
+};
+
+} // anonymous namespace
+
+
+// QT doesn't give us direct access to the editor within the QTreeWidget.
+// Instead, we'll supply a factory to create the widget for QT and keep track
+// of it ourselves.
+class wxQtItemEditorFactory : public QItemEditorFactory
+{
+public:
+ explicit wxQtItemEditorFactory(wxWindow* parent)
+ : m_parent(parent),
+ m_textCtrl(NULL)
+ {
+ }
+
+ QWidget* createEditor(int WXUNUSED(userType), QWidget* parent) const wxOVERRIDE
+ {
+ m_textCtrl = new wxQtListTextCtrl(m_parent, parent);
+ m_textCtrl->SetFocus();
+ return m_textCtrl->GetHandle();
+ }
+
+ wxTextCtrl* GetEditControl()
+ {
+ return m_textCtrl;
+ }
+
+ void ClearEditor()
+ {
+ delete m_textCtrl;
+ m_textCtrl = NULL;
+ }
+
+private:
+ wxWindow* m_parent;
+ mutable wxTextCtrl* m_textCtrl;
+
+ wxDECLARE_NO_COPY_CLASS(wxQtItemEditorFactory);
+};
class wxQtTreeWidget : public wxQtEventSignalHandler< QTreeWidget, wxListCtrl >
{
@@ -31,18 +130,41 @@ public:
void EmitListEvent(wxEventType typ, QTreeWidgetItem *qitem, int column) const;
+ void closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint) wxOVERRIDE
+ {
+ QTreeWidget::closeEditor(editor, hint);
+ m_editorFactory.ClearEditor();
+ }
+
+ wxTextCtrl *GetEditControl()
+ {
+ return m_editorFactory.GetEditControl();
+ }
+
private:
void itemClicked(QTreeWidgetItem * item, int column);
void itemActivated(QTreeWidgetItem * item, int column);
void itemPressed(QTreeWidgetItem * item, int column);
+
+ void ChangeEditorFactory()
+ {
+ QItemDelegate *qItemDelegate = static_cast(itemDelegate());
+ qItemDelegate->itemEditorFactory();
+ qItemDelegate->setItemEditorFactory(&m_editorFactory);
+ }
+
+ wxQtItemEditorFactory m_editorFactory;
};
wxQtTreeWidget::wxQtTreeWidget( wxWindow *parent, wxListCtrl *handler )
- : wxQtEventSignalHandler< QTreeWidget, wxListCtrl >( parent, handler )
+ : wxQtEventSignalHandler< QTreeWidget, wxListCtrl >( parent, handler ),
+ m_editorFactory(handler)
{
connect(this, &QTreeWidget::itemClicked, this, &wxQtTreeWidget::itemClicked);
connect(this, &QTreeWidget::itemPressed, this, &wxQtTreeWidget::itemPressed);
connect(this, &QTreeWidget::itemActivated, this, &wxQtTreeWidget::itemActivated);
+
+ ChangeEditorFactory();
}
void wxQtTreeWidget::EmitListEvent(wxEventType typ, QTreeWidgetItem *qitem, int column) const
@@ -154,6 +276,7 @@ void wxListCtrl::Init()
m_ownsImageListSmall = false;
m_imageListState = NULL;
m_ownsImageListState = false;
+ m_qtTreeWidget = NULL;
}
wxListCtrl::~wxListCtrl()
@@ -250,7 +373,7 @@ wxRect wxListCtrl::GetViewRect() const
wxTextCtrl* wxListCtrl::GetEditControl() const
{
- return NULL;
+ return m_qtTreeWidget->GetEditControl();
}
QTreeWidgetItem *wxListCtrl::QtGetItem(int id) const
@@ -412,11 +535,11 @@ bool wxListCtrl::SetItemColumnImage(long item, long column, int image)
return SetItem(info);
}
-wxString wxListCtrl::GetItemText(long item, int WXUNUSED(col)) const
+wxString wxListCtrl::GetItemText(long item, int col) const
{
QTreeWidgetItem *qitem = QtGetItem(item);
if ( qitem )
- return wxQtConvertString( qitem->text(0) );
+ return wxQtConvertString( qitem->text(col) );
else
return wxString();
}
@@ -754,14 +877,14 @@ bool wxListCtrl::EnsureVisible(long item)
}
long wxListCtrl::FindItem(long start, const wxString& str, bool partial)
-{
+{
int ret;
QList qitems = m_qtTreeWidget->findItems(
wxQtConvertString(str),
!partial ? Qt::MatchExactly : Qt::MatchContains );
for (int i=0; iindexOfTopLevelItem(qitems.at(0));
+ ret = m_qtTreeWidget->indexOfTopLevelItem(qitems.at(i));
if ( ret >= start )
return ret;
}
diff --git a/src/qt/mdi.cpp b/src/qt/mdi.cpp
index 3655a355de..d3e13edff8 100644
--- a/src/qt/mdi.cpp
+++ b/src/qt/mdi.cpp
@@ -88,6 +88,8 @@ void wxMDIParentFrame::ActivatePrevious()
//##############################################################################
+wxIMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame,wxMDIChildFrameBase)
+
wxMDIChildFrame::wxMDIChildFrame()
{
}
@@ -129,6 +131,8 @@ void wxMDIChildFrame::Activate()
//##############################################################################
+wxIMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow,wxMDIClientWindowBase)
+
wxMDIClientWindow::wxMDIClientWindow()
{
}
diff --git a/src/qt/menu.cpp b/src/qt/menu.cpp
index 79b1337ecb..61d9d5935f 100644
--- a/src/qt/menu.cpp
+++ b/src/qt/menu.cpp
@@ -88,6 +88,12 @@ static void InsertMenuItemAction( const wxMenu *menu, const wxMenuItem *previous
break;
case wxITEM_NORMAL:
{
+ // If the inserted action is a submenu, set the owner for the submenu.
+ if ( item->IsSubMenu() )
+ {
+ item->GetSubMenu()->GetHandle()->setParent(qtMenu, Qt::Popup);
+ }
+
wxWindowID id = item->GetId();
if ( wxIsStockID( id ) )
{
@@ -113,6 +119,9 @@ static void InsertMenuItemAction( const wxMenu *menu, const wxMenuItem *previous
// Insert the action into the actual menu:
QAction *successiveItemAction = ( successiveItem != NULL ) ? successiveItem->GetHandle() : NULL;
qtMenu->insertAction( successiveItemAction, itemAction );
+ // Menu items in Qt can be part of multiple menus, so a menu will not take ownership
+ // when one is added to it. Take it explicitly, otherwise it will create a memory leak.
+ itemAction->setParent(qtMenu);
}
wxMenuItem *wxMenu::DoAppend(wxMenuItem *item)
@@ -211,7 +220,10 @@ bool wxMenuBar::Append( wxMenu *menu, const wxString& title )
QMenu *qtMenu = SetTitle( menu, title );
m_qtMenuBar->addMenu( qtMenu );
-
+ // Menus in Qt can be reused as popups, so a menu bar will not take ownership when
+ // one is added to it. Take it explicitly, otherwise there will be a memory leak.
+ qtMenu->setParent(m_qtMenuBar, Qt::Popup); // must specify window type for correct display!
+
return true;
}
@@ -233,6 +245,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
QMenu *qtMenu = SetTitle( menu, title );
QAction *qtAction = GetActionAt( m_qtMenuBar, pos );
m_qtMenuBar->insertMenu( qtAction, qtMenu );
+ qtMenu->setParent(m_qtMenuBar, Qt::Popup); // must specify window type for correct display!
return true;
}
diff --git a/src/qt/menuitem.cpp b/src/qt/menuitem.cpp
index fa729e33de..1889702327 100644
--- a/src/qt/menuitem.cpp
+++ b/src/qt/menuitem.cpp
@@ -111,7 +111,10 @@ void wxMenuItem::SetBitmap(const wxBitmap& bitmap)
if ( m_kind == wxITEM_NORMAL )
{
m_bitmap = bitmap;
- m_qtAction->setIcon( QIcon( *m_bitmap.GetHandle() ) );
+ if ( !m_bitmap.IsNull() )
+ {
+ m_qtAction->setIcon( QIcon(*m_bitmap.GetHandle()) );
+ }
}
else
{
@@ -159,7 +162,7 @@ wxQtAction::wxQtAction( wxMenu *parent, int id, const wxString &text, const wxSt
connect( this, &QAction::triggered, this, &wxQtAction::onActionTriggered );
}
-
+
void wxQtAction::onActionTriggered( bool checked )
{
diff --git a/src/qt/msgdlg.cpp b/src/qt/msgdlg.cpp
index b80c004564..f0ffa42427 100644
--- a/src/qt/msgdlg.cpp
+++ b/src/qt/msgdlg.cpp
@@ -8,6 +8,7 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/modalhook.h"
#include "wx/msgdlg.h"
#include "wx/qt/private/utils.h"
#include "wx/qt/private/winevent.h"
@@ -17,7 +18,7 @@
class wxQtMessageDialog : public wxQtEventSignalHandler< QMessageBox, wxMessageDialog >
{
-
+
public:
wxQtMessageDialog( wxWindow *parent, wxMessageDialog *handler );
};
@@ -34,7 +35,7 @@ wxMessageDialog::wxMessageDialog( wxWindow *parent, const wxString& message,
Move( pos );
dlg->setText( wxQtConvertString( message ) );
dlg->setWindowTitle( wxQtConvertString( caption ) );
-
+
// Apply the style
SetWindowStyleFlag( style );
@@ -77,7 +78,7 @@ wxMessageDialog::wxMessageDialog( wxWindow *parent, const wxString& message,
dlg->setIcon( QMessageBox::Warning );
}
- if ( style & wxICON_ERROR || style & wxICON_HAND )
+ if ( style & wxICON_ERROR )
{
numIcons++;
dlg->setIcon( QMessageBox::Critical );
@@ -88,7 +89,7 @@ wxMessageDialog::wxMessageDialog( wxWindow *parent, const wxString& message,
numIcons++;
dlg->setIcon( QMessageBox::Question );
}
-
+
if ( style & wxICON_INFORMATION )
{
numIcons++;
@@ -111,10 +112,13 @@ wxMessageDialog::wxMessageDialog( wxWindow *parent, const wxString& message,
PostCreation();
}
+wxIMPLEMENT_CLASS(wxMessageDialog,wxDialog);
+
int wxMessageDialog::ShowModal()
{
+ WX_HOOK_MODAL_DIALOG();
wxCHECK_MSG( m_qtWindow, -1, "Invalid dialog" );
-
+
// Exec may return a wx identifier if a close event is generated
int ret = static_cast(m_qtWindow)->exec();
switch ( ret )
@@ -130,7 +134,7 @@ int wxMessageDialog::ShowModal()
default:
//wxFAIL_MSG( "unexpected QMessageBox return code" );
return ret;
- }
+ }
}
wxMessageDialog::~wxMessageDialog()
diff --git a/src/qt/nonownedwnd.cpp b/src/qt/nonownedwnd.cpp
index dfb48fbb6f..972c224a2f 100644
--- a/src/qt/nonownedwnd.cpp
+++ b/src/qt/nonownedwnd.cpp
@@ -60,7 +60,7 @@ bool wxNonOwnedWindow::DoSetRegionShape(const wxRegion& region)
}
#if wxUSE_GRAPHICS_CONTEXT
-bool wxNonOwnedWindow::DoSetPathShape(const wxGraphicsPath& path)
+bool wxNonOwnedWindow::DoSetPathShape(const wxGraphicsPath& WXUNUSED(path))
{
wxMISSING_IMPLEMENTATION( __FUNCTION__ );
return true;
diff --git a/src/qt/notebook.cpp b/src/qt/notebook.cpp
index 3730c67782..0f4c2ae062 100644
--- a/src/qt/notebook.cpp
+++ b/src/qt/notebook.cpp
@@ -50,7 +50,8 @@ void wxQtTabWidget::currentChanged(int index)
}
-wxNotebook::wxNotebook()
+wxNotebook::wxNotebook() :
+ m_qtTabWidget(NULL)
{
}
@@ -154,10 +155,7 @@ bool wxNotebook::InsertPage(size_t n, wxWindow *page, const wxString& text,
// reenable firing qt signals as internal wx initialization was completed
m_qtTabWidget->blockSignals(false);
- if (bSelect && GetPageCount() > 1)
- {
- SetSelection( n );
- }
+ DoSetSelectionAfterInsertion(n, bSelect);
return true;
}
@@ -167,27 +165,51 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
return sizePage;
}
-int wxNotebook::DoSetSelection(size_t page, int flags)
+bool wxNotebook::DeleteAllPages()
+{
+ // Nothing to do if the notebook was not created yet,
+ // and return true just like other ports do.
+ if ( !m_qtTabWidget )
+ return true;
+
+ // Block signals to not receive selection changed updates
+ // which are sent by Qt after the selected page was deleted.
+ m_qtTabWidget->blockSignals(true);
+
+ // Pages will be deleted one by one in the base class.
+ // There's no need to explicitly clear() the Qt control.
+ bool deleted = wxNotebookBase::DeleteAllPages();
+
+ m_qtTabWidget->blockSignals(false);
+
+ return deleted;
+}
+
+int wxNotebook::SetSelection(size_t page)
{
wxCHECK_MSG(page < GetPageCount(), wxNOT_FOUND, "invalid notebook index");
int selOld = GetSelection();
- // do not fire signals for certain methods (i.e. ChangeSelection
- if ( !(flags & SetSelection_SendEvent) )
- {
- m_qtTabWidget->blockSignals(true);
- }
// change the QTabWidget selected page:
m_selection = page;
m_qtTabWidget->setCurrentIndex( page );
- if ( !(flags & SetSelection_SendEvent) )
- {
- m_qtTabWidget->blockSignals(false);
- }
+
return selOld;
}
+int wxNotebook::ChangeSelection(size_t nPage)
+{
+ // ChangeSelection() is not supposed to generate events, unlike
+ // SetSelection().
+ m_qtTabWidget->blockSignals(true);
+
+ const int selOld = SetSelection(nPage);
+
+ m_qtTabWidget->blockSignals(false);
+
+ return selOld;
+}
wxWindow *wxNotebook::DoRemovePage(size_t page)
{
diff --git a/src/qt/palette.cpp b/src/qt/palette.cpp
index 933a99943b..8c87a3a9c1 100644
--- a/src/qt/palette.cpp
+++ b/src/qt/palette.cpp
@@ -10,6 +10,8 @@
#include "wx/palette.h"
+wxIMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
+
wxPalette::wxPalette()
{
}
diff --git a/src/qt/pen.cpp b/src/qt/pen.cpp
index f09d93108c..e2bedad819 100644
--- a/src/qt/pen.cpp
+++ b/src/qt/pen.cpp
@@ -13,6 +13,8 @@
#include "wx/qt/private/utils.h"
#include
+wxIMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject);
+
static Qt::PenStyle ConvertPenStyle(wxPenStyle style)
{
switch(style)
@@ -35,7 +37,7 @@ static Qt::PenStyle ConvertPenStyle(wxPenStyle style)
case wxPENSTYLE_USER_DASH:
return Qt::CustomDashLine;
-
+
case wxPENSTYLE_STIPPLE:
wxMISSING_IMPLEMENTATION( "wxPENSTYLE_STIPPLE" );
break;
@@ -210,24 +212,24 @@ class wxPenRefData: public wxGDIRefData
m_dashes = NULL;
m_dashesSize = 0;
}
-
+
wxPenRefData()
{
defaultPen();
}
-
+
wxPenRefData( const wxPenRefData& data )
: wxGDIRefData()
+ , m_qtPen(data.m_qtPen)
{
- m_qtPen = data.m_qtPen;
defaultPen();
}
-
+
bool operator == (const wxPenRefData& data) const
{
return m_qtPen == data.m_qtPen;
}
-
+
QPen m_qtPen;
const wxDash *m_dashes;
int m_dashesSize;
@@ -262,9 +264,9 @@ wxPen::wxPen(const wxColour& col, int width, int style)
bool wxPen::operator==(const wxPen& pen) const
{
if (m_refData == pen.m_refData) return true;
-
+
if (!m_refData || !pen.m_refData) return false;
-
+
return ( *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData );
}
@@ -307,14 +309,14 @@ void wxPen::SetDashes(int nb_dashes, const wxDash *dash)
AllocExclusive();
((wxPenRefData *)m_refData)->m_dashes = dash;
((wxPenRefData *)m_refData)->m_dashesSize = nb_dashes;
-
+
QVector dashes;
if (dash)
{
for (int i = 0; i < nb_dashes; i++)
dashes << dash[i];
}
-
+
M_PENDATA.setDashPattern(dashes);
}
diff --git a/src/qt/radiobox.cpp b/src/qt/radiobox.cpp
index 32ccb686b1..351251fb78 100644
--- a/src/qt/radiobox.cpp
+++ b/src/qt/radiobox.cpp
@@ -56,7 +56,10 @@ void wxQtButtonGroup::buttonClicked(int index) {
wxIMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl);
-wxRadioBox::wxRadioBox()
+wxRadioBox::wxRadioBox() :
+ m_qtGroupBox(NULL),
+ m_qtButtonGroup(NULL),
+ m_qtGridLayout(NULL)
{
}
@@ -107,15 +110,48 @@ bool wxRadioBox::Create(wxWindow *parent,
}
-template < typename Button >
-static void AddChoices( QButtonGroup *qtButtonGroup, QBoxLayout *qtBoxLayout, int count, const wxString choices[] )
+static void AddChoices( QButtonGroup *qtButtonGroup, QGridLayout *qtGridLayout, int count, const wxString choices[], int style, int majorDim )
{
- Button *btn;
- while ( count-- > 0 )
+ if ( count <= 0 )
+ return;
+
+ // wxRA_SPECIFY_COLS means that we arrange buttons in
+ // left to right order and GetMajorDim() is the number of columns while
+ // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
+ // GetMajorDim() is the number of rows.
+
+ const bool columnMajor = style & wxRA_SPECIFY_COLS;
+ const int numMajor = majorDim > 0 ? majorDim : count;
+
+ bool isFirst = true;
+
+ for ( int i = 0; i < count; ++i )
{
- btn = new Button( wxQtConvertString( *choices++ ));
- qtButtonGroup->addButton( btn );
- qtBoxLayout->addWidget( btn );
+ QRadioButton *btn = new QRadioButton(wxQtConvertString (choices[i]) );
+ qtButtonGroup->addButton( btn, i );
+
+ int row;
+ int col;
+
+ if (columnMajor)
+ {
+ col = i % numMajor;
+ row = i / numMajor;
+
+ }
+ else
+ {
+ col = i / numMajor;
+ row = i % numMajor;
+ }
+
+ qtGridLayout->addWidget( btn, row, col );
+
+ if (isFirst)
+ {
+ btn->setChecked( true );
+ isFirst = false;
+ }
}
}
@@ -126,7 +162,7 @@ bool wxRadioBox::Create(wxWindow *parent,
const wxPoint& pos,
const wxSize& size,
int n, const wxString choices[],
- int WXUNUSED(majorDim),
+ int majorDim,
long style,
const wxValidator& val,
const wxString& name)
@@ -135,19 +171,24 @@ bool wxRadioBox::Create(wxWindow *parent,
m_qtGroupBox->setTitle( wxQtConvertString( title ) );
m_qtButtonGroup = new wxQtButtonGroup( m_qtGroupBox, this );
- // wxRA_SPECIFY_COLS means that we arrange buttons in
- // left to right order and GetMajorDim() is the number of columns while
- // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
- // GetMajorDim() is the number of rows.
- if ( style & wxRA_SPECIFY_COLS )
- m_qtBoxLayout = new QHBoxLayout;
- else if ( style & wxRA_SPECIFY_ROWS )
- m_qtBoxLayout = new QVBoxLayout;
+ if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) )
+ style |= wxRA_SPECIFY_COLS;
- AddChoices< QRadioButton >( m_qtButtonGroup, m_qtBoxLayout, n, choices );
- m_qtBoxLayout->addStretch(1);
- m_qtGroupBox->setLayout(m_qtBoxLayout);
+ m_qtGridLayout = new QGridLayout;
+ AddChoices( m_qtButtonGroup, m_qtGridLayout, n, choices, style, majorDim );
+
+ QVBoxLayout *vertLayout = new QVBoxLayout;
+ vertLayout->addLayout(m_qtGridLayout);
+ vertLayout->addStretch();
+
+ QHBoxLayout *horzLayout = new QHBoxLayout;
+ horzLayout->addLayout(vertLayout);
+ horzLayout->addStretch();
+
+ m_qtGroupBox->setLayout(horzLayout);
+
+ SetMajorDim(majorDim == 0 ? n : majorDim, style);
return QtCreateControl( parent, id, pos, size, style, val, name );
}
@@ -168,19 +209,90 @@ static QAbstractButton *GetButtonAt( const QButtonGroup *group, unsigned int n )
bool wxRadioBox::Enable(unsigned int n, bool enable)
{
- QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, n );
- CHECK_BUTTON( qtButton, false );
+ if ( enable && !m_qtGroupBox->isEnabled() )
+ {
+ m_qtGroupBox->setEnabled( true );
+
+ for ( unsigned int i = 0; i < GetCount(); ++i )
+ {
+ QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, i );
+ CHECK_BUTTON( qtButton, false );
+
+ qtButton->setEnabled( i == n );
+ }
+ }
+ else
+ {
+ QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, n );
+ CHECK_BUTTON( qtButton, false );
+ qtButton->setEnabled(enable);
+ }
+
+ return true;
+}
+
+bool wxRadioBox::Enable( bool enable )
+{
+ if ( m_qtGroupBox->isEnabled() == enable )
+ {
+ for ( unsigned int i = 0; i < GetCount(); ++i )
+ {
+ QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, i );
+ CHECK_BUTTON( qtButton, false );
+ qtButton->setEnabled( enable );
+ }
+ }
+
+ m_qtGroupBox->setEnabled( enable );
- qtButton->setEnabled( enable );
return true;
}
bool wxRadioBox::Show(unsigned int n, bool show)
{
- QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, n );
- CHECK_BUTTON( qtButton, false );
+ if ( show && !m_qtGroupBox->isVisible() )
+ {
+ m_qtGroupBox->setVisible(true);
+
+ for ( unsigned int i = 0; i < GetCount(); ++i )
+ {
+ QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, i );
+ CHECK_BUTTON( qtButton, false );
+
+ i == n ? qtButton->setVisible( true ) : qtButton->setVisible( false );
+ }
+ }
+ else
+ {
+ QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, n );
+ CHECK_BUTTON( qtButton, false );
+
+ qtButton->setVisible( show );
+ }
+
+ return true;
+}
+
+bool wxRadioBox::Show( bool show )
+{
+ if ( !wxControl::Show(show) )
+ return false;
+
+ if ( !m_qtGroupBox )
+ return false;
+
+ if( m_qtGroupBox->isVisible() == show )
+ {
+ for( unsigned int i = 0; i < GetCount(); ++i )
+ {
+ QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, i );
+ CHECK_BUTTON( qtButton, false );
+ qtButton->setVisible( show );
+ }
+ }
+
+ m_qtGroupBox->setVisible( show );
- qtButton->setVisible( show );
return true;
}
@@ -200,7 +312,7 @@ bool wxRadioBox::IsItemShown(unsigned int n) const
return qtButton->isVisible();
}
-unsigned wxRadioBox::GetCount() const
+unsigned int wxRadioBox::GetCount() const
{
QList< QAbstractButton * > buttons = m_qtButtonGroup->buttons();
return buttons.size();
diff --git a/src/qt/radiobut.cpp b/src/qt/radiobut.cpp
index 64e2100cd4..4e9de1cdf5 100644
--- a/src/qt/radiobut.cpp
+++ b/src/qt/radiobut.cpp
@@ -10,10 +10,81 @@
#include "wx/radiobut.h"
#include "wx/qt/private/converter.h"
+#include "wx/qt/private/winevent.h"
#include
+#include
-wxRadioButton::wxRadioButton()
+namespace
+{
+
+// Tiny helper applying a safe cast to return the handle of wxRadioButton as
+// its actual type.
+inline
+QRadioButton* QtGetRadioButton(wxRadioButton* radioBtn)
+{
+ return static_cast(radioBtn->GetHandle());
+}
+
+void QtStartNewGroup(QRadioButton* qtRadioButton)
+{
+ // Note that the QButtonGroup created here will be deallocated when its
+ // parent // QRadioButton is destroyed.
+ QButtonGroup* qtButtonGroup = new QButtonGroup(qtRadioButton);
+ qtButtonGroup->addButton(qtRadioButton);
+}
+
+bool QtTryJoiningExistingGroup(wxRadioButton* radioBtnThis)
+{
+ for ( wxWindow* previous = radioBtnThis->GetPrevSibling();
+ previous;
+ previous = previous->GetPrevSibling() )
+ {
+ if ( wxRadioButton* radioBtn = wxDynamicCast(previous, wxRadioButton) )
+ {
+ // We should never join the exclusive group of wxRB_SINGLE button.
+ if ( !radioBtn->HasFlag(wxRB_SINGLE) )
+ {
+ if ( QButtonGroup *qtGroup = QtGetRadioButton(radioBtn)->group() )
+ {
+ qtGroup->addButton(QtGetRadioButton(radioBtnThis));
+ return true;
+ }
+ }
+
+ break;
+ }
+ }
+
+ return false;
+}
+
+} // anonymous namespace
+
+class wxQtRadioButton : public wxQtEventSignalHandler< QRadioButton, wxRadioButton >
+{
+public:
+ wxQtRadioButton( wxWindow *parent, wxRadioButton *handler ) :
+ wxQtEventSignalHandler< QRadioButton, wxRadioButton >(parent, handler)
+
+ {
+ connect(this, &QRadioButton::clicked, this, &wxQtRadioButton::OnClicked);
+ }
+
+ void OnClicked(bool checked)
+ {
+ wxRadioButton* handler = GetHandler();
+ if ( handler == NULL )
+ return;
+
+ wxCommandEvent event(wxEVT_RADIOBUTTON, handler->GetId());
+ event.SetInt(checked ? 1 : 0);
+ EmitEvent(event);
+ }
+};
+
+wxRadioButton::wxRadioButton() :
+ m_qtRadioButton(NULL)
{
}
@@ -38,10 +109,30 @@ bool wxRadioButton::Create( wxWindow *parent,
const wxValidator& validator,
const wxString& name)
{
- m_qtRadioButton = new QRadioButton( parent->GetHandle() );
+ m_qtRadioButton = new wxQtRadioButton( parent, this );
m_qtRadioButton->setText( wxQtConvertString( label ));
- return QtCreateControl( parent, id, pos, size, style, validator, name );
+ if ( !QtCreateControl(parent, id, pos, size, style, validator, name) )
+ return false;
+
+ // Check if we need to create a new button group: this must be done when
+ // explicitly requested to do so (wxRB_GROUP) but also for wxRB_SINGLE
+ // buttons to prevent them implicitly becoming part of an existing group.
+ if ( (style & wxRB_GROUP) || (style & wxRB_SINGLE) )
+ {
+ QtStartNewGroup(m_qtRadioButton);
+ }
+ else
+ {
+ // Otherwise try to join an already existing group. Currently we don't
+ // do anything if joining it fails, i.e. if there is no current group
+ // yet, because the radio buttons not explicitly associated with some
+ // group still work as if they were part of one, so we just ignore the
+ // return value of this function.
+ QtTryJoiningExistingGroup(this);
+ }
+
+ return true;
}
void wxRadioButton::SetValue(bool value)
diff --git a/src/qt/region.cpp b/src/qt/region.cpp
index 45936ab577..0af8228d53 100644
--- a/src/qt/region.cpp
+++ b/src/qt/region.cpp
@@ -20,42 +20,44 @@
class wxRegionRefData: public wxGDIRefData
{
- public:
- wxRegionRefData()
- {
- }
+public:
+ wxRegionRefData()
+ {
+ }
- wxRegionRefData( QRect r ) : m_qtRegion( r )
- {
- }
+ wxRegionRefData( QRect r ) : m_qtRegion( r )
+ {
+ }
- wxRegionRefData( QBitmap b ) : m_qtRegion ( b )
- {
- }
+ wxRegionRefData( QBitmap b ) : m_qtRegion ( b )
+ {
+ }
- wxRegionRefData( QPolygon p, Qt::FillRule fr ) : m_qtRegion( p, fr )
- {
- }
+ wxRegionRefData( QPolygon p, Qt::FillRule fr ) : m_qtRegion( p, fr )
+ {
+ }
- wxRegionRefData( const wxRegionRefData& data )
+ wxRegionRefData( const wxRegionRefData& data )
: wxGDIRefData()
- {
- m_qtRegion = data.m_qtRegion;
- }
-
- bool operator == (const wxRegionRefData& data) const
- {
- return m_qtRegion == data.m_qtRegion;
- }
-
- QRegion m_qtRegion;
+ , m_qtRegion(data.m_qtRegion)
+ {
+ }
+
+ bool operator == (const wxRegionRefData& data) const
+ {
+ return m_qtRegion == data.m_qtRegion;
+ }
+
+ QRegion m_qtRegion;
};
#define M_REGIONDATA ((wxRegionRefData *)m_refData)->m_qtRegion
+wxIMPLEMENT_DYNAMIC_CLASS(wxRegion,wxGDIObject);
+
wxRegion::wxRegion()
{
- m_refData = new wxRegionRefData();
+ m_refData = NULL;
}
wxRegion::wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
@@ -111,34 +113,40 @@ wxRegion::wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance)
memset(raw.get(), 0, bmp.GetWidth()*bmp.GetHeight());
QImage img(bmp.GetHandle()->toImage());
- int r = transp.Red(), g = transp.Green(), b = transp.Blue();
- for(int y=0; y tolerance ||
abs(c.green() - g) > tolerance ||
abs(c.blue() - b) > tolerance) {
- int ind = y*img.width()+x;
+ const int ind = y*img.width()+x;
raw[ind>>3] |= 1<<(ind&7);
}
}
}
-
+
m_refData = new wxRegionRefData(QBitmap::fromData(bmp.GetHandle()->size(), raw.get()));
}
bool wxRegion::IsEmpty() const
{
- wxCHECK_MSG( IsOk(), true, "Invalid region" );
-
+ if ( IsNull() )
+ return true;
+
+ wxCHECK_MSG(IsOk(), true, "Invalid region" );
+
return M_REGIONDATA.isEmpty();
}
void wxRegion::Clear()
{
- wxCHECK_RET( IsOk(), "Invalid region" );
+ if ( IsNull() )
+ return;
+
+ wxCHECK_RET(IsOk(), "Invalid region" );
AllocExclusive();
M_REGIONDATA = QRegion();
@@ -146,6 +154,7 @@ void wxRegion::Clear()
void wxRegion::QtSetRegion(QRegion region)
{
+ AllocExclusive();
M_REGIONDATA = region;
}
@@ -163,34 +172,43 @@ bool wxRegion::DoIsEqual(const wxRegion& region) const
{
wxCHECK_MSG( IsOk(), false, "Invalid region" );
wxCHECK_MSG( region.IsOk(), false, "Invalid parameter region" );
-
+
return M_REGIONDATA == region.GetHandle();
}
bool wxRegion::DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const
{
+ if ( m_refData == NULL )
+ {
+ x =
+ y =
+ w =
+ h = 0;
+ return false;
+ }
+
wxCHECK_MSG( IsOk(), false, "Invalid region" );
- QRect bounding = M_REGIONDATA.boundingRect();
+ const QRect bounding = M_REGIONDATA.boundingRect();
x = bounding.x();
y = bounding.y();
w = bounding.width();
h = bounding.height();
-
+
return true;
}
wxRegionContain wxRegion::DoContainsPoint(wxCoord x, wxCoord y) const
{
wxCHECK_MSG( IsOk(), wxOutRegion, "Invalid region" );
-
+
return M_REGIONDATA.contains( QPoint( x, y ) ) ? wxInRegion : wxOutRegion;
}
wxRegionContain wxRegion::DoContainsRect(const wxRect& rect) const
{
wxCHECK_MSG( IsOk(), wxOutRegion, "Invalid region" );
-
+
return M_REGIONDATA.contains( wxQtConvertRect( rect ) ) ? wxInRegion : wxOutRegion;
}
@@ -202,47 +220,98 @@ bool wxRegion::DoOffset(wxCoord x, wxCoord y)
return true;
}
-bool wxRegion::DoUnionWithRect(const wxRect& rect)
+// combine another region with this one
+bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op)
{
- wxCHECK_MSG( IsOk(), false, "Invalid region" );
+ // we can't use the API functions if we don't have a valid region
+ if ( !m_refData )
+ {
+ // combining with an empty/invalid region works differently depending
+ // on the operation
+ switch ( op )
+ {
+ case wxRGN_COPY:
+ case wxRGN_OR:
+ case wxRGN_XOR:
+ *this = region;
+ break;
- M_REGIONDATA = M_REGIONDATA.united( wxQtConvertRect( rect ) );
+ default:
+ wxFAIL_MSG(wxT("unknown region operation"));
+ wxFALLTHROUGH;
+
+ case wxRGN_AND:
+ case wxRGN_DIFF:
+ // leave empty/invalid
+ return false;
+ }
+ }
+ else // we have a valid region
+ {
+ AllocExclusive();
+
+ switch ( op )
+ {
+ case wxRGN_AND:
+ M_REGIONDATA = M_REGIONDATA.intersected(region.GetHandle());
+ break;
+
+ case wxRGN_OR:
+ M_REGIONDATA = M_REGIONDATA.united(region.GetHandle());
+ break;
+
+ case wxRGN_XOR:
+ M_REGIONDATA = M_REGIONDATA.xored(region.GetHandle());
+ break;
+
+ case wxRGN_DIFF:
+ M_REGIONDATA = M_REGIONDATA.subtracted(region.GetHandle());
+ break;
+
+ default:
+ wxFAIL_MSG(wxT("unknown region operation"));
+ wxFALLTHROUGH;
+
+ case wxRGN_COPY:
+ M_REGIONDATA = QRegion(region.GetHandle());
+ break;
+ }
+ }
return true;
}
bool wxRegion::DoUnionWithRegion(const wxRegion& region)
{
- wxCHECK_MSG( IsOk(), false, "Invalid region" );
- wxCHECK_MSG( region.IsOk(), false, "Invalid parameter region" );
-
- M_REGIONDATA = M_REGIONDATA.united( region.GetHandle() );
- return true;
+ return DoCombine(region, wxRGN_OR);
}
bool wxRegion::DoIntersect(const wxRegion& region)
{
- wxCHECK_MSG( IsOk(), false, "Invalid region" );
- wxCHECK_MSG( region.IsOk(), false, "Invalid parameter region" );
-
- M_REGIONDATA = M_REGIONDATA.intersected( region.GetHandle() );
- return true;
+ return DoCombine(region, wxRGN_AND);
}
bool wxRegion::DoSubtract(const wxRegion& region)
{
- wxCHECK_MSG( IsOk(), false, "Invalid region" );
- wxCHECK_MSG( region.IsOk(), false, "Invalid parameter region" );
-
- M_REGIONDATA = M_REGIONDATA.subtracted( region.GetHandle() );
- return true;
+ return DoCombine(region, wxRGN_DIFF);
}
bool wxRegion::DoXor(const wxRegion& region)
{
+ return DoCombine(region, wxRGN_XOR);
+}
+
+bool wxRegion::DoUnionWithRect(const wxRect& rect)
+{
+ if ( m_refData == NULL )
+ {
+ m_refData = new wxRegionRefData(wxQtConvertRect(rect));
+ return true;
+ }
+
wxCHECK_MSG( IsOk(), false, "Invalid region" );
- wxCHECK_MSG( region.IsOk(), false, "Invalid parameter region" );
-
- M_REGIONDATA = M_REGIONDATA.xored( region.GetHandle() );
+
+ AllocExclusive();
+ M_REGIONDATA = M_REGIONDATA.united( wxQtConvertRect( rect ) );
return true;
}
@@ -255,6 +324,8 @@ const QRegion &wxRegion::GetHandle() const
//##############################################################################
+wxIMPLEMENT_DYNAMIC_CLASS(wxRegionIterator,wxObject);
+
wxRegionIterator::wxRegionIterator()
{
m_qtRects = NULL;
@@ -275,17 +346,17 @@ wxRegionIterator::wxRegionIterator(const wxRegionIterator& ri)
wxRegionIterator::~wxRegionIterator()
{
- if ( m_qtRects != NULL )
- delete m_qtRects;
+ delete m_qtRects;
}
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
{
- if ( m_qtRects != NULL )
+ if (this != &ri)
+ {
delete m_qtRects;
-
- m_qtRects = new QVector< QRect >( *ri.m_qtRects );
- m_pos = ri.m_pos;
+ m_qtRects = new QVector< QRect >( *ri.m_qtRects );
+ m_pos = ri.m_pos;
+ }
return *this;
}
@@ -296,8 +367,7 @@ void wxRegionIterator::Reset()
void wxRegionIterator::Reset(const wxRegion& region)
{
- if ( m_qtRects != NULL )
- delete m_qtRects;
+ delete m_qtRects;
m_qtRects = new QVector< QRect >( region.GetHandle().rects() );
m_pos = 0;
@@ -306,7 +376,7 @@ void wxRegionIterator::Reset(const wxRegion& region)
bool wxRegionIterator::HaveRects() const
{
wxCHECK_MSG( m_qtRects != NULL, false, "Invalid iterator" );
-
+
return m_pos < m_qtRects->size();
}
@@ -332,7 +402,7 @@ wxCoord wxRegionIterator::GetX() const
{
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
-
+
return m_qtRects->at( m_pos ).x();
}
@@ -340,7 +410,7 @@ wxCoord wxRegionIterator::GetY() const
{
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
-
+
return m_qtRects->at( m_pos ).y();
}
@@ -353,7 +423,7 @@ wxCoord wxRegionIterator::GetWidth() const
{
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
-
+
return m_qtRects->at( m_pos ).width();
}
@@ -366,7 +436,7 @@ wxCoord wxRegionIterator::GetHeight() const
{
wxCHECK_MSG( m_qtRects != NULL, 0, "Invalid iterator" );
wxCHECK_MSG( m_pos < m_qtRects->size(), 0, "Invalid position" );
-
+
return m_qtRects->at( m_pos ).height();
}
@@ -374,7 +444,7 @@ wxRect wxRegionIterator::GetRect() const
{
wxCHECK_MSG( m_qtRects != NULL, wxRect(), "Invalid iterator" );
wxCHECK_MSG( m_pos < m_qtRects->size(), wxRect(), "Invalid position" );
-
+
return wxQtConvertRect( m_qtRects->at( m_pos ) );
}
diff --git a/src/qt/scrolbar.cpp b/src/qt/scrolbar.cpp
index 99db6cc451..d65beaa73b 100644
--- a/src/qt/scrolbar.cpp
+++ b/src/qt/scrolbar.cpp
@@ -16,10 +16,10 @@
class wxQtScrollBar : public wxQtEventSignalHandler< QScrollBar, wxScrollBar >
{
-
+
public:
wxQtScrollBar( wxWindow *parent, wxScrollBar *handler );
-
+
private:
void actionTriggered( int action );
void sliderReleased();
@@ -27,7 +27,8 @@ class wxQtScrollBar : public wxQtEventSignalHandler< QScrollBar, wxScrollBar >
};
-wxScrollBar::wxScrollBar()
+wxScrollBar::wxScrollBar() :
+ m_qtScrollBar(NULL)
{
}
@@ -100,7 +101,9 @@ void wxScrollBar::SetScrollbar(int position, int WXUNUSED(thumbSize),
{
m_qtScrollBar->setRange( 0, range - pageSize );
m_qtScrollBar->setPageStep( pageSize );
+ m_qtScrollBar->blockSignals(true);
m_qtScrollBar->setValue( position );
+ m_qtScrollBar->blockSignals(false);
m_qtScrollBar->show();
}
else
@@ -157,7 +160,7 @@ void wxQtScrollBar::actionTriggered( int action )
default:
return;
}
-
+
wxScrollBar *handler = GetHandler();
if ( handler )
{
diff --git a/src/qt/slider.cpp b/src/qt/slider.cpp
index 9efc54d529..1b8e1f96a7 100644
--- a/src/qt/slider.cpp
+++ b/src/qt/slider.cpp
@@ -46,7 +46,8 @@ void wxQtSlider::valueChanged(int position)
}
-wxSlider::wxSlider()
+wxSlider::wxSlider() :
+ m_qtSlider(NULL)
{
}
diff --git a/src/qt/spinbutt.cpp b/src/qt/spinbutt.cpp
index 0fca8ba9e4..ec0de2b212 100644
--- a/src/qt/spinbutt.cpp
+++ b/src/qt/spinbutt.cpp
@@ -20,6 +20,7 @@ public:
private:
void valueChanged(int value);
+ virtual void stepBy(int steps) wxOVERRIDE; // see QAbstractSpinBox::stepBy()
};
wxQtSpinButton::wxQtSpinButton( wxWindow *parent, wxSpinButton *handler )
@@ -34,14 +35,33 @@ void wxQtSpinButton::valueChanged(int value)
wxSpinButton *handler = GetHandler();
if ( handler )
{
- wxCommandEvent event( wxEVT_SPIN, handler->GetId() );
+ wxSpinEvent event( wxEVT_SPIN, handler->GetId() );
event.SetInt( value );
EmitEvent( event );
}
}
+void wxQtSpinButton::stepBy(int steps)
+{
+ wxSpinButton* const handler = GetHandler();
+ if ( !handler )
+ return;
-wxSpinButton::wxSpinButton()
+ int eventType = steps < 0 ? wxEVT_SPIN_DOWN : wxEVT_SPIN_UP;
+ wxSpinEvent directionEvent(eventType, handler->GetId());
+ directionEvent.SetPosition(value());
+ directionEvent.SetInt(value() + steps * singleStep());
+ directionEvent.SetEventObject(handler);
+
+ if ( !handler->HandleWindowEvent(directionEvent) || directionEvent.IsAllowed() )
+ {
+ QSpinBox::stepBy(steps);
+ }
+}
+
+
+wxSpinButton::wxSpinButton() :
+ m_qtSpinBox(NULL)
{
}
@@ -64,6 +84,8 @@ bool wxSpinButton::Create(wxWindow *parent,
{
m_qtSpinBox = new wxQtSpinButton( parent, this );
+ m_qtSpinBox->setRange(wxSpinButtonBase::GetMin(), wxSpinButtonBase::GetMax());
+
// Modify the size so that the text field is not visible.
// TODO: Find out the width of the buttons i.e. take the style into account (QStyleOptionSpinBox).
wxSize newSize( size );
@@ -72,6 +94,16 @@ bool wxSpinButton::Create(wxWindow *parent,
return QtCreateControl( parent, id, pos, newSize, style, wxDefaultValidator, name );
}
+void wxSpinButton::SetRange(int min, int max)
+{
+ wxSpinButtonBase::SetRange(min, max); // cache the values
+
+ if ( m_qtSpinBox )
+ {
+ m_qtSpinBox->setRange(min, max);
+ }
+}
+
int wxSpinButton::GetValue() const
{
return m_qtSpinBox->value();
diff --git a/src/qt/spinctrl.cpp b/src/qt/spinctrl.cpp
index e7cdeddff7..1e67adc6af 100644
--- a/src/qt/spinctrl.cpp
+++ b/src/qt/spinctrl.cpp
@@ -18,7 +18,8 @@
#include
template< typename T, typename Widget >
-wxSpinCtrlQt< T, Widget >::wxSpinCtrlQt()
+wxSpinCtrlQt< T, Widget >::wxSpinCtrlQt() :
+ m_qtSpinBox(NULL)
{
}
@@ -40,6 +41,11 @@ bool wxSpinCtrlQt< T, Widget >::Create( wxWindow *parent, wxWindowID id,
if ( style & wxSP_WRAP )
m_qtSpinBox->setWrapping(true);
+ if ( style & wxALIGN_CENTRE_HORIZONTAL )
+ m_qtSpinBox->setAlignment(Qt::AlignHCenter);
+ else if ( style & wxALIGN_RIGHT )
+ m_qtSpinBox->setAlignment(Qt::AlignRight);
+
m_qtSpinBox->setAccelerated(true); // to match gtk behavior
SetRange( min, max );
@@ -148,7 +154,15 @@ public:
this, &wxQtSpinBox::valueChanged);
}
private:
- void valueChanged(int value);
+ void valueChanged(int value)
+ {
+ if ( wxControl *handler = GetHandler() )
+ {
+ wxSpinEvent event( wxEVT_SPINCTRL, handler->GetId() );
+ event.SetInt( value );
+ EmitEvent( event );
+ }
+ }
};
class wxQtDoubleSpinBox : public wxQtSpinBoxBase< QDoubleSpinBox >
@@ -156,7 +170,20 @@ class wxQtDoubleSpinBox : public wxQtSpinBoxBase< QDoubleSpinBox >
public:
wxQtDoubleSpinBox( wxWindow *parent, wxControl *handler )
: wxQtSpinBoxBase< QDoubleSpinBox >( parent, handler )
- { }
+ {
+ connect(this, static_cast(&QDoubleSpinBox::valueChanged),
+ this, &wxQtDoubleSpinBox::valueChanged);
+ }
+private:
+ void valueChanged(double value)
+ {
+ if ( wxControl *handler = GetHandler() )
+ {
+ wxSpinDoubleEvent event( wxEVT_SPINCTRLDOUBLE, handler->GetId() );
+ event.SetValue(value);
+ EmitEvent( event );
+ }
+ }
};
@@ -166,7 +193,7 @@ template class wxSpinCtrlQt< int, QSpinBox >;
wxSpinCtrl::wxSpinCtrl()
{
- Init();
+ Init();
}
wxSpinCtrl::wxSpinCtrl(wxWindow *parent, wxWindowID id, const wxString& value,
@@ -214,17 +241,6 @@ void wxSpinCtrl::SetValue( const wxString &value )
qtSpinBox->setValue( qtSpinBox->valueFromText( wxQtConvertString( value )));
}
-void wxQtSpinBox::valueChanged(int value)
-{
- wxControl *handler = GetHandler();
- if ( handler )
- {
- wxSpinEvent event( wxEVT_SPINCTRL, handler->GetId() );
- event.SetInt( value );
- EmitEvent( event );
- }
-}
-
//##############################################################################
template class wxSpinCtrlQt< double, QDoubleSpinBox >;
diff --git a/src/qt/statbmp.cpp b/src/qt/statbmp.cpp
index b4dbde30f0..d27a57672f 100644
--- a/src/qt/statbmp.cpp
+++ b/src/qt/statbmp.cpp
@@ -21,7 +21,8 @@ public:
};
-wxStaticBitmap::wxStaticBitmap()
+wxStaticBitmap::wxStaticBitmap() :
+ m_qtLabel(NULL)
{
}
diff --git a/src/qt/statbox.cpp b/src/qt/statbox.cpp
index 6af3e2ddb6..9efdecb32a 100644
--- a/src/qt/statbox.cpp
+++ b/src/qt/statbox.cpp
@@ -23,7 +23,8 @@ public:
};
-wxStaticBox::wxStaticBox()
+wxStaticBox::wxStaticBox() :
+ m_qtGroupBox(NULL)
{
}
@@ -55,6 +56,16 @@ QWidget *wxStaticBox::GetHandle() const
return m_qtGroupBox;
}
+void wxStaticBox::SetLabel(const wxString& label)
+{
+ m_qtGroupBox->setTitle(wxQtConvertString(label));
+}
+
+wxString wxStaticBox::GetLabel() const
+{
+ return wxQtConvertString(m_qtGroupBox->title());
+}
+
void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
{
wxStaticBoxBase::GetBordersForSizer(borderTop, borderOther);
diff --git a/src/qt/statline.cpp b/src/qt/statline.cpp
index 444f59c6e7..82e52f01a8 100644
--- a/src/qt/statline.cpp
+++ b/src/qt/statline.cpp
@@ -12,7 +12,8 @@
#include
-wxStaticLine::wxStaticLine()
+wxStaticLine::wxStaticLine() :
+ m_qtFrame(NULL)
{
}
diff --git a/src/qt/stattext.cpp b/src/qt/stattext.cpp
index 8e410bfa10..2eb50b5f18 100644
--- a/src/qt/stattext.cpp
+++ b/src/qt/stattext.cpp
@@ -22,7 +22,8 @@ public:
};
-wxStaticText::wxStaticText()
+wxStaticText::wxStaticText() :
+ m_qtLabel(NULL)
{
}
diff --git a/src/qt/statusbar.cpp b/src/qt/statusbar.cpp
index 57881f8a6e..729fa66535 100644
--- a/src/qt/statusbar.cpp
+++ b/src/qt/statusbar.cpp
@@ -48,7 +48,6 @@ bool wxStatusBar::Create(wxWindow *parent, wxWindowID WXUNUSED(winid),
long style, const wxString& WXUNUSED(name))
{
m_qtStatusBar = new wxQtStatusBar( parent, this );
- m_qtPanes = new QList < QLabel* >;
if ( style & wxSTB_SIZEGRIP )
m_qtStatusBar->setSizeGripEnabled(true);
@@ -65,10 +64,10 @@ bool wxStatusBar::GetFieldRect(int i, wxRect& rect) const
wxCHECK_MSG( (i >= 0) && ((size_t)i < m_panes.GetCount()), false,
"invalid statusbar field index" );
- if ( m_qtPanes->count() != m_panes.GetCount() )
+ if ( m_qtPanes.size() != m_panes.GetCount() )
const_cast