Commit Graph

51503 Commits

Author SHA1 Message Date
Vadim Zeitlin
b00403b401 VC6 compilation fix for native wxProgressDialog implementation.
Don't use return with a void value, VC6 doesn't support this and it's
unnecessary here anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 23:55:52 +00:00
Vadim Zeitlin
c31d9c7f60 Use task dialog for wxProgressDialog implementation in wxMSW.
If available, the task dialog is now used for the wxProgressDialog under
Windows. This provides a much more native looking dialog which doesn't look
out of place under modern Windows versions, unlike the generic implementation.

The internals of the code had to be significantly changed as the task dialog
can only be shown modally so, to emulate wxProgressDialog modeless nature, a
separate thread is used for the progress dialog management.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:49:02 +00:00
Vadim Zeitlin
c0938d8506 Only use native wxHyperlinkCtrl in Unicode build under MSW.
The native control is available to Unicode applications only so disable its
use in non-Unicode build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:48:53 +00:00
Vadim Zeitlin
8220f2f145 Don't use native MSW wxCommandLinkButton in wxUniversal.
Test for __WXUNIVERSAL__ when selecting the version of this class to use.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:48:48 +00:00
Vadim Zeitlin
a1bdd4ab9b Add wxRichMessageDialog class.
This is a generalization of wxMessageDialog based on the native task dialog
under recent (Vista and later) Windows versions and implemented generically
for the other ports for now.

It provides the possibility to use additional controls in the message boxes
(checkbox useful for the "Don't ask me again" kind of dialogs and collapsible
detailed explanations field) and better look and feel under Windows.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:48:41 +00:00
Vadim Zeitlin
ede7b01760 Provide a task-dialog based wxMSW wxMessageDialog implementation.
Use the task dialog instead of the legacy message box for wxMessageDialog
implementation under wxMSW on recent (Vista and later) Windows versions.

As part of this change, remove wxMessageDialogWithCustomLabels and integrate
its functionality in wxMessageDialogBase itself as it's now used by all
platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:48:28 +00:00
Vadim Zeitlin
5a607f8b23 Handle mnemonics correctly in wxGTK::wxCollapsiblePaneSetLabel().
Convert mnemonics in wx format to the one used by GTK+, just as we already do
in the ctor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:48:21 +00:00
Vadim Zeitlin
2afba7c46c Fix Yes/No/Cancel buttons order in wxGTK wxStdDialogButtonSizer.
"Yes" and "No" buttons should be positioned next to each other for consistency
with the native message box instead of separating them with the "Cancel"
button.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:48:15 +00:00
Robert Roebling
8eb99915f2 Document recetnyl added name parameter in wxDataViewCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 21:40:24 +00:00
Robert Roebling
343e567e3e Mention that you cannot call wxRadioButton::SetValue(false) if that radiobutton belongs to a group
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 21:36:40 +00:00
Robert Roebling
b8710bbee8 GTK+ just won't let you uncheck any radiobutton that belongs to a group.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 21:32:14 +00:00
Robert Roebling
c272f12ff0 make wxChoice and wxComboBox sort in a case insensitive and locale adapted way, fixes #12351: Incorrect sort order in wxChoice / wxComboBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 21:29:53 +00:00
Robert Roebling
1aeaccf310 Make wxListBox sort in a case insensitive way, fixes #12352: Incorrect sort order in wxListBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 21:28:11 +00:00
Julian Smart
a94656538f Use common inline version of wxHexToDec
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 12:59:52 +00:00
Vadim Zeitlin
b815cf68d2 Provide native wxHyperlinkCtrl implementation for wxMSW.
Use the "syslink" native control to implement wxHyperlinkCtrl under (recent
enough, i.e. XP or later) versions of Windows.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-17 16:55:32 +00:00
Vadim Zeitlin
8fe8b421fc Compilation fix: include wx/button.h from wx/commandlinkbutton.h.
Include the base class declaration to fix compilation under non-MSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-17 16:12:28 +00:00
Vadim Zeitlin
c6d4b3ce9d Export wxMSWButton::GetFittingSize() private function.
It is now used by wxCommandLinkButton from adv library and so needs to be
exported from core.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-17 15:13:14 +00:00
Vadim Zeitlin
3571e1add4 Add new wxCommandLinkButton class.
A command link button wraps a native MSW control under recent Windows versions
and is implemented generically as a simple bitmap button elsewhere.

