Exemple #1
0
        /// <summary>
        /// creates a FreeTypeFont
        /// </summary>
        /// <param name="attributes"></param>
        private void CreateFreeTypeFont(XMLAttributes attributes)
        {
#if CEGUI_HAS_FREETYPE
            var name           = attributes.GetValueAsString(FontNameAttribute);
            var filename       = attributes.GetValueAsString(FontFilenameAttribute);
            var resource_group = attributes.GetValueAsString(FontResourceGroupAttribute);

            Logger.LogInsane("---- CEGUI font name: " + name);
            Logger.LogInsane("----       Font type: FreeType");
            Logger.LogInsane("----     Source file: " + filename + " in resource group: " +
                             (String.IsNullOrEmpty(resource_group)
                                          ? "(Default)"
                                          : resource_group));
            Logger.LogInsane("---- Real point size: " + attributes.GetValueAsString(FontSizeAttribute, "12"));

            _font = new FreeTypeFont(name,
                                     attributes.GetValueAsFloat(FontSizeAttribute, 12.0f),
                                     attributes.GetValueAsBool(FontAntiAliasedAttribute, true),
                                     filename, resource_group,
                                     PropertyHelper.FromString <AutoScaledMode>(attributes.GetValueAsString(FontAutoScaledAttribute)),
                                     new Sizef(attributes.GetValueAsFloat(FontNativeHorzResAttribute, 640.0f),
                                               attributes.GetValueAsFloat(FontNativeVertResAttribute, 480.0f)),
                                     attributes.GetValueAsFloat(FontLineSpacingAttribute, 0.0f));
#else
            throw new InvalidRequestException("CEGUI was compiled without freetype support.");
#endif
        }
        //! Function that handles the LookNFeel XML element.
        private void elementLookNFeelStart(XMLAttributes attributes)
        {
            var lnf = new Scheme.LoadableUIElement();

            lnf.filename      = attributes.GetValueAsString(FilenameAttribute);
            lnf.resourceGroup = attributes.GetValueAsString(ResourceGroupAttribute);

            d_scheme.d_looknfeels.Add(lnf);
        }
