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

00001  /*
00002  * Copyright (C) 2007 Funambol, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 2 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00016  * 02111-1307  USA
00017 */
00018 
00023 #include "afxwin.h"
00024 #include "afxcmn.h"
00025 #include "AnimatedIcon.h"
00026 
00027 #if !defined(AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)
00028 #define AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_
00029 
00030 #if _MSC_VER > 1000
00031 #pragma once
00032 #endif // _MSC_VER > 1000
00033 
00035 // CSyncForm form view
00036 
00037 #ifndef __AFXEXT_H__
00038 #include <afxext.h>
00039 #endif
00040 
00041 #include "CustomPane.h"
00042 
00043 
00048 class CSyncForm : public CFormView
00049 {
00050 protected:
00051         CSyncForm();           // protected constructor used by dynamic creation
00052         DECLARE_DYNCREATE(CSyncForm)
00053 
00054 public:
00055         //{{AFX_DATA(CSyncForm)
00056         enum { IDD = IDD_SYNC_FORM };
00057                 // NOTE: the ClassWizard will add data members here
00058         //}}AFX_DATA
00059 
00060 public:
00061 
00062 // Overrides
00063         // ClassWizard generated virtual function overrides
00064         //{{AFX_VIRTUAL(CSyncForm)
00065 protected:
00066     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00067     virtual void OnDraw(CDC* pDC);
00068 
00069         //}}AFX_VIRTUAL
00070 
00071     virtual ~CSyncForm();
00072 
00073 #ifdef _DEBUG
00074      virtual void AssertValid() const;
00075      virtual void Dump(CDumpContext& dc) const;
00076 #endif
00077 
00078         // Generated message map functions
00079         //{{AFX_MSG(CSyncForm)
00080                 // NOTE - the ClassWizard will add and remove member functions here.
00081         //}}AFX_MSG
00082    DECLARE_MESSAGE_MAP()
00083 
00084 private:
00085     // true if the UI buttons are locked
00086     bool lockedUI;
00087 
00088     // Buffers for source panes status labels
00089     CString contactsStatusLabel;
00090     CString calendarStatusLabel;
00091     CString tasksStatusLabel;
00092     CString notesStatusLabel;
00093 
00094     // Buffers for source panel titles (fixed)
00095     CString contactsLabel;
00096     CString calendarLabel;
00097     CString tasksLabel;
00098     CString notesLabel;
00099 
00100 public:
00101     CFont fontBold;
00102     CFont fontNormal;
00103     CAnimatedIcon butStart;
00104     CAnimatedIcon iconContacts;
00105     CAnimatedIcon iconCalendar;
00106     CAnimatedIcon iconTasks;
00107     CAnimatedIcon iconNotes;
00108     CBrush  brushHollow;
00109 
00110     // right hand status icons
00111     CAnimatedIcon iconStatusContacts;
00112     CAnimatedIcon iconStatusCalendar;
00113     CAnimatedIcon iconStatusTasks;
00114     CAnimatedIcon iconStatusNotes;
00115     CAnimatedIcon iconStatusSync;
00116 
00117     // panes
00118     CCustomPane paneSync;
00119     CCustomPane paneContacts;
00120     CCustomPane paneCalendar;
00121     CCustomPane paneTasks;
00122     CCustomPane paneNotes;
00123 
00124     // sync source states {SYNCSOURCE_STATE_OK, SYNCSOURCE_STATE_NOT_SYNCED, SYNCSOURCE_STATE_CANCELED}
00125     // defined in winmaincpp.h        
00126     int syncSourceContactState, syncSourceCalendarState;
00127     int syncSourceTaskState, syncSourceNoteState;
00128 
00129     
00134     void refreshSource(int sourceId);
00135 
00136     // refresh UI info about all sources, calls refreshSource for every sync source
00137     void refreshSources();
00138     
00143     void repaintPaneControls(int paneType);
00144 
00145     // shows/hides the sync controls
00146     void showSyncControls(BOOL show);
00147 
00148     void lockButtons();
00149     void unlockButtons();
00150 
00151     // change UI status text for a source
00152     void changeContactsStatus(CString& status);
00153     void changeCalendarStatus(CString& status);
00154     void changeTasksStatus   (CString& status);
00155     void changeNotesStatus   (CString& status);
00156 
00157     afx_msg LRESULT OnInitForm(WPARAM, LPARAM);
00158     afx_msg void OnBnClickedMainButSync();
00159     afx_msg void OnNcPaint( );
00160     afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor);
00161     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00162 
00163     // when main sync pane is clicked
00164     afx_msg void OnStnClickedMainBkSync();
00165 
00166     // when sync source panes are clicked
00167     afx_msg void OnStnClickedMainBkContacts();
00168     afx_msg void OnStnClickedMainBkCalendar();
00169     afx_msg void OnStnClickedMainBkTasks();
00170     afx_msg void OnStnClickedMainBkNotes();
00171 
00172 };
00173 
00175 
00176 //{{AFX_INSERT_LOCATION}}
00177 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00178 
00181 #endif // !defined(AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)

Generated on Fri Nov 9 12:21:27 2007 for Funambol Outlook Plug-in Library by  doxygen 1.5.2