In the future, GTK implementation should allow using a different font for the
button label and its note.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-17 14:48:50 +00:00
Julian Smart
dd71bfb992 Large image-loading speedup and small attribute-loading speedup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-17 10:10:39 +00:00
Stefan Csomor
3f16e51be8 fixes horizontal scrolling in textfields, fixes #12322
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-17 06:21:53 +00:00
Robert Roebling
9572bf1d44 Ignore non-existant string selection in wxComboBox::SetValue() in read-only mode, as per the very exact docs, fixes #12329: wxComboBox can set non-existing string in read only mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-16 17:48:28 +00:00
Robert Roebling
bdf90a1a1c Uncheck radiobutton when calling ::SetValue(false) as per wxMSW, fixes #12344: Cannot set GTK wxRadioButton to fasle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-16 15:33:31 +00:00
Vadim Zeitlin
a183ec7094 Improve EVT_SHOW documentation.
Mention that it applies to the TLWs only and explain when it is generated (and
not generated).

Closes #12353.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-15 21:14:11 +00:00
Vadim Zeitlin
9106ea703c Fix wxMSW compilation in wxUSE_STL==1 case.
A wxDECLARE_NO_ASSIGN_CLASS() was recently added to ClassRegInfo but storing
it in a vector requires it to be "Assignable" so this broke compilation in STL
case (wxVector<> doesn't enforce this requirement currently).

Make ClassRegInfo assignable again to fix this.

Closes #12355.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-15 21:14:06 +00:00
Vadim Zeitlin
6008ff4a55 Revert "Make wxComboBox::Popup() and ::Dismiss() emit events"
This reverts commit r65310 which was not, in fact, necessary as the events
were already sent.

See #12335.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-15 21:14:02 +00:00
Robert Roebling
26c7026db3 Make wxComboBox::Popup() and ::Dismiss() emit events as per the docs, fixes (wxComboBox not sending popup and dismiss events)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-15 16:16:22 +00:00
Jaakko Salli
15ec7f782d Allow wxVariant::Convert(wxUniChar* value) to convert single-character string into a character.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-13 20:12:03 +00:00
Vadim Zeitlin
4082ff84e3 Fix harmless MSVC warning about double to float conversion.
Make the constant double as well as it's compared with other doubles in the
code below.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-13 11:57:45 +00:00
Vadim Zeitlin
2fe9180bfe Update wxWinCE compilation instructions.
Remove obsolete information about eVC. Give the example of using bakefile to
generate VC[89] CE projects directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-13 09:55:32 +00:00
Stefan Csomor
128ad18349 no-op change to get build bot running
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-13 04:23:37 +00:00
Stefan Csomor
b70ee0382a no-op change to get build bot running
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-12 08:25:16 +00:00
Javier Torres
dd5167e0bf New build slave for wxQt
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 23:11:24 +00:00
Peter Cawley
1edd60790b Improve wxRibbonMSWArtProvider's colour scheme generation when the primary and/or secondary colours are grey (see ticket #12331).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:51:02 +00:00
Vadim Zeitlin
e08b4823e8 Handle wxDefaultSize correctly in wxNonOwnedWindow under wxOSX.
Creating a wxNonOwnedWindow with default size created tiny, practically
invisible windows because the default size was only taken care of at
wxTopLevelWindow level but not in wxNonOwnedWindow itself. In particular, this
broke creation of wxMDIChildFrames with the default size as this class only
derived from wxNonOwnedWindow and not from wxTopLevelWindow under OS X. It
also probably wasn't intentional as the code did use {Width,Height}Default()
functions but they were wxWindow methods and not the wxTopLevelWindow
(confusingly and error-pronely) named the same.

Fix this, remove the now redundant checks for the default size in
wxTopLevelWindow itself and also rationalize and condense the checks for the
default position and size components in wxNonOwnedWindow::Create().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:04:00 +00:00
Vadim Zeitlin
71a0f42d2a Make wxTopLevelWindow::GetDefaultSize() public and document it.
This method is/will be needed by wxNonOwnedWindow in wxOSX but couldn't be
used as long as it was protected, so make it public. And as it seems that it
might be useful outside of wx itself, document it as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:03:55 +00:00
Vadim Zeitlin
06cfc05269 Add wxPoint::IsFullySpecified() and SetDefaults().
These methods do the same thing as wxSize methods with the same names and are
useful for the same reasons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:03:51 +00:00
Vadim Zeitlin
01495abf87 Fix handling of help buttons with non-empty label under OS X.
Creating a button with wxID_HELP and a non-empty label used to always show
this label, even if it was just a standard "Help" or "&Help". This didn't work
at all as the help buttons under OS X are too small to show any label.

To fix this, use normal buttons, not help ones, if a really custom label is
used to ensure that it can be seen. And to still use the correct help buttons
in as many cases as possible, ignore the standard "Help" label and its
variants and don't show it at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:03:46 +00:00
Vadim Zeitlin
34a1414265 Use correct format specifiers in wxString::Printf().
Using %d with size_t argument resulted in asserts, fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-11 16:03:04 +00:00
Vadim Zeitlin
1335062151 Fix line indices translation in wxGrid::DoEndDragResizeLine().
We used the translation in wrong direction, i.e. interpreted x coordinates as
rows and y coordinates as columns. This could result in passing invalid cell
indices to GetCellSize() and was generally completely wrong.

Closes #12311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 22:39:04 +00:00
Vadim Zeitlin
0d2f3b9d7b WIP
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 22:39:00 +00:00
Vadim Zeitlin
276f883f7a Don't set Unicode key code in key events to non-Unicode values in wxGTK.
Only assign the wx key code wxKeyEvent::m_uniChar if it's a key corresponding
to an ASCII symbol, don't do it for the values outside of ASCII range such as
all the special WXK_ constants. It doesn't make sense to generate Unicode key
codes for e.g. cursor key presses.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 22:38:54 +00:00
Vadim Zeitlin
27607839f1 Use wxPanel as controls parent in wrapsizer sample.
Follow our own advice about never creating controls directly on the frame and
using an intermediate wxPanel in our own sample. This is better style and
makes it look better under Windows.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 21:48:22 +00:00
Vadim Zeitlin
d931703342 Inherit notebook background recursively under wxMSW.
With MSWSetTransparentBackground() hack only the panel which was the immediate
child of wxNotebook (i.e. its page) inherited the notebook background but not
its children. This resulted in jarring background discontinuities when nested
panels were used.

Fix this by inheriting notebook background in all child panels by testing for
the return value of the parents MSWHasInheritableBackground() method in
wxPanel::HasTransparentBackground() recursively.

Closes #12317.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 21:48:17 +00:00
Vadim Zeitlin
e9f935cb70 Fix wxBitmapButton initial best size determination in wxMSW.
This was broken during wxButton/wxBitmapButton merge and wxBitmapButton was
not created with the correct initial size if the default size was specified
when creating it any longer. Fix this by calling SetInitialSize() once again
after setting the bitmap.

See #12323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:58:06 +00:00
Vadim Zeitlin
1cd44b9c5f Keep the button bitmap centered if the button has no label in wxMSW.
We should only honour the bitmap alignment if the button shows both the bitmap
and the label. If only the bitmap is shown (e.g. when wxBitmapButton is used),
it should always be centered as it used to be done in 2.8.

Closes #12323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:58:02 +00:00
Vadim Zeitlin
aa83b6fc90 Remove obsolete and out of date Xcode project file.
The project files under build/osx should now be used, this Xcode project file
was out of date and couldn't be updated automatically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:56 +00:00
Vadim Zeitlin
563cf28f2a Revert MSW window classes uniquification patch.
Making the class names unique doesn't seem to be necessary so revert the patch
which appended unique pointer value to their names (r57030).

See #9031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:51 +00:00
Vadim Zeitlin
5ed0415e3e Don't use bitmap still selected in wxMemoryDC in image sample.
The bitmap must be deselected from wxMemoryDC before being used in any other
way but the sample didn't do this. Fix this by simply destroying the DC as
soon as we don't need it, this makes bitmap available for other use as well.

Closes #12310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:47 +00:00
Vadim Zeitlin
5784031727 Use window position in screen coordinates in wxDisplay::GetFromWindow().
To determine the display to which the window belongs we must use the window
position in screen coordinates returned by wxWindow::GetScreenRect() and not
the positioned returned by GetRect() which is the same only for the top level
windows but not for the child ones.

Closes #12318.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:42 +00:00
Vadim Zeitlin
18ff59a401 Correct documentation of majorDimension in wxRadioBox ctor.
The default value of this parameter is 0, not 1. Also add the explanation of
what using 0 actually means.

Closes #12325.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:57:36 +00:00