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