Commit Graph

16296 Commits

Author SHA1 Message Date
Vadim Zeitlin
2d37ca3cb0 Move __MINGW64_TOOLCHAIN__ definition to wx/msw/gccpriv.h.
__MINGW64_VERSION_MAJOR is defined only in _mingw.h, so it was never defined
in wx/compiler.h, included before any other headers and we can't include
_mingw.h for the same reason we must define wxCHECK_MINGW32_VERSION() in
wx/msw/gccpriv.h: this has to be done after defining UNICODE/_UNICODE, but
wx/compiler.h is included before this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-04 16:02:01 +00:00
Vadim Zeitlin
34e87060c8 Add wxDIRCTRL_DEFAULT_STYLE for consistency with other classes.
This is, by definition, the style used as default value for the style argument
of wxDirCtrl::Create().

Closes #16525.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-04 12:36:14 +00:00
Vadim Zeitlin
46a4234643 Compilation fix for wxUSE_STD_STRING==0 build.
Add missing check for wxUSE_STD_STRING to fix the build with it set to 0 after
the changes of r77518.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-03 14:23:38 +00:00
Vadim Zeitlin
1a06dc33e7 Include wx/variant.h from wx/msw/ole/oleutils.h.
This ensures that this header is self-contained and can be included without
including wx/variant.h first.

Closes #16522.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-03 11:20:59 +00:00
Vadim Zeitlin
56d0a94ec8 Specialize std::hash<> for wxString when using C++11.
This allows to use wxString as key type of std::unordered_{map,hash} out of
the box.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-02 15:35:02 +00:00
Vadim Zeitlin
51d715e46d Add wxPowerResourceBlocker for power management.
Add functions to acquire/release power resources, preventing/allowing back the
system to go to sleep or turn off the screen and a class wrapping them in a
safe way.

This patch implements the functions for MSW and OSX, adds documentation and
updates the sample to demonstrate the new functionality.

Closes #16413.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:15 +00:00
Vadim Zeitlin
a395cd5d14 Add small wxOleInitializer RAII helper.
Wrap wxOleInitialize()/wxOleUninitialize() in a helper class ensuring that we
never forget to call the latter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:21:56 +00:00
Artur Wieczorek
7e859ec6c9 Fix drawing custom colours for wxEnumProperty choice items in wxPG.
In order to draw choice items with custom colours there is necessary to merge custom cell object (wxPGCell) associated with individual item with default cell object (in wxPGProperty::GetDisplayInfo).
wxPGProperty::GetDisplayInfo function should return customized cell object instead of returning pointer to the default cell object only.

Closes #16509

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 21:17:16 +00:00
Mariano Reingart
8fc5475e15 Update author's credits comments for wxQT
Commit history was lost in the git to svn merge for trunk, so this reflect work done in two GSOC projects and/or by several authors.
Lines changed by each user was the main metric used to ack major contributions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 03:37:46 +00:00
Vadim Zeitlin
bd3ff6928e Fix build with wxUSE_STD_STRIN == 0.
Remove a leftover occurrence of wxDEFINE_TEMPLATE_BOOL_VALUE(), this should
have been done in r76532.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-28 11:35:34 +00:00
Julian Smart
f65b2f589f The wxRTC formatting dialog now retains custom colours set within the colour dialog, and they can be accessed by the application.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-28 08:28:08 +00:00
Vadim Zeitlin
626aadf02f Use #pragma diagnostic for clang too, not just g++ 4.6+.
Clang seems to support this #pragma just fine and it's useful for disabling
deprecation warnings in wxOSX code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:32:13 +00:00
Vadim Zeitlin
47e13f2be0 Update wxFileDialog filter index when setting its path.
This ensures that GetFilename() and GetFilterIndex() always return consistent
results, even if the path was set programmatically, e.g. during unattended
tests using wxExpectModal<wxFileDialog>.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:55 +00:00
Vadim Zeitlin
3bcec846a0 Provide wxApp::StoreCurrentException() implementation for C++11.
When using C++11 we can provide implementations of wxApp::StoreCurrentException()
and RethrowStoredException() ourselves and thus make catching exceptions outside
of the event loop work by default.

