Commit Graph

1783 Commits

Author SHA1 Message Date
Vadim Zeitlin
5da0565d52 Mention David Hart bug fixes in wxFileSystemWatcher.
See #14488, #14490, #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:10:34 +00:00
Vadim Zeitlin
c063adebba Add support for symlinks to wxFileName.
Allow to work with the symlinks themselves and not the file they reference by
calling the new wxFileName::DontFollowLink().

Update Unix wxDir implementation to not treat symlinks to directories as
directories, this ensures that we don't recurse into the directories outside
of the original parent accidentally.

Closes #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:09:01 +00:00
Vadim Zeitlin
1dc17bcafb Make TAB behaviour in wxGrid more configurable.
Allow making TAB/Shift-TAB wrap to the next/previous row or going to the
next/previous control when the cursor is at the end/beginning of the current
row easily.

Also add wxEVT_GRID_TABBING event to allow customizing TAB behaviour even
further.

Update the sample to show the different possible standard behaviours and a
stupid example of a custom one (it would be probably more useful to implement
something a tad more realistic, e.g. tabbing to the next non-empty cell).

Closes #14711.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:55:18 +00:00
Vadim Zeitlin
403750325d Display system-provided drag images during drag-and-drop in wxMSW.
This is especially useful when dragging files from Explorer as it provides
big, informative drag images for them that can be easily displayed using
Windows shell support for them.

See #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:53:46 +00:00
Vadim Zeitlin
8d489a5e4b Fix printing in landscape mode in wxGTK.
Only apply Cairo transforms in StartPage(), doing it earlier interferes with
the code doing the coordinate system rotation inside GTK+ itself when a
non-portrait printing mode is used.

Closes #14732.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-09 21:01:29 +00:00
Vadim Zeitlin
1bcef6701b Ensure that key events are sent to focused window first in wxGTK.
Start processing key events from the currently focused window, this ensures
that its key event handlers are tried before the top level window
accelerators.

This is consistent with wxMSW and allows a window to locally override the
global accelerators which really makes sense.

Closes #14553.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:50 +00:00
Vadim Zeitlin
d34d31f6d6 Implement incremental search in wxGenericListCtrl.
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.

Update the sample to test it, the key event handling in it had to be modified
to allow it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:27 +00:00
Vadim Zeitlin
27bc919446 Add a possibility to beep on no match to wxGenericTreeCtrl.
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:02 +00:00
Vadim Zeitlin
0d7acfb995 Support some CSS styles for the links in wxHTML too.
Refactor limited CSS styles support for <span> tag to reuse it for <a> tag as
well.

Closes #14599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:38:56 +00:00
Vadim Zeitlin
2119b213e3 Add support for wxALWAYS_SHOW_SB style to wxScrolled<>.
Simply call ShowScrollbars(wxSHOW_SB_ALWAYS) if this style is specified.

Closes #13616.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 23:24:28 +00:00
Vadim Zeitlin
16630eb7e3 Add wxDateSpan::GetTotalMonths() method.
This is similar to the existing GetTotalDays() and counts both months and
years.

See #14704.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 22:48:07 +00:00
Vadim Zeitlin
77dd7daad2 Add wxDateTime::DiffAsDateSpan().
This method returns the difference between the dates as wxDateSpan, unlike the
existing Subtract() and overloaded operator-() that return wxTimeSpan.

Closes #14704.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-01 09:55:05 +00:00
Vadim Zeitlin
614108e211 Added wxFile::ReadAll() for consistency with wxFFile::ReadAll().
Make it possible to use wxFFile and wxFile interchangeably for simply reading
the entire contents of the file as a string.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:28:08 +00:00
Vadim Zeitlin
294a09aa8c Add per-direction wxSocket wait flags and byte counters.
Allow to specify whether the socket should block until all the data is read or
written or, on the contrary, avoid blocking only when reading or writing
instead of always using the same behaviour in both directions.

Also add separate counters for the bytes read/written instead of using the
same one for both.

These changes make it possible to use the same socket for reading/writing in
different threads.

Closes #14506.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:21:44 +00:00
Vadim Zeitlin
f5413b878c Add support for background-color style to span element in wxHTML.
Add code for setting/restoring background mode and use it to implement support
for changing the text background colour.

Closes #14443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:20:58 +00:00
Vadim Zeitlin
45df4bb6c2 Add "inherit" to <font> XRC tag.
This allows to construct a font based on the parent window font instead of
either fully specifying all font parameters or basing it on a standard font.

Closes #14632.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:48:34 +00:00
Vadim Zeitlin
226fa6db3d Improve SAFEARRAY support in wxMSW OLE Automation code.
Add a new wxSafeArray<> class wrapping SAFEARRAY.

Also add support for converting VARIANTs containing other, previously
unsupported, standard types.

Closes #14637.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:49:50 +00:00
Vadim Zeitlin
3e8cba9f8e Credit "sodev" with correct full name.
Amend the change log entry of r71701.

