Lhaz
lhazregs.h
[詳解]
1 /*************************************************************************/
6 #pragma once
7 
8 #include "altstr.hpp"
9 #include <windows.h>
10 #include "mybuf.h"
11 #include "myregistory.h"
12 #include "defpasswords.h"
13 #include "lhazarc.h"
14 #include "lhazshellex.h"
15 
16 #define GS(type, v) ¥
17 public: ¥
18  type Get##v(void) const { return v; } ¥
19  void Set##v(type b) { v = b; } ¥
20 private: ¥
21  type v;
22 
23 using std::vector;
24 
25 class DEFPASSWORDS;
26 class DESTDIRS;
27 class LHAZEXTHIST;
28 class LHAZHIST;
29 
30 /*************************************************************************/
33 class LHAZREGS : public MYREGISTORY {
34 
35 public:
40  enum KOBETU { K_FOLDER, K_FILE };
42  enum { LHAZMAXVIEWER = 5 };
43  //
44  struct XYS {
45  XYS(void);
46  int x;
47  int y;
48  };
49  //
50  static const TCHAR LHAZGDCREDENTIALSREG[];
51  //
52  LHAZREGS(const WSTR& name);
53  ‾LHAZREGS(void);
54  //
55  void DeleteDropBoxToken(void);
56  void DeleteGDEmail(void);
57  void DeleteGDPassword(void);
58  bool GetKobetuComp(void) const { return KobetuComp; }
59  void SetKobetuComp(bool b, bool w = false);
60  bool GetNoComp(void) const { return NoComp; }
61  void SetNoComp(bool b, bool w = false);
62  bool IsEncZip(void) const {
63  return (CompType == ARCHIVE::ENCZIP);
64  }
65  bool IsCab(void) const {
66  return (CompType == ARCHIVE::CAB || CompType == ARCHIVE::SFXCAB);
67  }
68  WSTR GetDownloadsDir(void) const;
69  const WSTR& GetViewers(int idx) const { return Viewers[idx]; }
70  void SetViewers(int idx, const WSTR& v) { Viewers[idx] = v; }
71  vector<WSTR>& GetArcNames(void) { return ArcNames; }
72  const TCHAR* GetArcNameDef(void) const { return ArcNameDef; }
73  vector<WSTR>& GetFilters(void) { return Filters; }
74  vector<WSTR>& GetGrepStrings(void) { return GrepStrings; }
75  vector<WSTR>& GetListFiles(void) { return ListFiles; }
76  DEFPASSWORDS* GetDefPasswords(void) const { return DefPasswords; }
78  int GetPassCnt(void) const { return DefPasswords->Size(); }
79  const TCHAR* GetPasswords(int i) const { return DefPasswords->Get(i); }
80  void SaveReg(bool popchange);
81  vector<ARCHIVE::TYPE>& GetCompPopups(void) { return CompPopups; }
82  void SetShellView(bool);
83  bool SetShellViewSub(const TCHAR* p, const TCHAR* sw);
84  void ClearAll(void);
85  LHAZSHELLEX& GetShellEx(void) { return ShellEx; }
86  DESTDIRS* GetDestDirs(void) const { return DestDirs; }
87  void SetDestDirs(DESTDIRS* d) { DestDirs = d; }
88  LHAZEXTHIST* GetExtHist(void) const { return ExtHist; }
89  void SetExtHist(LHAZEXTHIST* h) { ExtHist = h; }
90  void Save(void);
91  // Bool values
92  GS(bool, m_close_after_extract);
93  GS(bool, m_close_after_compress);
94  GS(bool, m_popsave);
95  GS(bool, m_usedropbox);
96  GS(bool, m_usegoogledrive);
97  GS(bool, m_useonedrive);
98  GS(bool, CompPopupKobetu);
99  GS(bool, CompPopupStore);
100  GS(bool, ConComp);
101  GS(bool, ConView);
102  GS(bool, DefPassDspCmp);
103  GS(bool, DefPassDspExt);
104  GS(bool, DelDigit);
105  GS(bool, DelDigitPop);
106  GS(bool, HasTreeView);
107  GS(bool, KanrenL);
108  GS(bool, KanrenZ);
109  GS(bool, KanrenC);
110  GS(bool, KanrenT);
111  GS(bool, KanrenA);
112  GS(bool, KanrenG);
113  GS(bool, KanrenB);
114  GS(bool, Kanren2);
115  GS(bool, KanrenR);
116  GS(bool, Kanren7);
117  GS(bool, KanrenTXZ);
118  GS(bool, KanrenXZ);
119  GS(bool, ListCsv);
120  GS(bool, ListOpen);
121  GS(bool, MakeDir);
122  GS(bool, MultiPrg);
123  GS(bool, NoMakeDir);
124  GS(bool, NoPopSave);
125  GS(bool, OpenCompDir);
126  GS(bool, OpenDir);
127  GS(bool, Passtry);
128  GS(bool, PassTwice);
129  GS(bool, RecExtHist);
130  GS(bool, RecHis);
131  GS(bool, SaveExtDlgPos);
132  // Int values
133  GS(int, ArcNameSel);
134  GS(int, Bz2Size);
135  GS(int, CabMethod);
136  GS(COMPNAME, CompName);
137  GS(COMPQUICK, CompQuick);
138  GS(ARCHIVE::TYPE, CompType);
139  GS(int, DefPassCmp);
140  GS(int, DefPassExt);
141  GS(unsigned int, DivSize);
142  GS(EXETYPE, ExeType);
143  GS(EXTQUICK, ExtQuick);
144  GS(int, Filter);
145  GS(int, GzipLevel);
146  GS(int, Iconic);
147  GS(KOBETU, KobetuMethod);
148  GS(int, ListFormat);
149  GS(int, ListViewer);
150  GS(RECT, LVRect);
151  GS(int, LzhHeader);
152  GS(int, LzhMethod);
153  GS(int, OpenType);
154  GS(int, PassEnterDef);
155  GS(int, PrgStyle);
156  GS(int, SfxUseDlg);
157  GS(int, SzipLevel);
158  GS(int, SzipMethod);
159  GS(int, ViewByte);
160  GS(VIEWTOTAL, ViewTotal);
161  GS(int, XZLevel);
162  GS(int, ZipLevel);
163  // String values
164  GS(WSTR, CompDir);
165  GS(WSTR, ExecApp);
166  GS(WSTR, GDDownloadDir);
167  GS(WSTR, m_gd_email);
168  GS(WSTR, m_gd_password);
169  GS(WSTR, GrepViewer);
170  GS(WSTR, ListCountFile);
171  GS(WSTR, OpenFolder);
172  GS(WSTR, TempDir);
173  GS(WSTR, CurrentGoogleMail);
174  GS(WSTR, CurrentGoogleUser);
175  // Structure values
176  GS(RECT, GrepRect);
177  GS(XYS, XY);
178 
179 private:
180  static const TCHAR ArcNameDef[];
181  static const TCHAR LHAZREG[];
182  //
184  bool NoComp;
186  vector<WSTR> ArcNames;
190  vector<WSTR> Filters;
191  vector<WSTR> GrepStrings;
192  vector<WSTR> ListFiles;
193  vector<ARCHIVE::TYPE> CompPopups;
195  //
196  void CheckListFiles(void);
197  void DeleteReg(const WSTR& d);
198  bool GetAssoc(const TCHAR* ext, const TCHAR* aso, const TCHAR* viw, const TCHAR* old);
199  void ReadCompPopups(void);
200  void ResetReg(ARCHIVE::TYPE);
201  void ResetRegSub(LPTSTR oldclass, LPCTSTR ext);
202 
203 };
204 
205 #undef GS
206 
207 extern LHAZREGS* LhazRegs;
Archive.
Definition: lhazregs.h:38
TYPE
Definition: lhazarc.h:28
Definition: lhazregs.h:37
bool GetAssoc(const TCHAR *ext, const TCHAR *aso, const TCHAR *viw, const TCHAR *old)
関連付け取得
Definition: lhazregs.cpp:296
Definition: lhazregs.h:36
LHAZEXTHIST * GetExtHist(void) const
Definition: lhazregs.h:88
Definition: lhazregs.h:42
Definition: lhazregs.h:40
LHAZREGS(const WSTR &name)
コンストラクタ
Definition: lhazregs.cpp:39
Definition: lhazarc.h:32
XYS(void)
解凍ダイアログ位置
Definition: lhazregs.cpp:745
COMPQUICK
Definition: lhazregs.h:37
bool IsEncZip(void) const
Definition: lhazregs.h:62
WSTR Viewers[LHAZMAXVIEWER]
Definition: lhazregs.h:185
‾LHAZREGS(void)
デストラクタ
Definition: lhazregs.cpp:206
COMPNAME
Definition: lhazregs.h:36
Definition: lhazarc.h:41
WSTR GetDownloadsDir(void) const
「ダウンロード」フォルダ取得
Definition: lhazregs.cpp:337
vector< WSTR > & GetGrepStrings(void)
Definition: lhazregs.h:74
LHAZSHELLEX ShellEx
Definition: lhazregs.h:194
int x
Definition: lhazregs.h:46
bool GetKobetuComp(void) const
Definition: lhazregs.h:58
int GetPassCnt(void) const
Definition: lhazregs.h:78
Definition: lhazregs.h:39
const WSTR & GetViewers(int idx) const
Definition: lhazregs.h:69
void SaveReg(bool popchange)
レジストリ保存
Definition: lhazregs.cpp:496
¥ type v
Definition: lhazregs.h:21
レジストリ
Definition: lhazregs.h:33
LHAZSHELLEX & GetShellEx(void)
Definition: lhazregs.h:85
void ResetReg(ARCHIVE::TYPE)
関連付け解除
Definition: lhazregs.cpp:423
void SetKobetuComp(bool b, bool w=false)
個別圧縮設定保存
Definition: lhazregs.cpp:523
vector< ARCHIVE::TYPE > CompPopups
Definition: lhazregs.h:193
DESTDIRS * GetDestDirs(void) const
Definition: lhazregs.h:86
void Save(void)
保存
Definition: lhazregs.cpp:644
vector< WSTR > Filters
Definition: lhazregs.h:190
デフォルトパスワード
Definition: defpasswords.h:17
Definition: lhazregs.h:39
const TCHAR * GetArcNameDef(void) const
Definition: lhazregs.h:72
static const TCHAR ArcNameDef[]
標準の圧縮書庫名
Definition: lhazregs.h:180
vector< WSTR > ListFiles
Definition: lhazregs.h:192
KOBETU
Definition: lhazregs.h:40
LHAZREGS * LhazRegs
インスタンス
Definition: lhazregs.cpp:22
Definition: lhazregs.h:37
LHAZEXTHIST * ExtHist
Definition: lhazregs.h:189
Definition: lhazregs.h:36
VIEWTOTAL
Definition: lhazregs.h:41
Definition: lhazshellex.h:11
void ClearAll(void)
全設定消去
Definition: lhazregs.cpp:230
vector< WSTR > ArcNames
Definition: lhazregs.h:186
static const TCHAR LHAZGDCREDENTIALSREG[]
Google Drive Credentials.
Definition: lhazregs.h:50
vector< ARCHIVE::TYPE > & GetCompPopups(void)
Definition: lhazregs.h:81
Definition: lhazregs.h:38
vector< WSTR > & GetFilters(void)
Definition: lhazregs.h:73
Definition: lhazregs.h:41
void ReadCompPopups(void)
圧縮ポップアップ表示形式読み込み
Definition: lhazregs.cpp:386
int Size(void) const
Definition: defpasswords.h:23
bool IsCab(void) const
Definition: lhazregs.h:65
Definition: lhazregs.h:41
EXTQUICK
Definition: lhazregs.h:39
int y
Definition: lhazregs.h:47
void DeleteGDPassword(void)
DeleteGDPassword.
Definition: lhazregs.cpp:629
void SetExtHist(LHAZEXTHIST *h)
Definition: lhazregs.h:89
void SetShellView(bool)
LhazArchive¥Shell を View/Open に設定する
Definition: lhazregs.cpp:545
解凍先ディレクトリ
Definition: destdirs.h:15
void SetNoComp(bool b, bool w=false)
非圧縮設定保存
Definition: lhazregs.cpp:534
void DeleteReg(const WSTR &d)
設定消去用レジストリ削除サブ
Definition: lhazregs.cpp:269
Definition: lhazregs.h:41
void ResetRegSub(LPTSTR oldclass, LPCTSTR ext)
関連付け解除サブ
Definition: lhazregs.cpp:468
void SetDefPasswords(DEFPASSWORDS *d)
Definition: lhazregs.h:77
TCHAR * Get(unsigned int idx)
Definition: defpasswords.h:24
Definition: lhazregs.h:41
Definition: lhazregs.h:38
Definition: WinUnit.h:350
void DeleteGDEmail(void)
DeleteGDEmail.
Definition: lhazregs.cpp:614
void SetDestDirs(DESTDIRS *d)
Definition: lhazregs.h:87
EXETYPE
Definition: lhazregs.h:38
DEFPASSWORDS * DefPasswords
Definition: lhazregs.h:187
Definition: lhazarc.h:33
Default passwords.
Definition: lhazhist.h:15
DEFPASSWORDS * GetDefPasswords(void) const
Definition: lhazregs.h:76
Definition: lhazregs.h:37
Definition: lhazregs.h:44
GS(bool, m_close_after_extract)
static const TCHAR LHAZREG[]
レジストリ格納場所
Definition: lhazregs.h:181
bool NoComp
Definition: lhazregs.h:184
vector< WSTR > & GetArcNames(void)
Definition: lhazregs.h:71
DESTDIRS * DestDirs
Definition: lhazregs.h:188
bool SetShellViewSub(const TCHAR *p, const TCHAR *sw)
LhazArchive¥Shell を View/Open に設定するサブ
Definition: lhazregs.cpp:589
bool GetNoComp(void) const
Definition: lhazregs.h:60
void DeleteDropBoxToken(void)
DeleteGDEmail.
Definition: lhazregs.cpp:605
Definition: lhazregs.h:39
Definition: lhazregs.h:39
vector< WSTR > & GetListFiles(void)
Definition: lhazregs.h:75
Definition: lhazregs.h:40
void SetViewers(int idx, const WSTR &v)
Definition: lhazregs.h:70
Definition: lhazexthist.h:11
vector< WSTR > GrepStrings
Definition: lhazregs.h:191
bool KobetuComp
Definition: lhazregs.h:183
const TCHAR * GetPasswords(int i) const
Definition: lhazregs.h:79
void CheckListFiles(void)
リストファイル存在確認
Definition: lhazregs.cpp:216