class EE::UI::CSS::StyleSheetLength

#include <stylesheetlength.hpp>

class StyleSheetLength {
public:
    // enums

    enum Unit;

    // construction

    StyleSheetLength();
    StyleSheetLength(const Float& val, const Unit& unit);
    StyleSheetLength(const std::string& val, const Float& defaultValue = 0);
    StyleSheetLength(const StyleSheetLength& val);

    // methods

    static Unit unitFromString(std::string unitStr);
    static std::string unitToString(const Unit& unit);
    static bool isLength(const std::string& unitStr);
    static StyleSheetLength fromString(const std::string& str, const Float& defaultValue = 0);
    void setValue(const Float& val, const Unit& units);
    const Float& getValue() const;
    const Unit& getUnit() const;
    Float asPixels(const Float& parentSize, const Sizef& viewSize, const Float& displayDpi, const Float& elFontSize = 12, const Float& globalFontSize = 12) const;
    Float asDp(const Float& parentSize, const Sizef& viewSize, const Float& displayDpi, const Float& elFontSize = 12, const Float& globalFontSize = 12) const;
    bool operator==(const StyleSheetLength& val) const;
    bool operator!=(const StyleSheetLength& val) const;
    StyleSheetLength& operator=(const StyleSheetLength& val);
    StyleSheetLength& operator=(const Float& val);
    std::string toString() const;
};