CHistogramDlgBar Class Reference

#include <HistogramDlgBar.h>

Inheritance diagram for CHistogramDlgBar:

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

Public Types

 IDD = IDD_DIALOG_BAR_HISTOGRAM
enum  { IDD = IDD_DIALOG_BAR_HISTOGRAM }

Public Member Functions

 CHistogramDlgBar ()
 ~CHistogramDlgBar ()
virtual bool handleMessage (InMessage &message)

Public Attributes

CSliderCtrl m_scaleSlider
CEdit m_scaleEdit
CSliderCtrl m_numberSlider
CEdit m_numberEdit

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
virtual BOOL OnInitDialog ()
afx_msg void OnPaint ()
afx_msg void OnSize (UINT nType, int cx, int cy)
afx_msg void OnContextMenu (CWnd *pWnd, CPoint point)
afx_msg void OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
 DECLARE_MESSAGE_MAP ()

Private Types

 maxNumberOfHistograms = 100
enum  { maxNumberOfHistograms = 100 }

Private Member Functions

void deleteBrushes ()
void createBrushes ()
void saveCurrentSelection ()
void loadSelection ()
void unselectAll ()
void exportToFileAsCSV ()
void paintHistogram (Histogram &histogram, CRect &rectForPainting, double scale, bool showAverage, bool showAverageOfFrequencies, bool showClusters)
void paintHistograms ()
void setSliders ()
double scaleSliderPositionToScale (int scaleSliderPosition)
int scaleToScaleSliderPosition (double scale)
void calculateRects ()

Private Attributes

CRect rect
CRect currentRect
CDC dcOffScreen
CBitmap * bmpOffScreen
CBitmap * oldBitmap
CBrush brush [Histogram::numberOfHistogramIDs]
COLORREF crColor [Histogram::numberOfHistogramIDs]
CBrush * oldBrush
int numberOfHistograms
CRect histogramRect [maxNumberOfHistograms]
Histogram::HistogramID histogramID [maxNumberOfHistograms]
double scale [maxNumberOfHistograms]
bool showAverage [maxNumberOfHistograms]
bool showAverageOfFrequencies [maxNumberOfHistograms]
bool showClusters [maxNumberOfHistograms]
int scaleSliderPosition
int numberOfRows
int numberOfColumns
int mouseOverRow
int mouseOverColumn
int currentSelection
Histogram histograms [Histogram::numberOfHistogramIDs]

Detailed Description

A dialog bar to view time diagrams

Definition at line 23 of file HistogramDlgBar.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
IDD 

Definition at line 41 of file HistogramDlgBar.h.

anonymous enum [private]

Enumerator:
maxNumberOfHistograms 

Definition at line 106 of file HistogramDlgBar.h.


Constructor & Destructor Documentation

CHistogramDlgBar::CHistogramDlgBar (  ) 

Default constructor.

Definition at line 17 of file HistogramDlgBar.cpp.

References bmpOffScreen, currentSelection, histogramID, Histogram::imageIntensityU, Histogram::imageIntensityV, Histogram::imageIntensityY, maxNumberOfHistograms, mouseOverColumn, mouseOverRow, numberOfColumns, numberOfHistograms, numberOfRows, oldBitmap, and scale.

CHistogramDlgBar::~CHistogramDlgBar (  ) 

Definition at line 41 of file HistogramDlgBar.cpp.

References bmpOffScreen, dcOffScreen, deleteBrushes(), oldBitmap, and saveCurrentSelection().


Member Function Documentation

void CHistogramDlgBar::calculateRects (  )  [private]

Definition at line 542 of file HistogramDlgBar.cpp.

References int(), numberOfColumns, numberOfHistograms, numberOfRows, and rect.

Referenced by OnHScroll(), and OnSize().

void CHistogramDlgBar::createBrushes (  )  [private]

Definition at line 269 of file HistogramDlgBar.cpp.

References brush, crColor, Histogram::imageIntensityU, Histogram::imageIntensityV, Histogram::imageIntensityY, and Histogram::numberOfHistogramIDs.

CHistogramDlgBar::DECLARE_MESSAGE_MAP (  )  [protected]

