Commit Graph

3247 Commits

Author SHA1 Message Date
Vadim Zeitlin
d44dd8caf4 Document wxDataViewCtrl::GetMainWindow()
This method can be useful, so make it part of the public API, similarly
to e.g. wxGrid::GetGridWindow().

See #17786.
2018-02-04 00:28:08 +01:00
Vadim Zeitlin
6c9ced9be2 Document wxDataViewListCtrl default sort order
Also explain how to change it if the default behaviour of putting all
the container items before all the leaves is undesirable.

Closes #16105.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
fd73ae1623 Add wxHD_BITMAP_ON_RIGHT style to wxHeaderCtrl
Implement this style for wxMSW to allow putting the column images on the
right side, for consistency with wxMSW wxListCtrl.

See #13350.
2018-02-04 00:14:28 +01:00
Vadim Zeitlin
bfd3f1b33f Fix some typos in wxDataViewCtrl documentation
No real changes.
2018-02-04 00:14:13 +01:00
Vadim Zeitlin
5f8f60107a Allow using wxRendererNative::DrawGauge() for vertical gauges too
It was unexpected that this method could only be used for horizontal
gauges, so make it work for the vertical ones if wxCONTROL_SPECIAL flag
is specified.

Update MSW and generic implementations and the render sample to show a
vertical gauge as well.
2018-02-03 18:46:17 +01:00
Vadim Zeitlin
ad71bbb9ad Fix behaviour of wxTextCtrl without wxTE_PROCESS_TAB in wxGTK
TAB should be used for navigation by default and only should be inserted
into the control as a literal character if wxTE_PROCESS_TAB is specified
for consistency with wxMSW and because this behaviour is much more
useful by default.

Fix this by calling gtk_text_view_set_accepts_tab() as appropriate for
multiline text controls. For single line ones, the behaviour is
unchanged but it's more reasonable as TAB is always handled as if
wxTE_PROCESS_TAB were not specified and it doesn't seem really useful to
try to support wxTE_PROCESS_TAB for them anyhow, so just document this
limitation.

Also remove the outdated/misleading documentation of this style, notably
don't say that it is required to get char events for TAB presses as
these events are generated both with and without this style in both
wxGTK and wxMSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/704
2018-01-31 23:12:56 +01:00
Vadim Zeitlin
06c29a7f20 Document missing ActivateCell() calls in macOS version
Native macOS version of wxDataViewCtrl doesn't support cell activation
currently.

See #17746.
2018-01-31 00:02:54 +01:00
Gunter Königsmann
96d9f7361b Document listbox item activation on Enter in wxGTK
Mention that EVT_LISTBOX_DCLICK event can also be generated from
keyboard.

Closes #17577.
2018-01-30 23:10:20 +01:00
Vadim Zeitlin
94620f6c59 Use simple wxEVT_SEARCH[_CANCEL] names for wxSearchCtrl events
The old wxEVT_SEARCHCTRL_{SEARCH,CANCEL}_BTN event names were unwieldy
and misleading because both of these events can be generated without
using the buttons, but by pressing Enter or Esc (the latter currently
works under macOS only, but this could change in the future).
2018-01-30 02:03:48 +01:00
Vadim Zeitlin
ea08b8539a Generate wxEVT_SEARCHCTRL_SEARCH_BTN when Enter is pressed
Make it possible to bind to just wxEVT_SEARCHCTRL_SEARCH_BTN under all
platforms: previously, it was also necessary to bind to wxEVT_TEXT_ENTER
when using the generic implementation, as pressing Enter in the text
control didn't generate the dedicated SEARCH event.

It does now, and, to avoid any confusion, the control does not generate
wxEVT_TEXT_ENTER events at all any more. This is not really
incompatible, as wxOSX never generated these events anyhow and the
generic version only did for a couple of days, since the changes of
9816970797 which were, finally, misguided
and so are undone by this commit.

Closes #17911.
2018-01-30 02:03:47 +01:00
Vadim Zeitlin
26997607b6 Improve SetSizerAndFit() and Fit() documentation
Mention the difference between these two functions in Fit() description,
it could be expected to behave as SetSizerAndFit() but doesn't.

See #18003.
2018-01-28 19:04:42 +01:00
Vadim Zeitlin
f063dde4f5 Merge branch 'gtk-dyn-autocomplete'
Implement dynamic wxTextEntry autocompletion for wxGTK.

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

