blob: c920fa00c323907ca3e8320f367023c46abb15bd [file] [log] [blame]
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +00001/* Copyright (C) 2005 TightVNC Team. All Rights Reserved.
Dennis Syrovatsky265d3c82006-04-17 12:36:11 +00002 *
3 * Developed by Dennis Syrovatsky.
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +00004 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18 * USA.
19 *
20 * TightVNC distribution homepage on the Web: http://www.tightvnc.com/
21 *
22 */
23
24// -=- FTListView.h
25
26#ifndef __RFB_WIN32_FTLISTVIEW_H__
27#define __RFB_WIN32_FTLISTVIEW_H__
28
29#include <windows.h>
Dennis Syrovatsky8a19ce42005-11-07 08:46:23 +000030#include <commctrl.h>
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000031
32#include <rfb/FileInfo.h>
33#include <rfb_win32/FolderManager.h>
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000034#include <vncviewer/resource.h>
35
36namespace rfb {
37 namespace win32{
Dennis Syrovatsky8a19ce42005-11-07 08:46:23 +000038 class FTListView
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000039 {
40 public:
Dennis Syrovatsky8a19ce42005-11-07 08:46:23 +000041 FTListView(HWND hListView);
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000042 ~FTListView();
43
Dennis Syrovatsky8a19ce42005-11-07 08:46:23 +000044 bool initialize(HINSTANCE hInst);
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000045
46 void onGetDispInfo(NMLVDISPINFO *di);
47 void addItems(FileInfo *pFI);
48 void deleteAllItems();
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000049
50 char *getActivateItemName(LPNMITEMACTIVATE lpnmia);
51 int getSelectedItems(FileInfo *pFI);
52
53 HWND getWndHandle() { return m_hListView; };
54
55 private:
56 HWND m_hListView;
57 FileInfo m_fileInfo;
58 HIMAGELIST m_hImageList;
Dennis Syrovatsky8a19ce42005-11-07 08:46:23 +000059
60 bool m_bInitialized;
61
62 void addColumn(char *iText, int iOrder, int xWidth, int alignFmt);
63 void initImageList(HINSTANCE hInst);
Dennis Syrovatskyf3c57662005-11-02 03:53:04 +000064
65 };
66 }
67}
68
69#endif // __RFB_WIN32_FTLISTVIEW_H__