diff options
author | assarbad <none@none> | 2006-07-05 00:45:26 +0400 |
---|---|---|
committer | assarbad <none@none> | 2006-07-05 00:45:26 +0400 |
commit | a70e19fef8dff4cff889e0d192bb3cb123440c6e (patch) | |
tree | 76abac7c64f789c0f7bd7899a2a8c10896e9f955 /windirstat/PageTreemap.cpp | |
parent | c822c686ccaa40371ce49d1e7860a3f5ef9b1a4a (diff) |
- See changelog for the changes of todays previous check-ins as well as this one!
Diffstat (limited to 'windirstat/PageTreemap.cpp')
-rw-r--r-- | windirstat/PageTreemap.cpp | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/windirstat/PageTreemap.cpp b/windirstat/PageTreemap.cpp index 9c682d7..853ea94 100644 --- a/windirstat/PageTreemap.cpp +++ b/windirstat/PageTreemap.cpp @@ -1,7 +1,8 @@ -// PageTreemap.cpp - Implementation of CDemoControl and CPageTreemap +// PageTreemap.cpp - Implementation of CDemoControl and CPageTreemap // // WinDirStat - Directory Statistics -// Copyright (C) 2003-2004 Bernhard Seifert +// Copyright (C) 2003-2005 Bernhard Seifert +// Copyright (C) 2004-2006 Oliver Schneider (assarbad.net) // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -23,7 +24,7 @@ #include "stdafx.h" #include "windirstat.h" -#include ".\pagetreemap.h" +#include "PageTreemap.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -59,7 +60,7 @@ void CPageTreemap::DoDataExchange(CDataExchange* pDX) DDX_Control(pDX, IDC_LIGHTSOURCE, m_lightSource); DDX_Control(pDX, IDC_RESET, m_resetButton); - if (!pDX->m_bSaveAndValidate) + if(!pDX->m_bSaveAndValidate) { UpdateOptions(false); UpdateStatics(); @@ -83,7 +84,7 @@ void CPageTreemap::DoDataExchange(CDataExchange* pDX) DDX_XySlider(pDX, IDC_LIGHTSOURCE, m_ptLightSource); - if (pDX->m_bSaveAndValidate) + if(pDX->m_bSaveAndValidate) { UpdateOptions(); } @@ -115,7 +116,7 @@ BOOL CPageTreemap::OnInitDialog() m_scaleFactor.SetPageSize(10); m_lightSource.SetRange(CSize(400, 400)); - m_options= *GetOptions()->GetTreemapOptions(); + m_options = *GetOptions()->GetTreemapOptions(); m_highlightColor.SetColor(GetOptions()->GetTreemapHighlightColor()); UpdateData(false); @@ -135,7 +136,7 @@ void CPageTreemap::OnOK() void CPageTreemap::UpdateOptions(bool save) { - if (save) + if(save) { m_options.SetBrightnessPercent(100 - m_nBrightness); m_options.SetAmbientLightPercent(m_nCushionShading); @@ -144,27 +145,27 @@ void CPageTreemap::UpdateOptions(bool save) m_options.SetLightSourcePoint(m_ptLightSource); m_options.style = (m_style == 0 ? CTreemap::KDirStatStyle : CTreemap::SequoiaViewStyle); m_options.grid = m_grid; - m_options.gridColor= m_gridColor.GetColor(); + m_options.gridColor = m_gridColor.GetColor(); } else { - m_nBrightness= 100 - m_options.GetBrightnessPercent(); - m_nCushionShading= m_options.GetAmbientLightPercent(); - m_nHeight= _maxHeight - m_options.GetHeightPercent(); - m_nScaleFactor= 100 - m_options.GetScaleFactorPercent(); - m_ptLightSource= m_options.GetLightSourcePoint(); - m_style= (m_options.style == CTreemap::KDirStatStyle ? 0 : 1); - m_grid= m_options.grid; + m_nBrightness = 100 - m_options.GetBrightnessPercent(); + m_nCushionShading = m_options.GetAmbientLightPercent(); + m_nHeight = _maxHeight - m_options.GetHeightPercent(); + m_nScaleFactor = 100 - m_options.GetScaleFactorPercent(); + m_ptLightSource = m_options.GetLightSourcePoint(); + m_style = (m_options.style == CTreemap::KDirStatStyle ? 0 : 1); + m_grid = m_options.grid; m_gridColor.SetColor(m_options.gridColor); } } void CPageTreemap::UpdateStatics() { - m_sBrightness .Format(_T("%d"), 100 - m_nBrightness); - m_sCushionShading .Format(_T("%d"), 100 - m_nCushionShading); - m_sHeight .Format(_T("%d"), (_maxHeight - m_nHeight) / (_maxHeight / 100)); - m_sScaleFactor .Format(_T("%d"), 100 - m_nScaleFactor); + m_sBrightness .Format(TEXT("%d"), 100 - m_nBrightness); + m_sCushionShading .Format(TEXT("%d"), 100 - m_nCushionShading); + m_sHeight .Format(TEXT("%d"), (_maxHeight - m_nHeight) / (_maxHeight / 100)); + m_sScaleFactor .Format(TEXT("%d"), 100 - m_nScaleFactor); } void CPageTreemap::OnSomethingChanged() @@ -176,20 +177,20 @@ void CPageTreemap::OnSomethingChanged() void CPageTreemap::ValuesAltered(bool altered) { - m_altered= altered; - CString s= LoadString(m_altered ? IDS_RESETTO_DEFAULTS : IDS_BACKTO_USERSETTINGS); + m_altered = altered; + CString s = LoadString(m_altered ? IDS_RESETTO_DEFAULTS : IDS_BACKTO_USERSETTINGS); m_resetButton.SetWindowText(s); } void CPageTreemap::OnColorChangedTreemapGrid(NMHDR *, LRESULT *result) { - *result= 0; + *result = 0; OnSomethingChanged(); } void CPageTreemap::OnColorChangedTreemapHighlight(NMHDR *, LRESULT *result) { - *result= 0; + *result = 0; OnSomethingChanged(); } @@ -223,22 +224,22 @@ void CPageTreemap::OnBnClickedTreemapgrid() void CPageTreemap::OnBnClickedReset() { CTreemap::Options o; - if (m_altered) + if(m_altered) { - o= CTreemap::GetDefaultOptions(); - m_undo= m_options; + o = CTreemap::GetDefaultOptions(); + m_undo = m_options; } else { - o= m_undo; + o = m_undo; } - m_options.brightness= o.brightness; - m_options.ambientLight= o.ambientLight; - m_options.height= o.height; - m_options.scaleFactor= o.scaleFactor; - m_options.lightSourceX= o.lightSourceX; - m_options.lightSourceY= o.lightSourceY; + m_options.brightness = o.brightness; + m_options.ambientLight = o.ambientLight; + m_options.height = o.height; + m_options.scaleFactor = o.scaleFactor; + m_options.lightSourceX = o.lightSourceX; + m_options.lightSourceY = o.lightSourceY; ValuesAltered(!m_altered); UpdateData(false); @@ -246,6 +247,9 @@ void CPageTreemap::OnBnClickedReset() } // $Log$ +// Revision 1.9 2006/07/04 20:45:22 assarbad +// - See changelog for the changes of todays previous check-ins as well as this one! +// // Revision 1.8 2004/11/13 08:17:07 bseifert // Remove blanks in Unicode Configuration names. // |