Commit Graph

51711 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
4267872212 Fix crash in wxWebKitCtrl when using JavaScript.
Ignore the unknown types of the script result, in particular don't crash
trying to dereference an uninitialized pointer if the script didn't return
anything.

Closes #12361.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:24 +00:00
Vadim Zeitlin
c85a79963d Preserve page size when changing increment in wxGTK wxSpinCtrlDouble.
The page size was wrongly reset when changing the increment before.

See #12342.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:19 +00:00
Vadim Zeitlin
63fb690734 Fix wrong return value of wxGTK wxSpinCtrlDouble::GetIncrement().
Due to confusion in gtk_spin_button_get_increments() parameters order the page
size was returned instead of the increment.

See #12342.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:14 +00:00
Vadim Zeitlin
59b7da02ff Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily().
Although returning wxFONTFAMILY_UNKNOWN when the font family is not recognized
makes more sense, it breaks a lot of existing code including all the
font-related code generated by DialogBlocks, so prefer to return
wxFONTFAMILY_DEFAULT instead -- which can't be confused for a valid font
family neither but can be passed to wxFont ctor or SetFamily() without
problems.

To ensure that this behaviour is correctly implemented by all ports, rename
the existing wxFont::GetFamily() to DoGetFamily() and call the new method from
wxFontBase::GetFamily() which adjusts the return value if needed.

Closes #12330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:09 +00:00
Vadim Zeitlin
4a21ea9d9e Improve mouse handling code in wxAuiToolBar.
Capture the mouse to handle mouse input on the buttons to ensure we always
reset the button when the mouse leaves it.

Closes #11784.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:45:56 +00:00
Vadim Zeitlin
bb4acdc085 Include wx/defs.h before testing for wxUSE_RADIOBOX.
We need to include wx/defs.h that (indirectly) defines wxUSE_RADIOBOX
before testing for it in wx/radiobox.h, otherwise the test may fail if the
latter header is the first wx header included by the user code.

This is similar to r65210 fix for wxUSE_CHECKLISTBOX.

Closes #12526.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:45:51 +00:00
Jaakko Salli
1e005ad1fd Reset wxPGEditor singleton instance pointers in dtors. This is useful if wxPropertyGrid is being accessed from an external main loop.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-28 18:59:41 +00:00
Vadim Zeitlin
490e22fdd0 Replace some stray _T()s with wxT().
We use wxT() exclusively now so replace some _T()s which crept in unnoticed.

This also fixes compilation using Sun CC.

See #12452.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 12:55:28 +00:00
Vadim Zeitlin
8cb2c49f7d Fix wx/event.h compilation with Sun CC compiler.
Move wxObjectEventFunctor::operator() definition after wxEvtHandler
declaration as it uses call through a pointer to member of this class and Sun
CC refuses to compile this without having the full class declaration.

Closes #12452.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 12:55:22 +00:00
Vadim Zeitlin
0b2a860f0d Use wxString methods for UTF-8 conversions in wxX11 code.
Use wxString::utf8_str() and FromUTF8() to convert to and from UTF-8. This is
more efficient than using wxConvUTF8 as the code did before as it avoids the
conversion entirely when wxString uses UTF-8 internally (as it does by default
in wxX11) and also has the advantage of compiling in STL build unlike the old
code.

Closes #12518.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 12:48:21 +00:00
Vadim Zeitlin
02e2609962 Small clean up in wxX11 Pango code.
Don't use unnecessary explicit casts of wxCharBuffer to "const char *".

Use wxCharBuffer::length() instead of strlen().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 12:48:14 +00:00
Vadim Zeitlin
80f4c79642 Fix wxX11 compilation when using PCH.
wx/unix/utilsx11.h is not included by wx/wxprec.h so we need to include it
when using PCH too.

Closes #12517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 12:48:07 +00:00
Vadim Zeitlin
ba81782ac3 Document wxSpinDoubleEvent class.
Add documentation for the class itself and the associated EVT_SPINCTRLDOUBLE
macro.

Patch by Carsten Fuchs.

