Commit Graph

14178 Commits

Author SHA1 Message Date
Stefan Csomor
d623e8b18a modeling subclassing along msw, unsubclassing filedialog at end of ShowModal, fixes #12236
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-07 06:51:13 +00:00
Stefan Csomor
a94c4b8529 using non-sleep version for GUI mutex, solves #12411
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-06 13:50:12 +00:00
Vadim Zeitlin
b99450eecb Add wxGrid::RefreshAttr() method to force attribute refresh.
A cached attribute may continue to be used even though the attribute returned
by a custom wxGridCellAttrProvider has changed so add a method to force wxGrid
to update the attribute by forgetting the cached copy.

Closes #12406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-30 22:18:52 +00:00
Vadim Zeitlin
d20ba5f860 Allow using custom labels for wxGenericMessageDialog buttons.
Custom labels set for wxGenericMessageDialog buttons were simply ignored as it
used CreateSeparatedButtonSizer() to create the actual buttons which in turn
always used the standard labels.

Fix this by explicitly creating the buttons with custom labels if necessary.

This also fixes custom label support in wxGenericRichMessageDialog deriving
from this class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-30 21:48:21 +00:00
Vadim Zeitlin
b14cca2a84 Extract CreateSeparatedSizer() from wxDialog::CreateSeparatedButtonSizer().
Extract the code adding a separating wxStaticLine to the sizer in its own
function to be able to reuse it in upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-30 21:48:16 +00:00
Jaakko Salli
6f631217a9 Added missing wx/defs.h includes in propgrid headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-26 13:25:07 +00:00
Václav Slavík
a614ffae71 Fix wxListBox selection handling broken by r64500.
r64500 introduced tracking of previous selection in wxMSW's wxListBox so
that an event isn't sent when the user clicks already selected item
again. Unfortunately, it forgot to account for programatic changes of
selection (e.g. when all items are removed, so is the selection) and
didn't update selection book-keeping information in that case. The
result was that the event wasn't sent when it should be in some cases.

Fixed by using UpdateOldSelections() even in single-selection case in
wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-25 15:02:30 +00:00
Robert Roebling
625ed74301 Make sorting of wxListBox, wxChoice and wxComboBox identical to the MSW sorting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-24 17:06:15 +00:00
Jouk Jansen
590e326472 wxKeysym problem for wxMOTIF fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-24 11:23:22 +00:00
Vadim Zeitlin
571d991bb3 Merge wxUIActionSimulator fixes from SOC2010_GUI_TEST branch.
Correct a lot of problems with the initial implementation, notably make the
API consistent across all platforms, e.g. all keyboard-related methods now
take just a wxKeyCode.

Add some useful higher-level helpers such as Text() and MouseDragDrop().

Improve documentation.

wxUIActionSimulator now works under MSW, GTK and OS X and is enabled by
default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:15:42 +00:00
Vadim Zeitlin
acdc8633de Extract X11 Display wrapper class in a private header.
No real changes, just extract a private Dpy class used by wxGTK to a header
and rename it to wxX11Display.

This will allow reusing it from X11 wxUIActionSimulator implementation in the
upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:15:13 +00:00
Vadim Zeitlin
1c9039c352 Add missing header required if wx/mousestate.h is included first.
This header uses wxPoint so it must include wx/gdicmn.h (instead of relying on
it having been already included).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:15:07 +00:00
Robert Roebling
c9248ddbef make Set/GetLabel() set and return something (albeit unused) as per the docs, fixes #12350: wxWindow Get/SetLabel non-functional in GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-21 09:54:30 +00:00
Robert Roebling
a03b38ef68 make Set/GetLabel() set and return title in wxTLW, fixes #12371: Dialog::GetLabel() Inconsistent behaviour across operating systems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-21 09:53:25 +00:00
Vadim Zeitlin
c79510ca12 Make the main message of wxGenericMessageDialog stand out.
Use larger bold font for the main message in wxGenericMessageDialog if the
extended message is also given to make it stand out similarly to how it
happens in the native GTK and MSW dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-19 15:41:18 +00:00
Vadim Zeitlin
8908317871 Compilation fix for STL build in wxGtkCollatableString code.
Include wx/string.h to define wxString used by this class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-19 00:06:17 +00:00
Vadim Zeitlin
d482d5e468 Compilation fix for non-PCH build in wxGenericRichMessageDialog code.
Move IsCheckBoxChecked() to the .cpp file where wxCheckBox is fully defined
and not just forward declared (at least when not using PCH).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-19 00:06:12 +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
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
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
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
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
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
80ce465c64 Add wxDataViewCtrl::{Set,Get}CurrentItem().
Current item is the same as the selected item in single selection mode but in
multiple selection mode there was no way to neither get this item nor change
it before so add the new functions to allow doing this now.

