]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/utils.h
attempts to fix wxMimeTypesManager mess: many bugs (entries priority, memory leaks...
[wxWidgets.git] / include / wx / utils.h
index 9bca5317cb6ef8553db3294d1de2d06b0020efac..9362a0055a72ad22e56bd19b0fd33e19dc9ad41b 100644 (file)
@@ -220,6 +220,15 @@ enum wxKillError
     wxKILL_ERROR            // another, unspecified error
 };
 
+enum wxShutdownFlags
+{
+    wxSHUTDOWN_POWEROFF,    // power off the computer
+    wxSHUTDOWN_REBOOT       // shutdown and reboot
+};
+
+// Shutdown or reboot the PC 
+WXDLLEXPORT bool wxShutdown(wxShutdownFlags wFlags);
+
 // 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
 //
@@ -323,14 +332,6 @@ WXDLLEXPORT wxAcceleratorEntry *wxGetAccelFromString(const wxString& label);
 // Window search
 // ----------------------------------------------------------------------------
 
-// Find the window/widget with the given title or label.
-// Pass a parent to begin the search from, or NULL to look through
-// all windows.
-WXDLLEXPORT wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) NULL);
-
-// Find window by name, and if that fails, by label.
-WXDLLEXPORT wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) NULL);
-
 // Returns menu item id or -1 if none.
 WXDLLEXPORT int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString);
 
@@ -339,6 +340,18 @@ WXDLLEXPORT int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, con
 WXDLLEXPORT wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt);
 WXDLLEXPORT wxWindow* wxFindWindowAtPoint(const wxPoint& pt);
 
+// NB: this function is obsolete, use wxWindow::FindWindowByLabel() instead
+//
+// Find the window/widget with the given title or label.
+// Pass a parent to begin the search from, or NULL to look through
+// all windows.
+WXDLLEXPORT wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) NULL);
+
+// NB: this function is obsolete, use wxWindow::FindWindowByName() instead
+//
+// Find window by name, and if that fails, by label.
+WXDLLEXPORT wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) NULL);
+
 // ----------------------------------------------------------------------------
 // Message/event queue helpers
 // ----------------------------------------------------------------------------
@@ -366,6 +379,8 @@ WXDLLEXPORT void wxFlushEvents();
 // ctor and enables them back in its dtor
 class WXDLLEXPORT wxWindowDisabler
 {
+    DECLARE_NO_COPY_CLASS(wxWindowDisabler)
+        
 public:
     wxWindowDisabler(wxWindow *winToSkip = (wxWindow *)NULL);
     ~wxWindowDisabler();