OW2 Consortium

(file) Return to SyncForm.h CVS log (file) (dir) Up to [OW2-CVS] / sync4j / funambol / clients / outlook / UI / src

  1 toccy 1.17  /*
  2 toccy 1.18  * Copyright (C) 2007 Funambol, Inc.
  3 toccy 1.17  *
  4             * This program is free software; you can redistribute it and/or modify
  5             * it under the terms of the GNU General Public License version 2 as
  6             * published by the Free Software Foundation.
  7             *
  8             * This program is distributed in the hope that it will be useful,
  9             * but WITHOUT ANY WARRANTY; without even the implied warranty of
 10             * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
 11             * PURPOSE.  See the GNU General Public License for more details.
 12             *
 13             * You should have received a copy of the GNU General Public License
 14             * along with this program; if not, write to the Free Software
 15             * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 16             * 02111-1307  USA
 17 toccy 1.1  */
 18            
 19 toccy 1.19 /** @cond OLPLUGIN */
 20            /** @addtogroup UI */
 21            /** @{ */
 22            
 23 toccy 1.1  #include "afxwin.h"
 24            #include "afxcmn.h"
 25 rvultursv 1.6  #include "AnimatedIcon.h"
 26 toccy     1.2  
 27 toccy     1.1  #if !defined(AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)
 28                #define AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_
 29                
 30                #if _MSC_VER > 1000
 31                #pragma once
 32                #endif // _MSC_VER > 1000
 33                
 34                /////////////////////////////////////////////////////////////////////////////
 35                // CSyncForm form view
 36                
 37                #ifndef __AFXEXT_H__
 38                #include <afxext.h>
 39                #endif
 40                
 41 rvultursv 1.8  #include "CustomPane.h"
 42 toccy     1.2  
 43 toccy     1.19 
 44                /**
 45                 * Form of the main window.
 46                 * Contains objects on the main screen of the UI (panes, labels, ...).
 47                 */
 48 toccy     1.1  class CSyncForm : public CFormView
 49                {
 50                protected:
 51                	CSyncForm();           // protected constructor used by dynamic creation
 52                	DECLARE_DYNCREATE(CSyncForm)
 53                
 54                public:
 55                	//{{AFX_DATA(CSyncForm)
 56                	enum { IDD = IDD_SYNC_FORM };
 57                		// NOTE: the ClassWizard will add data members here
 58                	//}}AFX_DATA
 59                
 60                public:
 61                
 62                // Overrides
 63                	// ClassWizard generated virtual function overrides
 64                	//{{AFX_VIRTUAL(CSyncForm)
 65                protected:
 66 rvultursv 1.3      virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
 67                    virtual void OnDraw(CDC* pDC);
 68                
 69 toccy     1.1  	//}}AFX_VIRTUAL
 70                
 71 rvultursv 1.3      virtual ~CSyncForm();
 72 toccy     1.1  
 73                #ifdef _DEBUG
 74 rvultursv 1.3       virtual void AssertValid() const;
 75                     virtual void Dump(CDumpContext& dc) const;
 76 toccy     1.1  #endif
 77                
 78                	// Generated message map functions
 79                	//{{AFX_MSG(CSyncForm)
 80                		// NOTE - the ClassWizard will add and remove member functions here.
 81                	//}}AFX_MSG
 82 rvultursv 1.3     DECLARE_MESSAGE_MAP()
 83 toccy     1.14 
 84                private:
 85 toccy     1.15     // true if the UI buttons are locked
 86 toccy     1.14     bool lockedUI;
 87                
 88 toccy     1.15     // Buffers for source panes status labels
 89                    CString contactsStatusLabel;
 90                    CString calendarStatusLabel;
 91                    CString tasksStatusLabel;
 92                    CString notesStatusLabel;
 93                
 94                    // Buffers for source panel titles (fixed)
 95                    CString contactsLabel;
 96                    CString calendarLabel;
 97                    CString tasksLabel;
 98                    CString notesLabel;
 99                
100 toccy     1.1  public:
101 toccy     1.2      CFont fontBold;
102 rvultursv 1.6      CFont fontNormal;
103 toccy     1.2      CAnimatedIcon butStart;
104                    CAnimatedIcon iconContacts;
105                    CAnimatedIcon iconCalendar;
106                    CAnimatedIcon iconTasks;
107                    CAnimatedIcon iconNotes;
108                    CBrush  brushHollow;
109 toccy     1.1  
110 rvultursv 1.10     // right hand status icons
111                    CAnimatedIcon iconStatusContacts;
112                    CAnimatedIcon iconStatusCalendar;
113                    CAnimatedIcon iconStatusTasks;
114                    CAnimatedIcon iconStatusNotes;
115                    CAnimatedIcon iconStatusSync;
116                
117                    // panes
118                    CCustomPane paneSync;
119                    CCustomPane paneContacts;
120                    CCustomPane paneCalendar;
121                    CCustomPane paneTasks;
122                    CCustomPane paneNotes;
123                
124                    // sync source states {SYNCSOURCE_STATE_OK, SYNCSOURCE_STATE_NOT_SYNCED, SYNCSOURCE_STATE_CANCELED}
125                    // defined in winmaincpp.h        
126 rvultursv 1.5      int syncSourceContactState, syncSourceCalendarState;
127                    int syncSourceTaskState, syncSourceNoteState;
128 toccy     1.1  
129 rvultursv 1.10     
130                    /**
131                    * refresh UI info about a source
132                    * @param sourceId : the source type id {SYNCSOURCE_CONTACTS,..}, defined in ClientUtil.h
133                    */
134                    void refreshSource(int sourceId);
135                
136                    // refresh UI info about all sources, calls refreshSource for every sync source
137 toccy     1.2      void refreshSources();
138 rvultursv 1.10     
139                    /**
140                    * repaints sync controls from a pane associated to a source
141                    * @param paneType : the pane type id {PANE_TYPE_CONTACTS, ..}, defined in CustomPane.h
142                    */
143 rvultursv 1.8      void repaintPaneControls(int paneType);
144 rvultursv 1.10 
145                    // shows/hides the sync controls
146 toccy     1.1      void showSyncControls(BOOL show);
147 rvultursv 1.10 
148 toccy     1.14     void lockButtons();
149                    void unlockButtons();
150                
151 rvultursv 1.10     // change UI status text for a source
152 toccy     1.15     void changeContactsStatus(CString& status);
153                    void changeCalendarStatus(CString& status);
154                    void changeTasksStatus   (CString& status);
155                    void changeNotesStatus   (CString& status);
156 toccy     1.2  
157 toccy     1.1      afx_msg LRESULT OnInitForm(WPARAM, LPARAM);
158                    afx_msg void OnBnClickedMainButSync();
159                    afx_msg void OnNcPaint( );
160 toccy     1.2      afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor);
161                    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
162 rvultursv 1.10 
163                    // when main sync pane is clicked
164                    afx_msg void OnStnClickedMainBkSync();
165                
166                    // when sync source panes are clicked
167 rvultursv 1.8      afx_msg void OnStnClickedMainBkContacts();
168                    afx_msg void OnStnClickedMainBkCalendar();
169                    afx_msg void OnStnClickedMainBkTasks();
170                    afx_msg void OnStnClickedMainBkNotes();
171 rvultursv 1.10 
172 toccy     1.1  };
173                
174                /////////////////////////////////////////////////////////////////////////////
175                
176                //{{AFX_INSERT_LOCATION}}
177                // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
178                
179 toccy     1.19 /** @} */
180                /** @endcond */
181 toccy     1.1  #endif // !defined(AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)

webmaster@ow2.org
Powered by
ViewCVS 0.9.4

Back to OW2 Forge