Exemple #3
0
        /// <summary>
        /// Method that handles the Property XML element.
        /// </summary>
        /// <param name="attributes"></param>
        private void ElementPropertyStart(XMLAttributes attributes)
        {
            // get property name
            var propertyName = attributes.GetValueAsString(Property.NameXMLAttributeName);

            // get property value string
            var propertyValue = String.Empty;

            if (attributes.Exists(Property.ValueXMLAttributeName))
            {
                propertyValue = attributes.GetValueAsString(Property.ValueXMLAttributeName);
            }

            // Short property
            if (!String.IsNullOrEmpty(propertyValue))
            {
                d_stringItemName = String.Empty;
                try
                {
                    // need a window to be able to set properties!
                    if (d_stack.Count != 0)
                    {
                        // get current window being defined.
                        var curwindow = d_stack[d_stack.Count - 1].Item1;

                        var useit = true;

                        // if client defined a callback, call it and discover if we should
                        // set the property.
                        if (d_propertyCallback != null)
                        {
                            useit = d_propertyCallback(curwindow,
                                                       propertyName,
                                                       propertyValue,
                                                       d_userData);
                        }
                        // set the property as needed
                        if (useit)
                        {
                            curwindow.SetProperty(propertyName, propertyValue);
                        }
                    }
                }
                catch (Exception)
                {
                    // Don't do anything here, but the error will have been logged.
                }
            }
            // Long property
            else
            {
                // Store name for later use
                d_stringItemName = propertyName;
                // reset the property value buffer
                d_stringItemValue = String.Empty;
            }
        }
        //! Function that handles the Font XML element.
        private void elementFontStart(XMLAttributes attributes)
        {
            var font = new Scheme.LoadableUIElement();

            font.name          = attributes.GetValueAsString(NameAttribute);
            font.filename      = attributes.GetValueAsString(FilenameAttribute);
            font.resourceGroup = attributes.GetValueAsString(ResourceGroupAttribute);

            d_scheme.d_fonts.Add(font);
        }
        //! Function that handles the ImagesetFromImage XML element.
        private void elementImagesetFromImageStart(XMLAttributes attributes)
        {
            var imageset = new Scheme.LoadableUIElement();

            imageset.filename      = attributes.GetValueAsString(FilenameAttribute);
            imageset.name          = attributes.GetValueAsString(NameAttribute, imageset.filename);
            imageset.resourceGroup = attributes.GetValueAsString(ResourceGroupAttribute);

            d_scheme.d_imagesetsFromImages.Add(imageset);
        }
        //! Function that handles the FalagardMapping XML element.
        private void elementFalagardMappingStart(XMLAttributes attributes)
        {
            var fmap = new Scheme.FalagardMapping();

            fmap.windowName   = attributes.GetValueAsString(WindowTypeAttribute);
            fmap.targetName   = attributes.GetValueAsString(TargetTypeAttribute);
            fmap.lookName     = attributes.GetValueAsString(LookNFeelAttribute);
            fmap.rendererName = attributes.GetValueAsString(WindowRendererAttribute);
            fmap.effectName   = attributes.GetValueAsString(RenderEffectAttribute);

            d_scheme.d_falagardMappings.Add(fmap);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="attributes"></param>
        /// <param name="anim"></param>
        public AnimationSubscriptionHandler(XMLAttributes attributes, Animation anim)
        {
            Logger.LogInsane("\tAdding subscription to event: " +
                             attributes.GetValueAsString(EventAttribute) +
                             "  Action: " +
                             attributes.GetValueAsString(ActionAttribute));

            anim.DefineAutoSubscription(attributes.GetValueAsString(EventAttribute),
                                        attributes.GetValueAsString(ActionAttribute));

            d_completed = true;
        }
Exemple #8
0
        /// <summary>
        /// Method that handles the opening Window XML element.
        /// </summary>
        /// <param name="attributes"></param>
        private void ElementWindowStart(XMLAttributes attributes)
        {
            // get type of window to create
            var windowType = attributes.GetValueAsString(Window.WindowTypeXMLAttributeName);

            // get name for new window
            var windowName = attributes.GetValueAsString(Window.WindowNameXMLAttributeName);

            // attempt to create window
            try
            {
                var wnd = WindowManager.GetSingleton().CreateWindow(windowType, windowName);

                // add this window to the current parent (if any)
                if (d_stack.Count != 0)
                {
                    d_stack[d_stack.Count - 1].Item1.AddChild(wnd);
                }
                else
                {
                    d_root = wnd;
                }

                // make this window the top of the stack
                d_stack.Add(new Tuple <Window, bool>(wnd, true));

                // tell it that it is being initialised
                wnd.BeginInitialisation();
            }
            catch (AlreadyExistsException)
            {
                // delete all windows created
                CleanupLoadedWindows();

                // signal error - with more info about what we have done.
                throw new InvalidRequestException("layout loading has been aborted since Window named '" + windowName +
                                                  "' already exists.");
            }
            catch (UnknownObjectException)
            {
                // delete all windows created
                CleanupLoadedWindows();

                // signal error - with more info about what we have done.
                throw new InvalidRequestException(
                          "layout loading has been aborted since no WindowFactory is available for '" + windowType +
                          "' objects.");
            }
        }
Exemple #9
0
        // XML parsing helper functions.
        private void ElementImagesetStart(XMLAttributes attributes)
        {
            // get name of the imageset.
            string name = attributes.GetValueAsString(ImagesetNameAttribute);

            // get name of the imageset.
            s_imagesetType = attributes.GetValueAsString(ImagesetTypeAttribute, ImageTypeAttributeDefault);
            // get texture image filename
            string filename = attributes.GetValueAsString(ImagesetImageFileAttribute);
            // get resource group to use for image file.
            string resource_group = attributes.GetValueAsString(ImagesetResourceGroupAttribute);

            var logger = System.GetSingleton().Logger;

            logger.LogEvent("[ImageManager] Started creation of Imageset from XML specification:");
            logger.LogEvent("[ImageManager] ---- CEGUI Imageset name: " + name);
            logger.LogEvent("[ImageManager] ---- Source texture file: " + filename);
            logger.LogEvent("[ImageManager] ---- Source texture resource group: " +
                            (String.IsNullOrEmpty(resource_group) ? "(Default)" : resource_group));

            ValidateImagesetFileVersion(attributes);

            var renderer = System.GetSingleton().GetRenderer();

            // if the texture already exists,
            if (renderer.IsTextureDefined(name))
            {
                System.GetSingleton().Logger
                .LogEvent("[ImageManager] WARNING: Using existing texture: " + name);
                s_texture = renderer.GetTexture(name);
            }
            else
            {
                // create texture from image
                s_texture = renderer.CreateTexture(name, filename,
                                                   String.IsNullOrEmpty(resource_group)
                                                       ? d_imagesetDefaultResourceGroup
                                                       : resource_group);
            }

            // set native resolution for imageset
            s_nativeResolution = new Sizef(attributes.GetValueAsFloat(ImagesetNativeHorzResAttribute, 640),
                                           attributes.GetValueAsFloat(ImagesetNativeVertResAttribute, 480));

            // set auto-scaling as needed
            s_autoScaled =
                PropertyHelper.FromString <AutoScaledMode>(attributes.GetValueAsString(ImagesetAutoScaledAttribute,
                                                                                       "false"));
        }
Exemple #10
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="attributes"></param>
 public BitmapImage(XMLAttributes attributes)
     : this(attributes.GetValueAsString(ImageNameAttribute),
            System.GetSingleton().GetRenderer()
            .GetTexture(attributes.GetValueAsString(ImageTextureAttribute)),
            new Rectf(new Lunatics.Mathematics.Vector2(attributes.GetValueAsInteger(ImageXPosAttribute),
                                                       attributes.GetValueAsInteger(ImageYPosAttribute)),
                      new Sizef(attributes.GetValueAsInteger(ImageWidthAttribute),
                                attributes.GetValueAsInteger(ImageHeightAttribute))),
            new Lunatics.Mathematics.Vector2(attributes.GetValueAsInteger(ImageXOffsetAttribute),
                                             attributes.GetValueAsInteger(ImageYOffsetAttribute)),
            PropertyHelper.FromString <AutoScaledMode>(attributes.GetValueAsString(ImageAutoScaledAttribute)),
            new Sizef(attributes.GetValueAsInteger(ImageNativeHorzResAttribute, 640),
                      attributes.GetValueAsInteger(ImageNativeVertResAttribute, 480)))
 {
 }
Exemple #11
0
        /// <summary>
        /// Method that handles the opening AutoWindow XML element.
        /// </summary>
        /// <param name="attributes"></param>
        private void ElementAutoWindowStart(XMLAttributes attributes)
        {
            // get window name
            var name_path = attributes.GetValueAsString(Window.AutoWindowNamePathXMLAttributeName);

            try
            {
                // we need a window to fetch children
                if (d_stack.Count != 0)
                {
                    var wnd = d_stack[d_stack.Count - 1].Item1.GetChild(name_path);
                    // make this window the top of the stack
                    d_stack.Add(new Tuple <Window, bool>(wnd, false));
                }
            }
            catch (UnknownObjectException)
            {
                // delete all windows created
                CleanupLoadedWindows();

                // signal error - with more info about what we have done.
                throw new InvalidRequestException("layout loading has been aborted since auto window '" + name_path +
                                                  "' could not be referenced.");
            }
        }
Exemple #12
0
        private void CreateFntFont(XMLAttributes attributes)
        {
            var name          = attributes.GetValueAsString(FontNameAttribute);
            var filename      = attributes.GetValueAsString(FontFilenameAttribute);
            var resourceGroup = attributes.GetValueAsString(FontResourceGroupAttribute);

            Logger.LogInsane("---- CEGUI font name: " + name);
            Logger.LogInsane("----       Font type: Fnt");
            Logger.LogInsane("----     Source file: " + filename + " in resource group: " + (String.IsNullOrEmpty(resourceGroup) ? "(Default)" : resourceGroup));

            _font = new FntFont(
                name, filename, resourceGroup,
                PropertyHelper.FromString <AutoScaledMode>(attributes.GetValueAsString(FontAutoScaledAttribute)),
                new Sizef(attributes.GetValueAsFloat(FontNativeHorzResAttribute, 640.0f),
                          attributes.GetValueAsFloat(FontNativeVertResAttribute, 480.0f)));
        }
Exemple #13
0
        /// <summary>
        /// handles the opening Font XML element.
        /// </summary>
        /// <param name="attributes"></param>
        private void ElementFontStart(XMLAttributes attributes)
        {
            ValidateFontFileVersion(attributes);

            // get type of font being created
            var fontType = attributes.GetValueAsString(FontTypeAttribute);

            // log the start of font creation.
            Logger.LogInsane("Started creation of Font from XML specification:");

            if (fontType == FontTypeFreeType)
            {
                CreateFreeTypeFont(attributes);
            }
            else if (fontType == FontTypePixmap)
            {
                CreatePixmapFont(attributes);
            }
            else if (fontType == FontTypeFnt)
            {
                CreateFntFont(attributes);
            }
            else
            {
                throw new InvalidRequestException("Encountered unknown font type of '" + fontType + "'");
            }
        }
        public AnimationAffectorHandler(XMLAttributes attributes, Animation anim)
        {
            _affector = null;

            Logger.LogInsane("\tAdding affector for property: " + attributes.GetValueAsString(TargetPropertyAttribute) +
                             "  Interpolator: " + attributes.GetValueAsString(InterpolatorAttribute) +
                             "  Application method: " +
                             attributes.GetValueAsString(ApplicationMethodAttribute, "absolute"));

            _affector = anim.CreateAffector(attributes.GetValueAsString(TargetPropertyAttribute),
                                            attributes.GetValueAsString(InterpolatorAttribute));

            if (attributes.GetValueAsString(ApplicationMethodAttribute) == ApplicationMethodRelative)
            {
                _affector.SetApplicationMethod(Affector.ApplicationMethod.Relative);
            }
            else if (attributes.GetValueAsString(ApplicationMethodAttribute) == ApplicationMethodRelativeMultiply)
            {
                _affector.SetApplicationMethod(Affector.ApplicationMethod.RelativeMultiply);
            }
            else
            {
                _affector.SetApplicationMethod(Affector.ApplicationMethod.Absolute);
            }
        }
Exemple #15
0
        /// <summary>
        /// Method that handles the UserString XML element.
        /// </summary>
        /// <param name="attributes"></param>
        private void ElementUserStringStart(XMLAttributes attributes)
        {
            // Get user string name
            var userStringName = attributes.GetValueAsString(Window.UserStringNameXMLAttributeName);

            // Get user string value
            var userStringValue = String.Empty;

            if (attributes.Exists(Window.UserStringValueXMLAttributeName))
            {
                userStringValue = attributes.GetValueAsString(Window.UserStringValueXMLAttributeName);
            }

            // Short user string
            if (!String.IsNullOrEmpty(userStringValue))
            {
                d_stringItemName = null;
                try
                {
                    // need a window to be able to set properties!
                    if (d_stack.Count != 0)
                    {
                        // get current window being defined.
                        var curwindow = d_stack[d_stack.Count - 1].Item1;

                        curwindow.SetUserString(userStringName, userStringValue);
                    }
                }
                catch (Exception)
                {
                    // Don't do anything here, but the error will have been logged.
                }
            }
            // Long user string
            else
            {
                // Store name for later use
                d_stringItemName = userStringName;
                // reset the property (user string) value buffer
                d_stringItemValue = null;
            }
        }
        //! Function that handles the WindowRendererSet XML element.
        private void elementWindowRendererSetStart(XMLAttributes attributes)
        {
            var module = new Scheme.UIModule
            {
                name          = attributes.GetValueAsString(FilenameAttribute),
                dynamicModule = null,
                factoryModule = null
            };

            d_scheme.d_windowRendererModules.Add(module);
        }
        //! Function that handles the opening GUIScheme XML element.
        private void elementGUISchemeStart(XMLAttributes attributes)
        {
            var name   = attributes.GetValueAsString(NameAttribute);
            var logger = System.GetSingleton().Logger;

            logger.LogEvent("Started creation of Scheme from XML specification:");
            logger.LogEvent("---- CEGUI GUIScheme name: " + name);

            validateSchemeFileVersion(attributes);

            // create empty scheme with desired name
            d_scheme = new Scheme(name);
        }
        //! throw exception if file version is not supported.
        private void validateSchemeFileVersion(XMLAttributes attrs)
        {
            var version = attrs.GetValueAsString(SchemeVersionAttribute, "unknown");

            if (version == NativeVersion)
            {
                return;
            }

            throw new InvalidRequestException("You are attempting to load a GUI scheme of version '" + version +
                                              "' but this CEGUI version is only meant to load GUI schemes of version '" +
                                              NativeVersion + "'. Consider using the migrate.py script bundled with " +
                                              "CEGUI Unified Editor to migrate your data.");
        }
Exemple #19
0
        public const string GuiLayoutVersionAttribute = "version"; //!< Attribute name that stores the xml file version.

        /// <summary>
        /// Method that handles the opening GUILayout XML element.
        /// </summary>
        /// <param name="attributes"></param>
        /// <remarks>
        /// This method just checks the version attribute and there is no equivalent
        /// elementGUILayoutEnd method, because it would be just NOOP anyways
        /// </remarks>
        private void ElementGUILayoutStart(XMLAttributes attributes)
        {
            var version = attributes.GetValueAsString(GuiLayoutVersionAttribute, "unknown");

            if (version != NativeVersion)
            {
                throw new InvalidRequestException(
                          "You are attempting to load a layout of version '" + version +
                          "' but this CEGUI version is only meant to load layouts of " +
                          "version '" + NativeVersion + "'. Consider using the " +
                          "migrate.py script bundled with CEGUI Unified Editor to " +
                          "migrate your data.");
            }
        }
        public AnimationDefinitionHandler(XMLAttributes attributes, string namePrefix)
        {
            _anim = null;

            var animName = namePrefix + attributes.GetValueAsString(NameAttribute);

            Logger.LogInsane(
                "Defining animation named: " +
                animName +
                "  Duration: " +
                attributes.GetValueAsString(DurationAttribute) +
                "  Replay mode: " +
                attributes.GetValueAsString(ReplayModeAttribute) +
                "  Auto start: " +
                attributes.GetValueAsString(AutoStartAttribute, "false"));

            _anim = AnimationManager.GetSingleton().CreateAnimation(animName);

            _anim.SetDuration(attributes.GetValueAsFloat(DurationAttribute));

            var replayMode = attributes.GetValueAsString(ReplayModeAttribute, ReplayModeLoop);

            if (replayMode == ReplayModeOnce)
            {
                _anim.SetReplayMode(Animation.ReplayMode.Once);
            }
            else if (replayMode == ReplayModeBounce)
            {
                _anim.SetReplayMode(Animation.ReplayMode.Bounce);
            }
            else
            {
                _anim.SetReplayMode(Animation.ReplayMode.Loop);
            }

            _anim.SetAutoStart(attributes.GetValueAsBool(AutoStartAttribute));
        }
Exemple #21
0
        /// <summary>
        /// throw exception if file version is not supported.
        /// </summary>
        /// <param name="attrs"></param>
        private void ValidateFontFileVersion(XMLAttributes attrs)
        {
            string version = (attrs.GetValueAsString(FontVersionAttribute, "unknown"));

            if (version == NativeVersion)
            {
                return;
            }

            throw new InvalidRequestException(
                      "You are attempting to load a font of version '" + version + "' but " +
                      "this CEGUI version is only meant to load fonts of version '" +
                      NativeVersion + "'. Consider using the migrate.py script bundled with " +
                      "CEGUI Unified Editor to migrate your data.");
        }
        public AnimationKeyFrameHandler(XMLAttributes attributes, Affector affector)
        {
            //throw new NotImplementedException();
            var progressionStr = attributes.GetValueAsString(ProgressionAttribute);

            var logEvent = new StringBuilder("\t\tAdding KeyFrame at position: " +
                                             attributes.GetValueAsString(PositionAttribute) +
                                             "  Value: " +
                                             attributes.GetValueAsString(ValueAttribute));

            if (!string.IsNullOrEmpty(progressionStr))
            {
                logEvent.Append("  Progression: " + attributes.GetValueAsString(ProgressionAttribute, ProgressionLinear));
            }

            Logger.LogInsane(logEvent.ToString());

            KeyFrame.Progression progression;
            if (progressionStr == ProgressionDiscrete)
            {
                progression = KeyFrame.Progression.Discrete;
            }
            else if (progressionStr == ProgressionQuadraticAccelerating)
            {
                progression = KeyFrame.Progression.QuadraticAccelerating;
            }
            else if (progressionStr == ProgressionQuadraticDecelerating)
            {
                progression = KeyFrame.Progression.QuadraticDecelerating;
            }
            else
            {
                progression = KeyFrame.Progression.Linear;
            }

            affector.CreateKeyFrame(
                attributes.GetValueAsFloat(PositionAttribute),
                attributes.GetValueAsString(ValueAttribute),
                progression,
                attributes.GetValueAsString(SourcePropertyAttribute));

            if (affector.GetNumKeyFrames() == 1 && !string.IsNullOrEmpty(progressionStr))
            {
                System.GetSingleton().Logger
                .LogEvent("WARNING: progression type specified for first keyframe in animation will be ignored.");
            }

            d_completed = true;
        }
Exemple #23
0
        public Image Create(XMLAttributes attributes)
        {
            var name = attributes.GetValueAsString(ImageNameAttribute);

            if (String.IsNullOrEmpty(name))
            {
                throw new InvalidRequestException("Invalid (empty) image name passed to create.");
            }

            if (d_images.ContainsKey(name))
            {
                throw new AlreadyExistsException("Image already exists: " + name);
            }

            if (!d_factories.ContainsKey(s_imagesetType))
            {
                throw new UnknownObjectException("Unknown Image type: " + s_imagesetType);
            }

            var factory = d_factories[s_imagesetType];
            var image   = factory.Create(attributes);

            // sanity check that the created image uses the name specified in the
            // attributes block
            if (image.GetName() != name)
            {
                var message = "Factory for type: " + s_imagesetType + " created Image named: " + image.GetName() +
                              ".  Was expecting name: " + name;

                factory.Destroy(image);

                throw new InvalidRequestException(message);
            }

            d_images[name] = new Tuple <Image, ImageFactory>(image, factory);

            System.GetSingleton().Logger
            .LogEvent(String.Format("[ImageManager] Created image: '{0}' (0x{1:X8}) of type: {2}", name, image.GetHashCode(), s_imagesetType));

            return(image);
        }
Exemple #24
0
        private void ElementImageStart(XMLAttributes attributes)
        {
            var image_name = s_texture.GetName() + '/' + attributes.GetValueAsString(ImageNameAttribute);

            if (IsDefined(image_name))
            {
                System.GetSingleton().Logger.LogEvent("[ImageManager] WARNING: Using existing image :" + image_name);
                return;
            }

            XMLAttributes rwAttrs = attributes;

            // rewrite the name attribute to include the texture name
            rwAttrs.Add(ImageNameAttribute, image_name);

            if (!rwAttrs.Exists(ImageTextureAttribute))
            {
                rwAttrs.Add(ImageTextureAttribute, s_texture.GetName());
            }

            if (!rwAttrs.Exists(ImagesetAutoScaledAttribute))
            {
                rwAttrs.Add(ImagesetAutoScaledAttribute, s_autoScaled.ToString());
            }

            if (!rwAttrs.Exists(ImagesetNativeHorzResAttribute))
            {
                rwAttrs.Add(ImagesetNativeHorzResAttribute,
                            s_nativeResolution.Width.ToString(CultureInfo.InvariantCulture));
            }

            if (!rwAttrs.Exists(ImagesetNativeVertResAttribute))
            {
                rwAttrs.Add(ImagesetNativeVertResAttribute,
                            s_nativeResolution.Height.ToString(CultureInfo.InvariantCulture));
            }

            DeleteChaniedHandler = false;
            ChainedHandler       = Create(rwAttrs);
        }
Exemple #25
0
        /// <summary>
        /// handles the opening Mapping XML element.
        /// </summary>
        /// <param name="attributes"></param>
        private void ElementMappingStart(XMLAttributes attributes)
        {
            if (_font == null)
            {
                throw new InvalidRequestException("Attempt to access null object.");
            }

            // double-check font type just in case - report issues as 'soft' errors
            if (_font.GetTypeName() != FontTypePixmap)
            {
                System.GetSingleton().Logger.LogEvent(
                    "Imageset_xmlHandler::elementMappingStart: <Mapping> element is " +
                    "only valid for Pixmap type fonts.", LoggingLevel.Errors);
            }
            else
            {
                ((PixmapFont)_font).DefineMapping(
                    (char)attributes.GetValueAsInteger(MappingCodepointAttribute),
                    attributes.GetValueAsString(MappingImageAttribute),
                    attributes.GetValueAsFloat(MappingHorzAdvanceAttribute, -1.0f));
            }
        }
 //! Function that handles the WindowFactory XML element.
 private void elementWindowFactoryStart(XMLAttributes attributes)
 {
     d_scheme.d_widgetModules[d_scheme.d_widgetModules.Count - 1].types.Add(attributes.GetValueAsString(NameAttribute));
 }