Commit Graph

16807 Commits

Author SHA1 Message Date
Tobias Taschner
2eccc1a57d Remove remaining MSDOS support code
The remaining DOS source files where already removed in
26a0a24f38. This removes the remaining __DOS__
and __DJGPP__ (the DOS gcc) code paths.

Closes https://github.com/wxWidgets/wxWidgets/pull/100
2015-09-24 14:38:22 +02:00
Vadim Zeitlin
854fce33a7 Don't disable wxUSE_CRASHREPORT in Win64 builds
Creating minidumps works in 64 bit builds since quite some time (see
603c73dbba), so there is no reason to forcefully
disable it any more.

Closes #17162.
2015-09-24 14:35:00 +02:00
Vadim Zeitlin
b0be28dae5 Always include sys/types.h from wx/filefn.h
It looks like the preprocessor checks were meant to avoid including this file
under MacOS 9 and all the other platforms should have it, so it should be safe
to include (although it still doesn't define off_t with MSVC, only _off_t).
2015-09-23 00:56:49 +02:00
Vadim Zeitlin
87baba95b8 Remove last traces of Symantec compiler support
Delete a couple of leftover __SYMANTEC__ checks.
2015-09-23 00:54:20 +02:00
Vadim Zeitlin
1e20b249bf Use DLL declarations consistently for wxCollapsibleHeaderCtrl
Export this class and its base classes (to avoid MSVC warnings about using
non-DLL-exported base classes for a DLL-exported one) from core DLL.
2015-09-23 00:52:42 +02:00
Vadim Zeitlin
8a0dc9ecdb Implement wxCollapsibleHeaderCtrlBase::Create()
This method was declared but not implemented, so do implement it and delegate
to it from wxGenericCollapsibleHeaderCtrl::Create().
2015-09-23 00:52:41 +02:00
Vadim Zeitlin
ac02d331e4 Initialize wxHtmlSelectionState::m_bgMode in ctor
Don't leave the variable uninitialized to avoid warnings from static code
analyzer and to ensure that it is never used before being initialized (while
this does seem to be the case already, it's not exactly obvious).
2015-09-23 00:52:40 +02:00
Vadim Zeitlin
dfb60af47f Disable check in wxLongLong::ToLong() for LP64 platforms
The check is redundant there as conversion can never fail and just results in
warnings from static code analyzers.
2015-09-23 00:52:33 +02:00
Tobias Taschner
8282c1be0f Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE
release was in early 2013 and the PocketPC and Smartphone targets supported by
wxWidgets are long gone.

The build files where already removed in an earlier cleanup this commit
removes all files, every #ifdef and all documentation regarding the Windows CE
support.

Closes https://github.com/wxWidgets/wxWidgets/pull/81
2015-09-23 00:52:30 +02:00
Vadim Zeitlin
3545e9d778 Disable OLE support if wxDataObject is disabled in wxMSW
wxDataObject is a basic requirement for too many OLE-related things.

See #17159.
2015-09-20 13:52:20 +02:00
Andreas Falkenhahn
e37842419e Add dependency of generic wxDatePickerCtrl on wxComboCtrl
The generic implementation requires wxComboCtrl, so pull it in if
wxDatePickerCtrl is enabled.

Explicitly testing for the platform here is ugly, as it duplicates the checks
in wx/datectrl.h and will get out of date when/if they're changed there, but
there just doesn't seem to be any other way.

See #17159.
2015-09-20 13:51:04 +02:00
Andreas Falkenhahn
bf41f447bf Check for dependency of wxAnimationCtrl on wxStreams
Disable the compilation of wxAnimationCtrl if stream support was disabled,
it's impossible to load animations without it.

See #17159.
2015-09-20 13:50:01 +02:00
VZ
7e6836e9f5 Merge pull request #95 from TcT2k/collpane_enhancement
Improve wxCollapsiblePane appearance

Provide native look under MSW and improve the generic appearance (which is now also used under OS X) as well.
2015-09-19 19:49:15 +02:00
Tobias Taschner
d35e102007 Remove private wxDisclosureTriangle control.
Remove the private and undocumented control and it's usage in wxGenericCollapsiblePane. The class used a low resolution bitmap which looks bad on high resolution displays. The generic implementation using wxRendererNative::DrawCollapseButton() is better fit even on OS X.
2015-09-19 17:30:33 +02:00
Tobias Taschner
df24d925df Add wxCollapsibleHeaderCtrl widget.
This simple class has a collapsed state which is indicated by a small button and a label. It is now used in the generic implementation of wxCollapsiblePane.

It could be used in more complex layouts than wxCollapsiblePane and is therefore available and documented to the user.
2015-09-19 17:30:32 +02:00
Vadim Zeitlin
e563066c76 Avoid gcc -Wstrict-alias=2 warnings in wxAny
While wxWidgets itself is compiled with -fno-strict-aliasing, the user code
including wx headers can be compiled without it and, worse, even with
-Wstrict-aliasing=2 which would give tons of warnings (two for each
instantiation of the template class) of possibly breaking strict aliasing rule.

Fix this by using a union to cast between two pointers of different types
instead of using a reinterpret cast.
2015-09-19 03:25:57 +02:00
Tobias Taschner
ef5ff89008 Add wxRendererNative::DrawCollapseButton() for use in collapsible pane like controls.
Add a new method that should be used for controls like wxCollapsiblePane.

It is implemented natively for wxMSW (Windows Vista+) and provides a generic fallback for other ports and WinXP.
2015-09-19 00:06:42 +02:00
Tobias Taschner
2fff3cd29f Add wxSystemThemedControl and use it in wxMSW
wxSystemThemedControl allows to use the "system theme" (i.e. the theme used by
the system applications such as file manager and which can, surprisingly, be
different from the default one). Currently it is only implemented for wxMSW
and does nothing under the other platforms.

Use wxSystemThemedControl for wxDataViewCtrl, wxListCtrl and, optionally, if
wxTR_TWIST_BUTTONS style is specified, wxTreeCtrl to give them more native
appearance under MSW.

Closes #16414.
2015-09-17 14:49:13 +02:00
Tobias Taschner
b7a89f8746 Add wxRendererNative::DrawItemText() for list-like controls
Add a new method that should be used for drawing the elements of list-like
controls (i.e. wx{List,Tree,DataView}Ctrl and similar).

Implement it for wxMSW natively and provide a straightforward generic fallback
for the other ports.

See #16414.
2015-09-17 14:49:13 +02:00
Artur Wieczorek
865c8565af Fixed setting colours of wxSlider and wxRadioBox in wxMSW.
Sibling windows (like labels and radio buttons) need to be explicitly
refreshed when foreground or background colour is changed. This is implemented
by invoking newly implemented method wxSubwindows::Refresh every time the
colour of the control is changed.

Note: Setting foreground colour of wxRadioBox still doesn't work correctly
when themes are enabled.

Closes #17142.
2015-09-12 03:01:30 +02:00
Vadim Zeitlin
2879ec5422 Fix wxiOS build after Enable{Max,Min}imizeButton() addition
Define stubs for pure virtual base class methods.

See #17133.
2015-09-07 12:47:38 +02:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Lauri Nurmi
50daf1feab Add mouse wheel handlign to wxGenericCalendarCtrl
Mimics the scrolling behaviour of native MSW and GTK calendars by allowing to
increment/decrement the month by scrolling anywhere on the generic calendar.

Additionally, use horizontal scrolling to increment/decrement the year.

Closes https://github.com/wxWidgets/wxWidgets/pull/88
2015-09-06 14:39:59 +02:00
John Roberts
fe9a5f47f4 Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().

Currently implemented for MSW and OSX only.

Closes #17133.
2015-09-06 14:17:46 +02:00
John Roberts
6055d8d0a5 Implement wxTopLevelWindow::EnableCloseButton() for wxOSX
Just forward this wx method to Cocoa standardWindowButton:NSWindowCloseButton.

See #17133
2015-09-06 14:16:39 +02:00
Paul Cornett
2fbd2a7800 Implement SetVisited()/GetVisited()
and set the visited state when the link is clicked
2015-09-03 09:30:42 -07:00
Vadim Zeitlin
602783facb Merge branch 'dvc-type-check'
Various fixes to make wxDataViewCtrl behaviour more homogeneous across all
ports.
2015-09-03 00:01:24 +02:00
Tobias Taschner
e6b31adefe Fix OS X wxWebView ignoring JavaScript window.open() calls
On OS X (tested on 10.10.5) calls to window.open() with a different target
than _self were simply ignored. No navigation and no EVT_WEBVIEW_NEWWINDOW as
expected.

Unfortunately WebKit does not call the decidePolicyForNewWindowAction delegate
method in these cases. A new delegate method createWebViewWithRequest has been
implemented to handle this case and send EVT_WEBVIEW_NEWWINDOW as in other
ports.

Closes https://github.com/wxWidgets/wxWidgets/pull/85
2015-09-01 18:29:34 +02:00
Paul Cornett
83ce88402c Add gtk_cell_renderer_set_padding() compatibility function 2015-09-01 08:41:15 -07:00
Vadim Zeitlin
361c6357b4 Use wxDataViewRenderer::PrepareForItem() in all ports
wxOSX and wxGTK previously used their own methods for handling the enabled
state and the attributes of the items being rendered, change them to reuse the
same methods as the generic implementation, i.e. SetEnabled() and SetAttr()
and remove the port-specific GtkSetAttr(), OSXApplyAttr() and so on.

This has the advantage of ensuring that the logic is the same for all
platforms (e.g. item enabled status wasn't handled in the same way in wxGTK as
in the other ports previously) and hopefully makes the code simpler by cutting
down on the number of virtual methods.

Notice that GtkSupportsAttrs() optimization was removed as it didn't seem to
be worth the bother (we basically saved a call to a virtual model method at a
price of a virtual renderer method call) and preserving it would have
complicated things needlessly.
2015-08-31 22:20:33 +02:00
Artur Wieczorek
c63b1604b3 Use native renderer to draw rectangle indicating that wxPG category property is selected.
Because on some ports native renderers require a valid reference to the windows be drawn then it is necessary to implement and use new wxPGCellRenderer::DrawCaptionSelectionRect method which passes this  additional argument.
2015-08-30 19:46:34 +02:00
Vadim Zeitlin
a49567109a Consistently check for type mismatch in all ports in wxDataViewCtrl.
Move the checks for the type mismatch between the type of the value returned
by wxDataViewModel and the type expected by wxDataViewRenderer into common
code. This avoids duplicating the same code in wxGTK and wxOSX and, more
importantly, means that this check is also performed in wxMSW when using the
generic version, so that the problems such as the one fixed in 3ff8c3c ("add
missing wxDataViewDateRenderer::GetDefaultType()") would be visible there too.
2015-08-29 00:03:15 +02:00
Artur Wieczorek
bbecebd4ba Use Boolean expression instead of conditional statement to get Boolean value. 2015-08-27 19:17:49 +02:00
Artur Wieczorek
7ce6cff5ab Extend functionality of wxPropertyGridInterface::SetPropertyColoursToDefault method.
SetPropertyTextColour, SetPropertyBackgroundColour methods are able to set colours recursively for sub-properties but SetPropertyColoursToDefault method is not.
For the sake of consistency, SetPropertyColoursToDefault method is extended to have the same capabilities as SetPropertyTextColour and SetPropertyBackgroundColour. Behaviour and signature in default case (no recursion) is preserved.
For internal purposes there were also implemented helper methods in wxPGProperty class: SetDefaultColours, ClearCells.
2015-08-27 19:14:52 +02:00
Tobias Taschner
f1abb351af Remove MicroWindows support.
MicroWindows (aka Nano-X) support hasn’t been updated since 2010 and last work for it in wxWidgets happened more than 10 years ago.
2015-08-27 11:00:16 +02:00
Tobias Taschner
5f75b7506f Remove Hildon framework support.
The Hildon framework was used for Nokia 770 and other Maemo devices.
This platform discontinued and hasn't seen a new release since 2011.
2015-08-26 22:49:53 +02:00
Tobias Taschner
26a0a24f38 Remove MS-DOS source files.
Last work on the MS-DOS files was 10 years ago and it's not a viable platform in 2015 any more.
2015-08-26 21:09:41 +02:00
Paul Cornett
3ff8c3c100 add missing wxDataViewDateRenderer::GetDefaultType()
Avoids "Wrong type returned from the model" debug message.
Should have been part of 615b4969 (r78288)
2015-08-20 09:51:11 -07:00
Vadim Zeitlin
a2d6341e4f Disable warnings in the standard gdiplus.h header with MSVC14.
There is nothing we can do about these (harmless) warnings, so just disable
them.

Closes #17113.
2015-08-20 12:24:16 +02:00
Stefan Csomor
9b7fd47266 adding conditionals for NSString bridges 2015-08-19 17:39:52 +02:00
Paul Cornett
0ff96c620f fix wxHyperlinkCtrl opening URL twice, see #13813 2015-08-18 23:02:33 -07:00
JulianSmart
84b3644680 Corrected wxRTC font dialog spin button behaviour 2015-08-18 16:36:16 +01:00
Paul Cornett
9cfda3ca4d IsShown() now returns false for non-selected wxNotebook pages, see #4343 2015-08-15 11:04:20 -07:00
Tobias Taschner
b9d46f0719 Add ZIP64 support to wxZipInputStream and wxZipOutputStream.
Zip archives with sizes larger 4GB or containing files larger than 4GB or more
than 65k files are saved in ZIP64 format which adds a few additional footers
and extra fields to allow to exceed these limits.

This implements the PKWARE specification available at:
https://www.pkware.com/support/zip-app-note

It has been tested for compatibility with Windows internal ZIP folders, OSX
Archive Utility and 7-zip.

Closes https://github.com/wxWidgets/wxWidgets/pull/72
2015-08-14 15:39:45 +02:00
Tobias Taschner
0f39ea0963 Add support for UTF8 filenames in wxZipInputstream.
Zip files may mark filenames and comments via bit 11 in the general purpose
flags. If this flag is set use wxConvUTF8 instead of the default wxConv.
2015-08-14 15:38:50 +02:00
Artur Wieczorek
c746fee94a Compilation fixes for wxUSE_INTL==0 build.
Closes https://github.com/wxWidgets/wxWidgets/pull/70
2015-08-10 18:42:46 +02:00
Artur Wieczorek
75467841ee Moved "edit" icon from wxEditableListBox to wxArtProvider.
"Edit" icon definition used internally in wxEditableListBox is moved to
wxDefaultArtProvider and exposed as wxART_EDIT.

While there is no native version of this icon yet, it could be added in the
future and in the meanwhile this commit will be useful to use only standard
bitmaps in wxEditableListBox.
2015-08-09 01:39:41 +02:00
Artur Wieczorek
244ec264af Factor out duplicated code for bitmap scaling in wxArtProvider.
Move duplicated code responsible for rescaling bitmaps in wxArtProvider to the
shared wxArtPrvider::RescaleBitmap() method.

Additionally, make this new method work even in wxUSE_IMAGE==0 case.

See #17071.

See https://github.com/wxWidgets/wxWidgets/pull/64.
2015-08-08 01:04:46 +02:00
Tobias Taschner
8bd14648cd Remove Cocoa code and precompiler defines targeting OS X versions prior to OS X 10.7. 2015-08-07 16:25:28 +02:00
Tobias Taschner
3f63ad5c61 Add constants for OS X 10.10. 2015-08-07 16:02:24 +02:00
Tobias Taschner
2b3633b3c0 Add wxCheckOsVersion() to implement platform based OS version checks.
Windows implements VerifyVersionInfo api since Win2k. Starting with Windows 8.1 GetVersionEx is deprecated and may not return the expected version number if the application does not contain the correct compatibility information in its manifest. VerifyVersionInfo works independent of manifest in the executable (and is the recommend way to check).

Existing code may already use wxPlatformInfo::CheckOSVersion() so the method forwards the call to wxCheckOsVersion if initialized for the current system.
2015-08-06 11:32:38 +02:00
Tobias Taschner
a8c98a1191 Fix wxGetWinVersion() for Windows 10
Check for Windows 10 was implemented as check for version 6.4 but the final version of Windows 10 actually returns 10.0.
2015-08-04 15:04:33 +02:00
Vadim Zeitlin
9bc3ab1ea7 Add wxNativeWindow allowing to easily embed native widgets in wx.
Implement the class for wxMSW, wxGTK and wxOSX/Cocoa, show it in the widgets
sample and add documentation for it.
2015-08-03 17:57:42 +02:00
Tobias Taschner
658eca2896 Avoid run-time warnings for OS X version checks under 10.10+.
Remove UMAGetSystemVersion() function calling which produced the following
warning on the console for every call:

WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.4 instead
of 10.10.4. Use NSProcessInfo's operatingSystemVersion property to get correct
system version number.*

Replace UMAGetSystemVersion with wxPlatformInfo::CheckOSVersion() which
internally uses wxGetOSVersion, which uses Gestalt calls not resulting in this
runtime warning.

Closes https://github.com/wxWidgets/wxWidgets/pull/55
2015-08-02 03:15:11 +02:00
Suzumizaki-Kimitaka
28587c97d8 Add support for Unicode to wxStackWalker.
Use wide-char versions of debug help functions if available, falling back to
the narrow char ones otherwise.

Also improve 64 bit support by using 64 bit versions of the functions if
available as well.

Closes #15138.
2015-07-27 02:44:36 +02:00
Vadim Zeitlin
39ad820bee Check for Win32 exceptions inside our WindowProc().
Don't let unhandled Win32 (i.e. structured) exceptions escape from wxWndProc()
as they can just disappear into thin air when running under WOW64 as 32 bit
exceptions can't propagate through 64 bit kernel. So catch them immediately
and pass them to the global handler while we have the chance to do it, as
we're never going to get it in the outer __try/__catch block in wxEntry() in
src/msw/main.cpp.

In particular, this allows to catch crashes in wxEVT_PAINT handlers, such as
the one in debughlp sample, again.

Closes #16656.
2015-07-27 02:30:40 +02:00
Artur Wieczorek
e0f5b49a07 Fixed searching the elements in wxArrayPGProperty.
Use dedicated Index() function to search elements in wxArray instead of calling custom function.
2015-07-20 21:50:30 +02:00
Vadim Zeitlin
46ab9cb041 Rename HandleMiniaturize() to have OSX prefix and make it non-virtual.
This method doesn't really have to be virtual and this change will allow to
backport the commit adding wxIconizeEvent generation to 3.0 branch.

See #16718.
2015-07-18 15:32:00 +02:00
Rob Krakora
31e1387541 Implement sending wxIconizeEvent in wxOSX.
Translate windowDid{Miniaturize,Deminiaturize} callbacks to calls to
SendIconizeEvent().

See #16718.
2015-07-18 02:29:17 +02:00
Artur Wieczorek
a0afc17c75 Use wxNullBitmap explicitly instead of wxPG_NULL_BITMAP.
wxPG_NULL_BITMAP macro is not useful because is used only once. In the rest of wxPG code wxNullBitmap is used explicitly many times so for the sake of consistency we can resign from using this macro.
2015-07-17 22:29:37 +02:00
Vadim Zeitlin
fc3d2bac2a Avoid bogus assert after calling wxDatePickerCtrl::SetRange() in wxMSW.
If the old value didn't lie inside the new range, it was changed by the native
control internally but the value stored by wxDatePickerCtrl itself remained
unchanged, resulting in asserts later when the mismatch between them was
detected.

Closes #13189.
2015-07-17 17:59:40 +02:00
Artur Wieczorek
403dd5673f Use enum instead of macros to represent wxPropertyGrid::DoSelectProperty flags. 2015-07-16 21:04:25 +02:00
Artur Wieczorek
4588acb21b Use wxEmptyString instead of dedicated wxPropertyGridInterface member variable. 2015-07-16 21:00:38 +02:00
Artur Wieczorek
79794391e9 Declare wxPG_DEFAULT_IMAGE_SIZE as wxDefaultSize constant.
wxDefaultSize is an equivalent of wxSize(-1,-1) but is more portable.
2015-07-15 21:45:27 +02:00
Vadim Zeitlin
af7ed311ed Fix wx2stclen() return values after upgrade to Scintilla 3.5.5.
The fix to the length allocated for the buffer (which was off by 1) in
wx2stc() in 9f81ac16f0 exposed another bug,
which used to compensate for that one, in wx2stclen(), so fix it too.

See #16776.
2015-07-11 22:41:34 +02:00
Vadim Zeitlin
9c88e76752 Remove the never implemented wxPoint2D::SetPolarCoordinates().
This method was declared but never implemented, just remove it.

Closes #17065.
2015-07-09 14:38:49 +02:00
Vadim Zeitlin
610076aabd Merge branch with the changes upgrading to Scintilla 3.5.5.
Closes #16776.
2015-07-05 17:00:36 +02:00
Vadim Zeitlin
73119a37ae Remove obsolete _EXPORT macro not used under Win32.
This was a leftover from bad old Win16 days.
2015-07-05 16:55:26 +02:00
Vadim Zeitlin
30b523d1f2 Remove redundant tests for __WIN32__ in wxMSW code.
This is always defined, Win16 is not supported since ages and Win64 defines
both __WIN32__ and __WIN64__.
2015-07-05 16:55:25 +02:00
Vadim Zeitlin
e18c8fd29a Never use events for blocking sockets under Unix.
Events are not needed for this kind of sockets, using wxSOCKET_BLOCK is
supposed to ensure that calling socket IO operations blocks until the bytes
are read/written without dispatching any events.

See #17031.
2015-07-05 16:45:07 +02:00
Vadim Zeitlin
82f3234d95 Avoid g++ 3.4.5 warning about wxMSWOwnerDrawnButtonBase dtor.
Fixing the warning for recent g++ versions introduced it for the old one, so
work around this inside our workaround.

See #17005.
2015-07-04 18:25:05 +02:00
Vadim Zeitlin
c6c19dc580 Remove extraneous semicolons after wxDECL_FOR_STRICT_MINGW32().
This macro shouldn't be followed by a semicolon because it can be empty, so
remove the extra semicolons to avoid -Wpedantic g++ warnings about it.
2015-07-01 00:39:05 +02:00
Artur Wieczorek
2770f76de5 Fix wxPropertyGridManager::SelectProperty
Call wxPropertyGridpageState::DoSelectProperty with explicitly set flags instead of casting from bool to unisgned int. It cannot be guaranteed that 0/1 values of this implicit conversion will be mapped to the proper flags also int the future.
2015-06-29 20:03:25 +02:00
Artur Wieczorek
f48439cfc6 Fix casting variable in wxFlagsProperty::GetLabel
Cast GetLabel parameter to a proper type (unsigned int instead of int).
2015-06-28 19:31:48 +02:00
Paul Cornett
b7cf54d24a Avoid using gdk_window_freeze_updates() to implement Freeze()
Implement Freeze() by blocking the GtkWindow "expose-event"/"draw" signal
instead. Since the introduction of client-side windows in GTK+ 2.18,
gdk_window_freeze_updates() is unuseable because the impl_window (and thus the
update_freeze_count) for a given GdkWindow can change unpredictably. See #16795
2015-06-24 08:43:30 -07:00
Catalin
a2ebc9daf6 Add wxTextOutputStream::Write<>().
The new method allows to write into wxTextOutputStream anything that can be
streamed into wxString and allows to simplify the existing code.
2015-06-23 18:20:19 +02:00
Vadim Zeitlin
8741c2730b Make wxVSCROLL explicitly of int type.
Its value (0x80000000) is outside of the int type range on 32 bit platforms,
but we still want to allow using it as an initializer of int and/or long
variables for consistency with the other types, so cast it to int explicitly
to suppress -Wnarrowing warnings from recent g++ which were given when doing
this before.
2015-06-21 15:59:16 +02:00
Vadim Zeitlin
3195a0e538 Document wxPrintData::SetPaperSize().
Also remove strange (probably out of date?) comment from this method in the
header.

Closes #17035.
2015-06-21 02:24:50 +02:00
Vadim Zeitlin
6f2fdbae6a Fix typo in a comment.
s/minimzes/minimizes/
2015-06-19 13:40:41 +02:00
Nathan Ridge
ad21cc332a Relax the ABI compatibility requirements for GCC.
Allow a library and an application to differ in __GXX_ABI_VERSION
within the range 1002-1008. The ABI changes made in this range
do not affect wxWidgets.
2015-06-19 01:44:55 -04:00
Vadim Zeitlin
6787d2268a Improve workaround for MinGW math.h bug in strict ANSI mode.
Declare _hypot() function globally, predefining __NO_INLINE__ in wx/math.h is
not enough as <math.h> is also included from some other standard headers, e.g.
<algorithm>, and including them results in the same bug as in wx/math.h
(i.e. https://sourceforge.net/p/mingw/bugs/2250/).
2015-06-15 02:21:58 +02:00
ARATA Mizuki
28e80e5b58 Update Scintilla from 3.5.2 to 3.5.5 2015-06-15 01:32:08 +02:00
ARATA Mizuki
43057d1c43 Update Scintilla from 3.4.4 to 3.5.2 2015-06-15 01:32:06 +02:00
ARATA Mizuki
7ebb51a895 Update Scintilla from 3.4.3 to 3.4.4 2015-06-15 01:32:06 +02:00
ARATA Mizuki
40a18a74f9 Update Scintilla from 3.4.1 to 3.4.2 2015-06-15 01:32:05 +02:00
Vadim Zeitlin
c8a3c01424 Work around a bug in MinGW math.h.
Including standard math.h header with both -O2 and -std=c++NN options results
in compilation error due to a bug in the header, see MinGW bug report at
https://sourceforge.net/p/mingw/bugs/2250/

Work around this to allow the library to compile in release build with
-std=c++11. This is ugly but better than failing to compile at all.
2015-06-14 19:52:26 +02:00
Vadim Zeitlin
cc774bb301 Fix building and using the library with MinGW -std=c++{98,11} options.
These options enable "strict ANSI" mode in MinGW which omits declarations of
POSIX functions from the standard headers. To allow the library and, possibly
even more importantly, the user code including our headers, to compile with
these options, declare the functions that we need ourselves.

This might appear to go against the spirit of "strict ANSI" mode, but the only
alternative would be to not use such functions at all and silently cripple the
library when -std=c++NN is used, compared to -std=g++NN case, and this doesn't
seem appealing neither.

Closes #16984.
2015-06-14 19:52:26 +02:00
Artur Wieczorek
8e2f1b47aa Use wxS macro with string literals.
To make string literals notation consistent.
2015-06-12 23:39:00 +02:00
Artur Wieczorek
6cc7811394 Fixed minor typos in comments.
Yet another iteration.
2015-06-09 20:04:27 +02:00
Artur Wieczorek
c9417c41f5 Fix PCH-less build after cb6efbd.
Add missing wx/settings.h inclusion.
2015-06-09 18:03:56 +02:00
Artur Wieczorek
aeed3322f2 Fixed minor typos in comments. 2015-06-08 21:49:38 +02:00
Artur Wieczorek
c8088e479a Fixed minor typos in the name of variables. 2015-06-08 21:48:08 +02:00
Artur Wieczorek
cb6efbd3c3 Lay out various wxPG dialogs based on the current system screen design.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only).
Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function.
In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.
2015-06-08 21:46:03 +02:00
Roberto Perpuly
aa5dbad410 Use FSEvents in wxFileSystemWatcher on OS X
The FSEvents API allows for creating watches in entire trees of
directories in an efficient manner.

Closes #16969.
2015-06-06 02:37:35 +04:00
Dimitri Schoolwerth
31145b8e3a Fix some typos, no code changes (besides strings) 2015-06-05 02:54:46 +04:00
Jan van Dijk
d2c1fce24e Further work around for clang warnings about typeid() side effects.
Apparently in some versions of the compiler even simply dereferencing a
pointer inside typeid() still provokes -Wpotentially-evaluated-expression.
Avoid this by dereferencing it outside and only using typeid() with
references.

Closes #16968.
2015-06-03 17:11:29 +02:00
Catalin
d31cfba540 Fixed wxAppConsole spelling in the comments. 2015-06-03 17:14:09 +03:00
Jan van Dijk
5aae7c7387 Work around clang warning about side effects inside typeid().
This warning was harmless but very annoying as it was given for each and every
inclusion of this header.

Closes #16968.
2015-06-02 02:07:39 +02:00
Vadim Zeitlin
e78b57308f Get rid of wxListCtrl::m_count in wxMSW.
This simplifies the code and fixes the bug with GetItemCount() returning wrong
(old) value in wxEVT_LIST_INSERT_ITEM event handler as m_count wasn't updated
by then yet.

Closes #3793.
2015-06-01 00:32:09 +02:00
Vadim Zeitlin
6a3cc8171b Remove declaration of wxWindow::GetAdjustedMinSize().
This deprecated method was never actually defined, so could never be used. The
fact that nobody complained about it would seem to be an indication that it is
not used anywhere, so just remove it.

See #17007.
2015-05-31 23:29:02 +02:00
Vadim Zeitlin
af3a5c8cb4 Avoid harmless warnings about non-virtual wxMSWOwnerDrawnButtonBase dtor.
Make the dtor protected to ensure that it's impossible to delete objects via
it as this is not supposed to be ever done anyhow.

Closes #17005.
2015-05-31 23:24:40 +02:00
Artur Wieczorek
67bfb78ace Replace wxT() with wxS() in wxPropertyGrid code. 2015-05-31 19:20:11 +02:00
Artur Wieczorek
5decea57f4 Don't declare wxPropertyGridManager::SetColumnTitle if wxUSE_HEADERCTRL == 0.
This method already has no definition in this case so there is no reason to declare it.
2015-05-31 19:20:08 +02:00
Artur Wieczorek
65dee275f2 Fix minor typos in comments. 2015-05-30 20:12:02 +02:00
Artur Wieczorek
fec5f36139 Use getter functions to get access to some properties of wxPropertyGridPageState.
Use existing GetColumnCount(), GetColumnWidth() functions instead of getting direct access to corresponding member variables.
2015-05-24 20:44:20 +02:00
Artur Wieczorek
b3ad8dae84 Use empty() member function to determine if arrays are empty in wxPG.
Use this dedicated function instead of checking if size() function returns zero/non-zero value.
2015-05-24 20:36:44 +02:00
Vadim Zeitlin
d07c4cb826 Really fix check for maximal argument number in wxPrintf().
Increment nargs before comparing it with wxMAX_SVNPRINTF_ARGUMENTS, if the
comparison is true for the post increment, the value is already invalid.
2015-05-24 02:47:00 +02:00
Vadim Zeitlin
0c223a8146 Fix buffer overrun in wxPrintf() format parsing code.
Parsing a format specifier with an asterisk (e.g. "%.*s") for the 64th
argument of wxPrintf() resulted in a buffer overrun as the check for the
maximal number of arguments didn't break out from the right loop.

Fix this by inserting an extra check for this.

Thanks Coverity for finding this one.
2015-05-24 01:53:08 +02:00
Artur Wieczorek
204a3d229c Use symbolic constants instead of numeric ones to represent masks filtering window style flags in wxPG. 2015-05-23 18:26:05 +02:00
Olly Betts
ecf85bf4cb Remove WXWIN_OS_DESCRIPTION.
This constant wasn't very useful as it contained the description of the OS on
the machine where the library was built, not the one on which the application
using it was running. It also wasn't used anywhere in wxWidgets and apparently
wasn't meant to be used outside of it.

Finally, putting the output of `uname -r` into it created problems with
creating reproducible builds as just a change in the kernel version changed
the build results.

Closes #17002.
2015-05-22 02:29:49 +02:00
Artur Wieczorek
7394dd8e1f Allow wxPG to take focus on the entire area even if wxPG is not a standalone control.
By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.

Closes #16993.
2015-05-21 18:51:37 +02:00
Vadim Zeitlin
1430123e58 Reset the pointer to NULL after deleting it in wxCmdLineArgsArray.
This ensures that a dangling pointer can't be dereferenced later and fixes a
fatal bug if wxCmdLineArgsArray::operator=() was called more than once (which
is however not supposed to normally happen).
2015-05-17 22:34:18 +02:00
Artur Wieczorek
b6ab81584f Deprecate wxPGProperty::GetFlags() getter method.
Instead of using pass-trough getter just to check the bits of internal field there are implemented dedicated HasFlag() and HasFlagsExact() methods to do so.
2015-05-16 17:17:14 +02:00
Vadim Zeitlin
ea406d2f3a Don't make wxToolBarToolBase::Set{Normal,Disabled}Bitmap() virtual.
There is no need for this, these methods are not supposed to be overridden as
they are only ever called by wxToolBar itself and making them virtual just
confused things.

See #16985.
2015-05-12 17:04:59 +02:00
Vadim Zeitlin
0a6b08cca3 Don't cache cells being measured in wxHtmlListBox.
This can result in a crash if the measuring code is called, possibly
indirectly, from a method of a cell object itself and if that cell is
displaced from the cache while caching the cell created in OnMeasureItem().

Closes #16651.
2015-05-10 22:09:48 +02:00
Artur Wieczorek
91144a2247 Fixed setting property label with wxPGproperty::SetLabel
If there is a corresponding cell containing a cached text for column 0 then this text also needs to be updated when the label is changed.

See #16982.
2015-05-10 18:50:25 +02:00
Kevin B. McCarty
1ad4596e8c Fix setting "pressed" bitmap for wxToggleButton.
Move wxAnyButton::GetNormalState(), which allows wxToggleButton to override
what "normal" means for it, down to the platform-independent wxAnyButtonBase
class and use it now in wxGTK as well to correctly choose the pressed bitmap
for a toggle button in this state.

Closes #16771.
2015-05-09 19:22:28 +02:00
Vadim Zeitlin
c0ae81ced7 No changes, just rename GTKGetCurrentState() to be more clear.
Update the name and the comment to explain better that this method returns the
state for which the bitmap is currently shown, not necessarily the current
state.

See #16771.
2015-05-09 19:17:41 +02:00
Tomas Rapkauskas
97286e13bd Speed up finding message catalog by name in wxTranslations.
Use a helper hash map to allow efficiently finding message catalogs by name
instead of using linear search in a linked list which can be noticeably slow
when many catalogs are used.

This speeds up wxGetTranslation() when the domain is specified.

Closes #16975.
2015-05-09 18:27:16 +02:00
Vadim Zeitlin
f350babf36 Recognize MSVC 14 a.k.a. Visual Studio 2015 compiler.
Interpret internal compiler version value 1900 as VC14. Notice that this
required adjusting the computation of the internal version from the
user-visible one because VC13 was skipped (hopefully no black cats crossed
paths with the manager responsible for this decision).

See #16854.
2015-05-08 02:24:10 +02:00
Vadim Zeitlin
6c7c8b6d8d Use correct format (%zu) for printing size_t values.
Fix assert due to using %d for printing 64 bit size_t values under Win64.

Closes #16974.
2015-04-29 19:38:02 +02:00
Paul Cornett
f0a2a6472f Fix GTK warnings after 4b9485a when TLW is closed while editor is still shown, see #16850 2015-04-26 11:01:44 -07:00
Nick Matthews
d13278ecc3 Add support for DOCTYPE to wxXmlDocument.
Allow retrieving the DOCTYPE specified in an existing document as well as
specifying the DOCTYPE to use when writing a new one.

Closes #13779.
2015-04-26 15:36:48 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
ef96bd6af1 Compilation fix for wxOSX/wxGTK3 after FromDIP() changes.
100d2a5 didn't update the inline FromDIP() version for these ports.
2015-04-23 19:25:21 +02:00
Vadim Zeitlin
af01ef1bb0 Make default wxSizer border DPI-aware.
Scale the (still hard-coded) border in pixels by the content scale factor for
the platforms where this needs to be done, i.e. not wxGTK nor wxOSX where the
underlying toolkit already does it.
2015-04-23 19:18:10 +02:00
Vadim Zeitlin
100d2a5819 Make wxWindow::FromDIP() more flexible and easier to use.
Allow calling this method with either wxSize, wxPoint or just an int.

Also provide a static overload allowing to use it even when no appropriate
wxWindow is available.
2015-04-23 02:20:02 +02:00
Vadim Zeitlin
4df7057302 Refactor: extract XRC code handling conversion from dialog units.
Factor out this code to a reusable ParseValueInPixels() function instead of
repeating it in GetSize() and GetDimension() (and using a hack to reuse it
from GetPosition()).

No real changes, just made some error messages more precise.
2015-04-23 02:20:01 +02:00
Vadim Zeitlin
6d92f45385 Remove all mentions of wxGauge shadow width and bezel face.
The shadow width was only used by wxMotif and bezel face not used at all since
a very, very long time, so just remove these methods from the ports which still
had them (just doing nothing) and remove support of the corresponding XRC
attributes.
2015-04-20 18:46:55 +02:00
Dimitri Schoolwerth
25fcb85590 Fix TreeCtrlTestCase assert failure under Windows.
A '-' keypress doesn't collapse a tree item with the native MSW tree
control. Instead, when not using the generic tree control, simulate a
keypress of WXK_LEFT to collapse the root item . This fixes the assert
checking if the root item is collapsed after the keypress.

Regression since 9d7a7ec556 (which
mistakenly may have had treectrltest.cpp as part of its commit).
2015-04-16 03:13:54 +04:00
Vadim Zeitlin
a5988a0389 Fix invalid use of wxSizer flags inside the library itself.
It doesn't make sense to use wxALIGN_CENTRE_VERTICAL with wxGROW, so remove
the alignment style.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
16c22794b7 Give error messages for invalid sizer flags in XRC wxSizer handler.
This allows to give the exact line number of the error, unlike asserts that
happen in wxSizer code which don't point exactly to the error location when
sizers are created via XRC.

It also has the advantage of allowing to detect wrong use of wxALIGN_LEFT and
wxALIGN_TOP, unlike the asserts which can't do it because the value of both of
these flags is 0.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
233a7fe77b Add wxSizerFlags::Cent{er,re}{Vertical,Horizontal}().
Provide CentreVertical() and CentreHorizontal() methods in wxSizerFlags which
are useful for 2D sizers (for 1D ones just Centre() can be used anyhow).
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
78b98bf00c Validate wxBoxSizer flags instead of silently ignoring invalid combinations.
Detect using flags corresponding to the major sizer direction (which doesn't
make sense as only the proportion governs the behaviour in this direction) and
also combinations of alignment flags with wxEXPAND.
2015-04-08 23:35:19 +02:00
Dimitri Schoolwerth
66cfa40643 Deal with remaining cvs/svn keywords.
A few $Id$ references remained after commit
3f66f6a5b3 or appeared in newly added files.
Remove the lines containing svn keywords except when it concerns
third-party files. In that case keep the line as-is or collapse it to the
keyword if it had been expanded to contain wx commit information (only
occurs with src/zlib/ChangeLog).
2015-04-09 03:32:23 +04:00
Vadim Zeitlin
5ff775234c Only use native wxAppProgressIndicator in wxOSX/Cocoa port.
It's not implemented for Carbon nor iOS.
2015-04-08 13:02:13 +02:00
Vadim Zeitlin
288f03d86f Also disable wxUSE_ACTIVITYINDICATOR for wxiOS build.
Another attempt to fix the buildbot wxiOS build.
2015-04-07 22:40:56 +02:00
Vadim Zeitlin
72cba11aa2 Forcefully disable wxUSE_ADDREMOVECTRL in wxiOS build.
wxUSE_ADDREMOVECTRL requires wxUSE_BMPBUTTON which is currently not supported
in iOS, so disable it too.
2015-04-07 14:30:23 +02:00
Artur Wieczorek
0bc20fee71 Non-PCH wxPG build fix after cc575a.
Include time.h to get wxMilliClock_t used now instead of wxLongLong for the timestamp.
2015-04-06 23:40:54 +02:00
Artur Wieczorek
830458af2b Non-PCH build fix after d892274.
Include time.h to get wxMilliClock_t used now instead of wxLongLong for the
timestamp.

Closes #16939.
2015-04-06 22:23:43 +02:00
Vadim Zeitlin
8577366bae Add check for wxUSE_ADDREMOVECTRL dependency on wxUSE_BMPBUTTON.
This should, in particular, fix the currently broken wxiOS build as
wxBitmapButton is not available in that port.
2015-04-06 22:15:26 +02:00
Artur Wieczorek
a679d0440c Check for wxUSE_RICHTEXT dependencies in wx/chkconf.h.
wxRichTextCtrl requires wxHTML and wxLongLong, check for the options
consistency.

See #16939.
2015-04-05 20:02:19 +02:00
Artur Wieczorek
93b9126fe5 Check for wxUSE_STC dependency on wxUSE_STOPWATCH.
wxStyledTextCtrl requires wxStopWatch, so check that wxUSE_STOPWATCH is set if
wxUSE_MEDIACTRL is.

See #16939.
2015-04-05 19:59:36 +02:00
Artur Wieczorek
2e26d30bcc Check for wxUSE_MEDIACTRL dependency on wxUSE_LONLONG.
wxMediaCtrl requires wxLongLong, so check that wxUSE_LONLONG is set if
wxUSE_MEDIACTRL is.

See #16939.
2015-04-05 19:59:33 +02:00
Artur Wieczorek
d8922744cf Use wxMilliClock_t to store values returned by wxGetLocalTimeMillis().
This fixes wxComboCtrl compilation with wxUSE_LONGLONG==0 as wxMilliClock_t is
always mapped to the proper base type and hence can be used even if wxLongLong
type is not defined.

See #16939.
2015-04-04 17:51:40 +02:00
Artur Wieczorek
5158ce4944 Add wxPropertyGridInterface::SetPropertyValue setter for native datatypes wxLongLong_t and wxULongLong_t.
And fix typo in wxUSE_LONGLONG macro name.
2015-04-04 00:33:25 +02:00
Artur Wieczorek
7c6943175b Prepare wxPG to build successfully when wxUSE_LONGLONG or wxUSE_DATETIME is disabled.
Make the code ready to build even when wxLongLong and wxDateTime types are not available.
2015-04-03 21:12:54 +02:00
Artur Wieczorek
cc575a7a89 Use in wxPG classes wxMilliClock_t variables to store values returned by wxGetLocalTimeMillis() function.
wxMilliClock_t is always mapped to the proper base type and hence can be used even if wxLongLong type is not defined (when wxUSE_LONGLONG is disabled).
2015-04-03 21:11:15 +02:00
Artur Wieczorek
6a7b95f419 Use predefined constants to represent common wxPG variant types (cont.).
Instead of using individual string literals use globally defined constants representing wxPG variant types (wxLongLong, wxULongLong, wxArrayInt, etc.).
2015-04-03 21:09:12 +02:00
Vadim Zeitlin
ffd2857571 Fix vertical alpha adjustment in wxPixelData<wxImage>::Offset().
Handle "y" parameter correctly when offsetting m_pAlpha, it was just ignored
before, i.e. Offset(x, y) and OffsetY(y) always behaved as if y were 1.
2015-04-01 14:15:11 +02:00