Commit Graph

65925 Commits

Author SHA1 Message Date
VZ
a5a44e8bae
Apply suggestions from code review
Co-Authored-By: NewPagodi <NewPagodi@users.noreply.github.com>
2019-04-18 20:57:01 -05:00
New Pagodi
5f39bb4157 Update other test build files by hand for the new STC test 2019-03-20 17:07:56 -05:00
New Pagodi
a4b688cb45 Regenerate the test make files to include the new STC test 2019-03-20 17:07:47 -05:00
New Pagodi
7b0c7495e3 Add gui test for STC popup items
With wxSTC, popup autocompletion lists and call tips need to be able to
show their information and respond to mouse clicks, but should never
take focus from their parent STC. This test verifies that these popups
function in this manner.
2019-03-20 17:07:39 -05:00
New Pagodi
fe7b332b7b Regenerate STC files after recent changes 2019-03-20 00:15:44 -05:00
New Pagodi
267540d233 Add AutoCompUseListCtrl method to STC
The AutoCompUseListCtrl method can be used to make an autocompletion
list look like it's being shown with a wxListCtrl instead of a
wxListBox. When this style is used, the list will have hot tracking.
On MSW, the colours will also be slightly different.
2019-03-20 00:15:38 -05:00
New Pagodi
3900cfec27 Add AutoCompSetColours method to stc
With some system themes, the default colors used for a list box can be
hard to read or otherwise unsuitable for use with an autocompletion
popup. This method lets a user manually specify colours for the list
box’s background, text, selection background, and selected text.
2019-03-20 00:15:31 -05:00
New Pagodi
f0ba9f0ef1 Reduce flicker with STC call tips in MSW
When switching between call tips in MSW, there can be a bit of flicker
when the first is closed and the new one is opened. To reduce the
flicker, store the call tip background in a bitmap and use a very brief
fade-in animation when showing the new call tip.
2019-03-20 00:15:24 -05:00
New Pagodi
0f7552cdb0 Hide popup when STC app is minimized on macos and GTK+ 2019-03-20 00:15:13 -05:00
New Pagodi
0c953308de Allow wxSTCPopupWindow to move when its parent wxSTC moves 2019-03-20 00:15:05 -05:00
New Pagodi
de0992ea3d Implement wxSTCListBox using wxVListBox
Previously wxSTCListBox was a class derived from wxListView and required
several extra steps to make the control look correct when it lacked
focus. This commit changes wxSTCListBox so that it is a wxVListBox and
is built to always draw itself looking as though it has focus.

In addition this splits the work previously done by ListBoxImpl class
among wxSTCListBox and a newly defined wxSTCListBoxVisualData class.
wxSTCListBox manages the work done by a specific list and
wxSTCListBoxVisualData manages the data common to all lists. All
ListBoxImpl methods now simply forward to a method of one of those 2
classes.
2019-03-20 00:14:58 -05:00
New Pagodi
59190ffc06 Use wxSTCPopupWindow for call tips in wxSTC
This class has been built to have the features needed for showing popups
with wxSTC and so provides a much shorter implementation for calltips.
2019-03-20 00:14:50 -05:00
New Pagodi
891f541397 Use wxSTCPopupWindow for showing autocompletion lists
The newly defined wxSTCPopupWindow class has been built to have the
behavior necessary for showing the popup windows used by wxSTC. This
commit uses it as the base class of the window that shows autocompletion
lists.
2019-03-20 00:14:43 -05:00
New Pagodi
06a7433e76 Modify xcode project to use PlatWXcocoa.mm 2019-03-20 00:14:36 -05:00
New Pagodi
10bbd4009a Regenerate build files after recent changes 2019-03-20 00:14:08 -05:00
New Pagodi
f2e1aa46fe Modify build system files to use PlatWXcocoa.mm
A recent commit added the file src/stc/PlatWXcocoa.mm needed for wxSTC
with the cocoa port. This commit modifies the build system files to
use this new file when it is needed.
2019-03-20 00:12:41 -05:00
New Pagodi
66d340ae15 Define the wxSTCPopupBase for wxCocoa
With the cocoa port, wxSTCPopupBase is defined by creating a floating
window using the cocoa api and then wrapping that window in a
wxNonOwnedWindow for use with wxWidgets.
2019-03-18 22:25:10 -05:00
New Pagodi
75656067ae Add wxSTCPopupWindow for wxSTC
The wxSTCPopupWindow is intended to serve as a popup window for showing
call tips and popup lists with wxSTC. This class is designed to show its
content and respond to mouse clicks, but it should never take focus from
its parent wxSTC. It is built with customizations for wxMSW, wxCocoa,
and wxGTK+ to function in that way.
2019-03-18 22:25:02 -05:00
New Pagodi
79e16c78bc Demonstrate call tip clicks in the stc sample
This adds a demonstration of handling call tip clicks to the stc sample.
Instead of showing a single call tip, 3 different call tips can be
shown. The sample demonstrates how to move between the call tips
depending on if the up or down button was clicked in the call tip
window.
2019-03-18 22:24:43 -05:00
New Pagodi
518cdc5790 Demonstrate autocompletion in the stc sample
This adds a demonstration of autocompletion for C preprocessor
directives to the stc sample. It also shows how to register and use
small images with the autocompletion popup.
2019-03-18 22:24:34 -05:00
Vadim Zeitlin
1cdc0acfbe Merge branch 'stcxpm' of https://github.com/NewPagodi/wxWidgets
Improve XPM images handling in wxStyledTextCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1215
2019-03-18 22:36:25 +01:00
VZ
fb8c4bda29
Update src/stc/ScintillaWX.cpp
Co-Authored-By: NewPagodi <NewPagodi@users.noreply.github.com>
2019-03-18 15:43:39 -05:00
VZ
12749d1a59
Update src/stc/PlatWX.cpp
Co-Authored-By: NewPagodi <NewPagodi@users.noreply.github.com>
2019-03-18 15:43:30 -05:00
Vadim Zeitlin
23ddf26571 Fix bug with wxRadioButton state changing unexpectedly in wxMSW
In wxMSW, a focused wxRadioButton is always checked, which meant that
checking a wxRadioButton while focus was not in the window containing it
and later giving the focus to that window could uncheck it by giving
focus to another wxRadioButton that had had it previously.

