Commit Graph

4871 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Vadim Zeitlin
4e848be7f6 Fix dataview sample compilation with wxUSE_DRAG_AND_DROP==0.
This allows to build it under wxX11. Unfortunately it still doesn't work at
all there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-08 11:37:46 +00:00
Robert Roebling
e78778c8e2 Add ability to render checkbox in undeterminate state, fixes #12290: wxRendererGTK does not support wx.CONTROL_UNDETERMINED for checkboxes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-29 16:57:09 +00:00
Vadim Zeitlin
54f0a3242c No changes, just use traditional English name for Mozart's work.
In English, this work (K. 525) is always referred to with its indefinite
article included and its appearance without it is jarring.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-26 10:08:19 +00:00
Francesco Montorsi
4a31544cb5 no real change: just follow wx typical commenting style and separe // from the following characters with a space
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 09:52:13 +00:00
Jaakko Salli
6a0a70c979 Set 'Min' attribute for the sample wxFloatProperty
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 09:23:25 +00:00
Jaakko Salli
ec88eb712e Use default wxPropertyGrid validation failure behavior in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 09:19:52 +00:00
Vadim Zeitlin
e39877cdb7 Remove selection showing code from the grid sample.
This code is broken as it doesn't always show the selection correctly and
doesn't handle rows-or-columns selection mode at all. Until we can fix it
properly it's better to not have it at all so that at least people avoid
copying the wrong code into their own programs.

Closes #12195.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-24 11:56:11 +00:00
Vadim Zeitlin
9ea83ebc7c Add test for a custom cursor to the image sample.
Load a cursor from PNG file to check that it appears as expected.

See #11989.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-24 11:49:05 +00:00
Vadim Zeitlin
ab5259d977 No changes, just slightly improve docview sample code.
Call the base class version of OnClose() in the derived classes instead of
duplicating it.

Closes #11363.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:33:27 +00:00
Vadim Zeitlin
e5dcae09e6 Add support for auto-orientable toolbars to AUI.
Allow wxAUI to change the toolbar orientation depending on where is it docked.
It is also now possible to specify wxAUI_TB_VERTICAL or HORIZONTAL to force
the toolbar to be always oriented in the given sense and to prevent it from
being docked at the sides incompatible with it.

Closes #11712.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:33:10 +00:00
Vadim Zeitlin
2c83a950a4 Store the result of wxWindow::NewControlId() in wxWindowIDRef.
The result of calling NewControlId() must be assigned to wxWindowIDRef to be
accounted for correctly, otherwise the id was marked as free while a reference
to it still existed resulting in asserts in id management code when we
attempted to reuse it.

Closes #11604.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:32:56 +00:00
Vadim Zeitlin
a5bb451448 Allow passing multi-line strings to wxDC::DrawText(), even under MSW.
Native wxMSW wxDC::DrawText() implementation doesn't support multi-line
strings so use the generic wxDC::DrawLabel() code instead. Drawing multi-line
strings now works at least in wxGTK and wxMSW, to be tested for the other
platforms.

Closes #12239.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:32:52 +00:00
Vadim Zeitlin
e22fa4d7b2 Fix mismatches between format strings and arguments.
This corrects the asserts which are now triggered when the actual arguments
don't match the format string.

Closes #12265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:32:30 +00:00
Vadim Zeitlin
9b481f66e5 Remove executable bits from plist files.
These files probably don't need to be executable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-22 12:09:10 +00:00
Vadim Zeitlin
f203de0cc4 Replace 2.9.1 version with 2.9.2.
Also update the inc_release script to take src/wxWindows.xcodeproj into
account.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-22 12:09:04 +00:00
Vadim Zeitlin
b0f73b6701 Really set svn:eol-style property.
The last commit used incorrect property name, remove the erroneous property
and set the correct svn:eol-style one.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-17 14:55:45 +00:00
Vadim Zeitlin
63ced01b22 Generate key events in generic wxDataViewCtrl implementation.
Forward wxEVT_CHAR events from wxDataViewMainWindow to the parent window so
that they could be processed at wxDataViewCtrl level.

Call DisableKeyboardScrolling() to ensure that cursor movement keys are not
always eaten by the parent window but can be used for the navigation in the
control if they're not processed by user.

Add a test keyboard handler to the dataview sample to check that handling keys
in wxDataViewCtrl does work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-14 11:12:03 +00:00
Vadim Zeitlin
e0ff229573 No changes, just use better names in wxDataViewCtrl sample.
ID_DELETE_MUSIC button deleted selected items so use ID_DELETE_SEL and
OnDeleteSelected() handler for it instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-14 11:11:58 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +00:00
Vadim Zeitlin
6e3837d003 Replace remaining references to 2.9.0 with 2.9.1.
Also update the tech note listing the places that need to be changed when a
new version is released and the script which updates them automatically.

Finally update a couple of copyright years.

