CSimulatorObjectViewerDlgBar Class Reference

#include <SimulatorObjectViewerDlgBar.h>

Inheritance diagram for CSimulatorObjectViewerDlgBar:

CRobotControlDialogBar CDynamicBarDlg MessageHandler CDynamicChildDlg CDynamicDialog CDynamicWndEx CDynamicWnd List of all members.

Public Types

 IDD = IDD_DIALOG_BAR_SIMULATOR_OBJECT_VIEWER
enum  { IDD = IDD_DIALOG_BAR_SIMULATOR_OBJECT_VIEWER }

Public Member Functions

 CSimulatorObjectViewerDlgBar ()
 ~CSimulatorObjectViewerDlgBar ()
void Repaint ()
void DoDraw (CDC &dc)
CSimRobotDocumentGetDocument ()
virtual bool handleCommand (UINT command)
virtual void updateUI (CCmdUI *pCmdUI)
virtual void OnConfigurationLoad (CString sectionName)
virtual void OnConfigurationSave (CString sectionName)
afx_msg void OnPaint ()
afx_msg void OnSize (UINT nType, int cx, int cy)
afx_msg void OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg void OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg void OnRButtonUp (UINT nFlags, CPoint point)
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnDestroy ()
 DECLARE_MESSAGE_MAP ()

Public Attributes

CScrollBar m_hScrollBar
CScrollBar m_vScrollBar

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
virtual BOOL OnInitDialog ()
virtual void OnDraw (CDC *pDC)
void OnScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)

Protected Attributes

UINT m_nZoom
UINT m_nDistortion
UINT m_nDetailLevel
bool m_bHidden
bool m_bRepaint
SIM3DOBJECT m_obj
CBitmap * m_pBitmap
CRect m_rect
BOOL m_bTurn
CMenu m_menuPopup

Private Member Functions

CLICKINFO CalcClickInfo (CPoint point)

Detailed Description

A docking window for the simulator object viewer

Author:
Martin Lötzsch

Definition at line 21 of file SimulatorObjectViewerDlgBar.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
IDD 

Definition at line 28 of file SimulatorObjectViewerDlgBar.h.


Constructor & Destructor Documentation

CSimulatorObjectViewerDlgBar::CSimulatorObjectViewerDlgBar (  ) 

Definition at line 34 of file SimulatorObjectViewerDlgBar.cpp.

References CRobotControlSimulatedRobots::getSimRobotDocument(), getSimulatedRobots(), and CSimRobotDocument::pSimulatorObjectViewerDlgBar.

CSimulatorObjectViewerDlgBar::~CSimulatorObjectViewerDlgBar (  ) 

Definition at line 43 of file SimulatorObjectViewerDlgBar.cpp.

References m_pBitmap.


Member Function Documentation

CLICKINFO CSimulatorObjectViewerDlgBar::CalcClickInfo ( CPoint  point  )  [private]

Definition at line 58 of file SimulatorObjectViewerDlgBar.cpp.

References GetDocument(), m_hScrollBar, m_nDistortion, m_nZoom, and m_vScrollBar.

Referenced by OnDestroy(), OnLButtonDblClk(), OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

CSimulatorObjectViewerDlgBar::DECLARE_MESSAGE_MAP (  ) 

Reimplemented from CDynamicBarDlg.

void CSimulatorObjectViewerDlgBar::DoDataExchange ( CDataExchange *  pDX  )  [protected, virtual]

Definition at line 49 of file SimulatorObjectViewerDlgBar.cpp.

References IDC_SIMROBOT_OBJECT_VIEWER_HSCROLL, IDC_SIMROBOT_OBJECT_VIEWER_VSCROLL, m_hScrollBar, and m_vScrollBar.

void CSimulatorObjectViewerDlgBar::DoDraw ( CDC &  dc  ) 

Definition at line 241 of file SimulatorObjectViewerDlgBar.cpp.

References SIMULATION::DrawObject(), HIDDENGRAPH::EndOfPicture(), GetDocument(), SIMULATION::GetObject(), CSimRobotDocument::GetSimulation(), m_bHidden, m_hScrollBar, m_nDetailLevel, m_nDistortion, m_nZoom, m_obj, m_vScrollBar, HIDDENGRAPH::NewPicture(), MFCGRAPH::RegisterColors(), HIDDENGRAPH::SetHidden(), HIDDENGRAPH::SetViewPoint(), TurnXYMatrix(), and TurnYZMatrix().

