|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.util.SimpleRenderable
com.threerings.opengl.util.SimpleOverlay
com.threerings.opengl.gui.Root
com.threerings.opengl.gui.DisplayRoot
public class DisplayRoot
A root for Display-based apps.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.opengl.gui.Root |
|---|
Root.ButtonRecord, Root.KeyRecord, Root.TickOp |
| Field Summary | |
|---|---|
protected boolean |
_wasActive
Track whether we were active during the last event poll, so that we can consume the mouse click that may arrive with focus. |
| Fields inherited from class com.threerings.opengl.gui.Root |
|---|
_buttons, _ccomponent, _clipboard, _cursor, _daction, _ddata, _defaults, _dhandler, _dicon, _dsource, _focus, _globals, _hcomponent, _invalidRoots, _lastMoveTime, _lastTipTime, _modalShade, _modifiers, _mouseX, _mouseY, _pressedKeys, _px, _py, _soundGroup, _tickOp, _tickParticipants, _tickStamp, _tipTime, _tipWidth, _tipwin, _windows, CLICK_CHAIN_INTERVAL, CLICK_INTERVAL, DEFAULT_CURSOR, DRAG_DISTANCE, KEY_REPEAT_DELAY, KEY_REPEAT_RATE, SOUND_SOURCES, TIP_MODE_RESET |
| Fields inherited from class com.threerings.opengl.util.SimpleRenderable |
|---|
_batch, _ctx, _priority, _queue |
| Constructor Summary | |
|---|---|
DisplayRoot(GlContext ctx)
|
|
| Method Summary | |
|---|---|
protected void |
controllerMoved(Controller controller,
long when,
int index,
boolean xAxis,
boolean yAxis,
float value)
Notes that a controller has moved on an axis. |
protected void |
controllerPovXMoved(Controller controller,
long when,
float value)
Notes that a controller has moved on the pov x axis. |
protected void |
controllerPovYMoved(Controller controller,
long when,
float value)
Notes that a controller has moved on the pov y axis. |
protected void |
controllerPressed(Controller controller,
long when,
int index)
Notes that a controller button has been pressed. |
protected void |
controllerReleased(Controller controller,
long when,
int index)
Notes that a controller button has been released. |
int |
getDisplayHeight()
Returns the height of the display area. |
int |
getDisplayWidth()
Returns the width of the display area. |
void |
poll()
Polls the input system for events and dispatches them. |
void |
setMousePosition(int x,
int y)
Sets the mouse position. |
protected void |
updateButtonModifier(int button,
boolean pressed)
Updates the modifier for the specified button. |
protected void |
updateCursor(Cursor cursor)
Updates the cursor. |
protected void |
updateKeyModifier(int key,
boolean pressed)
Updates the modifier for the specified key, if any. |
| Methods inherited from class com.threerings.opengl.util.SimpleOverlay |
|---|
composite, createStates |
| Methods inherited from class com.threerings.opengl.util.SimpleRenderable |
|---|
createBatch, enqueue, getStates |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean _wasActive
| Constructor Detail |
|---|
public DisplayRoot(GlContext ctx)
| Method Detail |
|---|
public void poll()
public int getDisplayWidth()
Root
getDisplayWidth in class Rootpublic int getDisplayHeight()
Root
getDisplayHeight in class Root
public void setMousePosition(int x,
int y)
Root
setMousePosition in class Rootprotected void updateCursor(Cursor cursor)
Root
updateCursor in class Root
protected void updateButtonModifier(int button,
boolean pressed)
protected void updateKeyModifier(int key,
boolean pressed)
protected void controllerPressed(Controller controller,
long when,
int index)
protected void controllerReleased(Controller controller,
long when,
int index)
protected void controllerMoved(Controller controller,
long when,
int index,
boolean xAxis,
boolean yAxis,
float value)
protected void controllerPovXMoved(Controller controller,
long when,
float value)
protected void controllerPovYMoved(Controller controller,
long when,
float value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||