Commit Graph

53014 Commits

Author SHA1 Message Date
Stefan Csomor
8c0e92cd9d move accel handling in front of the normal keyDown handling, support non-command menu accels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 16:23:57 +00:00
Stefan Csomor
ba950d4418 move accel handling in front of the normal keyDown handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 16:21:24 +00:00
Stefan Csomor
9c89493228 supporting more key equivalents for display, fixing setHidden: method warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 15:43:42 +00:00
Stefan Csomor
07776bef5f removing code that will not have to be updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 15:42:45 +00:00
Vadim Zeitlin
8ec4c7a18d Japanese translations update from Suzumizaki-Kimitaka.
Closes #11773.

Closes #13003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 10:28:25 +00:00
Vadim Zeitlin
85c8e8f80f Fix typo in wxStack<T> documentation.
I somehow managed to misspell wxStack<T> as wxSort<>.

Closes #13002.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 10:28:20 +00:00
Vadim Zeitlin
6a219e34a0 Add missing wxUSE_MARKUP checks in wxOSX code.
Don't define wxWidgetImpl::SetLabelMarkup() when wxUSE_MARKUP is off and
definitely don't reimplement it in wxButtonCocoaImpl as this code doesn't
compile without markup support.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-02 10:15:35 +00:00
Dimitri Schoolwerth
8529b0b909 Improved palette handling with saving PNG files.
Instead of converting alpha to a mask an attempt is made to write a palettised PNG file with an ARGB palette using a maximum of 256 transparency values where formerly just up to one was supported. GIF images with 256 colours and transparency can now also be saved as a palettised PNG instead of true colour, making the image a lot smaller.

Applied (modified) patch by troelsk. Closes #12850.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-01 21:29:17 +00:00
Václav Slavík
548fa9c1eb Pass wxRect/wxPoint arguments to wxDataViewCustomRenderer by reference.
Instead of passing them by value, use const reference. This change
is safe to do, because these methods' signatures were different in 2.8
anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-01 12:16:49 +00:00
Václav Slavík
43ff861df4 Fixed typo.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-01 12:16:45 +00:00
Václav Slavík
d2425a43ec Toggle checkboxes in generic wxDataViewCtrl with single click.
Both GTK+ and OS X native controls use single click to toggle
checkboxes, instead of double-click activation used by the generic
version. So does wxCheckListBox on Windows, so make wxDVC
behave the same way.

See #11185.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 21:23:10 +00:00
Václav Slavík
dbc3aec19a Get rid of WXGetAsCustom().
Instead, have WXOnActivate() and WXOnLeftClick() with same signatures as
their public API counterparts and just call Activate/LeftClick() from
them for wxDataViewCustomRenderer.

This accomplishes the same thing, but makes it easier to override
behaviour in wx's internal implementations of renderers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 21:23:04 +00:00
Václav Slavík
1852bf0db5 wxDataViewCtrl: Fully prepare renderer for Activate() call.
Instead of just setting the value in the generic implementation, do full
preparation (incl. attributes etc.) as everywhere else.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 21:23:00 +00:00
Stefan Csomor
e878c3477b adding hour constant to carbon build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 19:46:29 +00:00
Stefan Csomor
127668fcdd fixing non-precomp headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 19:29:15 +00:00
Stefan Csomor
3ac8892150 disable cursorRects for global busy state
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 14:47:32 +00:00
Stefan Csomor
201c6db3e4 avoid setting live cursor during busy state
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 14:39:37 +00:00
Stefan Csomor
4c00ce28bd add watch cursor to osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 13:44:25 +00:00
Stefan Csomor
b895498c75 don't swallow command events that are not handled by accels, fixes #12373
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 12:14:15 +00:00
Stefan Csomor
b59cd6c433 adding taskbar implementation for statusitem (menubar) and dock, fixes #12838
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 10:12:06 +00:00
Stefan Csomor
a5d0c88a85 moving appdelegate declaration to header
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 10:10:08 +00:00
Stefan Csomor
733fa5907d make sure the quit item is only shown where appropriate on osx
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 10:07:00 +00:00
Stefan Csomor
a96f3e138b osx_cocoa supports both kind of taskbaricons in the menubar (standard) and as function of the dock (type DOCK)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 09:26:55 +00:00
Stefan Csomor
671b125ba7 make sure 10.4 command-key events are routed via the wx-accelerator route as well, fixes #12373
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 20:38:40 +00:00
Vadim Zeitlin
d44bc7333a Use single quotes in wxMarkupText unit test to work around VC6 bug.
VC6 seems to have a strange bug with escaped quotes used in strings passed to
macros and failed to compile the original code with nonsensical error messages.