Closes #18061.
2018-01-27 19:28:09 +01:00
Vadim Zeitlin
ec2bb385ef Remove platform limitations from AutoComplete() documentation
This method is now implemented for all major platforms.
2018-01-27 01:20:30 +01:00
VZ
9554f878b2
Add support for using Direct2D in wxStyledTextCtrl
Use D2D if available, notably for better ligatures support.

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

Closes #17804.
2018-01-26 15:09:35 +01:00
Vadim Zeitlin
b1e59a6d60 Add wxFloatingPointValidator::SetFactor()
This allows displaying values in percents (or also currency units and
subunits, for example) without changing the actually stored value.
2018-01-26 14:39:57 +01:00
New Pagodi
b936bfe85e Add Direct2D support to wxSTC 2018-01-25 16:07:54 -06:00
Vadim Zeitlin
ff1fe53d66 Merge branch 'statbox-any-label'
Add support for using any wxWindow (and not just the equivalent of
wxStaticText) as wxStaticBox label.

See https://github.com/wxWidgets/wxWidgets/pull/650
2018-01-23 15:45:46 +01:00
Vadim Zeitlin
678d1142b4 Fix typo in EVT_LIST_BEGIN_LABEL_EDIT in the documentation
"LIST" part was somehow forgotten.

Closes #18051.
2018-01-21 16:23:15 +01:00
Tobias Taschner
d6b88ca399 Add footer text and icon to wxRichMessageDialog
The underlying Windows TaskDialog supports adding an additional footer
to the message dialog. This makes the native functionality available
and implements it in the generic version.

See https://github.com/wxWidgets/wxWidgets/pull/573
2018-01-20 16:53:13 +01:00
Vadim Zeitlin
0cd2e4b6cb Don't document wxEVT_ICONIZE as being for wxMSW and wxGTK only
It's generated by wxOSX too.

