]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/utils.h
fix signature of wxClipboard::UserPrimarySelection; in particular change the default...
[wxWidgets.git] / interface / wx / utils.h
index bd0ddb7b6aa255c8aedb77111cd3b2a0a7205c7a..1254434a7b0395bd66056a8a3008728f07cf39c4 100644 (file)
@@ -78,7 +78,7 @@ public:
     /**
         Constructs a busy cursor object, calling wxBeginBusyCursor().
     */
     /**
         Constructs a busy cursor object, calling wxBeginBusyCursor().
     */
-    wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
+    wxBusyCursor(const wxCursor* cursor = wxHOURGLASS_CURSOR);
 
     /**
         Destroys the busy cursor object, calling wxEndBusyCursor().
 
     /**
         Destroys the busy cursor object, calling wxEndBusyCursor().
@@ -88,86 +88,6 @@ public:
 
 
 
 
 
 
-/**
-    @class wxMouseState
-
-    Represents the mouse state.
-
-    The methods of this class generally mirror the corresponding methods of
-    wxMouseEvent.
-
-    This class is implemented entirely in @<wx/utils.h@>, meaning no extra
-    library needs to be linked to use this class.
-
-    @category{misc}
-
-    @see wxGetMouseState()
- */
-class wxMouseState
-{
-public:
-    /**
-        Default constructor.
-    */
-    wxMouseState();
-
-    /**
-        Returns X coordinate of the physical mouse event position.
-    */
-    wxCoord GetX() const;
-    /**
-        Returns Y coordinate of the physical mouse event position.
-    */
-    wxCoord GetY() const;
-    /**
-        Returns the physical mouse position.
-    */
-    wxPoint GetPosition() const;
-
-    /**
-        Returns @true if the left mouse button changed to down.
-    */
-    bool LeftDown() const;
-    /**
-        Returns @true if the middle mouse button changed to down.
-    */
-    bool MiddleDown() const;
-    /**
-        Returns @true if the right mouse button changed to down.
-    */
-    bool RightDown() const;
-    /**
-        Returns @true if the first extra button mouse button changed to down.
-    */
-    bool Aux1Down() const;
-    /**
-        Returns @true if the second extra button mouse button changed to down.
-    */
-    bool Aux2Down() const;
-
-    /**
-        Returns @true if the control key is down.
-    */
-    bool ControlDown() const;
-    /**
-        Returns @true if the shift key is down.
-    */
-    bool ShiftDown() const;
-    /**
-        Returns @true if the alt key is down.
-    */
-    bool AltDown() const;
-    /**
-        Returns @true if the meta key is down.
-    */
-    bool MetaDown() const;
-    /**
-        Same as MetaDown() under Mac systems, ControlDown() for the others.
-    */
-    bool CmdDown() const;
-};
-
-
 // ============================================================================
 // Global functions/macros
 // ============================================================================
 // ============================================================================
 // Global functions/macros
 // ============================================================================
@@ -422,12 +342,31 @@ long wxNewId();
 void wxRegisterId(long id);
 
 /**
 void wxRegisterId(long id);
 
 /**
-    Opens the @a url in user's default browser. If the @a flags parameter
-    contains @c wxBROWSER_NEW_WINDOW flag, a new window is opened for the URL
-    (currently this is only supported under Windows). The @a url may also be a
-    local file path (with or without the "file://" prefix), if it doesn't
-    correspond to an existing file and the URL has no scheme "http://" is
-    prepended to it by default.
+    Opens the @a document in the application associated with the files of this
+    type.
+
+    The @a flags parameter is currently not used
+
+    Returns @true if the application was successfully launched.
+
+    @header{wx/utils.h}
+*/
+bool wxLaunchDefaultApplication(const wxString& document, int flags = 0)
+
+/**
+    Opens the @a url in user's default browser.
+
+    If the @a flags parameter contains @c wxBROWSER_NEW_WINDOW flag, a new
+    window is opened for the URL (currently this is only supported under
+    Windows).
+
+    And unless the @a flags parameter contains @c wxBROWSER_NOBUSYCURSOR flag,
+    a busy cursor is shown while the browser is being launched (using
+    wxBusyCursor).
+
+    The @a url may also be a local file path (with or without the "file://"
+    prefix), if it doesn't correspond to an existing file and the URL has no
+    scheme "http://" is prepended to it by default.
 
     Returns @true if the application was successfully launched.
 
 
     Returns @true if the application was successfully launched.
 
@@ -491,7 +430,7 @@ void wxSetDisplayName(const wxString& displayName);
     By default, the functions strips both the mnemonics character (@c '&')
     which is used to indicate a keyboard shortkey, and the accelerators, which
     are used only in the menu items and are separated from the main text by the
     By default, the functions strips both the mnemonics character (@c '&')
     which is used to indicate a keyboard shortkey, and the accelerators, which
     are used only in the menu items and are separated from the main text by the
-    @c \t (TAB) character. By using @a flags of @c wxStrip_Mnemonics or
+    @c \\t (TAB) character. By using @a flags of @c wxStrip_Mnemonics or
     @c wxStrip_Accel to strip only the former or the latter part, respectively.
 
     Notice that in most cases wxMenuItem::GetLabelFromText() or
     @c wxStrip_Accel to strip only the former or the latter part, respectively.
 
     Notice that in most cases wxMenuItem::GetLabelFromText() or
@@ -940,18 +879,22 @@ bool wxShell(const wxString& command = NULL);
     This function shuts down or reboots the computer depending on the value of
     the @a flags.
 
     This function shuts down or reboots the computer depending on the value of
     the @a flags.
 
-    @note Doing this requires the corresponding access rights (superuser under
-          Unix, SE_SHUTDOWN privilege under Windows NT) and that this function
-          is only implemented under Unix and Win32.
+    @note Note that performing the shutdown requires the corresponding access
+        rights (superuser under Unix, SE_SHUTDOWN privilege under Windows NT)
+        and that this function is only implemented under Unix and MSW.
 
     @param flags
 
     @param flags
-        Either wxSHUTDOWN_POWEROFF or wxSHUTDOWN_REBOOT
+        One of @c wxSHUTDOWN_POWEROFF, @c wxSHUTDOWN_REBOOT or
+        @c wxSHUTDOWN_LOGOFF (currently implemented only for MSW) possibly
+        combined with @c wxSHUTDOWN_FORCE which forces shutdown under MSW by
+        forcefully terminating all the applications. As doing this can result
+        in a data loss, this flag shouldn't be used unless really necessary.
 
     @return @true on success, @false if an error occurred.
 
     @header{wx/utils.h}
 */
 
     @return @true on success, @false if an error occurred.
 
     @header{wx/utils.h}
 */
-bool wxShutdown(wxShutdownFlags flags);
+bool wxShutdown(int flags = wxSHUTDOWN_POWEROFF);
 
 //@}
 
 
 //@}