|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ViTextView
The information needed by vim when running on a GUI. We abstract this, rather than using native swing, since different environments, e.g. JBuilder, have their own abstractions. Some abstraction that presents a line oriented interface is useful for vim.
This has had a few "window" methods added to it, and it is now the primary class referenced by most of the vi code. This allows it to be G.curwin.
NEEDSWORK: get rid of JEditorPane reference, should not refer to swing.
Nested Class Summary | |
---|---|
static class |
ViTextView.FOLDOP
|
static class |
ViTextView.JLOP
jump list operations |
static class |
ViTextView.MARKOP
annonymous mark operations |
static class |
ViTextView.NLOP
open new line forward/backward |
static class |
ViTextView.TABOP
move to other tab |
static class |
ViTextView.TAGOP
tags and tagstack operations |
static class |
ViTextView.WMOP
word match opertations |
Method Summary | |
---|---|
void |
anonymousMark(ViTextView.MARKOP op,
int count)
Anonymous mark handling. |
void |
attach()
establish all the listeners |
void |
clearSelect()
clear the select, if any, on the screen, don't move the caret |
int |
coladvanceCoord(int lineOffset,
int col)
|
void |
computeCursorPosition(MutableInt offset,
MutableInt line,
MutableInt column)
Determine cursor position, all args get set (call by reference). |
void |
deleteChar(int start,
int end)
Delete a bunch of characters |
void |
deletePreviousChar()
Delete previous character (backspace). |
void |
detach()
tear down all the listeners |
void |
findMatch()
find matching character for character under the cursor. |
void |
foldOperation(ViTextView.FOLDOP op)
Perform the fold operation. |
void |
foldOperation(ViTextView.FOLDOP op,
int offset)
Perform the fold operation. |
Buffer |
getBuffer()
|
int |
getBufferLineOffset(int line)
Reverse of getCoordLine, convert coord line to document line |
int |
getCaretPosition()
|
int |
getCoordLine(int line)
|
int |
getCoordLineCount()
|
JEditorPane |
getEditorComponent()
|
ViMark |
getMark(int i)
|
int |
getMarkPosition()
|
ViMark |
getPCMark()
|
ViMark |
getPrevPCMark()
|
ViStatusDisplay |
getStatusDisplay()
Handle displayable editor state changes |
int |
getViewBlankLines()
|
int |
getViewBottomLine()
|
int |
getViewCoordBlankLines()
|
int |
getViewCoordBottomLine()
|
int |
getViewCoordTopLine()
|
int |
getViewLines()
|
int |
getViewTopLine()
|
ViFPOS |
getWCursor()
|
int |
getWCurswant()
|
Window |
getWindow()
|
boolean |
getWPList()
|
int |
getWPScroll()
|
boolean |
getWSetCurswant()
|
void |
insertChar(char c)
insert text at current cursor location. |
void |
insertNewLine()
Insert new line at current position |
void |
insertTab()
Insert tab at current position |
void |
insertText(int offset,
String s)
insert text at specified location |
void |
insertTypedChar(char c)
insert the char verbatim, no special actions |
boolean |
isEditable()
Can the editor text be changed |
boolean |
isShutdown()
|
void |
jumpDefinition(String ident)
Jump to the definition of the identifier under the cursor. |
void |
jumpList(ViTextView.JLOP op,
int count)
Jump list handling |
boolean |
openNewLine(ViTextView.NLOP op)
Open line is like insertNewLine, but is does autoindent dance |
void |
pushPCMark()
|
void |
redo()
redo a change |
void |
replaceChar(char c,
boolean advanceCursor)
Replace character at current cursor location with argument character |
void |
replaceString(int start,
int end,
String s)
Replace indicated region with string |
void |
scroll(int n_lines)
Scroll down (n_lines positive) or up (n_lines negative) the specified number of lines. |
void |
setCaretPosition(int offset)
set the caret to the indicated position. |
void |
setCaretPosition(int lnum,
int col)
set the caret to the indicated position. |
void |
setCursorCoordLine(int line,
int col)
|
void |
setSelect(int dot,
int mark)
select a region of the screen |
void |
setViewCoordTopLine(int line)
cause the idndicated line to be displayed as top line in view. |
void |
setViewTopLine(int line)
cause the idndicated line to be displayed as top line in view. |
void |
setWCurswant(int c)
|
void |
setWindow(Window window)
|
void |
setWPList(boolean f)
|
void |
setWPScroll(int n)
|
void |
setWSetCurswant(boolean f)
|
void |
shutdown()
going away, do any remaining cleanup |
void |
startup(Buffer buf)
called after TV and Buffer are constructed |
void |
tabOperation(ViTextView.TABOP op,
int count)
move to other file tab. For NEXT,PREV if count == 0 then neighboring tab; if count != 0 then countTh tab, where first is one |
void |
undo()
undo a change |
void |
updateCursor(ViCursor cursor)
Change the cursor shape |
void |
updateHighlightSearchState()
Update the hightlight search state |
void |
updateVisualState()
Update the visual state (selection) of the window. |
void |
win_close_others(boolean forceit)
Close other windows |
void |
win_close(boolean freeBuf)
Close this window. |
void |
win_cycle(int n)
Cycle to the indicated buffer. |
void |
win_goto(int n)
Goto the indicated buffer. |
void |
win_quit()
Quit editing window. |
void |
win_split(int n)
Split this window. |
void |
wordMatchOperation(ViTextView.WMOP op)
|
Methods inherited from interface com.raelity.jvi.ViOptionBag |
---|
activateOptions, viOptionSet |
Method Detail |
---|
Window getWindow()
void setWindow(Window window)
ViFPOS getWCursor()
int getWCurswant()
void setWCurswant(int c)
boolean getWSetCurswant()
void setWSetCurswant(boolean f)
ViMark getPCMark()
ViMark getPrevPCMark()
void pushPCMark()
ViMark getMark(int i)
int getWPScroll()
void setWPScroll(int n)
boolean getWPList()
void setWPList(boolean f)
Buffer getBuffer()
JEditorPane getEditorComponent()
boolean isEditable()
void insertNewLine()
boolean openNewLine(ViTextView.NLOP op)
void insertTab()
void replaceChar(char c, boolean advanceCursor)
void deletePreviousChar()
void insertChar(char c)
void insertTypedChar(char c)
void replaceString(int start, int end, String s)
void deleteChar(int start, int end)
void insertText(int offset, String s)
int getCaretPosition()
int getMarkPosition()
void computeCursorPosition(MutableInt offset, MutableInt line, MutableInt column)
void setCaretPosition(int offset)
void setCaretPosition(int lnum, int col)
void setSelect(int dot, int mark)
void clearSelect()
void undo()
void redo()
void anonymousMark(ViTextView.MARKOP op, int count)
void findMatch()
void jumpDefinition(String ident)
void jumpList(ViTextView.JLOP op, int count)
void foldOperation(ViTextView.FOLDOP op)
void foldOperation(ViTextView.FOLDOP op, int offset)
void wordMatchOperation(ViTextView.WMOP op)
void tabOperation(ViTextView.TABOP op, int count)
int getViewTopLine()
void setViewTopLine(int line)
int getViewBottomLine()
int getViewBlankLines()
int getViewLines()
void scroll(int n_lines)
int getViewCoordTopLine()
void setViewCoordTopLine(int line)
int getViewCoordBottomLine()
int getViewCoordBlankLines()
int getCoordLineCount()
int getCoordLine(int line)
void setCursorCoordLine(int line, int col)
int coladvanceCoord(int lineOffset, int col)
int getBufferLineOffset(int line)
void attach()
void detach()
void startup(Buffer buf)
void shutdown()
boolean isShutdown()
void updateCursor(ViCursor cursor)
void win_quit()
void win_split(int n)
n
- the size of the new window.void win_close(boolean freeBuf)
freeBuf
- true if the related buffer may be freedvoid win_close_others(boolean forceit)
forceit
- true if always hide all other windowsvoid win_goto(int n)
n
- the index of the window to make currentvoid win_cycle(int n)
n
- the positive/negative number of windows to cycle.ViStatusDisplay getStatusDisplay()
void updateVisualState()
void updateHighlightSearchState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |