These strings don't need to be wide and, as elsewhere, prefer the
compatibility with 2.8 ANSI build to compatibility with Unicode build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The button icons have a different size from all the other clients in wxGTK so
it may be interesting to see them in the sample, add wxART_BUTTON to the list
of art clients that can be chosen in it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This not only removes some unnecessary code from the sample but also fixes a
problem due to the use of a 0 id under wxOSX (which is unsupported there).
Closes#12788.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add new wxDataViewModel::IsEnabled() and wxDataViewListStore::IsEnabledByRow()
methods and implement support for actually disabling the items in wxOSX/Cocoa
native implementation of wxDataViewCtrl and limited support for it in the
generic version.
We need to implement this in wxGTK using GtkCellRenderer "sensitive" propriety
later.
Closes#12686.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When getting an instance of an OLE automation object, it is often useful to
connect to the existing instance if any or start a new one otherwise. Make
GetInstance() behave like this by default while still allowing to use the
wxAutomationInstance_UseExistingOnly flag to reestablish the old behaviour.
Also improve the error reporting in wxAutomationObject.
See #12489.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add simple wxVersionInfo class holding the version information.
Also add GetLibraryVersionInfo() static method to wx{JPEG,PNG,TIFF}Handler,
wxStyledTextCtrl and wxXmlDocument classes and wxGetZlibVersionInfo() and
wxGetLibraryVersionInfo() global functions using it.
Closes#12690.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Some tests in the "Menu" menu of the menu sample worked with the "Test" menu
while others used the last one ("Help" initially but possibly something else
if the test commands from "Menubar" menu were used).
Harmonize all menu commands to use the "Test" menu now.
See #12668.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use Connect() for compatibility (notably with VC6 which doesn't support
Bind()). Also connect the event handlers on loading the dialog instead of
waiting until the relevant page is selected, this makes the code slightly
simpler as we don't need to remember whether we connected them or not any
longer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow to declare ranges of consecutive IDs in XRC by using the "id[n]" syntax.
Show this functionality in the xrc sample and test it in the new unit test.
Also show and test the "object reference" XRC functionality.
Closes#11431.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The mouse event handler for the frame was never executed because the frame is
entirely covered by other windows in this sample. Not sure what was meant here
but this handler is useless so just remove it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The sample contained a lot of unnecessary checks for m_log, remove them to
make the code shorter and simpler to understand.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace wxLogDebug() with wxLogTrace() as was probably intended. This fixes
the assert which happened when running the sample because of the wrong number
of parameters passed to wxLogDebug().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This makes it more convenient to run the sample repeatedly as the directory to
watch can be specified only once instead of having to choose it interactively
after the sample startup every time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The generic wxTreeCtrl version only sends this event when the mouse is right
clicked on a valid item so do the same in wxMSW version too for consistency.
This is also consistent with wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK event and
avoids strange problems with unexpected wxEVT_COMMAND_TREE_ITEM_MENU events
generated on right double click.
Finally, replace the checks for item validity in the event handler in the
sample with asserts which should loudly complain if it happens to be invalid.
Closes#11226.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add an optional wxExecuteEnv parameter to wxExecute() which allows to specify
the initial working directory and custom environment for the child process.
Closes#12163.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxNotebook was unusable with so many pages under all platforms and completely
unusable under Mac. Replace it with wxChoicebook which allows to select any
page quickly instead of having to do it sequentially (or not being able to do
it at all under Mac).
Another possibility could be to use wxTreebook and organize the pages in
categories, similarly to how it is done in the widgets sample.
Closes#3699.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Several new pages were added in random positions, rearrange them to be in
alphabetical order.
Also remove wxToolBar from "The Rest" page as it is shown in one of the other
pages now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
appicon.xpm was removed so use another icon in the controls demo in the sample
instead, it doesn't matter which one we use anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are already way too many pages in the "Controls Example" in the sample,
combine wxBitmapButton and wxButton ones to save some space and make it more
usable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just remove a check for pointer passed to wxDELETE() bot
being NULL as wxDELETE() already checks for this anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
so that objects can stream themselves; added a wxXmlDocument-based method
of writing XML, though this turned out to be much slower than writing directly
so the direct approach is retained and is the default (can be changed with wxRICHTEXT_USE_XMLDOCUMENT_OUTPUT).
Loading and saving new attributes implemented. Added custom properties to objects.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
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
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