Commit Graph

17157 Commits

Author SHA1 Message Date
Vadim Zeitlin
e24bc249e4 Add back wxUSE_XTEST definition to Xcode setup.h file
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.
2017-05-20 16:50:59 +02:00
Artur Wieczorek
3eb650972a Fix setting style flags in wxListCtrl (wxMSW)
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.
2017-05-19 00:01:47 +02:00
Catalin
6c9b3a8254 Improved wxListCtrl::HitTest() docs
Changes were based on the docs of LVHITTESTINFO structure
<https://msdn.microsoft.com/en-us/library/windows/desktop/bb774754(v=vs.85).aspx>
2017-05-14 22:34:31 +02:00
Václav Slavík
11f79cda31 Fix handling of & in wxDataViewCtrl markup on wxOSX
Follow up to 60bd6842e4. Apply equivalent
changes to wxMarkupToAttrString, add a new wxItemMarkupToAttrString
class for mnemonics-less strings and use it in wxDataViewTextRenderer.
2017-05-12 16:43:21 +02:00
Artur Wieczorek
de739181ba Update comment in msw/setup0.h
Since fc96ef3570 WinRT implementation of
wxNotificationMessage doesn't require wxUSE_OLE.
2017-05-09 20:51:58 +02:00
Artur Wieczorek
a17ce3debe Take COM defintions from ObjBase.h header file
Apparently combaseapi.h header file is not present in the older development
environments.
2017-05-09 20:51:41 +02:00
Artur Wieczorek
fc96ef3570 Allow build wxNotificationMessage without OLE support (wxUSE_OLE==0)
WinRT implementation of wxNotificationMessage can be decoupled from OLE
utilities because actually only IUnknown interface implementation is
required.
2017-05-09 17:27:36 +02:00
Artur Wieczorek
8d03282378 Move IUnknown implementation to the separate files
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.
2017-05-09 17:27:21 +02:00
Scott Talbert
69e4f491b2 Move wx/gtk/webview_webkit2_extension.h to private directory
Make it more clear that this header is private, i.e. used only by the library
itself.

Close https://github.com/wxWidgets/wxWidgets/pull/473
2017-05-04 18:23:00 +02:00
Vadim Zeitlin
d0aaea5143 Merge branch 'staging' of https://github.com/stahta01/wxWidgets
Allow building wxGTK for MSW using MSys2 and configure.

Close https://github.com/wxWidgets/wxWidgets/pull/428
2017-05-04 02:51:52 +02:00
Artur Wieczorek
f2e707f095 Add check for wxUSE_NOTIFICATION_MESSAGE dependency on wxUSE_OLE
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).
2017-05-03 22:49:12 +02:00
Artur Wieczorek
83f5ba359d Add check for wxUSE_DRAG_AND_DROP dependency on wxUSE_OLE
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.
2017-05-03 22:49:01 +02:00
Artur Wieczorek
670e1fe948 Allow build wxDataObject without OLE support (when wxUSE_OLE==0)
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).
2017-05-03 00:12:56 +02:00
Artur Wieczorek
2dd726471f Build wxMetafileDataObject when wxUSE_DATAOBJ==1
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.
2017-05-02 23:30:30 +02:00
Artur Wieczorek
d7f70fc462 Schedule deprecated wxWindowBase functions for removal in the future
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.
2017-05-01 14:27:42 +02:00
Artur Wieczorek
e4a1e9a27f Schedule deprecated wxSTC constants and functions for removal in the future
Insert recently deprecated wxSTC elements in WXWIN_COMPATIBILITY_3_0 blocks
to mark them for removal in a future wx version.
2017-05-01 14:27:41 +02:00
Artur Wieczorek
6f59c756f6 Fix inserting items to wxRearrangeList (wxGTK)
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().
2017-04-30 21:42:41 +02:00
Artur Wieczorek
d5c46e87a6 Fix inserting multiple items to wxRearrangeList
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.
2017-04-28 23:57:36 +02:00
Artur Wieczorek
7e1b64a2eb Order array has to have the same size as item list in wxRearrangeList
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.
2017-04-28 21:03:23 +02:00
Vadim Zeitlin
0975228809 Fix build problem with "override" on wxApp::GetXVisualInfo()
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.
2017-04-26 14:42:38 +02:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Vadim Zeitlin
9c35db85d1 Use symbolic constant for DST shift
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.
2017-04-19 17:07:44 +02:00
Metallicow
8c8d8c4d3a Fix "ont" (instead of "one") typo in wxSTC
Correct "ont" to "one" in several places.
2017-04-18 12:25:46 +02:00
Vadim Zeitlin
70a499f635 Don't rely on argv being NULL-terminated under MSW
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.
2017-04-16 17:50:22 +02:00
Václav Slavík
c7a6cb9c2e Fix missing virtual dtor warning for wxMarkupText
Changes from 60bd6842 introduced a warning about not having a virtual
destructor despite having virtual methods.
2017-04-11 15:34:50 +02:00
Maarten
3afc2790b8 Target latest Windows API in wxMSW
Update WINVER and similar definitions to use the latest 0x0a00 value
corresponding to Windows 10 instead of the old Windows 8.1 values.
2017-04-08 21:48:47 +02:00
Václav Slavík
60bd6842e4 Fix handling of ampersands in wxDataViewCtrl markup
Handle "&amp;" 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.
2017-04-07 18:45:39 +02:00
Václav Slavík
a145d759ea Fix building wxOSX with MacOSX10.11 SDK
Fixes #17838.
2017-04-06 15:05:19 +02:00
Vadim Zeitlin
2b026e02e8 Only declare wxTextCtrl::MSWCreateContextMenu() if wxUSE_RICHEDIT==1
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
2017-04-04 15:27:05 +02:00
Václav Slavík
e01510f6c0 Add MAC_OS_X_VERSION_10_{11,12} to platform.h 2017-04-04 14:06:36 +02:00
jprotopopov
9b1afaa7a6 Don't crash in wxFFile::Eof() and Error() if file is closed
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.
2017-04-01 18:43:13 +02:00
Artur Wieczorek
113cec4ab2 Update wxPropertyGrid documentation
Completed documentation for topics marked as uncompleted.
2017-03-27 18:54:16 +02:00
Vadim Zeitlin
3b298cc8b2 Only define wxCLANG_WARNING_SUPPRESS/RESTORE when using clang
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).
2017-03-20 00:26:10 +01:00
Vadim Zeitlin
3eda902331 Merge branch 'more-xdg-dirs'
Add possibility to use wxStandardPaths and, hence, wxFileConfig, in
XDG-compliant (but backwards-incompatible) mode.

