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