Commit Graph

3259 Commits

Author SHA1 Message Date
Vadim Zeitlin
1ebc28787c Merge branch 'zip64-fix'
Notably fix ZIP64 creation with individual files larger than 4GB.

See https://github.com/wxWidgets/wxWidgets/pull/730
2018-02-16 16:03:32 +01:00
Vadim Zeitlin
a3673be155 Clarify and improve wording of ZIP64 documentation
Try to make it more clear when SetFormat(wxZIP_FORMAT_ZIP64) needs to be
called and add some missing words.
2018-02-16 16:02:42 +01:00
Tobias Taschner
29f5eeb69d
Fix ZIP64 creation with individual files larger 4GB
If single files larger than 4GB where added the recorded file sizes
in the local file header where not updated correctly. Additionally
recorded file sizes in the central directory where in the wrong order
making it impossible to extract.

To enable adding files with unknown size which might be larger than 4GB
the new method wxZipOutputStream::SetFormat() is added.

Additionally a check has been added in case a file larger 4GB has been
written without ZIP64 info.
2018-02-15 20:01:13 +01:00
Robin Dunn
bd1e13df42 Minor cleanup and changes from Code Review comments. 2018-02-10 15:13:01 -08:00
Robin Dunn
5e01658cdc Lots more fixes for incorrect or missing interfaces items. 2018-02-10 13:06:19 -08:00
Robin Dunn
a6c864ae78 Add a missing constant and enum 2018-02-10 13:00:19 -08:00
Robin Dunn
ce9dc25b5e SetSelection returns an int, not a size_t 2018-02-10 13:00:19 -08:00
Robin Dunn
c6a750c7b8 Add missing wxImageHandler::SetType 2018-02-10 13:00:19 -08:00
Vadim Zeitlin
7e3d28e79f Rename wxDataViewEvent::SetEditCanceled() and remove its argument
This method should be only used when the edit is really cancelled, so it
doesn't need to take a boolean argument.

It should also use the same spelling as IsEditCancelled() (and for
consistency with the rest of wxWidgets API which uses British English).

Also remove this method from the documentation, it is not part of the
public API.
2018-02-04 22:36:14 +01:00
Vadim Zeitlin
48fb2b42b1 Send wxEVT_DATAVIEW_COLUMN_REORDERED in generic wxDataViewCtrl
Simply translate wxEVT_HEADER_END_REORDER into this event, which was
previously only sent by the macOS version.

GtkTreeView doesn't seem to support column drag-and-drop at all, so this
event is still never generated by wxGTK.

Closes #14297.
2018-02-04 15:45:23 +01:00
Vadim Zeitlin
f33f1f2078 Fix a typo in EVT_DATAVIEW_COLUMN_REORDERED documentation
See #14297.
2018-02-04 15:32:01 +01:00
Vadim Zeitlin
af78ad3b49 Add wxDataViewCtrlBase::SetAlternateRowColour()
Previously this method was only available in the generic wxDataViewCtrl,
move it to the base class to make it possible calling it in portable
code and document it.

Closes #14617.
2018-02-04 15:27:02 +01:00
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