Commit Graph

55672 Commits

Author SHA1 Message Date
Robin Dunn
1ebe4ca35e Add documentation for wxPrintAbortDialog since it is now documented as a return value type.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 16:47:48 +00:00
Václav Slavík
ef344c36c8 Compilation fix for r72307.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 16:16:42 +00:00
Václav Slavík
e7aa9bb7c0 Show progress of printing in wxMSW.
Add the number of the page being printed as well as the total to the
wxMSW printing progress window. Improved the layout and fixed some i18n
issues in the process.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:15 +00:00
Václav Slavík
84cabd361b Fix crash when canceling printing in wxMSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:11 +00:00
Václav Slavík
446659cac6 Return wxPrintAbortDialog from CreateAbortWindow().
Instead of returning a generic wxWindow*, return the type actually used.
It was part of the public header already, but not used in any publicly
visible way.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:08 +00:00
Václav Slavík
1a19b3210d Create wxPrintAbortDialog more sensibly.
Instead of having an empty constructor and filling the dialog with
controls from outside, do the work in the constructor.

This changes the meaning of ctor's 'title' argument, but this class'
terrible API made it unusable for direct use anyway, so it doesn't seem
to be harmful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-09 15:52:04 +00:00
Paul Cornett
6c0613fd6a silence GCC warning suggesting parentheses
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-07 16:43:56 +00:00
Václav Slavík
46aa0c9e7b Make the modal print preview window behave like a modal dialog.
It's unexpected for a modal dialog window to show up in the taskbar as
app's another window. It also shouldn't be possible to minimize a modal
window, because it's very confusing when a window is unresponsive
without a clear reason, because the modal child is hidden in the
taskbar.

Set wxFRAME_NO_TASKBAR and remove wxMINIMIZE_BOX to fix this. Do it only
for wxPreviewFrame_AppModal.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-07 10:12:09 +00:00
Václav Slavík
b9171a1730 Don't crash in wxBitmap::AllocExclusive().
Just use the usual pattern, instead of abusing existing m_refData. In
addition to being cleaner and easier to follow, it also has the benefit
of not crashing when cloning ref data into an UnRef()ed bitmap from
AllocExclusive().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-06 12:28:58 +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
03a1d86352 Fix wxAutomationObject compilation in PCH-less build.
Don't use LCID in a public header, windows.h might not be included. Use WXLCID
stand-in instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:31 +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
45a04dd31a Fix the checkbox cell size in generic wxDataViewToggleRenderer.
r62940 fixed an appearance problem with the checkboxes in wxDataViewCtrl but
introduced another one: as the checkbox was now always drawn in the entire
cell rectangle, the cell alignment was not taken into account any more.

Fix this by only increasing the checkbox rectangle up to the required minimal
size but not any more.

Closes #14504.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:21 +00:00
Vadim Zeitlin
c0feacc829 Add webview library in MSVC-specific setup.h.
wxNO_WEBVIEW_LIB was documented but not implemented: webview library was never
linked in implicitly at all. Fix this by adding the missing #pragma to
msvc/wx/setup.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:18 +00:00
Vadim Zeitlin
9e57072a90 Optimization: skip 0-sized cells in wxGrid::CalcCellsExposed().
There is no need to compute intersections with 0-sized cells, skip them to
speed up refresh of big grids.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 15:36:25 +00:00
Vadim Zeitlin
ea805d32e4 Remove unnecessary statement from the grid sample.
No real changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 15:36:21 +00:00
Vadim Zeitlin
a3db17b122 Make wxGraphicsContext::GetSize() const.
Closes #14556.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 13:05:11 +00:00
Vadim Zeitlin
b3b3713300 Make wxRect2D::Get{Position,Size}() const.
Accessors should be const.

Closes #14555.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 12:50:03 +00:00
Robin Dunn
803a4f2e17 Revert change that installs the wx/gtk/dc.h header file, since we no longer need wxDCImpl classes to be public.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 03:57:06 +00:00
Robin Dunn
a1534b369c Add the ability to trigger a print from JavaScript for the OSX backend of the wxWebView control. Closes #14241
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 03:56:59 +00:00
Robin Dunn
dac3f6b216 Add the ability to trigger a print from JavaScript for the old wxWebKitCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-03 03:56:54 +00:00
Robin Dunn
0a898d4ca0 Enable the wxMediaCtrl backend for wxOSX-cocoa in the build and fix some bugs that were causing it to not send the EVT_MEDIA_LOADED events and to not have a valid best size set. Closes #13065
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 20:25:16 +00:00
Robin Dunn
440ddb750f Have wxDCImpl::GetHandle return NULL by default instead of being pure virtual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 20:25:06 +00:00
Paul Cornett
38ae64e696 remove unused OSX includes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 16:37:09 +00:00
Paul Cornett
0c4438d26e Fix wxGCDC::Clear() for Cairo, and possibly MSW.
Maximum positive coordinate Cairo can handle is 2^23 - 1.
Also convert coordinates to logical so it works right with modified origin or scale.
See #14529


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 16:25:14 +00:00
Robin Dunn
487f662754 Add ctors for wxFileSystemWatcherEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 05:38:39 +00:00
Vadim Zeitlin
3d167787c0 No changes, just fix typos in comments in wxOSX files.
Closes #14549, #14552.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-01 22:05:48 +00:00
Vadim Zeitlin
7740f1c7c9 Uncomment and improve wxFileName::CreateTempFileName() documentation.
Most of CreateTempFileName() documentation was commented out in r57994 for
some reason, uncomment it back and also improve it.

