MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
mostly_harmless::gui Namespace Reference

Contains GUI related classes & functions. More...

Namespaces

namespace  helpers
 Contains helper functions for gui handling.
 

Classes

struct  Colour
 Convenience struct representing a colour. More...
 
class  WebviewBase
 Convenience wrapper layer implementing the creation and management of a choc::ui::WebView. Still abstract, as setParams is left up to the user to implement in a way they see fit. More...
 
class  WebviewEditor
 An opinionated subclass of WebviewBase, providing default impls for bidirectional comms. More...
 

Functions

std::optional< std::string > getMimeType (const std::string &filename)
 Tries to retrieve the MIME type for a given filename.
 

Detailed Description

Contains GUI related classes & functions.

Function Documentation

◆ getMimeType()

std::optional< std::string > mostly_harmless::gui::getMimeType ( const std::string & filename)
nodiscard

Tries to retrieve the MIME type for a given filename.

Parameters
filenameThe filename to retrieve the MIME type for
Returns
The associated MIME type for the given filename if found, std::nullopt otherwise.