m_metaDown(false)
{}
- wxCoord GetX() { return m_x; }
- wxCoord GetY() { return m_y; }
-
- bool LeftDown() { return m_leftDown; }
- bool MiddleDown() { return m_middleDown; }
- bool RightDown() { return m_rightDown; }
- bool Aux1Down() { return m_aux1Down; }
- bool Aux2Down() { return m_aux2Down; }
-
- bool ControlDown() { return m_controlDown; }
- bool ShiftDown() { return m_shiftDown; }
- bool AltDown() { return m_altDown; }
- bool MetaDown() { return m_metaDown; }
- bool CmdDown()
+ wxCoord GetX() const { return m_x; }
+ wxCoord GetY() const { return m_y; }
+ wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
+
+ bool LeftDown() const { return m_leftDown; }
+ bool MiddleDown() const { return m_middleDown; }
+ bool RightDown() const { return m_rightDown; }
+ bool Aux1Down() const { return m_aux1Down; }
+ bool Aux2Down() const { return m_aux2Down; }
+
+ bool ControlDown() const { return m_controlDown; }
+ bool ShiftDown() const { return m_shiftDown; }
+ bool AltDown() const { return m_altDown; }
+ bool MetaDown() const { return m_metaDown; }
+ bool CmdDown() const
{
#if defined(__WXMAC__) || defined(__WXCOCOA__)
return MetaDown();
#endif
}
- void SetX(wxCoord x) { m_x = x; }
- void SetY(wxCoord y) { m_y = y; }
+ void SetX(wxCoord x) { m_x = x; }
+ void SetY(wxCoord y) { m_y = y; }
- void SetLeftDown(bool down) { m_leftDown = down; }
- void SetMiddleDown(bool down) { m_middleDown = down; }
- void SetRightDown(bool down) { m_rightDown = down; }
- void SetAux1Down(bool down) { m_aux1Down = down; }
- void SetAux2Down(bool down) { m_aux2Down = down; }
+ void SetLeftDown(bool down) { m_leftDown = down; }
+ void SetMiddleDown(bool down) { m_middleDown = down; }
+ void SetRightDown(bool down) { m_rightDown = down; }
+ void SetAux1Down(bool down) { m_aux1Down = down; }
+ void SetAux2Down(bool down) { m_aux2Down = down; }
- void SetControlDown(bool down) { m_controlDown = down; }
- void SetShiftDown(bool down) { m_shiftDown = down; }
- void SetAltDown(bool down) { m_altDown = down; }
- void SetMetaDown(bool down) { m_metaDown = down; }
+ void SetControlDown(bool down) { m_controlDown = down; }
+ void SetShiftDown(bool down) { m_shiftDown = down; }
+ void SetAltDown(bool down) { m_altDown = down; }
+ void SetMetaDown(bool down) { m_metaDown = down; }
private:
- wxCoord m_x;
- wxCoord m_y;
-
- bool m_leftDown : 1;
- bool m_middleDown : 1;
- bool m_rightDown : 1;
- bool m_aux1Down : 1;
- bool m_aux2Down : 1;
-
- bool m_controlDown : 1;
- bool m_shiftDown : 1;
- bool m_altDown : 1;
- bool m_metaDown : 1;
+ wxCoord m_x,
+ m_y;
+
+ bool m_leftDown : 1;
+ bool m_middleDown : 1;
+ bool m_rightDown : 1;
+ bool m_aux1Down : 1;
+ bool m_aux2Down : 1;
+
+ bool m_controlDown : 1;
+ bool m_shiftDown : 1;
+ bool m_altDown : 1;
+ bool m_metaDown : 1;
};
enum wxShutdownFlags
{
- wxSHUTDOWN_POWEROFF, // power off the computer
- wxSHUTDOWN_REBOOT // shutdown and reboot
+ wxSHUTDOWN_FORCE = 1,// can be combined with other flags (MSW-only)
+ wxSHUTDOWN_POWEROFF = 2,// power off the computer
+ wxSHUTDOWN_REBOOT = 4,// shutdown and reboot
+ wxSHUTDOWN_LOGOFF = 8 // close session (currently MSW-only)
};
// Shutdown or reboot the PC
-WXDLLIMPEXP_BASE bool wxShutdown(wxShutdownFlags wFlags);
+WXDLLIMPEXP_BASE bool wxShutdown(int flags = wxSHUTDOWN_POWEROFF);
// send the given signal to the process (only NONE and KILL are supported under
// Windows, all others mean TERM), return 0 if ok and -1 on error
// flags for wxLaunchDefaultBrowser
enum
{
- wxBROWSER_NEW_WINDOW = 1
+ wxBROWSER_NEW_WINDOW = 0x01,
+ wxBROWSER_NOBUSYCURSOR = 0x02
};
// Launch url in the user's default internet browser
WXDLLIMPEXP_CORE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
+// Launch document in the user's default application
+WXDLLIMPEXP_CORE bool wxLaunchDefaultApplication(const wxString& path, int flags = 0);
+
// ----------------------------------------------------------------------------
// Menu accelerators related things
// ----------------------------------------------------------------------------