27#ifndef _CEGUIFalDimensions_h_
28#define _CEGUIFalDimensions_h_
34#include "../XMLSerializer.h"
102 const Font* font)
const;
151 float getValueImpl(
const float lval,
const float rval)
const;
534 const Font* font)
const;
546 const Font* getFontObject(
const Window& window)
const;
762 const Font* font)
const;
903 String d_namedAreaSourceLook;
Dimension type that represents an absolute pixel value. Implements BaseDim interface.
Definition Dimensions.h:168
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
void writeXMLElementName_impl(XMLSerializer &xml_stream) const
Implementataion method to output real xml element name.
float getBaseValue() const
Get the current value of the AbsoluteDim.
float getValue(const Window &wnd) const
Return a value that represents this dimension as absolute pixels.
BaseDim * clone() const
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
float getValue(const Window &wnd, const Rectf &container) const
Return a value that represents this dimension as absolute pixels.
void setBaseValue(float val)
Set the current value of the AbsoluteDim.
Definition MemoryAllocatedObject.h:110
Abstract interface for a generic 'dimension' class.
Definition Dimensions.h:42
virtual float getValue(const Window &wnd) const =0
Return a value that represents this dimension as absolute pixels.
virtual float getValue(const Window &wnd, const Rectf &container) const =0
Return a value that represents this dimension as absolute pixels.
virtual BaseDim * clone() const =0
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
virtual bool handleFontRenderSizeChange(Window &window, const Font *font) const
perform any processing required due to the given font having changed.
virtual void writeXMLToStream(XMLSerializer &xml_stream) const
Writes an xml representation of this BaseDim to out_stream.
virtual void writeXMLElementName_impl(XMLSerializer &xml_stream) const =0
Implementataion method to output real xml element name.
virtual void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const =0
Implementataion method to create the element attributes.
Class that represents a target area for a widget or imagery component.
Definition Dimensions.h:782
void setNamedAreaSouce(const String &widget_look, const String &area_name)
Set the named area source of the ComponentArea.
bool isAreaFetchedFromProperty() const
Return whether this ComponentArea fetches it's area via a property on the target window.
bool isAreaFetchedFromNamedArea() const
Return whether this ComponentArea fetches it's area via a named area defined.
Dimension d_left
Left edge of the area.
Definition Dimensions.h:891
bool handleFontRenderSizeChange(Window &window, const Font *font) const
perform any processing required due to the given font having changed.
void writeXMLToStream(XMLSerializer &xml_stream) const
Writes an xml representation of this ComponentArea to out_stream.
const String & getNamedAreaSourceLook() const
Return the name of the look to which the NamedArea, which is defined as source, belongs to.
Dimension d_right_or_width
Either the right edge or the width of the area.
Definition Dimensions.h:895
Rectf getPixelRect(const Window &wnd, const Rectf &container) const
Return a Rectd describing the absolute pixel area represented by this ComponentArea.
void setAreaPropertySource(const String &property)
Set the name of the property that will be used to determine the pixel area for this ComponentArea.
const String & getAreaPropertySource() const
Return the name of the property that will be used to determine the pixel area for this ComponentArea.
Dimension d_top
Top edge of the area.
Definition Dimensions.h:893
Rectf getPixelRect(const Window &wnd) const
Return a Rect describing the absolute pixel area represented by this ComponentArea.
Dimension d_bottom_or_height
Either the bototm edge or the height of the area.
Definition Dimensions.h:897
Class representing some kind of dimension.
Definition Dimensions.h:695
const BaseDim & getBaseDimension() const
return the BaseDim object currently used as the value for this Dimension.
void writeXMLToStream(XMLSerializer &xml_stream) const
Writes an xml representation of this Dimension to out_stream.
void setDimensionType(DimensionType type)
Sets what this Dimension represents.
DimensionType getDimensionType() const
Return a DimensionType value indicating what this Dimension represents.
Dimension(const BaseDim &dim, DimensionType type)
Constructor.
void setBaseDimension(const BaseDim &dim)
set the current value for this Dimension.
bool handleFontRenderSizeChange(Window &window, const Font *font) const
perform any processing required due to the given font having changed.
Dimension type that represents some metric of a Font. Implements BaseDim interface.
Definition Dimensions.h:472
const String & getText() const
Get the current text of the FontDim.
const String & getFont() const
Get the current font of the FontDim.
float getValue(const Window &wnd, const Rectf &container) const
Return a value that represents this dimension as absolute pixels.
float getPadding() const
Get the current padding of the FontDim.
float getValue(const Window &wnd) const
Return a value that represents this dimension as absolute pixels.
void writeXMLElementName_impl(XMLSerializer &xml_stream) const
Implementataion method to output real xml element name.
void setText(const String &text)
Set the current text of the FontDim.
FontMetricType getMetric() const
Get the current metric of the FontDim.
void setFont(const String &font)
Set the current font of the FontDim.
void setPadding(float padding)
Set the current padding of the FontDim.
FontDim(const String &name, const String &font, const String &text, FontMetricType metric, float padding=0)
Constructor.
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
bool handleFontRenderSizeChange(Window &window, const Font *font) const
perform any processing required due to the given font having changed.
BaseDim * clone() const
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
void setMetric(FontMetricType metric)
Set the current metric of the FontDim.
const String & getName() const
Get the current name of the FontDim.
void setName(const String &name)
Set the current name of the FontDim.
Class that encapsulates a typeface.
Definition Font.h:62
Dimension type that represents some dimension of an Image. Implements BaseDim interface.
Definition Dimensions.h:200
ImageDimBase(DimensionType dim)
Constructor.
DimensionType getSourceDimension() const
Gets the source dimension type for this WidgetDim.
virtual const Image * getSourceImage(const Window &wnd) const =0
return the image instance to access
void setSourceDimension(DimensionType dim)
Sets the source dimension type for this ImageDim.
float getValue(const Window &wnd) const
Return a value that represents this dimension as absolute pixels.
float getValue(const Window &wnd, const Rectf &container) const
Return a value that represents this dimension as absolute pixels.
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
DimensionType d_what
the dimension of the image that we are to represent.
Definition Dimensions.h:246
ImageDimBase subclass that accesses an image by its name.
Definition Dimensions.h:251
void setSourceImage(const String &image_name)
set the name of the image accessed by this ImageDim.
const String & getSourceImage() const
return the name of the image accessed by this ImageDim.
const Image * getSourceImage(const Window &wnd) const
return the image instance to access
void writeXMLElementName_impl(XMLSerializer &xml_stream) const
Implementataion method to output real xml element name.
String d_imageName
name of the Image.
Definition Dimensions.h:271
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
BaseDim * clone() const
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
ImageDimBase subclass that accesses an image fetched via a property.
Definition Dimensions.h:276
void writeXMLElementName_impl(XMLSerializer &xml_stream) const
Implementataion method to output real xml element name.
ImagePropertyDim(const String &property_name, DimensionType dim)
Constructor.
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
void setSourceProperty(const String &property_name)
set the name of the property accessed by this ImagePropertyDim.
BaseDim * clone() const
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
const Image * getSourceImage(const Window &wnd) const
return the image instance to access
String d_propertyName
name of the property from which to fetch the image name.
Definition Dimensions.h:310
const String & getSourceProperty() const
return the name of the property accessed by this ImagePropertyDim.
Interface for Image.
Definition Image.h:161
Dimension type that represents the result of an operation performed on two other dimension values....
Definition Dimensions.h:117
void writeXMLElementName_impl(XMLSerializer &xml_stream) const
Implementataion method to output real xml element name.
void setOperator(DimensionOperator op)
Set the operation to be performed.
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
BaseDim * getRightOperand() const
return pointer to the right hand side operand
void setNextOperand(const BaseDim *operand)
helper to set the next free operand, will throw after 2 are set
void writeXMLToStream(XMLSerializer &xml_stream) const
Writes an xml representation of this BaseDim to out_stream.
float getValue(const Window &wnd) const
Return a value that represents this dimension as absolute pixels.
float getValue(const Window &wnd, const Rectf &container) const
Return a value that represents this dimension as absolute pixels.
BaseDim * clone() const
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
void setRightOperand(const BaseDim *operand)
set the right hand side operand (passed object is cloned)
void setLeftOperand(const BaseDim *operand)
set the left hand side operand (passed object is cloned)
DimensionOperator getOperator() const
Get the current operation that will be performed.
BaseDim * getLeftOperand() const
return pointer to the left hand side operand
Dimension type that represents the value of a Window property. Implements BaseDim interface.
Definition Dimensions.h:567
BaseDim * clone() const
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
void setPropertyName(const String &property)
Set the name of the property to use for this WidgetDim.
float getValue(const Window &wnd, const Rectf &container) const
Return a value that represents this dimension as absolute pixels.
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
void writeXMLElementName_impl(XMLSerializer &xml_stream) const
Implementataion method to output real xml element name.
DimensionType getSourceDimension() const
Gets the source dimension type for this WidgetDim.
void setWidgetName(const String &name)
Set the name suffix to use for this WidgetDim.
const String & getPropertyName() const
Get the name of the property to use for this WidgetDim.
float getValue(const Window &wnd) const
Return a value that represents this dimension as absolute pixels.
const String & getWidgetName() const
Get the name suffix to use for this WidgetDim.
void setSourceDimension(DimensionType dim)
Sets the source dimension type for this WidgetDim.
PropertyDim(const String &name, const String &property, DimensionType type)
Constructor.
String class used within the GUI system.
Definition String.h:64
Dimension that has both a relative 'scale' portion and and absolute 'offset' portion.
Definition UDim.h:94
Dimension type that represents an Unified dimension. Implements BaseDim interface.
Definition Dimensions.h:404
float getValue(const Window &wnd) const
Return a value that represents this dimension as absolute pixels.
BaseDim * clone() const
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
void setBaseValue(const UDim &val)
Set the current value of the UnifiedDim.
float getValue(const Window &wnd, const Rectf &container) const
Return a value that represents this dimension as absolute pixels.
void writeXMLElementAttributes_impl(XMLSerializer &xml_stream) const
Implementataion method to create the element attributes.
void setSourceDimension(DimensionType dim)
Sets the source dimension type for this WidgetDim.
UnifiedDim(const UDim &value, DimensionType dim)
Constructor.
void writeXMLElementName_impl(XMLSerializer &xml_stream) const
Implementataion method to output real xml element name.
DimensionType getSourceDimension() const
Gets the source dimension type for this WidgetDim.
const UDim & getBaseValue() const
Get the current value of the UnifiedDim.
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition Window.h:151
Class used to create XML Document.
Definition XMLSerializer.h:87
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1
DimensionOperator
Enumeration of values representing mathematical operations on dimensions.
Definition Enums.h:123
DimensionType
Enumeration of possible values to indicate what a given dimension represents.
Definition Enums.h:40
FontMetricType
Enumeration of possible values to indicate a particular font metric.
Definition Enums.h:112