1 package era.mi.components.gui;
3 import era.mi.logic.wires.WireArray;
4 import net.haspamelodica.swt.helper.gcs.GeneralGC;
5 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
6 import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
8 public interface BasicGUIComponent
11 * Render this component to the given gc, at coordinates (0, 0).
13 public void render(GeneralGC gc);
15 * Returns the bounds of this component.
16 * Used for calculating which component is clicked.
18 public Rectangle getBounds();
20 //TODO this code will be replaced by code in BasicComponent.
22 * Returns how many wire arrays are connected to this component.
23 * (Connections are static - they can't be removed and no new ones can be added)
25 public int getConnectedWireArraysCount();
27 * Returns the n-th wire array connected to this component.
29 public WireArray getConnectedWireArray(int connectionIndex);
31 * Returns relative coordinates where the n-th wire array is connected to this component.
33 public Point getWireArrayConnectionPoint(int connectionIndex);