Closes #17840.
2018-01-20 13:10:10 +01:00
Vadim Zeitlin
a67f4b8254 Don't pretend static box with enabled label is disabled
Trying to be smart by setting m_isEnabled to false in
wxStaticBox::Enable() without actually disabling the box itself (because
it can't be done if its label window is to remain enabled) didn't really
work. For example, it was impossible to TAB to a checkbox label of the
box when it was disabled, because keyboard navigation (correctly)
doesn't recurse into disabled windows and there could be similar
problems with any other code iterating over windows and skipping over
the disabled ones.

So, finally, simplify things and keep m_isEnabled in sync with the real
box state, even if this, counter-intuitively, means that IsEnabled() on
the box returns true after calling Enable(false) on it.

This also reverts 4ee35cf5ee569b6ee6c7d0d5702484d4d2a20f96 ("Don't
disable wxStaticBox children at wx level when disabling it") as we can't
avoid really disabling the children any more now that their parent is
not disabled: without this, their IsEnabled() would return true, i.e.
they wouldn't be disabled at all, from the program point of view. This
is unfortunate for the reasons that originally motivated that commit,
i.e. if some wxStaticBox child is disabled, disabling and re-enabling
the box will now re-enable this child, even if it shouldn't, but seems
impossible to avoid. The only possible alternative is to modify
IsEnabled() to add some wxStaticBox-specific hook to it, e.g. instead of
calling GetParent()->IsEnabled() there, we could call some now
AreChildrenEnable() method, which would delegate to IsEnabled() by
default but overridden in wxStaticBox. However this seems complicated,
and will add an extra virtual function call to all (frequently
happening) IsEnabled() calls.
2018-01-18 23:28:16 +01:00
Vadim Zeitlin
673ea07284 Document that window must be created in ShowScrollbars()
Calling it before creating the window actually works under MSW, but not
under the other platforms.
2018-01-14 18:31:29 +01:00
Vadim Zeitlin
564df77283 Correct new wxStaticBox::Create() overload documentation
Fix the method name and update its description to mention that it's also
available in wxMSW.
2018-01-13 22:26:07 +01:00
Vadim Zeitlin
e2a31ef3db Merge branch 'grid-clip'
See https://github.com/wxWidgets/wxWidgets/pull/648
2018-01-10 17:19:03 +01:00
Vadim Zeitlin
bfcd51cb6a Make wxValidator::SetWindow() virtual
Allow overriding the method called when the validator is associated with
the window, this can be convenient to perform some initialization on the
validator instance actually used as it can't be done on the initially
created object itself because it will be cloned by SetValidator(),
creating a new instance.

Also change SetWindow() to take wxWindow instead of wxWindowBase, this
still requires the cast in wxWindow::SetValidator(), but it's better to
have it there rather than in wxValidator and use the simpler type in the
public function signature.
2018-01-07 01:25:10 +01:00
Vadim Zeitlin
1d037dd4c9 Don't disable wxStaticBox window label when disabling the box
This behaviour might be not completely intuitive, but it makes it much
simpler to handle the box state using a checkbox as the label control
(which is by far the most common case of using box window labels).

Notice that while we could add a separate EnableWithoutLabel() method to
wxStaticBox to make it possible to set the state of the box directly
relatively easily, it wouldn't help with using wxEVT_UPDATE_UI for
managing the box state indirectly as it relies on calling Enable() only.
And this solution does allow wxEVT_UPDATE_UI handlers for the box itself
to work (provided the handler takes care to check for the event object
being the box itself, as otherwise it would still disable the child
checkbox when its wxEVT_UPDATE_UI bubbles up to the box).
2018-01-07 01:14:17 +01:00
Tobias Taschner
c8b6ca308b Update year in copyright notices to 2018
Use 2018 instead of 2017 (mostly in version info files).

See https://github.com/wxWidgets/wxWidgets/pull/661
2018-01-05 19:51:47 +01:00
Vadim Zeitlin
0a2dfc7959 Document wxClipboard::AddData() as synonym for SetData()
Don't pretend that AddData() allows to add multiple objects to the
clipboard because it doesn't work like this by default under any
platform and only MSW possibly supports this in the non-default build
with wxUSE_OLE==0 -- but mentioning it in the documentation would
arguably be more confusing than helpful.

See #17925.
2018-01-02 17:06:58 +01:00
Frédéric Bron
f4b56f67ec Improve documentation of wxPropertyGrid::MakeColumnEditable()
Explain that column must be different from 1 in the documentation and in
the (already existing) assert checking it.

Closes https://github.com/wxWidgets/wxWidgets/pull/656
2017-12-29 20:06:04 +01:00
Vadim Zeitlin
687192d86a Add support for arbitrary window labels in wxStaticBox to wxMSW
Just reparent the label window and position it accordingly and, also,
avoid painting over it in MSW-specific code.
2017-12-24 22:38:10 +01:00
Vadim Zeitlin
3ff9846a22 Document alignment styles in wxStaticBox
Mention that they work in wxGTK, even if it seems to be the only
platform supporting them currently.
2017-12-24 22:38:10 +01:00
Vadim Zeitlin
7c849276f8 Add support for using arbitrary windows as wxStaticBox labels
This commit implements the new feature in wxGTK and updates the sample
and the documentation.
2017-12-24 22:38:10 +01:00
John Roberts
ba719c576e Document the new wxDCClipper behaviour after last commit change
wxDCClipper does restore the (bounding box of the) previously active
clipping region now.

See #13834.
2017-12-24 15:46:57 +01:00
Vadim Zeitlin
1b6ec5c538 Merge branch 'linux-spec-files'
wxFile and wxTextFile for working with special/non-seekable files.
2017-12-16 15:26:35 +01:00
Vadim Zeitlin
a03ece4880 Remove st_blocks hack from wxFile::Length() under Linux
This reverts commit 41f6f17d01 ("return 0
(meaning the file is not seekable, as the docs now explain) instead of
4KB for the files in sysfs under Linux") as it seems to be wrong to
return a value different from what "ls -l" or "stat" return here and the
original problem was solved in a better way in the previous commit.

See #9965.

Closes #17818.
2017-12-15 18:46:22 +01:00
Vadim Zeitlin
a30bee473e Make wxFile::ReadAll() work for unseekable files too
Calling this function with an unseekable file, such as any file under
/sys on Linux systems, would previously just hang as the loop condition
was never satisfied when length was -1.

Fix this by checking for this case and using a different approach by
extending the buffer we read the data into as we go instead of
preallocating it all at once.

See #9965.
2017-12-15 18:43:26 +01:00
Vadim Zeitlin
4e82f60b8a Add documentation for wxPersistentDataViewCtrl
Documentation is trivial, but better than nothing.
2017-12-15 14:10:16 +01:00
Vadim Zeitlin
e5b12b5bc8 Merge branch 'dvc-persist' from iwbnwif
See https://github.com/wxWidgets/wxWidgets/pull/541
2017-12-15 14:10:01 +01:00
Iwbnwif Yiw
c6de521959 Remove wxTreeListCtrl special first column resizing logic
Trying to give all the remaining space after allocating enough to the
other columns to the first one doesn't work well with wxDataViewCtrl,
which tries to do the same thing, but with the last column, so we
actually get some strange mix of behaviours, with both the first and
last columns changing size after the control itself is resized.

Stop fighting with wxDataViewCtrl and just let it to its own thing.

Closes #17476.
2017-12-10 23:21:24 +01:00
pavelxdd
504c22a512 Fix wxURLDataObject comment and documentation for wxGTK
Fix a copy-and-pasto in the header and also mention that wxURLDataObject
derives from wxDataObjectComposite, and not wxTextDataObject, in wxGTK
too.

Also add a note about the exact base class being an implementation
detail.

Closes https://github.com/wxWidgets/wxWidgets/pull/624
2017-12-08 13:14:19 +01:00
Vadim Zeitlin
3e0adbf541 Merge branch 'gesture-events'
Integrate GSoC 2017 work by Prashant Kumar implementing support for
gesture events.

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

Closes https://github.com/wxWidgets/wxWidgets/pull/565
2017-12-02 18:46:53 +01:00
Vadim Zeitlin
d49784b0a2 Disable wxDateTime tests failing due to TZ offset changes
wxDateTime timezone-related methods always use the current timezone
offset, while other methods, using CRT, use correct value for the given
date, which may be different.

This discrepancy accounted for test failures in Europe/Minsk time zone
as Belarus has switched from UTC+2 to UTC+3 since 1999 date used in the
test.

It is impossible to really fix the problem easily, so just skip the test
in this case and also mention this bug in the documentation.

See #15370.
2017-11-30 17:44:41 +01:00
Vadim Zeitlin
c7c30504c8 Do nothing when converting wxDateTime to/from local time zone
In particular, do not (unexpectedly) adjust time by the DST.

Closes #16585.

See #10445.
2017-11-29 23:18:57 +01:00
Vadim Zeitlin
543c522cb8 Explicitly disambiguate local time zone from UTC
Don't rely on time zone offset to check whether it is local as this
doesn't, and can't, work for the local time zone in Great Britain which
uses the same offset as UTC, but does use DST, unlike the latter.

Add a unit test (albeit disabled by default) checking that the code that
previously didn't work correctly in BST does work now (run the tests
using "TZ=Europe/London ./test wxDateTime-BST-bugs" under Unix to test).

Closes #14317, #17220.

See #10445.
2017-11-29 23:02:22 +01:00
Vadim Zeitlin
310c45a5e2 Merge branch 'deprecated' of https://github.com/MaartenBent/wxWidgets
Fixes for deprecation and other warnings in samples and demos.

See https://github.com/wxWidgets/wxWidgets/pull/617
2017-11-26 17:30:49 +01:00
Paul Cornett
23e3323655 Add non-const overload for GetToolByPos()
See #16763
2017-11-25 10:57:23 -08:00
Maarten Bent
2156d29801 Add FindOrCreateFont overload accepting wxFontInfo 2017-11-25 17:52:03 +01:00
Vadim Zeitlin
838a687d94 Document wxComboBox::SetValue() better in wxCB_READONLY case
Make it clear that the control doesn't send wxEVT_TEXT event in this
case.
2017-11-25 10:47:50 +01:00
Vadim Zeitlin
19c4172671 Correct example of using wxDataObjectComposite in the docs
Don't call base class pure virtual method, but do call GetData() before
using the data object. Also fix a typo in a variable name.
2017-11-24 23:10:47 +01:00
Vadim Zeitlin
778340a286 Merge branch 'private-fonts'
Add support for using application-private fonts.

Closes #13568.

Closes https://github.com/wxWidgets/wxWidgets/pull/591
2017-11-24 22:58:09 +01:00