The new methods are implemented for the generic, GTK and OS X/Cocoa versions
but only stubs are provided for OS X/Carbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 12:53:03 +00:00
Jaakko Salli
6c78066f22 Moved wxPGProperty::SetFlag() to protected API since it does not have any side-effects that are usually desired in the user code. Added wxPGProperty::SetAutoUnspecified() since wxPG_PROP_AUTO_UNSPECIFIED can no longer be set (conveniently) with SetFlag().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 12:22:08 +00:00
Jaakko Salli
346f3fd640 Removed spurious semicolon that prevented compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:59:34 +00:00
Jaakko Salli
9ceed261f8 Added wxPGProperty::Enable() for conveniency. Refactored related code and improved related documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:41:20 +00:00
Vadim Zeitlin
62e9285aba Add name argument to wxDataViewCtrl ctor for consistency.
As all the other wxWidgets controls take the parameter in their ctor/Create()
it's unexpected that wxDataViewCtrl does not. Add the name parameter and pass
it to wxWindowBase::CreateBase() as usual.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:57 +00:00
Vadim Zeitlin
17d98558b3 Add wxDataViewCtrl::GTKPathToItem() function and use it.
No real changes, just refactor the code to use a function mapping GtkTreeIter
to our wxDataViewItem and use it instead of duplicating its code everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:37 +00:00
Vadim Zeitlin
91012d561d Include wx/defs.h before testing for wxUSE_CHECKLISTBOX.
We need to include wx/defs.h that (indirectly) defines wxUSE_CHECKLISTBOX
before testing for it in wx/checklst.h, otherwise the test may fail if the
latter header is the first wx header included by the user code.

Closes #12306.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:35:55 +00:00
Václav Slavík
0826c4d39a Fix Tab navigation when focused control is disabled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-01 10:11:53 +00:00
Václav Slavík
ce5abbf9f5 Fix wxDataViewCtrl to omit expander space for all kinds of lists.
List-only models don't have expanders and so the control shouldn't
reserve any space for them; the notion of expander column doesn't make
sense here.

Previously, this was done correctly only for wxDataViewVirtualListModel;
"ordinary" list models, such as the one used by wxDataViewListCtrl, were
treated as generic tree models and 0th column had ugly empty space
reserved for (never used) expander.

This patch fixes it by adding IsListModel() helper function in
addition to existing IsVirtualListModel(). Some of the
IsVirtualListModel() tests were changed into IsListModel() checks as
appropriate.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-29 20:54:00 +00:00
Václav Slavík
780e4fd003 Fix gcc warning in wxDataViewListCtrl::ItemToRow().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-29 15:30:11 +00:00
Vadim Zeitlin
c072b9ec8a Add association between wxOSX wxTextWidgetImpl and wxTextEntry.
This allows to always find the correct wxTextEntry to use in the
implementation of text-related widgets without using any casts. Notably, the
wrong up-cast of wxWindow to wxTextCtrl in wxNSTextFieldControl::controlAction()
which resulted in a crash when the window was actually a wxComboBox can now be
fixed.

Closes #12284.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:27:01 +00:00
Václav Slavík
fa629adae4 Add index-based selection functions to wxDataViewListCtrl.
These are convenience functions for work working with indexes, for
consistency with other wxDataViewListCtrl methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-27 21:45:50 +00:00
Václav Slavík
17de95e4e0 Add item<->row mapping helpers to wxDataViewListCtrl.
These are commonly needed when using wxDataViewListCtrl, yet they were
only available in wxDataViewIndexListModel.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-27 21:45:45 +00:00
Vadim Zeitlin
128eed6c64 Build fix: don't test for __WXMSW__ using #if in wx/defs.h.
__WXMSW__ should be tested using #ifdef but in fact there doesn't seem to be
any need to test for it at all here as __CYGWIN__ implies __WXMSW__ anyhow.

Closes #12266.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 11:42:43 +00:00
Jaakko Salli
7197bbad21 Refactored validation of numeric properties (wxIntProperty, wxUIntProperty and wxFloatProperty). They now use (basically) a single template function instead of three separate ones.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 10:36:19 +00:00
Jaakko Salli
5eedcd5eee Added wxVariant::Convert() implementations for wx(U)LongLong_t, so that wxVariant can be converted to native 64-bit integer types on the same terms as it is converted to other numeric types (useful in e.g. template functions)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 09:30:50 +00:00
Jaakko Salli
ed8f00db2c Make SetFont() public (fixes #9641)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 07:39:17 +00:00
Robert Roebling
9ca2afd1db Make calls wxDataViewModel::ItemDeleted() etc. non-virtual as they are not supposed to be overridden
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-24 15:30:03 +00:00