Closes #14545.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 16:49:42 +00:00
Vadim Zeitlin
6d93e28adf Fix comparisons of char and wchar_t with wxUniChar[Ref].
Comparisons didn't work correctly in the other direction as they were not
reversed as needed. Fix this by adding wxDEFINE_COMPARISON_REV() macro which
defines comparisons in terms of the reverse operations and use it for both
wxUniChar and wxUniCharRef.

Closes #14547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 16:49:36 +00:00
Vadim Zeitlin
d50905f761 Fix wxKeyEvent::m_uniChar for EVT_CHAR for native controls in wxGTK.
It was mistakenly set to the same value as in EVT_KEY_DOWN event but, just as
m_keyCode, it may be different for EVT_CHAR.

Use gdk_keyval_to_unicode() to set it correctly instead of inheriting
EVT_KEY_DOWN value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 11:29:00 +00:00
Vadim Zeitlin
7c8bfa876a Add an option to use wxTextCtrl as input window in keyboard sample.
Keyboard handling is subtly different in wxGTK for native controls and generic
wxWindows so add a way to test both of them in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 11:09:00 +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
3d2846fc06 Use compatibility_iterator instead of "Node*" in wxWinCE toolbar code.
This allows the code to compile in all build configurations.

Closes #14541.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:48 +00:00
Vadim Zeitlin
d9a631c389 No changes, just fix some typos in wxDFB comments.
Closes #14538.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:42 +00:00
Vadim Zeitlin
5bdcb1f324 Use (newly) added wxStaticCastVariantData() to fix wxNO_RTTI build.
Don't define wxDynamicCastVariantData if RTTI is disabled and don't use it in
wxConvertVariantToOle() code as we don't really need it there anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 19:16:30 +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
73ed2b2b12 Fix the size of the buffer passed to wxTmemcpy() in wxTextDataObject.
This corrects fatal bug introduced in r72259: we must not multiply the string
length by sizeof(wxChar) as wxTmemcpy() does this internally.

See #14444.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 11:39:08 +00:00
Vadim Zeitlin
229f00eb69 Translate wxTextDataObject to/from native EOL format.
The text data should use CR LF EOLs under Windows but the data inside the
program typically has only LF EOLs, so translate between them automatically in
wxTextDataObject.

Closes #14444.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:50 +00:00
Vadim Zeitlin
46a0544e6f No real changes, just use accessors in wxTextDataObject.
Use {Set,Get}Text() instead of using m_text directly in wxTextDataObject as
these virtual methods overridable and should be called in case the class
doesn't actually use m_text for its storage at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:46 +00:00
Vadim Zeitlin
9a9c20be62 Support wxID_HELP_{INDEX,SEARCH} and wxID_MDI_WINDOW_XXX in XRC.
Add missing wxStandardID enum elements to AddStdXRCID_Records().

Also add blank lines to make the code in this function align with the enum
declaration to make side-by-side comparison easier.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:42 +00:00
Vadim Zeitlin
a05cbc20e3 Fix bug in wxNumberFormatter::ToString() for negative numbers.
Don't include the possible leading sign in the span of digits to be grouped as
this gave nonsensical strings such as "-,123" when adding thousands separators
to "123".

Closes #14526.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:37 +00:00
Vadim Zeitlin
42a4299bb3 Remove workaround for slow scrolling in wxStyledTextCtrl.
We don't need to drop mouse wheel events coming too fast after the previous
commit as now scrolling in wxStyledTextCtrl works quickly enough.

Closes #9057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:31 +00:00
Vadim Zeitlin
14941a1af7 Remove unnecessary Update() in wxStyledTextCtrl scrolling code.
Calling Update() every time ScrollText() dramatically slowed down scrolling
and doesn't seem to be necessary, so remove it.

See #9057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:24 +00:00
Vadim Zeitlin
c4f49d69cf Make keyboard sample output less confusing.
Warn if key presses occur when the input window doesn't have focus as the
usual key events are not generated then which could be understood as a bug in
the sample instead of the correct result.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:21 +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
756ead6f83 Revert HasModifiers() change in behaviour, add HasAnyModifiers().
In 2.8 wxKeyEvent::HasModifiers() returned false if (only) Shift was pressed
as it tested for Control and Alt only but when it was moved to wxKeyboardState
in r55745 it started checking for all modifiers as this made more sense now
that it was used by wxMouseEvent. However it broke existing code using it,
including in wxWidgets itself (in wxTreeCtrl), so revert it now and add
HasAnyModifiers() that does check for all modifiers, including Shift.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:09 +00:00
Vadim Zeitlin
c589dc030d Add a wxGTK-specific function to set wxNotificationMessage icon name.
It's trivial to use a stock icon with the given name in wxGTK with libnotify,
so provide a way to do it. However this is not as simple as that in other
implementations (notably Windows), so make it private to this port for now.

In the future we should try to support arbitrary wxIcons as well as extend
wxIconLocation to support FreeDesktop stock icon names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:07:06 +00:00
Václav Slavík
e0ea79b805 Fix installed wx-config broken by r72205.
In an attempt to fix DESTDIR support on platforms without symbolic
links, this commit completely broke the wx-config symlink created by
"make install" everywhere (unless you were insane enough to use
"--prefix=/", that is): $(libdir) is absolute path and so using
../$(libdir) has no chance of working.

Fixed by using `basename $(libdir)`. This is still unsatisfactory,
because it assumes that $(libdir) and $(bindir) are at the same level in
the filesystem -- which, while usually true, is by no means guaranteed.
But at least this works most of the time.

See #14517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 08:52:52 +00:00
Robin Dunn
2e66ffc737 Add GetHandle for wxGnomePrinterDCImpl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 21:52:37 +00:00
Robin Dunn
8e72f2cd18 wxDC::GetHandle support for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:18 +00:00