Rollback from r3608 to r3606
[public/netxms.git] / src / console / PocketPC / MainFrm.h
1 // MainFrm.h : interface of the CMainFrame class
2 //
3 /////////////////////////////////////////////////////////////////////////////
4
5 #if !defined(AFX_MAINFRM_H__A3A56849_27C5_4B36_9F48_86C7088BF7BF__INCLUDED_)
6 #define AFX_MAINFRM_H__A3A56849_27C5_4B36_9F48_86C7088BF7BF__INCLUDED_
7
8 #if _MSC_VER >= 1000
9 #pragma once
10 #endif // _MSC_VER >= 1000
11
12 #include "ObjectView.h" // Added by ClassView
13 #include "SummaryView.h" // Added by ClassView
14 #include "AlarmView.h" // Added by ClassView
15 #include "DynamicView.h" // Added by ClassView
16
17 // Array for the toolbar buttons
18
19 #if (_WIN32_WCE < 201)
20 static TBBUTTON g_arCBButtons[] = {
21 { 0, ID_FILE_NEW, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 0},
22 { 1, ID_FILE_OPEN, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 1},
23 { 2, ID_FILE_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 2},
24 { 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0, 0, -1},
25 { 3, ID_EDIT_CUT, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 3},
26 { 4, ID_EDIT_COPY, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 4},
27 { 5, ID_EDIT_PASTE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0, 0, 5}
28 };
29 #endif
30
31 #if defined(_WIN32_WCE_PSPC) && (_WIN32_WCE >= 212)
32 #define NUM_TOOL_TIPS 8
33 #endif
34
35
36 class CMainFrame : public CFrameWnd
37 {
38 public:
39 CMainFrame();
40 protected:
41 DECLARE_DYNAMIC(CMainFrame)
42
43 // Attributes
44 public:
45
46 // Operations
47 public:
48
49 // Overrides
50 // ClassWizard generated virtual function overrides
51 //{{AFX_VIRTUAL(CMainFrame)
52 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
53 virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
54 //}}AFX_VIRTUAL
55
56 // Implementation
57 public:
58 void ActivateView(CWnd *pwndView);
59 virtual ~CMainFrame();
60 #ifdef _DEBUG
61 virtual void AssertValid() const;
62 virtual void Dump(CDumpContext& dc) const;
63 #endif
64
65 protected: // control bar embedded members
66 CCeCommandBar m_wndCommandBar;
67
68 // Generated message map functions
69 protected:
70 void RefreshFullScreen(void);
71 BOOL m_bFullScreen;
72 DWORD FindViewInList(CWnd *pwndView);
73 DWORD m_dwNumViews;
74 CBitmapButton m_wndBtnNext;
75 CBitmapButton m_wndBtnPrev;
76 CToolBarCtrl m_wndToolBar;
77 CBitmapButton m_wndBtnClose;
78 CWnd *m_pwndViewList[MAX_DYNAMIC_VIEWS + 3];
79 CAlarmView m_wndAlarmView;
80 CWnd *m_pwndCurrView;
81 CSummaryView m_wndSummaryView;
82 CObjectView m_wndObjectView;
83 //{{AFX_MSG(CMainFrame)
84 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
85 afx_msg void OnSetFocus(CWnd *pOldWnd);
86 afx_msg void OnViewObjects();
87 afx_msg void OnViewSummary();
88 afx_msg void OnViewAlarms();
89 afx_msg void OnSize(UINT nType, int cx, int cy);
90 afx_msg void OnViewRefreshAll();
91 afx_msg void OnPaint();
92 afx_msg void OnViewNext();
93 afx_msg void OnViewPrev();
94 afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
95 afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
96 afx_msg void OnViewFullscreen();
97 //}}AFX_MSG
98 afx_msg void OnObjectChange(WPARAM wParam, LPARAM lParam);
99 afx_msg void OnAlarmUpdate(WPARAM wParam, LPARAM lParam);
100 LPTSTR MakeString(UINT stringID);
101 LPTSTR m_ToolTipsTable[NUM_TOOL_TIPS];
102
103 DECLARE_MESSAGE_MAP()
104
105 public:
106 void FullScreen(BOOL bFullScreen);
107 void CreateView(CDynamicView *pwndView, TCHAR *pszTitle);
108 void UnregisterView(CDynamicView *pView);
109 BOOL RegisterView(CDynamicView *pView);
110 COLORREF m_rgbTitleText;
111 COLORREF m_rgbTitleBkgnd;
112 int *GetAlarmStats(void) { return m_wndAlarmView.m_iNumAlarms; }
113 BOOL IsFullScreen(void) { return m_bFullScreen; }
114 void ToggleFullScreen(void) { FullScreen(!m_bFullScreen); }
115 };
116
117 /////////////////////////////////////////////////////////////////////////////
118
119 //{{AFX_INSERT_LOCATION}}
120 // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
121
122 #endif // !defined(AFX_MAINFRM_H__A3A56849_27C5_4B36_9F48_86C7088BF7BF__INCLUDED_)