Commit Graph

17230 Commits

Author SHA1 Message Date
Artur Wieczorek
836bbcbfcb Fix positioning of TextCtrlEditor in wxPG (wxOSX)
Position of the editor associated with properties like StringProperty,
IntProperty, etc. needs to be adjusted in order to display edited text
at the same position as the text which is displayed as a property value
prior to the editing.
2017-07-16 19:12:20 +02:00
Artur Wieczorek
3212f7eab9 Fix positioning of TextCtrlEditor in wxPG (wxGTK)
Position of the editor associated with properties like StringProperty,
IntProperty, etc. needs to be adjusted in order to display edited text
string at the same position as the text which is displayed as a property
value prior to the editing.
2017-07-16 19:03:38 +02:00
Vadim Zeitlin
a07013a6f1 Tab navigation improvements for wxOSX
Closes #17341.

Closes https://github.com/wxWidgets/wxWidgets/pull/493
2017-07-16 15:59:48 +02:00
Vadim Zeitlin
4defd593dc Compilation fix for wxOSX when not using PCH
Explicitly include wx/containr.h in a header using wxNavigationEnabled.
2017-07-16 15:57:54 +02:00
Vadim Zeitlin
de3087c0de Tab navigation improvements for wxOSX
Closes https://github.com/wxWidgets/wxWidgets/pull/493
2017-07-16 15:52:38 +02:00
Vadim Zeitlin
0bae199ffe Merge branch 'msw-locale'
Fixes for setting locale under MSW when using older compilers and minor
simplifications and optimizations in wxLocale code.

See https://github.com/wxWidgets/wxWidgets/pull/517
2017-07-16 15:04:16 +02:00
Vadim Zeitlin
8cb4e70064 Refactor wxLocale initialization code
Don't call wxSetlocale() in DoInit() any more, this was redundant when
it was called from Init(wxLanguage) overload.

Add new DoCommonPostInit() called from both Init() overloads after
setting the locale in whichever way they do it to avoid code
duplication.

As a side effect of this change, the error message given if the locale
can't be set is the same now independently of the ctor/Init() overload
used (previously it differed depending on whether a wxLanguage or the
name of the language as string was passed) and it's always logged using
wxLogWarning() and not it in one case and wxLogError() in the other one.
2017-07-16 15:03:22 +02:00
Vadim Zeitlin
8713d73466 Avoid at least some unnecessary setlocale() calls
Instead of calling wxLanguageInfo::GetLocaleName(), which called
setlocale() at least thrice (first to query the current locale, second
to try to change it and third to restore the original locale) and then
calling setlocale() again if it succeeded, use the new TrySetLocale()
method which calls setlocale() just once and doesn't require calling it
again in the caller.

This makes the code slightly more efficient but, more importantly,
shorter and more clear.
2017-07-16 15:03:17 +02:00
Vadim Zeitlin
7836dfbc77 Make wxLanguageInfo::GetLocaleName() consistent across platforms
Check that the locale can be indeed set to the given string in Unix
version too, there doesn't seem to be any good reason to do it for MSW
only.
2017-07-16 15:03:03 +02:00
Vadim Zeitlin
a2056d7314 Fix 32 bit wxOSX build after wrong merge
Correct wrong merge of 1c0ecec225, the
checks for __LP64__ should have been removed in the merge commit
aaae5ef702 but were mistakenly left in.

See https://github.com/wxWidgets/wxWidgets/pull/377
2017-07-16 14:54:28 +02:00
Vadim Zeitlin
aaae5ef702 Merge branch 'better-mac-32bit-fix'
Re-enable alignment support for wxDataViewCtrl cells in wxOSX which was
previously disabled just to allow the library to compile in 32 bits.

Closes https://github.com/wxWidgets/wxWidgets/pull/377
2017-07-11 23:16:49 +02:00
Vadim Zeitlin
e851db7e9e Avoid -Wexpansion-to-defined clang warning in wxOSX
Define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA as either 0 or 1 instead of using an
expression involving "defined" for it as the latter provoked many clang
-Wexpansion-to-defined warnings, which were harmless but very annoying.
2017-07-11 23:16:28 +02:00
Vadim Zeitlin
467c48841f Rename wxTextFieldCell members once again
Use underscores on them to show that they are different from properties or
local variables (in pure Objective C they would actually start with
underscores, but this is not a good idea in C++ code) and avoid conflict
between a member name and "wxAlignment" type name, which was confusing.
2017-07-11 23:16:14 +02:00
Vadim Zeitlin
a326da369b No real changes, just remove leading underscore from variables
Now that these variables are in a public header, don't use leading underscores
for them, if only for consistency with all the others.
2017-07-11 23:16:13 +02:00
Vadim Zeitlin
1c0ecec225 Better fix for 32 bit wxOSX build
Instead of disabling vertical alignment support in wxDataViewCtrl, move the
private variables to the header file: this is supported by all versions of the
Objective-C runtime, including the old one used for 32 bit applications,
unlike the new way based on declaring the variable in an anonymous extension.

This replaces the changes of 22216b70e7.
2017-07-11 23:16:13 +02:00
Vadim Zeitlin
5292f77ab4 Check for window best size in wxPersistentTLW
Ensure that the restored size is at least equal to the best size of the
window to avoid cutting off parts of it in (a common) case when a newer
version of the program adds new UI elements, thus increasing the window
best size and possibly making the previously stored size too small.
2017-07-06 15:22:10 +02:00
Bryan Petty
ed173ed91e Use HTTPS with Trac links. 2017-07-04 13:15:14 -06:00
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
Steve Browne
1eea936f8f Properly handle tab navigation for wxRadioBoxes on wxOSX. 2017-06-05 01:17:52 -04:00
Steve Browne
f4b73fd99e Account for wxTE_PROCESS_TAB when doing tab navigation on wxOSX. 2017-06-05 01:14:43 -04:00
Steve Browne
8bca6deda3 Properly handle tab navigation for most controls on wxOSX #17341. 2017-06-05 01:10:53 -04: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