gui2.stylemanager - ICE 0.1 API documentation

ICE 0.1 API documentation

# gui2.stylemanager

enum AlignX;

  Horizontal alignments.

  Left

    Align to the left.

  Center

    Align to center.

  Right

    Align to the right.

enum AlignY;

  Vertical alignments.

  Top

    Align to top.

  Center

    Align to center.

  Bottom

    Align to bottom.

abstract class StyleManager;

  Base class for style managers.

  A style manager manages styles of a widget (e.g. default, mouseOver, etc.).
  Each StyleManager implementation implements its own drawing logic and supports different kinds of styles.

  protected ResourceManager!(Texture) textureManager_;

    Reference to the texture manager.

    Textures might be unloaded if the video driver is replaced, so they should always be accessed through this manager.

  void setStyle(string name);

    Set style with specified name.

    Parameters:

    string name | Name of style to set. If there is no style with specified name, the default style is set. "" (empty string) is the name of the default style.

  void drawWidgetRectangle(VideoDriver video, ref const Recti area);

    Draw the widget rectangle; both its background and border.

    Parameters:

    VideoDriver video | VideoDriver to draw with.
    Recti area | Area taken by the widget in screen space.

  void drawProgress(VideoDriver video, const float progress, ref const Recti area);

    Draw a progress "bar".

    Different styles might draw progress differently (horizontal or vertical bar, circle, cake, etc).

    Parameters:

    VideoDriver video | VideoDriver to draw with.
    float progress | Progress between 0 and 1.
    Recti area | Area taken by the progress "bar".

  void drawText(VideoDriver video, const string text, ref const Recti area);

    Draw text using the style.

    Only bounds of the widget are specified; the style decides font, alignment, and other parameters of the text.

    Parameters:

    VideoDriver video | VideoDriver to draw with.
    string text | Text to draw.
    Recti area | Area taken up by the widget.

Copyright © Ferdinand Majerech 2011. | Page generated by AutoDDoc and Ddoc.