예제 #1
0
//----------------------------------------------------------------------------//
void PixmapFont::addPixmapFontProperties ()
{
    const String propertyOrigin("PixmapFont");

    CEGUI_DEFINE_PROPERTY(PixmapFont, String,
        "ImageNamePrefix",
        "This is the name prefix used by the images that contain the glyph "
        "imagery for this font.",
        &PixmapFont::setImageNamePrefix, &PixmapFont::getImageNamePrefix, ""
    );

    CEGUI_DEFINE_PROPERTY(PixmapFont, String,
        "Mapping",
        "This is the glyph-to-image mapping font property. It cannot be read. "
        "Format is: codepoint,advance,imagename",
        &PixmapFont::defineMapping, 0, ""
    );
}
예제 #2
0
//----------------------------------------------------------------------------//
void GridLayoutContainer::addGridLayoutContainerProperties(void)
{
    const String& propertyOrigin = WidgetTypeName;

    CEGUI_DEFINE_PROPERTY(GridLayoutContainer, Sizef,
        "GridSize", "Size of the grid of this layout container. "
        "Value uses the 'w:# h:#' format and will be rounded up because "
        "only integer values are valid as grid size.",
        &GridLayoutContainer::setGrid, &GridLayoutContainer::getGrid, Sizef::zero()
    );
    
    CEGUI_DEFINE_PROPERTY(GridLayoutContainer, AutoPositioning,
        "AutoPositioning", "Sets the method used for auto positioning. "
        "Possible values: 'Disabled', 'Left to Right', 'Top to Bottom'.",
        &GridLayoutContainer::setAutoPositioning, &GridLayoutContainer::getAutoPositioning, GridLayoutContainer::AP_LeftToRight
    );

}
예제 #3
0
void Editbox::addEditboxProperties()
{
    const String& propertyOrigin = WidgetTypeName;

    CEGUI_DEFINE_PROPERTY(Editbox, String,
          "ValidationString","Property to get/set the validation string Editbox.  Value is a text string.",
          &Editbox::setValidationString, &Editbox::getValidationString, ".*"
    );
}
예제 #4
0
//----------------------------------------------------------------------------//
void RadioButton::addRadioButtonProperties(void)
{
    const String& propertyOrigin(WidgetTypeName);

    CEGUI_DEFINE_PROPERTY(RadioButton, std::uint32_t,
        "GroupID",
        "Property to access the radio button group ID. "
        "Value is an unsigned integer number.",
        &RadioButton::setGroupID, &RadioButton::getGroupID, 0
    );
}
예제 #5
0
//----------------------------------------------------------------------------//
void Font::addFontProperties()
{
    const String propertyOrigin("Font");

    CEGUI_DEFINE_PROPERTY(Font, Sizef,
        "NativeRes", "Native screen resolution for this font."
        "Value uses the 'w:# h:#' format.",
        &Font::setNativeResolution, &Font::getNativeResolution, Sizef::zero()
    );

    CEGUI_DEFINE_PROPERTY(Font, String,
        "Name", "This is font name.  Value is a string.",
        0, &Font::getName, ""
    );

    CEGUI_DEFINE_PROPERTY(Font, AutoScaledMode,
        "AutoScaled", "This indicating whether and how to autoscale font depending on "
        "resolution.  Value can be 'false', 'vertical', 'horizontal' or 'true'.",
        &Font::setAutoScaled, &Font::getAutoScaled, ASM_Disabled
    );
}
예제 #6
0
/*************************************************************************
Add MenuItem specific properties
*************************************************************************/
void MenuItem::addMenuItemProperties(void)
{
    const String& propertyOrigin = WidgetTypeName;

    CEGUI_DEFINE_PROPERTY(MenuItem, UVector2,
                          "PopupOffset","Property to specify an offset for the popup menu position. Value is a UVector2 property value.",
                          &MenuItem::setPopupOffset, &MenuItem::getPopupOffset, UVector2::zero()
                         );

    CEGUI_DEFINE_PROPERTY(MenuItem, float,
                          "AutoPopupTimeout","Property to specify the time, which has to elapse before the popup window is opened/closed if the hovering state changes. Value is a float property value.",
                          &MenuItem::setAutoPopupTimeout, &MenuItem::getAutoPopupTimeout, 0.0f
                         );
}
예제 #7
0
//----------------------------------------------------------------------------//
void Element::addElementProperties()
{
    const String propertyOrigin("Element");

    CEGUI_DEFINE_PROPERTY(Element, URect,
        "Area", "Property to get/set the unified area rectangle. Value is a \"URect\".",
        &Element::setArea, &Element::getArea, URect(UDim(0, 0), UDim(0, 0), UDim(0, 0), UDim(0, 0))
    );

    CEGUI_DEFINE_PROPERTY_NO_XML(Element, UVector2,
        "Position", "Property to get/set the unified position. Value is a \"UVector2\".",
        &Element::setPosition, &Element::getPosition, UVector2(UDim(0, 0), UDim(0, 0))
    );

    CEGUI_DEFINE_PROPERTY(Element, VerticalAlignment,
        "VerticalAlignment", "Property to get/set the vertical alignment.  Value is one of \"Top\", \"Centre\" or \"Bottom\".",
        &Element::setVerticalAlignment, &Element::getVerticalAlignment, VA_TOP
    );

    CEGUI_DEFINE_PROPERTY(Element, HorizontalAlignment,
        "HorizontalAlignment", "Property to get/set the horizontal alignment.  Value is one of \"Left\", \"Centre\" or \"Right\".",
        &Element::setHorizontalAlignment, &Element::getHorizontalAlignment, HA_LEFT
    );

    CEGUI_DEFINE_PROPERTY_NO_XML(Element, USize,
        "Size", "Property to get/set the unified size. Value is a \"USize\".",
        &Element::setSize, &Element::getSize, USize(UDim(0, 0), UDim(0, 0))
    );

    CEGUI_DEFINE_PROPERTY(Element, USize,
        "MinSize", "Property to get/set the unified minimum size. Value is a \"USize\".",
        &Element::setMinSize, &Element::getMinSize, USize(UDim(0, 0), UDim(0, 0))
    );

    CEGUI_DEFINE_PROPERTY(Element, USize, "MaxSize",
        "Property to get/set the unified maximum size. Value is a \"USize\". "
        "Note that zero means no maximum size.",
        &Element::setMaxSize, &Element::getMaxSize, USize(UDim(0, 0), UDim(0, 0))
    );

    CEGUI_DEFINE_PROPERTY(Element, AspectMode,
        "AspectMode", "Property to get/set the 'aspect mode' setting. Value is either \"Ignore\", \"Shrink\" or \"Expand\".",
        &Element::setAspectMode, &Element::getAspectMode, AM_IGNORE
    );

    CEGUI_DEFINE_PROPERTY(Element, float,
        "AspectRatio", "Property to get/set the aspect ratio. Only applies when aspect mode is not \"Ignore\".",
        &Element::setAspectRatio, &Element::getAspectRatio, 1.0 / 1.0
    );

    CEGUI_DEFINE_PROPERTY(Element, bool,
        "PixelAligned", "Property to get/set whether the Element's size and position should be pixel aligned. "
        "Value is either \"True\" or \"False\".",
        &Element::setPixelAligned, &Element::isPixelAligned, true
    );

    CEGUI_DEFINE_PROPERTY(Element, Quaternion,
        "Rotation", "Property to get/set the Element's rotation. Value is a quaternion: "
        "\"w:[w_float] x:[x_float] y:[y_float] z:[z_float]\""
        "or \"x:[x_float] y:[y_float] z:[z_float]\" to convert from Euler angles (in degrees).",
        &Element::setRotation, &Element::getRotation, Quaternion(1.0,0.0,0.0,0.0)
    );

    CEGUI_DEFINE_PROPERTY(Element, bool,
        "NonClient", "Property to get/set whether the Element is 'non-client'. "
        "Value is either \"True\" or \"False\".",
        &Element::setNonClient, &Element::isNonClient, false
    );
}