PageRenderTime 31ms CodeModel.GetById 19ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/SgaReader2/frmExtract.h

http://modstudio2.googlecode.com/
C++ Header | 62 lines | 31 code | 7 blank | 24 comment | 0 complexity | 04970c05d55621f6bf20fe734b3b44e8 MD5 | raw file
 1/*
 2Copyright (c) 2009 Peter "Corsix" Cawley
 3
 4Permission is hereby granted, free of charge, to any person
 5obtaining a copy of this software and associated documentation
 6files (the "Software"), to deal in the Software without
 7restriction, including without limitation the rights to use,
 8copy, modify, merge, publish, distribute, sublicense, and/or sell
 9copies of the Software, and to permit persons to whom the
10Software is furnished to do so, subject to the following
11conditions:
12
13The above copyright notice and this permission notice shall be
14included in all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23OTHER DEALINGS IN THE SOFTWARE.
24*/
25#pragma once
26#include <wx/dialog.h>
27#include <wx/combobox.h>
28#include <wx/sizer.h>
29#include <wx/statusbr.h>
30#include <Rainman2.h>
31
32class frmExtract : public wxDialog
33{
34public:
35  frmExtract(wxWindow *pParent, IFileStore *pArchive, RainString sDefaultExtractFolder, 
36             const RainString& sPathToExtract, wxStatusBar *pResultNotification = 0);
37  ~frmExtract();
38
39  void onExtract(wxCommandEvent &e);
40  void onBrowse (wxCommandEvent &e);
41
42  enum
43  {
44    TXT_FILENAME = wxID_HIGHEST + 1,
45    BTN_BROWSE,
46  };
47
48protected:
49  bool _ensureDirectoryExists(RainString sFolder);
50
51  IFileStore  *m_pArchive;
52  wxStatusBar *m_pPositiveResultNoficiationBar;
53  wxComboBox  *m_pDestinationPath;
54  wxSizer     *m_pButtonsSizer;
55  RainString   m_sPathToExtract;
56  bool         m_bIsDirectory;
57
58  static RainString s_sLastSaveDir;
59  static bool       s_bLastSaveDirHasDir;
60
61  DECLARE_EVENT_TABLE();
62};