Commit Graph

58349 Commits

Author SHA1 Message Date
Vadim Zeitlin
d33d240e47 Include wx/variant.h from wx/msw/ole/oleutils.h.
This ensures that this header is self-contained and can be included without
including wx/variant.h first.

Closes #16522.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-03 11:21:31 +00:00
Vadim Zeitlin
41a9ca5f27 Work around buggy printer drivers not returning correct DEVMODE size.
Apparently at least one printer driver doesn't report the memory needed by its
own DEVMODE struct correctly, resulting in a crash due to a buffer overflow
when printing using it.

Work around this by allocating slightly more memory than what we really need.

Closes #16274.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-03 10:45:38 +00:00
Václav Slavík
ebba02fdb5 Don't prevent app exit when only preferences window exists.
Don't prevent termination of the app if all windows are closed, except
for the preferences one (which may very well be hidden at the moment).
This only affects platforms where the preferences are modeless (GTK+, OS
X) and where the preferences window, once created, continues to exist,
but is hidden.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-03 06:56:16 +00:00
Vadim Zeitlin
0e22e89086 Fix creation of wxBitmap from monochrome wxIcon or wxCursor in wxMSW.
Don't suppose that we always have hbmColor because this is not true for
monochrome icons/cursors. Create our own bitmap in this case.

Closes #16512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-30 15:13:59 +00:00
Vadim Zeitlin
04519a46d7 Don't change a shortcut file name when changing its path.
wxFileName::MakeRelativeTo() is only supposed to change the path of the file,
not its name, but it was doing the latter for the shortcuts as it implicitly
resolved them to the name of their target.

Fix this by ensuring we do not use wxPATH_NORM_SHORTCUT in MakeRelativeTo().

Closes #16239.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:45 +00:00
Vadim Zeitlin
2090e676f9 Ensure OLE is initialized in wxFileName::GetShortcutTarget().
If it isn't, the function doesn't risk to work. This is especially pernicious
because OLE is initialized on startup in GUI applications, but not in the
console ones only using wxBase, so this function can, completely unexpectedly,
give different results in them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:42 +00:00
Vadim Zeitlin
1368d4c0c5 Add small wxOleInitializer RAII helper.
Wrap wxOleInitialize()/wxOleUninitialize() in a helper class ensuring that we
never forget to call the latter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:39 +00:00
Vadim Zeitlin
5e565d05f8 Fix typo in the last changelog entry.
s/reated/created/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:32 +00:00
Vadim Zeitlin
8e95772b1a Don't leave wxHtmlWinParser with a dangling wxDC pointer.
Call SetDC(NULL) to prevent wxHtmlWinParser from using a pointer to the
already destroyed wxDC object.

See #16501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 11:55:56 +00:00
Vadim Zeitlin
eac01d3d88 No changes, just avoid unnecessary heap allocation in wxHtmlWindow.
Create the temporary wxClientDC on the stack, not the heap, there is no need
for the latter.

See #16501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 11:55:51 +00:00
Vadim Zeitlin
4ba9657952 Allow wxCmdLineParser::Parse() to be called more than once.
Clear the previously collected parameters in the beginning to avoid
accumulating the results from several command lines.

Closes #16503.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 11:42:13 +00:00
Vadim Zeitlin
05a1abfb1f Fix wxFont construction from default wxFontInfo in wxMSW.
Don't use -1 as the real point size.

Also update the font sample to allow testing such font.

Closes #16468.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-28 12:54:52 +00:00
Tim Kosse
7a71428478 Revision 59305 broke click count adjustment with the result that a right-click after a left-click is reported as double-click.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-28 12:29:01 +00:00
Vadim Zeitlin
202b377dbc Fix order of radial gradient stops in wxMSW.
Ensure that the order of stops is consistent with the documentation and other
platforms behaviour, i.e. they are counted from inside to outside of the
circle and not vice versa, which happens to be the GDI+ convention.

Closes #16443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-25 17:50:58 +00:00
Vadim Zeitlin
5dbe88ae4c Avoid unnecessary assignment in wxOSX build.
Don't assign to the variable only to overwrite it with a new value.

Closes #16436.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 13:30:05 +00:00
Vadim Zeitlin
0484aa12e2 Avoid warning about unused variable in wxiOS build.
Define variable only used if wxOSX_USE_COCOA_OR_CARBON inside the check for it.

