Develop and Download Open Source Software

Browse CVS Repository

Contents of /tombo/Tombo/Src/MemoSelectView.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.38 - (show annotations) (download) (as text)
Sun Aug 27 11:11:36 2006 UTC (17 years, 7 months ago) by hirami
Branch: MAIN
CVS Tags: Tombo_2_0b2, Tombo_2_0b3, Tombo_2_0b1, Tombo_2_0b4, B228, B229, B226, B227, B224, B225, B231, B230, HEAD
Changes since 1.37: +1 -1 lines
File MIME type: text/x-chdr
- Create new project for WM5 platform.
	In current version, feature is same as PocketPC.

1 #ifndef MEMOSELECTVIEW_H
2 #define MEMOSELECTVIEW_H
3
4 class MemoManager;
5 class TString;
6 class TreeViewItem;
7 class MemoLocator;
8 class TreeViewVirtualFolderRoot;
9 class VFManager;
10 class VFInfo;
11 class TomboURI;
12 struct MSViewRootInfo;
13
14 class MemoSelectView {
15
16 /////////////////////////////
17 // Window related members
18
19 HWND hViewWnd;
20
21 // root node
22 MSViewRootInfo *pRoots;
23 DWORD nNumRoots;
24
25 HIMAGELIST hSelectViewImgList;
26
27 MemoManager *pMemoMgr;
28
29 /////////////////////////////
30 // for Cut/Copy/Paste
31 TreeViewItem *pClipItem;
32 BOOL bCut;
33
34 // mode flags
35 BOOL bAutoLoadMode;
36 BOOL bSingleClickMode;
37
38 void SetShareArea(TreeViewItem *pItem);
39
40 void DeleteOneItem(HTREEITEM hItem);
41 void DeleteItemsRec(HTREEITEM hFirst);
42
43 ///////////////////////////////////
44
45 void SetIcon(TreeViewItem* p, DWORD nStatus);
46
47 ///////////////////////////////////
48 LRESULT EditLabel(TVITEM *pItem);
49
50 protected:
51 HTREEITEM GetRootItem(LPCTSTR pRep);
52
53 public:
54 /////////////////////////////
55 // Initialize functions
56
57 MemoSelectView() : hViewWnd(NULL), pMemoMgr(NULL), bAutoLoadMode(FALSE), bSingleClickMode(FALSE), pRoots(NULL), nNumRoots(0) {}
58 ~MemoSelectView();
59 BOOL Init(MemoManager *p) { pMemoMgr = p; bCut = FALSE; pClipItem = NULL; return TRUE; }
60 BOOL Create(LPCTSTR pName, RECT &r, HWND hParent, DWORD nID, HINSTANCE hInst, HFONT hFont);
61
62 /////////////////////////////
63 // display related funcs
64
65 BOOL Show(int nCmdShow);
66 void SetFocus();
67 void SetFont(HFONT hFont);
68
69 LRESULT OnNotify(HWND hWnd, WPARAM wParam, LPARAM lParam);
70
71 #if defined(PLATFORM_WIN32) || defined(PLATFORM_HPC) || defined(PLATFORM_PKTPC) || defined(PLATFORM_WM5)
72 void OnNotify_RClick(POINT pt);
73 #endif
74 BOOL OnCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
75
76 void OnActionButton(HWND hWnd);
77 BOOL OnHotKey(HWND hWnd, WPARAM wParam);
78 void OnGetFocus();
79 void OnDelete(HTREEITEM hItem, TreeViewItem *pItem);
80 void OnEncrypt(TreeViewItem *pItem);
81 void OnDecrypt(TreeViewItem *pItem);
82 void OnEditLabel(HTREEITEM hItem);
83
84 // psudo clipboard
85 void OnCut(TreeViewItem *pItem);
86 void OnCopy(TreeViewItem *pItem);
87 void OnPaste();
88
89 void GetSize(LPWORD pWidth, LPWORD pHeight);
90 void GetSize(LPRECT pRect);
91 void GetClientRect(LPRECT pRect);
92
93 void MoveWindow(DWORD x, DWORD y, DWORD nWidth, DWORD nHeight);
94
95 /////////////////////////////
96 // accessor/mutator for flags
97
98 MemoManager *GetManager() { return pMemoMgr; }
99
100 void SetAutoLoadMode(BOOL bMode) { bAutoLoadMode = bMode; }
101 BOOL IsAutoLoadMode() { return bAutoLoadMode; }
102
103 void SetSingleClickMode(BOOL bMode) { bSingleClickMode = bMode; }
104 BOOL IsSingleClickMode() { return bSingleClickMode; }
105
106 /////////////////////////////
107 // Key
108 void SelUpFolderWithoutOpen();
109 void SelNextBrother();
110 void SelPrevBrother();
111
112 /////////////////////////////
113 // item ops
114
115 BOOL InitTree(VFManager *pManager);
116 BOOL DeleteAllItem();
117
118 /////////////////////////////
119 // Expand/collapse tree
120 void ToggleExpandFolder(HTREEITEM hItem, UINT stat);
121 void TreeExpand(HTREEITEM hItem);
122 void TreeCollapse(HTREEITEM hItem);
123 BOOL IsExpand(HTREEITEM hItem);
124
125 HIMAGELIST GetImageList() { return hSelectViewImgList; }
126
127 // Insert file node
128 HTREEITEM InsertFile(HTREEITEM hParent, const TomboURI *pURI, LPCTSTR pTitle, BOOL bInsertLast, BOOL bLink);
129
130 // Insert folder node
131 // if bInsertLast is TRUE, Insert folder without sorting.
132 HTREEITEM InsertFolder(HTREEITEM hParent, LPCTSTR pName, TreeViewItem *tvi, BOOL bInsertLast);
133
134 // update headline string
135 BOOL UpdateHeadLine(LPCTSTR pOldURI, TomboURI *pNewURI, LPCTSTR pNewHeadLine);
136
137 // TreeViewItem���������������������������r���[�������X����
138 BOOL UpdateItemStatusNotify(TreeViewItem *pItem, LPCTSTR pNewHeadLine);
139
140 // �����I�����������A�C�e�����p�X�����������B
141 // �I�����������A�C�e�����t�H���_�������A���g�������p�X������
142 HTREEITEM GetPathForNewItem(TString *pPath, TreeViewItem *pItem = NULL);
143
144 HTREEITEM GetParentItem(HTREEITEM hItem) { return TreeView_GetParent(hViewWnd, hItem); }
145
146 BOOL CreateNewFolder(HTREEITEM hItem, LPCTSTR pFolder);
147 BOOL MakeNewFolder(HWND hWnd, TreeViewItem *pItem);
148
149 // Search tree and get HTREEITEM
150 HTREEITEM GetItemFromURI(LPCTSTR pURI);
151
152 // returns TreeViewItem associated with current selected node.
153 // if pItem is not null set HTREEITEM current selected.
154 // if no node is selected, return NULL.
155 TreeViewItem *GetCurrentItem(HTREEITEM *pItem = NULL);
156
157 // returns current selected node's URI.
158 // if no node is selected, return NULL.
159 // Be careful the return value may be released by MemoSelectView when closing tree
160 // so if you want to keep it, copy the instance in the situation.
161 const TomboURI *GetCurrentSelectedURI();
162
163 TreeViewItem *GetTVItem(HTREEITEM h);
164
165 BOOL IsCliped(TreeViewItem* p) { return p == pClipItem; }
166 LONG GetItem(TV_ITEM *p) { return TreeView_GetItem(hViewWnd, p); }
167
168 LPTSTR GeneratePath(HTREEITEM hItem, LPTSTR pBuf, DWORD nSiz);
169
170 // Choose specified notes. if tree is collapsed, expand one.
171 HTREEITEM ShowItemByURI(const TomboURI *pURI, BOOL bSelChange = TRUE, BOOL bOpenNotes = TRUE);
172
173 /////////////////////////////
174 // Virtual folder
175 BOOL InsertVirtualFolder(const VFInfo *pInfo);
176
177 void CloseVFRoot();
178
179 /////////////////////////////
180 // Control menu
181 void ControlMenu();
182 };
183
184 /////////////////////////////////////////
185 // Node status definitions
186 /////////////////////////////////////////
187
188 // initialized
189 #define MEMO_VIEW_STATE_INIT 1
190
191 // in clipboard
192 #define MEMO_VIEW_STATE_CLIPED_SET (1 << 1)
193 #define MEMO_VIEW_STATE_CLIPED_CLEAR (1 << 2)
194
195 // opened
196 #define MEMO_VIEW_STATE_OPEN_SET (1 << 3)
197 #define MEMO_VIEW_STATE_OPEN_CLEAR (1 << 4)
198
199
200 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26