This was erroneously removed by e82c619402 but
it still needs to be defined here, even if it's not used under macOS, in order
to avoid errors about it being undefined in wx/unix/chkconf.h.
UpdateStyle() function was introduced in edccf428 to synchronize in
SetWindowStyleFlag() style of the control with new style flags just stored
in m_windowStyle.
In 9a8d75f1, storing directly a new flags in m_windowStyle was replaced by
the call to parent's SetWindowStyleFlag().
Because call to parent's SetWindowStyleFlag() updates both m_windowStyle
and actual style of the control for common flags (WS_*, LVS_* flags),
synchronizing the control again with UpdateStyles() is pointless (since
this function does nothing in this context).
Only wxSCROLL style flags need special care because wxListCtrl doesn't
have these styles but the control itself may have them. In order
to preserve them in the call to SetWindowStyleFlag(), we can do the trick
and request the same new scroll style as the actual physical style.
UpdateStyles() is useless now and can be deprecated.
See #17059.
Follow up to 60bd6842e4. Apply equivalent
changes to wxMarkupToAttrString, add a new wxItemMarkupToAttrString
class for mnemonics-less strings and use it in wxDataViewTextRenderer.
IUnknown interface is used sometimes (e.g. in WinRT implementation of
wxNotificationMessage) alone, without other OLE routines, so it is
helpful to have its code in the separate file to avoid coupling with main
OLE code when only IUnknown implementation is required.
WinRT implementation of wxNotificationMessage requires wxUSE_OLE because
one memeber variable is of type wxAutoULong which is defined in the OLE
utilities collection (oleutils.h).
Library itself can be built successfully when wxUSE_DRAG_AND_DROP==1 and
wxUSE_OLE==0 but several wxDropTarget functions (referred in wxWindowMSW,
wxTextDropTarget, wxFileDropTarget) are reported as missing during linking
the application.
Reorganize the code by putting OLE-dependent code into the blocks
controlled by wxUSE_OLE and by sharing remaining code (like implementation
of wxDataFormat, wxBitmapDataObject, wxFileDataObject, etc.) to allow
building wxDataObject and its specializations also without OLE support.
Since wxDataObject no longer requires OLE support, corresponding check in
checkconf.h can be removed.
Thanks to this additional flexibility, it is possible to use wxClipboard
whether OLE support (wxUSE_OLE) is enabled or not, either with OLE-based
wxDataObject (OLE clipboard) or with wxDataObject decoupled from OLE (Win
clipboard API).
wxMetafileDataObject is a specialization of wxDataObject and its
compilation should be controlled directly by wxUSE_DATAOBJ (like it's done
under wxOSX, see e.g. include/wx/osx/metafile.h), not by
wxUSE_DRAG_AND_DROP.
Some wxWindowBase functions were marked deprecated prior to wx 3.0 release
and therefore they should be inserted into WXWIN_COMPATIBILITY_2_8 blocks
to mark them for removal in a future wx version.
Order array cannot be extended both in DoInsertItems() and DoInsertOneItem()
functions because DoInsertOneItem() is invoked indirectly from DoInsertItems()
(through the call to wxCheckListBox::DoInsertItems() and DoInsertItemsInLoop())
and therefore order array would be eventually extended by two items for one
inserted list item. To avoid this duplicated actions, we should resign from
overriding DoInsertOneItem().
In wxRearrangeList implementations (like wxMSW) where DoInsertItemsInLoop()
and DoInsertOneItem() are not used to insert multiple items, DoInsertItems()
has to be overriden to do this insertion.
See #17836.
Number of indices stored in the internal order array has to be the same as
number of the items, so whenever item is added or removed, order array
has to be adjusted accordingly.
Closes#17836.
This method doesn't override any virtual method in the base class, so
wxOVERRIDE can't be used here.
In fact, this method doesn't seem to be used at all, but keep it for
compatibility and in case we want to use it later, as wxGTK does.
No real changes, just use DST_OFFSET constant instead of 3600 and remove the
"FIXME" comments as we're not actually going to fix anything here but will
just continue to assume 1 hour shift for DST.
Since the changes of c9a458bfe8 ("Use Win32
::CommandLineToArgvW() to tokenize command line"), this is not guaranteed any
more as this Win32 function doesn't necessarily ensure it under older MSW
versions such as XP.
Just use "argc" explicitly instead of relying on this in wxCmdLineArgsArray to
fix crashing under XP.
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.
This method is only used, and defined, when using rich edit controls, so don't
declare it if wxUSE_RICHEDIT==0.
This should fix a link error in this build variant.
Closes https://github.com/wxWidgets/wxWidgets/pull/452
Assert and return false instead, this is more developer-friendly.
Add unit tests to check that these functions really work as expected when
called on a closed file.
Closes#17828.
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).
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).
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.
Several new features were implemented in gen_iface.py and accompanying '.in' files:
1. Added an option to parse provisional section in Scintilla.iface. When global variable GENERATE_PROVISIONAL_ITEMS is set to 1, methods and values in this section receive corresponding wxSTC items.
2. Deprecated section in Scintilla.iface is not skipped, but parsed and corresponding wxSTC items are created (marked as deprecated in the code and documentation).
3. Added a set 'notMappedSciValues' that can be used to prevent the creation of specific wxSTC values which are intended to be handled manually.
4. For deprecated constants there is generated a code to raise respective warnings during the compilation.
Closes#17671.
Code to emit PostScript commands to set the current colour is duplicated in several places (in SetBrush, SetPen, DrawAnyText functions) and therefore should be moved to a dedicated function.
Emit code to select PostScript font only if it is needed (not at every call to SetFont(), but only if font has been really changed prior to a text drawing operation).
1. All stuff to generate documentation is moved from 'gen_iface.py' to a separate module 'gen_docs.py'. It contains several new structures to support maintenance of the documentation:
categoriesList - A list of the categories and an optional description.
docsMap - A dictionary that assigns each method to one of the categories.
docOverrides - A dictionary that can be used to replace the docstring from the iface file.
docSubstitutions - A dictionary that can be used to replace a few words from the docstring in the iface file.
extendedDocs - A dictionary that can be used to add extended documentation.
sinceAnnotations - A dictionary that can be used to add '@since' annotations.
2. Documentation is reformatted and updated:
- Added a table of contents.
- Broke the methods into sections.
- Added docs for previously undocumented methods.
- Altered docs that were unhelpful or misleading.
- Added '@since 3.1.0' notes and '@since 3.1.1' notes.
- Altered docs which contained references to Scintilla macros or other problematic text.
Closes#17680.