Commit Graph

3600 Commits

Author SHA1 Message Date
Robin Dunn
41b444e011
Merge pull request #1455 from wxWidgets/gradient-pen
Add support for gradients in wxGraphicsPen
2019-09-11 20:17:34 -07:00
Kvaz1r
3fffc0782c Make wxThread::OnExit() protected rather than private
This allows calling the base class version from the derived classes and
also, at least as importantly, make sure that the function is actually
documented as private functions are not extracted by Doxygen by default.

Closes #16749.

Closes https://github.com/wxWidgets/wxWidgets/pull/1543
2019-09-12 00:55:32 +02:00
Kvaz1r
16b08c6ef9 Allow updating wxBusyInfo text while it's shown
Add UpdateText() and UpdateLabel() updating the text (i.e. possibly
containing markup) or the label (just plain text) shown in the window.

Closes #14743.

Closes https://github.com/Kvaz1r/wxWidgets.git BusyInfoUpdateText14743
2019-09-08 23:13:00 +02:00
Vadim Zeitlin
7811d1a833 Merge branch 'per-monitor-dpi-aware-controls-1' of https://github.com/MaartenBent/wxWidgets
Update the font of some buddy controls when the DPI changes. Fix the
position of the statusbar after a DPI change. Add some changes that were
suggested in https://github.com/wxWidgets/wxWidgets/pull/1499 but left
out from it.

Some sizes are cached to improve the speed of the library. These sizes
become incorrect when the DPI changes. And are incorrect when a window
is created on a display with a different DPI. Fix this by checking if
the current DPI is the same as the DPI that was used when calculating
the size, otherwise recalculate the size.

Closes https://github.com/wxWidgets/wxWidgets/pull/1530
2019-09-07 14:57:54 +02:00
Maarten Bent
462f2a4686 Add optional wxWindow parameter to wxButtonBase::GetDefaultSize()
When per-monitor DPI is used, the default button size depends on the DPI of the
display. Use the window to determine this DPI.
2019-09-06 20:59:59 +02:00
Robin Dunn
f705cb3087 Another typo fix 2019-09-05 17:47:33 -07:00
Robin Dunn
a8a19e25ee Various typo and coding style fixes 2019-09-05 13:33:15 -07:00
Robin Dunn
61a39165b8 documentation tweaks 2019-09-04 14:19:24 -07:00
Robin Dunn
f7896d4dff Use new parameter names in the existing CreateRadialGradientBrush methods too 2019-09-04 14:19:24 -07:00
Robin Dunn
80f24d9e74 User more easily understandable names for the radial gradient coordinate parameters in wxGraphicsPenInfo 2019-09-04 14:19:24 -07:00
Robin Dunn
7c33d3f969 Gradients can have matrix transforms too. Updates for Cairo. 2019-09-04 14:19:23 -07:00
Robin Dunn
fd0b19f277 Add the rest of the accessors in wxPenInfo and wxGraphicsPenInfo,
so wxPython can see them.
2019-09-04 14:19:23 -07:00
Robin Dunn
4708d2539e Add gradient-related attributes to wxGraphicsPenInfo 2019-09-04 14:19:23 -07:00
Robin Dunn
1269b712bb Add wxEVT_DPI_CHANGED 2019-09-04 14:14:59 -07:00
Maarten Bent
2704d32089 Update wxDPIChangedEvent documentation 2019-08-27 23:06:04 +02:00
Vadim Zeitlin
83134174fa Merge branch 'menu_highlight_event' of https://github.com/imciner2/wxWidgets
Set menu object for the menu highlight events too.

See https://github.com/wxWidgets/wxWidgets/pull/1506
2019-08-27 13:13:23 +02:00
Vadim Zeitlin
5873ee7e4a Merge branch 'tlw-layout'
Make wxTLW::Layout() do the right thing and resize the only child to fit
the entire TLW client area.

See https://github.com/wxWidgets/wxWidgets/pull/1496
2019-08-27 13:08:47 +02:00
Vadim Zeitlin
b225d78187 Merge branch 'per-monitor-dpi-aware-framework' of https://github.com/MaartenBent/wxWidgets
Add preliminary support for per-monitor DPI awareness to wxMSW.

Individual controls still need to be fixed, so this support is still
experimental/unfinished for now.

