Commit Graph

17262 Commits

Author SHA1 Message Date
VZ
294436c8bb Improve wxBasicString and fix memory leaks when using it
Improve and extend wxBasicString API and fix multiple BSTR leaks in due to
confusingly named Get() method in the old API.

Closes #17889.
2017-07-03 02:28:37 +02:00
Artur Wieczorek
f311807112 Handle EVT_CONTEXT_MENU directly in wxSTC (wxOSX)
A simulation of context menu event by handling directly EVT_RIGHT_UP was implemented in wxSTC in 451c5cc7b9, but later on, EVT_CONTEXT_MENU generation in wxOSX was fixed in 524c47aa3a so  simulation is no longer necessary and this event can be directly handled in wxSTC.
2017-07-02 13:02:13 +02:00
PB
ca3f919da9 Make wxBasicString safer and easier to use as a BSTR RAII wrapper. 2017-07-01 12:50:24 +02:00
Stefano D. Mtangoo
2971930ab8 Fix wx/textcompleter.h compilation when it's the first included header
Explicitly include the required headers instead of relying on them being already included.

Closes https://github.com/wxWidgets/wxWidgets/pull/513
2017-06-29 17:17:01 +02:00
Stefan Csomor
a352f80537 Fix 32 bit compilation
The class wxTextFieldCell was still declared, but not defined for 32 bit builds, move the define to NSTextFieldCell into the header.
2017-06-27 18:10:07 +02:00
Stefan Csomor
6dfa897b4a Adding a native implementation for clearing bitmap/window contexts
Filling a bitmap surface is filled with ARGB 0,0,0,0. This way eg buffered transparent layers can be properly cleared.
2017-06-25 22:48:58 +02:00
Stefan Csomor
b0470eb91d Bring OSX API in sync with MSW 2017-06-25 13:55:06 +02:00
Stefan Csomor
7104ed845d Allow for compilation under iOS 11
The system() API call has been deprecated since iOS 8, so it's better not to use it at all, eventhough compilation only breaks in iOS 11.
2017-06-24 22:01:15 +02:00
Stefan Csomor
a77066d530 Use toll-free bridges from CTFontRef to NSFont or UIFont from (#507) 2017-06-24 11:09:29 +02:00
PB
60563ce0ce Modify wxBasicString so it is better suited to work as an RAII wrapper for BSTR. 2017-06-23 17:06:56 +02:00
PB
684f0146f1 Revert "Introduces wxBSTR, an RAII wrapper for MSW BSTR type. wxBSTR also supersedes wxBasicString."
This reverts commit db22c91d44.
2017-06-23 17:05:03 +02:00
Stefan Csomor
36de95bd8e wxSecretStore is not implemented on iOS 2017-06-23 11:04:26 +02:00
Stefan Csomor
e15d417a76 Move config_xcode.h include to setup.h
In order to allow inclusion of configure determined flags via a wx/setup.h include also for xcode builds, the include has to move into the setup0.h template
2017-06-22 22:23:28 +02:00
Vadim Zeitlin
bfb893170e Fix initialization of SingleCharBuffer and Utf16CharBuffer data
Don't do it at all in the ctor, initializing just the first element of
the array is useless as it's overwritten by EncodeChar() anyhow, so just
leave the task of NUL-terminating the data to this function as well.

It might be even better to just have a ctor taking wxUniChar in these
classes instead and make EncodeChar() a trivial wrapper around it, but
for now just apply the minimal fix to repair the test breakage after the
last commit.

See https://github.com/wxWidgets/wxWidgets/pull/467#issuecomment-310384946
2017-06-22 15:55:24 +02:00
Vadim Zeitlin
4d3aaafc86 Avoid MSVC warning about correctly default-initializing arrays
Don't rely on default array initialization, not only it may not work
with some really old compilers (which is actually not that important as
we don't seem to rely on these arrays being initialized, in fact), but
it results in warnings about working correctly (sic) from MSVC in
versions from 9 up to 12 inclusive.

See https://github.com/wxWidgets/wxWidgets/pull/467#issuecomment-310193867
2017-06-22 01:50:19 +02:00
Dimitri Schoolwerth
07c8f15e43 Fix 'destionation' typos
Rename relatively new enum value wxTASKBAR_JUMP_LIST_DESTIONATION to
wxTASKBAR_JUMP_LIST_DESTINATION as well as a private function containing
the same typo.
2017-06-21 22:51:57 +04:00
Vadim Zeitlin
bb306b7ed0 Merge fixes for handling Unicode characters outside of BMP
Closes https://github.com/wxWidgets/wxWidgets/pull/467
2017-06-21 19:10:12 +02:00
Vadim Zeitlin
8311715bdf Ensure that SIZEOF_WCHAR_T is defined in wx/chartype.h
This should always the case now, but wasn't when not using configure
(e.g. in MSVC builds) before, so verify this explicitly to ensure that
we don't just silently define wxUSE_UNICODE_UTF16 wrongly, as it
happened before the fix in the previous commit.
2017-06-21 19:08:27 +02:00
Vadim Zeitlin
a86d0f8d65 Move wx/debug.h inclusion after SIZEOF_WCHAR_T in wx/defs.h
This is required now because wx/debug.h includes wx/chartype.h which uses
SIZEOF_WCHAR_T to define wxUSE_UNICODE_UTF16.
2017-06-21 19:07:43 +02:00
Vadim Zeitlin
24f3ff3b78 No changes, just fix a typo in a recently added comment 2017-06-21 19:07:13 +02:00
Stefan Csomor
8b1381f2b1 OSX use fontAttributes for better emulation of bold fonts (#501)
* using fontAttributes dictionary allows for better emulation of bold typefaces, also switch to using color from context, this allows keeping the same dict throughout, as a side effect fix font caching

* reverting in order to maintain crossplatform compatibility

* applying review suggestions

* applying review suggestions
2017-06-20 17:55:26 +02:00
Vadim Zeitlin
a2af796156 Remove outdated comment about wxListCtrl checkboxes support
They're implemented in the generic version too, so don't say that they're
MSW-only.

No real changes.
2017-06-20 15:25:28 +02:00
pbfordev
3dd7d57bd4 wxBSTR cleanup: fixed a bug in wxBSTR::operator=(const wxBSTR& wxbstr); slightly improved comments in the code. 2017-06-17 08:52:48 +02:00
pbfordev
db22c91d44 Introduces wxBSTR, an RAII wrapper for MSW BSTR type. wxBSTR also supersedes wxBasicString. 2017-06-16 21:07:50 +02:00
Stefan Csomor
4558dbe97f switching from comma to semicolon, possible error warning 2017-06-15 17:48:23 +02:00
Stefan Csomor
d28dd3333b change code to help analyzer trace ownership properly 2017-06-07 23:00:28 +02:00
Stefan Csomor
a12a4c25bc support Xcode 9 and 10.13 SDK builds 2017-06-06 21:54:08 +02:00
Vadim Zeitlin
60d9f403a2 Only declare wxSetClipboardData() in wxMSW when it's defined
This is only the case when full OLE support is disabled.

See https://github.com/wxWidgets/wxWidgets/pull/491
2017-06-01 00:38:08 +02:00
Adrian DC
9b97be52c6 wx/msw/clipbrd.h: Remove unreferenced wxGetClipboardData prototype
* wxGetClipboardData was removed through commit
    b375d81499 "Use wxDataObject methods..."
    but former usages will break with unreferenced
    function as the header still advertises the function

Change-Id: I77e756d2b7d0db7c3833578d2846f4e922a55262
2017-05-31 16:56:09 +02:00
Adrian DC
11e5413558 wx/xml: Implement line-ending modes for xml saves
* Add 'wxTextFileType m_fileType' to hold the type
 * Add 'wxString m_eol' to hold the end of lines string

 * Add SetFileType() and GetFileType() to set and get the type
 * Add GetEOL() to get the end of lines wxString

 * Backwards compatibility preserved by using wxTextFileType_Unix

Change-Id: I3e8547b377e2c4060a3a2d97c299a08ea2c0a376
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2017-05-30 14:31:59 +02:00
Artur Wieczorek
79a7fa0330 Create new instance of wxPrintDC in wxGtkPrintDialog
GetPrintDC() should return a new device context created by the print
dialog, not the duplicate of existing context passed from the caller
(e.g. from wxGtkPrinter) through SetPrintDC(). Therefore SetPrintDC() is
no longer useful and can be removed.
2017-05-29 20:17:19 +02:00
Paul Cornett
d16afbd3c1 Use const reference for wxPoint parameter 2017-05-28 23:56:46 -07:00
Paul Cornett
01909a20c8 Remove initializations of wxString with wxEmptyString
An empty string is the default
2017-05-28 23:53:44 -07:00
Paul Cornett
7358202d29 Use ctor initializer for non-trivial data members 2017-05-28 23:49:55 -07:00
Paul Cornett
1532afcb2f Use ctor initializer for non-trivial data members 2017-05-28 23:40:34 -07:00
Paul Cornett
d35e516fd5 Use compiler-generated copy ctor and assignment operator for wxHtmlLinkInfo 2017-05-28 23:29:10 -07:00
Paul Cornett
5feb43c8a2 Fix accidental use of comma operator 2017-05-28 22:42:13 -07:00
Vadim Zeitlin
de47af2f0f Merge branch 'configure-enhance'
Miscellaneous enhancements to configure
2017-05-28 16:21:21 +02:00
Vadim Zeitlin
e2dfa8e477 Regenerate comments in setup.h headers
Update the generated files after 338629e314.

The only changes are in the comments.
2017-05-28 16:20:19 +02:00
Vadim Zeitlin
5283fa14a7 Fix wxUSE_XTEST location in include/wx/osx/setup.h
Move it out from the auto-generated section to avoid losing it during the next
build/update-setup-h execution (see e24bc249e4
which added this option in the wrong place).
2017-05-28 16:18:12 +02:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Artur Wieczorek
ef3863a71e Implement GetPartialTextExtents() in wxGtkPrinterDC
Generic implementation from wxDCImpl doesn't work well with wxPrinterDC
under wxGTK.
(This implementation is adopted from wxCairoContext::GetPartialTextExtents.)
2017-05-26 00:32:49 +02:00
orbitcowboy
aa56419ea8 Fix accidental use of comma operator in wxMouseState
Replace an accidental comma with the semicolon, which is what should have been
used here since the beginning (even though comma actually did do the same
thing).
2017-05-24 17:29:25 +02:00
VZ
d2c2274baa Merge pull request #478 from stahta01/staging
Fix wxGTK/Win32 build with "--disable-wxdib".
2017-05-22 00:25:03 +02:00
Vadim Zeitlin
66865ed714 Merge branch 'icon-bundle-from-msw-res'
Add support for using icons from MSW resources in wxIconBundle.

Closes https://github.com/wxWidgets/wxWidgets/pull/482
2017-05-20 17:03:50 +02:00
Vadim Zeitlin
f5a0893ee9 Update comment and change log after MSW wxIconBundle improvements
It is now possible to load icons from a bundle too.
2017-05-20 17:01:59 +02:00
Vadim Zeitlin
5353bfc963 Minor whitespace/style fixes
Remove extra spaces, harmonize the style of "#endif" comments.
2017-05-20 17:01:58 +02:00
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
pbfordev
944f3dffd2 Refactored the previous commit regarding wxIconBundle support for icons stored MS Windows resources. 2017-05-20 08:43:50 +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