Fray Engine
Loading...
Searching...
No Matches
fray::style Namespace Reference

Functions

F_err saveButtonStyle (const std::filesystem::path &engineDirectory, const std::string &css)
 Writes the application button stylesheet atomically.
F_err loadButtonStyle (const std::filesystem::path &engineDirectory, const std::string &defaults, std::string &css)
 Reads the application button stylesheet, creating it from packaged defaults if absent.

Variables

const std::filesystem::path buttonDirectory = std::filesystem::path("Fray Styles") / "01 Basic Components"
 Relative directory of the editable application button stylesheet.
constexpr const char * buttonFile = "fray_button.css"
 Editable application button stylesheet name.
constexpr std::size_t maximumStyleSize = 1024 * 1024
 Maximum stylesheet size in bytes.

Function Documentation

◆ loadButtonStyle()

F_err fray::style::loadButtonStyle ( const std::filesystem::path & engineDirectory,
const std::string & defaults,
std::string & css )
inline

Reads the application button stylesheet, creating it from packaged defaults if absent.

Parameters
engineDirectoryDirectory containing the Engine's application files.
defaultsPackaged stylesheet used only when no file exists.
cssReceives the complete saved stylesheet.
Returns
NONE on success, otherwise a read or save error.

Definition at line 60 of file application_style.hpp.

◆ saveButtonStyle()

F_err fray::style::saveButtonStyle ( const std::filesystem::path & engineDirectory,
const std::string & css )
inline

Writes the application button stylesheet atomically.

Parameters
engineDirectoryDirectory containing the Engine's application files.
cssComplete stylesheet text.
Returns
NONE on success, otherwise FAILED_SAVE_STATE.

Definition at line 25 of file application_style.hpp.

Variable Documentation

◆ buttonDirectory

const std::filesystem::path fray::style::buttonDirectory = std::filesystem::path("Fray Styles") / "01 Basic Components"
inline

Relative directory of the editable application button stylesheet.

Definition at line 13 of file application_style.hpp.

◆ buttonFile

const char* fray::style::buttonFile = "fray_button.css"
inlineconstexpr

Editable application button stylesheet name.

Definition at line 15 of file application_style.hpp.

◆ maximumStyleSize

std::size_t fray::style::maximumStyleSize = 1024 * 1024
inlineconstexpr

Maximum stylesheet size in bytes.

Definition at line 17 of file application_style.hpp.