Commit Graph

4101 Commits

Author SHA1 Message Date
Vadim Zeitlin
c16082edfe Add wxXmlResource::LoadDocument()
This allows loading XRC from anywhere, not just files and URLs.
2021-04-15 18:50:47 +01:00
Vadim Zeitlin
b671d230f2 Merge remote-tracking branch 'MaartenBent/bitmap_cursor_osx'
Add wxBitmap(const wxCursor &cursor) constructor to wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/2314
2021-04-11 16:46:58 +02:00
Igor Korot
9394d26c40 Implement wxBitmap(const wxCursor&) constructor for OSX 2021-04-10 14:17:27 +02:00
Vadim Zeitlin
9437a6abf0 Show assert stack if in the test if possible
Make wxAppTraitsBase::GetAssertStackTrace() and reuse it in the assert
handler defined in the test to show more information about the asserts,
especially those failing in worker threads, if possible.
2021-04-07 14:37:16 +02:00
Vadim Zeitlin
bc12930061 Merge branch 'filename-resolve-symlink'
Add wxFileName::ResolveLink().

See https://github.com/wxWidgets/wxWidgets/pull/2300
2021-04-07 12:38:37 +02:00
Vadim Zeitlin
b67bd4c3cb Merge branch 'file-history-styles'
Allow finer control over showing or hiding paths in wxFileHistory menus.

See https://github.com/wxWidgets/wxWidgets/pull/2282
2021-04-07 12:37:06 +02:00
Vadim Zeitlin
1035ae27a7 Make wxSplit(wxJoin()) idempotent for string ending with escape
Previously, splitting a string obtained by joining together array
with (any but last) elements ending in the escape character (normally
the backslash), didn't recover the original array because the separator
character following it in the resulting string was considered to be
escaped by wxSplit().

Fix this by escaping the trailing escape character itself.

Add a test confirming that this works as expected now, document this
behaviour and also slightly simplify wxSPlit() logic.

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

Closes #19131.
2021-04-07 01:38:43 +02:00
Vadim Zeitlin
6810fafa31 Merge branch 'fix-grid-demo'
Fix colour of starts in the grid sample.

See https://github.com/wxWidgets/wxWidgets/pull/2019
2021-04-07 01:37:32 +02:00
Vadim Zeitlin
317ad65079 Move SetTextColoursAndFont() to wxGridCellRenderer
Move this function from wxGridCellStringRenderer to its base class to
allow using it even in the classes not drawing any strings.

Also document it.
2021-04-06 22:51:08 +02:00
Vadim Zeitlin
a957d29f8c Mention wxDIR_HIDDEN in GetAllFiles() documentation
It may not be obvious that hidden files are not returned without it.
2021-04-06 22:19:03 +02:00
Tobias Taschner
0ff1bdec09 Add wxFullScreenEvent for macOS
Send a wxFullScreenEvent when the user enters or exits full screen on
macOS. EnableFullScreenView() has to be used to enable the native
full screen API.