Fix this by adding WXSetPendingFocus() to wxMSW wxWindow and calling it
from wxRadioButton::SetValue() to ensure that when the focus is
regained, it goes to the newly checked radio button and not some other
one.

This replaces the previously used, for the same purpose, wxMSW-specific
wxTopLevelWindow::SetLastFocus(), so while this solution is not exactly
pretty, it's not worse than we had before, while being more generic.

Also add a unit test checking that things work correctly in the scenario
described above.

Closes https://github.com/wxWidgets/wxWidgets/pull/1257

Closes #18341.
2019-03-18 18:29:19 +01:00
Ilya Sinitsyn
324c58d9e2 Do not set focus to the window when its rich tooltip is shown
Don't set the focus to the window the rich tooltip refers to in its
ShowFor() method because this was inconsistent with plain tooltips and
also could result in infinite recursion if the window decided to show
its tooltip when it got focus.

Closes https://github.com/wxWidgets/wxWidgets/pull/1265
2019-03-18 18:25:09 +01:00
Vadim Zeitlin
3e0238e089 Merge branch 'wrapsizer' of https://github.com/thesiv/wxWidgets
Fix wxWrapSizer min size calculation in the secondary direction and
improve its unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/1258
2019-03-18 18:22:07 +01:00
Vadim Zeitlin
2531780c3b Avoid division by 0 in generic wxDataViewCtrl scrolling code
Apparently, ScrollTo() can be called when processing keyboard input in
the control before its initial resize and hence before scrolling is
initialized and in this case per-unit scroll units are still 0, so
dividing by them is not a good idea.

Just avoid scrolling in this case.

Closes https://github.com/wxWidgets/wxWidgets/pull/1262
2019-03-18 18:18:47 +01:00
exprosic
7a2d9d0d10 Fix compilation of MFC support code in MSVS conformance mode
Allow the code to be compilable with /permissive-, which is on by
default in VS2017.

Closes https://github.com/wxWidgets/wxWidgets/pull/1263
2019-03-18 18:11:42 +01:00
Ilya Sinitsyn
f65153a843 Fix overlay initialization
Fix the size used for a device context initialization, this fixes a
regression from 18472ea8b1 which used
right/bottom coordinate instead of width/height as Init() arguments.

See #14415.

Closes https://github.com/wxWidgets/wxWidgets/pull/1261
2019-03-17 15:25:52 +01:00
Stefan Csomor
cfded96627 fixing truncation error in GetSubBitmap
fixes #18362
2019-03-17 12:19:53 +01:00
New Pagodi
f4e0c1aaee Regenerate wxSTC files after recent changes 2019-03-17 01:49:30 -05:00
New Pagodi
8be4f7dde6 Change wxSTC mapping for SCI_REGISTERIMAGE
Currently the Scintilla message SCI_REGISTERIMAGE is mapped to
wxStyledTextCtrl::RegisterImage(int, const wxBitmap&). This makes
RegisterImage a manually defined method and passes the bitmap directly
to the listbox instead of first converting to an XPM.

To backfill the message map, SCI_REGISTERIMAGE is now mapped to a new
method overload RegisterImage(int, const char* const*). The new method
accepts XPM data instead of a wxBitmap.
2019-03-17 01:48:51 -05:00
New Pagodi
f50b18000a Change wxSTC mapping for SCI_MARKERDEFINEPIXMAP
Currently the Scintilla message SCI_MARKERDEFINEPIXMAP is mapped to the
wxStyledTextCtrl::MarkerDefineBitmap method. This has two
drawbacks. First this requires the XPM image handler be loaded before
this method can be called. Second, any alpha data except for opaque and
transparent is lost in the conversion to XPM format.

Instead have MarkerDefineBitmap be a manually declared method but
reimplemented it in a way similar to how the SCI_MARKERDEFINERGBAIMAGE
message works. The new implementation preserves alpha data if it exists.