Referenced by OnDraw().

CSimRobotDocument * CSimulatorObjectViewerDlgBar::GetDocument (  ) 

Definition at line 437 of file SimulatorObjectViewerDlgBar.cpp.

References CRobotControlSimulatedRobots::getSimRobotDocument(), and getSimulatedRobots().

Referenced by CalcClickInfo(), DoDraw(), OnDestroy(), OnLButtonDblClk(), OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

bool CSimulatorObjectViewerDlgBar::handleCommand ( UINT  command  )  [virtual]

Handles control notifications which arrived in the main frame

Parameters:
command The id of the control, menu, accelerator etc.
Returns:
If the command was handled.

Reimplemented from CRobotControlDialogBar.

Definition at line 179 of file SimulatorObjectViewerDlgBar.cpp.

References IDC_SIMROBOT_DETAIL_LEVEL0, IDC_SIMROBOT_DETAIL_LEVEL1, IDC_SIMROBOT_DETAIL_LEVEL2, IDC_SIMROBOT_DETAIL_LEVEL3, IDC_SIMROBOT_DETAIL_LEVEL4, IDC_SIMROBOT_DETAIL_LEVEL5, IDC_SIMROBOT_DETAIL_LEVEL6, IDC_SIMROBOT_DETAIL_LEVEL7, IDC_SIMROBOT_DETAIL_LEVEL8, IDC_SIMROBOT_DETAIL_LEVEL9, IDC_SIMROBOT_DIST0RTION1, IDC_SIMROBOT_DIST0RTION2, IDC_SIMROBOT_DIST0RTION4, IDC_SIMROBOT_DIST0RTION5, IDC_SIMROBOT_DISTORTION0, IDC_SIMROBOT_DISTORTION3, IDC_SIMROBOT_VIEW_HIDDEN_LINES, IDC_SIMROBOT_ZOOM0, IDC_SIMROBOT_ZOOM1, IDC_SIMROBOT_ZOOM2, IDC_SIMROBOT_ZOOM3, IDC_SIMROBOT_ZOOM4, IDC_SIMROBOT_ZOOM5, IDC_SIMROBOT_ZOOM6, IDC_SIMROBOT_ZOOM7, IDC_SIMROBOT_ZOOM8, IDC_SIMROBOT_ZOOM9, m_bHidden, m_nDetailLevel, m_nDistortion, m_nZoom, and Repaint().

void CSimulatorObjectViewerDlgBar::OnConfigurationLoad ( CString  sectionName  )  [virtual]

Is called when a configuration is loaded. Can be used by the dialogs and bars to load configuration dependand settings.

Parameters:
sectionName The registry section for the current configuration

Reimplemented from CRobotControlDialogBar.

Definition at line 403 of file SimulatorObjectViewerDlgBar.cpp.

References m_bHidden, m_hScrollBar, m_nDetailLevel, m_nDistortion, m_nZoom, and m_vScrollBar.

void CSimulatorObjectViewerDlgBar::OnConfigurationSave ( CString  sectionName  )  [virtual]

Is called when a configuration is saved. Can be used by the dialogs and bars to save configuration dependand settings.

Parameters:
sectionName The registry section for the current configuration

Reimplemented from CRobotControlDialogBar.

Definition at line 420 of file SimulatorObjectViewerDlgBar.cpp.

References m_bHidden, m_hScrollBar, m_nDetailLevel, m_nDistortion, m_nZoom, and m_vScrollBar.

void CSimulatorObjectViewerDlgBar::OnDestroy (  ) 

Reimplemented from CDynamicDialog.

Definition at line 342 of file SimulatorObjectViewerDlgBar.cpp.

References CalcClickInfo(), GetDocument(), and CSimRobotDocument::OnEndDrag().

void CSimulatorObjectViewerDlgBar::OnDraw ( CDC *  pDC  )  [protected, virtual]

Definition at line 265 of file SimulatorObjectViewerDlgBar.cpp.

References DoDraw(), FALSE, m_bRepaint, m_obj, m_pBitmap, m_rect, and TRUE.

Referenced by OnPaint().

BOOL CSimulatorObjectViewerDlgBar::OnEraseBkgnd ( CDC *  pDC  ) 

Definition at line 102 of file SimulatorObjectViewerDlgBar.cpp.

References TRUE.

void CSimulatorObjectViewerDlgBar::OnHScroll ( UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar 
)

Definition at line 113 of file SimulatorObjectViewerDlgBar.cpp.

