#include <HistogramDlgBar.h>
Inheritance diagram for CHistogramDlgBar:
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] |
Definition at line 23 of file HistogramDlgBar.h.
anonymous enum |
anonymous enum [private] |
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().
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] |
bool CHistogramDlgBar::handleMessage | ( | InMessage & | message | ) | [virtual] |
Called from a MessageQueue to distribute messages
message | The message that can be read. |
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] |
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.
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] |
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] |
Histogram CHistogramDlgBar::histograms[Histogram::numberOfHistogramIDs] [private] |
Definition at line 126 of file HistogramDlgBar.h.
Referenced by handleMessage(), and paintHistograms().
CSliderCtrl CHistogramDlgBar::m_numberSlider |
Definition at line 44 of file HistogramDlgBar.h.
Referenced by DoDataExchange(), OnHScroll(), 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] |
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().