Poison-ui

A cross-platform desktop/mobile UI engine written in D using dsfml

View project on GitHub

Dub version

poison.ui.component

Source

Module for a component.

Authors:

  Jacob Jensen

License:

  https://github.com/PoisonEngine/poison-ui/blob/master/LICENSE

public:

        protected:

        public:



public class Component : Space


        protected:

        public:



A component, which is the base for all controls and elements.


protected this(string name, Size initialSize);


Creates a new component.

Parameters:

nameThe name of the component.
initialSizeThe initial size of the component.

protected this(string name);


Creates a new component.

Parameters:

nameThe name of the component.

protected @property Graphics graphics();


Gets the graphics of the component.


protected void render();


Renders the component. Override this!


protected void draw(RenderWindow window);


Draws the component. Override this!

Parameters:

windowThe window to draw the component to.

protected void process(RenderWindow window);


Processes the component during application cycles.

Parameters:

windowThe render window to process.

public @property string name();


Gets the name of the component.


public @property bool enabled();


Gets a boolean determining whether the component is enabled or not.


public @property void enabled(bool isEnabled);


Sets a boolean determining whether the component is enabled or not.


public @property bool disabled();


Gets a boolean determining whether the component is disabled or not.


public @property void disabled(bool isDisabled);


Sets a boolean determining whether the component is disabled.


public @property bool visible();


Gets a boolean determining whether the component is visible or not.


public @property void visible(bool isVisible);


Sets a boolean determining whether the component is visible or not.


public @property bool hidden();


Gets a boolean determining whether the component is hidden or not.


public @property void hidden(bool isHidden);


Sets a boolean determining whether the component is hidden or not.


public @property dstring innerText();


Gets the inner text of the component.


public @property void innerText(dstring newInnerText);


Sets the inner text of the component.


public @property dstring outerText();


Gets the outer text of the component.


public @property void outerText(dstring newOuterText);


Sets the outer text of the component.


public @property override Point position();


Ges the position of the component.


public @property override void position(Point newPoint);


Sets the position of the component.


public @property override Size size();


Gets the size of the component.


public @property override void size(Size newSize);


Sets the size of the component.


public @property ptrdiff_t layer();


Gets the layer of the component.


public @property Window parentWindow();


Gets the parent window of the component.


public @property Container parentContainer();


Gets the parent container of the component.


public void show();


Shows the component.


public void hide();


Hides the component.


public void enable();


Enables the component.


public void disable();


Disables the component.


public void addSelector(string selector);


Adds a style selector.

Parameters:

selectorThe selector to add.

public void removeSelector(string selector);


Removes a style selector.


public override bool intersect(Point p);


Checks whether the component intersects with a point.

Parameters:

pThe point to check for intersection with.

Returns:

  True if the component intersects with a point.

public override bool intersect(Space target);


Checks whether the component intersects with another space.

Parameters:

targetThe space to check for intersection with.

Returns:

  True if the component intersects with a space.

Generated by venom - Poison Engine's Documentation Generator