Reimplemented from CDynamicBarDlg.

void CHistogramDlgBar::deleteBrushes (  )  [private]

Definition at line 283 of file HistogramDlgBar.cpp.

References brush, and Histogram::numberOfHistogramIDs.

Referenced by ~CHistogramDlgBar().

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

Definition at line 54 of file HistogramDlgBar.cpp.

References IDC_HISTOGRAM_NUMBER_EDIT, IDC_HISTOGRAM_NUMBER_SLIDER, IDC_HISTOGRAM_SCALE_EDIT, IDC_HISTOGRAM_SCALE_SLIDER, m_numberEdit, m_numberSlider, m_scaleEdit, and m_scaleSlider.

void CHistogramDlgBar::exportToFileAsCSV (  )  [private]

Definition at line 375 of file HistogramDlgBar.cpp.

Referenced by OnContextMenu().

bool CHistogramDlgBar::handleMessage ( InMessage message  )  [virtual]

Called from a MessageQueue to distribute messages

Parameters:
message The message that can be read.
Returns:
true if the message was read (handled).

Reimplemented from CRobotControlDialogBar.

Definition at line 180 of file HistogramDlgBar.cpp.

References InMessage::bin, InMessage::getMessageID(), histograms, and idHistogram.

void CHistogramDlgBar::loadSelection (  )  [private]

Definition at line 309 of file HistogramDlgBar.cpp.

References histogramID, maxNumberOfHistograms, numberOfHistograms, scale, scaleSliderPositionToScale(), showAverage, showAverageOfFrequencies, and showClusters.

void CHistogramDlgBar::OnContextMenu ( CWnd *  pWnd,
CPoint  point 
) [protected]

Definition at line 195 of file HistogramDlgBar.cpp.

References DebugKey::always, currentSelection, DebugKey::disabled, exportToFileAsCSV(), CRobotControlDebugKeyTables::forPhysicalRobots, CRobotControlDebugKeyTables::forSimulatedRobots, Histogram::getDebugKeyID(), getDebugKeyTables(), Histogram::getName(), histogramID, maxNumberOfHistograms, mouseOverColumn, mouseOverRow, numberOfColumns, Histogram::numberOfHistogramIDs, numberOfHistograms, scale, scaleSliderPosition, scaleToScaleSliderPosition(), CRobotControlDebugKeyTables::sendForPhysicalRobots(), CRobotControlDebugKeyTables::sendForSimulatedRobots(), DebugKeyTable::set(), setSliders(), showAverage, showAverageOfFrequencies, showClusters, and VERIFY.

void CHistogramDlgBar::OnHScroll ( UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar 
) [protected]

Definition at line 513 of file HistogramDlgBar.cpp.

References calculateRects(), currentSelection, m_numberSlider, m_scaleSlider, numberOfHistograms, scaleSliderPosition, scaleSliderPositionToScale(), scaleToScaleSliderPosition(), and setSliders().

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

Reimplemented from CDynamicDialog.

Definition at line 78 of file HistogramDlgBar.cpp.

References CDynamicDialog::OnInitDialog(), and TRUE.

void CHistogramDlgBar::OnLButtonDown ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 662 of file HistogramDlgBar.cpp.

References currentSelection, mouseOverColumn, mouseOverRow, numberOfColumns, numberOfHistograms, scaleSliderPosition, scaleToScaleSliderPosition(), and setSliders().

void CHistogramDlgBar::OnMouseMove ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 649 of file HistogramDlgBar.cpp.

References currentRect, mouseOverColumn, mouseOverRow, numberOfColumns, and numberOfRows.

void CHistogramDlgBar::OnPaint (  )  [protected]

Definition at line 96 of file HistogramDlgBar.cpp.

References currentRect, dcOffScreen, FALSE, paintHistograms(), and rect.

void CHistogramDlgBar::OnSize ( UINT  nType,
int  cx,
int  cy 
) [protected]

Reimplemented from CDynamicDialog.

Definition at line 150 of file HistogramDlgBar.cpp.

References bmpOffScreen, calculateRects(), dcOffScreen, oldBitmap, CDynamicDialog::OnSize(), and rect.

