backwardChar
public void backwardChar(int i)
charWidth
public int charWidth(char ch,
int column)
checkMark
public int checkMark()
coerceBuffer
public static Buffer coerceBuffer(Object buf)
countColumns
public int countColumns(char[] chars,
int start,
int count,
int initial)
currentColumn
public int currentColumn()
currentColumn
public int currentColumn(int offset)
Return the column number at a specified offset.
display
public EWindow display(boolean notThisWindow,
EFrame frame)
fill
public void fill(char value)
- fill in interface CharSeq
fill
public void fill(int fromIndex,
int toIndex,
char value)
- fill in interface CharSeq
findFile
public static Buffer findFile(String fname)
forwardChar
public void forwardChar(int i)
forwardLine
public int forwardLine(int lines)
forwardLine
public final long forwardLine(int lines,
int start)
Find the position a give number of lines forward or backward.
A side-effect-free version of Emacs's forward-line function.
lines
- number of lines forward (or backward if negative)start
- initial position (buffer offset)
generateNewBufferName
public static String generateNewBufferName(String start)
getBuffer
public static Buffer getBuffer(String name)
getChars
public void getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
- getChars in interface CharSeq
getCurrent
public static Buffer getCurrent()
getDot
public int getDot()
getFileName
public String getFileName()
getLength
public abstract int getLength()
getLocalKeymap
public EKeymap getLocalKeymap()
getMarkMarker
public Marker getMarkMarker(boolean force)
getName
public String getName()
getPoint
public int getPoint()
getPointMarker
public Marker getPointMarker(boolean share)
getStringContent
public abstract CharSeq getStringContent()
insert
public void insert(Object value,
Object style)
insert
public void insert(String string,
Object style)
insert
public abstract void insert(String string,
Object style,
int ipos)
Insert string with given style at position pair.
insert
public void insert(char ch,
int count)
Insert count copies of ch at point.
insert
public void insert(char ch,
int count,
Object style)
Insert count copies of ch at point.
insert
public void insert(char[] chars,
int offset,
int count,
Object style,
int ipos)
Insert character with given style at position pair.
insertAll
public void insertAll(Object[] values,
Object style)
insertFile
public abstract void insertFile(Reader in)
throws Exception
insertFile
public void insertFile(String filename)
invoke
public abstract void invoke(Runnable doRun)
This is intended for Runnable's that may affect the state of the buffer.
The implementation should make shure that the GUI is properly updated before
control returns
length
public final int length()
Get length of string, in characters.
Synonym for size(), for compatibility with String and StringBuffer.
- length in interface CharSeq
lineStartOffset
public int lineStartOffset()
lineStartOffset
public abstract int lineStartOffset(int offset)
makeBufferLocal
public static void makeBufferLocal(Object symbol,
boolean all)
all
- true if make-variable-buffer-local,
false if make-local-variable FIXME
maxDot
public abstract int maxDot()
minDot
public int minDot()
moveToColumn
public int moveToColumn(int column,
boolean force)
openReader
public abstract InPort openReader(int start,
int count)
positionToOffset
public int positionToOffset(Object position)
Convert an Emacs position (Marker, or 1-origin integer)
to a (0-origin) buffer offset.
redrawModeline
public abstract void redrawModeline()
removeAll
public abstract void removeAll()
removeChar
public void removeChar(int count)
restorePointMark
public abstract void restorePointMark(long pointMark)
save
public abstract void save(Writer out)
throws Exception
savePointMark
public abstract long savePointMark()
scan
public abstract long scan(char target,
int start,
int end,
int count,
boolean allowQuit)
Search in BUF for COUNT instances of the character TARGET between START and END.
If COUNT is positive, search forwards; END must be >= START.
If COUNT is negative, search backwards for the -COUNTth instance;
END must be <= START.
If COUNT is zero, do anything you please; run rogue, for all I care.
If END is zero, use beginning or end of (FIXME: accessible part of)
the buffer, as appropriate for the direction indicated by COUNT.
If we find COUNT instances, SHORTAGE is zero, and return the
position after the COUNTth match. Note that for reverse motion
this is not the same as the usual convention for Emacs motion commands.
If we don't find COUNT instances before reaching END, set SHORTAGE
to the number of TARGETs left unfound, and return (shortage<<32|END).
setCharAt
public void setCharAt(int index,
char ch)
- setCharAt in interface CharSeq
setCurrent
public static void setCurrent(Buffer buffer)
setDot
public void setDot(int i)
setFileName
public void setFileName(String fname)
setLocalKeymap
public void setLocalKeymap(EKeymap map)
setPoint
public final void setPoint(int i)
subSequence
public CharSequence subSequence(int start,
int end)
- subSequence in interface CharSeq
writeTo
public void writeTo(int start,
int count,
java.io.Writer dest)
throws java.io.IOException
- writeTo in interface CharSeq
writeTo
public void writeTo(java.io.Writer str)
throws java.io.IOException
- writeTo in interface CharSeq