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.
Correct positioning of min/max labels to prevent them to be drawn outside the control.
Use size of enabled labels to adjust the size of the slider control.
Closes#17829.
If the passed string cannot be represented in the target encoding in the
wxCFStringRef constructor, create a reference to an empty string instead of a
null ref. Most users of wxCFStringRef cannot handle a null wxCFStringRef.
Closes#17825.
This makes sense and avoids an error if some other header sabotages our
__has_warning definition check by providing a dummy definition for it (as ICU
does, for whatever reason).
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
A simulation of context menu event by handling directly EVT_RIGHT_UP was implemented in wxSTC in ddf2da08b5, but later on, EVT_CONTEXT_MENU generation in wxGTK was fixed in ac103441d1 so simulation is no longer necessary and this event can be directly handled in wxSTC.
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.
Use wxGTK_CONV_FONT() and wxGTK_CONV_BACK_FONT() macros instead of implicitly
using "m_font" which doesn't exist in wxTextEntry, which is not a wxWindow.
In EVT_RIGHT_DOWN event handler introduced in 68888ca0a2 we need to propagate event to process it further in EVT_RIGHT_UP handler. This is important especially for wxGTK and wxOSX where EVT_RIGHT_UP is used to generate a context menu event.
Closes#17817.
Use the standard function in Unicode build instead of our own emulation, it
should give better results and is marginally more efficient as it does fewer
heap allocations than our own wxCmdLineParser::ConvertStringToArgs().
While we use wmain() for the compilers that provide it since the changes of
bfa78c63b9, we still didn't handle Unicode
command line arguments not representable in the current Windows code page
correctly when using other compilers (e.g. MinGW).
Now use Win32 ::GetCommandLine() function for them and parse the command line
ourselves instead of relying on non-Unicode-friendly main() arguments which
can't represent arbitrary Unicode strings when not using UTF-8 (which is never
the case under Windows).
Avoid running time-sensitive tests such as StopWatchTestCase under Travis as
they can result in spurious failures if the machine running the test is under
too much load.
There is no reason to break the behaviour of the existing code, which doesn't
call SetFileLayout(FileLayout_XDG), by not returning the correct directories
from GetUserDir(Dir_Downloads) and similar any longer.
Use an enum instead of type-unsafe "int" for the second parameter of the
recently added wxStandardPaths::MakeConfigFileName().
This also avoids unnatural dependency of wxStandardPaths on
wxCONFIG_USE_SUBDIR constant defined in a higher level wxFileConfig class.
No real changes, but just make things a bit more robust and hopefully more
clear.
Slight improvement to the previous commit: make FileLayout_Classic and
FileLayout_XDG elements of an enum instead of using an untyped "int" for them
which didn't really make any sense because these values are not bit masks but
exclusive choices for the layout.
Also rewrite the checks for them to use "switch" instead of "if" to be warned
by the compiler if we ever add another enum value but forget to update the
code to handle it.
Finally, improve the documentation (add missing "@since") and comments.