Lhaz
lhazfiles.h
[詳解]
1 /*************************************************************************/
6 #pragma once
7 
8 #include <vector>
9 #include <windows.h>
10 #include <commctrl.h>
11 #include "lhazfile.h"
12 
13 class LHAZFILETREE;
14 class LHAZTABCONTENT;
15 
16 namespace gui {
17 
18 class LHAZTREEVIEW;
19 
20 } // namespace gui
21 
22 class LHAZFILES {
23 
24 public:
25  LHAZFILES(void);
26  ‾LHAZFILES(void);
27  //
28  virtual bool GetList(LHAZTABCONTENT* tabcontent);
29  virtual bool Login(void);
30  //
31 #ifdef FEATURE_V3
32  void Add(LHAZFILETREE* folder, LHAZFILE* file);
33 #endif
34  void Filter(LHAZFILETREE* node, LHAZFILE::FIELD field, bool sortrev);
35  int GetDspCount(void) const { return (int)m_sorttable.size(); }
36  const WSTR& GetDsp(LHAZFILE::FIELD col, int row, bool treeview, int viewkb);
37  LHAZFILE* GetFile(int idx) const { return m_sorttable[idx]; }
38  int GetIcon(int row) const;
39  LONGLONG GetTotal(void) const { return m_total; }
40  HTREEITEM GetTreeItem(void) const;
41  bool IsLoaded(void) const { return m_loaded; }
42  int size(void) const;
43  void Sort(LHAZFILE::FIELD field, bool rev);
44 
45 protected:
46  std::vector<LHAZFILE*> m_files;
48  bool m_loaded;
49  std::vector<LHAZFILE*> m_sorttable;
50  LONGLONG m_total;
51 
52 private:
53  std::vector<LHAZFILE*> m_sortwork;
54  //
55  void Mergesort(LHAZFILE::FIELD field, bool rev, int first, int last);
56  void Insertsort(LHAZFILE::FIELD field, bool rev, int first, int last);
57 
58 };
Definition: lhazfile.h:14
std::vector< LHAZFILE * > m_files
Definition: lhazfiles.h:46
bool IsLoaded(void) const
Definition: lhazfiles.h:41
bool m_loaded
Definition: lhazfiles.h:48
Definition: lhazbz2.h:17
Definition: lhazfiletree.h:22
std::vector< LHAZFILE * > m_sortwork
Definition: lhazfiles.h:53
LHAZFILETREE * m_tree
Definition: lhazfiles.h:47
FIELD
Definition: lhazfile.h:16
LONGLONG GetTotal(void) const
Definition: lhazfiles.h:39
LONGLONG m_total
Definition: lhazfiles.h:50
Definition: lhaztabcontent.h:32
LHAZFILE * GetFile(int idx) const
Definition: lhazfiles.h:37
std::vector< LHAZFILE * > m_sorttable
Definition: lhazfiles.h:49
int GetDspCount(void) const
Definition: lhazfiles.h:35
Definition: lhazfiles.h:22