Garmin Fleet Management Controller  2.19.0
CLogViewerDlg.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * CLogViewerDlg.h
5 *
6 * Copyright 2008-2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #ifndef CLogViewerDlg_H
11 #define CLogViewerDlg_H
12 
13 #include <map>
14 #include <iostream>
15 
16 #include "fmi.h"
17 #include "CColoredListBox.h"
18 #include "LogParser.h"
19 #include "CWndEventListener.h"
20 
21 //----------------------------------------------------------------------
30 //----------------------------------------------------------------------
31 class CLogViewerDlg : public CDialog, public CWndEventListener
32 {
33  DECLARE_DYNAMIC( CLogViewerDlg )
34  DECLARE_MESSAGE_MAP()
35 
36 public:
38  (
39  LogParser * aLogParser,
40  CWnd * aParent = NULL,
41  BOOL aOpenOther = FALSE
42  );
43  virtual ~CLogViewerDlg();
44 
45 protected:
49  {
52  };
53 
54  afx_msg void OnBnClickedClearLog();
55  afx_msg void OnBnClickedFindNext();
56  afx_msg void OnBnClickedOk();
57  afx_msg void OnBnClickedSaveAs();
58  afx_msg void OnBnClickedViewCurrent();
59  afx_msg void OnBnClickedViewOther();
60  afx_msg void OnCancel();
61  afx_msg void OnGetMinMaxInfo
62  (
63  MINMAXINFO* aMinMaxInfo
64  );
65 
66  afx_msg void OnLbnSelchangeLog();
67  afx_msg void OnSize
68  (
69  UINT aType,
70  int aClientWidth,
71  int aClientHeight
72  );
73 
74  void resendPacket();
75 
76  BOOL OnInitDialog();
77 
78  virtual void DoDataExchange
79  (
80  CDataExchange * aDataExchange
81  );
82 
83  afx_msg LPARAM OnPacketLogged( WPARAM, LPARAM );
84 
85  void PostNcDestroy();
86 
87  void resetView();
88  void UpdateLogDisplay();
89 
90  BOOL updateView();
91 
94 
96  CButton mCloseButton;
97 
100 
103 
105  CButton mSaveButton;
106 
108  CButton mClearButton;
109 
112 
115 
118 
121 
123  CButton mResendButton;
124 
127 
130 
132  CString mLogNameText;
133 
136 
138  CString mSearchText;
139 
142 
145 
148 
151 
154 
158 
161 };
162 
163 #endif
afx_msg void OnBnClickedFindNext()
Click handler for the Find Next button.
CString mSelectedPacketText
Formatted representation of the current packet.
CStatic mLogNameTitleLabel
Label for the log name control.
afx_msg void OnBnClickedViewOther()
Click handler for the View Other button.
CStatic mCurrentPacketTitleLabel
Label above the current packet text box.
void resetView()
Reset the log view.
Abstract base class for log item parsers.
Definition: LogParser.h:23
afx_msg void OnBnClickedOk()
Click handler for the OK button; destroys the window.
afx_msg LPARAM OnPacketLogged(WPARAM, LPARAM)
Handles the Packet Logged event from Com; updates the packet list.
CLogViewerDlg(LogParser *aLogParser, CWnd *aParent=NULL, BOOL aOpenOther=FALSE)
Constructor.
CButton mClearButton
Reference to the Clear button.
A CListBox that highlights list items matching a search string.
Modeless log viewer dialog.
Definition: CLogViewerDlg.h:31
void UpdateLogDisplay()
Reads the log file and updates the packet list. If a packet was selected, keeps the packet selected a...
SearchDirectionType
Search direction. Indexes must correspond to the radio buttons in the IDC_LOG_RDO_UP radio group...
Definition: CLogViewerDlg.h:48
BOOL mOpenOtherLog
If TRUE, the Open File dialog should be presented (to aOpenOther another log)
Definition: CLogViewerDlg.h:93
CEdit mSearchTextControl
Reference to the Search Text edit box.
#define FALSE
Definition: garmin_types.h:46
CButton mSearchGroupBox
Reference to the Search group box.
CStatic mPacketListTitleLabel
Label above the packet list.
LogParser * mLogParser
The log parser.
virtual ~CLogViewerDlg()
Destructor.
CButton mResendButton
Reference to the Resend button.
CButton mViewOtherButton
Reference to the View Other button.
Definition: CLogViewerDlg.h:99
CButton mCloseButton
Reference to the Close button.
Definition: CLogViewerDlg.h:96
CStatic mLogNameControl
Control containing the log name.
CButton mViewCurrentButton
Reference to the View Current button.
CButton mSearchUpRadioButton
Reference to the Search Up radio button.
afx_msg void OnBnClickedViewCurrent()
Click handler for the View Current button.
EventListener that dispatches a Windows message.
afx_msg void OnCancel()
Handler for the Cancel action; destroys the window.
void PostNcDestroy()
Perform final cleanup on the log viewer.
CButton mSaveButton
Reference to the Save button.
CStatic mCurrentPacketControl
Reference to a control containing the currently selected packet, formatted.
afx_msg void OnLbnSelchangeLog()
Selection Changed handler for the packet list.
BOOL updateView()
Update the log view.
CString mSearchText
Contents of the Search Text edit box.
afx_msg void OnGetMinMaxInfo(MINMAXINFO *aMinMaxInfo)
Called on every resize to get the resize bounds.
afx_msg void OnBnClickedClearLog()
Click handler for the Clear Log button.
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
int mSearchDirection
Search direction.
void resendPacket()
Retransmit the selected packet for debugging purposes.
CString mLogNameText
The string describing the log being viewed ("Current execution&#39;s" or a file name) ...
afx_msg void OnSize(UINT aType, int aClientWidth, int aClientHeight)
Called after the dialog is resized; repositions the contents of the display.
afx_msg void OnBnClickedSaveAs()
Click handler for the Save As button.
CColoredListBox mPacketListBox
Reference to the packet list box.
CButton mSearchDownRadioButton
Reference to the Search Down radio button.
BOOL OnInitDialog()
Initialize the dialog.
CButton mFindNextButton
Reference to the Find Next button.