BlowTorch
 All Classes Namespaces Files Functions Variables Enumerator Pages
Classes | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
com.offsetnull.bt.window.Window Class Reference

Window. More...

Inheritance diagram for com.offsetnull.bt.window.Window:
Inheritance graph
[legend]
Collaboration diagram for com.offsetnull.bt.window.Window:
Collaboration graph
[legend]

Classes

class  NoteFunction
 

Public Member Functions

 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)
 

Public Attributes

int mTouchInLink = -1
 
boolean windowShowing = false
 

Protected Member Functions

final void onAttachedToWindow ()
 
final void onDetachedFromWindow ()
 
final void resetAndAddText (final byte[] obj)
 
final void xcallB (final String string, final byte[] bytes) throws LuaException
 
final void updateEncoding (final String value)
 
final void doUpdateSetting (final String key, final String value)
 
void xcallS (String string, String str)
 

Detailed Description

Window.

The Window.java class is the programmable mini-window that also houses the ansi drawing routine.

Constructor & Destructor Documentation

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
pDataDirThe path to the internal lua libraries.
contextThe application context.
nameThe name of the window.
ownerThe plugin owner of the window.
mainWindowHandlerThe callback handler to the MainWindow Activity.
settingsThe serializable settings for the window.
activityThe 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
cApplication Context
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
cApplication context
aI'm not really sure but you can't use it from lua.

Member Function Documentation

void com.offsetnull.bt.window.Window.addBytes ( byte[]  obj,
boolean  jumpToEnd 
)
void com.offsetnull.bt.window.Window.addText ( String  str,
boolean  jumpToEnd 
)

Here is the call graph for this function:

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
widthWindow width.
heightWindow height.

Here is the call graph for this function:

void com.offsetnull.bt.window.Window.callFunction ( String  callback,
String  data 
)

Here is the call graph for this function:

boolean com.offsetnull.bt.window.Window.checkSupports ( String  function)

Here is the call graph for this function:

void com.offsetnull.bt.window.Window.clearAllText ( )

Here is the call graph for this function:

final void com.offsetnull.bt.window.Window.clearText ( )

Clears all text from the buffer.

Here is the call graph for this function:

void com.offsetnull.bt.window.Window.closeLua ( )

Here is the call graph for this function:

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
messageThe lua error to display.

Here is the call graph for this function:

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
iThe 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
keyThe key of the setting that changed.
valueThe new value of the setting.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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)

Here is the call graph for this function:

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)

Here is the call graph for this function:

final void com.offsetnull.bt.window.Window.resetAndAddText ( final byte[]  obj)
protected

Resets the buffer with the given argument.

Parameters
objThe text to add in bytes.

Here is the call graph for this function:

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)

Here is the call graph for this function:

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.

Here is the call graph for this function:

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)

Here is the call graph for this function:

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)

Here is the call graph for this function:

void com.offsetnull.bt.window.Window.setMaxLines ( int  maxLines)

Here is the call graph for this function:

final void com.offsetnull.bt.window.Window.setName ( final String  name)

Setter for mName.

Parameters
nameNew name value.
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)

Here is the call graph for this function:

final void com.offsetnull.bt.window.Window.showScroller ( final Canvas  c)

Draws the scroller rectangle (and I think the selection box.

Parameters
cThe canvas to draw on.

Here is the call graph for this function:

void com.offsetnull.bt.window.Window.shutdown ( )

Here is the call graph for this function:

final void com.offsetnull.bt.window.Window.updateEncoding ( final String  value)
protected

Called from the MainWindow when the system encoding changes.

Parameters
valueThe new encoding value.

Here is the call graph for this function:

void com.offsetnull.bt.window.Window.updateSetting ( String  key,
String  value 
)

The method to call when a setting has changed.

Parameters
keyThe key of the setting that changed.
valueThe new value of the setting.

Implements com.offsetnull.bt.service.SettingsChangedListener.

Here is the call graph for this function:

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
stringThe name of the global callback function to call.
bytesThe bytes to provide to it (gets converted to a lua string without going through java.
Exceptions
LuaExceptionThown when there is a problem with lua.

Here is the call graph for this function:

void com.offsetnull.bt.window.Window.xcallS ( String  string,
String  str 
)
protected

Here is the call graph for this function:

Member Data Documentation

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: