You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FTDialog.h 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. // -=- FTDialog.h
  22. #ifndef __RFB_WIN32_FTDIALOG_H__
  23. #define __RFB_WIN32_FTDIALOG_H__
  24. #include <windows.h>
  25. #include <commctrl.h>
  26. #include <rfb/FileInfo.h>
  27. #include <rfb_win32/Dialog.h>
  28. #include <vncviewer/FileTransfer.h>
  29. #include <vncviewer/resource.h>
  30. namespace rfb {
  31. namespace win32 {
  32. class FTDialog : public Dialog
  33. {
  34. public:
  35. FTDialog(HINSTANCE hInst, FileTransfer *pFT);
  36. ~FTDialog();
  37. bool createFTDialog();
  38. void closeFTDialog();
  39. static BOOL CALLBACK FTDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  40. void addLocalLVItems(FileInfo *pFI);
  41. void addRemoteLVItems(FileInfo *pFI);
  42. void reloadLocalFileList();
  43. void reloadRemoteFileList();
  44. char *getLocalPath() { return m_szLocalPath; };
  45. char *getRemotePath() { return m_szRemotePath; };
  46. private:
  47. FileTransfer *m_pFileTransfer;
  48. HWND m_hwndFTDialog;
  49. HINSTANCE m_hInstance;
  50. void onLocalItemActivate(LPNMITEMACTIVATE lpnmia);
  51. void onRemoteItemActivate(LPNMITEMACTIVATE lpnmia);
  52. bool initFTDialog();
  53. void onLocalOneUpFolder(char *pPath);
  54. void onRemoteOneUpFolder(char *pPath);
  55. char m_szLocalPath[MAX_PATH];
  56. char m_szRemotePath[MAX_PATH];
  57. char m_szLocalPathTmp[MAX_PATH];
  58. char m_szRemotePathTmp[MAX_PATH];
  59. bool m_bDlgShown;
  60. };
  61. }
  62. }
  63. #endif // __RFB_WIN32_FTDIALOG_H__