OpenShaderDesigner 0.0.1
Loading...
Searching...
No Matches
OpenShaderDesigner::Console Class Reference

Public Types

enum  Settings : uint8_t {
  Settings_ShowTimeStamp = 0b00000001 , Settings_ShowThread = 0b00000010 , Settings_Severity = 0b00000100 , Settings_ShowFileInfo = 0b00001000 ,
  Settings_WrapText = 0b00010000 , Settings_ALL = 0xFF , Settings_Default = Settings_ALL ^ Settings_WrapText
}
 Setting for displaying log entries.
 
enum  Severity : int {
  Message = 0 , Warning , Error , Fatal ,
  Alert , Command , COUNT , DEFAULT = Warning
}
 Severity levels for log entries.
 

Static Public Member Functions

static constexpr ImVec4 ImGuiColor (unsigned int RGB)
 Integer to floating point color. (ImGui APIVersion)
 
static std::string ThreadID ()
 
template<typename... Args>
static void Log (const std::string &file, const int line, Severity severity=Severity::DEFAULT, const std::format_string< Args... > &message="", Args &&... vargs)
 Thread-Safe Log function for debugging.
 
static void DrawMenu ()
 
static void DrawWindow ()
 

Static Public Attributes

static const std::string SettingNames []
 String representations of the settings.
 
static const std::string Severities []
 String representations of the Severity levels.
 
static const ImVec4 SeverityColors []
 Color for rendering each Severity level text in editor.
 
static bool Open = true
 

Member Function Documentation

◆ ImGuiColor()

static constexpr ImVec4 OpenShaderDesigner::Console::ImGuiColor ( unsigned int RGB)
inlinestaticconstexpr

Integer to floating point color. (ImGui APIVersion)

Parameters
RGBThe Integer color to convert.
Returns
The rgba floating point color.

◆ Log()

template<typename... Args>
void OpenShaderDesigner::Console::Log ( const std::string & file,
const int line,
Severity severity = Severity::DEFAULT,
const std::format_string< Args... > & message = "",
Args &&... vargs )
static

Thread-Safe Log function for debugging.

Template Parameters
ArgsVariadic Arguments template for PixelLayout Parameters
Parameters
fileThe name of the file this was called from.
lineThe line number this was called from.
severityThe severity level of the log entry.
messageA format string for the entry message.
vargsArguments for the format string.

Member Data Documentation

◆ SettingNames

const std::string OpenShaderDesigner::Console::SettingNames[]
inlinestatic
Initial value:
=
{
"Timestamps", "Thread IDs", "Severity", "File Info", "Wrapping"
}

String representations of the settings.

◆ Severities

const std::string OpenShaderDesigner::Console::Severities[]
inlinestatic
Initial value:
=
{
"Message", "Warning", "Error", "Fatal", "Alert", "Command"
}

String representations of the Severity levels.

◆ SeverityColors

const ImVec4 OpenShaderDesigner::Console::SeverityColors[]
inlinestatic
Initial value:
= {
ImGuiColor(0xA4B9C4FF), ImGuiColor(0xF2C554FF), ImGuiColor(0xE57327FF), ImGuiColor(0xCC211EFF),
ImGuiColor(0x9CDCFEFF),
}
static constexpr ImVec4 ImGuiColor(unsigned int RGB)
Integer to floating point color. (ImGui APIVersion)
Definition Console.h:90

Color for rendering each Severity level text in editor.


The documentation for this class was generated from the following files: