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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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