#include <LogPlayerToolBar.h>
Inheritance diagram for CLogPlayerToolBar:
Public Member Functions | |
CLogPlayerToolBar () | |
virtual void | Init () |
virtual bool | handleCommand (UINT command) |
virtual bool | handleEditChange (UINT nID) |
virtual void | updateUI (CCmdUI *pCmdUI) |
virtual bool | handleSelChange (UINT nID) |
virtual void | updateFrameNumber () |
Protected Member Functions | |
virtual bool | HasButtonText (UINT nID) |
Protected Attributes | |
LogPlayer & | logPlayer |
CString | fileName |
CComboBox | speedCombo |
CEdit | m_wndLogPlayerJumpFrameEdit |
CComboBox | m_wndLogPlayerJumpFrameEditDummyCombo |
Private Member Functions | |
DECLARE_DYNAMIC (CLogPlayerToolBar) |
Definition at line 21 of file LogPlayerToolBar.h.
CLogPlayerToolBar::CLogPlayerToolBar | ( | ) |
constructor
Definition at line 60 of file LogPlayerToolBar.cpp.
CLogPlayerToolBar::DECLARE_DYNAMIC | ( | CLogPlayerToolBar | ) | [private] |
bool CLogPlayerToolBar::handleCommand | ( | UINT | command | ) | [virtual] |
Handles control notifications which arrived in the main frame
command | The id of the control, menu, accelerator etc. |
Reimplemented from CRobotControlToolBar.
Definition at line 227 of file LogPlayerToolBar.cpp.
References LogPlayer::_new(), fileName, File::getGTDir(), IDC_LOGPLAYER_NEW, IDC_LOGPLAYER_OPEN, IDC_LOGPLAYER_PAUSE, IDC_LOGPLAYER_PLAY, IDC_LOGPLAYER_RECORD, IDC_LOGPLAYER_SAVE, IDC_LOGPLAYER_SMOOTH, IDC_LOGPLAYER_STEP_BACKWARD, IDC_LOGPLAYER_STEP_FORWARD, IDC_LOGPLAYER_STEP_REPEAT, IDC_LOGPLAYER_STOP, logPlayer, LogPlayer::open(), LogPlayer::pause(), LogPlayer::play(), LogPlayer::record(), LogPlayer::save(), LogPlayer::saveAMV(), LogPlayer::saveCSV(), LogPlayer::saveImages(), LogPlayer::smooth(), LogPlayer::stepBackward(), LogPlayer::stepForward(), LogPlayer::stepRepeat(), LogPlayer::stop(), and updateFrameNumber().
bool CLogPlayerToolBar::handleEditChange | ( | UINT | nID | ) | [virtual] |
Handles change events for edit controls. That function must be called from the main frame window for all edit controls of the toolbar.
nID | the command id of the edit control |
Reimplemented from CRobotControlToolBar.
Definition at line 80 of file LogPlayerToolBar.cpp.
References LogPlayer::getNumberOfMessages(), IDC_LOGPLAYER_JUMP_FRAME, LogPlayer::jumpFrame(), logPlayer, and m_wndLogPlayerJumpFrameEdit.
bool CLogPlayerToolBar::handleSelChange | ( | UINT | nID | ) | [virtual] |
Handles selection change events for combo boxes. That function must be called from the main frame window for all combo boxes of the toolbar.
nID | the command id of the combo box |
Reimplemented from CRobotControlToolBar.
Definition at line 66 of file LogPlayerToolBar.cpp.
References IDC_LOGPLAYER_PLAY_SPEED, logPlayer, LogPlayer::setPlaySpeed(), and speedCombo.
bool CLogPlayerToolBar::HasButtonText | ( | UINT | nID | ) | [protected, virtual] |
Determines if the buttons have a text
Reimplemented from CRobotControlToolBar.
Definition at line 337 of file LogPlayerToolBar.cpp.
References IDC_LOGPLAYER_PLAY_SPEED.
void CLogPlayerToolBar::Init | ( | ) | [virtual] |
Initializes the tool bar
Implements CRobotControlToolBar.
Definition at line 18 of file LogPlayerToolBar.cpp.
References IDB_LOGPLAYER, IDB_LOGPLAYER_COLD, IDC_LOGPLAYER_JUMP_FRAME, IDC_LOGPLAYER_NEW, IDC_LOGPLAYER_OPEN, IDC_LOGPLAYER_PAUSE, IDC_LOGPLAYER_PLAY, IDC_LOGPLAYER_PLAY_SPEED, IDC_LOGPLAYER_RECORD, IDC_LOGPLAYER_SAVE, IDC_LOGPLAYER_SMOOTH, IDC_LOGPLAYER_STEP_BACKWARD, IDC_LOGPLAYER_STEP_FORWARD, IDC_LOGPLAYER_STEP_REPEAT, and IDC_LOGPLAYER_STOP.
void CLogPlayerToolBar::updateFrameNumber | ( | ) | [virtual] |
Definition at line 343 of file LogPlayerToolBar.cpp.
References LogPlayer::getCurrentMessageNumber(), logPlayer, and m_wndLogPlayerJumpFrameEdit.
Referenced by handleCommand().
void CLogPlayerToolBar::updateUI | ( | CCmdUI * | pCmdUI | ) | [virtual] |
Enables the controls in the toolbar. This function is called from the main window for all controls.
pCmdUI | An interface to the control that allows enabling/disabling, checking etc. |
Reimplemented from CRobotControlToolBar.
Definition at line 96 of file LogPlayerToolBar.cpp.
References fileName, LogPlayer::getCurrentMessageID(), LogPlayer::getCurrentMessageNumber(), LogPlayer::getNumberOfMessages(), LogPlayer::getState(), IDC_LOGPLAYER_JUMP_FRAME, IDC_LOGPLAYER_NEW, IDC_LOGPLAYER_OPEN, IDC_LOGPLAYER_PAUSE, IDC_LOGPLAYER_PLAY, IDC_LOGPLAYER_RECORD, IDC_LOGPLAYER_SAVE, IDC_LOGPLAYER_SMOOTH, IDC_LOGPLAYER_STEP_BACKWARD, IDC_LOGPLAYER_STEP_FORWARD, IDC_LOGPLAYER_STEP_REPEAT, IDC_LOGPLAYER_STOP, IDC_STATUS_BAR_LOGPLAYER_FILENAME, IDC_STATUS_BAR_LOGPLAYER_MESSAGE, IDC_STATUS_BAR_LOGPLAYER_MESSAGE_ID, LogPlayer::initial, logPlayer, LogPlayer::paused, LogPlayer::playing, LogPlayer::recording, text, and TRUE.
CString CLogPlayerToolBar::fileName [protected] |
The current log file for playing and recording
Definition at line 70 of file LogPlayerToolBar.h.
Referenced by handleCommand(), and updateUI().
LogPlayer& CLogPlayerToolBar::logPlayer [protected] |
A reference to the log player queue in the RobotControl application
Definition at line 67 of file LogPlayerToolBar.h.
Referenced by handleCommand(), handleEditChange(), handleSelChange(), updateFrameNumber(), and updateUI().
CEdit CLogPlayerToolBar::m_wndLogPlayerJumpFrameEdit [protected] |
A control for editing the frame-number to jump to
Definition at line 79 of file LogPlayerToolBar.h.
Referenced by handleEditChange(), and updateFrameNumber().
CComboBox CLogPlayerToolBar::m_wndLogPlayerJumpFrameEditDummyCombo [protected] |
A dummy combo box for the edit control
Definition at line 81 of file LogPlayerToolBar.h.
CComboBox CLogPlayerToolBar::speedCombo [protected] |
A combo box for the play speed
Definition at line 76 of file LogPlayerToolBar.h.
Referenced by handleSelChange().