Closes https://github.com/wxWidgets/wxWidgets/pull/2284
2021-04-06 19:01:25 +02:00
Vadim Zeitlin
f8f0b8b50c Remove public wxFileHistory::RefreshLabels()
Replace it with a private DoRefreshLabels() and call it ourselves from
SetMenuPathStyle() to make the class simpler (and less error-prone, as
it's now impossible to forget to call RefreshLabels() any more) to use.
2021-04-05 16:20:02 +02:00
Vadim Zeitlin
c89921d26d Rename wxFileHistoryMenuPathStyle values too
Use common wxFH_PATH_ prefix for consistency and try to make the values
more clear.
2021-04-05 16:15:49 +02:00
Vadim Zeitlin
036e35bf28 Rename wxFileHistoryMenuLabelStyle to wxFileHistoryMenuPathStyle
It seems useful to have the word "Path" in the name of this enum to
indicate that it applies to the paths shown in the menu labels.

Also rename the methods using this enum.
2021-04-05 16:09:34 +02:00
Ian McInerney
6c9f9af7fc Minor updates to the wxSizer docs
Don't mention inexistent "recursive" parameter of GetItem() overload not
taking it.

Closes https://github.com/wxWidgets/wxWidgets/pull/2302
2021-04-04 14:17:41 +02:00
Ian McInerney
ae902a88ef Add doc section on wxFileName symlink behavior 2021-04-01 20:32:55 +01:00
Ian McInerney
53bd1391f4 Add a new wxFileName function to resolve symlinks to absolute paths 2021-04-01 20:32:08 +01:00
PB
152a2079b4 Fix example code in wxArtProvider docs
Add a missing ampersand to the third parameter of overridden
CreateBitmap(), to make it clear it is a reference.

Also add semicolons after methods declarations.

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

Closes #19125.
2021-03-31 03:04:49 +02:00
PB
b9f22fc633 Replace wxEvtHandler::Connect() with Bind() in the docs
In the docs, replace mentions of wxEvtHandler::Connect() with
wxEvtHandler::Bind(), mostly to match the actual code but also
because Bind() is the recommended way to dynamically bind events.

Closes https://github.com/wxWidgets/wxWidgets/pull/2298
2021-03-31 03:04:49 +02:00
Ian McInerney
da8c851949 Don't document wxSysColourChangedEvent as being MSW-only
The docs mentioned this event as being Windows only, but it is also
generated on macOS and GTK now.

Closes https://github.com/wxWidgets/wxWidgets/pull/2296
2021-03-28 03:06:28 +02:00
Vadim Zeitlin
ce91a5d0ff Fix a typo in wxWebRequest use example
s/IsOK/IsOk/ and also make the example slightly more verbose.
2021-03-24 15:29:43 +01:00
Vadim Zeitlin
dd23d7dcd2 Merge branch 'safe-show-message'
Show message box from wxSafeShowMessage() in the other ports too, if
possible.

Currently this is done using wxMessageBox() if it can be sure that it's
safe to call and only MSW uses native function which is always safe to
call. Ideal would be to also use a native function under Mac, where it
should also be the case, but this doesn't seem to work for whichever
reason.

See https://github.com/wxWidgets/wxWidgets/pull/2270
2021-03-23 18:59:51 +01:00
Vadim Zeitlin
5d6525ccf1 Merge branch 'webview_useragent' of https://github.com/TcT2k/wxWidgets
Add support for custom user agent to wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/2280
2021-03-19 22:39:00 +01:00
Ian McInerney
71c26ec4da Add different menu label styles to wxFileHistory menus
These styles allow the program to choose to display file paths
in the menu or not
2021-03-18 02:11:33 +00:00
Paul Cornett
b5d4c6068e Make some member functions const 2021-03-17 09:44:48 -07:00
Tobias Taschner
97e469c255 Add access to user agent for wxWebView
Allow setting a custom user agent for a webview.
Also allow access to the current user agent.
2021-03-16 22:53:00 +01:00
Vadim Zeitlin
77593c5996 Add return value to wxSafeShowMessage()
This allows the caller to log the message to the console in addition to
showing the message box, for example. Previously, this would be
impossible to do without getting the duplicates if the message box was
not shown, but now it is.
2021-03-14 13:18:36 +01:00
Vadim Zeitlin
16495e424d Merge branch 'utf8-std-string'
Add wxString::utf8_string().

See https://github.com/wxWidgets/wxWidgets/pull/2265
2021-03-14 13:10:13 +01:00
Vadim Zeitlin
f6194cb797 Merge branch 'config-size_t'
Add support for 64-bit numbers and size_t to wxConfig.

See https://github.com/wxWidgets/wxWidgets/pull/2272
2021-03-13 22:35:01 +01:00
Vadim Zeitlin
0c837e5310 Add support for size_t to wxConfig
Allow writing and reading size_t values directly too, there were not
previously accepted unlike all the other arithmetic types.

Closes #19091.
2021-03-13 15:15:37 +01:00
Vadim Zeitlin
fce8780297 Add 64-bit integers support to wxConfig
Serialize them to strings in wxFileConfig, just as we always did for
long, but use wxRegKey support for storing them directly to the registry
in wxRegConfig.
2021-03-13 15:14:58 +01:00
Vadim Zeitlin
12d191823a Merge branch 'stc-typo-fixes'
Fix minor typos in STC docs.

See https://github.com/wxWidgets/wxWidgets/pull/2276
2021-03-13 13:35:28 +01:00
Vadim Zeitlin
5a623d3a4e Regenerate STC files after the typo fixes
Rerun src/stc/gen_iface.py.
2021-03-13 13:35:14 +01:00
Vadim Zeitlin
c88f23db3e Merge branch 'doc_misc' of https://github.com/TcT2k/wxWidgets
Various wxWebView docs improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2266
2021-03-13 13:27:00 +01:00
Blake Madden
28d705424b Fix double words and article mismatches in docs. 2021-03-10 14:28:20 -05:00
Tobias Taschner
ecce094522 Document previously missing macOS wxWebView features 2021-03-09 22:13:15 +01:00
Tobias Taschner
b493970336 Apply suggestions from code review
Co-authored-by: VZ <vz-github@zeitlins.org>
2021-03-09 22:09:16 +01:00
Tobias Taschner
4e2b746ec2 Update wxWebView documentation
- Use subsections
- Unify layout of backend sections
- Refer to backends by consistent naming
- Remove Trident reference (while technically correct it's probably not very helpful for most)
- Add a warning to IE backend
- Add wxWebViewEdge doc
- Add missing event from wxWebViewEvent docs
2021-03-09 22:09:16 +01:00
Tobias Taschner
1e42ea4e97 Update some outdated notes from wxWebView docs 2021-03-09 22:09:15 +01:00
Vadim Zeitlin
3f2c84d4a9 Add 64-bit numbers support to wxRegKey
This uses the native registry support for 64-bit values available since
Windows XP.

Note that SetValue64() can't be just called SetValue() as this would
introduce ambiguities when writing an int or an enum to the registry.
This could be avoided by providing overloads for all the arithmetic
types, but it's arguably better to be more clear about what exactly is
being written to the registry in this low-level class and using a
different name is definitely simpler.
2021-03-09 21:09:42 +01:00
Vadim Zeitlin
e00d5e131b Use new wxAppTraits::SafeMessageBox() in wxSafeShowMessage()
This allows to show message boxes in ports other than wxMSW too by doing
it only when it is safe, i.e. when the GUI is initialized, while still
keeping the old code directly using the native MessageBox() function for
MSW for maximal robustness.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
69e48f036b Add wxApp::GetMainTopWindow() wrapper
This trivial function just allows to avoid checking if wxTheApp is not
null before calling GetTopWindow() on it.

Replace the existing "wxTheApp && wxTheApp->GetTopWindow()" calls with
wxApp::GetMainTopWindow().

No real changes.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
0f8e976ac3 Add wxString::utf8_string()
This adds a yet another conversion function, which is not ideal, but
still better than having to write ToStdString(wxConvUTF8) every time for
losslessly converting wxString to std::string: not only this is too
long, but it's also too easy to forget to specify wxConvUTF8, resulting
in data loss when using non-UTF-8 locale.
2021-03-06 15:12:07 +01:00
Vadim Zeitlin
bf8be6c58d Merge branch 'mac-filedlg-improvements' of https://github.com/discnl/wxWidgets
macOS wxFileDialog improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2234
2021-03-06 12:18:43 +01:00
Vadim Zeitlin
3c92573dd7 Recommend using wxStaticBox as parent more strongly
Not doing it, i.e. creating the window inside the static box as its
siblings, rather than children, may appear to work, but actually doesn't
always do it, for example the windows are not shown correctly when using
RTL locale.

Closes #19086.
2021-03-05 22:53:27 +01:00
Andriy Byelikov
b2d97d1393 Add support for English locale for Israel (en_IL)
This locale is recognized by glibc, so add it to the known locales
database.

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

See #19082.
2021-03-05 18:51:10 +01:00
Vadim Zeitlin
7bcac7bfde Merge branch 'unix-default-locale'
Improve handling of default locale and other locale-related fixes.

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

Closes #11594.
2021-03-05 18:48:30 +01:00
Vadim Zeitlin
3701baecde Merge branch 'webview_script_message' of https://github.com/TcT2k/wxWidgets
Add WebView script message and user scripts.

See https://github.com/wxWidgets/wxWidgets/pull/2237
2021-03-05 18:44:46 +01:00
Paul Cornett
30637ad3b6 Make wxGridEvent methods GetRow() and GetCol() const and not virtual
See #19085
2021-03-05 07:38:32 -08:00
Paul Cornett
4388b9bd6b Make some member functions const 2021-03-04 11:49:33 -08:00