See #14380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-22 16:16:07 +00:00
Vadim Zeitlin
652aa9360f Fix and enhance support for client data in wxRibbonButtonBar.
Add the possibility to retrieve the client data associated with a button and
not only set it (which wasn't very useful on its own).

Also allow having both typed (owned) and untyped (not owned) client data, as
in the other wxWidgets controls.

To avoid confusion between two different kinds of data, remove "client_data"
argument from the functions adding buttons and provide separate methods with
distinct names for setting and getting client data.

Closes #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 20:02:25 +00:00
Vadim Zeitlin
95725e35d8 Add wxStyledTextCtrl::AnnotationClearLine().
Simply set NULL annotation text for the given line.

Closes #12960.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-20 10:20:42 +00:00
Vadim Zeitlin
fcde720806 Show tooltips for the too long items in generic wxTreeCtrl.
Show the full item text in a tooltip if the entire text can't be shown on
screen.

Closes #14667.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-18 22:45:15 +00:00
Vadim Zeitlin
66815259f5 Fix text origin and bounding box computations in wxSVGFileDC.
Text origin was calculated incorrectly for the rotated text and the bounding
box was wrong even in non-rotated case.

Fix this by using correct definition of the text anchor according to the SVG
specification and add a test to the svg sample demonstrating this.

Closes #14489.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:19:35 +00:00
Vadim Zeitlin
3049690536 Preserve size of wxGrid rows/columns when hiding and showing them back.
Previously, if a wxGrid row or column was hidden by setting its size to 0, its
original size was lost. Change this so that it's preserved now and can be
restored by setting the size to the special -1 value later.

Closes #14133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:18:23 +00:00
Vadim Zeitlin
c3f641cb5e Add wxBITMAP_PNG() macro similar to wxBITMAP() but for PNG images.
Just as wxBITMAP() provides a portable way of loading bitmaps from either
Windows BMP resources or embedded XPM data depending on the platform,
wxBITMAP_PNG() hides the difference between loading bitmaps from PNG resources
under Windows and embedded PNG data elsewhere.

Also add wxBITMAP_PNG_FROM_DATA() macro which always loads PNG data from
memory: it's needed anyhow as part of wxBITMAP_PNG() implementation and some
people may prefer to always use it under all platforms.

Finally modify the image sample to demonstrate loading PNG images from both
resources and memory. This involved creation of a new Windows .rc file for it
and copying its data files to Resources bundle directory under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:25 +00:00
Vadim Zeitlin
be7a086c0c Extract "Close" button creation from wxInfoBarGeneric into new function.
Such buttons may be needed in other places and it's not obvious to create
them, so add a new public wxBitmapButton::NewCloseButton() method to allow
creating them easily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:14:14 +00:00
Vadim Zeitlin
5ddb3b8c53 Fix setting colours for the edit control part of wxComboBox.
Recognize this control as part of wxComboBox and so handle WM_CTLCOLOR for it.

To do this, override ContainsHWND() in wxComboBox and use it, on the parent
window, in wxControl::DoMSWControlColor(), if we fail to find the window
directly.

Closes #811.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:11:56 +00:00
Steve Lamerton
0bfd90b3e7 Add generic wxFileSystem support to wxWebView using wxWebViewFSHandler.
Closes #14623.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-11 09:26:58 +00:00
Vadim Zeitlin
9e565667d0 Add wxSpinCtrl::SetBase() to allow entering hexadecimal numbers.
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.

Add controls allowing to test this feature to the widgets sample.

Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:38 +00:00
Vadim Zeitlin
d15e514e84 Use wxSOCKET_WAITALL in wxHTTP to ensure that all data is sent.
POST-ing sufficiently big amounts of data in wxHTTP didn't work because it
couldn't be sent all at once to the server. Use wxSOCKET_WAITALL to ensure
that we do send all of the data.

Closes #14598.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:22:40 +00:00
Vadim Zeitlin
cc699de848 Added wxSimplebook class: a wxBookCtrl without controller.
This new control allows the program to show one of the several pages without
allowing the user to change them (or even see that there are several of them)
himself.

This class is fully inline, so it doesn't add anything to the library and
hence doesn't need neither wxUSE_SIMPLEBOOK nor the corresponding configure
option.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:54 +00:00
Steve Lamerton
66ac040060 Add support for searching and highlighting a wxWebView.
Currently supports WebView on GTK and IE. Closes #14045.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 17:13:13 +00:00
Vadim Zeitlin
146b0f259e Added Nepali translation.
Thanks to Him Prasad Gautam and Mesar Hameed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-22 21:22:31 +00:00
Vadim Zeitlin
70f86dedfd Add page highlighting to wxRibbonBar.
Allow visually highlighting a page to make it more noticeable to the user.

Closes #14527.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:36 +00:00
Vadim Zeitlin
f2f0e4bea1 Fix AUI appearance when a maximized pane becomes floating.
The other panes were not previously restored, resulting in bad appearance and
behaviour. Do restore them now before making the previous maximized pane
floating.

Closes #14460.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:31 +00:00
Vadim Zeitlin
93b87dd910 Respect item max sizes in wxBoxSizer.
Don't give more space than the max size, if set, to wxBoxSizer elements.

Closes #11497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:27 +00:00
Vadim Zeitlin
532324df23 Don't generate events from wxSpinCtrl::SetRange() in wxMSW.
Other ports don't send wxEVT_COMMAND_SPINCTRL_UPDATED from SetRange() even if
the value changed because it was adjusted to fit into the new range and this
makes sense as this change is not due to a user action, so don't send this
event under wxMSW neither.

Also add a unit test checking for this behaviour.

Closes #14583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:10 +00:00
Vadim Zeitlin
7a7fa93b0d A better fix for wxHash{Map,Set} with g++ 4.7.
This reverts r70556, i.e. removes the scope operators added by it to all
WX_DECLARE_HASH_{MAP,SET} macros, and implements a workaround for the problem
due to the use of empty base class optimization in g++ 4.7 standard library
implementations inside the macros themselves by prepending the hasher and
comparator classes with explicit "struct".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-06 11:06:45 +00:00
Vadim Zeitlin
ef40bc3dae Fix uniconizing hidden top level windows in wxMSW.
wxTLW wasn't properly restored if Iconize(false) was called while the window
was hidden.

Fix this by adding yet another special case to wxTopLevelWindowMSW::Show().
This makes it even less comprehensible than before but there doesn't seem to
be any obvious way to simplify this code without totally changing it.

Closes #14539.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:26 +00:00
Vadim Zeitlin
f239af65af Allow setting LCID used by wxAutomationObject.
Default user-locale-dependent LCID may be inappropriate for some situations,
notably Microsoft Excel uses localized formula names for non-English LCIDs.
So add a way to change the LCID to use at wxAutomationObject level while
preserving the old behaviour by default.

Closes #14540.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:55 +00:00
Vadim Zeitlin
7c70331e28 Add expand/collapse button to wxRibbonBar.
This allows the user to toggle the ribbon bar visibility.

Closes #14530.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 17:53:36 +00:00
Vadim Zeitlin
1043456035 Generate clipboard events for wxComboBox in wxGTK too.
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.

Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.

Closes #14520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:15 +00:00
Vadim Zeitlin
afbf46a317 Implement wxNotificationMessage using libnotify in wxGTK.
Use libnotify -- if detected by configure -- to provide native notifications
in wxGTK. Our API maps to libnotify one in rather straightforward way, we
might consider extending it to cover more of libnotify functionality
(categories, user-defined icons and, especially, actions) later.

Also update the dialogs sample to show another kind of notification and the
documentation to clarify the behaviour of various methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 15:36:54 +00:00
Vadim Zeitlin
6619c4af1b Add wxDir::Close().
This is trivial to have and can sometimes be useful and also is symmetric to
Open().

Closes #14493.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:30 +00:00
Vadim Zeitlin
62490e9ea7 Use text/uri-list instead of x-moz-url in wxGTK wxURLDataObject.
The standard exchange format for URLs is text/uri-list and not the deprecated
and Firefox-specific x-moz-url, support for which was moreover implemented
incorrectly anyhow.

Also add an example of copying URLs to the dnd sample.

See https://developer.mozilla.org/En/DragDrop/Recommended_Drag_Types for more
information.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-20 11:55:00 +00:00
Vadim Zeitlin
6c32fb8f9d Add support for CURRENCY and SCODE to MSW OLE helpers.
This allows to call OLE Automation methods taking parameters or returning
values of these types.

Closes #14225.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-14 20:10:58 +00:00
Vadim Zeitlin
a73251a80d Allow building wxGTK3 with Broadway backend.
Use GDK_WINDOWING_BROADWAY to fix compilation with it.

Closes #14469.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 18:22:22 +00:00
Vadim Zeitlin
5c14ec2640 Add possibility to hide and show again wxRibbonBar pages.
Added wxRibbonBar::ShowPage(), HidePage() and IsPageShown() methods and show
them in the sample.

Also add GetPageNumber() helper.

Closes #14471.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 11:46:43 +00:00
Vadim Zeitlin
cc030eab72 Fix item data access in wxDataViewListCtrl.
Map items to rows correctly, just using wxPtrToUInt()-1 is not the right thing
to do if any items were deleted or changed.

Closes #14479.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-12 18:34:18 +00:00
Vadim Zeitlin
dfb636ce8b Updated READMEs &c for 2.9.4 release.
Updated the text of the announcement posted to wx-announce too and mention it
in the release check list.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-09 14:15:37 +00:00
Vadim Zeitlin
235a997f9a Use "_x64" instead of "amd64" for x64 MSW makefile builds.
Still accept "amd64" as a valid TARGET_CPU value but also accept, and
encourage people to use, "x64".

Add a new section about the build system changes to the change log and added a
mini-TOC to it to make navigating it a bit easier and show what changes are
there at a glance.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-07 13:27:59 +00:00