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.
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).
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).
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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
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.
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.
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.
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.
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
"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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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/).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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).
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.
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).
Instead of using individual string literals use globally defined constants representing wxPG variant types (wxLongLong, wxULongLong, wxArrayInt, etc.).