Commit Graph

7481 Commits

Author SHA1 Message Date
Vadim Zeitlin
1f435261f6 Merge branch 'more-qt-win-build-fixes' of https://github.com/catalinr/wxWidgets
Miscellaneous fixes for building wxQt under MSW.

See https://github.com/wxWidgets/wxWidgets/pull/918
2018-09-17 23:26:27 +02:00
Vadim Zeitlin
6401c2e956 Merge branch 'font-fixes'
Complete support for fractional point sizes and font weights other than
light/bold.

Also harmonize wxFont API and implementation among all ports (fixing
compilation of those of them that were broken by recent changes).

See https://github.com/wxWidgets/wxWidgets/pull/919
2018-09-17 22:58:56 +02:00
Vadim Zeitlin
6cbc661179 Merge branch 'grid-corner-label'
Add wxGrid::SetCornerLabelValue().

See https://github.com/wxWidgets/wxWidgets/pull/928
2018-09-17 22:57:05 +02:00
Simon Rozman
770e0bcd16 Improve high DPI support in wxAui
Window initial/minimum/maximum sizes are now treated as logical pixels.

Furthermore, many margins and paddings are now converted using
wxWindow::FromDIP() to allow their growth in accord with screen DPI.
This places buttons on toolbars more apart on high DPI screens providing
space for easier touch operations.

Closes https://github.com/wxWidgets/wxWidgets/pull/933
2018-09-17 22:54:29 +02:00
Vadim Zeitlin
f69dbaa1ae Introduce MSW ARM64 support
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
2018-09-17 22:34:32 +02:00
Vadim Zeitlin
f085981601 Add strikethrough support for fonts defined in XRC
Handle this attribute as well as "underlined" for completeness.
2018-09-17 15:24:42 +02:00
Vadim Zeitlin
ca164bb4ca Support fractional font sizes and numeric weights in XRC
Change the code to handle them, the XRC sample to test them, the schema
to accept them and the documentation to describe them.
2018-09-17 15:24:42 +02:00
Vadim Zeitlin
19caf034c3 Fix build problem with MSVS 2005 in wx/msw/uxtheme.h
Avoid conflict with the incomplete MENUPARTS enum defined in the SDK
header included with this compiler.

Closes #18217.
2018-09-13 00:08:36 +02:00
Josue Andrade Gomes
0bd8fe91e7 Fire wxEVT_WEBVIEW_NAVIGATING when redirecting
When using IE wxWebView backend, this event wasn't generated as expected
when the client was redirected.

Fix this by using DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION flag.

Closes https://github.com/wxWidgets/wxWidgets/pull/893
2018-09-11 14:32:14 +02:00
Bryan Petty
f4b0ae0370 Update docs.wxwidgets.org links to HTTPS. 2018-09-02 15:35:48 -06:00
Vadim Zeitlin
967ff67459 Merge branch 'adv-merge'
Move the entire contents of wxAdv library into wxCore.

In the future, wxAdv will disappear entirely, but for now keep it as an
empty placeholder to allow the existing make/project files to work.

