Commit Graph

142 Commits

Author SHA1 Message Date
Vadim Zeitlin
ea47af08cb Add wxEVT_MAGNIFY mouse event.
Currently this is implemented for wxOSX only.

Closes #14322.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 13:59:26 +00:00
Vadim Zeitlin
2d20e3fc51 Harmonize wxMenuEvent handling between all major ports.
Send these events to the menu itself first, then to the menu bar containing
it or the window invoking it if it's a popup menu and, finally, to the top
level window in all of wxGTK, wxMSW and wxOSX.

In particular, this ensures that help strings are now shown in the parent MDI
frame status bar by default, even when the menus are attached to the client
MDI frame or shown as popup menus.

At the implementation level, this logic is now encapsulated in a new static
wxMenu::ProcessMenuEvent() method which can be easily modified and reused in
other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:17:58 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
18cd6f624f Document possible problem with unbinding functors.
Unbind() may currently disconnect the wrong functor as it compares them by
address.

See http://thread.gmane.org/gmane.comp.lib.wxwidgets.general/81445

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 22:35:07 +00:00
Vadim Zeitlin
33142e6284 Fix syntax error in the QueueEvent() documentation example.
Use ".", not "->", on the object.

Closes #15881.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 14:32:51 +00:00
Robin Dunn
1e0b04a9cb add missing GetVeto method
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-14 05:36:24 +00:00
Vadim Zeitlin
2194719b21 Document the order in which event tables are examined.
Static event tables are search top to bottom while dynamic event tables are
searched in the most-recently-bound to the most-early-bound order.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-25 12:12:24 +00:00
Vadim Zeitlin
58ab4de42a Document that wxEVT_MENU_CLOSE can come before wxEVT_MENU.
This is somewhat unexpected but is how both wxMSW and wxGTK work currently, so
just document the current behaviour.

See #15479.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:53 +00:00
Vadim Zeitlin
4521f6c88c Add wxActivateEvent::GetActivationReason().
This method is implemented for wxMSW-only currently and allows to check
whether the window is being activated by a mouse click or in some other way
there.

Closes #15516.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 16:25:04 +00:00
Václav Slavík
ac3bf36958 Replace @since 2.9.6 with 3.0 in the docs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-02 12:17:06 +00:00
Vadim Zeitlin
8516f4fc7a Fix Doxygen warnings due to documenting overloaded functions together.
Apparently we can't make @param statements apply just to some overloads, so
document them separately now.

See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 14:33:28 +00:00
Steve Lamerton
8c6471af3c Fix various documentation warnings throughout core and base.
See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-21 15:26:34 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Václav Slavík
cbc8576a9b Add functor-taking overload of CallAfter().
This is a generalization of the existing method-calling overloads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-21 10:05:03 +00:00
Vadim Zeitlin
5833988cb7 Add wxMouseEvent::GetColumnsPerAction().
This is similar to the existing GetLinesPerAction() but is for, surprise,
columns.

Also change the documentation to say that the value returned by both of these
methods is 3 under "most platforms" as some wxOSX currently uses 1 and not 3.

Closes #15239.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-10 15:53:29 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Robin Dunn
060298dc5c Add missing interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-17 02:50:32 +00:00
Vadim Zeitlin
e0e6f3dc80 Fix wxKeyEvent::GetPosition() after the changes of r72207.
Now that the position of wxKeyEvent is initialized on demand, don't use m_x
and m_y fields directly but always use GetX() and GetY().

Also improve GetPosition() documentation slightly and mention only the new
version, taking wxCoord, in it as the old one, taking long, is provided for
compatiblity only.

Closes #14987.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-20 12:45:52 +00:00
Vadim Zeitlin
6884a3b643 Fix a typo in wxKeyEvent::GetKeyCode() code example.
Add missing object to the method call.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-10 17:59:13 +00:00
Robin Dunn
3497ab0e3b typo fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 21:04:50 +00:00
Vadim Zeitlin
0824e36969 Fix premature truncation of brief descriptions in Doxygen comments.
Don't end the brief description at the first period if it's a period which is
part of "i.e." or "e.g.": escape the space following it to prevent Doxygen
from recognizing it as an end of sentence.

