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

ap_Win32Dialog_CollaborationJoin.h

Go to the documentation of this file.
00001 /* AbiCollab - Code to enable the modification of remote documents.
00002  * Copyright (C) 2007 by Ryan Pavlik <abiryan@ryand.net>
00003  * Copyright (C) 2006 by Marc Maurer <uwog@uwog.net>
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301 USA.
00019  */
00020 
00021 #ifndef AP_WIN32DIALOG_COLLABORATIONJOIN_H
00022 #define AP_WIN32DIALOG_COLLABORATIONJOIN_H
00023 
00024 #include <map>
00025 #include <ut_string.h>
00026 #include <windows.h>
00027 #include <commctrl.h>
00028 
00029 #include "ap_Win32Res_DlgCollaborationJoin.rc2"
00030 
00031 #include <dialogs/xp/ap_Dialog_CollaborationJoin.h>
00032 
00033 class XAP_Frame;
00034 
00035 struct ShareListItem
00036 {
00037     ShareListItem(BuddyPtr pBuddy_, DocHandle* pDocHandle_) : pBuddy(pBuddy_), pDocHandle(pDocHandle_) {};
00038     BuddyPtr pBuddy;
00039     DocHandle* pDocHandle;
00040 };
00041 
00042 class AP_Win32Dialog_CollaborationJoin : public AP_Dialog_CollaborationJoin
00043 {
00044 public:
00045     AP_Win32Dialog_CollaborationJoin(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00046     static XAP_Dialog *         static_constructor(XAP_DialogFactory * pFactory, XAP_Dialog_Id id);
00047 
00048     void                        runModal(XAP_Frame * pFrame);
00049     static BOOL CALLBACK        s_dlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
00050     BOOL                        _onInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam);
00051     BOOL                        _onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
00052     BOOL                        _onNotify(HWND hWnd, WPARAM wParam, LPARAM lParam);
00053 
00054 private:
00055     XAP_Win32DialogHelper * p_win32Dialog;
00056 
00057     HTREEITEM               _addBuddyToTree(BuddyPtr pBuddy);
00058     HTREEITEM               _addDocumentToBuddy(HTREEITEM buddyItem, BuddyPtr pBuddy, DocHandle* pDocHandle);
00059     void                    _populateWindowData();
00060     void                    _refreshWindow();
00061     void                    _enableBuddyAddition(bool bEnabled);
00062     ShareListItem*          _getSelectedItem();
00063     void                    _updateSelection();
00064     void                    _eventOpen();
00065     void                    _addDocument(BuddyPtr pBuddy, DocHandle* pDocHandle);
00066     void                    _freeBuddyList();
00067 
00068     // Handles
00069     HINSTANCE               m_hInstance;
00070     HWND                    m_hDocumentTreeview;
00071 };
00072 
00073 #endif /* AP_WIN32DIALOG_COLLABORATIONJOIN_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1