void CHistogramDlgBar::paintHistogram ( Histogram histogram,
CRect &  rectForPainting,
double  scale,
bool  showAverage,
bool  showAverageOfFrequencies,
bool  showClusters 
) [private]

Definition at line 425 of file HistogramDlgBar.cpp.

References Histogram::analyseClusters(), Histogram::getAverage(), Histogram::getAverageFrequencyOverAllEntries(), Histogram::getAverageFrequencyOverUsedEntries(), Histogram::getBeginOfCluster(), Histogram::getEndOfCluster(), Histogram::getNumberOfClusters(), Histogram::getNumberOfEntries(), Histogram::getValue(), and int().

Referenced by paintHistograms().

void CHistogramDlgBar::paintHistograms (  )  [private]

Definition at line 575 of file HistogramDlgBar.cpp.

References currentRect, currentSelection, dcOffScreen, histogramID, histogramRect, histograms, mouseOverColumn, mouseOverRow, numberOfColumns, numberOfHistograms, numberOfRows, oldBrush, and paintHistogram().

Referenced by OnPaint().

void CHistogramDlgBar::saveCurrentSelection (  )  [private]

Definition at line 343 of file HistogramDlgBar.cpp.

References histogramID, maxNumberOfHistograms, numberOfHistograms, scale, scaleToScaleSliderPosition(), showAverage, showAverageOfFrequencies, and showClusters.

Referenced by ~CHistogramDlgBar().

double CHistogramDlgBar::scaleSliderPositionToScale ( int  scaleSliderPosition  )  [private]

Definition at line 674 of file HistogramDlgBar.cpp.

Referenced by loadSelection(), and OnHScroll().

int CHistogramDlgBar::scaleToScaleSliderPosition ( double  scale  )  [private]

Definition at line 680 of file HistogramDlgBar.cpp.

Referenced by OnContextMenu(), OnHScroll(), OnLButtonDown(), and saveCurrentSelection().

void CHistogramDlgBar::setSliders (  )  [private]

Definition at line 532 of file HistogramDlgBar.cpp.

References currentSelection, m_numberEdit, m_numberSlider, m_scaleEdit, m_scaleSlider, numberOfHistograms, and scaleSliderPosition.

Referenced by OnContextMenu(), OnHScroll(), and OnLButtonDown().

void CHistogramDlgBar::unselectAll (  )  [private]

Definition at line 291 of file HistogramDlgBar.cpp.


Member Data Documentation

CBitmap* CHistogramDlgBar::bmpOffScreen [private]

Definition at line 97 of file HistogramDlgBar.h.

Referenced by CHistogramDlgBar(), OnSize(), and ~CHistogramDlgBar().

CBrush CHistogramDlgBar::brush[Histogram::numberOfHistogramIDs] [private]

Definition at line 100 of file HistogramDlgBar.h.

Referenced by createBrushes(), and deleteBrushes().

COLORREF CHistogramDlgBar::crColor[Histogram::numberOfHistogramIDs] [private]

Definition at line 101 of file HistogramDlgBar.h.

Referenced by createBrushes().

CRect CHistogramDlgBar::currentRect [private]

Definition at line 94 of file HistogramDlgBar.h.

Referenced by OnMouseMove(), OnPaint(), and paintHistograms().

int CHistogramDlgBar::currentSelection [private]

Definition at line 123 of file HistogramDlgBar.h.

Referenced by CHistogramDlgBar(), OnContextMenu(), OnHScroll(), OnLButtonDown(), paintHistograms(), and setSliders().

CDC CHistogramDlgBar::dcOffScreen [private]

Definition at line 96 of file HistogramDlgBar.h.

Referenced by OnPaint(), OnSize(), paintHistograms(), and ~CHistogramDlgBar().

Histogram::HistogramID CHistogramDlgBar::histogramID[maxNumberOfHistograms] [private]

Definition at line 108 of file HistogramDlgBar.h.

Referenced by CHistogramDlgBar(), loadSelection(), OnContextMenu(), paintHistograms(), and saveCurrentSelection().

CRect CHistogramDlgBar::histogramRect[maxNumberOfHistograms] [private]

