// ____ ______ __ // / __ \ / ____// / // / /_/ // / / / // / ____// /___ / /___ PixInsight Class Library // /_/ \____//_____/ PCL 2.4.23 // ---------------------------------------------------------------------------- // pcl/GlobalSettings.h - Released 2022-03-12T18:59:29Z // ---------------------------------------------------------------------------- // This file is part of the PixInsight Class Library (PCL). // PCL is a multiplatform C++ framework for development of PixInsight modules. // // Copyright (c) 2003-2022 Pleiades Astrophoto S.L. All Rights Reserved. // // Redistribution and use in both source and binary forms, with or without // modification, is permitted provided that the following conditions are met: // // 1. All redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // 2. All redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names // of their contributors, may be used to endorse or promote products derived // from this software without specific prior written permission. For written // permission, please contact info@pixinsight.com. // // 4. All products derived from this software, in any form whatsoever, must // reproduce the following acknowledgment in the end-user documentation // and/or other materials provided with the product: // // "This product is based on software from the PixInsight project, developed // by Pleiades Astrophoto and its contributors (https://pixinsight.com/)." // // Alternatively, if that is where third-party acknowledgments normally // appear, this acknowledgment must be reproduced in the product itself. // // THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS // INTERRUPTION; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE, // DATA OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- #ifndef __PCL_GlobalSettings_h #define __PCL_GlobalSettings_h /// \file pcl/GlobalSettings.h #include #include #include #include #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION #include #endif namespace pcl { // ---------------------------------------------------------------------------- /*! * \namespace pcl::GlobalVariableType * \brief Data types for global platform variables * * * * * * * * * * *
GlobalVariableType::Undefined Indicates that the requested global variable does not exist.
GlobalVariableType::Flag Boolean value.
GlobalVariableType::Integer Signed integer.
GlobalVariableType::Unsigned Unsigned integer.
GlobalVariableType::Real Floating point real (IEEE 64-bit floating point).
GlobalVariableType::Color RGBA color (uint32).
GlobalVariableType::Font A font face (a string).
GlobalVariableType::String A UTF-16 string.
*/ namespace GlobalVariableType { enum value_type { Undefined, // The requested global variable doesn't exist Flag, // bool Integer, // int Unsigned, // unsigned Real, // double Color, // RGBA (= uint32) Font, // Font String // String }; } // ---------------------------------------------------------------------------- /*! * \class PixInsightSettings * \brief Retrieves global settings from the PixInsight core application * * PixInsight global settings, also known as global variables, are * identifier/value pairs available from the core application to all installed * modules. Settings can be of six types: flags (or Boolean), integer (signed * and unsigned), real (floating point), color, font, and string. See the * pcl::GlobalVariableType namespace for more details. * * Below is a complete list of all global settings available in current * versions of the PixInsight platform (updated as of core version 1.8.8-13). * *

PixInsight Public Global Variables

* *

Global %Flags

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Application/AutoUIScaling
Application/HealRegistryInformationOnUpdates
ColorManagement/DefaultEmbedProfilesInGrayscaleImages
ColorManagement/DefaultEmbedProfilesInRGBImages
ColorManagement/DefaultGamutCheckEnabled
ColorManagement/DefaultProofingEnabled
ColorManagement/IsEnabled
ColorManagement/IsValidRead-only.
ColorManagement/UseLowResolutionCLUTs
ColorManagement/UseProofingBPC
ImageWindow/BackupFiles
ImageWindow/CreatePreviewsFromCoreProperties
ImageWindow/Default24BitScreenLUT
ImageWindow/DefaultEmbedProperties
ImageWindow/DefaultEmbedThumbnails
ImageWindow/DefaultMasksShown
ImageWindow/DefaultMetricResolution
ImageWindow/FastScreenRenditions
ImageWindow/FileFormatWarnings
ImageWindow/FollowDownloadLocations
ImageWindow/HighDPIRenditions
ImageWindow/LoadAstrometricSolutions
ImageWindow/LoadInitialProcessingFromCoreProperties
ImageWindow/MeasureScreenRenderingPerformance
ImageWindow/NativeFileDialogs
ImageWindow/ProjectVerifyIncrementalChecksums
ImageWindow/RememberFileOpenType
ImageWindow/RememberFileSaveType
ImageWindow/ShowActiveSTFIndicators
ImageWindow/ShowCaptionCurrentChannels
ImageWindow/ShowCaptionFullPaths
ImageWindow/ShowCaptionIdentifiers
ImageWindow/ShowCaptionZoomRatios
ImageWindow/ShowViewSelectorImageThumbnails
ImageWindow/StrictFileSaveMode
ImageWindow/SwapCompression
ImageWindow/TouchEvents
ImageWindow/UseFileNamesAsImageIdentifiers
ImageWindow/VerboseNetworkOperationsNot available on Windows.
ImageWindow/ZoomAtCursor
MainWindow/AcceptDroppedFiles
MainWindow/AnimateCombo
MainWindow/AnimateMenu
MainWindow/AnimateToolBox
MainWindow/AnimateToolTip
MainWindow/AnimateWindows
MainWindow/CapitalizedMenuBars
MainWindow/CheckForUpdatesAtStartup
MainWindow/ConfirmProgramTermination
MainWindow/DesktopSettingsAware
MainWindow/DoubleClickLaunchesOpenDialog
MainWindow/ExpandFavoritesAtStartup
MainWindow/ExpandMostUsedAtStartup
MainWindow/ExpandRecentlyUsedAtStartup
MainWindow/ExplodeIcons
MainWindow/FadeAutoHideWindows
MainWindow/FadeMenu
MainWindow/FadeToolTip
MainWindow/FadeWindows
MainWindow/FadeWorkspaces
MainWindow/FullScreenAtStartup
MainWindow/HighQualityWallpapers
MainWindow/HoverableAutoHideWindows
MainWindow/ImplodeIcons
MainWindow/MaximizeAtStartup
MainWindow/NativeMenuBar
MainWindow/OpenURLsWithInternalBrowser
MainWindow/OpenResourcesOnNewWebBrowserWindows
MainWindow/PrivateWebBrowsingMode
MainWindow/ShowFavorites
MainWindow/ShowMostUsed
MainWindow/ShowRecentlyUsed
MainWindow/ShowSplashAtStartup
MainWindow/ShowViewListImageThumbnails
MainWindow/ShowWorkspaceThumbnails
MainWindow/TranslucentAutoHideWindows
MainWindow/TranslucentChildWindows
MainWindow/TranslucentWindows
MainWindow/UseWallpapers
MainWindow/WindowButtonsOnTheLeft
Process/AlertOnProcessCompleted
Process/BackupFiles
Process/EnableCUDAAcceleration
Process/EnableExecutionStatistics
Process/EnableLaunchStatistics
Process/EnableParallelCoreColorManagement
Process/EnableParallelCoreRendering
Process/EnableParallelModuleProcessing
Process/EnableParallelProcessing
Process/EnableThreadCPUAffinity
Process/GenerateScriptComments
Process/InitCUDARuntimeAtStartup
Process/VerifyScriptChecksums
* *

Global Integers

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Application/FontResolutionIn dots per inch.
ColorManagement/DefaultRenderingIntentSee the pcl::ICCRenderingIntent namespace.
ColorManagement/OnMissingProfileCore application policies. See the documentation for ColorManagementSetup.
ColorManagement/OnProfileMismatchCore application policies. See the documentation for ColorManagementSetup.
ColorManagement/ProofingIntentSee the pcl::ICCRenderingIntent namespace.
ImageWindow/CursorToleranceIn device pixels.
ImageWindow/DefaultMaskModeSee the pcl::MaskMode namespace.
ImageWindow/DefaultTransparencyModeSee the pcl::TransparencyMode namespace.
ImageWindow/FastScreenRenditionThresholdIn MiB.
ImageWindow/ImageThumbnailSizeIn image pixels.
ImageWindow/ProjectThumbnailSizeIn image pixels.
ImageWindow/WheelStepAngleIn degrees, unsigned.
ImageWindow/WheelDirectionWhen >= 0, rotating forward zooms out. When < 0, rotating forward zooms in.
MainWindow/MaxRecentFilesMaximum length of recent file menu lists.
Process/AutoSavePSMPeriodIn seconds.
Process/ConsoleDelayIn milliseconds.
Process/MaxConsoleLinesMaximum number of stored text lines on %Process %Console.
Process/MaxModuleThreadPriorityFrom 0=idle to 7=real-time.
Process/MaxProcessorsMaximum number of processor cores allowed for installed modules.
Process/MaxFileReadThreadsMaximum number of concurrent file reading threads.
Process/MaxFileWriteThreadsMaximum number of concurrent file writing threads.
Process/MaxUsageListLengthMaximum length of the Recently Used and Most Used lists on %Process %Explorer.
System/NumberOfProcessorsTotal number of processor cores available. Read-only.
TransparencyBrush/BrushSee the pcl::BackgroundBrush namespace.
Workspace/PrimaryScreenCenterXRead-only. In physical device pixels.
Workspace/PrimaryScreenCenterYRead-only. In physical device pixels.
Workspace/IconGridSpacingGrid distance for aligned icon positions on all workspaces. In logical device pixels.
* *

Global Reals

* * * * * * * * * * * * * *
Application/StartJDStarting time of the core application instance as a Julian day number. Read-only.
Application/UIScalingFactorGlobal interface scaling factor of the core application. In the range [1.0,4.0].
ImageWindow/DefaultHorizontalResolutionIn device pixels per resolution unit. See the ImageWindow/DefaultMetricResolution global variable.
ImageWindow/DefaultVerticalResolutionIn device pixels per resolution unit. See the ImageWindow/DefaultMetricResolution global variable.
ImageWindow/PinchSensitivityFor touch events. In device pixels.
MainWindow/ActiveWindowOpacityWindow opacity in the [0,1] range.
MainWindow/AutoHideWindowOpacityWindow opacity in the [0,1] range.
MainWindow/InactiveChildWindowOpacityWindow opacity in the [0,1] range.
MainWindow/InactiveWindowOpacityWindow opacity in the [0,1] range.
MainWindow/MovingChildWindowOpacityWindow opacity in the [0,1] range.
MainWindow/MovingWindowOpacityWindow opacity in the [0,1] range.
* *

Global Colors

* * Since PixInsight core version 1.8.0, most UI colors and fonts are defined in * cascading style sheet files loaded automatically on startup. Only the * following four color variables remain because they are purely functional * (i.e., not related to the appearance of GUI controls). * * * * * * *
ColorManagement/GamutWarningColorFor signaling out-of-gamut pixels in color proofing image renditions.
TransparencyBrush/BackgroundColorBackground brush color for renditions of translucent image pixels.
TransparencyBrush/DefaultColorOpaque color for renditions of translucent image pixels.
TransparencyBrush/ForegroundColorForeground brush color for renditions of translucent image pixels.
* *

Global Fonts

* * Currently there are no global font variables. Since PixInsight core version * 1.8.0, all UI fonts are defined through cascading style sheet files loaded * automatically on startup. * *

Global Strings

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Application/AppDirectoryFull path to the distribution's core application bundle. Read-only. macOS only,
Application/AsteroidEphemeridesFileFile name or path of the distribution's asteroid ephemerides file (XEPH format).
Application/AsteroidEphemeridesFilePathFull path to the current distribution's asteroid ephemerides file (XEPH format). Read-only.
Application/BaseDirectoryBase directory of the core distribution. Read-only.
Application/BinDirectoryFull path to the distribution's bin directory. Read-only.
Application/CIP_ITRSDataFileFile name or path of the distribution's data file of CIP coordinates in the ITRS (plain text).
Application/CIP_ITRSDataFilePathFull path to the current distribution's data file of CIP coordinates in the ITRS (plain text). Read-only
Application/CoreDirectoryFull directory of the core executable file. Read-only.
Application/CoreFilePathFull file path of the core executable. Read-only.
Application/DeltaATDataFileFile name or path of the distribution's Delta AT (TAI-UTC) data file (plain text).
Application/DeltaATDataFilePathFull path to the current distribution's Delta AT (TAI-UTC) data file (plain text). Read-only
Application/DeltaTDataFileFile name or path of the distribution's Delta T (TT-UT1) data file (plain text).
Application/DeltaTDataFilePathFull path to the current distribution's Delta T (TT-UT1) data file (plain text). Read-only
Application/DocDirectoryFull path to the distribution's doc directory. Read-only.
Application/EtcDirectoryFull path to the distribution's etc directory. Read-only.
Application/FundamentalEphemeridesFileFile name or path of the distribution's fundamental ephemerides file (XEPH format).
Application/FundamentalEphemeridesFilePathFull path to the current distribution's fundamental ephemerides file (XEPH format). Read-only.
Application/HighResFont%Font family for automatic style sheet replacement on high-dpi displays.
Application/HighResMonoFontMonospaced font family for automatic style sheet replacement on high-dpi displays.
Application/IncludeDirectoryFull path to the distribution's include directory. Read-only.
Application/LibDirectoryFull path to the distribution's lib directory. Read-only.
Application/LibraryDirectoryFull path to the distribution's library directory. Read-only.
Application/LowResFont%Font family for automatic style sheet replacement on low-dpi displays.
Application/LowResMonoFontMonospaced font family for automatic style sheet replacement on low-dpi displays.
Application/NutationModelFileFile name or path of the distribution's nutation model file (XEPH format).
Application/NutationModelFilePathFull path to the current distribution's nutation model file (XEPH format). Read-only.
Application/ResourceFile01Core resource file #1.
Application/ResourceFile02Core resource file #2.
Application/ResourceFile03Core resource file #3.
Application/ResourceFile04Core resource file #4.
Application/ResourceFile05Core resource file #5.
Application/ResourceFile06Core resource file #6.
Application/ResourceFile07Core resource file #7.
Application/ResourceFile08Core resource file #8.
Application/ResourceFile09Core resource file #9.
Application/ResourceFile10Core resource file #10.
Application/RscDirectoryFull path to the distribution's rsc directory. Read-only.
Application/ShortTermAsteroidEphemeridesFileFile name or path of the distribution's asteroid ephemerides file (XEPH format) - short-term version (reduced time span).
Application/ShortTermAsteroidEphemeridesFilePathFull path to the current distribution's asteroid ephemerides file (XEPH format) - short-term version (reduced time span). Read-only.
Application/ShortTermFundamentalEphemeridesFileFile name or path of the distribution's fundamental ephemerides file (XEPH format) - short-term version (reduced time span).
Application/ShortTermFundamentalEphemeridesFilePathFull path to the current distribution's fundamental ephemerides file (XEPH format) - short-term version (reduced time span). Read-only.
Application/ShortTermNutationModelFileFile name or path of the distribution's nutation model file (XEPH format) - short-term version (reduced time span).
Application/ShortTermNutationModelFilePathFull path to the current distribution's nutation model file (XEPH format) - short-term version (reduced time span). Read-only.
Application/SrcDirectoryFull path to the distribution's src directory. Read-only.
Application/StartTimeStarting time of the core application in ISO 8601 extended format. Read-only.
Application/StyleSheetFileMain core stile sheet file.
ColorManagement/DefaultGrayscaleProfilePathFull path to the default ICC color profile for grayscale monochrome images.
ColorManagement/DefaultRGBProfilePathFull path to the default ICC color profile for RGB color images.
ColorManagement/MonitorProfilePathFull path to the ICC color profile associated with the primary monitor. Read-only.
ColorManagement/ProofingProfilePathFull path to the ICC color profile for the color proofing target device.
ColorManagement/UpdateMonitorProfileFull path to the scheduled new ICC color profile for the primary monitor. Write-only. See the documentation for ColorManagementSetup.
FileFormat/ReadFiltersA list of file filters for file formats capable of image read operations, suitable for file dialogs. Read-only. Updated dynamically on-demand.
FileFormat/WriteFiltersA list of file filters for file formats capable of image write operations, suitable for file dialogs. Read-only. Updated dynamically on-demand.
ImageContainerIcon/PrefixPrefix for automatically generated image container identifiers.
ImageWindow/ClonePostfixPostfix appended to image duplicates
ImageWindow/DefaultFileExtensionThe default file suffix used to save newly created images.
ImageWindow/DownloadsDirectoryFull path to the core downloads directory.
ImageWindow/NewImageCaptionWindow title token for signaling newly created images.
ImageWindow/PrefixPrefix used for automatically generated image identifiers.
ImageWindow/ProxyURLThe proxy that will be used for core network operations.
MainWindow/WallpaperFile01Core workspace wallpaper file #1.
MainWindow/WallpaperFile02Core workspace wallpaper file #2.
MainWindow/WallpaperFile03Core workspace wallpaper file #3.
MainWindow/WallpaperFile04Core workspace wallpaper file #4.
MainWindow/WallpaperFile05Core workspace wallpaper file #5.
MainWindow/WallpaperFile06Core workspace wallpaper file #6.
MainWindow/WallpaperFile07Core workspace wallpaper file #7.
MainWindow/WallpaperFile08Core workspace wallpaper file #8.
MainWindow/WallpaperFile09Core workspace wallpaper file #9.
MainWindow/WallpaperFile10Core workspace wallpaper file #10.
Preview/PrefixPrefix used for automatically generated preview identifiers.
ProcessIcon/PrefixPrefix used for automatically generated process icon identifiers.
View/BrokenLinkTextText fragment used to signal broken image and/or process relations, such as missing masks.
ViewList/NoPreviewSelectedTextText fragment used when there are no previews selected.
ViewList/NoPreviewsAvailableTextText fragment used when there are no previews available.
ViewList/NoViewSelectedTextText fragment used when there are no views selected.
ViewList/NoViewsAvailableTextText fragment used when there are no views available.
Workspace/PrefixPrefix used for automatically generated workspace identifiers.
*/ class PCL_CLASS PixInsightSettings { public: /*! * Represents the data type of a global variable. */ typedef GlobalVariableType::value_type variable_type; /*! * Default constructor. This constructor is disabled because * %PixInsightSettings is not an instantiable class. */ PixInsightSettings() = delete; /*! * Copy constructor. This constructor is disabled because * %PixInsightSettings is not an instantiable class. */ PixInsightSettings( const PixInsightSettings& ) = delete; /*! * Copy assignment. This operator is disabled because * %PixInsightSettings is not an instantiable class. */ PixInsightSettings& operator =( const PixInsightSettings& ) = delete; /*! * Virtual destructor. This destructor is disabled because * %PixInsightSettings is not an instantiable class. */ virtual ~PixInsightSettings() = delete; /*! * Retrieves the type of a global variable \a globalId. */ static variable_type GlobalVariableType( const IsoString& globalId ); /*! * Returns true iff the specified global variable \a globalId is defined in * the current PixInsight platform. */ static bool IsGlobalVariableDefined( const IsoString& globalId ) { return GlobalVariableType( globalId ) != GlobalVariableType::Undefined; } /*! * Returns the value of a global boolean variable. */ static bool GlobalFlag( const IsoString& globalId ); /*! * Returns the value of a global signed integer variable. */ static int GlobalInteger( const IsoString& globalId ); /*! * Returns the value of a global unsigned integer variable. */ static unsigned GlobalUnsigned( const IsoString& globalId ); /*! * Returns the value of a global floating point real variable. */ static double GlobalReal( const IsoString& globalId ); /*! * Returns the value of a global RGBA color variable. */ static RGBA GlobalColor( const IsoString& globalId ); #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION /*! * Returns the value of a global font face variable. */ static Font GlobalFont( const IsoString& globalId ); #endif /*! * Returns the value of a global string variable. */ static String GlobalString( const IsoString& globalId ); /*! * Begins a global variable update operation. * * \sa EndUpdate(), CalcelUpdate() */ static void BeginUpdate(); /*! * Terminates a global variable update operation. * * \sa BeginUpdate(), CancelUpdate() */ static void EndUpdate(); /*! * Aborts an ongoing global variable update operation. * * Use this function if you catch an exception during the sequence of * SetGlobalXXX() calls. After cancelling an update operation, you * shouldn't call EndUpdate(). * * \sa BeginUpdate(), EndUpdate() */ static void CancelUpdate(); /*! * Sets the value of a global boolean variable. */ static void SetGlobalFlag( const IsoString& globalId, bool ); /*! * Sets the value of a global signed integer variable. */ static void SetGlobalInteger( const IsoString& globalId, int ); /*! * Sets the value of a global unsigned integer variable. */ static void SetGlobalUnsigned( const IsoString& globalId, unsigned ); /*! * Sets the value of a global floating point real variable. */ static void SetGlobalReal( const IsoString& globalId, double ); /*! * Sets the value of a global RGBA color variable. */ static void SetGlobalColor( const IsoString& globalId, RGBA ); #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION /*! * Sets the value of a global font face variable. */ static void SetGlobalFont( const IsoString& globalId, const Font& ); #endif /*! * Sets the value of a global string variable. */ static void SetGlobalString( const IsoString& globalId, const String& ); }; // ---------------------------------------------------------------------------- } // pcl #endif // __PCL_GlobalSettings_h // ---------------------------------------------------------------------------- // EOF pcl/GlobalSettings.h - Released 2022-03-12T18:59:29Z