Closes #17727.
2017-03-15 00:49:11 +01:00
Vadim Zeitlin
6a8b0c1d0e Merge branch 'unicode-cmdline-args'
Handle Unicode command line arguments in console applications with compilers
other than MSVC too.

Closes #14580.
2017-03-15 00:33:40 +01:00
New Pagodi
91a2869b0e Extend FindText() to return end position of matched text in wxSTC
New 5th parameter of FindText() can be used to receive the end position of matched text returned by SCI_FINDTEXT API.

Closes #17305.
Closes https://github.com/wxWidgets/wxWidgets/pull/23
2017-03-13 20:21:41 +01:00
Vadim Zeitlin
5b74044c3e Use Unicode command line when not using wmain() under Windows
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).
2017-03-11 03:41:23 +01:00
Vadim Zeitlin
5cf9fcbb1a Add wxStandardPaths::ConfigFileConv enum for clarity and safety
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.
2017-03-09 17:53:14 +01:00
Vadim Zeitlin
4bf6ae8d7c Make FileLayout_XXX elements of an enum
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.
2017-03-09 17:23:20 +01:00
Martin Koegler
d56d127d3f Implement XDG file layout 2017-03-08 22:30:21 +01:00
Martin Koegler
8d5d00db9d Implement MakeConfigFileName 2017-03-08 22:29:55 +01:00
New Pagodi
1bcb30f6d7 Add wxStyledTextCtrl::AutoCompGetCurrentText()
Added support for SCI_AUTOCGETCURRENTTEXT API.

Closes #16263.
2017-03-07 19:15:46 +01:00
Tim S
a6f5a45cad Do NOT have method GetIconFromMimeType except under Unix. 2017-03-07 12:47:33 -05:00
New Pagodi
15ee1ebd12 Improve generating wxSTC code and documentation
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.
2017-03-06 18:38:56 +01:00
Tim S
2bde0f4b9e Edited when setting wxUSE_CHECKLISTBOX to 0 under MSW port. 2017-03-05 21:41:05 -05:00
Artur Wieczorek
9c5d6e893f Move duplicated code to the shared function
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.
2017-03-04 19:07:05 +01:00
Artur Wieczorek
feee67e6a1 Optimize selecting font in generated PostScript code
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).
2017-03-04 19:07:04 +01:00
Tim S
f11409ab09 When not Unix skip wxOVERRIDE in GetIconFromMimeType. 2017-03-03 13:37:24 -05:00
Tim S
076d99bab9 Only change wxUSE_CHECKLISTBOX to 0 when MSW toolkit. 2017-03-03 13:37:21 -05:00
New Pagodi
2278bb0dfa Update wxSTC documentation stuff
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.
2017-02-28 22:49:43 +01:00