See https://github.com/wxWidgets/wxWidgets/pull/1499
2019-08-27 12:59:56 +02:00
Maarten Bent
e3d3a0b7e8 Generate wxDPIChangedEvent when DPI changes 2019-08-25 22:01:11 +02:00
Ian McInerney
d846b24450 Update menu event documentation and sample
Update the documentation to reflect change to the GetMenu event
working for all 3 menu events. Also update the sample to give the
menu for the highlight event.
2019-08-25 16:25:55 +02:00
Tomay
050ca4ce3a Add wxRegEx::QuoteMeta() helper
Quote all characters special for wxRegEx in the given string: this can
be useful when searching for a literal string using wxRegEx.

Closes https://github.com/wxWidgets/wxWidgets/pull/1489
2019-08-25 12:32:51 +02:00
oneeyeman1
14bcf09924 Move URL<->filename conversion functions to wxFileName
This ensures that they are always available and can be used in
wxLaunchDefaultBrowser() in all build variants, whereas before this
function didn't handle file:// URLs correctly when the library was built
with wxUSE_FILESYSTEM==0.

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

Closes #10414.
2019-08-25 00:48:39 +02:00
Vadim Zeitlin
a47d16dc9f Document that wxTreeCtrl::ScrollTo() doesn't work when frozen
Also mention that EnsureVisible() does work in this case.

See #18435.
2019-08-23 17:23:22 +02:00
oneeyeman1
78c3ef2ebb Implement support for wxFD_NO_FOLLOW in wxMac
Disable aliases resolving in standard file dialogs if this flag is
specified.

Closes https://github.com/wxWidgets/wxWidgets/pull/1479
2019-08-22 23:27:54 +02:00
Vadim Zeitlin
773f8f86e3 Merge branch 'svg-misc' of https://github.com/MaartenBent/wxWidgets
Miscellaneous improvements to wxSVGFileDC, notably add gradient fill
support and shape rendering mode.

See https://github.com/wxWidgets/wxWidgets/pull/1493
2019-08-22 17:21:00 +02:00
Vadim Zeitlin
2a487ffe83 Update wxWindow and wxTopLevelWindow::Layout() documentation
Explain how these methods actually work, remove a very (from wx 1.x
days?) outdated reference to wxPanel always calling Layout() and mention
the special case of wxTopLevelWindow in the overview too.
2019-08-22 14:04:54 +02:00
Vadim Zeitlin
70f8bf4c86 Just return true from wxString::Shrink()
The comparison of lengths() seems to be completely unnecessary.

Also document that Shrink() always returns true.
2019-08-22 00:04:04 +02:00
Maarten Bent
9c193e1774 Add wxWindow::GetDPI()
This is simpler to use than wxDisplay(window).GetPPI() which was used
instead of it so far in all ports and can be implemented more
efficiently for wxMSW.

Remove wxGetWinTLW, GetDPI already tries to get the top window.
2019-08-21 19:30:07 +02:00
Maarten Bent
a41a8ded79 Allow to set wxSVGFileDC shape rendering mode 2019-08-20 20:21:05 +02:00
Vadim Zeitlin
346d7c378d Merge branch 'arrstr-doc' of https://github.com/PBfordev/wxWidgets
Improve wxArrayString documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1473
2019-08-20 17:04:54 +02:00
Vadim Zeitlin
ffd424debb Merge branch 'mswdc-draw-point-checkbox' of https://github.com/MaartenBent/wxWidgets
Draw the same shape in wxDC::DrawCheckMark() under all platforms and
provide wxRenderer::DrawCheckMark() for drawing the platform-specific
shape.

Also fix wxGCDC::DrawPoint() to use the default one point wide pen.

See https://github.com/wxWidgets/wxWidgets/pull/1471
2019-08-20 13:25:28 +02:00
PB
e6753b5a7a Clarify wxArrayString::Insert() description 2019-08-10 15:09:59 +02:00
Maarten Bent
2874dab7f0 Add DrawCheckMark and GetCheckMarkSize to wxRendererNative
Show its use in the render sample. Also use the recently added GetExpanderSize
for the size of DrawTreeItemButton.
2019-08-10 13:42:04 +02:00
Vadim Zeitlin
5a394deba4 Merge branch 'accel_keys' of https://github.com/imciner2/wxWidgets
Fixes for accelerator handling in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/1463
2019-08-09 23:54:37 +02:00
PB
60a09f55e0 Slightly improve wx(Sorted)ArrayString documentation
Correct the signature of wxArrayString::Insert():
the first parameter is "const wxString&", not "wxString".

Mention wxSortedArrayString in wxArrayString documentation.

The rest are just minor edits improving language, consistency, and formatting.
2019-08-08 11:32:04 +02:00
oneeyeman1
43c519e04f Add wxListCtrl::IsVisible()
Allow checking if the given item is (at least partially) visible on
screen.

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