See #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 00:14:07 +00:00
Vadim Zeitlin
f0facad09d Disable CallAfter() for MSVC 7 too, it can't compile this code.
It was already disabled for VC6 but VC7 doesn't compile this code neither, so
disable it for this compiler as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-26 15:51:04 +00:00
Vadim Zeitlin
551048c28c Add wxUSE_{BASE,GUI} checks to interface headers.
This allows to define just one of them to run some tool, e.g. SWIG, on only
the classes defined in the base or in the core library (both are defined by
default for Doxygen itself).

Closes #14785.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-06 23:53:17 +00:00
Bryan Petty
831e1028de Finished adding @tableofcontents to all overviews in the manual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-03 18:34:10 +00:00
Vadim Zeitlin
03e8dc0e40 Revert "Split documentation of non-GUI wxEvent-related classes."
This reverts r72817 as it resulted in build problems for wxPython and
incorrect headers in the generated documentation.

See #14785.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-30 14:04:39 +00:00
Vadim Zeitlin
71abf17edb Split documentation of non-GUI wxEvent-related classes.
Separate GUI from base classes to make it easier to generate wrappers for just
the latter using e.g. SWIG.

Closes #14785.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-29 15:15:33 +00:00
Vadim Zeitlin
8f6bb2602b Disable wxEvtHandler::CallAfter() for VC6, it's too broken for it.
There is no clear way to implement wxRemoveRef() for VC6 so just disable it,
and CallAfter() as it relies on it, for this compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 00:17:15 +00:00
Vadim Zeitlin
cf2227623a Add wxEvtHandler::CallAfter() for asynchronous method calls.
Add wxAsyncMethodCallEvent that is handled simply by calling the method this
event was created for and add default handler for this event to wxEvtHandler.

Implement CallAfter() overloads for up to 2 parameters only for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:02:24 +00:00
Vadim Zeitlin
685d0d734b Add wxEvent::GetEventUserData() and improve user data documentation.
Provide a public and documented accessor for wxEvent::m_callbackUserData.

Also document better the user data semantics and how it can be used.

Closes #14748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-16 22:28:43 +00:00
Vadim Zeitlin
2abce4af22 Explain EVT_CONTEXT_MENU generation in more details.
Document that you should not count on specific order of mouse right button and
context menu events.

Closes #12535.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:49:24 +00:00
Vadim Zeitlin
ecad27577f Fix wxKeyEvent::GetKeyCode() descripotion: it doesn't depend on locale.
GetKeyCode() will always return valid key codes for Latin-1 symbols but won't
do it for other non-ASCII Unicode characters even if they are representable in
the current locale.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 10:46:37 +00:00
Vadim Zeitlin
6b7bcbf1ef Do not use wxIsprint() in EVT_CHAR example in the documentation.
This is incorrect as wxIsprint() is locale-dependent and only really works as
expected in UTF-8 locales (which are never used under Windows). Instead, just
test for control characters directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-09 10:46:14 +00:00
Vadim Zeitlin
9a1b36af5a Fix example of using GetUnicodeKey() in the documentation.
A Unicode key is not always printable, it can be a control character as well.

Closes #14622.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-31 12:31:44 +00:00
Vadim Zeitlin
2f7baaeccf Don't eagerly set wxKeyEvent position fields.
This results in a noticeable delay when using wxGTK via a remote X11
connection for every key event as a round trip to server is needed to get the
mouse pointer position every time a key is pressed or released.

Only provide the position on demand. And explain that it's actually not very
useful as it's simply the same as the current mouse position.

Closes #14361.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:52 +00:00
Robin Dunn
e83c4d4012 Add missing wxEVT_COMMAND_TEXT_ENTER
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-14 21:36:31 +00:00
Vadim Zeitlin
75aaa4c5ac Forward WM_{CUT,COPY,PASTE} from edit control to wxComboBox in wxMSW too.
This allows us to receive wxClipboardTextEvents from wxComboBox as well.

Update the documentation to mention this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 21:10:08 +00:00
Vadim Zeitlin
9a25f336cb Document that SetFocus() can't be called from EVT_KILL_FOCUS handler.
Also explain how to use wxIdleEvent for "delated action".

