#include <winviewoptsdlg.h>
Collaboration diagram for ViewOptionsDialog:

Public Member Functions | |
| virtual void | notifyChange (CelestiaCore *, int) |
| void | RestoreSettings (HWND) |
| void | SetControls (HWND) |
| ViewOptionsDialog (HINSTANCE, HWND, CelestiaCore *) | |
Public Attributes | |
| CelestiaCore * | appCore |
| HWND | hwnd |
| int | initialHudDetail |
| int | initialLabelMode |
| int | initialRenderFlags |
| HWND | parent |
|
||||||||||||||||
|
Definition at line 231 of file winviewoptsdlg.cpp. References appInstance, CelestiaWatcher, hwnd, IDD_VIEWOPTIONS, parent, and ViewOptionsProc(). 00233 : 00234 CelestiaWatcher(*_appCore), 00235 appCore(_appCore), 00236 parent(_parent) 00237 { 00238 hwnd = CreateDialogParam(appInstance, 00239 MAKEINTRESOURCE(IDD_VIEWOPTIONS), 00240 parent, 00241 ViewOptionsProc, 00242 reinterpret_cast<LONG>(this)); 00243 }
|
|
||||||||||||
|
Definition at line 337 of file winviewoptsdlg.cpp. References hwnd, parent, and SetControls(). 00338 {
00339 if (parent != NULL)
00340 SetControls(hwnd);
00341 }
|
|
|
Definition at line 330 of file winviewoptsdlg.cpp. References appCore, CelestiaCore::getRenderer(), initialHudDetail, initialLabelMode, initialRenderFlags, CelestiaCore::setHudDetail(), Renderer::setLabelMode(), and Renderer::setRenderFlags(). Referenced by ViewOptionsProc(). 00331 {
00332 appCore->getRenderer()->setRenderFlags(initialRenderFlags);
00333 appCore->getRenderer()->setLabelMode(initialLabelMode);
00334 appCore->setHudDetail(initialHudDetail);
00335 }
|
|
|
Definition at line 252 of file winviewoptsdlg.cpp. References appCore, DistanceSliderRange, dlgCheck(), Renderer::getDistanceLimit(), CelestiaCore::getHudDetail(), Renderer::getLabelMode(), Renderer::getOrbitMask(), CelestiaCore::getRenderer(), Renderer::getRenderFlags(), hwnd, IDC_ASTEROIDORBITS, IDC_COMETORBITS, IDC_EDIT_FILTER_DISTANCE, IDC_INFOTEXT0, IDC_INFOTEXT2, IDC_LABELASTEROIDS, IDC_LABELCOMETS, IDC_LABELCONSTELLATIONS, IDC_LABELGALAXIES, IDC_LABELMOONS, IDC_LABELNEBULAE, IDC_LABELOPENCLUSTERS, IDC_LABELPLANETS, IDC_LABELSPACECRAFT, IDC_LABELSTARS, IDC_MOONORBITS, IDC_PLANETORBITS, IDC_SHOWATMOSPHERES, IDC_SHOWCELESTIALGRID, IDC_SHOWCLOUDS, IDC_SHOWCOMETTAILS, IDC_SHOWCONSTELLATIONBORDERS, IDC_SHOWCONSTELLATIONS, IDC_SHOWECLIPSESHADOWS, IDC_SHOWGALAXIES, IDC_SHOWMARKERS, IDC_SHOWNEBULAE, IDC_SHOWNIGHTSIDELIGHTS, IDC_SHOWORBITS, IDC_SHOWPLANETS, IDC_SHOWRINGSHADOWS, IDC_SHOWSTARS, IDC_SLIDER_FILTER_DISTANCE, IDC_SPACECRAFTORBITS, log(), and MaxDistanceLimit. Referenced by notifyChange(), and ViewOptionsProc(). 00253 {
00254 int renderFlags = appCore->getRenderer()->getRenderFlags();
00255 int labelMode = appCore->getRenderer()->getLabelMode();
00256 int hudDetail = appCore->getHudDetail();
00257 int orbitMask = appCore->getRenderer()->getOrbitMask();
00258
00259 //Set checkboxes and radiobuttons
00260 SendDlgItemMessage(hDlg, IDC_SHOWATMOSPHERES, BM_SETCHECK,
00261 (renderFlags & Renderer::ShowAtmospheres)? BST_CHECKED:BST_UNCHECKED, 0);
00262 SendDlgItemMessage(hDlg, IDC_SHOWCELESTIALGRID, BM_SETCHECK,
00263 (renderFlags & Renderer::ShowCelestialSphere)? BST_CHECKED:BST_UNCHECKED, 0);
00264 SendDlgItemMessage(hDlg, IDC_SHOWCLOUDS, BM_SETCHECK,
00265 (renderFlags & Renderer::ShowCloudMaps)? BST_CHECKED:BST_UNCHECKED, 0);
00266 SendDlgItemMessage(hDlg, IDC_SHOWCONSTELLATIONS, BM_SETCHECK,
00267 (renderFlags & Renderer::ShowDiagrams)? BST_CHECKED:BST_UNCHECKED, 0);
00268 SendDlgItemMessage(hDlg, IDC_SHOWECLIPSESHADOWS, BM_SETCHECK,
00269 (renderFlags & Renderer::ShowEclipseShadows)? BST_CHECKED:BST_UNCHECKED, 0);
00270 SendDlgItemMessage(hDlg, IDC_SHOWGALAXIES, BM_SETCHECK,
00271 (renderFlags & Renderer::ShowGalaxies)? BST_CHECKED:BST_UNCHECKED, 0);
00272 SendDlgItemMessage(hDlg, IDC_SHOWNEBULAE, BM_SETCHECK,
00273 (renderFlags & Renderer::ShowNebulae)? BST_CHECKED:BST_UNCHECKED, 0);
00274 SendDlgItemMessage(hDlg, IDC_SHOWNIGHTSIDELIGHTS, BM_SETCHECK,
00275 (renderFlags & Renderer::ShowNightMaps)? BST_CHECKED:BST_UNCHECKED, 0);
00276 dlgCheck(hDlg, IDC_SHOWORBITS, renderFlags, Renderer::ShowOrbits);
00277 dlgCheck(hDlg, IDC_PLANETORBITS, orbitMask, Body::Planet);
00278 dlgCheck(hDlg, IDC_MOONORBITS, orbitMask, Body::Moon);
00279 dlgCheck(hDlg, IDC_ASTEROIDORBITS, orbitMask, Body::Asteroid);
00280 dlgCheck(hDlg, IDC_COMETORBITS, orbitMask, Body::Comet);
00281 dlgCheck(hDlg, IDC_SPACECRAFTORBITS, orbitMask, Body::Spacecraft);
00282 SendDlgItemMessage(hDlg, IDC_SHOWPLANETS, BM_SETCHECK,
00283 (renderFlags & Renderer::ShowPlanets)? BST_CHECKED:BST_UNCHECKED, 0);
00284 SendDlgItemMessage(hDlg, IDC_SHOWSTARS, BM_SETCHECK,
00285 (renderFlags & Renderer::ShowStars)? BST_CHECKED:BST_UNCHECKED, 0);
00286 SendDlgItemMessage(hDlg, IDC_SHOWCONSTELLATIONBORDERS, BM_SETCHECK,
00287 (renderFlags & Renderer::ShowBoundaries)? BST_CHECKED:BST_UNCHECKED, 0);
00288 SendDlgItemMessage(hDlg, IDC_SHOWRINGSHADOWS, BM_SETCHECK,
00289 (renderFlags & Renderer::ShowRingShadows)? BST_CHECKED:BST_UNCHECKED, 0);
00290 SendDlgItemMessage(hDlg, IDC_SHOWCOMETTAILS, BM_SETCHECK,
00291 (renderFlags & Renderer::ShowCometTails)? BST_CHECKED:BST_UNCHECKED, 0);
00292 SendDlgItemMessage(hDlg, IDC_SHOWMARKERS, BM_SETCHECK,
00293 (renderFlags & Renderer::ShowMarkers)? BST_CHECKED:BST_UNCHECKED, 0);
00294
00295 dlgCheck(hDlg, IDC_LABELCONSTELLATIONS, labelMode, Renderer::ConstellationLabels);
00296 dlgCheck(hDlg, IDC_LABELGALAXIES, labelMode, Renderer::GalaxyLabels);
00297 dlgCheck(hDlg, IDC_LABELNEBULAE, labelMode, Renderer::NebulaLabels);
00298 dlgCheck(hDlg, IDC_LABELOPENCLUSTERS, labelMode, Renderer::OpenClusterLabels);
00299 dlgCheck(hDlg, IDC_LABELSTARS, labelMode, Renderer::StarLabels);
00300 dlgCheck(hDlg, IDC_LABELPLANETS, labelMode, Renderer::PlanetLabels);
00301 dlgCheck(hDlg, IDC_LABELMOONS, labelMode, Renderer::MoonLabels);
00302 dlgCheck(hDlg, IDC_LABELASTEROIDS, labelMode, Renderer::AsteroidLabels);
00303 dlgCheck(hDlg, IDC_LABELCOMETS, labelMode, Renderer::CometLabels);
00304 dlgCheck(hDlg, IDC_LABELSPACECRAFT, labelMode, Renderer::SpacecraftLabels);
00305
00306 CheckRadioButton(hDlg, IDC_INFOTEXT0, IDC_INFOTEXT2, IDC_INFOTEXT0 + hudDetail);
00307
00308 // Set up distance slider
00309 SendDlgItemMessage(hDlg,
00310 IDC_SLIDER_FILTER_DISTANCE,
00311 TBM_SETRANGE,
00312 (WPARAM)TRUE,
00313 (LPARAM) MAKELONG(0, DistanceSliderRange));
00314 float distanceLimit = appCore->getRenderer()->getDistanceLimit();
00315 float logDistanceLimit = (float) (log(distanceLimit) /
00316 log(MaxDistanceLimit));
00317 SendDlgItemMessage(hDlg,
00318 IDC_SLIDER_FILTER_DISTANCE,
00319 TBM_SETPOS,
00320 (WPARAM) TRUE,
00321 (LPARAM) (logDistanceLimit * DistanceSliderRange));
00322
00323 char val[16];
00324 HWND hwnd = GetDlgItem(hDlg, IDC_EDIT_FILTER_DISTANCE);
00325 sprintf(val, "%d", (int) distanceLimit);
00326 SetWindowText(hwnd, val);
00327 }
|
|
|
Definition at line 28 of file winviewoptsdlg.h. Referenced by RestoreSettings(), SetControls(), and ViewOptionsProc(). |
|
|
Definition at line 30 of file winviewoptsdlg.h. Referenced by notifyChange(), SetControls(), ViewOptionsDialog(), and WinMain(). |
|
|
Definition at line 33 of file winviewoptsdlg.h. Referenced by RestoreSettings(), and ViewOptionsProc(). |
|
|
Definition at line 32 of file winviewoptsdlg.h. Referenced by RestoreSettings(), and ViewOptionsProc(). |
|
|
Definition at line 31 of file winviewoptsdlg.h. Referenced by RestoreSettings(), and ViewOptionsProc(). |
|
|
Definition at line 29 of file winviewoptsdlg.h. Referenced by notifyChange(), ViewOptionsDialog(), and ViewOptionsProc(). |
1.4.1