D:/develop/v65/clients/outlook/install/output/export/funambol/clients/outlook/UI/src/SyncForm.h

00001 /*
00002  * Funambol is a mobile platform developed by Funambol, Inc. 
00003  * Copyright (C) 2003 - 2007 Funambol, Inc.
00004  * 
00005  * This program is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Affero General Public License version 3 as published by
00007  * the Free Software Foundation with the addition of the following permission 
00008  * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
00009  * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE 
00010  * WARRANTY OF NON INFRINGEMENT  OF THIRD PARTY RIGHTS.
00011  * 
00012  * This program is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00015  * details.
00016  * 
00017  * You should have received a copy of the GNU Affero General Public License 
00018  * along with this program; if not, see http://www.gnu.org/licenses or write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00020  * MA 02110-1301 USA.
00021  * 
00022  * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite 
00023  * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com.
00024  * 
00025  * The interactive user interfaces in modified source and object code versions
00026  * of this program must display Appropriate Legal Notices, as required under
00027  * Section 5 of the GNU Affero General Public License version 3.
00028  * 
00029  * In accordance with Section 7(b) of the GNU Affero General Public License
00030  * version 3, these Appropriate Legal Notices must retain the display of the
00031  * "Powered by Funambol" logo. If the display of the logo is not reasonably 
00032  * feasible for technical reasons, the Appropriate Legal Notices must display
00033  * the words "Powered by Funambol".
00034  */
00035 
00040 #include "afxwin.h"
00041 #include "afxcmn.h"
00042 #include "AnimatedIcon.h"
00043 
00044 #if !defined(AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)
00045 #define AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_
00046 
00047 #if _MSC_VER > 1000
00048 #pragma once
00049 #endif // _MSC_VER > 1000
00050 
00052 // CSyncForm form view
00053 
00054 #ifndef __AFXEXT_H__
00055 #include <afxext.h>
00056 #endif
00057 
00058 #include "CustomPane.h"
00059 
00060 
00065 class CSyncForm : public CFormView
00066 {
00067 protected:
00068         CSyncForm();           // protected constructor used by dynamic creation
00069         DECLARE_DYNCREATE(CSyncForm)
00070 
00071 public:
00072         //{{AFX_DATA(CSyncForm)
00073         enum { IDD = IDD_SYNC_FORM };
00074                 // NOTE: the ClassWizard will add data members here
00075         //}}AFX_DATA
00076 
00077 public:
00078 
00079 // Overrides
00080         // ClassWizard generated virtual function overrides
00081         //{{AFX_VIRTUAL(CSyncForm)
00082 protected:
00083     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00084     virtual void OnDraw(CDC* pDC);
00085 
00086         //}}AFX_VIRTUAL
00087 
00088     virtual ~CSyncForm();
00089 
00090 #ifdef _DEBUG
00091      virtual void AssertValid() const;
00092      virtual void Dump(CDumpContext& dc) const;
00093 #endif
00094 
00095         // Generated message map functions
00096         //{{AFX_MSG(CSyncForm)
00097                 // NOTE - the ClassWizard will add and remove member functions here.
00098         //}}AFX_MSG
00099    DECLARE_MESSAGE_MAP()
00100 
00101 private:
00102     // true if the UI buttons are locked
00103     bool lockedUI;
00104 
00105     // Buffers for source panes status labels
00106     CString contactsStatusLabel;
00107     CString calendarStatusLabel;
00108     CString tasksStatusLabel;
00109     CString notesStatusLabel;
00110 
00111     // Buffers for source panel titles (fixed)
00112     CString contactsLabel;
00113     CString calendarLabel;
00114     CString tasksLabel;
00115     CString notesLabel;
00116 
00117 public:
00118     CFont fontBold;
00119     CFont fontNormal;
00120     CAnimatedIcon butStart;
00121     CAnimatedIcon iconContacts;
00122     CAnimatedIcon iconCalendar;
00123     CAnimatedIcon iconTasks;
00124     CAnimatedIcon iconNotes;
00125     CBrush  brushHollow;
00126 
00127     // right hand status icons
00128     CAnimatedIcon iconStatusContacts;
00129     CAnimatedIcon iconStatusCalendar;
00130     CAnimatedIcon iconStatusTasks;
00131     CAnimatedIcon iconStatusNotes;
00132     CAnimatedIcon iconStatusSync;
00133 
00134     // panes
00135     CCustomPane paneSync;
00136     CCustomPane paneContacts;
00137     CCustomPane paneCalendar;
00138     CCustomPane paneTasks;
00139     CCustomPane paneNotes;
00140 
00141     // sync source states {SYNCSOURCE_STATE_OK, SYNCSOURCE_STATE_NOT_SYNCED, SYNCSOURCE_STATE_CANCELED}
00142     // defined in winmaincpp.h        
00143     int syncSourceContactState, syncSourceCalendarState;
00144     int syncSourceTaskState, syncSourceNoteState;
00145 
00146     
00151     void refreshSource(int sourceId);
00152 
00153     // refresh UI info about all sources, calls refreshSource for every sync source
00154     void refreshSources();
00155     
00160     void repaintPaneControls(int paneType);
00161 
00162     // shows/hides the sync controls
00163     void showSyncControls(BOOL show);
00164 
00165     void lockButtons();
00166     void unlockButtons();
00167 
00168     // change UI status text for a source
00169     void changeContactsStatus(CString& status);
00170     void changeCalendarStatus(CString& status);
00171     void changeTasksStatus   (CString& status);
00172     void changeNotesStatus   (CString& status);
00173 
00174     afx_msg LRESULT OnInitForm(WPARAM, LPARAM);
00175     afx_msg void OnBnClickedMainButSync();
00176     afx_msg void OnNcPaint( );
00177     afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor);
00178     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00179 
00180     // when main sync pane is clicked
00181     afx_msg void OnStnClickedMainBkSync();
00182 
00183     // when sync source panes are clicked
00184     afx_msg void OnStnClickedMainBkContacts();
00185     afx_msg void OnStnClickedMainBkCalendar();
00186     afx_msg void OnStnClickedMainBkTasks();
00187     afx_msg void OnStnClickedMainBkNotes();
00188 
00189 };
00190 
00192 
00193 //{{AFX_INSERT_LOCATION}}
00194 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00195 
00198 #endif // !defined(AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)

Generated on Mon Feb 4 09:50:49 2008 for Funambol Outlook Plug-in Library by  doxygen 1.5.2