1 |
/* |
/* |
2 |
Placeable.java |
Placeable.java |
3 |
* |
* |
4 |
* Copyright (c) 2003, Matti J. Katila |
* Copyright (c) 2003, Matti J. Katila, Asko Soukka |
5 |
* |
* |
6 |
* This file is part of Libvob. |
* This file is part of Libvob. |
7 |
* |
* |
23 |
* |
* |
24 |
*/ |
*/ |
25 |
/* |
/* |
26 |
* Written by Matti J. Katila |
* Written by Matti J. Katila, Asko Soukka |
27 |
*/ |
*/ |
28 |
package org.nongnu.libvob.lava.placeable; |
package org.nongnu.libvob.lava.placeable; |
29 |
import org.nongnu.libvob.*; |
import org.nongnu.libvob.*; |
30 |
|
|
31 |
/** Placeable for text to make it easier to put cursor in the VobScene. |
/** |
32 |
|
* Placeable interface for making it easier to locate |
33 |
|
* the text cursor and put it into in a VobScene. |
34 |
*/ |
*/ |
35 |
public interface TextPlaceable extends Placeable { |
public interface TextPlaceable extends Placeable { |
|
|
|
36 |
/** |
/** |
37 |
* @param position cursor position in text. |
* Get the coordinates before the given character position. |
38 |
* @param xyOut upper rigth corner of a letter given in position |
* The Y coordinate will be located just below the the line. |
39 |
|
* @param position The text cursor position. |
40 |
|
* @param xyOut The lower left corner of the character on |
41 |
|
* The text cursor's position. |
42 |
*/ |
*/ |
43 |
void getCursorXY(int position, float[] xyOut); |
void getCursorXY(int position, float[] xyOut); |
44 |
|
|
45 |
|
/** |
46 |
|
* Get the position of the first character placed the most |
47 |
|
* closest to the given coordinates. |
48 |
|
* @param x The X coordinate where the text cursor should be located. |
49 |
|
* @param y The Y coordinate where the text cursor should be located. |
50 |
|
* @return The text cursor position most closest to the given coordinates. |
51 |
|
*/ |
52 |
|
int getCursorPos(float x, float y); |
53 |
} |
} |