• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_Win32Dialog_CollaborationShare.h

Go to the documentation of this file.
00001 /* AbiCollab - Code to enable the modification of remote documents.
00002  * Copyright (C) 2009 by AbiSource Corporation B.V.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
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     // Handles
00064     HINSTANCE               m_hInstance;
00065     HWND                    m_hAccountCombo;
00066     HWND                    m_hBuddyList;
00067 
00068     // Internal states
00069     HTREEITEM               m_hSelected;
00070 
00071     // Model
00072     std::vector<AccountHandler*>        m_vAccountCombo;
00073     std::map< HTREEITEM, ShareListItem > m_mTreeItemHandles;
00074 };
00075 
00076 #endif /* AP_WIN32DIALOG_COLLABORATIONSHARE_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1