Closes #16435.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 13:30:00 +00:00
Vadim Zeitlin
0c4dba6a60 Remove unused variable in wxDCImpl::CalculateEllipticPoints().
Closes #16433.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 13:29:54 +00:00
Vadim Zeitlin
d3d1c37bf5 Fix ribbon bar tab width computation if the first tab is hidden.
The logic for the first tab should really deal with the first visible tab as
the actual first tab might be hidden and in this case we shouldn't account for
it at all.

Closes #16432.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-21 14:13:07 +00:00
Paul Cornett
aac2fa1f5b fix use of stack variable after it has gone out of scope, closes #16423
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-18 17:02:53 +00:00
Vadim Zeitlin
7a9065190f Show new style Windows directory selector even for non-existent paths.
Passing an invalid initial directory to wxDirDialog resulted in using the old
style Windows directory selector dialog instead of the new style (file dialog
like) one, which was unintentional, as incorrect initial directory shouldn't
prevent the dialog from being shown.

Fix this by handling ERROR_FILE_NOT_FOUND error specifically and still showing
the new dialog, just without the (non existent) initial directory value, in
this case.

Closes #16430.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-18 13:09:08 +00:00
Paul Cornett
b6f7b079c6 Fix handling of identical consecutive key events
Events generated programmatically may have the same timestamp as the previous
event, which caused them to be ignored on the assumption that they were the same
event being sent to a parent window. Fix this by detecting when a new event could
be generated by the event loop.
Closes #15802


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-15 17:09:39 +00:00
Vadim Zeitlin
08547057c5 Add support for paragraph spacing attribute to wxTextCtrl in wxMSW.
Use PFM_SPACEAFTER/PFM_SPACEBEFORE to implement support for them.

Closes #16417.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-14 12:17:08 +00:00
Julian Smart
85dc641c8e Fix deletion of cells in defragment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-12 08:53:05 +00:00
Vadim Zeitlin
6cef37499d Return correct string from wxEVT_TEXT wxComboBox events.
wxCommandEvent::GetString() could return empty string for the
programmatically-generated wxEVT_TEXT events from a wxComboBox.

Fix this by extending the on-demand string retrieval in wxCommandEvent to
wxComboBox as well (it was done only for wxTextCtrl).

Closes #3901.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-11 11:52:28 +00:00
Vadim Zeitlin
8012c1b8b3 Correct instructions for building wx applications with MSVC.
Use the correct $WXWIN/include/msvc path instead of the non-existing
$WXWIN/msvc.

Also mention that $WXWIN should actually be $(WXWIN) for MSVC.

Closes #16410.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-10 16:11:34 +00:00
Vadim Zeitlin
6f64d8e394 Use NMTVDISPINFO instead of TV_DISPINFO in wxMSW code.
The latest w32api 4.0.3, used by MinGW project, still didn't manage to apply a
one line fix to define TV_DISPINFO correctly, so tweak our sources to avoid
using it.

See #15537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-10 16:11:30 +00:00
Vadim Zeitlin
8d8c902879 Remove manual mirroring in RTL case from wxGrid code.
This is not necessary as wxDC already inherits RTL from the window itself and,
in fact, breaks the display when using RTL.

Closes #16250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 17:56:29 +00:00
Vadim Zeitlin
0e9005e166 Fix wxDC::DrawRectangle() when using RTL in wxMSW.
Extend the correct edge of the rectangle (always the physical right, not the
logical right) to fix off by one errors in RTL mode, affecting notably wxGrid.

See #16250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 14:07:35 +00:00
Paul Cornett
660c565201 fix running on GTK < 2.10 when built with later, broken in r72935
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 20:37:24 +00:00
Vadim Zeitlin
d4edc41f6e Fix drawing on wxDC when using right-to-left layout in wxMSW.
Avoid integer overflow when setting wxDC scale. This affected (i.e. broke)
drawing in RTL but probably not only that.

Closes #16254.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-07 21:07:18 +00:00
Vadim Zeitlin
66d9b9e1fe Don't document wxFileType::GetIcon() as unimplemented under OS X.
It is implemented and supposed to work.

See #4562.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 22:59:45 +00:00
Tim Kosse
4c16a3b3e2 Call wxWindow::Navigate when handling the tab key in wxAuiTabCtrl. This fixes tabbing on wxGTK where it was not possible to tab out of the wxAuiNotebook anymore.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 14:53:00 +00:00
Vadim Zeitlin
03fb8ebf7b Add XRC handler for wxSimplebook.
Similar to wxNotebook but even simpler as wxSimplebook doesn't use images.