To backfill the message map, the SCI_MARKERDEFINEPIXMAP is now mapped to
a new method MarkerDefinePixmap(int, const char* const*). The new method
accepts XPM data instead of a wxBitmap.
2019-03-17 01:48:19 -05:00
New Pagodi
8c180ee7b5 Change the implementation of ListBoxImpl::RegisterImage
The ListBoxImpl::RegisterImage in PlatWX.cpp is supposed to accept an
XPM and convert it into a useable form. For wxWidgets, the useable form
is obviously a wxBitmap. According to the Scintilla specification, the
function should accept both a copy of an XPM file and a set of XPM data.

Currently RegisterImage uses the the wxWidgets XPM image handler. This
has 2 drawbacks. First it requires that the XPM handler is loaded before
the function can be called. Second, the function only accepts a copy of
an XPM file and does not work with XPM data.

Instead use wxXPMDecoder. This class can be decode both types of input
and can be used to build a wxBitmap.
2019-03-17 01:47:36 -05:00
Vadim Zeitlin
cbaab700d0 Merge branch 'milotype-wx-02' of https://github.com/milotype/wxWidgets
German and Croatian translations updates.

See https://github.com/wxWidgets/wxWidgets/pull/1260
2019-03-16 22:14:48 +01:00
milotype
433f307a27
Update hr.po
Minor translation corrections, typgraphic corrections
2019-03-16 21:52:55 +01:00
milotype
cbf3a826da
Update de.po
File completion (100%), minor translation corrections, typgraphic corrections
2019-03-16 21:52:05 +01:00
Ilya Sinitsyn
d5a6a5a627 Add unit test for wxWrapSizer::CalcMinFromMinor
Add a unit test for a special case of a wrap sizer min size caclulation.
Test wxWrapSizer::CalcMinFromMinor function for this case, when a wrap
sizer used inside a sizer with the same alignment.
2019-03-15 04:16:41 +07:00
Ilya Sinitsyn
e2a9fb1fba Use CATCH in WrapSizer unit tests
Use CATCH instead of CppUnit for unit tests of wxWrapSizer.
2019-03-15 04:14:22 +07:00
Ilya Sinitsyn
6f3ca5805b Fix wrapsizer min size calculation
Fix the `wxWrapSizer::CalcMinFromMinor` function: at the end of the
calculation a `sumMinor` variable contain minor size sum without minor
size of a last line, so add `maxMinor` size to the result min size.
2019-03-15 03:29:54 +07:00
Vadim Zeitlin
fbd645b2dd Use C99 to compile Expat sources under Unix
Expat requires C99 and doesn't compile without the appropriate command
line option at least under Solaris as <stdbool.h> is not available
without it there.

Closes https://github.com/wxWidgets/wxWidgets/pull/1250

Closes #18352.
2019-03-14 12:39:53 +01:00
PB
2dbe91bb00 Fix library link in doxygen docs for image handlers
The command used for linking to the core library was "@library{core}"
instead of correct "@library{wxcore}". This resulted into plain text
"page_libs_core" being displayed instead of expected "wxCore" hyperlink.

Closes https://github.com/wxWidgets/wxWidgets/pull/1259
2019-03-14 02:37:05 +01:00
Cătălin Răceanu
c42bda6bd5 Avoid crashes due to signals/events when destroying wxWindowQT
Don't handle any pending signals or events for the windows about to be
destroyed.

Closes https://github.com/wxWidgets/wxWidgets/pull/1253
2019-03-13 17:42:23 +01:00
Paul Cornett
993334c48a Avoid clipping wxCheckBox focus indicator on GTK3
GtkCheckButton "outline" is drawn outside of widget's allocation with Adwaita theme
See #18353, #18043
2019-03-12 10:11:20 -07:00
Stefan Csomor
f163578c94 macOS expose scroll invertion in event
applied patch from #18358, thanks for the patch Andy
2019-03-12 12:22:41 +01:00
Jouk
593257ea05 Link tiff library as shareable image on OpenVMS 2019-03-12 08:20:16 +01:00
Jouk
bd47bca4f6 Link tiff library as shareable image on OpenVMS 2019-03-11 17:04:11 +01:00
Juha Sointusalo
b5e7b0a621 Allow specifying optional libraries with WX_CONFIG_CHECK
wx-config has --optional-libs command line option for requesting linker
flags for libraries that an application could optionally use but might
not be available in current wxWidgets build.

Make this feature available to Autoconf macro users.

Closes https://github.com/wxWidgets/wxWidgets/pull/1256
2019-03-11 00:44:10 +01:00
milotype
7a5e649b9e Add Croatian translation by Milo Ivir
Closes http://www.wxwidgets.org/about/translations/
2019-03-11 00:42:52 +01:00
Cătălin Răceanu
ca68cd50f2 Do not explicitly set selection to -1 when deleting all pages
Avoid calling wxNotebook::SetSelection(-1) when the notebook is cleared.

Closes https://github.com/wxWidgets/wxWidgets/pull/1254
2019-03-11 00:37:26 +01:00