Closes #12185.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-12 22:49:59 +00:00
Jaakko Salli
525b29124a Added 'Delimiter' attribute for wxArrayStringProperty. Moved static ArrayStringToString() to wxArrayStringProperty.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 17:04:23 +00:00
Vadim Zeitlin
679ab0b315 Optionally set the window name in wxPersistentRegisterAndRestore().
In practice names are not often used so typically whenever you want to make a
window settings persistent you also need to set its name and the it's
convenient to let a single function do both tasks, so add an overload taking
the name string (this is a separate function instead of optional parameter to
avoid compilation errors if this is ever used with non-wxWindow-derived
objects which don't have SetName() method).

Also expand the documentation slightly and add @since tags.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:44:23 +00:00
Vadim Zeitlin
ac63bc407e Set the string to search for in wxSearchCtrl events.
It's more convenient to have the string to search for directly in the event
object than to retrieve it from wxSearchCtrl itself as it had to be done
before.

Closes #4665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:44:18 +00:00
Jaakko Salli
2906967c4a wxArrayEditorDialog now uses wxEditableListBox. It has also been renamed to wxPGArrayEditorDialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-10 15:30:35 +00:00
Robert Roebling
a8fde0a8d0 Fix assert in dataview sample, fixes #12194: wxDataViewCtrl sample asserts in wxArgNormalizer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-04 08:25:28 +00:00
Vadim Zeitlin
4c5ec23654 Remove duplicate sample.xpm inclusion from stc sample.
This sample already included sample.xpm even before the recent changes
replacing mondrian.xpm (which it also included) inclusion with sample.xpm so
now it included it twice.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-25 08:47:17 +00:00
Francesco Montorsi
81ec0e15af move console sample's interactive tests to two different CppUnit testsuites: InteractiveInputTestCase which requires user input and InteractiveOutputTestCase which outputs stuff to be checked from the user.
Leave in the console sample only a barebone console application (i.e. a real example).

Closes #11960

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 21:03:47 +00:00
Vadim Zeitlin
ae4ea4e862 Remove references to joytest.rc that was recently removed.
Another fix to samples compilation after recent changes removing unneeded
icons and resource files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 12:19:10 +00:00
Vadim Zeitlin
85a0778e6a Suppress bogus g++ warnings about uninitialized variables.
The variables are always initialized but for some reason (at least the Apple
version of) g++ gives warnings for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 12:19:04 +00:00
Vadim Zeitlin
412d690e49 Remove references to not existing any more griddemo.rc file.
The file was removed in a recent commit but the bakefile was not updated.

Do it now and rebake the makefiles.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 18:18:41 +00:00
Vadim Zeitlin
cc31b3c6a5 Correct the name of the XPM file containing the icon in xrc sample.
This fixes a compilation error introduced during de-mondrianization of the
samples.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 18:18:36 +00:00
Vadim Zeitlin
5276b0a53c Use wxDELETE() and wxDELETEA() when possible.
Use wxDELETE[A]() functions which automatically NULL out their arguments after
deleting them instead of doing it manually.

Closes #9685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 18:18:23 +00:00
Vadim Zeitlin
e95f081682 Add a test for selecting the last item in the tree control sample.
This allows to test whether an item is brought into view by selecting it,
see #11154.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:43:11 +00:00
Vadim Zeitlin
aaaa607018 Use PBM_SETMARQUEE to implement indeterminate mode in wxMSW wxGauge.
The old code which simply used PBM_SETPOS after setting PBS_MARQUEE style
often worked but sometimes apparently didn't, so switch to the officially
sanctioned PBM_SETMARQUEE to implement this.

Also make wxGauge::SetDeterminateMode() and SetIndeterminateMode() methods
private as they are not part of the public class API.

Closes #11357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:43:02 +00:00
Vadim Zeitlin
3cb332c155 Remove unnecessary mondrian.{ico,xpm} files from samples directory.
Standardize on using sample.rc and sample icon in all the samples, it was
confusing that some of them used it and other didn't, without any apparent
logic.

Remove the now unnecessary icon files, including the dialogs sample icon which
seemed to be corrupted (this closes #11146).

Also replace multiple OS/2 resource files with a single one in the sample
directory. The OS/2 projects/makefiles would need to be updated to use them.

Remove dialogs sample icon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:42:33 +00:00
Vadim Zeitlin
2613d67b9f No real changes, just convert a Mac-specific file to UTF-8.
This is needed in order to be able to commit the next change, updating it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:41:14 +00:00
Francesco Montorsi
8193a0bd2c group all interactive tests together to make it easier to understand what's going on when running the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-19 12:48:46 +00:00
Francesco Montorsi
e7747eb2e0 Move dir tests from the console sample to DirTestCase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-19 12:32:57 +00:00
Francesco Montorsi
69fc85873d moved non-interactive tests for wxDynamicLibrary, wxGet/SetEnv, wxTempFile, wxCopyFile to appropriate CppUnit test suites;
removed wxFile and wxTextFile tests (complete testsuites already exist for them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-13 14:30:55 +00:00
Jaakko Salli
16a97d7e9a Use wxComboCtrl::SetTextCtrlStyle() in the combo sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-13 10:00:14 +00:00
Vadim Zeitlin
67eca664b5 Stop the timer in console IPC client sample once we don't need it any more.
Under MSW the timer appeared to be flooding the message queue with timer
events faster than we could process them (which seems incredible for the timer
interval of 1 second but still seems to happen), so the idle events were never
generated and the sample didn't work at all.

Now stop the timer once we get a last notification from it to let the program
become idle and run the test function scheduled from the timer handler.

See #11528.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-12 11:28:20 +00:00
Jaakko Salli
8d2c70414c Added wxPropertyGrid::DedicateKey(), which prevents specific key presses from being eaten by editor controls. This is useful for customizing keyboard navigation. Also added utility function wxPGFindInVector<>(), which is used in the new code, and also in some other places.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-12 09:30:57 +00:00