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

Contents of /trunk/pcsx2/gui/RecentIsoList.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: 2145 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 "AppCommon.h"
19
20 // --------------------------------------------------------------------------------------
21 // RecentIsoManager
22 // --------------------------------------------------------------------------------------
23 class RecentIsoManager : public wxEvtHandler,
24 public EventListener_AppStatus
25 {
26 protected:
27 struct RecentItem
28 {
29 wxString Filename;
30 wxMenuItem* ItemPtr;
31
32 RecentItem() { ItemPtr = NULL; }
33
34 RecentItem( const wxString& src )
35 : Filename( src )
36 {
37 ItemPtr = NULL;
38 }
39 };
40
41 std::vector<RecentItem> m_Items;
42
43 wxMenu* m_Menu;
44 uint m_MaxLength;
45 int m_cursel;
46
47 wxMenuItem* m_Separator;
48
49 public:
50 RecentIsoManager( wxMenu* menu );
51 virtual ~RecentIsoManager() throw();
52
53 void RemoveAllFromMenu();
54 void Repopulate();
55 void Clear();
56 void Add( const wxString& src );
57
58 protected:
59 void InsertIntoMenu( int id );
60 void OnChangedSelection( wxCommandEvent& evt );
61 void LoadListFrom( IniInterface& ini );
62
63 void AppStatusEvent_OnSettingsLoadSave( const AppSettingsEventInfo& ini );
64 void AppStatusEvent_OnSettingsApplied();
65 };
66
67
68 // --------------------------------------------------------------------------------------
69 // RecentIsoList
70 // --------------------------------------------------------------------------------------
71 struct RecentIsoList
72 {
73 ScopedPtr<RecentIsoManager> Manager;
74 ScopedPtr<wxMenu> Menu;
75
76 RecentIsoList();
77 virtual ~RecentIsoList() throw() { }
78 };
79

  ViewVC Help
Powered by ViewVC 1.1.22