See #14335.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:21:19 +00:00
Vadim Zeitlin
95aced6193 Fix typo in wxKeyEvent::GetKeyCode() documentation example.
Use GetKeyCode() instead of (undefined) "keycode" variable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-08 13:25:41 +00:00
Vadim Zeitlin
41469c9e5e Use enum for wxMouseEvent::m_wheelAxis instead of int.
This variable can take only 2 values, use symbolic names for them instead of
difficult to understand 0 and 1.

See ##14105.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:26:59 +00:00
Vadim Zeitlin
8cddee2d0e Fix spelling in the documentation.
Closes #14034.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-22 13:41:07 +00:00
Vadim Zeitlin
a0bf1b587f Remove documentation of inexistent wxEvtHandler::TryThis().
This method existed only briefly and was replaced by Try{Before,After}().

Closes #14012.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-20 21:56:59 +00:00
Vadim Zeitlin
06bfd04527 Explicitly document that hidden windows get wxEVT_IDLE events.
This wasn't always the case and could be unexpected so document this behaviour
clearly, also explain the rationale for it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-15 15:39:37 +00:00
Vadim Zeitlin
37fff49cf1 Document MSW-only wxEVT_MOVING event.
As we documented EVT_MOVE_{START,END}, we should do it for this one as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-09 16:22:04 +00:00
Vadim Zeitlin
3b2f80c205 Set Z-position correctly for wxEVT_JOY_ZMOVE events.
Z-move events don't have (x, y) position, but they do have Z-position which
needs to be set.

Also don't use (x, y) position for these events in the sample.

See #748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:29 +00:00
Robin Dunn
50e55c13ea Interface fixes and tweaks for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-30 06:14:17 +00:00
Vadim Zeitlin
7f3f059ac5 Complete wxEVT_MENU_{OPEN,CLOSE} implementation in wxMSW and wxOSX.
Set the wxMenu correctly for wxEVT_MENU_CLOSE events in wxMSW.

Set the menu id correctly to allow wxMenuEvent::IsPopup() to work for both
wxEVT_MENU_OPEN and wxEVT_MENU_CLOSE in wxOSX.

Closes #11313.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-28 13:51:17 +00:00
Vadim Zeitlin
4cf1a9bf4a Ensure that Enter key presses are never stolen from wxButton in wxMSW.
This commit fixes the following bug: when an in-place editor control containing
an embedded button was used in wxDataViewCtrl, pressing Enter on the button
would close the editor, accepting changes, instead as (generic) wxDataViewCtrl
intercepts WXK_RETURN in its EVT_CHAR_HOOK handler. To prevent this from
happening, wxButton now handles EVT_CHAR_HOOK itself and never lets the parent
window intercept it if it's for WXK_RETURN. To ensure that normal
wxEVT_KEY_DOWN and wxEVT_CHAR are still generated in this case, wxButton
handler calls the new wxKeyEvent::DoAllowNextEvent() method that was added to
allow suppressing EVT_CHAR_HOOK only, without affecting the subsequent events.
DoAllowNextEvent() is currently only used in wxMSW but support for it was also
added to wxGTK and (both) wxOSX ports.

See #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 17:03:56 +00:00
Vadim Zeitlin
5fafec4d9f Document that wxEraseEvent::GetDC() never returns NULL.
This makes implementation of EVT_ERASE_BACKGROUND handlers simpler.

Closes #13736.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-08 13:07:53 +00:00
Vadim Zeitlin
3a95f73c00 Make wxEVT_CHAR_HOOK propagate upwards and send it to the window itself.
Send wxEVT_CHAR_HOOK events to the focused window itself but make them
propagatable to ensure that the parent windows (including the top level
parent) still get it. This still allows the TLW parent to intercept keyboard
handling in its child but allows the child (or an intermediate parent window)
to have some say in the matter.

See #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:25 +00:00
Vadim Zeitlin
f47a359113 Make wxEVT_CHAR_HOOK behave in wxGTK as in wxMSW.
Send wxEVT_CHAR_HOOK before wxEVT_KEY_DOWN and avoid generating both
wxEVT_KEY_DOWN and wxEVT_CHAR if the hook event was handled.

This makes wxGTK behave consistently with wxMSW and wxOSX/Cocoa as can be seen
in the keyboard sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-02 00:50:22 +00:00