mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-04 20:46:29 +03:00
CSS Improvements and tests.
--HG-- branch : dev-css
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef EE_GRAPHICSFONTHELPER_HPP
|
||||
#define EE_GRAPHICSFONTHELPER_HPP
|
||||
|
||||
#include <eepp/config.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
enum EE_FONT_TYPE {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <eepp/config.hpp>
|
||||
#include <eepp/math/vector2.hpp>
|
||||
#include <eepp/core/string.hpp>
|
||||
|
||||
namespace EE { namespace Math {
|
||||
|
||||
@@ -40,6 +41,8 @@ class tOriginPoint : public Vector2<T> {
|
||||
{
|
||||
}
|
||||
|
||||
std::string toString() const;
|
||||
|
||||
tOriginPoint<T>& operator=(const Vector2<T>& v);
|
||||
};
|
||||
|
||||
@@ -50,6 +53,13 @@ tOriginPoint<T>& tOriginPoint<T>::operator=(const Vector2<T>& v) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::string tOriginPoint<T>::toString() const {
|
||||
if ( OriginType == OriginCenter ) return "center";
|
||||
else if ( OriginType == OriginTopLeft ) return "topleft";
|
||||
return String::toStr(this->x) + "," + String::toStr(this->y);
|
||||
}
|
||||
|
||||
typedef tOriginPoint<Float> OriginPoint;
|
||||
typedef tOriginPoint<int> OriginPointi;
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ class EE_API Node : public Transformable {
|
||||
|
||||
void disableReportSizeChangeToChilds();
|
||||
|
||||
bool reportSizeChangeToChilds();
|
||||
bool reportSizeChangeToChilds() const;
|
||||
|
||||
void centerHorizontal();
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ class EE_API StyleSheetStyle {
|
||||
StyleSheetProperty getPropertyByName( const std::string& name ) const;
|
||||
|
||||
void setProperty( const StyleSheetProperty& property );
|
||||
|
||||
void clearProperties();
|
||||
protected:
|
||||
StyleSheetSelector mSelector;
|
||||
StyleSheetProperties mProperties;
|
||||
|
||||
@@ -109,6 +109,8 @@ class EE_API UINode : public Node {
|
||||
|
||||
UINode * setForegroundRadius( const unsigned int& corners );
|
||||
|
||||
Uint32 getForegroundRadius() const;
|
||||
|
||||
RectangleDrawable * setBorderEnabled( bool enabled );
|
||||
|
||||
UINode * setBorderColor( const Color& color );
|
||||
@@ -117,6 +119,8 @@ class EE_API UINode : public Node {
|
||||
|
||||
UINode * setBorderWidth( const unsigned int& width );
|
||||
|
||||
Float getBorderWidth() const;
|
||||
|
||||
const Uint32& getFlags() const;
|
||||
|
||||
virtual UINode * setFlags( const Uint32& flags );
|
||||
|
||||
@@ -200,6 +200,16 @@ class EE_API UIWidget : public UINode, public CSS::StyleSheetElement {
|
||||
void reportStyleStateChange();
|
||||
|
||||
bool isSceneNodeLoading() const;
|
||||
|
||||
std::string getLayoutWidthRulesString() const;
|
||||
|
||||
std::string getLayoutHeightRulesString() const;
|
||||
|
||||
std::string getLayoutGravityString() const;
|
||||
|
||||
std::string getGravityString() const;
|
||||
|
||||
std::string getFlagsString() const;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user