Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 1 | /* 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 Syrovatsky | 8a19ce4 | 2005-11-07 08:46:23 +0000 | [diff] [blame] | 28 | #include <commctrl.h> |
Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 29 | |
| 30 | #include <rfb/FileInfo.h> |
| 31 | #include <rfb_win32/FolderManager.h> |
Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 32 | #include <vncviewer/resource.h> |
| 33 | |
| 34 | namespace rfb { |
| 35 | namespace win32{ |
Dennis Syrovatsky | 8a19ce4 | 2005-11-07 08:46:23 +0000 | [diff] [blame] | 36 | class FTListView |
Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 37 | { |
| 38 | public: |
Dennis Syrovatsky | 8a19ce4 | 2005-11-07 08:46:23 +0000 | [diff] [blame] | 39 | FTListView(HWND hListView); |
Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 40 | ~FTListView(); |
| 41 | |
Dennis Syrovatsky | 8a19ce4 | 2005-11-07 08:46:23 +0000 | [diff] [blame] | 42 | bool initialize(HINSTANCE hInst); |
Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 43 | |
| 44 | void onGetDispInfo(NMLVDISPINFO *di); |
| 45 | void addItems(FileInfo *pFI); |
| 46 | void deleteAllItems(); |
Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 47 | |
| 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 Syrovatsky | 8a19ce4 | 2005-11-07 08:46:23 +0000 | [diff] [blame] | 57 | |
| 58 | bool m_bInitialized; |
| 59 | |
| 60 | void addColumn(char *iText, int iOrder, int xWidth, int alignFmt); |
| 61 | void initImageList(HINSTANCE hInst); |
Dennis Syrovatsky | f3c5766 | 2005-11-02 03:53:04 +0000 | [diff] [blame] | 62 | |
| 63 | }; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | #endif // __RFB_WIN32_FTLISTVIEW_H__ |