Use single quotes to try to work around this issue. They are also somewhat
more readable as they don't need to be escaped inside C strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 18:36:55 +00:00
Vadim Zeitlin
036718302c Add a trivial virtual dtor to wxMarkupParserOutput.
This class isn't really supposed to be used polymorphically but add a virtual
dtor just to suppress g++ warning about it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 18:36:52 +00:00
Vadim Zeitlin
6f83d108e9 Another fix for PCH-less build in markup code.
Include wx/control.h to use wxControl::RemoveMnemonics() and
FindAccelInIndex().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 18:36:48 +00:00
Dimitri Schoolwerth
87c7345cd0 Fixed drawing glitch with vertical MSW toolbars.
In case of a certain amount of whitespace at the bottom of a vertical toolbar it would not be drawn correctly: the more whitespace the more painting would be clipped starting from the left (covering the whole height of the toolbar) until the toolbar would look completely empty.

This was reproducible using the toolbar sample, setting the toolbar on the left or right edge of the window and then increasing the height of the window sufficiently.

Regression since r62971.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 15:09:13 +00:00
Vadim Zeitlin
c21a9bda7a Replace template function with template class to placate VC6.
VC6 has very poor support for template functions and in particular doesn't
understand explicitly choosing the type of the function to call so replace
template DoApplyToFont() function with FontModifier template class in
wxMarkupParserAttrOutput implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 14:01:36 +00:00
Vadim Zeitlin
1a6e6d5475 Fix for PCH-less build in markup code.
Include wx/log.h to use wxLogDebug().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 13:17:41 +00:00
Vadim Zeitlin
7d5051cb87 Update markup support documentation.
Mention that wxButton and wxStaticText now support markup in all major ports
(using the generic version of the latter under MSW).

Also mention markup changes in the change log.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:54 +00:00
Vadim Zeitlin
f672c96951 Add markup support to wxOSX/Cocoa wxStaticText and wxButton.
Add wxMarkupToAttrString helper that converts wx markup to OS X attribute
strings and use it in wxStaticText and wxButton.

This required adding new SetLabelMarkup() method to wxWidgetCocoaImpl, it
seems to make sense to have it there as it could be implemented by more
controls in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:46 +00:00
Vadim Zeitlin
83586c2aae No real changes, just make wxColour::OSXGetNSColor() const.
There is no reason to not allow calling this method on const wxColour objects.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:42 +00:00
Vadim Zeitlin
2814e718ba Add markup support to generic wxStaticText implementation.
wxMarkupText allows to easily support markup in the controls that we draw
ourselves so use it in wxGenericStaticText to have a possibility to use
markup on all platforms, even those where there is no native markup support in
wxStaticText itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:38 +00:00
Vadim Zeitlin
de1cc37868 Implement support for markup labels for wxGTK wxButton.
Simply directly set the markup for the GtkLabel used by GtkButton internally.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:30 +00:00
Vadim Zeitlin
95912bddde Add markup support to wxMSW wxButton and show it in the sample.
Use recently added wxMarkupText to implement support for markup in wxMSW
wxButton.

Update the button page of the widgets sample to show markup support.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:26 +00:00
Vadim Zeitlin
c27126c7bc Add generic wxMarkupText class implementing handling of markup.
wxMarkupText is a private class that implements generic handling of markup
strings, i.e. can measure them and render them onto a wxDC.

This class will be used for markup support in wxMSW wxButton.

Also add wxMarkupParserAttrOutput which will be useful for other wxMarkupText
implementations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:21 +00:00
Vadim Zeitlin
e29bf4b056 Add wxDC::GetFontMetrics() and implement it for wxMSW.
Add a new wxDC method allowing to retrieve the font characteristics not
available from GetTextExtent(), notably the internal leading (and also the
average font width).