Closes #12520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 11:57:03 +00:00
Vadim Zeitlin
ffc71ce59d Close a modal dialog even when it doesn't have any buttons.
The close button in the dialog title bar should work even if there are no
buttons in the dialog itself (unlike the Escape key which works as an
accelerator for a button), so close the dialog explicitly if the emulated
button click wasn't processed in wxDialogBase::OnCloseWindow().

Closes #12513.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 11:52:06 +00:00
Vadim Zeitlin
f1b08e84a1 Fix typo in wxStandardPathsBase::ResourceCat description and document it.
Document the enum itself and also correct GetLocalizedResourcesDir()
documentation which didn't specify the default value for the category
parameter.

Closes #12523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 11:51:50 +00:00
Vadim Zeitlin
b93f4239bb Compilation fix for MinGW STL build.
std::tr1::unordeded_map<T *>::find() doesn't accept "const T *" pointer, at
least with MinGW 4.4.0 standard library version, so add an explicit
const_cast<> to fix compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-26 22:11:32 +00:00
Vadim Zeitlin
4d5d3cb924 Compilation fix for MinGW 4.x in new keyboard code.
Explicitly choose the comparison operator to use when comparing wchar_t and
int values, otherwise MinGW (correctly) complains about ambiguity between
(int, int) and (wchar_t, const wxUniChar&) overloads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-26 22:11:27 +00:00
Vadim Zeitlin
5ed8879eaf Make wxDateTime::Tm::yday public and document it.
There doesn't seem any reason to allow access to all the other struct Tm
fields but not yday so make it public, fill it in correctly when creating Tm
without using its ctor from struct tm and document struct Tm itself including
its yday field.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-26 22:11:21 +00:00
Vadim Zeitlin
fdb44eb24f Initialize wxDateTime::Tm::yday in the ctor.
Set Tm::yday to a fixed value in the ctor as well instead of not initializing
it at all.

This bug actually didn't have any visible consequences as yday is currently a
private member of struct tm and didn't seem to be used anywhere but it at
least avoids MinGW 4.x warnings about possibly uninitialized variable and
might become important in the future if we allow accessing this field.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-26 22:11:16 +00:00
Vadim Zeitlin
784a3130f8 Correct g++ 4.x warnings about suggested explicit braces.
Several warnings were generated for wxLogLastError() calls inside
CALL_CARET_API macro by MinGW 4.4. Fix them by adding the extra braces.

See also r61475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-26 22:11:10 +00:00
Jaakko Salli
36b7e3a2ec Correct empty space drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 17:44:20 +00:00
Jaakko Salli
fb296a697d Removed debug log message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 17:40:06 +00:00
Jaakko Salli
248a4ec0f2 Fixed PCH-less build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 15:22:52 +00:00
Jaakko Salli
2e2e62def1 Have wxPropertyGrid inherit from wxControl and wxScrollHelper instead of wxScrolledWindow. This is the approach other scrolled controls use.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 14:47:20 +00:00
Robin Dunn
ff94c563ed Fix sending a size event for the displayed page when the notebook is sized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:12:40 +00:00
Robin Dunn
53ba4eb40a Use the wx version of the wxDECLARE_EVENT_TABLE_ENTRY macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:11:47 +00:00
Robin Dunn
a2d0722f48 Avoid an endless recursion situation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:10:34 +00:00
Robin Dunn
a12482a357 Allow the renderer to also work with wxMemoryDCs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:09:24 +00:00
Robin Dunn
e6933ff911 SetUserScale(1.0, 1.0) in Unmask() so the image will not be scaled again when blitted
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:08:26 +00:00
Robin Dunn
6f5778a627 CanSetTransparent needs to be virtual
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:07:19 +00:00
Robin Dunn
e5ad1e9d4b Various build tweaks and updates for wxPython 2.9.1.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:05:30 +00:00
Robin Dunn
80367c29a9 Add flag to enable specifying an architecture to build on Mac. Also add x86_64 architecture to universal build when buildng wxOSX-Cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 20:54:54 +00:00
Steve Lamerton
da7ae3570a Remove an assert that was not backed up by the documentation and so failed on some platforms but not on others. Re-enable some tests that were disabled in wxGTK as they now pass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 17:02:08 +00:00
Steve Lamerton
4ceca85497 Add ClearEventCount to wxTestableFrame. This means we can clear an event count when an event counter goes out of scope so the are no spurious results in later tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 16:55:29 +00:00
Julian Smart
d13a8e05c2 Fix bug finding line after line break
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 16:24:04 +00:00
Jaakko Salli
c27615f55c Streamline wxPropertyGrid tooltip code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 12:58:02 +00:00
Jaakko Salli
614a87dffe When setting empty string as a tooltip, call gtk_widget_set_has_tooltip() with FALSE to remove the tooltip. This will bring wxGTK behavior in line with wxMSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 12:55:22 +00:00
Steve Lamerton
9e48865ca1 Fix assert when changing the filter selection on a multiple selection wxGenericDirCtrl.
Because ExpandPaths selects the item we can simply grab a list of selected paths and then expand them all in the multiple selection case. The single selection case is unchanged.