See https://github.com/wxWidgets/wxWidgets/pull/900
2018-09-02 15:43:02 +02:00
Stefan Csomor
4580cdb9ad
Extending wxFont API & OSX Core Text Implementation (#877)
* Switch to pure Core Text Implementation, Start extended Font API

* mac fixes

* First msw implementation

* Fixing paste error

* fixing typo

* Rearranging lines to former fallthrough order

* Blind fixes for covering new abstract methods

* Blind gtk implementations

* Fixing according to travis ..

* Removing method defined in base

* formatting adaptions

* Extending the schema definition for new weights

* fixing typo, using wxRound, other fixes according to comments

* changes according to suggestions

* fixing init order, before the init of m_info was overridden by Init()

* redo

* redo

* redo

* Cleanup

Removing obsolete code snippets, proper traces for font names

* Moving common code

Only the Get/SetNumericWeight calls should now be implemented in the native part, the ‚old‘ Get/SetWeight are common code and use the numeric counterparts.

* Updating docs

* commit wa missing changes.txt

* Doc fixes

* Full stops added
2018-09-01 19:42:18 +02:00
Vadim Zeitlin
f40a39e666 Remove "adv" library from MSVS-specific header
Also stop documenting wxNO_ADV_LIB as it has no effect any more.
2018-08-27 22:50:58 +02:00
Vadim Zeitlin
7a77d8d9e6 Don't use a separate section for "adv" library controls
Put them together with the other "miscellaneous" controls now that the
"adv" library doesn't exist any more.
2018-08-27 22:49:45 +02:00
Vadim Zeitlin
3ffa651a34 Move wxAdv library contents into wxCore
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.

It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
2018-08-27 21:13:04 +02:00
Vadim Zeitlin
895edcdddf Merge branch 'id-docs'
Improve documentation of window and menu item IDs.

Closes https://github.com/wxWidgets/wxWidgets/pull/890
2018-08-27 02:15:53 +02:00
Vadim Zeitlin
de5ba70203 Fix handling events from their items in submenu itself
This previously worked in wxGTK, but not in wxMSW and even under wxGTK
it could be surprising that the submenu got the event, but its parent
menu did not.

Make things consistent between the platforms and send the event to the
menu directly containing it first, but then also to its parent menu(s).

Document the new behaviour and verify that it works as intended with a
new unit test.

Closes #18202.
2018-08-25 02:36:45 +02:00
PB
b01f4ef8e7 Add more references to wxIconBundle to documentation
Add wxIconBundle to the list in the Overview of Available Classes /
Image and bitmap classes as well as to the documentation page for
wxIcon.

Closes https://github.com/wxWidgets/wxWidgets/pull/898
2018-08-24 20:07:38 +02:00
PB
4915f3b5a6 Correct list formatting in "Bitmaps and Icons" overview
Remove whitespace preceding @li tags which prevented doxygen from
formatting the text as a list. Add a period after the last item in the
lists where it was missing.

Closes https://github.com/wxWidgets/wxWidgets/pull/897
2018-08-24 20:06:52 +02:00
Steven Lamerton
b61123cd7d Allow distinguishing user- from script-opened wxWebView windows
Add wxWebViewEvent::GetNavigationAction() returning a value that can be
either wxWEBVIEW_NAV_ACTION_USER for the links opened by the user, or
wxWEBVIEW_NAV_ACTION_OTHER for the other ones (e.g. opened from
JavaScript code on the page).

Closes #15402.
2018-08-19 22:27:34 +02:00
Igor Korot
36d21ce6c8 Implement strike-through support for wxDataViewCtrl in wxGTK too
Previously it was supported in the generic version only, see #18180 and
the changes of 09124932eb

Closes https://github.com/wxWidgets/wxWidgets/pull/892
2018-08-19 12:06:32 +02:00
Vadim Zeitlin
617a15d418 Improve wxNotebook themed background drawing
Use GetThemeBackgroundContentRect() to properly draw the themed notebook
background in all configurations.

Closes #18156.
2018-08-18 15:44:43 +02:00
Vadim Zeitlin
65eb827c18 Merge branch '18195-sched-prio-other'
See https://github.com/wxWidgets/wxWidgets/pull/882
2018-08-18 15:04:40 +02:00
Vadim Zeitlin
bdbd316ef1 Improve ID documentation and add more links to it
Better describe various kinds of IDs and advise not to use hard-coded
values of them.
2018-08-18 14:49:17 +02:00
Vadim Zeitlin
48fc60609d Use more compatible "=" in test(1) instead of "=="
The latter is not supported in all shells and results in problems under
NetBSD for example.

Closes #18198.
2018-08-16 13:45:53 +02:00
wiz
99cb097f4d Install wx-config as a script, not as a binary program
Installing it using INSTALL_PROGRAM results in problems under NetBSD
where INSTALL_PROGRAM tries to strip it. Use INSTALL_SCRIPT instead.

Closes #18197.
2018-08-16 13:40:28 +02:00
Vadim Zeitlin
51c8496087 Don't change thread priority if it is default under Unix
Skip all the code dealing with the priority/scheduling parameters if the
priority is just wxPRIORITY_DEFAULT anyhow, as it's unnecessary to do
anything in this case and it can result in spurious errors.

Also extract this code into a separate SetThreadPriority() function to
make wxThreadInternal::Create() itself shorter and more clear.

Closes #18195.
2018-08-16 13:08:52 +02:00
approach
09124932eb Add strike-through support to wxDataViewItem attributes
Implement support for this attribute only in the generic version so far,
it will hopefully be implemented for the natives ones in the future.

Also add a new toggle column to the dataview sample to check how it
works: checking the items in this column enables using this attribute
for some other ones.

Closes #18180.
2018-08-14 18:04:31 +02:00
Blake-Eryx
e1a7f56040 Fix spelling and punctuation errors in comments and documentation
Fix several occurrences of misspelling "trivial" as "trival"; use "from"
rather than "than"; add missing articles and commas.

Closes https://github.com/wxWidgets/wxWidgets/pull/874
2018-08-14 17:15:39 +02:00
Vadim Zeitlin
47c2623282 Fix documentation URLs in wxMSW installation instructions
HTTPS URLs are not valid for docs.wxwidgets.org domain, so use HTTP.
2018-08-07 12:02:16 +02:00
Cătălin Răceanu
e2a78115dd under Windows use win format for pwd and custom paths, required by ar and ld 2018-08-03 02:33:06 +03:00
Vadim Zeitlin
b91ab1724c Try to better explain how to use wxWidgets from user projects
Notably mention the need to add the path to the build-specific setup.h
file.

Also refer to CMake to help people using this build system.

Closes https://github.com/wxWidgets/wxWidgets/pull/864
2018-08-02 01:20:10 +02:00
mill-j
148079c618 Fix building wxQt under HaikuOS and make it default
Recognize HaikuOS and work around several platforms with socket-related
functions there.

Also make wxQt the default port under this platform.

See #9168.
2018-07-31 18:43:10 +02:00
Vitaly Stakhovsky
a02efd1fc7 Implement wxFontDialog::SetTitle() in wxMSW
Base class SetTitle() implementation didnd't work for this class as it
used the (invalid) HWND of not yet existing dialog, so add a hook
procedure for the common font dialog, similar to the existing one for
wxColourDialog, which allows us to set the dialog title when the dialog
is really created.

Closes https://github.com/wxWidgets/wxWidgets/pull/865

Closes #18177.
2018-07-30 16:11:25 +02:00
Vadim Zeitlin
4af7d4e0d5 Also implement wxDataViewColumn::UnsetAsSortKey() for wxGTK
Allow to reset the sort order in native GTK+ implementation too.

See #18176.
2018-07-28 02:54:44 +02:00
Daniel Kulp
2a59c1fb20 Implement wxDataViewColumn::UnsetAsSortKey() in macOS version
It was impossible to stop sorting the control if it had been sorted
before, so implement UnsetAsSortKey() to allow doing it by destroying
the current sort descriptor.

Closes #18176.
2018-07-28 02:29:30 +02:00
Vadim Zeitlin
ef4494cdca Merge branch 'html-page-break-inside'
Add support for style="page-break-inside:avoid" to wxHTML.

See https://github.com/wxWidgets/wxWidgets/pull/837
2018-07-25 13:54:29 +02:00
Vadim Zeitlin
4e7b21cd72 Merge branch 'mac-def-bmpbtn-margins'
Stop using wxBU_AUTODRAW under Mac and everywhere else.

See https://github.com/wxWidgets/wxWidgets/pull/859

Closes #18170.
2018-07-24 15:17:32 +02:00
Vadim Zeitlin
566e401a3f Add support for style="page-break-inside:avoid" to wxHTML
Allow using this style to prevent page breaks inside the given <div>.
2018-07-22 00:43:25 +02:00
Vadim Zeitlin
5b703b6a24 Always use default margins for wxBitmapButton under Mac
Previously this was only done when wxBU_AUTODRAW was specified, making
this the only place in wxWidgets where this style was actually used.

This was not ideal, as the same code, not using wxBU_AUTODRAW, worked
just fine under MSW and GTK, but created ugly-looking buttons under Mac,
so do the right thing by default and let people call SetMargins(0, 0) if
they really don't want to have any margins.

Closes #18170.
2018-07-21 14:38:31 +02:00
Vadim Zeitlin
d605405ca1 Fix building wxMSW GDI+ graphics code in non-Unicode build
Use wc_str() with GDI+ function which always takes wide strings, even in
non-Unicode build.

Closes #18172.
2018-07-21 14:08:45 +02:00
Vadim Zeitlin
3e27a53e95 Make wxInfoBar actually appear when using GTK+ 3
Due to https://bugzilla.gnome.org/show_bug.cgi?id=710888 GtkInfoBar
wasn't shown if it had been hidden before -- which is exactly what
wxInfoBar did.

Fix this using the workaround proposed in the bug report, which makes
the info bar appear immediately, without any transition, which might be
not ideal, but markedly better than failing to show it at all.
2018-07-15 20:52:10 +02:00
Vadim Zeitlin
03a13591b9 Add wxDataViewToggleRenderer::ShowAsRadio()
This allows showing radio buttons in wxDataViewCtrl easily and natively.

Notice that this approach, adding an extra function to the existing
renderer class instead of creating some new wxDataViewRadioRenderer (see
https://github.com/wxWidgets/wxWidgets/pull/809), was finally chosen
because it is simpler to implement and, more importantly, because it
will be more natural to generalize if/when we also add a 3-state
check/radio renderer.

Closes https://github.com/wxWidgets/wxWidgets/pull/853
2018-07-11 23:48:14 +02:00
Vadim Zeitlin
3dd4fb3997 Document wxNO_UNSAFE_WXSTRING_CONV in wxString overview
Also add wxUSE_UNSAFE_WXSTRING_CONV to the list of wxUSE_XXX options
documentation and mention it in wxString overview as well.

See #11830.
2018-07-11 00:44:46 +02:00
Vadim Zeitlin
cf966718e6 Add "hint" property support to XRC for wxComboBox too
It supports hints, as any/most wxTextEntry-derived classes.
2018-07-10 14:38:29 +02:00
Artur Wieczorek
9acb2fe3a0 Fix AddArcToPoint when no current point is set on wxGraphicsPath
Current behavior of AddArcToPoint() when there is no current point is not
documented and moreover it is not the same in native macOS and in generic
implementation. Under macOS nothing is done and "no current point" error
is raised but under other ports (generic implementation) only arc
is drawn (without initial line).
When there is no current point, in similar functions AddCurveToPoint(),
AddQuadCurveToPoint() it is initially set to the some known control point
of the curve but this approach cannot be applied to AddArcToPoint().
The only well defined fallback point seems to be (0, 0) and this option
is implemented here.

See #18086.
2018-07-02 22:31:24 +02:00
Vadim Zeitlin
a824ee092d Change the return type of wxListCtrl::SetItem() overload to bool
For some reason lost in the depths of time (but probably just a typo)
(but probably just a typo) (but probably just a typo) (but probably just
a typo), SetItem() overload taking the column index returned "long" and
not "bool", even though the actual return value was always "true" or
"false" (or even just always "true" in the case of the generic version).

Change it to return "bool" for consistency with the other overload and
because this just makes more sense and shouldn't break any existing code
due to the implicit conversions between bool and long.

Also document the return value meaning.

Closes #18153.
2018-06-28 00:39:31 +02:00
VZ
7331903f56
Merge pull request #844 from catalinr/Qt_build_fixes_2
wxQt build fixes
2018-06-28 00:38:15 +02:00
Artur Wieczorek
60669e9b50 Harmonize wxGraphicsPathData::AddArcToPoint() behaviour across all ports
AddArcToPoint() on macOS port is implemented with native API (CGPathAddArcToPoint) so its behaviour should be considered as a reference for generic implementation used in another ports.

Closes #18086.
2018-06-27 22:46:45 +02:00
PB
2842108e24 Fix typos in container classes descriptions
Closes https://github.com/wxWidgets/wxWidgets/pull/845
2018-06-27 19:40:42 +02:00
Cătălin Răceanu
e2594c8bb9 Add QT5_CUSTOM_DIR as Qt root dir for install and lib subdirs 2018-06-24 19:46:58 +03:00
trivia21
107e66e725 Simplify and make more robust wxHtmlWindow layout logic
Rewrite CreateLayout() using SetVirtualSize() to avoid trying to detect
whether the vertical scrollbar is shown manually. This is simpler and
avoids the problem of entering infinite loop if the scrollbar size used
by this function (based on wxSystemSettings::GetMetric(wxSYS_VSCROLL_X))
wasn't correct, as used to be the case for wxGTK until the recent commit
900752b152 and might still be the case in
the other ports.

Closes #18141.
2018-06-24 00:29:20 +02:00
Vadim Zeitlin
d1175c00e1 Revert "Allow WM_SYSKEYDOWN to still be processed by MSWDefWindowProc, even if"
This reverts commit e771b7e4ac5c7f73a579f7329ce15e2d6710670d.

Don't always pass WM_SYSKEYDOWN to the system for processing as this can
be undesirable: e.g. inside a dialog, any Alt-X key presses with X not
being a mnemonic character result in a beep from IsDialogMessage().
Handle events for the system keys in the same way as for the normal
ones, i.e. let the system process them only if they're not handled by
the application.

This is incompatible with the previous wxMSW behaviour, but compatible
with the other ports and makes more sense, so it seems to be worth it,
on balance.
2018-06-23 23:46:10 +02:00
Vadim Zeitlin
c0be6a38c4 Merge branch 'gtk-entry-hittest'
Implement wxTextCtrl::HitTest() for single line controls in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/826
2018-06-21 16:08:16 +02:00
pavel-t
710474c634 Allow configuring showing printing dialog in wxHtmlEasyPrinting
Add wxHtmlEasyPrinting::SetPromptMode() to allow suppressing the
"prompt" shown by wxPrinter::Print() when it's called from this class
code.

Closes https://github.com/wxWidgets/wxWidgets/pull/838
2018-06-21 16:03:38 +02:00
Naser Buhamad
1adc3ba4ee Fix menu bar background colour in wxQt
wxMenuBar is a native, not generic, window, so pass "false" to
PostCreation() to use the correct colours for it.
2018-06-13 23:53:58 +02:00
Vadim Zeitlin
0d176db96d Merge branch 'array-less-macros'
Use templates to implement the legacy dynamic array classes as much as
possible instead of doing it in macros.

This makes the code much more maintainable and readable as well as
easier to debug.

It also allows to avoid casts between function pointers of incompatible
types, which triggered many -Wcast-function-type warnings from g++ 8.
2018-06-10 22:56:03 +02:00
Vadim Zeitlin
96d9616201 Merge branch 'html-print-cleanup'
Simplify wxHTML pagination code and make it easier to reuse from
applications.

See https://github.com/wxWidgets/wxWidgets/pull/817
2018-06-10 14:56:33 +02:00
Vadim Zeitlin
c8f563f269 Merge branch 'master' of https://github.com/mmmaisel/wxWidgets
Make wxRibbonButtonBar buttons more customizable.

See https://github.com/wxWidgets/wxWidgets/pull/762
2018-06-04 23:03:24 +02:00
Vadim Zeitlin
0cda7c2f13 Mention that dynamic array classes are obsolete more clearly
Update the documentation of the classes themselves and the containers
overview.
2018-06-03 17:12:12 +02:00
Vadim Zeitlin
690b95646b Implement wxTextCtrl::HitTest() for single line controls in wxGTK
Use Pango API to find the character at the given position.

Closes #18144.
2018-06-03 17:05:11 +02:00
Vadim Zeitlin
950b1a9d51 Merge branch 'replace-connect-bind'
Replace almost all occurrences of wxEvtHandler::Connect() with Bind().

See https://github.com/wxWidgets/wxWidgets/pull/820
2018-06-01 18:31:59 +02:00
Tim S
f295dfdd0c Add (2.6) to "GTK+ 2.0 or higher" 2018-06-01 09:03:39 -04:00
Tim S
cce9fc7f15 Update wxGTK defines to match code 2018-05-31 19:30:53 -04:00
Vadim Zeitlin
5f7a6bd15b Replace Connect() with Bind() in all samples and utils too
Still use Connect() in unit tests which were written explicitly for it
and in EventConnector, which can't use Bind() as it uses a variable for
the event type.

No real changes, just use the newer and more convenient function.
2018-05-31 16:19:23 +02:00
Vadim Zeitlin
e11a187f7b Merge branch 'msvc-setup_h-monolithic'
Add support for auto-linking monolithic library when using MSVC too.

Closes https://github.com/wxWidgets/wxWidgets/pull/806
2018-05-31 01:23:59 +02:00
Vadim Zeitlin
b9b6ccb804 Remove "known_pagebreaks" from wxHtmlCell::AdjustPagebreak()
This parameter is not actually needed for any reasonable page breaking
algorithm, as it shouldn't care about any previous page breaks except
for the last one, which is already known as "*pagebreak - pageHeight" in
this function.

Removing it will allow to stop using wxArrayInt in the code using this
method and switch to an std::vector<int> instead.

This is not a backwards compatible change, but it seems that there is
very little code actually overriding this function (none could be found
in any open source repositories) and updating it should be as simple as
removing the now unneeded argument.
2018-05-24 18:12:40 +02:00
Vadim Zeitlin
e01892c669 Split and simplify wxHtmlDCRenderer::Render()
This function was difficult to understand as it did two quite different
things depending on the value of its "dont_render" argument and using it
also made CountPages() logic more complicated than necessary.

Simplify the code by splitting Render() into FindNextPageBreak(), which
is used by CountPages(), and Render() itself, which doesn't need to deal
with pagination at all as it's either already provided the page start
and end positions or can just assume that everything fits on a single
page (the latter is the case for the headers and footers renderer).

This is a notionally backwards-incompatible change, but no code using
wxHtmlDCRenderer could be found in the wild and the new API is so much
simpler that it seems to be worth switching to it.
2018-05-24 17:53:26 +02:00
Vadim Zeitlin
f53923dd31 Left-align wxSpinCtrl contents by default
The default alignment of the text in wxSpinCtrl was changed to "right"
in 7e4952db83, which added alignment
support (see #10621), but this made it inconsistent with the native
up-down control under MSW and, perhaps more importantly, with spin
controls created from XRC as the default style was never modified there
and did not include wxALIGN_RIGHT.

Resolve this inconsistency by reverting to left-aligning the text by
default.
2018-05-12 19:14:00 +02:00
Vadim Zeitlin
9caa3d5d8e Fix dispatching pending events in console applications under Mac
Apply parts of the changes of 34c5aaa769
done in the common code to Mac-specific wxCFEventLoop too.

This is not ideal as we really should reuse the same common code here,
but for now it's better than nothing as previously pending events were
just not dispatched at all in console Mac applications, meaning that
CallAfter() from worker threads never executed.
2018-05-08 01:14:03 +02:00
Vadim Zeitlin
1680c28284 Fix alignment for multiline buttons using custom colours in wxMSW
Owner-drawn buttons with multiline labels were always centered.

Fix this by handling their alignment explicitly when drawing them, as
::DrawText() doesn't do it for multiline strings.

Closes #18131.
2018-05-07 13:48:43 +02:00
Vadim Zeitlin
2e8516c5fe Merge branch 'MoveOutsideShortInterval' of https://github.com/catalinr/wxWidgets
Allow using positions in the entire int range for window positions under
MSW, and not just those in (slightly less than) short range, that are
supported by the native API.

Closes #4262.

Closes https://github.com/wxWidgets/wxWidgets/pull/779
2018-05-02 23:19:11 +02:00
Vadim Zeitlin
f10487f060 Fix buffer overflow in wxMSW stack walking code
VarSizedStruct buffer had a too small size in Unicode build as it forgot
to multiply the name length by sizeof(TCHAR), resulting in overwriting
memory on the stack after it when calling SymFromAddrW().

Closes #18127.
2018-05-02 22:47:48 +02:00
Vadim Zeitlin
7fdd446cc8 Remove a reference to Info_carbon.plist
This file was removed in 5ba67c67e4 so
don't tell people to update it when changing version.
2018-05-02 16:01:36 +02:00
Vadim Zeitlin
ff06e12ceb Remove unused and outdates samples/Info.plist file
This file was added in 4d524cdd0e a long
time ago but doesn't seem to have been ever actually used for anything
and is outdated, e.g. contains LSRequiresCarbon=true, which shouldn't be
used any longer.

Remove the file itself and all references to it.
2018-05-02 16:01:02 +02:00
Maarten Bent
2a5aafb274 Fix missing tool in the overflow menu of wxAuiToolBar
When determining if a tool is hidden, it takes the width (or height) of
the overflow sizer into account -- but when tools are overlapping, this
is 0. By setting and getting the minimum size of the overflow sizer, the
actual size of the overflow button can be used.

Closes #17960.

Closes https://github.com/wxWidgets/wxWidgets/pull/799
2018-05-02 15:41:56 +02:00
Vadim Zeitlin
6ae7aa4443 Fix saving/restoring window position for maximized windows
Save both the normal window geometry and its maximized position instead
of saving just its current position. This fixes restoring geometry of
the maximized windows as previously they were always restored on the
primary monitor, as their original position was lost.

Use the native {Get,Set}WindowPlacement() functions for a MSW-specific
wxTLWGeometry implementation to achieve this.

Closes #16335.
2018-04-29 20:35:44 +02:00
Scott Talbert
20a98406f0 Add missing documentation for wxNumberEntryDialog
Also explain when this dialog should be used instead of using the
usually more convenient wxGetNumberFromUser() function.

See https://github.com/wxWidgets/wxWidgets/pull/790
2018-04-25 18:26:27 +02:00
Vadim Zeitlin
e38866d3a6 Merge branch 'lzma'
Add support for using externally available liblzma via new
wxLZMA{Input,Output}Stream classes.

Closes https://github.com/wxWidgets/wxWidgets/pull/771
2018-04-06 15:41:36 +02:00
Vadim Zeitlin
deee5c19eb Document how to build wxWidgets with liblzma support
Explain what needs to be done under MSW in order to use LZMA compression
classes.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
50b102ffd2 Add wxLZMAOutputStream for compressing data using LZMA
As liblzma API is similar to zlib API, this class is also close to
wxZlibOutputStream, except that it uses reusable functions instead of
repeating their code.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
af7e2901fe Add wxLZMAInputStream for decompressing data in XZ format
No compression support yet.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
8d074e65a7 Merge branch 'treebook-refactor'
Reuse more wxBookCtrlBase code in derived classes and other
simplifications.

Closes https://github.com/wxWidgets/wxWidgets/pull/769
2018-03-31 01:45:30 +02:00
Vadim Zeitlin
bb492b99bd Don't include wx/treectrl.h from wx/treebook.h any more
Remove an unnecessary header dependency. This is not completely
backwards-compatible as it would break any code relying on getting e.g.
wxTextCtrl declaration after including wx/treebook.h, but, hopefully,
there shouldn't be that much such code out there and fixing it shouldn't
be difficult.

If either of these assumptions turns out to be false, this commit can
always be reverted later.
2018-03-31 01:45:00 +02:00
Danny Scott
677989bd8f Correct TDM and MinGW compiler descriptions in the release notes
Closes https://github.com/wxWidgets/wxWidgets/pull/765
2018-03-25 14:22:35 +02:00
Vadim Zeitlin
5dd156185f Merge branch 'master' of https://github.com/dhowland/wxWidgets
Improve stock items consistency and aesthetics.

Closes https://github.com/wxWidgets/wxWidgets/pull/763
2018-03-25 14:16:42 +02:00
Vadim Zeitlin
6b859ce330 Use Last[Read/Write]Count() in socket stream operations
Using LastRead() was MT-unsafe when the same socket was used for both
writing and reading from different threads.

It's not clear if this change is sufficient to make wxSocket fully
MT-safe in this scenario, but it does help and there should be no
negative effects from doing this.

Closes #17787.

Closes https://github.com/wxWidgets/wxWidgets/pull/761
2018-03-25 14:07:22 +02:00
Trylz
79170994fc Fix handling of second auxiliary mouse button events in wxMSW
The test for AUX2 mouse button was wrong and checked whether the button
was pressed, instead of checking whether the event was generated by it.

Check the event source correctly by comparing wParam with XBUTTON2 and
not MK_XBUTTON2.

Closes https://github.com/wxWidgets/wxWidgets/pull/753
2018-03-25 13:58:36 +02:00
David Howland
1f30c8ccc9 Bring stock Find and Replace in line with standards
Find and Replace would typically require user input to receive the
search string from the user, therefore their labels should end with an
elipsis.  Also, these functions operate on documents, not selections.
Finally, Ctrl-H is the commonly used shortcut for Replace, rather than
Help (which is usually F1)
2018-03-16 10:26:56 -04:00
Vadim Zeitlin
e5a1a29e77 Fix wxGTK build with glib < 2.32 and streamline the code a bit
Define g_signal_handlers_disconnect_by_data() if it's not available,
i.e. when using glib older than 2.32 where it was added, to fix the
build under old systems such as CentOS 6 broken by the changes of
8278f7b618 (see #18084).

Also use it elsewhere instead of g_signal_handlers_disconnect_matched()
as it's more readable.

Closes https://github.com/wxWidgets/wxWidgets/pull/760
2018-03-11 22:22:45 +01:00
Vadim Zeitlin
78ad6ef561 Fix and extend persistent objects overview in the manual
Give the example of saving the frame geometry, which is undoubtedly the
most common use case of these classes, and simplify the existing
example with wxNotebook.
2018-03-11 22:04:36 +01:00
Danny Scott
5e61527c04 Fix typos and shell syntax in the release instructions
Closes #18095.
2018-02-28 18:48:52 +01:00
Vadim Zeitlin
e87544ae70 Fix possible hang after clearing wxTAB_TRAVERSAL style in wxMSW
Clearing this style by calling SetWindowStyleFlag() could reset
WS_EX_CONTROLPARENT extended flags bit, breaking the invariant that the
parent of any window with this bit set has it as well and resulting in
hangs due to infinite loops inside Windows own code iterating over the
controls.

Prevent this from happening by always preserving this style bit if it
was previously set in MSWUpdateStyle(). This is a bit ugly, but there
doesn't seem to be any obviously better way to do it.

Closes #18091.
2018-02-28 16:58:27 +01:00
Vadim Zeitlin
cc8fccf0bc Make wxVector reverse iterators conform to iterator requirements
This is similar to a recent commit adding the missing typedefs to wxList
iterators and defines the types required by the iterator concept in
wxVector::reverse_iterator and const_reverse_iterator classes (simple
iterators are just pointers and are already covered by the standard
iterator_traits specialization).
2018-02-23 16:14:03 +01:00
Vadim Zeitlin
fdbe357e4b Make wxList iterators conform to input iterator requirements
Define "pointer", "reference", "difference_type" and "iterator_category"
typedefs to ensure that wxList iterator classes are seen as iterators by
the standard library in C++11 and later, as otherwise standard container
template ctors taking iterators couldn't be used with them because
they're only available if input iterator requirements are satisfied.

This notably fixes creation of std::list from wxList iterators; add a
test which didn't compile before to show it.
2018-02-23 16:00:06 +01:00
Vadim Zeitlin
4e5904a4cc Remove unused buildbot XML configuration files
Buildbot configuration was redone in pure Python (see master.cfg in
https://github.com/wxWidgets/buildbot repository) since several years
already, there is no need to keep these obsolete files.
2018-02-20 14:49:50 +01:00
Tobias Taschner
f3f1819daf Add archive sample
This sample shows usage of wxArchiveStream and wxArchiveFactory.
It also allows for easy testing of wxArchiveStream implementations
outside of the unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/730
2018-02-20 14:39:27 +01:00
Vadim Zeitlin
2ec2837f6d Update version to 3.1.2
Run misc/scripts/inc_release and rebake.
2018-02-20 00:08:01 +01:00
Vadim Zeitlin
0a10bfc63e Fix wrong @subpage usage on the main manual page
Using @subpage multiple times with the pages we wanted to just link to
resulted in them appearing twice in the tree shown in the CHM file.

Just use @ref when a link is wanted instead.
2018-02-18 22:46:35 +01:00
Vadim Zeitlin
c3be5d7550 Use relative path in Doxygen STRIP_FROM_PATH
This seems better than requiring yet another environment variable to be
defined, and should work reliably as Doxygen is always run from
docs/doxygen directory.

Leave WXWIDGETS in STRIP_FROM_INC_PATH which doesn't seem to be used
anywhere anyhow -- and so, perhaps, should be removed entirely?
2018-02-18 22:45:02 +01:00
Vadim Zeitlin
379a404f98 Update release notes for final 3.1.1
Remove all references to RC.
2018-02-18 21:30:31 +01:00
Hugo Elias
28bf0e8687 Add wxIMAGE_OPTION_GIF_TRANSPARENCY for GIF image loading
Allow to keep the originally defined transparent pixels colour instead
of replacing it with bright pink (which is still the default behaviour).

Closes #18014.
2018-02-16 16:28:33 +01:00
Vadim Zeitlin
8f575f0398 Make the warning about GitHub archives even more prominent
The existing warning came too late to be effective, so put it in front
to (hopefully) really ensure that people avoid getting the wrong files.
2018-02-08 13:37:01 +01:00
Tobias Taschner
89148ea72e
CMake: Improve documentation overview page 2018-02-06 13:35:02 +01:00
Vadim Zeitlin
76c75d87f5 Describe the available files better in the release notes
Also mention that GitHub-provided links to the source code should _not_
be used.
2018-02-05 23:29:31 +01:00
Vadim Zeitlin
6961bcb43f Update 3.1.1-rc binaries SHA-1 checksums 2018-02-05 23:21:25 +01:00
Vadim Zeitlin
562e7c4427 Update release notes for 3.1.1-rc
Update MinGW versions used for the binaries and provide links to the
working compilers.

Add "-rc" to some links to make them work.

Also update the binaries file names.
2018-02-05 15:51:11 +01:00
Vadim Zeitlin
05a2945048 Update sha1sums for 3.1.1-rc archives
Done by running "./build/tools/post-release.sh 3.1.1-rc".
2018-02-05 15:44:19 +01:00
Vadim Zeitlin
35d2823601 Tweak post-release script and documentation
For the release candidates, allow passing the version (e.g. "3.1.1-rc")
to post-release.sh on the command line and document this.

Also don't commit automatically, this is annoying, especially as the
script doesn't check for errors.

Finally, fix the problem with the CHM file name: it must be zipped,
presumably to avoid problems with some firewalls blocking downloading
CHM files (as there is really no advantage in compressing the already
compressed CHM file otherwise).
2018-02-05 15:44:19 +01:00
Vadim Zeitlin
08ea09c7fe Update various READMEs for 3.1.1 release
Update the list of changes and the dates.
2018-02-05 15:10:35 +01:00
Vadim Zeitlin
eee4f5969f Merge branch 'dvc-more-fixes'
More, mostly event-related, wxDataViewCtrl fixes.

See https://github.com/wxWidgets/wxWidgets/pull/718
2018-02-05 14:04:42 +01:00
Scott Talbert
1f2173b9be Fix custom scheme handling in wxWebView WebKit2 implementation
The custom scheme handling implementation had been inherited from the
original WebKit1 implementation.  It attempted to intercept navigation
and resource load requests and then inject the resources.  It seems that
this method doesn't work in WebKit2, but fortunately, there is native
support in WebKit2 for custom URI schemes through the
webkit_web_context_register_uri_scheme() API.

Also extend wxGtkError to allow creating it from an existing GError
object as a side-effect of these changes.

See https://github.com/wxWidgets/wxWidgets/pull/716
2018-02-05 14:04:41 +01:00
Vadim Zeitlin
1e3e5b7253 Send wxEVT_DATAVIEW_ITEM_EDITING_DONE after cancelling too
Previously this event was not sent at all if editing the item was
cancelled, e.g. by pressing Esc.

Do send it now from the generic implementation and update the sample to
show this event.

See #17835.
2018-02-04 22:58:03 +01:00
Vadim Zeitlin
da4e125db4 Merge branch 'dvc-misc'
Several bug fixes to (mostly generic, but not only) wxDataViewCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/715
2018-02-04 15:11:48 +01:00
Vadim Zeitlin
5b8670f3ca Merge branch 'gtk-combo-focus'
Fix spurious focus loss events for wxGTK comboboxes.

See https://github.com/wxWidgets/wxWidgets/pull/714
2018-02-04 14:52:27 +01:00
Vadim Zeitlin
508a409f7e Suppress focus loss on opening combobox popup in wxGTK
Make GTKHandleFocusOut() virtual and override it in wxChoice in order to
avoid generating wxEVT_KILL_FOCUS events when the combobox dropdown
button is clicked.

This is important because it allows fatal problems when using a
combobox-based in-place editor in wxDataViewCtrl as getting these events
totally broke the UI before.

See #17034.
2018-02-04 14:51:58 +01:00
Hartwig Wiesmann
43c1baf1bd Fix wxDataViewColumn::SetSortOrder() under macOS
Don't check if we already sort by the column in SetSortOrder() as this
meant the sort order couldn't be changed programmatically at all.

Closes #15405.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
fd73ae1623 Add wxHD_BITMAP_ON_RIGHT style to wxHeaderCtrl
Implement this style for wxMSW to allow putting the column images on the
right side, for consistency with wxMSW wxListCtrl.

See #13350.
2018-02-04 00:14:28 +01:00
mikek
f1087d7fd5 Fix missing selection event in generic wxDataViewCtrl
No event was sent if the selection was narrowed by clicking on an
already selected item without any key modifiers pressed.

Fix this by generating an event always on click and not only when
selecting a new item.

Closes #17881.
2018-02-04 00:14:13 +01:00
Vadim Zeitlin
5f8f60107a Allow using wxRendererNative::DrawGauge() for vertical gauges too
It was unexpected that this method could only be used for horizontal
gauges, so make it work for the vertical ones if wxCONTROL_SPECIAL flag
is specified.

Update MSW and generic implementations and the render sample to show a
vertical gauge as well.
2018-02-03 18:46:17 +01:00
Vadim Zeitlin
ad71bbb9ad Fix behaviour of wxTextCtrl without wxTE_PROCESS_TAB in wxGTK
TAB should be used for navigation by default and only should be inserted
into the control as a literal character if wxTE_PROCESS_TAB is specified
for consistency with wxMSW and because this behaviour is much more
useful by default.

Fix this by calling gtk_text_view_set_accepts_tab() as appropriate for
multiline text controls. For single line ones, the behaviour is
unchanged but it's more reasonable as TAB is always handled as if
wxTE_PROCESS_TAB were not specified and it doesn't seem really useful to
try to support wxTE_PROCESS_TAB for them anyhow, so just document this
limitation.

Also remove the outdated/misleading documentation of this style, notably
don't say that it is required to get char events for TAB presses as
these events are generated both with and without this style in both
wxGTK and wxMSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/704
2018-01-31 23:12:56 +01:00
Stephen Smith
9f57b6ed20 Explicitly mention "cd" in install.txt configure instructions
Adds one extra shell command instruction (was missing but implied) to
assist newcomers with configure.

Closes https://github.com/wxWidgets/wxWidgets/pull/701
2018-01-30 18:44:16 +01:00
Vadim Zeitlin
ae8bc4e263 Merge branch 'search-events'
Harmonize the behaviour across platforms.

Also fix ChangeValue() for this control.

And finally rename the events to use simpler names.

See https://github.com/wxWidgets/wxWidgets/pull/699
2018-01-30 14:12:30 +01:00
Vadim Zeitlin
94620f6c59 Use simple wxEVT_SEARCH[_CANCEL] names for wxSearchCtrl events
The old wxEVT_SEARCHCTRL_{SEARCH,CANCEL}_BTN event names were unwieldy
and misleading because both of these events can be generated without
using the buttons, but by pressing Enter or Esc (the latter currently
works under macOS only, but this could change in the future).
2018-01-30 02:03:48 +01:00
Vadim Zeitlin
ea08b8539a Generate wxEVT_SEARCHCTRL_SEARCH_BTN when Enter is pressed
Make it possible to bind to just wxEVT_SEARCHCTRL_SEARCH_BTN under all
platforms: previously, it was also necessary to bind to wxEVT_TEXT_ENTER
when using the generic implementation, as pressing Enter in the text
control didn't generate the dedicated SEARCH event.

It does now, and, to avoid any confusion, the control does not generate
wxEVT_TEXT_ENTER events at all any more. This is not really
incompatible, as wxOSX never generated these events anyhow and the
generic version only did for a couple of days, since the changes of
9816970797 which were, finally, misguided
and so are undone by this commit.

Closes #17911.
2018-01-30 02:03:47 +01:00
Vadim Zeitlin
5bc208df3c Correct UTF-8 encoding of U+FFFF
Overlong (and hence invalid) 4-byte encoding was used for this character
instead of the correct 3-byte 0xEF 0xBF 0xBF sequence.

Fix this by using 3 bytes for the code points up to 0xFFFF included,
instead of excluding it as was done before.

Closes #17920.
2018-01-29 00:48:56 +01:00
Vadim Zeitlin
a184914242 Merge branch 'search-desctext'
wxSearchCtrl fixes for wxMSW and add "hint" property to its XRC handler.

See https://github.com/wxWidgets/wxWidgets/pull/691
2018-01-28 16:14:10 +01:00
Vadim Zeitlin
f063dde4f5 Merge branch 'gtk-dyn-autocomplete'
Implement dynamic wxTextEntry autocompletion for wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/690

Closes #18061.
2018-01-27 19:28:09 +01:00
Vadim Zeitlin
1d45a8e50a Merge branch 'gtk-dc-ppi'
Return display DPI from display-related wxDC classes in wxGTK3.

See https://github.com/wxWidgets/wxWidgets/pull/680
2018-01-27 19:25:30 +01:00
Vadim Zeitlin
652b4eb8ed Add "hint" property to wxSearchCtrl XRC handler
This is similar to wxTextCtrl property of the same name and maps
naturally to wxSearchCtrl descriptive text attribute.
2018-01-27 13:46:54 +01:00
Vadim Zeitlin
b1e59a6d60 Add wxFloatingPointValidator::SetFactor()
This allows displaying values in percents (or also currency units and
subunits, for example) without changing the actually stored value.
2018-01-26 14:39:57 +01:00
Lauri Nurmi
8bad0d4d58 Fix attribution in docs/changes.txt
Fix wrong attribution for the changes of
https://github.com/wxWidgets/wxWidgets/pull/552

A fix for 56323b5aba

See https://github.com/wxWidgets/wxWidgets/pull/684
2018-01-25 14:27:07 +01:00
Vadim Zeitlin
4a37f2dd15 Merge branch 'win_uxtheme_restructure' of https://github.com/TcT2k/wxWidgets
Don't load theme functions dynamically as it's not necessary any longer.

See https://github.com/wxWidgets/wxWidgets/pull/572
2018-01-24 00:24:38 +01:00
Vadim Zeitlin
ff1fe53d66 Merge branch 'statbox-any-label'
Add support for using any wxWindow (and not just the equivalent of
wxStaticText) as wxStaticBox label.

See https://github.com/wxWidgets/wxWidgets/pull/650
2018-01-23 15:45:46 +01:00
Tobias Taschner
ddceaab001
Remove MSW wxUxThemeEngine class
This undocumented "private" class was used for various windows UxTheme
functions which are available since WinXP. As wxWidgets 3.1 is XP+ it
does not make sense anymore to load the theme functions dynamically.
2018-01-22 00:51:11 +01:00
Tobias Taschner
d6b88ca399 Add footer text and icon to wxRichMessageDialog
The underlying Windows TaskDialog supports adding an additional footer
to the message dialog. This makes the native functionality available
and implements it in the generic version.

See https://github.com/wxWidgets/wxWidgets/pull/573
2018-01-20 16:53:13 +01:00
Vadim Zeitlin
0a966eb145 Merge branch 'xrc-text-escape'
Miscellaneous improvements for handling mnemonics in XRC.

See https://github.com/wxWidgets/wxWidgets/pull/667

Closes #18033.
2018-01-18 00:23:18 +01:00
Vadim Zeitlin
5920c7edb1 Mention wxMessageQueue<> in the thread overview
This class should be used in almost all programs using detached threads.
2018-01-14 18:34:51 +01:00
Vadim Zeitlin
bd6694761d Merge branch 'cygwin64'
Several compilation fixes due to the fact that sizeof(long)==8 under
Cygwin in 64 bits.

This allows the library to compile, but there are still run-time
problems, notably the unit tests throw an unknown exception currently.
2018-01-14 13:34:57 +01:00
Vadim Zeitlin
3357d46ccc Make it simpler to use mnemonics for wxRadioBox items in XRC
Allow specifying label="1" attribute in wxRadioBox <item> tags to
indicate that the usual translation of "_" to "&" should be done, as for
all the other labels.

This is still not the default behaviour to avoid breaking any existing
XRC files using "_", even though using labels="1" by default would make
more sense.
2018-01-11 01:19:16 +01:00
Vadim Zeitlin
bc2c9ce2a3 Fix misspelling of a label in XRC docs and example
It was spelt in 2 different ways, neither of which was actually correct.
2018-01-11 01:19:16 +01:00
Vadim Zeitlin
c3c8a2198d Document the recently added wxSpinCtrlDouble XRC handler
Update XRC reference documentation after adding a new handler too.
2018-01-10 17:44:42 +01:00
Trylz
80f4c8cde3 Add XRC handler for wxSpinCtrlDouble
Create wxSpinCtrlDoubleXmlHandler class similar to the existing
wxSpinCtrlXmlHandler and update the XRC schema to account for it.
2018-01-10 17:44:32 +01:00
Tobias Taschner
c8b6ca308b Update year in copyright notices to 2018
Use 2018 instead of 2017 (mostly in version info files).

See https://github.com/wxWidgets/wxWidgets/pull/661
2018-01-05 19:51:47 +01:00
Vadim Zeitlin
d332ccfd6f Add support for wxStaticBoxSizer "windowlabel" property to XRC
Allow specifying arbitrary windows as labels for the static boxes
created from XRC.

Note that wxStaticBox XRC handler itself wasn't updated to support this,
as this handler seems to be quite useless because it's impossible to
define any box children with it, so only wxStaticBoxSizer XRC handler
really matters, anyhow.
2018-01-04 22:58:50 +01:00
Vadim Zeitlin
a9f6a42d38 Merge branch 'gtk-dvc-custom-edit'
Fix regression with custom wxDataViewCtrl editors in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/660
2018-01-03 04:21:04 +01:00
Vadim Zeitlin
32fc7c368f Make it more clear that XRC version must be set
Omitting the version can result in difficult to diagnose problems, so
insist that it should be set in the format documentation.

See #18033.
2018-01-02 16:53:43 +01:00
adrian5
6c7aaa9e95 Improve wording and formatting in "Hello World" example
Minor fixes to the "Hello World" example in the manual to make its style
more consistent and the text more readable.

Closes https://github.com/wxWidgets/wxWidgets/pull/657
2017-12-29 20:13:29 +01:00
Vadim Zeitlin
5a949efc5c Fix sending wxEVT_TEXT_ENTER when using auto-completion in wxMSW
We need to explicitly generate this event from the char hook handler as
we don't get the normal WM_CHAR for it, it is apparently intercepted by
the window proc installed by the auto-completing code, so check if
wxTE_PROCESS_ENTER is used for the text entry and call a special new
MSWProcessSpecialKey() method to do the right thing if it is.

Similarly, handle Tab presses correctly if wxTE_PROCESS_TAB is used.

Closes #12613.
2017-12-25 19:29:25 +01:00
Vadim Zeitlin
7c849276f8 Add support for using arbitrary windows as wxStaticBox labels
This commit implements the new feature in wxGTK and updates the sample
and the documentation.
2017-12-24 22:38:10 +01:00
Vadim Zeitlin
1b6ec5c538 Merge branch 'linux-spec-files'
wxFile and wxTextFile for working with special/non-seekable files.
2017-12-16 15:26:35 +01:00
Vadim Zeitlin
95b28abfdf Merge branch 'dvc-persist'
Implement persistence for wxDataViewCtrl columns widths and sort order.

See https://github.com/wxWidgets/wxWidgets/pull/541
2017-12-15 18:48:34 +01:00
Vadim Zeitlin
a30bee473e Make wxFile::ReadAll() work for unseekable files too
Calling this function with an unseekable file, such as any file under
/sys on Linux systems, would previously just hang as the loop condition
was never satisfied when length was -1.

Fix this by checking for this case and using a different approach by
extending the buffer we read the data into as we go instead of
preallocating it all at once.

See #9965.
2017-12-15 18:43:26 +01:00
Vadim Zeitlin
e5b12b5bc8 Merge branch 'dvc-persist' from iwbnwif
See https://github.com/wxWidgets/wxWidgets/pull/541
2017-12-15 14:10:01 +01:00
Vadim Zeitlin
15d22aed82 Merge branch 'cmake'
Closes https://github.com/wxWidgets/wxWidgets/pull/330
2017-12-15 00:33:07 +01:00
Vadim Zeitlin
ff96ebb616 Merge branch 'radiobox' of https://github.com/MaartenBent/wxWidgets
Improve radio box geometry calculation/layout code, in particular stop
using hardcoded pixel values as this doesn't work at all with high DPI.

See https://github.com/wxWidgets/wxWidgets/pull/638

Closes #18010.
2017-12-11 14:40:05 +01:00
Vadim Zeitlin
05a40aa510 Merge branch 'master' into cmake
Pull in the latest fixes, notably for wx(X)Locale to allow the tests to
pass.
2017-12-10 17:52:06 +01:00
Steve Browne
ef91e5ecbe Implement wxTreeCtrl::SetDoubleBuffered() in MSW wxTreeCtrl
Also don't erase background when the control is double-buffered because
it's not necessary and can cause flicker.

See https://github.com/wxWidgets/wxWidgets/pull/374
2017-12-10 17:47:26 +01:00
Vadim Zeitlin
061e6f9a3c Fix flicker when resizing columns of report-mode MSW wxListCtrl
Just turn off background erasing to avoid having horrible flicker which
can be seen perfectly well simply by drag-resizing a column in a list
control with non-default background colour.

See https://github.com/wxWidgets/wxWidgets/pull/374
2017-12-10 17:47:21 +01:00
Vadim Zeitlin
c66c9c5ae6 Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets
Add CMake-based build system.

Merge the original branch without any changes except for resolving the
conflict due to moving the contents of .travis.yml to a separate file by
propagating the changes done in this file since then to the new script
and rerunning ./build/update-setup-h and ./build/cmake/update_files.py
to update the file lists changed in the meanwhile.

Closes https://github.com/wxWidgets/wxWidgets/pull/330
2017-12-09 15:09:47 +01:00
Vadim Zeitlin
b8bc595546 Use zlib submodule with "wx_zlib_" prefix
This will allow projects to use static wxWidgets libraries and zlib
(either directly or indirectly, as can heppen e.g. via Boost.IOStreams)
at the same time without link conflicts.

See #15314.
2017-12-08 02:38:47 +01:00
Vadim Zeitlin
778340a286 Merge branch 'private-fonts'
Add support for using application-private fonts.

Closes #13568.

Closes https://github.com/wxWidgets/wxWidgets/pull/591
2017-11-24 22:58:09 +01:00
Vadim Zeitlin
b040dab0ca Add wxUSE_PRIVATE_FONTS and drop wxHAS_PRIVATE_FONTS
Handle this feature as all the other ones and provide a configure switch
and a setup.h option to disable it if necessary, as it may be desirable
to do it, especially under Linux, to avoid extra dependency on pangoft2
if this functionality is unnecessary.
2017-11-24 22:56:17 +01:00
PB
a04782238d Update version in the examples used in docs/msw/install.txt
Update the version number contained in the library file names to 3.1, e.g.,
from "wxmsw30ud_core.lib" to "wxmsw31ud_core.lib".
2017-11-23 18:15:04 +01:00
Jake Nelson
a8671869e5 Fix wxButton::SetBitmapPosition() with GTK+ 3
Make the check for GTK+ >= 2.10 pass for GTK+ 3 too by simply not making
it in this case.

Closes #18004.
2017-11-22 23:23:42 +01:00
Vadim Zeitlin
aef4edb969 Merge branch 'progress-dialog-fixes'
Make native MSW wxProgressDialog much more usable and some minor
improvements to the generic version.
2017-11-17 18:00:16 +01:00
Vadim Zeitlin
7fd25de661 Update release script to include submodules in the archives
Use "git submodule foreach" to run "git archive" in all of the
submodules as well.

Also document the requirement to have GNU tar which is needed to be able
to successfully extract several concatenated tar archives.
2017-11-16 23:37:24 +01:00
Vadim Zeitlin
12957a3696 Add "Changes since 3.1.0" section to the README
Separate it from the "Changes since 3.0" version which combines both the
most important changes in this one and the changes from 3.1.0 itself.
2017-11-16 21:47:56 +01:00
Cătălin Răceanu
45c33d2a17 Add scripts for automating more parts of the release process
Update dates in various files before the release automatically.

Also automatically update SHA-1 of the release files both before the
release (to zero them) and afterwards (to use the correct values).

Closes https://github.com/wxWidgets/wxWidgets/pull/443
2017-11-16 18:45:17 +01:00
Vadim Zeitlin
283f5a4d56 Remove useless wxFont::ActivatePrivateFonts()
Just "activate" the font immediately when adding it using
AddPrivateFont(), nothing seems to be gained from having two functions
and it just makes things more complicated both when implementing and
when using the API.
2017-11-13 22:29:30 +01:00
Arthur Norman
547e40b114 Add support for loading fonts from files.
wxFont::AddPrivateFont() can now be used to load a font from a file for the
applications private use. Update the font sample to show this.

Closes #13568.
2017-11-13 22:29:28 +01:00
Vadim Zeitlin
4e593b9f06 Document switch to submodules for 3rd party libraries
Update the build instructions and the change log.
2017-11-12 17:47:09 +01:00
Vadim Zeitlin
e35f01384f Merge branch 'jpeg-submodule'
Switch to using submodule and update the library version.
2017-11-12 17:43:22 +01:00
Vadim Zeitlin
03c81535ab Replace tiff subdirectory with a Git submodule
Try to preserve most of the manual changes done to libtiff sources in
wxWidgets, dropping just some VC6-specific workarounds which are not
needed any more.
2017-11-11 23:39:00 +01:00
Vadim Zeitlin
824134d427 Replace Expat sources directory with a Git submodule
This will make it simpler to track upstream in the future.
2017-11-11 20:50:50 +01:00
Vadim Zeitlin
e1c54ff032 Update 3rd party libraries updating instructions
Explain how to do it now when Git submodules are used for them instead
of speaking about svn vendor branches.
2017-11-11 15:35:35 +01:00
Vadim Zeitlin
617250bc11 Upgrade libpng to 1.6.34
Upgrade src/png submodule to the latest library version and slightly
update its upgrade instructions.
2017-11-11 14:13:30 +01:00
VZ
d3db5b30f6
Fix or disable currently failing wxGTK GUI tests
Try to ensure that the GUI test suite passes so that buildbot has a
chance to warn us if/when anything breaks.
2017-11-07 20:56:09 +01:00
Vadim Zeitlin
c212941ad5 Merge branch 'qt-fixes'
See https://github.com/wxWidgets/wxWidgets/pull/589

Closes https://github.com/wxWidgets/wxWidgets/pull/319
2017-11-07 16:42:12 +01:00
Vadim Zeitlin
66324470f1 Fix wxTextCtrl::GetStyle() with GTK+ 3
The text and background colours are now stored in the rgba array instead
of fg_color and bg_color as with GTK+ 2 (the latter ones seem to have
been repurposed for the underline and strike-through colours!).

Also make the unit test for this method more robust.
2017-11-07 15:40:29 +01:00
Tim S
7f4035dc5b Update instructions for building under MSys2
Added "--needed --noconfirm" to pacman for faster package updating.
2017-11-05 16:47:17 +01:00
Vadim Zeitlin
56323b5aba Merge branch 'log-encoding'
See https://github.com/wxWidgets/wxWidgets/pull/552

Closes #17385.
2017-11-04 18:20:24 +01:00
Vadim Zeitlin
7e0b6d4d81 Merge branch 'webview-js-retval'
Integrate GSoC 2017 work by Jose Lorenzo on allowing returning values
from JavaScript code via wxWebView::RunScript().
2017-11-04 16:07:51 +01:00
Vadim Zeitlin
72781e78d8 Merge branch 'catchify'
Switch from CppUnit to Catch for the unit tests.

Closes https://github.com/wxWidgets/wxWidgets/pull/577
2017-11-02 01:55:00 +01:00
Vadim Zeitlin
d78b7d2f27 Fix a typo in Catch tutorial link
No real changes.
2017-11-02 01:53:27 +01:00
Vadim Zeitlin
e70fc11ef1 Replace CppUnit with Catch for unit tests
Drop the legacy CppUnit testing framework used for the unit tests.
Replacing it with Catch has the advantage of not requiring CppUnit
libraries to be installed on the system in order to be able to run
tests (Catch is header-only and a copy of it is now included in the
main repository itself) and, in the future, of being able to write
the tests in a much more natural way.

For now, however, avoid changing the existing tests code as much as
[reasonably] possible to avoid introducing bugs in them and provide
the CppUnit compatibility macros in the new wx/catch_cppunit.h header
which allow to preserve the 99% of the existing code unchanged. Some
of the required changes are:

 - Decompose asserts using "a && b" conditions into multiple asserts
   checking "a" and "b" independently. This would have been better
   even with CppUnit (to know which part of condition exactly failed)
   and is required with Catch.

 - Use extra parentheses around such conditions when they can't be
   easily decomposed in the arrays test, due to the use of macros.
   This is not ideal from the point of view of messages given when
   the tests fail but will do for now.

 - Rewrite asserts using "a || b" as a combination of condition
   checks and assert macros. Again, this is better anyhow, and is
   required with Catch. Incidentally, this allowed to fix a bug in
   the "exec" unit test which didn't leave enough time for the new
   process to be launched before trying to kill it.

 - Remove multiple CPPUNIT_TEST_SUITE_NAMED_REGISTRATION() macros,
   our emulation of this macro can be used only once.

 - Provide string conversions using Catch-specific StringMaker for
   a couple of types.

 - Replace custom wxImage comparison with a Catch-specific matcher
   class.

 - Remove most of test running logic from test.cpp, in particular don't
   parse command line ourselves any longer but use Catch built-in
   command line parser. This is a source of a minor regression:
   previously, both "Foo" and "FooTestCase" could be used as the name of
   the test to run, but now only the latter is accepted.
2017-11-02 01:53:16 +01:00
Adrien Tétar
80e2264373 Fix wxBORDER_NONE handling for wxTextCtrl under GTK+ 3
Remove the border by applying custom CSS, which seems to be the only way
to do it with recent GTK+ versions.

Closes https://github.com/wxWidgets/wxWidgets/pull/576
2017-11-01 22:49:26 +01:00
Tobias Taschner
fe77b2d593
Add support for UTF8 filenames in wxZipOutputStream
Zip filenames containing non ASCII characters will be marked with
bit 11 in the general purpose flags and will use UTF-8 encoding.

By only setting the flag when non ASCII characters are used the
created archives should be binary identical to previous versions.

The old behavior can be achieved by explicitly using wxConvLocal
with the constructor. This should also ensure that
existing code using a custom wxMBConv should work as before.
2017-10-27 20:27:44 +02:00
Vadim Zeitlin
31d51186e2 Fix crash when reparenting the focused window to another TLW
If the window stored as m_winLastFocused in one TLW was reparented to
another one and then destroyed, this pointer to it wasn't updated and
became dangling.

Fix this by using a safe weak reference instead of raw pointer for
m_winLastFocused. This ensures that it can never be used when it becomes
invalid.

Closes #17980.
2017-10-27 18:18:14 +02:00
Vadim Zeitlin
0a093193cf Merge branch 'mac-configure-fixes'
Miscellaneous improvements to configure under macOS, see
https://github.com/wxWidgets/wxWidgets/pull/568
2017-10-21 22:12:31 +02:00
Andreas Falkenhahn
eb035485d7 Add wxDataViewCtrl::GetTopItem() and GetCountPerPage()
Add methods doing the same thing for wxDataViewCtrl as the existing wxListBox
methods.

Closes #17498.
2017-10-21 22:10:35 +02:00
Andreas Falkenhahn
accf7ab117 Add wxFontPickerCtrl::SetMinPointSize()
Allow setting the minimal, as well as maximal, point size.

Closes #17126.
2017-10-21 22:10:35 +02:00
Vadim Zeitlin
d9e4f72fd2 Remove unused configure --enable-objc_uniquifying option
This was only ever used in the alternative wxCocoa port which was itself
removed quite a long time ago.
2017-10-21 19:06:33 +02:00
Artur Wieczorek
1ef1f8fda6 Allow setting position of wxProgressDialog (wxMSW)
Position of wxProgressDialog cannot be changed directly because the dialog is created in another thread and may exist when SetPosition() is called. New position has be stored in the data structure used to share data between the main thread and the task dialog runner and the real update is done during the cyclic refresh in the dialog thread.

Closes #13546.
2017-10-05 16:22:15 +02:00
Vadim Zeitlin
f0de65fb98 Make wxDataViewCheckIconTextRenderer class public
Export this class, which was only used internally by wxTreeListCtrl
before, so that user code can use it for its own columns with custom
wxDataViewCtrl models.
2017-10-02 22:28:28 +02:00
Andreas Falkenhahn
ccc513bca9 Allow changing alignment styles after wxTextCtrl creation (wxOSX)
Update NSTextView/NSTextField alignment mode when wxTextCtrl alignment styles are changed with SetWindowStyleFlag().

Closes #17952.
2017-09-25 15:38:24 +02:00
New Pagodi
33ad8063d6 Add Scintilla FineTicker methods to wxSTC
Starting with version 3.5, Scintilla implemented a newer method for
handling timers and used this method in its Windows, GTK+, Cocoa, and Qt
ports. This patch attempts to bring the timer handling for wxSTC in line
with those other ports.

Closes #17949.
2017-09-17 11:12:34 +02:00
Vadim Zeitlin
40f8403f5d Merge branch 'peninfo'
Add wxPenInfo and wxGraphicsPenInfo which allows to specify fractional
pen widths when using wxGraphicsContext.

Closes #17087.

Closes https://github.com/wxWidgets/wxWidgets/pull/472
2017-09-10 21:45:47 +02:00
Vadim Zeitlin
f19012c62c Merge branch 'firstweekday' of https://github.com/lanurmi/wxWidgets
Add API for determining the first day of the week and use it in
wxCalendarCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/522
2017-09-10 21:41:36 +02:00
Vadim Zeitlin
76fd05b147 Leave only wxGraphicsRenderer::CreatePen(wxGraphicsPenInfo) overload
It doesn't make much sense to require all the graphics backends to
create wxGraphicsPen from either wxPen or wxGraphicsPenInfo when the
former can be handled just once in the common code.

So do just this, leaving CreatePen() overload taking wxGraphicsPenInfo
where the real pen construction takes place and implementing
wxGraphicsPen creation from wxPen in the common wxGraphicsContext code.

This is not 100% backwards-compatible as any code inheriting from
wxGraphicsRenderer and overriding its CreatePen() will now be broken,
however this should be extremely rare (there is no good reason to
inherit from this class in the user code) and result in compile errors
if it does happen.
2017-09-10 01:48:30 +02:00
Artur Wieczorek
52d6b0ae85 Don't discard all current input processing flags in response to WM_GETDLGCODE
Some current input processing flags, like DLGC_HASSETSEL, should be retained because they are in use (in wxWindowMSW::SetFocusFromKbd() for instance).

Closes #17945.
2017-09-06 12:34:20 +02:00
PB
32cde66d9c Replace invalid character in Sizers Overview 2017-08-24 16:49:55 +02:00
PB
134279e8a8 Remove duplicity in Sizer Overview
Remove the already described sizers from section Other Types of Sizers. Remove "See ..." sentences which are unnecessary when the class documentation is already linked right above. Also fix a typo in a sizer name that prevented doxygen linking to the class.
2017-08-24 16:33:01 +02:00
PB
3ed335677c Fix section structure in Sizer Overview
Descriptions of wxBoxSizer, wxStaticBoxSizer, wxGridSizer, and wxFlexGridSizer are not subsections of Hiding Controls Using Sizers.
2017-08-24 16:24:40 +02:00
PB
278957e176 Update Sizer Overview
Remove references to concrete GUI-building programs. Such references are not necessary not to mention that  most of the referred programs have not been maintained for a long time.

List of flags in the CreateButtonSizer sizer was unnecessary, some of the values were not valid flags for the methods and comment descriptions for most values did not make much sense in the given context. The section was therefore removed and the method is mentioned in the newly-added part about wxStdDialogButtonSizer.

Sizer types not mentioned in the overview before were added, the rest of changes was mostly adding @c and such.
2017-08-24 16:13:07 +02:00
iwbnwif
24b8f3a32d Update documentation to include wxDataViewCtrl in the list of controls supported by the default persistent objects implementation. 2017-08-23 19:27:47 +01:00
Artur Wieczorek
42e9eb7ce8 Ensure that navigation order reflects button layout in wxStdDialogButtonSizer
In wxStdDialogButtonSizer, keyboard navigation order through the buttons
should be the same as the order they are positioned in the sizer regardless
of the order the were created or added to the sizer.

Closes #17940.
2017-08-16 23:12:26 +02:00
Vadim Zeitlin
7316ce7626 Add screenshots of wxRearrange{List,Ctrl} to the manual
This is useful if only to illustrate the difference between the two.
2017-08-14 14:59:31 +02:00
Artur Wieczorek
b6e4bdce3d Reimplement adding items to radio groups in wxMenu (wxOSX)
Rewrote wxOSX radio groups-related code reusing the code which works on
wxMSW and which seems to provide more rich functionality (supports adding
radio as well as no-radio items) and to have known bugs fixed.
The ranges of all radio groups are stored in wxMenu itself instead of
storing the information about the radio group an item belongs to in
the item itself - see 89511b4268.

Closes #14213.
Closes #17568.
2017-08-13 01:48:59 +02:00
Artur Wieczorek
28af0ca6e9 Fix updating radio groups when non-radio item is inserted to wxMenu (MSW)
When wxMenu contains radio groups and a new item (radio and non-radio) is
being added to the menu, data describing exisiting groups have to
be updated accordingly. Because adding radio and non-radio items has
a different impact on the groups, adding non-radio items has to be handled
separately. (The main difference between adding radio and non-radio item is
that when a radio item is inserted inside the group this group is extended,
but for non-radio item the group is split into two subgroups.)
2017-08-13 00:31:53 +02:00
Artur Wieczorek
8dc4bd40a8 Don't convert any non-monochrome wxBitmap to ARGB format
While selecting wxBitmap with colour depth > 1 bpp into wxMemoryDC there is
no need to convert its format to ARGB regardless of the current
interpretation of the alpha channel values in the bitmap. If original
bitmap was marked as a RGB one (with alpha channel being ignored), it
should retain this format to avoid confusions.

Closes #16309.
2017-08-09 21:23:34 +02:00
Vadim Zeitlin
7e80ff4ed8 Merge branch 'i18n-context'
Closes https://github.com/wxWidgets/wxWidgets/pull/530
2017-08-09 20:47:41 +02:00
Vadim Zeitlin
91385acd5d Rename context-specific translation macros and document them
Try to use more clear names for the macros and also try to make the
sample more self-explanatory.
2017-08-09 14:21:47 +02:00
Artur Wieczorek
ec55f11ff7 Add support for wxTE_CHARWRAP to wxTextCtrl
Apparently various text wrapping modes are not supported natively by
NSTextView (apart from word wrapping which is used by default) and
non-default wrapping has to be implemented in the custom code.
To wrap lines at any character, NSLineBreakByCharWrapping style should be
applied at any text change to the entire text stored in NSTextStorage
associated with NSTextView. This is done in DoUpdateTextStyle() method
which is called from controlTextDidChange() when text is modified by
the user, or SetStringValue() and WriteText() when text is set
programmatically.
2017-08-05 21:57:01 +02:00
Artur Wieczorek
1731ad5e31 Add support for wxTE_NO_VSCROLL style to wxTextCtrl (wxOSX) 2017-08-02 23:24:02 +02:00
Artur Wieczorek
2c2e0aaa01 Implement ShowPosition() for single-line wxTextCtrl (wxGTK) 2017-07-30 09:59:27 +02:00
Artur Wieczorek
f208cfc886 Implement XYToPosition() for single-line wxTextCtrl (wxGTK) 2017-07-30 09:58:53 +02:00
Artur Wieczorek
bb9c7680ab Fix wxTextCtrl::PositionToXY (wxMSW)
Check if character position is not past the line.
When calculating (x,y) for given character position there is necessary
to take into account that for multi-line control each line (but last one)
is ended by 2-character end of line mark. Each character of this
2-character mark has a different position in the text buffer but is mapped
to the same (x,y) coordinates.
2017-07-30 09:58:28 +02:00
Artur Wieczorek
a69ab2907c Fix wxTextCtrl::XYToPosition (wxMSW)
When calculating character position for given (x,y) there is necessary
to verify if passed coordinates are sane and return error status (-1) if
not. y-coordinate has to be in the range [0..numLines-1] and x-coordinate
cannot exceed the length of the text in the given line.
2017-07-30 09:57:54 +02:00
Artur Wieczorek
572ec50827 Implement wxTextCtrl::ShowPosition() (wxOSX)
Closes #17811.
2017-07-22 22:23:34 +02:00
Artur Wieczorek
d233b8939b Implement wxTextCtrl::PositionToXY() and XYToPosition() (wxOSX)
Apparently there is no native API to retrieve such information in a simple
way so all calculations have to be done with raw text stored in
the corresponding control(s).

Closes #4146.
See #17811.
2017-07-22 22:23:34 +02:00
Vadim Zeitlin
a07013a6f1 Tab navigation improvements for wxOSX
Closes #17341.

Closes https://github.com/wxWidgets/wxWidgets/pull/493
2017-07-16 15:59:48 +02:00
Vadim Zeitlin
16fdbb4e97 Credit ikamakj for the tab navigation fixes in wxOSX
See the description of https://github.com/wxWidgets/wxWidgets/pull/493.
2017-07-16 15:58:27 +02:00
Steve Browne
31ba2d4ca3 Fix setting foreground color for several controls in wxOSX
This allows setting color of wxStaticBox, wxCheckBox, wxRadioButton and
any other controls that use NSBox and NSButton to work.

Closes #16284.

Closes https://github.com/wxWidgets/wxWidgets/pull/489
2017-07-11 23:51:30 +02:00
mikek
2d8657d37c Fix escaping/unescaping in wxLongStringProperty
wxPropertyGrid::ExpandEscapeSequences() function should convert all valid
escape sequences (\r, \n, \t, \\) to the corresponding single characters
(CR, LF, TAB, backslash, accordingly) and
wxPropertyGrid::CreateEscapeSequences() function should do the reverse
operation and convert these raw characters to the corresponding escape
sequences.

Closes #17896.
2017-07-06 23:14:08 +02:00
Vadim Zeitlin
5292f77ab4 Check for window best size in wxPersistentTLW
Ensure that the restored size is at least equal to the best size of the
window to avoid cutting off parts of it in (a common) case when a newer
version of the program adds new UI elements, thus increasing the window
best size and possibly making the previously stored size too small.
2017-07-06 15:22:10 +02:00
Vadim Zeitlin
7092b1112e Fix caching of wxFONTSTYLE_SLANT fonts in wxTheFontList in wxMSW
Creating a font with wxFONTSTYLE_SLANT results in a font whose
GetStyle() returned wxFONTSTYLE_ITALIC, so it was never found in the
cache, resulting in, effectively, leaking memory and GDI handles because
each new call to wxFontList::FindOrCreateFont(...wxFONTSTYLE_SLANT)
created a new font.

Fix this by just hardcoding that wxFONTSTYLE_SLANT is wxFONTSTYLE_ITALIC
under MSW, this is ugly but avoids backwards incompatible (and not
obviously correct) change of making wxFont::GetStyle() return
wxFONTSTYLE_SLANT if the font was created using this style.

Notice that wxFont::GetStyle() does behave like this in wxOSX currently,
so there is an inconsistency between ports here. It would arguably be
better to make wxOSX behave like wxMSW because the actual font is really
italic and not slant/oblique and if we do this, the preprocessor
condition in this commit should be extended to cover wxOSX too.

Closes #17903.
2017-07-06 15:01:00 +02:00
Vadim Zeitlin
b158385c47 Fix completely broken default button handling in wxMSW
The logic in wxButton::{Set,Unset}TmpDefault() didn't work at all when
the temporary button was the same as the permanent default button as the
code made the same button non-default immediately after making it
default (or vice versa). In particular, this ensured that default button
was never highlighted correctly (at least after the first focus change)
in dialogs containing a single button only.

Fix this by simply skipping modification of the old default button if it
was the same one as the new default button.
2017-07-06 14:43:27 +02:00
Bryan Petty
ed173ed91e Use HTTPS with Trac links. 2017-07-04 13:15:14 -06:00
Artur Wieczorek
823f75c739 Enable selecting opacity in generic wxColourPicker
This is implmentation of the feature which is already implemented in
the native wxColourPicker under wxGTK.
2017-07-03 22:48:30 +02:00
Artur Wieczorek
a29815e19a Allow turning on/off opacity selector in wxColourDialog (wxOSX)
This feature to show/hide alpha values and opacity selector (slider) is
already implemented under wxGTK and for generic wxColourDialog.
For the sake of backward compatibility, this feature is enabled here by
default (through the corresponding property of wxColourData).
2017-07-03 22:48:04 +02:00
Artur Wieczorek
c55bbdf700 Fix setting wxGCDC clipping region with device coordinates (wxOSX)
Currently region given in device coordinates is decomposed into the stripes which are next transformed to the logical coordinates required by underlying wxGraphicsContext::Clip() function. Some of these stripes given in device coordinates can have 1-pixel height what after transformation to logical coordinates can give zero-height stripes (after rounding). This can lead to the situation that in the region transformed to logical coordinates some stripes can disappear and final transformed region shape is different from the source shape (it has gaps).
To fix this issue device coordinates of the region are not manually transformed to the logical coordinates but instead wxGraphicsContext's is temporarily set to the state where its logical coordinates are equivalent to device coordinates and thus clipping region can be applied directly.
Solution for wxMSW, wxGTK is implemented in ea8cb7a24a.

Closes #17609.
2017-07-02 14:43:50 +02:00
Artur Wieczorek
a9fcfe1085 Fix getting/setting transformation matrix (wxOSX)
Transformation settings already applied to the source objects (CGContext, wxWindow) and inherited by wxGraphicsContext should be considered as a baseline transformation matrix for wxGC and shouldn't be exposed through e.g. GetTransform() function (like it's done in Cairo or Direct2D). To report only transformations explicitly applied to wxGC by calls to the corresponding wxGC functions, we need to store initial CTM (in a dedicated variable) and "subtract" it from the actual transformation settings.

See #17609.
2017-07-02 14:31:00 +02:00
Artur Wieczorek
6b4be47a7a Fix retrieving clipping box after changing wxGCDC coordinates (wxOSX)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing wxGraphicsContext is associated with wxGCDC using SetGraphicsContext() or when wxGCDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale() or SetLogicalScale().
When any of these functions is called then clipping box data are marked as invalid and retrieved from underlying graphics context using wxGraphicsContext::GetClipBox() at nearest call to GetClippingBox().
Solution for wxMSW, wxGTK was implemented in 98714ea452.

See #17646.
2017-07-02 13:55:53 +02:00
Stefan Csomor
1902c5ceb8 Document iOS 9 as minimum deployment version. 2017-06-28 09:17:36 +02:00
Stefan Csomor
c9c74d957c Update docs with wsOSX font changes and wxOSX & Cairo bitmap clearing 2017-06-26 08:26:47 +02:00
Dimitri Schoolwerth
07c8f15e43 Fix 'destionation' typos
Rename relatively new enum value wxTASKBAR_JUMP_LIST_DESTIONATION to
wxTASKBAR_JUMP_LIST_DESTINATION as well as a private function containing
the same typo.
2017-06-21 22:51:57 +04:00
Vadim Zeitlin
3d6334f0f1 Mention wxGetOsDescription() removal in the change log
Even though this function was private and not available in the default build
(in which wxUSE_OLE==1, while this function was only defined with
wxUSE_OLE==0), still mention its removal for completeness.
2017-06-01 00:40:49 +02:00
Vadim Zeitlin
de47af2f0f Merge branch 'configure-enhance'
Miscellaneous enhancements to configure
2017-05-28 16:21:21 +02:00
tm
7ce3693956 Add support for bitmaps to wxToggleButton XRC handler
Handle "bitmap" and "bitmapposition" attributes in wxToggleButton XRC handler,
just as it's already done for wxBitmap and wxBitmapToggleButton.

Closes #17850.
2017-05-28 16:05:38 +02:00
tm
0a3720beff Handle wxST_ELLIPSIZE_XXX styles in wxStaticText XRC handler
Add forgotten/missing styles.

See #17850.
2017-05-28 16:05:31 +02:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Vadim Zeitlin
1c4071a3cb Remove obsolete and useless --enable_no_deps configure option
This option didn't do anything for the last 14 years, ever since the switch to
bakefile-generated makefiles in fe0895cf82, so
remove it from configure and stop mentioning it in documentation.

Use --disable-dependency-tracking to do what this option used to be doing 15
years ago.
2017-05-27 19:03:31 +02:00
Vadim Zeitlin
66865ed714 Merge branch 'icon-bundle-from-msw-res'
Add support for using icons from MSW resources in wxIconBundle.

Closes https://github.com/wxWidgets/wxWidgets/pull/482
2017-05-20 17:03:50 +02:00
Vadim Zeitlin
f5a0893ee9 Update comment and change log after MSW wxIconBundle improvements
It is now possible to load icons from a bundle too.
2017-05-20 17:01:59 +02:00
Vadim Zeitlin
f0c5f35dc3 Remove the obsolete wxPython overview
This was really old and better and more up-to-date documentation is included
in wxPython itself.
2017-05-20 16:50:59 +02:00
Vadim Zeitlin
2ed5d9f716 Mention workaround for a bug with parallel build with mingw32-make
When using -jN, setup_h needs to be created first to avoid a bug due to
missing dependencies in the current makefiles which breaks the build
otherwise.
2017-05-07 00:16:55 +02:00
Vadim Zeitlin
d0aaea5143 Merge branch 'staging' of https://github.com/stahta01/wxWidgets
Allow building wxGTK for MSW using MSys2 and configure.

Close https://github.com/wxWidgets/wxWidgets/pull/428
2017-05-04 02:51:52 +02:00
Artur Wieczorek
b375d81499 Use wxDataObject methods to retrieve data from clipboard when wxUSE_OLE==0
Dedicated wxDataObject::SetData() function can be used to import raw
clipboard data to the corresponding instances of wxDataObject and hence
there is no need to duplicate data retrieval code.
2017-05-03 22:48:04 +02:00
Artur Wieczorek
15e2dcc38d Fix adding bitmap to clipboard when wxUSE_OLE == 0 (wxMSW)
When CF_DIB object is placed to the clipboard, a handle to the memory
object containing a BITMAPINFO structure followed by the bitmap bits should
be passed to SetClipboardData(), not a handle to a DIB section.
Also, wxClipboard is the owner of the wxDataObject being added, so it
should release passed object.
2017-04-30 21:39:50 +02:00