#include "wx/object.h"
#include "wx/list.h"
#include "wx/filefn.h"
+
#if wxUSE_GUI
#include "wx/gdicmn.h"
+ #include "wx/mousestate.h"
#endif
class WXDLLIMPEXP_FWD_BASE wxArrayString;
// in wxMSW.
WXDLLIMPEXP_CORE bool wxSetDetectableAutoRepeat( bool flag );
-
-// wxMouseState is used to hold information about button and modifier state
-// and is what is returned from wxGetMouseState.
-class WXDLLIMPEXP_CORE wxMouseState
-{
-public:
- wxMouseState()
- : m_x(0), m_y(0),
- m_leftDown(false), m_middleDown(false), m_rightDown(false),
- m_aux1Down(false), m_aux2Down(false),
- m_controlDown(false), m_shiftDown(false), m_altDown(false),
- 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()
- {
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- return MetaDown();
-#else
- return ControlDown();
-#endif
- }
-
- 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 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;
-};
-
-
// Returns the current state of the mouse position, buttons and modifers
WXDLLIMPEXP_CORE wxMouseState wxGetMouseState();
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
// ----------------------------------------------------------------------------