Closes #9949.
2019-08-05 13:46:15 +02:00
Ian McInerney
d82351ffa3 Add invalid keys to documentation 2019-08-04 21:49:33 +02:00
Ian McInerney
4d582eda57 Updated documentation to reflect invalid GTK keycodes 2019-08-04 21:25:49 +02:00
Artur Wieczorek
b06a9d227f Replace wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes with wxPG_DIALOG_TITLE
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc.
wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
2019-08-04 20:20:19 +02:00
Igor Korot
c525784f77 Allow disabling saving wxFileConfig data when it is destroyed
This can be useful to avoid saving the changes performed by the user if
this turns out to be undesirable, for whatever reason.

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

Closes #13788.
2019-08-04 19:15:39 +02:00
ousnius
2a2fa8c5af Allow expanding environment variables in XRC file paths
Add a new flag wxXRC_USE_ENVVARS for wxXmlResourceFlags that triggers a
call to wxExpandEnvVars() for bitmap, icon and animation paths.

This flag is not set by default to avoid silently changing the behaviour
of existing applications.

Closes https://github.com/wxWidgets/wxWidgets/pull/1445
2019-07-31 23:57:40 +02:00
Robin Dunn
cd2e3dd2cf Various interface corrections 2019-07-31 12:18:55 -07:00
Lauri Nurmi
4739b9dedd Add C++20-style starts_with()/ends_with() functions to wxString
C++20 introduces these two functions, along with some overloads, to
std::string. Add similar functions to wxString, which simply call the
already existing StartsWith() and EndsWith().

Closes https://github.com/wxWidgets/wxWidgets/pull/1452
2019-07-31 00:52:29 +02:00
oneeyeman1
ab7ba98dbc Implement support for wxCB_SORT in wxOSX wxComboBox
Insert the item at the correct location when this style is specified.

Closes https://github.com/wxWidgets/wxWidgets/pull/1438
2019-07-26 18:19:47 +02:00
Vadim Zeitlin
fb2c17c193 Merge remote-tracking branch 'sunset/process-enter'
Fix wxTE_PROCESS_ENTER logic for wxMSW and wxGTK too.

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

Closes #18273.
2019-07-26 18:02:08 +02:00
Vadim Zeitlin
9d92ba185c Fix truncating CJK mnemonics in control labels
13068d3603 introduced code for stripping
CJK mnemonics (i.e. trailing " (&X)") from the menu items, but due to
the use of wxStripMenuCodes() in wxControl::GetLabelText(), it also
applied to the control labels, resulting in wrongly measuring their size
(because the text used for measurement didn't include the "(&X)" part)
and truncating them in display.

Fix this by adding an explicit wxStrip_CJKMnemonics and using it only in
the code dealing with the menu item labels. This requires more changes
than just modifying GetLabelText() to use some wxStrip_NoCJKMnemonics
flag, but is more compatible as it's not impossible that some existing
code using wxStripMenuCodes() could be broken by this change too, while
now the existing behaviour is preserved.

Also improve wxStrip_XXX documentation.

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

See #16736.

Closes #18452.
2019-07-26 17:59:47 +02:00
Vadim Zeitlin
d97c2ed9e3 Merge branch 'grid-frozen'
Add support for freezing wxGrid columns and/or rows.

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

See https://github.com/wxWidgets/wxWidgets/pull/952
2019-07-26 17:57:23 +02:00
Andreas Falkenhahn
79724b1710 Allow opening ToC and index in wxCHMHelpController
Use special values of DisplaySection() and KeywordSearch() parameters to
open the table of contents (if section is -1) or search page (if the
keyword to search for is empty) when using CHM help controller.

This is less discoverable than having separate Display{TOC,Search}()
methods, but avoids introducing special API that couldn't be implemented
in the other wxHelpController implementations.

Closes #18445.
2019-07-24 11:29:06 +02:00
PeterO
8f386265dc Use correct expander size in wxDataViewCtrl under MSW
Add wxRendererNative::GetExpanderSize(), implement it using the
appropriate theme element and use it instead of hardcoding the expander
size to 3 character widths.

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

Closes #18449.
2019-07-20 17:00:32 +02:00
Vadim Zeitlin
3d970a9c08 Merge branch 'underline-improvements' of https://github.com/MaartenBent/wxWidgets
Add support for different underline types and colour to wxTextCtrl.

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

Closes #17124.
2019-07-19 23:45:38 +02:00