Currently this is implemented for wxMSW only, the internal leading is always 0
in the other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:13 +00:00
Vadim Zeitlin
f5bdfc69a5 Add wxUSE_MARKUP and wrap SetLabelMarkup() in it.
Make it possible to disable all the new markup-related code by setting
wxUSE_MARKUP to 0 in setup.h or using configure --disable-markup option.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:48:07 +00:00
Vadim Zeitlin
b55bc1a2ca No changes, just add a couple of #if wxUSE_COMMANDLINKBUTTON tests.
Don't even declare m_chkCommandLink if we have no support for command link
buttons in the library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:59 +00:00
Vadim Zeitlin
5fd67293ff Draw the underline 1 pixel higher in wxDC::DrawLabel().
Adjust the height of the underline to be compatible with native MSW behaviour.

Notice that in wxGTK we should use pango_font_metrics_get_underline_position()
to get the font-dependent value that should be used here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:55 +00:00
Vadim Zeitlin
46e3b70f20 Restore height tweaking in wxMSWButton::GetFittingSize().
The change of r66893 was wrong, we do need to adjust the button height here
because the increase to standard height is not enough if we use bigger fonts
that require making taller buttons.

The real problem was the use of EDIT_HEIGHT_FROM_CHAR_HEIGHT() which added too
much to the height, so replace it with something based on the actual font
height. This is still arbitrary but slightly better.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:48 +00:00
Vadim Zeitlin
98977bf454 Initialize wxButton::m_authNeeded in ctor and not Create() in wxMSW.
Ensure that the member is always initialized as calling GetAuthNeeded() for a
default-constructed button would access a non-initialized variable before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:43 +00:00
Vadim Zeitlin
6af59fe7f4 No changes, just do wxButton fields initialization in Init() in wxMSW.
Add a helper function called from ctors and initialize m_imageData in it
instead of doing it in each ctor -- this will be more important when we add
more wxButton members.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:36 +00:00
Vadim Zeitlin
3b5651af39 No changes, just move wxMSW wxButton::MakeOwnerDrawn() around.
Put this method in the existing private section at the end of the class
instead of having an extra access specifier just for it for some reason.

Also add a comment explaining what it does and when is it used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:31 +00:00
Vadim Zeitlin
3da9cffc79 Replace wxST_MARKUP style with wxControl::SetLabelMarkup().
This is an incompatible change which removes the wxStaticText-specific
wxST_MARKUP style and adds wxControl::SetLabelMarkup() replacing it.

It doesn't actually change anything yet but it simplifies wxStaticText code a
lot by getting rid of many markup-related functions in it which had to behave
differently depending on whether wxST_MARKUP was used or not and also paves
way for adding markup support for the other controls in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:26 +00:00
Vadim Zeitlin
6ea2bc50c8 Don't call base class SetLabel() from GTKSetLabelForLabel().
Calling wxControlBase::SetLabel() only from GTKSetLabelForLabel() made its
behaviour inconsistent with GTKSetLabelWithMarkupForLabel() and also was
redundant in all but two places from which it was called, so remove this call
from this function itself and instead add it to its callers where it's really
needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:15 +00:00
Vadim Zeitlin
f27d4060df Remove unnecessary use of RemoveMarkup() in wxMSW wxHyperlinkCtrl.
Only the ampersands need to be escaped when setting the text of a native hyper
link control in MSW and this is done by wxControl::EscapeMnemonics(), not by
wxStaticText::RemoveMarkup() which also removes any tags which is not wanted
at all here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:11 +00:00
Vadim Zeitlin
19da7aaa9b Add wxFont::SetSymbolicSize() and SetSymbolicSizeRelativeTo().
These methods allow to set the font size using CSS-like absolute size
specifications.

Notice that the factors used here are incompatible with (but better than) the
ones used in wxBuildFontSizes() in src/html/winpars.cpp. In the future it
would be nice to reuse the new wxFont functions in wxHTML code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:47:05 +00:00
Vadim Zeitlin
801423ee34 Add wxFont::Underlined() and MakeUnderlined() methods.
Add two more helpers for consistency with the existing methods such as Bold()
and MakeBold().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:46:59 +00:00