Commit Graph

17752 Commits

Author SHA1 Message Date
Jouk
8d1063389a update gtk1 font routines to support nwe code in wxWidgets 2018-09-05 10:42:35 +02:00
Vadim Zeitlin
967ff67459 Merge branch 'adv-merge'
Move the entire contents of wxAdv library into wxCore.

In the future, wxAdv will disappear entirely, but for now keep it as an
empty placeholder to allow the existing make/project files to work.

See https://github.com/wxWidgets/wxWidgets/pull/900
2018-09-02 15:43:02 +02:00
Stefan Csomor
4580cdb9ad
Extending wxFont API & OSX Core Text Implementation (#877)
* Switch to pure Core Text Implementation, Start extended Font API

* mac fixes

* First msw implementation

* Fixing paste error

* fixing typo

* Rearranging lines to former fallthrough order

* Blind fixes for covering new abstract methods

* Blind gtk implementations

* Fixing according to travis ..

* Removing method defined in base

* formatting adaptions

* Extending the schema definition for new weights

* fixing typo, using wxRound, other fixes according to comments

* changes according to suggestions

* fixing init order, before the init of m_info was overridden by Init()

* redo

* redo

* redo

* Cleanup

Removing obsolete code snippets, proper traces for font names

* Moving common code

Only the Get/SetNumericWeight calls should now be implemented in the native part, the ‚old‘ Get/SetWeight are common code and use the numeric counterparts.

* Updating docs

* commit wa missing changes.txt

* Doc fixes

* Full stops added
2018-09-01 19:42:18 +02:00
Vadim Zeitlin
3ffa651a34 Move wxAdv library contents into wxCore
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.

It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
2018-08-27 21:13:04 +02:00
Stefan Csomor
b38813a5e9 use Cocoa fix for nested modal loops for system dialogs also 2
Header was missing in 99eba63796, see #18204
2018-08-27 13:57:58 +02:00
Vadim Zeitlin
d09a7180e7 Make wxHtmlContainerCell ctor explicit
No real changes, just make it more difficult to misuse it accidentally.
2018-08-25 21:19:33 +02:00
Vadim Zeitlin
a59f5932df Add wxHtmlContainerCell::Detach()
This allows manipulating the HTML DOM from the outside, e.g. to detach
a header element in order to be able to repeat it on all pages.
2018-08-25 21:16:55 +02:00
Vadim Zeitlin
012baf1ff2 Remove unnecessary heap allocations in wxHtmlDCRenderer
Make m_Parser and m_FS simple objects instead of pointers as it's
completely unnecessary to allocate them on the heap here.

Note that both wxHtmlWinParser (by explicitly including its header) and
wxFileSystem (which is implicitly included via wx/html/htmlpars.h) are
fully declared in the header, so using pointers doesn't even help with
reducing compilation dependencies.

No real changes.
2018-08-25 14:29:25 +02:00
Vadim Zeitlin
9db0234abc Allow passing already parsed HTML to wxHtmlDCRenderer
This is more efficient when the same HTML is reused multiple times, e.g.
for measuring it first and then rendering it.

The new function also makes it simpler to parse HTML and manipulate it
in some way before measuring and rendering it.
2018-08-25 02:37:55 +02:00
Maarten Bent
190cb0e025 Remove trailing spaces in webview code 2018-08-22 20:02:42 +02:00
Maarten Bent
bfafb74761 Fix missing enum in MinGW 2018-08-22 20:01:02 +02:00
Paul Cornett
d200f19c02 Fix non-unicode build after 82881d6b03
wxChar overload of wxTmemcpy() is not defined. Just use memcpy() directly
as wxStrlcpy() does not use wxChar.
2018-08-22 08:12:11 -07:00
Vadim Zeitlin
14c121b469 Merge branch 'grid-mouse'
Improve mouse event handling in wxGrid during drag operations.

See https://github.com/wxWidgets/wxWidgets/pull/891

Closes #18186.
2018-08-21 13:03:09 +02:00
Steven Lamerton
b61123cd7d Allow distinguishing user- from script-opened wxWebView windows
Add wxWebViewEvent::GetNavigationAction() returning a value that can be
either wxWEBVIEW_NAV_ACTION_USER for the links opened by the user, or
wxWEBVIEW_NAV_ACTION_OTHER for the other ones (e.g. opened from
JavaScript code on the page).

Closes #15402.
2018-08-19 22:27:34 +02:00
Stefan Csomor
91aa6ba36e
OSX using ref data for colour and NSColor native support (#878)
* First attempt using ref data for colour and spliting implementation for CGColorRef and NSColor

* correcting SDK dependency

* Implementing feedback suggestions
2018-08-19 18:02:06 +02:00
Vadim Zeitlin
617a15d418 Improve wxNotebook themed background drawing
Use GetThemeBackgroundContentRect() to properly draw the themed notebook
background in all configurations.

Closes #18156.
2018-08-18 15:44:43 +02:00
Vadim Zeitlin
bb00501e77 Fix mouse event handling while dragging in wxGrid
Ignore all the mouse events other than "left up" while dragging to avoid
releasing the mouse and ending the dragging operation too soon.

This required non-trivial refactoring of the code which hopefully should
also make it slightly more clear by centralizing high level logic in
ProcessGridCellMouseEvent() itself and calling various helper functions
from it instead of spreading this logic over the entire call tree.

The code still remains pretty confusing and rewriting it to use
wxMouseEventsManager (which would need to be generalized first to become
a template class using arbitrary item type instead of just "int", as
now) would undoubtedly do it a lot of good.

Closes #18186.
2018-08-18 14:45:55 +02:00
Vadim Zeitlin
53972b17ee Add helper wxGrid::DoAfterDraggingEnd() function
No real changes, just refactor the code to extract the part of
CancelMouseCapture() which can be useful not only when the mouse capture
is lost unexpectedly, but also when we release it of our own volition,
into a separate function.
2018-08-18 14:40:48 +02:00
Vadim Zeitlin
c6af757edb Don't use WXDLLIMPEXP_FWD_BASE in typedef to fix clang build
clang doesn't seem to like __declspec in typedefs, so declare the class
first using the macro expanding into __declspec and don't use it in the
typedef later.

Closes #18196.
2018-08-16 19:42:11 +02:00
approach
09124932eb Add strike-through support to wxDataViewItem attributes
Implement support for this attribute only in the generic version so far,
it will hopefully be implemented for the natives ones in the future.

Also add a new toggle column to the dataview sample to check how it
works: checking the items in this column enables using this attribute
for some other ones.

Closes #18180.
2018-08-14 18:04:31 +02:00
Blake-Eryx
e1a7f56040 Fix spelling and punctuation errors in comments and documentation
Fix several occurrences of misspelling "trivial" as "trival"; use "from"
rather than "than"; add missing articles and commas.

Closes https://github.com/wxWidgets/wxWidgets/pull/874
2018-08-14 17:15:39 +02:00
Stefan Csomor
e136f34944 Removing extra semicola 2018-08-05 14:21:50 +02:00
Vitaly Stakhovsky
9d47b1956e Tidy up wxGenericFontDialog code a little
Make the (originally) auto-generated code of this dialog slightly more
readable by replacing some auto-generated variable names with more clear
ones.

Also avoid using FindWindow(), this is useless and we already have the
window pointers.

Closes https://github.com/wxWidgets/wxWidgets/pull/872
2018-08-02 01:10:14 +02:00
Blake-Eryx
49e20a961d Fix misspellings in comments and documentation
No real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/870
2018-07-31 13:20:17 +02:00
Stefan Csomor
d553859812 Cleanup accessor code 2018-07-30 18:03:01 +02:00
Stefan Csomor
4bda27c96c Adding wrapper for CFArray, updating other wrappers 2018-07-30 16:32:12 +02:00
Vitaly Stakhovsky
a02efd1fc7 Implement wxFontDialog::SetTitle() in wxMSW
Base class SetTitle() implementation didnd't work for this class as it
used the (invalid) HWND of not yet existing dialog, so add a hook
procedure for the common font dialog, similar to the existing one for
wxColourDialog, which allows us to set the dialog title when the dialog
is really created.

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

Closes #18177.
2018-07-30 16:11:25 +02:00
Cătălin Răceanu
4430ab8661 Disable wxRearrangeCtrl without wxCheckListBox in wxMSW
Add a check ensuring that if wxCheckListBox is disabled, then so is
wxRearrangeCtrl, to avoid build errors that would happen otherwise.

Closes https://github.com/wxWidgets/wxWidgets/pull/866
2018-07-30 14:55:11 +02:00
Vadim Zeitlin
1c9083fd49 Merge branch 'dvc-sort-unset'
Implement wxDataViewColumn::UnsetAsSortKey() for native versions too.

See https://github.com/wxWidgets/wxWidgets/pull/861
2018-07-30 00:09:50 +02:00
Stefan Csomor
56a51ad1e7 fixing non-precompiled header build, adding method body 2018-07-28 20:14:26 +02:00
Stefan Csomor
342e445423 Adding wrapper for Core Foundation dictionaries 2018-07-28 17:49:42 +02:00
Stefan Csomor
d08033292c correcting doc 2018-07-28 15:28:45 +02:00
Vadim Zeitlin
4af7d4e0d5 Also implement wxDataViewColumn::UnsetAsSortKey() for wxGTK
Allow to reset the sort order in native GTK+ implementation too.

See #18176.
2018-07-28 02:54:44 +02:00
Daniel Kulp
2a59c1fb20 Implement wxDataViewColumn::UnsetAsSortKey() in macOS version
It was impossible to stop sorting the control if it had been sorted
before, so implement UnsetAsSortKey() to allow doing it by destroying
the current sort descriptor.

Closes #18176.
2018-07-28 02:29:30 +02:00
Vadim Zeitlin
1345b38c51 Merge branch 'gtk-datapick-focus'
Fix focus event generation for generic wxDatePickerCtrl and other
wxCompositeWindows.

See https://github.com/wxWidgets/wxWidgets/pull/860

Closes #18120.
2018-07-25 20:15:32 +02:00
Vadim Zeitlin
06d2b836a0 Bind focus events to direct children only in wxCompositeWindow
Previously, wxEVT_{SET,KILL}_FOCUS event handlers were connected to all
children, even the indirect ones, which resulted in duplicate focus
events if a grandchildren forward its focus event to its parent window,
as happens e.g. with wxComboCtrl, which contains a text control that
forwards its focus events to the containing control itself.

This change seems globally sound, even if it might break some controls
whose children don't get the expected focus events themselves, because
the right thing to do is to fix those children. And it fixes duplicate
focus events in wxDatePickerCtrlGeneric.
2018-07-25 14:11:17 +02:00
Vadim Zeitlin
4e7b21cd72 Merge branch 'mac-def-bmpbtn-margins'
Stop using wxBU_AUTODRAW under Mac and everywhere else.

See https://github.com/wxWidgets/wxWidgets/pull/859

Closes #18170.
2018-07-24 15:17:32 +02:00
Vadim Zeitlin
90edeace90 Merge branch 'ansi-fix'
Fix wxMSW compilation errors in non-Unicode build.

See https://github.com/wxWidgets/wxWidgets/pull/858

Closes #18172.
2018-07-24 15:15:28 +02:00
Vadim Zeitlin
98eec2646e Merge branch 'mingw-w64-warn-fixes'
Fix a few (harmless) warnings when building with gcc 8 from MinGW-w64.

See https://github.com/wxWidgets/wxWidgets/pull/854
2018-07-24 15:14:09 +02:00
Vadim Zeitlin
97e217e175 Ensure that wxDatePickerCtrlGeneric does get focus events
Revert 1de107c037 and remove the focus
event handler which duplicated and interfered with the handler inherited
from this class to make sure that we get wxEVT_{SET,KILL}_FOCUS for the
objects of this class.

Unfortunately these events now come in pairs, due to an extra artificial
event generated by wxComboBoxExtraInputHandler::OnFocus(), which is
still wrong -- but arguably less wrong and more useful than not sending
them at all.
2018-07-22 19:12:17 +02:00
orbitcowboy
8dfd799fd5 Use const for constant local variables in wxWidgets headers
This avoids warnings from MSVS 2017 static analyzer when C++ core rule
set is activated.

Closes https://github.com/wxWidgets/wxWidgets/pull/819
2018-07-21 16:16:32 +02:00
Vadim Zeitlin
71cef5f3be Stop using wxBU_AUTODRAW in wxWidgets code
This style bit is obsolete and doesn't do anything, so remove confusing
references to it.
2018-07-21 14:42:06 +02:00
Vadim Zeitlin
c4c4fb46d9 Remove unnecessary SetMargins() calls from wxBitmapButton ctor
Margins are overwritten by Create() anyhow, so there is just no need to
set them in the default ctor.
2018-07-21 14:35:56 +02:00
Vadim Zeitlin
d390bee8a2 Allow comparing wxString with wide strings in non-Unicode build
This fixes a compilation error in wxMSW private fonts support
implementation, which compares wxString with a wide string but, unlike a
local fix there, makes sense more broadly and should reduce the
likelihood of similar errors in the future.

It also makes comparisons with narrow C strings more efficient in the
default, Unicode, build by using wxString::Cmp() method instead of
creating a temporary wxString, as was done before.

See #18172.
2018-07-21 14:08:45 +02:00
Vadim Zeitlin
4a53b029de Mark WXSTRINGCAST and related macros as obsolete in a comment
Make it clear that these macros are defined for compatibility only and
shouldn't be used.

See https://github.com/wxWidgets/wxWidgets/pull/857
2018-07-21 13:25:44 +02:00
Vadim Zeitlin
040e897fdb Merge branch 'objarray-ptr-compat'
Restore using object array of pointers broken by recent changes.

Closes #18169.

See https://github.com/wxWidgets/wxWidgets/pull/856
2018-07-21 13:21:27 +02:00
Stefan Csomor
d3e8d3f271 Support or disable "insert" for drag/drop wxDataViewCtrl on OSX
see #18167
2018-07-16 19:42:35 +02:00
Vadim Zeitlin
02ffdd16f6 Fix using WX_DECLARE_OBJARRAY() with pointer types
While this doesn't make, and never made, any sense (pointers should be
stored in a plain, non-object array), we still should continue to
support it for compatibility.

Fix the problem introduced by 97684a9267
by writing "T const&" instead of "const T&" as the latter didn't have
the same meaning when the macro parameter "T" expanded into "U*" as
"const" applied to "U", making this type incompatible with the actual
one.

Also extend the unit test to check for this.
2018-07-15 14:48:08 +02:00
Vadim Zeitlin
b227875f98 Remove CMPFUNC##T definition from WX_DECLARE_OBJARRAY macro
It is unnecessary and fails to compile when "T" is not an identifier
(but e.g. a pointer type).
2018-07-15 14:38:01 +02:00
Stefan Csomor
0e92eb13dc initializing m_ItemCell always 2018-07-13 18:22:45 +02:00