Commit Graph

1501 Commits

Author SHA1 Message Date
Vadim Zeitlin
a65b84f434 Add EVT_RIBBONBAR_TAB_LEFT_DCLICK event.
Generate a special event when a ribbon bar is double clicked.

Closes #12399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:35 +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
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
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
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
e9f935cb70 Fix wxBitmapButton initial best size determination in wxMSW.
This was broken during wxButton/wxBitmapButton merge and wxBitmapButton was
not created with the correct initial size if the default size was specified
when creating it any longer. Fix this by calling SetInitialSize() once again
after setting the bitmap.

See #12323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 18:58:06 +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
Vadim Zeitlin
1aff4201c3 Add EVT_RIBBONGALLERY_CLICKED event.
This event is sent whenever an item is clicked, even if it's already selected,
unlike the existing EVT_RIBBONGALLERY_SELECTED.

Closes #12128.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-24 12:27:25 +00:00
Vadim Zeitlin
88ed20a2fa Propagate wxHtmlWindow layout direction to the wxDC it uses.
While wxHtmlWindow doesn't support mixing LTR and RTL contents we can indeed
try to make it render pure RTL stuff correctly by setting up the wxDC used for
drawing accordingly.

Closes #1988.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:33:23 +00:00
Vadim Zeitlin
69e087c144 Add support for CP-866 encoding to wxEncodingConverter.
Recognize yet another Cyrillic encoding, a DOS OEM one.

Closes #2318.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:33:16 +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
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
715e4f7e3e Fix Cygwin 1.7 build.
Avoid using Cygwin sockets as our code assumes that we use WinSock API under
Windows currently (this might change in the future) by defining
__USE_W32_SOCKETS.

Use new, safer and more efficient cygwin_conv_path() function.

Use t_str() instead of fn_str() with Windows API taking file names, under
Cygwin they are different and using fn_str() is incorrect.

A few other minor fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:32:46 +00:00
Vadim Zeitlin
4a07d70634 Send right and double click events in wxGrid when using native header.
Previously only simple left click event was sent in this case, now also
generate right and double click ones.

Closes #12156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 12:38:00 +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
5778dedc92 Swap client data pointers in wxRearrangeList too.
If the list box uses client data, we need to swap the data pointers too when
exchanging items in it.