References OnScroll().

BOOL CSimulatorObjectViewerDlgBar::OnInitDialog (  )  [protected, virtual]

Reimplemented from CDynamicDialog.

Definition at line 76 of file SimulatorObjectViewerDlgBar.cpp.

References CDynamicWnd::AddSzControl(), FALSE, IDP_SIMROBOT_OBJECT_VIEWER, m_bHidden, m_bTurn, m_hScrollBar, m_menuPopup, m_nDetailLevel, m_nDistortion, m_nZoom, m_pBitmap, m_rect, m_vScrollBar, CDynamicWnd::mdRepos, CDynamicWnd::mdResize, CDynamicDialog::OnInitDialog(), and TRUE.

void CSimulatorObjectViewerDlgBar::OnLButtonDblClk ( UINT  nFlags,
CPoint  point 
)

Definition at line 321 of file SimulatorObjectViewerDlgBar.cpp.

References CalcClickInfo(), GetDocument(), and CSimRobotDocument::OnMouseDoubleClick().

void CSimulatorObjectViewerDlgBar::OnLButtonDown ( UINT  nFlags,
CPoint  point 
)

Definition at line 310 of file SimulatorObjectViewerDlgBar.cpp.

References CalcClickInfo(), GetDocument(), CSimRobotDocument::OnBeginDrag(), and CSimRobotDocument::OnMouseClick().

void CSimulatorObjectViewerDlgBar::OnLButtonUp ( UINT  nFlags,
CPoint  point 
)

Definition at line 333 of file SimulatorObjectViewerDlgBar.cpp.

References CalcClickInfo(), GetDocument(), and CSimRobotDocument::OnEndDrag().

void CSimulatorObjectViewerDlgBar::OnMouseMove ( UINT  nFlags,
CPoint  point 
)

Definition at line 327 of file SimulatorObjectViewerDlgBar.cpp.

References CalcClickInfo(), GetDocument(), and CSimRobotDocument::OnDrag().

void CSimulatorObjectViewerDlgBar::OnPaint (  ) 

Definition at line 234 of file SimulatorObjectViewerDlgBar.cpp.

References OnDraw().

void CSimulatorObjectViewerDlgBar::OnRButtonUp ( UINT  nFlags,
CPoint  point 
)

Definition at line 171 of file SimulatorObjectViewerDlgBar.cpp.

References m_menuPopup.

void CSimulatorObjectViewerDlgBar::OnScroll ( UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar 
) [protected]

Definition at line 123 of file SimulatorObjectViewerDlgBar.cpp.

References m_bTurn, and Repaint().

Referenced by OnHScroll(), and OnVScroll().

void CSimulatorObjectViewerDlgBar::OnSize ( UINT  nType,
int  cx,
int  cy 
)

Reimplemented from CDynamicDialog.

Definition at line 107 of file SimulatorObjectViewerDlgBar.cpp.

References CDynamicDialog::OnSize(), and Repaint().

void CSimulatorObjectViewerDlgBar::OnVScroll ( UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar 
)

Definition at line 118 of file SimulatorObjectViewerDlgBar.cpp.

References OnScroll().

void CSimulatorObjectViewerDlgBar::Repaint (  ) 

Definition at line 228 of file SimulatorObjectViewerDlgBar.cpp.

References FALSE, m_bRepaint, and TRUE.

Referenced by handleCommand(), CSimRobotDocument::OnIdle(), OnScroll(), CRobotControlSimulatedRobots::OnSimReset(), and OnSize().

void CSimulatorObjectViewerDlgBar::updateUI ( CCmdUI *  pCmdUI  )  [virtual]

Enables the controls in the toolbar. This function is called from the main window for all controls.

Parameters:
pCmdUI An interface to the control that allows enabling/disabling, checking etc.

Reimplemented from CRobotControlDialogBar.

Definition at line 351 of file SimulatorObjectViewerDlgBar.cpp.

