Commit Graph

1509 Commits

Author SHA1 Message Date
Vadim Zeitlin
a70d268a1b Add wxDocManager::FindTemplate() method.
This allows to find the template corresponding to the document of the given
class.

Closes #12170.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 23:03:38 +00:00
Vadim Zeitlin
164db92c14 Add support for specifying child process cwd and env to wxExecute().
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
2010-10-24 22:40:11 +00:00
Vadim Zeitlin
4689441b05 Add XRC handler for wxToolbook.
Closes #11615.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 18:56:28 +00:00
Vadim Zeitlin
df191bfe39 Added wxThread::OnKill() and OnDelete() callbacks.
Call OnXXX() from wxThread::Kill() and Delete() respectively to allow the
thread being terminated perform some cleanup.

Closes #9046.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:10:12 +00:00
Vadim Zeitlin
6becc1e617 Added "rest" argument to wxString::Before{First,Last}().
This allows to search the string just once, in BeforeXXX(), when both the
parts of the string before and after some character are needed instead of
having to do it twice in both BeforeXXX() and AfterXXX().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 14:17:37 +00:00
Vadim Zeitlin
9e19da0f2a Improve wxGTK print and page setup dialogs.
Handle more fields (notably collation, number of copies and "print to file"
flag) and fix the bug with return value of print dialog ShowModal().

Closes #12499.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-16 18:11:27 +00:00
Vadim Zeitlin
676184202d Restore text drag-and-drop in wxSTC broken by Scintilla 2 update.
Drag and drop in wxStyledTextCtrl was broken, apparently since upgrade to
Scintilla 2. Restore it by using the correct wxDrag_XXX constants instead of
boolean values in the code for wxEVT_STC_START_DRAG events generation.

Closes #11709.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-16 18:11:06 +00:00
Vadim Zeitlin
cff48ba847 Fix display of right aligned columns in wxGenericListCtrl.
Take into account the width of the image when drawing the right aligned item
in wxGenericListCtrl.

Closes #12562.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-13 22:10:45 +00:00
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