Do this and update the documentation and the sample to reflect it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:52 +00:00
Vadim Zeitlin
1cecee5bb7 Add wxApp::StoreCurrentException() and RethrowStoredException().
These methods can be used to ensure that the exceptions thrown from event
handlers are safely rethrown from the code dispatching the events once the
control flow gets back there.

This allows to work around the problem with not being able to propagate
exceptions through non-C++ code and can be used, for example, to catch
exceptions thrown by the handlers invoked from inside wxYield() by a try/catch
block around wxYield() -- something that didn't work before, update the except
sample to show that it does work now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:44 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
a307120d50 Fix generic wxSearchCtrl size/layout code.
Override DoGetBestClientSize() instead of DoGetBestSize(), as we're really
computing just the size of our contents and like this we don't need to hard
code platform-dependent border sizes in this control itself.

Also use the client size in LayoutControls() for the same reason. This also
makes it unnecessary to pass it the width and height as it can find them on
its own. And x and y were never used in the first place, so remove them too.

Finally, center the bitmaps vertically.

Closes #16422.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-18 21:32:55 +00:00
Vadim Zeitlin
eb18bbc8fd Remove default argument value from wxIHTMLElement2::setExpression().
This doesn't make much sense for an interface declaration anyhow and produces
a warning from g++ about assigning string literal to (non-const) BSTR pointer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-16 12:16:31 +00:00
Vadim Zeitlin
a4606fbb44 Refactor Unix OpenGL code to avoid using static attributes array.
Put the context attributes in wxGLCanvasX11 itself instead.

See #16402.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-15 12:14:11 +00:00
Vadim Zeitlin
a728a9ac15 Allow using ESC as accelerator in wxMSW again.
This ended up being broken due to an interplay between different unrelated
changes (at least r15120 and r41134) which were both correct, but didn't work
well together and resulted in not only preventing IsDialogMessage() from
handling ESC, but also our own accelerator tables.

Fix this by doing the check for IsDialogMessage() brokenness in
MSWProcessMessage() itself, just before calling it, instead of doing it in
MSWShouldPreProcessMessage() which is (and must be) called before
MSWTranslateMessage() which checks for accelerators using ESC.

Closes #3813.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-14 16:05:32 +00:00
Julian Smart
40c84134ae Fix deletion of cells in defragment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-12 08:52:41 +00:00
Václav Slavík
19e8a43827 Fix lossy conversion warning in wxString::reverse_iterator::operator-.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-11 10:55:12 +00:00
Stefan Csomor
9fa8977992 remove outdated file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 18:38:03 +00:00
Vadim Zeitlin
86cf756ba9 Add wxRendererNative::DrawGauge() method.
Add the method with the native implementations for MSW and OS X and a generic
version fallback.

Closes #16406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 01:03:31 +00:00
Vadim Zeitlin
e871a2157d Add wxGCD() helper function.
It is needed in wxMSW code and it looks like it could be useful to the library
users, so make it public.

See #16254.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-07 21:03:25 +00:00
Vadim Zeitlin
3c7ba39135 Allow requesting core OpenGL profile and explicit OpenGL version.
Add WX_GL_CORE_PROFILE and WX_GL_{MAJOR,MINOR}_VERSION attributes which can be
used to use modern OpenGL with wxGLCanvas.

Closes #16402.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 23:31:41 +00:00
Vadim Zeitlin
5f9bd3678f Add XRC handler for wxSimplebook.
Similar to wxNotebook but even simpler as wxSimplebook doesn't use images.

Also add wxSimplebook::Create() as the version inherited from wxBookCtrlBase
didn't _quite_ work: we need to add wxBK_TOP style to prevent asserts due to
unknown alignment in the base class when creating wxSimplebook.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-05 22:01:52 +00:00
Vadim Zeitlin
1b90acc357 Add wxDateTime::GetWeekBasedYear().
It was just added as a private function to implement %V format specifier
support, just extract and document it as it could possibly be useful in its
own right.

