MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Mezzanine::UI::UnifiedDim Class Reference

This class represents both the relative and absolute values that can be expressed for the values on one dimension for a UI renderable. More...

#include <unifieddim.h>

Public Member Functions

 UnifiedDim ()
 Class constructor.
 
 UnifiedDim (const Real &Relative, const Real &Absolute)
 Descriptive constructor. More...
 
 UnifiedDim (const UnifiedDim &Other)
 Copy constructor. More...
 
 ~UnifiedDim ()
 Class destructor.
 
Real CalculateActualDimension (const Real &Actual) const
 Calculates the actual value when a Real in pixels has this unified dim applied to it. More...
 
bool operator!= (const UnifiedDim &Other) const
 Inequality comparison operator. More...
 
UnifiedDim operator* (const UnifiedDim &Other) const
 Multiplication operator. More...
 
UnifiedDim operator* (const Real &Other)
 Multiplication with Real operator. More...
 
UnifiedDimoperator*= (const UnifiedDim &Other)
 Multiplication assignment operator. More...
 
UnifiedDimoperator*= (const Real &Other)
 Multiplication assignment with Real operator. More...
 
UnifiedDim operator+ (const UnifiedDim &Other) const
 Addition operator. More...
 
UnifiedDimoperator+= (const UnifiedDim &Other)
 Addition assignment operator. More...
 
UnifiedDim operator- (const UnifiedDim &Other) const
 Subtraction operator. More...
 
UnifiedDimoperator-= (const UnifiedDim &Other)
 Subtraction assignment operator. More...
 
UnifiedDim operator/ (const UnifiedDim &Other) const
 Division operator. More...
 
UnifiedDim operator/ (const Real &Other)
 Division with Real operator. More...
 
UnifiedDimoperator/= (const UnifiedDim &Other)
 Division assignment operator. More...
 
UnifiedDimoperator/= (const Real &Other)
 Division assignment with Real operator. More...
 
UnifiedDimoperator= (const UnifiedDim &Other)
 Assignment operator. More...
 
bool operator== (const UnifiedDim &Other) const
 Equality comparison operator. More...
 
void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
void SetIdentity ()
 Sets all values of this dimension to zero.
 
void SetValues (const Real &Relative, const Real &Absolute)
 Sets the values of this dimension. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 

Public Attributes

Real Abs
 The absolute value on this dimension.
 
Real Rel
 The relative value on this dimension.
 

Detailed Description

This class represents both the relative and absolute values that can be expressed for the values on one dimension for a UI renderable.

Definition at line 56 of file unifieddim.h.

Constructor & Destructor Documentation

Mezzanine::UI::UnifiedDim::UnifiedDim ( const Real Relative,
const Real Absolute 
)
inline

Descriptive constructor.

Parameters
RelativeThe relative portion of this dimension.
AbsoluteThe absolute portion of this dimension.

Definition at line 75 of file unifieddim.h.

Mezzanine::UI::UnifiedDim::UnifiedDim ( const UnifiedDim Other)
inline

Copy constructor.

Parameters
OtherThe other UnifiedDim to copy from.

Definition at line 79 of file unifieddim.h.

Member Function Documentation

Real Mezzanine::UI::UnifiedDim::CalculateActualDimension ( const Real Actual) const
inline

Calculates the actual value when a Real in pixels has this unified dim applied to it.

Parameters
ActualA Real containing the actual(pixel) dimension to use as a base for the calculation.
Returns
Returns a Real containing the result dimension in actual (pixel) units.

Definition at line 105 of file unifieddim.h.

static String Mezzanine::UI::UnifiedDim::GetSerializableName ( )
inlinestatic

Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 290 of file unifieddim.h.

bool Mezzanine::UI::UnifiedDim::operator!= ( const UnifiedDim Other) const
inline

Inequality comparison operator.

Parameters
OtherThe other UnifiedDim to compare to.
Returns
Returns true if these UnifiedDim's are not equal, false otherwise.

Definition at line 231 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator* ( const UnifiedDim Other) const
inline

Multiplication operator.

Parameters
OtherThe other UnifiedDim to multiply by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 130 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator* ( const Real Other)
inline

Multiplication with Real operator.

Parameters
OtherThe Real to multiply by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 186 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator*= ( const UnifiedDim Other)
inline

Multiplication assignment operator.

Parameters
OtherThe other UnifiedDim to multiply by.
Returns
Returns a reference to this.

Definition at line 164 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator*= ( const Real Other)
inline

Multiplication assignment with Real operator.

Parameters
OtherThe Real to multiply by.
Returns
Returns a reference to this.

Definition at line 202 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator+ ( const UnifiedDim Other) const
inline

Addition operator.

Parameters
OtherThe other UnifiedDim to add to this.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 116 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator+= ( const UnifiedDim Other)
inline

Addition assignment operator.

Parameters
OtherThe other UnifiedDim to add to this.
Returns
Returns a reference to this.

Definition at line 146 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator- ( const UnifiedDim Other) const
inline

Subtraction operator.

Parameters
OtherThe other UnifiedDim to subtract from this.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 123 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator-= ( const UnifiedDim Other)
inline

Subtraction assignment operator.

Parameters
OtherThe other UnifiedDim to subtract from this.
Returns
Returns a reference to this.

Definition at line 155 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator/ ( const UnifiedDim Other) const
inline

Division operator.

Parameters
OtherThe other UnifiedDim to divide by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 137 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator/ ( const Real Other)
inline

Division with Real operator.

Parameters
OtherThe Real to divide by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 193 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator/= ( const UnifiedDim Other)
inline

Division assignment operator.

Parameters
OtherThe other UnifiedDim to divide by.
Returns
Returns a reference to this.

Definition at line 173 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator/= ( const Real Other)
inline

Division assignment with Real operator.

Parameters
OtherThe Real to divide by.
Returns
Returns a reference to this.

Definition at line 211 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator= ( const UnifiedDim Other)
inline

Assignment operator.

Parameters
OtherThe other UnifiedDim to be assign values from.
Returns
Returns a reference to this.

Definition at line 242 of file unifieddim.h.

bool Mezzanine::UI::UnifiedDim::operator== ( const UnifiedDim Other) const
inline

Equality comparison operator.

Parameters
OtherThe other UnifiedDim to compare to.
Returns
Returns true if these UnifiedDim's are equal, false otherwise.

Definition at line 224 of file unifieddim.h.

void Mezzanine::UI::UnifiedDim::ProtoDeSerialize ( const XML::Node SelfRoot)
inline

Take the data stored in an XML Node and overwrite this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Definition at line 269 of file unifieddim.h.

void Mezzanine::UI::UnifiedDim::ProtoSerialize ( XML::Node ParentNode) const
inline

Convert this class to an XML::Node ready for serialization.

Parameters
ParentNodeThe point in the XML hierarchy that all this renderable should be appended to.

Definition at line 254 of file unifieddim.h.

void Mezzanine::UI::UnifiedDim::SetValues ( const Real Relative,
const Real Absolute 
)
inline

Sets the values of this dimension.

Parameters
RelativeThe relative portion of this dimension.
AbsoluteThe absolute portion of this dimension.

Definition at line 90 of file unifieddim.h.


The documentation for this class was generated from the following file: