Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

editorctrl Class Reference

a sub-classed wxStyledTextControl re-purposed for our nefarious needs. More...

#include <editorctrl.h>

List of all members.

Public Member Functions

 editorctrl (wxWindow *parent, wxString fname, config *settings)
 The editor constructor.
 ~editorctrl ()
 The editor destructor.
wxString getFilename ()
 Return this buffers file name.
wxString getDirectory ()
 Return the path to this buffers file.
wxString getPath ()
void setFilename (wxString fname)
 Set this buffers file name.
void setMtime (long mt)
long getMtime ()
void onRightDown (wxMouseEvent &evt)
 Called when user right-clicks in window.
void onMarginClick (wxStyledTextEvent &evt)
 Called when user clicks on a margin.
void onKeyDown (wxKeyEvent &evt)
 Process a key down event when user presses a key.
void onCharAdded (wxStyledTextEvent &evt)
 Called when a character is added to the buffer.
void onProcessPopup (wxCommandEvent &evt)
 Catch-all to process a popup menu command.
void indentBlock (bool toLeft=true)
 Indent the current selection to the left or right.
void findBrace ()
 Find the brace matching the brace on or near the current position.
bool setAutoIndent (bool isOn)
 Turn on/off autoindent mode.
bool getAutoIndent ()
 Return the current state of auto indent.
void forwardWord ()
 Move caret forward one word.
void backWord ()
 Move caret backward one word.
void forwardChar ()
 Move caret forward on char.
void backChar ()
 Move caret backward one char.
void begOfLine ()
 Move caret to the beginning of the current line.
void endOfLine ()
 Move caret to the end of the current line.
void prevLine ()
 Move caret to the line above.
void nextLine ()
 Move caret to the line below.
void toggleBookmark (int pos)
 Toggle a bookmark on the line of pos.
void prevBookmark ()
 Move to the previous bookmark, if any.
void nextBookmark ()
 Move to the next bookmark, if any.
void initFromConfig ()
 Read the values from config and initialize.
int findString (const wxString &str, int startpos, int flags)
 Find a string within the buffer.
void guessFileType ()
 Attempt to guess the file type and set the syntax highlighting by calling the appropriate script.
void autocomplete ()
 Popup an auto-completion list if appropriate.
void calltip ()
 Popup a call tip window if appropriate.
void setTipsList (wxArrayString *t)
wxString getCurrentWordPart ()
 Return the current word part before the cursor.

Protected Member Functions

void buildAutoCompleteList ()
 Generate an auto-completion list for the popup.


Detailed Description

a sub-classed wxStyledTextControl re-purposed for our nefarious needs.


Constructor & Destructor Documentation

editorctrl::editorctrl wxWindow *  parent,
wxString  fname,
config settings
 

The editor constructor.

Parameters:
parent the parent window
fname the file name of this buffer
settings the config object

editorctrl::~editorctrl  ) 
 

The editor destructor.


Member Function Documentation

void editorctrl::autocomplete  ) 
 

Popup an auto-completion list if appropriate.

void editorctrl::backChar  ) 
 

Move caret backward one char.

void editorctrl::backWord  ) 
 

Move caret backward one word.

void editorctrl::begOfLine  ) 
 

Move caret to the beginning of the current line.

void editorctrl::buildAutoCompleteList  )  [protected]
 

Generate an auto-completion list for the popup.

void editorctrl::calltip  ) 
 

Popup a call tip window if appropriate.

void editorctrl::endOfLine  ) 
 

Move caret to the end of the current line.

void editorctrl::findBrace  ) 
 

Find the brace matching the brace on or near the current position.

int editorctrl::findString const wxString &  str,
int  startpos,
int  flags
 

Find a string within the buffer.

Parameters:
str the string to find
startpos the position in the buffer to start looking
flags indicate what type of search to peform.

void editorctrl::forwardChar  ) 
 

Move caret forward on char.

void editorctrl::forwardWord  ) 
 

Move caret forward one word.

bool editorctrl::getAutoIndent  ) 
 

Return the current state of auto indent.

Returns:
true if auto indent is on

wxString editorctrl::getCurrentWordPart  ) 
 

Return the current word part before the cursor.

wxString editorctrl::getDirectory  ) 
 

Return the path to this buffers file.

wxString editorctrl::getFilename  ) 
 

Return this buffers file name.

long editorctrl::getMtime  )  [inline]
 

wxString editorctrl::getPath  )  [inline]
 

void editorctrl::guessFileType  ) 
 

Attempt to guess the file type and set the syntax highlighting by calling the appropriate script.

void editorctrl::indentBlock bool  toLeft = true  ) 
 

Indent the current selection to the left or right.

Parameters:
toLeft true if to indent left otherwise indent right

void editorctrl::initFromConfig  ) 
 

Read the values from config and initialize.

void editorctrl::nextBookmark  ) 
 

Move to the next bookmark, if any.

void editorctrl::nextLine  ) 
 

Move caret to the line below.

void editorctrl::onCharAdded wxStyledTextEvent &  evt  ) 
 

Called when a character is added to the buffer.

This is where spellchecking, auto indent and such are handled.

Parameters:
evt called by wx

void editorctrl::onKeyDown wxKeyEvent &  evt  ) 
 

Process a key down event when user presses a key.

This is where modes are dealt with. Currently there is a "normal" and an emacs mode.

Parameters:
evt called by wx

void editorctrl::onMarginClick wxStyledTextEvent &  evt  ) 
 

Called when user clicks on a margin.

void editorctrl::onProcessPopup wxCommandEvent &  evt  ) 
 

Catch-all to process a popup menu command.

Parameters:
evt called by wx

void editorctrl::onRightDown wxMouseEvent &  evt  ) 
 

Called when user right-clicks in window.

Pops up a context menu.

Parameters:
evt called by wx

void editorctrl::prevBookmark  ) 
 

Move to the previous bookmark, if any.

void editorctrl::prevLine  ) 
 

Move caret to the line above.

bool editorctrl::setAutoIndent bool  isOn  ) 
 

Turn on/off autoindent mode.

Parameters:
isOn true if auto indent should be on.

void editorctrl::setFilename wxString  fname  ) 
 

Set this buffers file name.

Parameters:
fname the new file name

void editorctrl::setMtime long  mt  )  [inline]
 

void editorctrl::setTipsList wxArrayString *  t  )  [inline]
 

void editorctrl::toggleBookmark int  pos  ) 
 

Toggle a bookmark on the line of pos.

Parameters:
pos the position in the document


The documentation for this class was generated from the following files:
Generated on Fri Mar 10 12:32:03 2006 for MonkeyFish by  doxygen 1.4.4