See #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:41 +00:00
Vadim Zeitlin
f88585b4ab Update wxSlider background when its parent background changes in wxMSW.
The native control doesn't redraw itself, so force it to do it from the
overridden DoMSWControlColor() which is called every time the background
colour might have changed.

See #12271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:26 +00:00
Vadim Zeitlin
316da5d468 Auto-link expat and zlib even in non-GUI programs when using MSVC.
These libraries are not GUI-specific and should be included even in console
applications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:40 +00:00
Vadim Zeitlin
1a2e0268f0 Include the required headers from wx/custombgwin.h.
Make this header self-contained, i.e. safe to include as the first wxWidgets
header being included from the user code.

Closes #16391.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-24 10:58:47 +00:00
Stefan Csomor
c7f1a920b1 supporting menu dimension retrieval for menubars, fixes #2570
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-20 15:28:20 +00:00
Vadim Zeitlin
c3ba472abb Fix test for __WXOSX__ in common code.
Check whether it's defined, not whether it's true.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-16 22:55:08 +00:00
Stefan Csomor
0d6d012936 common type for native rectangle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 17:14:21 +00:00
Artur Wieczorek
1a2983d433 Resolve ambiguity in multiple inheritance of function GetPropertyByLabel in wxPGPage.
In wxPropertyGridPage class derived from wxPropertyGridPageState and wxPropertyGridInterface, function GetPropertyByLabel is inherited from both base classes.
To resolve this ambiguity, function defined in wxPGInterface is introduced in wxPGPage through 'using-declaration'.
(This is a temporary fix and finally GetPropertyByLabel function should be removed from wxPropertyGridPageState.)

See #15251.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 17:18:58 +00:00
Stefan Csomor
c6201f2d70 completing in place swapping macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 16:03:03 +00:00
Stefan Csomor
14c736b89b fixing commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 15:50:13 +00:00
Stefan Csomor
b8c3fc0771 adding in place replacements avoiding self assignment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 15:42:34 +00:00
Artur Wieczorek
3c483f6739 Use native renderers in wxPG under MSW by default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 16:38:19 +00:00
Vadim Zeitlin
45adc64f9f Fix inserting an element of wxArrayString itself back into it.
Do the insertion/addition before deallocating the old memory to allow things
like array.Add(array[0]) to work correctly.

Closes #2290.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 14:30:22 +00:00
Tim Kosse
635694c9b3 wxBitmapComboBoxBase uses wxArrayPtrVoid, so we need to #include "wx/dynarray.h". This fixes a compile error in situations where wx/dynarray.h is not implicitly included through other headers, e.g. when building wx with many features disabled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-12 08:31:22 +00:00
Artur Wieczorek
63a9cc4c2e Use automatically generated ID values for wxPG sub-controls.
Currently in wxPG there are used fixed "magic" ID values to identify sub-controls and this can lead to side effects if these values overlap with ID values assigned to another controls in the application (like e.g. menu items).

Closes #13634.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-09 18:56:36 +00:00
Artur Wieczorek
71db47d26a Refresh property grid when property is switched to read-only state.
Property grid is refreshed to reflect the new state of the property.
Small refactoring of wxPropertyGridInterface class: SetPropertyReadOnly() function body moved from header file to source file.

Closes #16306.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-07 22:32:57 +00:00
Stefan Csomor
2ade9eb811 added missing impl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 14:56:30 +00:00
Stefan Csomor
74493e3f6b support for 64 bit ios
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:33:22 +00:00
Tim Kosse
705a1b547d Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:32:42 +00:00
Stefan Csomor
c78bca596e adding base virtuals
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 20:10:09 +00:00
Stefan Csomor
ec73c71d6a supporting NSString also in Carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 16:58:03 +00:00
Stefan Csomor
96ac247a9e adding 10.9 constants
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 10:35:10 +00:00
Vadim Zeitlin
fb99672f62 Hopefully finish removing the old wxCocoa port.
Get rid of the rest of __WXCOCOA__ tests in the sources.

Drop configure option for using it.

Also remove the documentation for this port.

This should have also been part of r76735.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 22:03:21 +00:00