Definition at line 107 of file HistogramDlgBar.h.

Referenced by paintHistograms().

Histogram CHistogramDlgBar::histograms[Histogram::numberOfHistogramIDs] [private]

Definition at line 126 of file HistogramDlgBar.h.

Referenced by handleMessage(), and paintHistograms().

CEdit CHistogramDlgBar::m_numberEdit

Definition at line 45 of file HistogramDlgBar.h.

Referenced by DoDataExchange(), and setSliders().

CSliderCtrl CHistogramDlgBar::m_numberSlider

Definition at line 44 of file HistogramDlgBar.h.

Referenced by DoDataExchange(), OnHScroll(), and setSliders().

CEdit CHistogramDlgBar::m_scaleEdit

Definition at line 43 of file HistogramDlgBar.h.

Referenced by DoDataExchange(), and setSliders().

CSliderCtrl CHistogramDlgBar::m_scaleSlider

Definition at line 42 of file HistogramDlgBar.h.

Referenced by DoDataExchange(), OnHScroll(), and setSliders().

int CHistogramDlgBar::mouseOverColumn [private]

Definition at line 121 of file HistogramDlgBar.h.

Referenced by CHistogramDlgBar(), OnContextMenu(), OnLButtonDown(), OnMouseMove(), and paintHistograms().

int CHistogramDlgBar::mouseOverRow [private]

Definition at line 120 of file HistogramDlgBar.h.

Referenced by CHistogramDlgBar(), OnContextMenu(), OnLButtonDown(), OnMouseMove(), and paintHistograms().

int CHistogramDlgBar::numberOfColumns [private]

Definition at line 118 of file HistogramDlgBar.h.

Referenced by calculateRects(), CHistogramDlgBar(), OnContextMenu(), OnLButtonDown(), OnMouseMove(), and paintHistograms().

int CHistogramDlgBar::numberOfHistograms [private]

Definition at line 104 of file HistogramDlgBar.h.

Referenced by calculateRects(), CHistogramDlgBar(), loadSelection(), OnContextMenu(), OnHScroll(), OnLButtonDown(), paintHistograms(), saveCurrentSelection(), and setSliders().

int CHistogramDlgBar::numberOfRows [private]

Definition at line 118 of file HistogramDlgBar.h.

Referenced by calculateRects(), CHistogramDlgBar(), OnMouseMove(), and paintHistograms().

CBitmap* CHistogramDlgBar::oldBitmap [private]

Definition at line 98 of file HistogramDlgBar.h.

Referenced by CHistogramDlgBar(), OnSize(), and ~CHistogramDlgBar().

CBrush* CHistogramDlgBar::oldBrush [private]

Definition at line 102 of file HistogramDlgBar.h.

Referenced by paintHistograms().

CRect CHistogramDlgBar::rect [private]

Definition at line 93 of file HistogramDlgBar.h.

Referenced by calculateRects(), OnPaint(), and OnSize().

double CHistogramDlgBar::scale[maxNumberOfHistograms] [private]

Definition at line 109 of file HistogramDlgBar.h.

Referenced by CHistogramDlgBar(), loadSelection(), OnContextMenu(), and saveCurrentSelection().

int CHistogramDlgBar::scaleSliderPosition [private]

Definition at line 114 of file HistogramDlgBar.h.

Referenced by OnContextMenu(), OnHScroll(), OnLButtonDown(), and setSliders().

bool CHistogramDlgBar::showAverage[maxNumberOfHistograms] [private]

Definition at line 110 of file HistogramDlgBar.h.

Referenced by loadSelection(), OnContextMenu(), and saveCurrentSelection().

bool CHistogramDlgBar::showAverageOfFrequencies[maxNumberOfHistograms] [private]

Definition at line 111 of file HistogramDlgBar.h.

Referenced by loadSelection(), OnContextMenu(), and saveCurrentSelection().

bool CHistogramDlgBar::showClusters[maxNumberOfHistograms] [private]

Definition at line 112 of file HistogramDlgBar.h.

Referenced by loadSelection(), OnContextMenu(), and saveCurrentSelection().


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