Window.
More...
|
| | Window (final String pDataDir, final Context context, final String name, final String owner, final Handler mainWindowHandler, final SettingsGroup settings, final MainWindowCallback activity) |
| |
| | Window (final Context c) |
| |
| | Window (final Context c, final AttributeSet a) |
| |
| final void | displayLuaError (final String message) |
| |
| final void | calculateCharacterFeatures (final int width, final int height) |
| |
| final void | setName (final String name) |
| |
| final String | getName () |
| |
| final boolean | onTouchEvent (final MotionEvent t) |
| |
| final void | showScroller (final Canvas c) |
| |
| final void | clearText () |
| |
| final void | flushBuffer () |
| |
| final void | jumpToZero () |
| |
| final void | doDelayedDraw (final int i) |
| |
| void | setColorDebugMode (int i) |
| |
| void | setEncoding (String pEncoding) |
| |
| void | setCharacterSizes (int fontSize, int fontSpaceExtra) |
| |
| void | setMaxLines (int maxLines) |
| |
| void | setFont (Typeface font) |
| |
| void | setBold (boolean bold) |
| |
| Typeface | getFont () |
| |
| void | setLineBreaks (Integer i) |
| |
| void | setWordWrap (boolean pIn) |
| |
| void | setLinkMode (LINK_MODE mode) |
| |
| void | setLinkColor (int linkColor) |
| |
| void | clearAllText () |
| |
| void | addBytes (byte[] obj, boolean jumpToEnd) |
| |
| void | addText (String str, boolean jumpToEnd) |
| |
| void | setCullExtraneous (boolean pIn) |
| |
| void | setLinksEnabled (boolean hyperLinkEnabled) |
| |
| boolean | loaded () |
| |
| IWindowCallback.Stub | getCallback () |
| |
| void | setBufferText (boolean bufferText) |
| |
| boolean | isBufferText () |
| |
| void | loadScript (String body) |
| |
| void | callFunction (String callback, String data) |
| |
| void | setDimensions (int width, int height) |
| |
| void | setWidth (int width) |
| |
| void | setHeight (int height) |
| |
| RelativeLayout | getParentView () |
| |
| void | onCustomAnimationEnd () |
| |
| void | onAnimationEnd () |
| |
| int | getMaxHeight () |
| |
| int | getMaxWidth () |
| |
| void | updateSetting (String key, String value) |
| |
| void | shutdown () |
| |
| void | closeLua () |
| |
| boolean | isTextSelectionEnabled () |
| |
| void | setTextSelectionEnabled (boolean textSelectionEnabled) |
| |
| void | setScrollingEnabled (boolean scrollingEnabled) |
| |
| boolean | isScrollingEnabled () |
| |
| void | jumpToStart () |
| |
| void | setBuffer (TextTree buffer) |
| |
| boolean | checkSupports (String function) |
| |
| boolean | isCenterJustify () |
| |
| void | setCenterJustify (boolean centerJustify) |
| |
| int | getLineSize () |
| |
| void | fitFontSize (int chars) |
| |
| void | doFitFontSize (int width) |
| |
| TextTree | getBuffer () |
| |
| double | measure (String str) |
| |
Window.
The Window.java class is the programmable mini-window that also houses the ansi drawing routine.
| com.offsetnull.bt.window.Window.Window |
( |
final String |
pDataDir, |
|
|
final Context |
context, |
|
|
final String |
name, |
|
|
final String |
owner, |
|
|
final Handler |
mainWindowHandler, |
|
|
final SettingsGroup |
settings, |
|
|
final MainWindowCallback |
activity |
|
) |
| |
Constructor to be used, the others aren't really suppposed to be there.
- Parameters
-
| pDataDir | The path to the internal lua libraries. |
| context | The application context. |
| name | The name of the window. |
| owner | The plugin owner of the window. |
| mainWindowHandler | The callback handler to the MainWindow Activity. |
| settings | The serializable settings for the window. |
| activity | The MainWindowCallback to use to report changes from the scripts |
| com.offsetnull.bt.window.Window.Window |
( |
final Context |
c | ) |
|
Generic window constructor, here to pass the lint test. Will not work.
- Parameters
-
| com.offsetnull.bt.window.Window.Window |
( |
final Context |
c, |
|
|
final AttributeSet |
a |
|
) |
| |
XML Inflation constructor, here to pass the lint test. Will not work.
- Parameters
-
| c | Application context |
| a | I'm not really sure but you can't use it from lua. |
| void com.offsetnull.bt.window.Window.addBytes |
( |
byte[] |
obj, |
|
|
boolean |
jumpToEnd |
|
) |
| |
| void com.offsetnull.bt.window.Window.addText |
( |
String |
str, |
|
|
boolean |
jumpToEnd |
|
) |
| |
| final void com.offsetnull.bt.window.Window.calculateCharacterFeatures |
( |
final int |
width, |
|
|
final int |
height |
|
) |
| |
Updates relevant draw routine structures and temporary values. Measures one character and handles the fit routine.
- Parameters
-
| void com.offsetnull.bt.window.Window.callFunction |
( |
String |
callback, |
|
|
String |
data |
|
) |
| |
| boolean com.offsetnull.bt.window.Window.checkSupports |
( |
String |
function | ) |
|
| void com.offsetnull.bt.window.Window.clearAllText |
( |
| ) |
|
| final void com.offsetnull.bt.window.Window.clearText |
( |
| ) |
|
Clears all text from the buffer.
| void com.offsetnull.bt.window.Window.closeLua |
( |
| ) |
|
| final void com.offsetnull.bt.window.Window.displayLuaError |
( |
final String |
message | ) |
|
Kicks off a lua error message to the main output window. This has to be sent round trip through the Service in order to be picked up by the internal buffer.
- Parameters
-
| message | The lua error to display. |
| final void com.offsetnull.bt.window.Window.doDelayedDraw |
( |
final int |
i | ) |
|
This is kind of a hack function, schedule a redraw for i milliseconds.
- Parameters
-
| i | The number of milliseconds to wait before drawing. |
| void com.offsetnull.bt.window.Window.doFitFontSize |
( |
int |
width | ) |
|
| final void com.offsetnull.bt.window.Window.doUpdateSetting |
( |
final String |
key, |
|
|
final String |
value |
|
) |
| |
|
protected |
Implementation of the settings handler routine to handle when settings change.
- Parameters
-
| key | The key of the setting that changed. |
| value | The new value of the setting. |
| void com.offsetnull.bt.window.Window.fitFontSize |
( |
int |
chars | ) |
|
| final void com.offsetnull.bt.window.Window.flushBuffer |
( |
| ) |
|
If the window was in buffering mode, this function will dump the buffered text into the real buffer.
| TextTree com.offsetnull.bt.window.Window.getBuffer |
( |
| ) |
|
| IWindowCallback.Stub com.offsetnull.bt.window.Window.getCallback |
( |
| ) |
|
| Typeface com.offsetnull.bt.window.Window.getFont |
( |
| ) |
|
| int com.offsetnull.bt.window.Window.getLineSize |
( |
| ) |
|
| int com.offsetnull.bt.window.Window.getMaxHeight |
( |
| ) |
|
| int com.offsetnull.bt.window.Window.getMaxWidth |
( |
| ) |
|
| final String com.offsetnull.bt.window.Window.getName |
( |
| ) |
|
Getter for mName.
- Returns
- The name of this window.
| RelativeLayout com.offsetnull.bt.window.Window.getParentView |
( |
| ) |
|
| boolean com.offsetnull.bt.window.Window.isBufferText |
( |
| ) |
|
| boolean com.offsetnull.bt.window.Window.isCenterJustify |
( |
| ) |
|
| boolean com.offsetnull.bt.window.Window.isScrollingEnabled |
( |
| ) |
|
| boolean com.offsetnull.bt.window.Window.isTextSelectionEnabled |
( |
| ) |
|
| void com.offsetnull.bt.window.Window.jumpToStart |
( |
| ) |
|
| final void com.offsetnull.bt.window.Window.jumpToZero |
( |
| ) |
|
If the window has been scrolled back, this function will return it to home.
| boolean com.offsetnull.bt.window.Window.loaded |
( |
| ) |
|
| void com.offsetnull.bt.window.Window.loadScript |
( |
String |
body | ) |
|
| double com.offsetnull.bt.window.Window.measure |
( |
String |
str | ) |
|
| void com.offsetnull.bt.window.Window.onAnimationEnd |
( |
| ) |
|
| final void com.offsetnull.bt.window.Window.onAttachedToWindow |
( |
| ) |
|
|
protected |
| void com.offsetnull.bt.window.Window.onCustomAnimationEnd |
( |
| ) |
|
| final void com.offsetnull.bt.window.Window.onDetachedFromWindow |
( |
| ) |
|
|
protected |
| final boolean com.offsetnull.bt.window.Window.onTouchEvent |
( |
final MotionEvent |
t | ) |
|
| final void com.offsetnull.bt.window.Window.resetAndAddText |
( |
final byte[] |
obj | ) |
|
|
protected |
Resets the buffer with the given argument.
- Parameters
-
| obj | The text to add in bytes. |
| void com.offsetnull.bt.window.Window.setBold |
( |
boolean |
bold | ) |
|
| void com.offsetnull.bt.window.Window.setBuffer |
( |
TextTree |
buffer | ) |
|
| void com.offsetnull.bt.window.Window.setBufferText |
( |
boolean |
bufferText | ) |
|
| void com.offsetnull.bt.window.Window.setCenterJustify |
( |
boolean |
centerJustify | ) |
|
| void com.offsetnull.bt.window.Window.setCharacterSizes |
( |
int |
fontSize, |
|
|
int |
fontSpaceExtra |
|
) |
| |
| void com.offsetnull.bt.window.Window.setColorDebugMode |
( |
int |
i | ) |
|
Sets the color debug mode for the window.
| void com.offsetnull.bt.window.Window.setCullExtraneous |
( |
boolean |
pIn | ) |
|
| void com.offsetnull.bt.window.Window.setDimensions |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
| void com.offsetnull.bt.window.Window.setEncoding |
( |
String |
pEncoding | ) |
|
Sets the active encoding for the window.
| void com.offsetnull.bt.window.Window.setFont |
( |
Typeface |
font | ) |
|
| void com.offsetnull.bt.window.Window.setHeight |
( |
int |
height | ) |
|
| void com.offsetnull.bt.window.Window.setLineBreaks |
( |
Integer |
i | ) |
|
| void com.offsetnull.bt.window.Window.setLinkColor |
( |
int |
linkColor | ) |
|
| void com.offsetnull.bt.window.Window.setLinkMode |
( |
LINK_MODE |
mode | ) |
|
| void com.offsetnull.bt.window.Window.setLinksEnabled |
( |
boolean |
hyperLinkEnabled | ) |
|
| void com.offsetnull.bt.window.Window.setMaxLines |
( |
int |
maxLines | ) |
|
| final void com.offsetnull.bt.window.Window.setName |
( |
final String |
name | ) |
|
Setter for mName.
- Parameters
-
| void com.offsetnull.bt.window.Window.setScrollingEnabled |
( |
boolean |
scrollingEnabled | ) |
|
| void com.offsetnull.bt.window.Window.setTextSelectionEnabled |
( |
boolean |
textSelectionEnabled | ) |
|
| void com.offsetnull.bt.window.Window.setWidth |
( |
int |
width | ) |
|
| void com.offsetnull.bt.window.Window.setWordWrap |
( |
boolean |
pIn | ) |
|
| final void com.offsetnull.bt.window.Window.showScroller |
( |
final Canvas |
c | ) |
|
Draws the scroller rectangle (and I think the selection box.
- Parameters
-
| void com.offsetnull.bt.window.Window.shutdown |
( |
| ) |
|
| final void com.offsetnull.bt.window.Window.updateEncoding |
( |
final String |
value | ) |
|
|
protected |
Called from the MainWindow when the system encoding changes.
- Parameters
-
| value | The new encoding value. |
| void com.offsetnull.bt.window.Window.updateSetting |
( |
String |
key, |
|
|
String |
value |
|
) |
| |
| final void com.offsetnull.bt.window.Window.xcallB |
( |
final String |
string, |
|
|
final byte[] |
bytes |
|
) |
| throws LuaException |
|
protected |
The end of the WindowXCallB Lua function.
- Parameters
-
| string | The name of the global callback function to call. |
| bytes | The bytes to provide to it (gets converted to a lua string without going through java. |
- Exceptions
-
| LuaException | Thown when there is a problem with lua. |
| void com.offsetnull.bt.window.Window.xcallS |
( |
String |
string, |
|
|
String |
str |
|
) |
| |
|
protected |
| int com.offsetnull.bt.window.Window.mTouchInLink = -1 |
If a touch event happened inside of a link hitbox it will be noted here.
| boolean com.offsetnull.bt.window.Window.windowShowing = false |
The documentation for this class was generated from the following file:
- /Users/render/apps/BlowTorch/BTLib/src/com/offsetnull/bt/window/Window.java