Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AP_WIN32DIALOG_COLLABORATIONSHARE_H
00021 #define AP_WIN32DIALOG_COLLABORATIONSHARE_H
00022
00023 #include <map>
00024 #include <ut_string.h>
00025 #include <windows.h>
00026 #include <commctrl.h>
00027
00028 #include "ap_Win32Res_DlgCollaborationShare.rc2"
00029
00030 #include <dialogs/xp/ap_Dialog_CollaborationShare.h>
00031
00032 class XAP_Frame;
00033
00034 struct ShareListItem
00035 {
00036 ShareListItem(BuddyPtr pBuddy_, DocHandle* pDocHandle_) : pBuddy(pBuddy_), pDocHandle(pDocHandle_) {};
00037 BuddyPtr pBuddy;
00038 DocHandle* pDocHandle;
00039 };
00040
00041 class AP_Win32Dialog_CollaborationShare : public AP_Dialog_CollaborationShare
00042 {
00043 public:
00044 AP_Win32Dialog_CollaborationShare(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00045 static XAP_Dialog * static_constructor(XAP_DialogFactory * pFactory, XAP_Dialog_Id id);
00046
00047 void runModal(XAP_Frame * pFrame);
00048 static BOOL CALLBACK s_dlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
00049 BOOL _onInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam);
00050 BOOL _onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
00051
00052 private:
00053 XAP_Win32DialogHelper * m_pWin32Dialog;
00054
00055 void _populateWindowData();
00056 void _populateBuddyModel(bool refresh);
00057 void _refreshWindow();
00058 AccountHandler* _getActiveAccountHandler();
00059 void _setAccountHint(const UT_UTF8String& sHint);
00060 void _getSelectedBuddies(std::vector<std::string>& vACL);
00061 void _freeBuddyList();
00062
00063
00064 HINSTANCE m_hInstance;
00065 HWND m_hAccountCombo;
00066 HWND m_hBuddyList;
00067
00068
00069 HTREEITEM m_hSelected;
00070
00071
00072 std::vector<AccountHandler*> m_vAccountCombo;
00073 std::map< HTREEITEM, ShareListItem > m_mTreeItemHandles;
00074 };
00075
00076 #endif