Wrap styles are not applicable to the single-line control and radio box
to select these styles should be disabled when single-line control is
active.
It looks that it was intended to implement this feature with
TextPage_WrapLines constant and OnUpdateUIWrapLinesCheckbox handler so we
can reuse these elements.
The sample requires wxUSE_EXTENDED_RTTI to be enabled, and that is correctly signalled
in the source files. Just avoid the header flooding the output with errors.
Closes https://github.com/wxWidgets/wxWidgets/pull/525
* Removed BOM.
This should have been part of 672cf7d199
and is done for the same reason: hard-coding control width to 50
truncates it under wxGTK3 as it's much wider than this there.
Closes#17919.
The old API didn't make any sense for the most common case when both the
user name and password need to be stored, as it required providing the
user name as input, which couldn't work (but somehow this went
unnoticed for more than a year...).
Fix this by returning the username, and not only the password, from
Load() instead of taking it as parameter and removing this parameter
from Delete() as well.
Also improve the documentation, notably include a simple example of
using this class.
Notice that this is a backwards-incompatible change, but the old API was
really badly broken and didn't appear in 3.1.0 yet, so the breakage is
both unavoidable and, hopefully, shouldn't affect much code.
Nevertheless, a special wxHAS_SECRETSTORE_LOAD_USERNAME symbol is added
to allow testing for it if necessary.
Use an alternative and arguably simpler (at least with real-life
applications, where settings are somewhat more complex) way of handling
the differences between platforms in the preferences sample: instead of
executing completely different code under different platforms, always
update the local copy of the settings immediately and just propagate, or
not, it to the application-level settings depending on the current
platform.
This costs an extra copy of the settings object on each change, but this
shouldn't be a problem in practice, and OTOH results in using mostly the
same code under all platforms, reducing the probability of
platform-specific bugs and avoiding any code duplication between the
event handlers and TransferDataFromWindow().
Make the sample slightly more realistic by adding a MySettings struct whose
fields are updated the dialog and also make it more visual by showing the
current values of (some) settings on the screen.
Rename relatively new enum value wxTASKBAR_JUMP_LIST_DESTIONATION to
wxTASKBAR_JUMP_LIST_DESTINATION as well as a private function containing
the same typo.
1. Fix setting page size if printing is done in the landscape mode.
2. Store ranges of printed characters for all pages (not only recent page)
while doing pagination (in GetPageInfo) to allow printing pages (with
OnPrintPage) in any order (not only sequentially).
Closes#17107.
Basic paper parameters should be initialized with default values to allow
paginating a document even if paper settings are not yet explicitly set by
invoking "Print Setup" dialog.
See #17107.
Handle "&" in exactly the same way as "&" in wxMarkupParser, i.e. do not
map the former to "&&" to prevent it from being interpreted as a mnemonic as
this is incompatible with using markup for anything but the control labels,
e.g. for wxDataViewCtrl items text, in which mnemonics are not recognized.
And even when using markup for control labels, it was a questionable decision
as it's really not clear at all why should the XML entity and the raw
character itself be handled differently.
Also split wxMarkupText into two classes, wxMarkupText that handles
mnemonics in the markup (which is typically a label) and a very
similar, but not derived, wxItemMarkupText that handles mnemonics-less
markup for list etc. items, uses DrawItemText() and supports
ellipsizing.
Illustrate the use of ampersands in the dataview sample.
It would arguably be even better to use different derived classes for
different operations instead of doing everything inside a single class with a
big "switch", but this would require more time, so for now at least make the
code slightly more understandable and maintainable.
This also results in using useful names for the files being saved by default
instead of just "SVG Test #" used before.
This makes it too small when using GTK+ 3.22, resulting in GTK+ debug messages
about not having enough space for it -- and is, of course, wrong anyhow, as we
should always let controls determine their own best size.
Get rid of the panel and the sizer, neither of them are necessary when we have
a single control (wxNotebook in this case) taking up the entire frame client
area.
Just use wxLogStatus() instead of manually setting the status text, as this
also allows to get rid of wxUSE_STATUSBAR checks (wxLogStatus() is always
declared and just does nothing in this case).
Samples are part of wxWidgets and use quotes for including wx headers to
indicate that they're part of the same tree and not global headers, so just
follow the same convention here.
Don't define our own ID_XXX when the standard ones will do.
Use wxID_SAVE instead of wxID_SAVEAS just because the former has a standard
accelerator (Ctrl-S) while the latter does not, at least under MSW, and it's
convenient to have one.
The sample forced the user to use the menu "Open" command several (up to 8!)
times to get to a particular page which was inconvenient and confusing,
especially because more than 8 windows could be opened.
Fix both problems by just creating a notebook with 8 pages, each corresponding
to a particular test.
Use the same format as is used by MSVS itself to avoid spurious changes when
modifying the files. Notably:
- Use DOS end of line format (0D 0A).
- Add UTF-8 BOM (EF BB BF) to the beginning of the files.
- Do not put CR LF at the end of the last line in the file.
Closes https://github.com/wxWidgets/wxWidgets/pull/440
This option could be useful to demonstrate ability to replace (override) standard Scintilla context menu with custom one. Switching between standard and custom popup menu is done with "Extra -> Custom popup menu" menu option.
Call to deprecated wxStyledTextCtrl::SetStyleBits() function can be omitted because underlying SCI_SETSTYLEBITS API is not operational anymore.
See #17671.
Advanced gradients are drawn using wxGraphicsContext and hence bounding box for underlying wxDC is not updated automatically. We need to update bounding box with extents of all used graphics paths.
Determine actual size of drawing area and use it (instead of virtual size of the window) as a dimension of the images to be saved. Thanks to this clipping, produced images contain only results of drawing operations and not lot of empty background space.
Add wxCMD_LINE_HIDDEN wxCmdLineParser flag allowing to hide options and/or
parameters.
A hidden/unlisted argument is processed as usual, but not shown in the output
given by Usage(). A use case for such could be diagnostics switches that
should exist but are not useful to the end user.
Closes https://github.com/wxWidgets/wxWidgets/pull/390