References IDC_SIMROBOT_DETAIL_LEVEL, IDC_SIMROBOT_DETAIL_LEVEL0, IDC_SIMROBOT_DETAIL_LEVEL1, IDC_SIMROBOT_DETAIL_LEVEL2, IDC_SIMROBOT_DETAIL_LEVEL3, IDC_SIMROBOT_DETAIL_LEVEL4, IDC_SIMROBOT_DETAIL_LEVEL5, IDC_SIMROBOT_DETAIL_LEVEL6, IDC_SIMROBOT_DETAIL_LEVEL7, IDC_SIMROBOT_DETAIL_LEVEL8, IDC_SIMROBOT_DETAIL_LEVEL9, IDC_SIMROBOT_DIST0RTION1, IDC_SIMROBOT_DIST0RTION2, IDC_SIMROBOT_DIST0RTION4, IDC_SIMROBOT_DIST0RTION5, IDC_SIMROBOT_DISTORTION0, IDC_SIMROBOT_DISTORTION3, IDC_SIMROBOT_VIEW_HIDDEN_LINES, IDC_SIMROBOT_ZOOM, IDC_SIMROBOT_ZOOM0, IDC_SIMROBOT_ZOOM1, IDC_SIMROBOT_ZOOM2, IDC_SIMROBOT_ZOOM3, IDC_SIMROBOT_ZOOM4, IDC_SIMROBOT_ZOOM5, IDC_SIMROBOT_ZOOM6, IDC_SIMROBOT_ZOOM7, IDC_SIMROBOT_ZOOM8, IDC_SIMROBOT_ZOOM9, m_bHidden, m_nDetailLevel, m_nDistortion, and m_nZoom.


Member Data Documentation

bool CSimulatorObjectViewerDlgBar::m_bHidden [protected]

Definition at line 80 of file SimulatorObjectViewerDlgBar.h.

Referenced by DoDraw(), handleCommand(), OnConfigurationLoad(), OnConfigurationSave(), OnInitDialog(), and updateUI().

bool CSimulatorObjectViewerDlgBar::m_bRepaint [protected]

Definition at line 80 of file SimulatorObjectViewerDlgBar.h.

Referenced by OnDraw(), and Repaint().

BOOL CSimulatorObjectViewerDlgBar::m_bTurn [protected]

Definition at line 86 of file SimulatorObjectViewerDlgBar.h.

Referenced by OnInitDialog(), and OnScroll().

CScrollBar CSimulatorObjectViewerDlgBar::m_hScrollBar

Definition at line 29 of file SimulatorObjectViewerDlgBar.h.

Referenced by CalcClickInfo(), DoDataExchange(), DoDraw(), OnConfigurationLoad(), OnConfigurationSave(), and OnInitDialog().

CMenu CSimulatorObjectViewerDlgBar::m_menuPopup [protected]

Definition at line 88 of file SimulatorObjectViewerDlgBar.h.

Referenced by OnInitDialog(), and OnRButtonUp().

UINT CSimulatorObjectViewerDlgBar::m_nDetailLevel [protected]

Definition at line 77 of file SimulatorObjectViewerDlgBar.h.

Referenced by DoDraw(), handleCommand(), OnConfigurationLoad(), OnConfigurationSave(), OnInitDialog(), and updateUI().

UINT CSimulatorObjectViewerDlgBar::m_nDistortion [protected]

Definition at line 77 of file SimulatorObjectViewerDlgBar.h.

Referenced by CalcClickInfo(), DoDraw(), handleCommand(), OnConfigurationLoad(), OnConfigurationSave(), OnInitDialog(), and updateUI().

UINT CSimulatorObjectViewerDlgBar::m_nZoom [protected]

Definition at line 77 of file SimulatorObjectViewerDlgBar.h.

Referenced by CalcClickInfo(), DoDraw(), handleCommand(), OnConfigurationLoad(), OnConfigurationSave(), OnInitDialog(), and updateUI().

SIM3DOBJECT CSimulatorObjectViewerDlgBar::m_obj [protected]

Definition at line 82 of file SimulatorObjectViewerDlgBar.h.

Referenced by DoDraw(), and OnDraw().

CBitmap* CSimulatorObjectViewerDlgBar::m_pBitmap [protected]

Definition at line 83 of file SimulatorObjectViewerDlgBar.h.

Referenced by OnDraw(), OnInitDialog(), and ~CSimulatorObjectViewerDlgBar().

CRect CSimulatorObjectViewerDlgBar::m_rect [protected]

Definition at line 84 of file SimulatorObjectViewerDlgBar.h.

Referenced by OnDraw(), and OnInitDialog().

CScrollBar CSimulatorObjectViewerDlgBar::m_vScrollBar

Definition at line 30 of file SimulatorObjectViewerDlgBar.h.

Referenced by CalcClickInfo(), DoDataExchange(), DoDraw(), OnConfigurationLoad(), OnConfigurationSave(), and OnInitDialog().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:25:13 2006 for DT2005.panorama by  doxygen 1.4.7