Also add wxSimplebook::Create() as the version inherited from wxBookCtrlBase
didn't _quite_ work: we need to add wxBK_TOP style to prevent asserts due to
unknown alignment in the base class when creating wxSimplebook.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-05 22:00:57 +00:00
Vadim Zeitlin
930b378d12 No changes, just order sections in version-script.in correctly.
Put them in reverse chronological order, with the older (.0) at the bottom and
the newest on the top.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-05 22:00:46 +00:00
Vadim Zeitlin
fee4387c69 Take into account wxAnimationCtrl "animation" property in wxrc.
The files used as the values of this property need to be included in the
generated file too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-04 18:56:59 +00:00
Vadim Zeitlin
9958ba94b8 Add a more complete example of different controls variants in XRC.
Add a dialog showing all the existing variants of a few common controls to
allow seeing at a glance how do they look.

See #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:55:52 +00:00
Vadim Zeitlin
f36b3c9d62 Show "hint" wxTextCtrl attribute in the xrc sample.
Rearrange the contents of the wxTextCtrl page in two columns to make space for
the new control.

This should have been part of r76628 but was forgotten.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:55:48 +00:00
Vadim Zeitlin
7391ec7a1b Really add "hint" property to wxTextCtrl XRC handler schema description.
This was supposed to be done in r76628 but the property was mistakenly added
to wxRichTextCtrl instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:55:45 +00:00
Václav Slavík
96d714660a Add window variant support to XRC.
Fixes #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:10:49 +00:00
Vadim Zeitlin
dbf432f126 Fix wxListCtrl sort callback signature in the test under Win64.
Use wxIntPtr instead of long which is not big enough to hold a pointer in
Win64 builds.

Closes #4309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 15:50:43 +00:00
Vadim Zeitlin
1c922274d1 Fix window position calculation in wxMSW when using RTL.
Just use the native ::MapWindowPoints() to do the coordinate transformation
instead of doing it ourselves: we did it wrongly by inheriting the layout
direction from wxTheApp instead of from the parent window, so fix this in the
best possible way by not doing it at all and just relying on Windows to do it
for us.

In particular, this corrects the display of wxStatusBar in RTL frames.

Closes #15031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:15 +00:00
Vadim Zeitlin
5528d864b0 Refresh the window when its layout direction changes in wxMSW.
Rearrange the window children and/or redraw its contents when its layout
direction changes.

See #15031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:11 +00:00
Vadim Zeitlin
78d8dde178 Don't activate hidden buttons when Enter is pressed in wxMSW.
The keyboard handling code could decide to activate a button which wasn't
currently visible at all, e.g. because it was on a non-current, and hence
hidden, page of a wxBookCtrl. This didn't make any sense, so check for the
button visibility before activating it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:07 +00:00
Vadim Zeitlin
014e8d6215 Correct wxGrid column labels when using SetTable() with native header.
Ensure that the table pointer inside wxGrid is updated before initializing the
native column header as it uses wxGrid::GetColLabelValue() which doesn't work
correctly without a valid table pointer.

Closes #16399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-02 12:19:18 +00:00
Václav Slavík
1e0b7e2784 Only filter requested events in wxEventBlocker.
Contrary to the documentation, wxEventBlocker always behaved as if the
event type to block was wxEVT_ANY: while it returned false for events
not on the blacklist, it never actually called the existing event
handler as it was meant to.

Fix by calling wxEvtHandler::ProcessEvent() in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-01 18:04:08 +00:00
Vadim Zeitlin
ac770a6e8d Fix static initialization order problem in wxStopWatch under MSW.
Don't rely on the static global gs_perfCounter being already initialized when
wxStopWatch::DoStart() is called, this may not be the case if wxStopWatch
variable is global.

Work around this by wrapping the variable inside a function to ensure that it
is initialized before being used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-27 23:04:35 +00:00
Vadim Zeitlin
d1471a66b3 Add support for "%V" and "%G" to wxDateTime::Format().
This is useful for creating ISO 8601 week number based stamps.

Closes #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-27 23:04:30 +00:00
Vadim Zeitlin
0cfd00335d No changes, just update the file name in the header.
Update the name in the header to match the actual file name.

See #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 10:50:29 +00:00
Vadim Zeitlin
c93368ea3c Implement bounding box computations for wxGDDC.
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.

Closes #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 01:41:30 +00:00
Vadim Zeitlin
fcacaaf237 Write delay between frames correctly when saving GIF files.
Deal with delays greater than ~2.5s correctly, their most significant byte was
previously lost resulting in 0 delay being written to the file.

Closes #16392.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-25 17:34:12 +00:00