/[pcsx2_0.9.7]/trunk/pcsx2/gui/Dialogs/ModalPopups.h
ViewVC logotype

Contents of /trunk/pcsx2/gui/Dialogs/ModalPopups.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 2 months ago) by william
File MIME type: text/plain
File size: 4928 byte(s)
re-commit (had local access denied errors when committing)
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16 #pragma once
17
18 #include "App.h"
19 #include "ConfigurationDialog.h"
20 #include "Panels/ConfigurationPanels.h"
21
22 #include <wx/wizard.h>
23
24 class FirstTimeWizard : public wxWizard
25 {
26 typedef wxWizard _parent;
27
28 protected:
29 class UsermodePage : public ApplicableWizardPage
30 {
31 protected:
32 Panels::DirPickerPanel* m_dirpick_settings;
33 Panels::LanguageSelectionPanel* m_panel_LangSel;
34 Panels::DocsFolderPickerPanel* m_panel_UserSel;
35
36 public:
37 UsermodePage( wxWizard* parent );
38 virtual ~UsermodePage() throw() { }
39 bool PrepForApply();
40
41 protected:
42 void OnUsermodeChanged( wxCommandEvent& evt );
43 void OnCustomDirChanged( wxCommandEvent& evt );
44 };
45
46 protected:
47 UsermodePage& m_page_usermode;
48 wxWizardPageSimple& m_page_plugins;
49 wxWizardPageSimple& m_page_bios;
50
51 Panels::PluginSelectorPanel& m_panel_PluginSel;
52 Panels::BiosSelectorPanel& m_panel_BiosSel;
53
54 public:
55 FirstTimeWizard( wxWindow* parent );
56 virtual ~FirstTimeWizard() throw();
57
58 wxWizardPage *GetUsermodePage() const { return &m_page_usermode; }
59 wxWizardPage *GetPostUsermodePage() const { return &m_page_plugins; }
60
61 void ForceEnumPlugins()
62 {
63 m_panel_PluginSel.OnShown();
64 }
65
66 int ShowModal();
67
68 protected:
69 virtual void OnPageChanging( wxWizardEvent& evt );
70 virtual void OnPageChanged( wxWizardEvent& evt );
71 virtual void OnDoubleClicked( wxCommandEvent& evt );
72
73 void OnRestartWizard( wxCommandEvent& evt );
74 };
75
76
77 namespace Dialogs
78 {
79 class AboutBoxDialog: public wxDialogWithHelpers
80 {
81 protected:
82 //wxStaticBitmap m_bitmap_logo;
83 wxStaticBitmap m_bitmap_dualshock;
84
85 public:
86 AboutBoxDialog( wxWindow* parent=NULL );
87 virtual ~AboutBoxDialog() throw() {}
88
89 static wxString GetNameStatic() { return L"AboutBox"; }
90 wxString GetDialogName() const { return GetNameStatic(); }
91 };
92
93
94 class PickUserModeDialog : public BaseApplicableDialog
95 {
96 protected:
97 Panels::DocsFolderPickerPanel* m_panel_usersel;
98 Panels::LanguageSelectionPanel* m_panel_langsel;
99
100 public:
101 PickUserModeDialog( wxWindow* parent );
102 virtual ~PickUserModeDialog() throw() {}
103
104 protected:
105 void OnOk_Click( wxCommandEvent& evt );
106 };
107
108
109 class ImportSettingsDialog : public wxDialogWithHelpers
110 {
111 public:
112 ImportSettingsDialog( wxWindow* parent );
113 virtual ~ImportSettingsDialog() throw() {}
114
115 protected:
116 void OnImport_Click( wxCommandEvent& evt );
117 void OnOverwrite_Click( wxCommandEvent& evt );
118 };
119
120 class AssertionDialog : public wxDialogWithHelpers
121 {
122 public:
123 AssertionDialog( const wxString& text, const wxString& stacktrace );
124 virtual ~AssertionDialog() throw() {}
125 };
126
127 // There are two types of stuck threads:
128 // * Threads stuck on any action that is not a cancellation.
129 // * Threads stuck trying to cancel.
130 //
131 // The former means we can provide a "cancel" action for the user, which would itself
132 // open a new dialog in the latter category. The latter means that there's really nothing
133 // we can do, since pthreads API provides no good way for killing threads. The only
134 // valid options for the user in that case is to either wait (boring!) or kill the
135 // process (awesome!).
136
137 enum StuckThreadActionType
138 {
139 // Allows the user to attempt a cancellation of a stuck thread. This should only be
140 // used on threads which are not already stuck during a cancellation action (ie, suspension
141 // or other job requests). Also, if the running thread is known to not have any
142 // cancellation points then this shouldn't be used either.
143 StacT_TryCancel,
144
145 // Allows the user to kill the entire process for a stuck thread. Use this for any
146 // thread which has failed to cancel in a reasonable timeframe, or for any stuck action
147 // if the thread is known to have no cancellation points.
148 StacT_KillProcess,
149 };
150
151 class StuckThreadDialog : public wxDialogWithHelpers,
152 public EventListener_Thread
153 {
154 public:
155 StuckThreadDialog( wxWindow* parent, StuckThreadActionType action, Threading::pxThread& stuck_thread );
156 virtual ~StuckThreadDialog() throw() {}
157
158 protected:
159 void OnThreadCleanup();
160 };
161 }
162
163 wxWindowID pxIssueConfirmation( wxDialogWithHelpers& confirmDlg, const MsgButtons& buttons );
164 wxWindowID pxIssueConfirmation( wxDialogWithHelpers& confirmDlg, const MsgButtons& buttons, const wxString& disablerKey );

  ViewVC Help
Powered by ViewVC 1.1.22