Commit Graph

4887 Commits

Author SHA1 Message Date
Vadim Zeitlin
cdaed652d7 Merge of SOC2010_RTC_IMAGES branch.
Added floating images and image property dialog to wxRichTextCtrl, by Mingquan
Yang as part of GSOC 2010. Also changed image block creation to use a memory
stream instead of creating a temporary file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 10:27:07 +00:00
Vadim Zeitlin
b4607e897c Correct drawing of mnemonics in wxStaticBox label under wxMSW.
Only show the mnemonics if they need to be shown, i.e. use the same logic as
the standard controls use, to avoid showing mnemonics in wxStaticBox with
custom label colour even when other wxStaticBoxes don't show it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-21 11:44:47 +00:00
Vadim Zeitlin
2af006ebd3 Fix wxStaticBox label redrawing when "Alt" is pressed in wxMSW.
The default handling for Alt key press in the standard control is to redraw
the label to account for showing of the keyboard queues (i.e. if the mnemonics
were initially hidden, they are shown when Alt is pressed) but it doesn't
redraw it in the correct colour resulting in any custom label colour being
lost whenever Alt is pressed anywhere in the window containing the box.

Fix this by forcing the box refresh which will result in repainting it using
our code which does use the correct colour.

Also update the static page of the widgets sample to allow changing the
colours of all static controls on this page, including the wxStaticBox, and
not just the main wxStaticText.

Closes #12497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-21 11:44:41 +00:00
Dimitri Schoolwerth
b5b208a179 Set svn properties on .cpp files.
Add missing svn:eol-style property to all .cpp files. Also set svn:keywords for .cpp files which don't have that property yet to Id, including src/osx/core/glgrab.cpp for consistency (it doesn't make use of the property).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-17 11:17:55 +00:00
Vadim Zeitlin
75595b9750 Only use wxFORCE_LINK_MODULE() in mediaplayer sample in static build.
The linking optimization this macro protects against can't happen when using
DLL and so using it is at best useless and actually harmful (because it
doesn't contain the correct DLL export declarations) in the latter case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-16 11:05:51 +00:00
Robert Roebling
d8090b5e2c Further work on wxDataViewListModel::Reset()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-13 20:02:01 +00:00
Vadim Zeitlin
e7b12eece0 Improve printing out of pressed keys in the keyboard sample.
Add missing elements of wxKeyCode enum ("Windows" and "Command" keys) to the
GetVirtualKeyCodeName() function in the sample.

Also output "unknown" and not blank for WXK_NONE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:57 +00:00
Vadim Zeitlin
b6885972ee Fixes to key codes in keyboard events generated by wxMSW.
Only set Unicode key code if the event corresponds to a character key and set
it to (newly added) WXK_NONE for the other ones to avoid nonsensical values in
it for e.g. "Home" key presses.

Also set non-Unicode key to WXK_NONE for the characters that can't be
represented in the current locale. This is consistent with wxGTK and avoids
conflicts between special key values and Unicode keys.

Clearly document the above behaviour.

Notice that implementing the correct behaviour in wxMSW involved untangling
previously interwoven WM_KEY{DOWN,UP} and WM_CHAR messages handlers. Clearly
separate them now as they get different input (key codes for the former,
characters for the latter) and especially don't try to convert from both kinds
of input using a single wxCharCodeMSWToWX() function. As this function doesn't
need to distinguish between keys and characters any more it can simply return
the converted value in all cases instead of returning 0 sometimes to indicate
a character value instead of a key. Simplify the code using this function
accordingly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:47 +00:00
Vadim Zeitlin
f434800ca3 Add a possibility to show a progress dialog on dialog sample startup.
Add a command line option to the dialogs sample to allow testing of different
wxProgressDialog styles more easily. This also tests for showing them before
the main event loop is started (see r65499).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-10 17:25:35 +00:00
Vadim Zeitlin
ca9fc039c1 Fix cast of pointer to int in artprov sample.
This prevented the sample from building when using MinGW-64 and also probably
prevented it from working correctly on other 64-bit systems.

Closes #12453.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-09 22:20:07 +00:00
Vadim Zeitlin
b54ceb72ce Remember last values used in exec sample "Kill" menu item dialogs.
Remember the PID entered in the dialog and also remember the last used signal
number. This makes these dialogs slightly less painful to use when testing
even though ideally we'd have a single dialog for choosing both values instead
of two consecutive modal dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-09 21:49:25 +00:00
Vadim Zeitlin
9b10161eb6 Force linking of all wxMSW wxMediaCtrl backends in mediactrl sample.
Force the linker to include all the backends in the sample executable instead
of discarding them because they are not used directly to allow testing all of
them in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-09 20:33:51 +00:00
Vadim Zeitlin
6d9db33c47 No changes, just remove cruft from mediactrl sample.
Remove the test for wxUSE_GUI together with the comment questioning its
presence.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-09 20:33:47 +00:00
Robert Roebling
66ddc77b88 Add possibility to use sizers in ribbon panel, fixes #12404: wxRibbonPanel and wxSizer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-29 09:42:55 +00:00
Vadim Zeitlin
232fdc630c Merge the new GUI tests from SOC2010_GUI_TEST branch.
Add a lot of tests for many wx GUI classes.

Add tests using the new wxUIActionSimulator class but disable them under OS X
as too many of them currently fail there.

Refactor the test suite to make organizing the existing tests and adding the
new ones easier.

Improve documentation using the information gathered while testing the
classes. Also update the documentation of the testing system itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:16:05 +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
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