/////////////////////////////////////////////////////////////////////////////
// Name: event.h
-// Purpose: documentation for wxKeyEvent class
+// Purpose: interface of wxKeyEvent
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
1, the ASCII value of this key combination.
You may discover how the other keys on your system behave interactively by
- running the text wxWidgets sample and pressing some keys
+ running the text() wxWidgets sample and pressing some keys
in any of the text controls shown in it.
@b Note: If a key down (@c EVT_KEY_DOWN) event is caught and
Notice that GetModifiers() is easier to use
correctly than this function so you should consider using it in new code.
*/
- bool AltDown();
+ bool AltDown() const;
/**
CMD is a pseudo key which is the same as Control for PC and Unix
this is the same as ControlDown() and under
Mac this is the same as MetaDown().
*/
- bool CmdDown();
+ bool CmdDown() const;
/**
Returns @true if the control key was down at the time of the key event.
Notice that GetModifiers() is easier to use
correctly than this function so you should consider using it in new code.
*/
- bool ControlDown();
+ bool ControlDown() const;
/**
Returns the virtual key code. ASCII events return normal ASCII values,
while non-ASCII events return values such as @b WXK_LEFT for the
- left cursor key. See Keycodes for a full list of
+ left cursor key. See Keycodes() for a full list of
the virtual key codes.
Note that in Unicode build, the returned value is meaningful only if the
user entered a character that can be represented in current locale's default
charset. You can obtain the corresponding Unicode character using
GetUnicodeKey().
*/
- int GetKeyCode();
+ int GetKeyCode() const;
/**
Return the bitmask of modifier keys which were pressed when this event
with this function.
*/
- int GetModifiers();
+ int GetModifiers() const;
//@{
/**
Obtains the position (in client coordinates) at which the key was pressed.
*/
- wxPoint GetPosition();
- void GetPosition(long* x, long* y);
+ wxPoint GetPosition() const;
+ const void GetPosition(long* x, long* y) const;
//@}
/**
@b NB: Currently the raw key codes are not supported by all ports, use
@c #ifdef wxHAS_RAW_KEY_CODES to determine if this feature is available.
*/
- wxUint32 GetRawKeyCode();
+ wxUint32 GetRawKeyCode() const;
/**
Returns the low level key flags for this event. The flags are
@b NB: Currently the raw key flags are not supported by all ports, use
@c #ifdef wxHAS_RAW_KEY_CODES to determine if this feature is available.
*/
- wxUint32 GetRawKeyFlags();
+ wxUint32 GetRawKeyFlags() const;
/**
Returns the Unicode character corresponding to this key event.
This function is only available in Unicode build, i.e. when
@c wxUSE_UNICODE is 1.
*/
- wxChar GetUnicodeKey();
+ wxChar GetUnicodeKey() const;
/**
Returns the X position (in client coordinates) of the event.
*/
- long GetX();
+ long GetX() const;
/**
Returns the Y (in client coordinates) position of the event.
*/
- long GetY();
+ long GetY() const;
/**
Returns @true if either CTRL or ALT keys was down
META under X but the key presses even while NUMLOCK is on should
be still processed normally).
*/
- bool HasModifiers();
+ bool HasModifiers() const;
/**
Returns @true if the Meta key was down at the time of the key event.
Notice that GetModifiers() is easier to use
correctly than this function so you should consider using it in new code.
*/
- bool MetaDown();
+ bool MetaDown() const;
/**
Returns @true if the shift key was down at the time of the key event.
Notice that GetModifiers() is easier to use
correctly than this function so you should consider using it in new code.
*/
- bool ShiftDown();
+ bool ShiftDown() const;
/**
bool m_altDown
long m_keyCode
@b Deprecated: Please use GetKeyCode()
instead!
- Virtual keycode. See Keycodes for a list of identifiers.
+ Virtual keycode. See Keycodes() for a list of identifiers.
*/
};
+
/**
@class wxJoystickEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxJoystick
+ @see wxJoystick
*/
class wxJoystickEvent : public wxEvent
{
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
*/
- bool ButtonDown(int button = wxJOY_BUTTON_ANY);
+ bool ButtonDown(int button = wxJOY_BUTTON_ANY) const;
/**
Returns @true if the specified button (or any button) was in a down state.
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
*/
- bool ButtonIsDown(int button = wxJOY_BUTTON_ANY);
+ bool ButtonIsDown(int button = wxJOY_BUTTON_ANY) const;
/**
Returns @true if the event was an up event from the specified button (or any
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
*/
- bool ButtonUp(int button = wxJOY_BUTTON_ANY);
+ bool ButtonUp(int button = wxJOY_BUTTON_ANY) const;
/**
Returns the identifier of the button changing state. This is a wxJOY_BUTTONn
identifier, where
n is one of 1, 2, 3, 4.
*/
- int GetButtonChange();
+ int GetButtonChange() const;
/**
Returns the down state of the buttons. This is a bitlist of wxJOY_BUTTONn
identifiers, where
n is one of 1, 2, 3, 4.
*/
- int GetButtonState();
+ int GetButtonState() const;
/**
Returns the identifier of the joystick generating the event - one of
wxJOYSTICK1 and wxJOYSTICK2.
*/
- int GetJoystick();
+ int GetJoystick() const;
/**
Returns the x, y position of the joystick event.
*/
- wxPoint GetPosition();
+ wxPoint GetPosition() const;
/**
Returns the z position of the joystick event.
*/
- int GetZPosition();
+ int GetZPosition() const;
/**
Returns @true if this was a button up or down event (@e not 'is any button
down?').
*/
- bool IsButton();
+ bool IsButton() const;
/**
Returns @true if this was an x, y move event.
*/
- bool IsMove();
+ bool IsMove() const;
/**
Returns @true if this was a z move event.
*/
- bool IsZMove();
+ bool IsZMove() const;
};
+
/**
@class wxScrollWinEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxScrollEvent, @ref overview_eventhandlingoverview
+ @see wxScrollEvent, @ref overview_eventhandlingoverview
*/
class wxScrollWinEvent : public wxEvent
{
Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the
scrollbar.
*/
- int GetOrientation();
+ int GetOrientation() const;
/**
Returns the position of the scrollbar for the thumb track and release events.
Note that this field can't be used for the other events, you need to query
the window itself for the current position in that case.
*/
- int GetPosition();
+ int GetPosition() const;
};
+
/**
@class wxSysColourChangedEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxSysColourChangedEvent : public wxEvent
{
};
+
/**
@class wxWindowCreateEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview, wxWindowDestroyEvent
+ @see @ref overview_eventhandlingoverview, wxWindowDestroyEvent
*/
class wxWindowCreateEvent : public wxCommandEvent
{
};
+
/**
@class wxPaintEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxPaintEvent : public wxEvent
{
};
+
/**
@class wxMaximizeEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview, wxTopLevelWindow::Maximize,
+ @see @ref overview_eventhandlingoverview, wxTopLevelWindow::Maximize,
wxTopLevelWindow::IsMaximized
*/
class wxMaximizeEvent : public wxEvent
};
+
/**
@class wxUpdateUIEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxUpdateUIEvent : public wxCommandEvent
{
/**
Returns @true if the UI element should be checked.
*/
- bool GetChecked();
+ bool GetChecked() const;
/**
Returns @true if the UI element should be enabled.
*/
- bool GetEnabled();
+ bool GetEnabled() const;
/**
Static function returning a value specifying how wxWidgets
Returns @true if the application has called Check(). For wxWidgets internal use
only.
*/
- bool GetSetChecked();
+ bool GetSetChecked() const;
/**
Returns @true if the application has called Enable(). For wxWidgets internal use
only.
*/
- bool GetSetEnabled();
+ bool GetSetEnabled() const;
/**
Returns @true if the application has called Show(). For wxWidgets internal use
only.
*/
- bool GetSetShown();
+ bool GetSetShown() const;
/**
Returns @true if the application has called SetText(). For wxWidgets internal
use only.
*/
- bool GetSetText();
+ bool GetSetText() const;
/**
Returns @true if the UI element should be shown.
*/
- bool GetShown();
+ bool GetShown() const;
/**
Returns the text that should be set for the UI element.
*/
- wxString GetText();
+ wxString GetText() const;
/**
Returns the current interval between updates in milliseconds.
};
+
/**
@class wxClipboardTextEvent
@wxheader{event.h}
wxEVT_COMMAND_TEXT_CUT and wxEVT_COMMAND_TEXT_PASTE.
If any of these events is processed (without being skipped) by an event
- handler, the corresponding operation doesn't take place which allows to prevent
- the text from being copied from or pasted to a control. It is also possible to
- examine the clipboard contents in the PASTE event handler and transform it in
- some way before inserting in a control -- for example, changing its case or
- removing invalid characters.
+ handler, the corresponding operation doesn't take place which allows to
+ prevent the text from being copied from or pasted to a control. It is also
+ possible to examine the clipboard contents in the PASTE event handler and
+ transform it in some way before inserting in a control -- for example,
+ changing its case or removing invalid characters.
Finally notice that a CUT event is always preceded by the COPY event which
- makes it possible to only process the latter if it doesn't matter if the text
- was copied or cut.
+ makes it possible to only process the latter if it doesn't matter if the
+ text was copied or cut.
+
+ @beginEventTable
+ @event{EVT_TEXT_COPY(id, func)}:
+ Some or all of the controls content was copied to the clipboard.
+ @event{EVT_TEXT_CUT(id, func)}:
+ Some or all of the controls content was cut (i.e. copied and
+ deleted).
+ @event{EVT_TEXT_PASTE(id, func)}:
+ Clipboard content was pasted into the control.
+ @endEventTable
+
+ @note
+ These events are currently only generated by wxTextCtrl under GTK+. They
+ are generated by all controls under Windows.
@library{wxcore}
@category{events}
- @seealso
- wxClipboard
+ @see wxClipboard
*/
class wxClipboardTextEvent : public wxCommandEvent
{
public:
/**
-
+ Constructor.
*/
- wxClipboardTextEvent(wxEventType commandType = wxEVT_NULL,
- int id = 0);
+ wxClipboardTextEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
};
+
/**
@class wxMouseEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxKeyEvent::CmdDown
+ @see wxKeyEvent::CmdDown
*/
class wxMouseEvent : public wxEvent
{
/**
Returns @true if the event was a first extra button double click.
*/
- bool Aux1DClick();
+ bool Aux1DClick() const;
/**
Returns @true if the first extra button mouse button changed to down.
*/
- bool Aux1Down();
+ bool Aux1Down() const;
/**
Returns @true if the first extra button mouse button is currently down,
independent
of the current event type.
*/
- bool Aux1IsDown();
+ bool Aux1IsDown() const;
/**
Returns @true if the first extra button mouse button changed to up.
*/
- bool Aux1Up();
+ bool Aux1Up() const;
/**
Returns @true if the event was a second extra button double click.
*/
- bool Aux2DClick();
+ bool Aux2DClick() const;
/**
Returns @true if the second extra button mouse button changed to down.
*/
- bool Aux2Down();
+ bool Aux2Down() const;
/**
Returns @true if the second extra button mouse button is currently down,
independent
of the current event type.
*/
- bool Aux2IsDown();
+ bool Aux2IsDown() const;
/**
Returns @true if the second extra button mouse button changed to up.
*/
- bool Aux2Up();
+ bool Aux2Up() const;
/**
Returns @true if the identified mouse button is changing state. Valid
@see wxKeyEvent::CmdDown
*/
- bool CmdDown();
+ bool CmdDown() const;
/**
Returns @true if the control key was down at the time of the event.
double click events, @c wxMOUSE_BTN_MIDDLE and @c wxMOUSE_BTN_RIGHT
for the same events for the middle and the right buttons respectively.
*/
- int GetButton();
+ int GetButton() const;
/**
Returns the number of mouse clicks for this event: 1 for a simple click, 2
Currently this function is implemented only in wxMac and returns -1 for the
other platforms (you can still distinguish simple clicks from double-clicks as
they generate different kinds of events however).
- This function is new since wxWidgets version 2.9.0
+
+ @wxsince{2.9.0}
*/
- int GetClickCount();
+ int GetClickCount() const;
/**
Returns the configured number of lines (or whatever) to be scrolled per
wheel action. Defaults to three.
*/
- int GetLinesPerAction();
+ int GetLinesPerAction() const;
/**
Returns the logical mouse position in pixels (i.e. translated according to the
translation set for the DC, which usually indicates that the window has been
scrolled).
*/
- wxPoint GetLogicalPosition(const wxDC& dc);
+ wxPoint GetLogicalPosition(const wxDC& dc) const;
//@{
/**
keyboard combination (e.g. under Windows when the "menu'' key is pressed), the
returned position is @c wxDefaultPosition.
*/
- wxPoint GetPosition();
- void GetPosition(wxCoord* x, wxCoord* y);
- void GetPosition(long* x, long* y);
+ wxPoint GetPosition() const;
+ const void GetPosition(wxCoord* x, wxCoord* y) const;
+ const void GetPosition(long* x, long* y) const;
//@}
/**
taken, and one such action (for example, scrolling one increment)
should occur for each delta.
*/
- int GetWheelDelta();
+ int GetWheelDelta() const;
/**
Get wheel rotation, positive or negative indicates direction of
should be able to either do partial line scrolling or wait until several
events accumulate before scrolling.
*/
- int GetWheelRotation();
+ int GetWheelRotation() const;
/**
Returns X coordinate of the physical mouse event position.
*/
- long GetX();
+ long GetX() const;
/**
Returns Y coordinate of the physical mouse event position.
down event -
that may be tested using @e ButtonDown).
*/
- bool IsButton();
+ bool IsButton() const;
/**
Returns @true if the system has been setup to do page scrolling with
the mouse wheel instead of line scrolling.
*/
- bool IsPageScroll();
+ bool IsPageScroll() const;
/**
Returns @true if the mouse was leaving the window.
See also Entering().
*/
- bool Leaving();
+ bool Leaving() const;
/**
Returns @true if the event was a left double click.
*/
- bool LeftDClick();
+ bool LeftDClick() const;
/**
Returns @true if the left mouse button changed to down.
*/
- bool LeftDown();
+ bool LeftDown() const;
/**
Returns @true if the left mouse button is currently down, independent
This event is usually used in the mouse event handlers which process "move
mouse" messages to determine whether the user is (still) dragging the mouse.
*/
- bool LeftIsDown();
+ bool LeftIsDown() const;
/**
Returns @true if the left mouse button changed to up.
*/
- bool LeftUp();
+ bool LeftUp() const;
/**
Returns @true if the Meta key was down at the time of the event.
*/
- bool MetaDown();
+ bool MetaDown() const;
/**
Returns @true if the event was a middle double click.
*/
- bool MiddleDClick();
+ bool MiddleDClick() const;
/**
Returns @true if the middle mouse button changed to down.
*/
- bool MiddleDown();
+ bool MiddleDown() const;
/**
Returns @true if the middle mouse button is currently down, independent
of the current event type.
*/
- bool MiddleIsDown();
+ bool MiddleIsDown() const;
/**
Returns @true if the middle mouse button changed to up.
*/
- bool MiddleUp();
+ bool MiddleUp() const;
/**
Returns @true if this was a motion event and no mouse buttons were pressed.
If any mouse button is held pressed, then this method returns @false and
Dragging() returns @true.
*/
- bool Moving();
+ bool Moving() const;
/**
Returns @true if the event was a right double click.
*/
- bool RightDClick();
+ bool RightDClick() const;
/**
Returns @true if the right mouse button changed to down.
*/
- bool RightDown();
+ bool RightDown() const;
/**
Returns @true if the right mouse button is currently down, independent
of the current event type.
*/
- bool RightIsDown();
+ bool RightIsDown() const;
/**
Returns @true if the right mouse button changed to up.
*/
- bool RightUp();
+ bool RightUp() const;
/**
Returns @true if the shift key was down at the time of the event.
*/
- bool ShiftDown();
+ bool ShiftDown() const;
/**
bool m_altDown
};
+
/**
@class wxDropFilesEvent
@wxheader{event.h}
wxWindow::DragAcceptFiles.
Important note: this is a separate implementation to the more general
- drag and drop implementation documented here. It uses the
+ drag and drop implementation documented here(). It uses the
older, Windows message-based approach of dropping files.
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxDropFilesEvent : public wxEvent
{
/**
Returns an array of filenames.
*/
- wxString* GetFiles();
+ wxString* GetFiles() const;
/**
Returns the number of files dropped.
*/
- int GetNumberOfFiles();
+ int GetNumberOfFiles() const;
/**
Returns the position at which the files were dropped.
Returns an array of filenames.
*/
- wxPoint GetPosition();
+ wxPoint GetPosition() const;
/**
wxString* m_files
};
+
/**
@class wxCommandEvent
@wxheader{event.h}
/**
Deprecated, use IsChecked() instead.
*/
- bool Checked();
+ bool Checked() const;
/**
Returns client data pointer for a listbox or choice selection event
Notice that this method can not be used with
wxCheckListBox currently.
*/
- bool IsChecked();
+ bool IsChecked() const;
/**
For a listbox or similar event, returns @true if it is a selection, @false if it
};
+
/**
@class wxActivateEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview, wxApp::IsActive
+ @see @ref overview_eventhandlingoverview, wxApp::IsActive
*/
class wxActivateEvent : public wxEvent
{
/**
Returns @true if the application or window is being activated, @false otherwise.
*/
- bool GetActive();
+ bool GetActive() const;
};
+
/**
@class wxContextMenuEvent
@wxheader{event.h}
means that the event originated
from a keyboard context button event, and you should compute a suitable
position yourself,
- for example by calling wxGetMousePosition.
+ for example by calling wxGetMousePosition().
When a keyboard context menu button is pressed on Windows, a right-click event
with default position is sent first,
@library{wxcore}
@category{events}
- @seealso
- @ref overview_wxcommandevent "Command events", @ref
+ @see @ref overview_wxcommandevent "Command events", @ref
overview_eventhandlingoverview
*/
class wxContextMenuEvent : public wxCommandEvent
If the event originated from a keyboard event, the value returned from this
function will be wxDefaultPosition.
*/
- wxPoint GetPosition();
+ wxPoint GetPosition() const;
/**
Sets the position at which the menu should be shown.
};
+
/**
@class wxEraseEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxEraseEvent : public wxEvent
{
/**
Returns the device context associated with the erase event to draw on.
*/
- wxDC* GetDC();
+ wxDC* GetDC() const;
};
+
/**
@class wxFocusEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxFocusEvent : public wxEvent
{
};
+
/**
@class wxChildFocusEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxChildFocusEvent : public wxCommandEvent
{
};
+
/**
@class wxMouseCaptureLostEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxMouseCaptureChangedEvent, @ref overview_eventhandlingoverview,
+ @see wxMouseCaptureChangedEvent, @ref overview_eventhandlingoverview,
wxWindow::CaptureMouse, wxWindow::ReleaseMouse, wxWindow::GetCapture
*/
class wxMouseCaptureLostEvent : public wxEvent
};
+
/**
@class wxNotifyEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxNotebookEvent
+ @see wxNotebookEvent
*/
class wxNotifyEvent : public wxCommandEvent
{
Returns @true if the change is allowed (Veto()
hasn't been called) or @false otherwise (if it was).
*/
- bool IsAllowed();
+ bool IsAllowed() const;
/**
Prevents the change announced by this event from happening.
};
+
/**
@class wxHelpEvent
@wxheader{event.h}
@library{wxcore}
@category{FIXME}
- @seealso
- wxContextHelp, wxDialog, @ref overview_eventhandlingoverview
+ @see wxContextHelp, wxDialog, @ref overview_eventhandlingoverview
*/
class wxHelpEvent : public wxCommandEvent
{
MS Windows.
The application may handle events generated using the keyboard or mouse
- differently, e.g. by using wxGetMousePosition
+ differently, e.g. by using wxGetMousePosition()
for the mouse events.
@see SetOrigin()
*/
- wxHelpEvent::Origin GetOrigin();
+ wxHelpEvent::Origin GetOrigin() const;
/**
Returns the left-click position of the mouse, in screen coordinates. This allows
the application to position the help appropriately.
*/
- const wxPoint GetPosition();
+ const wxPoint GetPosition() const;
/**
Set the help event origin, only used internally by wxWidgets normally.
};
+
/**
@class wxScrollEvent
@wxheader{event.h}
A scroll event holds information about events sent from stand-alone
- scrollbars and sliders. Note that
+ scrollbars() and sliders(). Note that
starting from wxWidgets 2.1, scrolled windows send the
wxScrollWinEvent which does not derive from
wxCommandEvent, but from wxEvent directly - don't confuse these two kinds of
@library{wxcore}
@category{events}
- @seealso
- wxScrollBar, wxSlider, wxSpinButton, , wxScrollWinEvent, @ref
+ @see wxScrollBar, wxSlider, wxSpinButton, , wxScrollWinEvent, @ref
overview_eventhandlingoverview
*/
class wxScrollEvent : public wxCommandEvent
Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the
scrollbar.
*/
- int GetOrientation();
+ int GetOrientation() const;
/**
Returns the position of the scrollbar.
*/
- int GetPosition();
+ int GetPosition() const;
};
+
/**
@class wxIdleEvent
@wxheader{event.h}
happens and only then is the next idle event sent again. If you need to ensure
a continuous stream of idle events, you can either use
wxIdleEvent::RequestMore method in your handler or call
- wxWakeUpIdle periodically (for example from timer
+ wxWakeUpIdle() periodically (for example from timer
event), but note that both of these approaches (and especially the first one)
increase the system load and so should be avoided if possible.
@library{wxbase}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview, wxUpdateUIEvent, wxWindow::OnInternalIdle
+ @see @ref overview_eventhandlingoverview, wxUpdateUIEvent,
+ wxWindow::OnInternalIdle
*/
class wxIdleEvent : public wxEvent
{
@see RequestMore()
*/
- bool MoreRequested();
+ bool MoreRequested() const;
/**
Tells wxWidgets that more processing is required. This function can be called
};
+
/**
@class wxInitDialogEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxInitDialogEvent : public wxEvent
{
};
+
/**
@class wxWindowDestroyEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview, wxWindowCreateEvent
+ @see @ref overview_eventhandlingoverview, wxWindowCreateEvent
*/
class wxWindowDestroyEvent : public wxCommandEvent
{
};
+
/**
@class wxNavigationKeyEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxWindow::Navigate, wxWindow::NavigateIn
+ @see wxWindow::Navigate, wxWindow::NavigateIn
*/
class wxNavigationKeyEvent
{
/**
Returns the child that has the focus, or @NULL.
*/
- wxWindow* GetCurrentFocus();
+ wxWindow* GetCurrentFocus() const;
/**
Returns @true if the navigation was in the forward direction.
*/
- bool GetDirection();
+ bool GetDirection() const;
/**
Returns @true if the navigation event was from a tab key. This is required
for proper navigation over radio buttons.
*/
- bool IsFromTab();
+ bool IsFromTab() const;
/**
Returns @true if the navigation event represents a window change (for
example, from Ctrl-Page Down
in a notebook).
*/
- bool IsWindowChange();
+ bool IsWindowChange() const;
/**
Sets the current focus window member.
};
+
/**
@class wxMouseCaptureChangedEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxMouseCaptureLostEvent, @ref overview_eventhandlingoverview,
+ @see wxMouseCaptureLostEvent, @ref overview_eventhandlingoverview,
wxWindow::CaptureMouse, wxWindow::ReleaseMouse, wxWindow::GetCapture
*/
class wxMouseCaptureChangedEvent : public wxEvent
Returns the window that gained the capture, or @NULL if it was a non-wxWidgets
window.
*/
- wxWindow* GetCapturedWindow();
+ wxWindow* GetCapturedWindow() const;
};
+
/**
@class wxCloseEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxWindow::Close, @ref overview_windowdeletionoverview "Window deletion overview"
+ @see wxWindow::Close, @ref overview_windowdeletionoverview "Window deletion
+ overview"
*/
class wxCloseEvent : public wxEvent
{
shutting down. This method can only be called for end session and query end
session events, it doesn't make sense for close window event.
*/
- bool GetLoggingOff();
+ bool GetLoggingOff() const;
/**
Sets the 'can veto' flag.
/**
Sets the 'force' flag.
*/
- void SetForce(bool force);
+ void SetForce(bool force) const;
/**
Sets the 'logging off' flag.
*/
- void SetLoggingOff(bool loggingOff);
+ void SetLoggingOff(bool loggingOff) const;
/**
Call this from your event handler to veto a system shutdown or to signal
};
+
/**
@class wxMenuEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_wxcommandevent "Command events", @ref
+ @see @ref overview_wxcommandevent "Command events", @ref
overview_eventhandlingoverview
*/
class wxMenuEvent : public wxEvent
used with the @c OPEN and @c CLOSE events and even for them the
returned pointer may be @NULL in some ports.
*/
- wxMenu* GetMenu();
+ wxMenu* GetMenu() const;
/**
Returns the menu identifier associated with the event. This method should be
only used with the @c HIGHLIGHT events.
*/
- int GetMenuId();
+ int GetMenuId() const;
/**
Returns @true if the menu which is being opened or closed is a popup menu,
@false if it is a normal one.
This method should only be used with the @c OPEN and @c CLOSE events.
*/
- bool IsPopup();
+ bool IsPopup() const;
};
+
/**
@class wxEventBlocker
@wxheader{event.h}
@library{wxcore}
@category{FIXME}
- @seealso
- @ref overview_eventhandlingoverview, wxEvtHandler
+ @see @ref overview_eventhandlingoverview, wxEvtHandler
*/
class wxEventBlocker : public wxEvtHandler
{
};
+
/**
@class wxEvtHandler
@wxheader{event.h}
@library{wxbase}
@category{FIXME}
- @seealso
- @ref overview_eventhandlingoverview
+ @see @ref overview_eventhandlingoverview
*/
class wxEvtHandler : public wxObject
{
@see SetClientObject(), wxClientData
*/
- wxClientData* GetClientObject();
+ wxClientData* GetClientObject() const;
/**
Returns @true if the event handler is enabled, @false otherwise.
};
+
/**
@class wxIconizeEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- @ref overview_eventhandlingoverview, wxTopLevelWindow::Iconize,
+ @see @ref overview_eventhandlingoverview, wxTopLevelWindow::Iconize,
wxTopLevelWindow::IsIconized
*/
class wxIconizeEvent : public wxEvent
Returns @true if the frame has been iconized, @false if it has been
restored.
*/
- bool Iconized();
+ bool Iconized() const;
};
+
/**
@class wxMoveEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxPoint, @ref overview_eventhandlingoverview
+ @see wxPoint, @ref overview_eventhandlingoverview
*/
class wxMoveEvent : public wxEvent
{
/**
Returns the position of the window generating the move change event.
*/
- wxPoint GetPosition();
+ wxPoint GetPosition() const;
};
+
/**
@class wxEvent
@wxheader{event.h}
@library{wxbase}
@category{events}
- @seealso
- wxCommandEvent, wxMouseEvent
+ @see wxCommandEvent, wxMouseEvent
*/
class wxEvent : public wxObject
{
Returns a copy of the event.
Any event that is posted to the wxWidgets event system for later action (via
wxEvtHandler::AddPendingEvent or
- wxPostEvent) must implement this method. All wxWidgets
+ wxPostEvent()) must implement this method. All wxWidgets
events fully implement this method, but any derived events implemented by the
user should also implement this method just in case they (or some event
derived from them) are ever posted.
implementing the Clone function is to implement a copy constructor for
a new event (call it MyEvent) and then define the Clone function like this:
*/
- virtual wxEvent* Clone();
+ virtual wxEvent* Clone() const;
/**
Returns the object (usually a window) associated with the
/**
Returns the identifier associated with this event, such as a button command id.
*/
- int GetId();
+ int GetId() const;
/**
Returns @true if the event handler should be skipped, @false otherwise.
*/
- bool GetSkipped();
+ bool GetSkipped() const;
/**
Gets the timestamp for the event. The timestamp is the time in milliseconds
wxCommandEvent else it returns @false.
Note: Exists only for optimization purposes.
*/
- bool IsCommandEvent();
+ bool IsCommandEvent() const;
/**
Sets the propagation level to the given value (for example returned from an
Test if this event should be propagated or not, i.e. if the propagation level
is currently greater than 0.
*/
- bool ShouldPropagate();
+ bool ShouldPropagate() const;
/**
This method can be used inside an event handler to control whether further
};
+
/**
@class wxSizeEvent
@wxheader{event.h}
@library{wxcore}
@category{events}
- @seealso
- wxSize, @ref overview_eventhandlingoverview
+ @see wxSize, @ref overview_eventhandlingoverview
*/
class wxSizeEvent : public wxEvent
{
/**
Returns the entire size of the window generating the size change event.
*/
- wxSize GetSize();
+ wxSize GetSize() const;
};
+
/**
@class wxSetCursorEvent
@wxheader{event.h}
@library{wxcore}
@category{FIXME}
- @seealso
- ::wxSetCursor, wxWindow::wxSetCursor
+ @see ::wxSetCursor, wxWindow::wxSetCursor
*/
class wxSetCursorEvent : public wxEvent
{
/**
Returns a reference to the cursor specified by this event.
*/
- wxCursor GetCursor();
+ wxCursor GetCursor() const;
/**
Returns the X coordinate of the mouse in client coordinates.
*/
- wxCoord GetX();
+ wxCoord GetX() const;
/**
Returns the Y coordinate of the mouse in client coordinates.
*/
- wxCoord GetY();
+ wxCoord GetY() const;
/**
Returns @true if the cursor specified by this event is a valid cursor.
@remarks You cannot specify wxNullCursor with this event, as it is not
considered a valid cursor.
*/
- bool HasCursor();
+ bool HasCursor() const;
/**
Sets the cursor associated with this event.
*/
void SetCursor(const wxCursor& cursor);
};
+
+
+
+/**
+ In a GUI application, this function posts @a event to the specified @e dest
+ object using wxEvtHandler::AddPendingEvent.
+
+ Otherwise, it dispatches @a event immediately using wxEvtHandler::ProcessEvent.
+ See the respective documentation for details (and caveats).
+*/
+void wxPostEvent(wxEvtHandler* dest, wxEvent& event);