|
| | PixmapFont (const String &font_name, const String &imageset_filename, const String &resource_group="", const AutoScaledMode auto_scaled=ASM_Disabled, const Sizef &native_res=Sizef(640.0f, 480.0f)) |
| | Constructor for Pixmap type fonts. More...
|
| |
|
| ~PixmapFont () |
| | Destructor.
|
| |
|
void | defineMapping (const utf32 codepoint, const String &image_name, const float horz_advance) |
| |
|
void | defineMapping (const String &value) |
| |
|
const String & | getImageNamePrefix () const |
| | Return the image name prefix that the font is using for it's glyphs.
|
| |
| void | setImageNamePrefix (const String &name_prefix) |
| | Set image name prefix font should use for it's glyphs. More...
|
| |
|
virtual | ~Font () |
| | Destructor.
|
| |
|
const String & | getName () const |
| | Return the string holding the font name.
|
| |
|
const String & | getTypeName () const |
| | Return the type of the font.
|
| |
|
const String & | getFileName () const |
| | Return the filename of the used font.
|
| |
| bool | isCodepointAvailable (utf32 cp) const |
| | Return whether this Font can draw the specified code-point. More...
|
| |
| float | drawText (GeometryBuffer &buffer, const String &text, const Vector2f &position, const Rectf *clip_rect, const ColourRect &colours, const float space_extra=0.0f, const float x_scale=1.0f, const float y_scale=1.0f) const |
| | Draw text into a specified area of the display. More...
|
| |
| void | setNativeResolution (const Sizef &size) |
| | Set the native resolution for this Font. More...
|
| |
| const Sizef & | getNativeResolution () const |
| | Return the native display size for this Font. This is only relevant if the Font is being auto-scaled. More...
|
| |
| void | setAutoScaled (const AutoScaledMode auto_scaled) |
| | Enable or disable auto-scaling for this Font. More...
|
| |
| AutoScaledMode | getAutoScaled () const |
| | Checks whether this font is being auto-scaled and how. More...
|
| |
| virtual void | notifyDisplaySizeChanged (const Sizef &size) |
| | Notify the Font that the display size may have changed. More...
|
| |
| float | getLineSpacing (float y_scale=1.0f) const |
| | Return the pixel line spacing value for. More...
|
| |
| float | getFontHeight (float y_scale=1.0f) const |
| | return the exact pixel height of the font. More...
|
| |
| float | getBaseline (float y_scale=1.0f) const |
| | Return the number of pixels from the top of the highest glyph to the baseline. More...
|
| |
| float | getTextExtent (const String &text, float x_scale=1.0f) const |
| | Return the pixel width of the specified text if rendered with this Font. More...
|
| |
| float | getTextAdvance (const String &text, float x_scale=1.0f) const |
| | Return pixel advance of the specified text when rendered with this Font. More...
|
| |
| size_t | getCharAtPixel (const String &text, float pixel, float x_scale=1.0f) const |
| | Return the index of the closest text character in String text that corresponds to pixel location pixel if the text were rendered. More...
|
| |
| size_t | getCharAtPixel (const String &text, size_t start_char, float pixel, float x_scale=1.0f) const |
| | Return the index of the closest text character in String text, starting at character index start_char, that corresponds to pixel location pixel if the text were to be rendered. More...
|
| |
| void | writeXMLToStream (XMLSerializer &xml_stream) const |
| | Writes an xml representation of this Font to out_stream. More...
|
| |
| const FontGlyph * | getGlyphData (utf32 codepoint) const |
| | Return a pointer to the glyphDat struct for the given codepoint, or 0 if the codepoint does not have a glyph defined. More...
|
| |
|
| PropertySet (void) |
| | Constructs a new PropertySet object.
|
| |
|
virtual | ~PropertySet (void) |
| | Destructor for PropertySet objects.
|
| |
| void | addProperty (Property *property) |
| | Adds a new Property to the PropertySet. More...
|
| |
| void | removeProperty (const String &name) |
| | Removes a Property from the PropertySet. More...
|
| |
| Property * | getPropertyInstance (const String &name) const |
| | Retrieves a property instance (that was previously added) More...
|
| |
|
void | clearProperties (void) |
| | Removes all Property objects from the PropertySet.
|
| |
| bool | isPropertyPresent (const String &name) const |
| | Checks to see if a Property with the given name is in the PropertySet. More...
|
| |
| const String & | getPropertyHelp (const String &name) const |
| | Return the help text for the specified Property. More...
|
| |
| String | getProperty (const String &name) const |
| | Gets the current value of the specified Property. More...
|
| |
| template<typename T > |
| PropertyHelper< T >::return_type | getProperty (const String &name) const |
| | Gets the current value of the specified Property. More...
|
| |
| void | setProperty (const String &name, const String &value) |
| | Sets the current value of a Property. More...
|
| |
| template<typename T > |
| void | setProperty (const String &name, typename PropertyHelper< T >::pass_type value) |
| | Sets the current value of a Property. More...
|
| |
| bool | isPropertyDefault (const String &name) const |
| | Returns whether a Property is at it's default value. More...
|
| |
| String | getPropertyDefault (const String &name) const |
| | Returns the default value of a Property as a String. More...
|
| |
|
PropertyIterator | getPropertyIterator (void) const |
| | Return a PropertySet::PropertyIterator object to iterate over the available Properties.
|
| |
|
| EventSet () |
| | Constructor for EventSet objects.
|
| |
|
virtual | ~EventSet (void) |
| | Destructor for EventSet objects.
|
| |
| void | addEvent (const String &name) |
| | Creates a new Event object with the given name and adds it to the EventSet. More...
|
| |
| void | addEvent (Event &event) |
| | Adds the given Event object to the EventSet. Ownership of the object passes to EventSet and it will be deleted when it is removed from the EventSet - whether explicitly via removeEvent or when the EventSet is destroyed. More...
|
| |
| void | removeEvent (const String &name) |
| | Removes the Event with the given name. All connections to the event are disconnected, and the underlying Event object is destroyed. More...
|
| |
| void | removeEvent (Event &event) |
| | Removes the given event from the EventSet. All connections to the event are disconnected, and the event object is destroyed. More...
|
| |
|
void | removeAllEvents (void) |
| | Remove all Event objects from the EventSet. Add connections will be disconnected, and all Event objects destroyed.
|
| |
| bool | isEventPresent (const String &name) |
| | Checks to see if an Event with the given name is present in this EventSet. More...
|
| |
| virtual Event::Connection | subscribeEvent (const String &name, Event::Subscriber subscriber) |
| | Subscribes a handler to the named Event. If the named Event is not yet present in the EventSet, it is created and added. More...
|
| |
| virtual Event::Connection | subscribeEvent (const String &name, Event::Group group, Event::Subscriber subscriber) |
| | Subscribes a handler to the specified group of the named Event. If the named Event is not yet present in the EventSet, it is created and added. More...
|
| |
| template<typename Arg1 , typename Arg2 > |
| Event::Connection | subscribeEvent (const String &name, Arg1 arg1, Arg2 arg2) |
| | Subscribes a handler to the named Event. If the named Event is not yet present in the EventSet, it is created and added. More...
|
| |
| template<typename Arg1 , typename Arg2 > |
| Event::Connection | subscribeEvent (const String &name, Event::Group group, Arg1 arg1, Arg2 arg2) |
| | Subscribes a handler to the named Event. If the named Event is not yet present in the EventSet, it is created and added. More...
|
| |
| virtual Event::Connection | subscribeScriptedEvent (const String &name, const String &subscriber_name) |
| | Subscribes the named Event to a scripted funtion. More...
|
| |
| virtual Event::Connection | subscribeScriptedEvent (const String &name, Event::Group group, const String &subscriber_name) |
| | Subscribes the specified group of the named Event to a scripted funtion. More...
|
| |
| virtual void | fireEvent (const String &name, EventArgs &args, const String &eventNamespace="") |
| | Fires the named event passing the given EventArgs object. More...
|
| |
| bool | isMuted (void) const |
| | Return whether the EventSet is muted or not. More...
|
| |
| void | setMutedState (bool setting) |
| | Set the mute state for this EventSet. More...
|
| |
| Event * | getEventObject (const String &name, bool autoAdd=false) |
| | Return a pointer to the Event object with the given name, optionally adding such an Event object to the EventSet if it does not already exist. More...
|
| |
|
EventIterator | getEventIterator (void) const |
| | Return a EventSet::EventIterator object to iterate over the events currently added to the EventSet.
|
| |
|
|
void | reinit () |
| | Initialize the imageset.
|
| |
|
void | addPixmapFontProperties () |
| | Register all properties of this class.
|
| |
|
void | updateFont () |
| | Update the font as needed, according to the current parameters.
|
| |
|
void | writeXMLToStream_impl (XMLSerializer &xml_stream) const |
| | implementaion version of writeXMLToStream.
|
| |
|
| Font (const String &name, const String &type_name, const String &filename, const String &resource_group, const AutoScaledMode auto_scaled, const Sizef &native_res) |
| | Constructor.
|
| |
| virtual void | rasterise (utf32 start_codepoint, utf32 end_codepoint) const |
| | This function prepares a certain range of glyphs to be ready for displaying. This means that after returning from this function glyphs from d_cp_map[start_codepoint] to d_cp_map[end_codepoint] should have their d_image member set. If there is an error during rasterisation of some glyph, it's okay to leave the d_image field set to NULL, in which case such glyphs will be skipped from display. More...
|
| |
|
void | addFontProperties () |
| | Register all properties of this class.
|
| |
|
virtual void | onRenderSizeChanged (FontEventArgs &args) |
| | event trigger function for when the font rendering size changes.
|
| |
|
void | setMaxCodepoint (utf32 codepoint) |
| | Set the maximal glyph index. This reserves the respective number of bits in the d_glyphPageLoaded array.
|
| |
|
virtual const FontGlyph * | findFontGlyph (const utf32 codepoint) const |
| | finds FontGlyph in map and returns it, or 0 if none.
|
| |
|
void | fireEvent_impl (const String &name, EventArgs &args) |
| | Implementation event firing member.
|
| |
|
ScriptModule * | getScriptModule () const |
| | Helper to return the script module pointer or throw.
|
| |
|
| EventSet (EventSet &) |
| |
| | EventSet (const EventSet &) |
| |
|
EventSet & | operator= (EventSet &) |
| |
| EventSet & | operator= (const EventSet &) |
| |
Implementation of the Font class interface using static Imageset's.
To create such a font you must create a Imageset with all the glyphs, and then define individual glyphs via defineMapping.