2024-12-01 15:10:25 +08:00
|
|
|
#ifndef __BULMATHEME_H__
|
|
|
|
#define __BULMATHEME_H__
|
|
|
|
|
|
|
|
#include <Wt/WTheme.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief
|
|
|
|
* Animate.css
|
|
|
|
* https://bulma.io/
|
|
|
|
*/
|
|
|
|
class BulmaTheme : public Wt::WTheme {
|
|
|
|
public:
|
|
|
|
BulmaTheme(const std::string &name, bool global = true);
|
|
|
|
std::string name() const final;
|
2024-12-02 01:18:57 +08:00
|
|
|
void init(Wt::WApplication *app) const final;
|
2024-12-01 15:10:25 +08:00
|
|
|
std::string disabledClass() const final;
|
|
|
|
std::string activeClass() const final;
|
|
|
|
std::string utilityCssClass(int utilityCssClassRole) const final;
|
|
|
|
std::vector<Wt::WLinkedCssStyleSheet> styleSheets() const final;
|
|
|
|
bool canStyleAnchorAsButton() const final;
|
|
|
|
void apply(Wt::WWidget *widget, Wt::WWidget *child, int widgetRole) const final;
|
|
|
|
void apply(Wt::WWidget *widget, Wt::DomElement &element, int elementRole) const final;
|
|
|
|
|
|
|
|
void applyValidationStyle(Wt::WWidget *widget, const Wt::WValidator::Result &validation,
|
|
|
|
Wt::WFlags<Wt::ValidationStyleFlag> flags) const final;
|
|
|
|
bool canBorderBoxElement(const Wt::DomElement &element) const final;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string m_name;
|
|
|
|
bool m_global = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __BULMATHEME_H__
|