Closes #12201.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-11 10:43:23 +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
Jaakko Salli
0ea0604a1e Added new wxPropertyGrid property validation failure flags wxPG_VFB_SHOW_MESSAGEBOX and wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR, which allow defining the default message display behavior more accurately
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-04 08:22:52 +00:00
Julian Smart
35bdbae572 Added PaintAboveContent function for drawing on top of text (#12176)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-25 14:05:07 +00:00
Vadim Zeitlin
658e62e493 Fix posting of binary data using wxHTTP.
Don't use mbc_str() which can fail to convert contents of the string created
using wxString::From8BitData(). Use To8BitData() instead.

This fixes posting of binary data via HTTP using binary content transfer
encoding.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-25 09:42:21 +00:00
Václav Slavík
5e30622919 Add wxTranslations::GetAvailableTranslations().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-16 14:09:32 +00:00
Jaakko Salli
1ac5cfc7c9 Added wxComboCtrl::SetTextCtrlStyle()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-13 09:59:32 +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
Jaakko Salli
ce5f620a12 Greatly reduce rare animation garbage in wxOwnerDrawnComboBox drop-down animation (fixes #12087)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-03 15:16:25 +00:00
Jaakko Salli
87b3708781 Interpret arrow keys correctly in wxMSW wxComboCtrl::IsKeyPopupToggle() (fixes #12114)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-01 15:31:05 +00:00
Vadim Zeitlin
76e1326add Update AUI floating windows position and not just size on resize.
When a window is resized, its position can change as well as its size but it
wasn't updated before. Do it now.

Closes #11421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 14:59:18 +00:00
Vadim Zeitlin
7e22c2bd02 Use C locale for numbers in wx(File)Config.
Using the current locale decimal point in config files results in problems
when moving the files to another machine or even using a different locale on
the same one, so don't do it.

Always write the numbers using C locale and try to read them in C locale too
first, but also try the current locale if we failed for backwards
compatibility and to be tolerant with users who edit their config files by
hand.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 11:55:53 +00:00
Vadim Zeitlin
f68e16c5fc Add <span> tag and limited support for CSS styles to wxHTML.
Parse "style" attributes of the HTML tags and honour those of them that can be
mapped to the HTML 3 attributes.

Also add a handler for <span> tag.

Closes #10631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 23:12:25 +00:00
Vadim Zeitlin
b99017ce20 Store page setup data in wxDocManager.
Printing of documents from wxDocManager always used default page setup data,
allow the user to configure it now.

Add wxDocManager::m_pageSetupDialogData and add a handler for wxID_PRINT_SETUP
command to it.

Closes #11394.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 20:05:39 +00:00
Vadim Zeitlin
6305f044a1 Add "filter changed" event to wxFileCtrl.
Generate an event when the selection in the filter combobox of wxFileCtrl
changes.

Closes #12099.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:47 +00:00
Vadim Zeitlin
384859f8c6 Add wxConfig::Read(float *) overload.
This uses Read(double *) but casts the result to float after checking that it
is in the correct range.

Closes #12100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:38 +00:00
Jaakko Salli
735a300a96 Fixed wxComboCtrl::SetButtonPosition() on Vista/Win7 by marking the drop-down button as 'non-standard' when its size or position is changed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 14:51:07 +00:00
Vadim Zeitlin
d25a864d0a Added wxMessageQueue::Clear().
This method can be called from the posting thread to remove any still pending
requests if they became unnecessary.

Closes #10905.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-22 16:14:16 +00:00
Vadim Zeitlin
b6812a6f19 Add column parameter to wxListCtrl::GetItemText().
Allow retrieving the text from columns other than the first one directly.

Add implementations for MSW and generic versions, documentation and a unit
test.

Closes #11597.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:22:16 +00:00
Vadim Zeitlin
5708ae18f2 Add wxTreeCtrl::{Clear,Set}FocusedItem().
Allow changing just the currently focused (not selected) item and also
removing the focus completely.

Closes #11599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 12:01:30 +00:00
Vadim Zeitlin
bd235295fb Spell contributor name correctly.
Use the spelling preferred by Nikolay himself, see #11599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 11:48:39 +00:00
Julian Smart
02aa812cb0 wxRTC: fixed style selection reset after editing a style.
wxRTC: can now edit line spacing in .1 increments from 1 to 2.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-27 16:09:22 +00:00
Václav Slavík
bc71c3cdd5 Add support for storing translations in win32 resources.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-26 20:51:22 +00:00
Václav Slavík
18e065b48d Split wxLocale into wxLocale and wxTranslations.
wxTranslations is for handling gettext translations. wxLocale manages
locale and provides compatiblity API for translations. Separating these
two loosely related tasks makes it possible to use translations into
languages not known by Windows or using localized GUI without all the
locales compilations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-24 07:06:18 +00:00
Vadim Zeitlin
f994a8ac8d Add wxProgressDialog::Was{Cancelled,Skipped}() convenience methods.
Although the information about "Cancel" and "Skip" buttons presses is returned
from Update(), sometimes it may be more convenient to ask the dialog about
whether it was cancelled or skipped instead of storing it in the program
itself.

Add the methods which allow to check for this.

Closes #10903.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-20 11:10:33 +00:00
Vadim Zeitlin
e79f02bdde Add wxToolBar::GetToolByPos() method to access tools by their index.
This is a trivial accessor which somehow was never added before even though we
had GetToolsCount() and even DeleteToolByPos().

Closes #11120.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 20:52:53 +00:00
Václav Slavík
3acf8a8d9b Remove wxLOCALE_CONV_ENCODING flag.
This doesn't affect Unicode builds, only the legacy ANSI one.

PO files are now always converted to the appropriate charset according
to current locale. This was the default behavior for long time; not
doing the conversion was always a fragile hack that didn't work well.
Removing this flag simplifies wxLocale code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 11:29:22 +00:00
Vadim Zeitlin
e3ab69523b Add wxString::ToStdString() and ToStdWstring().
These trivial helper functions are available in all builds (provided that
wxUSE_STD_STRING is not explicitly set to non-default 0 value) unlike implicit
conversions to std::[w]string which are only available when wxUSE_STL==1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-11 11:08:49 +00:00
Vadim Zeitlin
90fbb09ae2 Add wxImage::ClearAlpha().
This simple method can be used to remove alpha channel from the image.

See #10915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-09 13:15:20 +00:00
Vadim Zeitlin
b2edb8f3c5 Add support for IEC and SI size units to wxFileName::GetHumanReadableSize().
Allow choosing the multiplier to use (1000 or 1024) and the names of the units
(SI or IEC). By default, still use traditional convention, i.e. multiplier of
1024 but SI unit names. This will probably need to be changed to use IEC units
in the future.

Also added unit test for this function.

Closes #10673.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 14:53:04 +00:00
Vadim Zeitlin
4ee4c7b948 Add support for gradient stops to wxGraphicsContext.
Allow specifying a set of gradient stops instead of just the beginning and
ending colours. Add the new wxGraphicsGradientStop(s) classes and new
wxGraphicsContext::Create{Linear,Radial}GradientBrush() overloads. Also change
the same methods of wxGraphicsRenderer to take wxGraphicsGradientStops instead
of a pair of colours.

Implement the new API for MSW and Cairo. OS X still uses just the two colours
for now.

Closes #11897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-05 12:15:11 +00:00
Vadim Zeitlin
cd300ef760 Add wxTransparentColour global pseudo-variable.
Introduce a symbolic name for a fully transparent colour.

See #11897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-05 11:44:33 +00:00
Vadim Zeitlin
63d690d7c5 Fix wxTaskBarIcon to work under all Windows versions.
When the code was compiled using a new SDK, creating wxTaskBarIcon failed
under older Windows systems because of a too big NOTIFYICONDATA size specified
by the program.

Fix this by using the fixed NOTIFYICONDATA_V2_SIZE to get old version of the
struct which nevertheless contains everything we need and even fall back to
NOTIFYICONDATA_V1_SIZE for Win9x if needed.

Closes #11886.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-04 13:19:58 +00:00