Closes #12340

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-22 19:24:41 +00:00
Vadim Zeitlin
033428a32c Better checks for wxMSWKeyboard::VKToWX() return value.
Don't generate key events without any valid key code (this shouldn't normally
happen but might on exotic keyboards with keys that we don't know about).

Also ensure that we can distinguish between VKToWX() returning dead keys and
non-Latin-1 keys by setting wchar_t output parameter to WXK_NONE too in the
former case but not the latter.

Generate wxEVT_CHAR_HOOK events for non-Latin-1 keys too in Unicode build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-22 13:31:41 +00:00
Vadim Zeitlin
246117d444 Fix recently broken generation of wxEVT_CHAR_HOOK events in wxMSW.
Changes to VKToWX() semantics broke the logic of the global keyboard hook
function in wxMSW which didn't generate wxEVT_CHAR_HOOK events for ASCII
special keys such as WXK_ESCAPE any more.

Fix this and also generate wxEVT_CHAR_HOOK for all events, not just the
non-ASCII keys for consistency with the documentation and wxGTK.

Closes #12501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-22 13:31:32 +00:00
Steve Lamerton
a323f63a8d Re-enable disabled wxWindow label tests under wxGTK as they were fixed in r65374
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-22 12:45:45 +00:00
Steve Lamerton
2a4a928df7 Send generic wxTreeCtrl wxEVT_COMMAND_TREE_KEY_DOWN events from OnKeyDown rather than OnChar. This change means it sends events for the same keys as the wxMSW control. It also fixes the failing unit test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-22 10:06:39 +00:00
Steve Lamerton
92d9d10f80 Send generic wxListCtrl wxEVT_COMMAND_LIST_KEY_DOWN events from OnKeyDown rather than OnChar. Also remove the HasCurrent check. These changes bring the generic control into line with the control under wxMSW. Re-enable the previously failing unit test and document that the key down event might not have a valid item associated with it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-22 08:48:15 +00:00
Vadim Zeitlin
2f0312f0c4 Compilation fixes for old SDKs (VC6) after recent commit.
Define WM_QUERYUISTATE in wx/msw/missing.h too as src/msw/statbox.cpp uses it
now.

Also move DT_HIDEPREFIX definition from wx/msw/private/button.h to missing.h
as well as it's now used in statbox.cpp too. Include missing.h explicitly from
the files that use DT_HIDEPREFIX.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-21 12:57:59 +00:00
Vadim Zeitlin
74d3098357 Compilation fix of wxSocket code for older Solaris versions.
Include sys/filio.h to define FIONBIO in all cases (sometimes this header is
already included from sys/ioctl.h but not always).

Closes #12481.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-21 11:56:53 +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
Jaakko Salli
b89b24691e Call SetToolTip() for the property editor control when wxPG_EX_HELP_AS_TOOLTIPS style is used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-20 15:38:12 +00:00
Vadim Zeitlin
63dcc736df PCH-less compilation fix to GDI+ wxMSW code.
Closes #12496.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-20 14:14:12 +00:00