|
#include <CEditor.h>

Public Member Functions | |
| CEditor (int layoutSize=100, CLayoutAlign layoutAlign=SP_ALIGN_TOP) | |
| ~CEditor () | |
| Destructor. | |
| Fl_Text_Buffer * | textBuffer () |
| Retruns internal text buffer. | |
| Fl_Text_Buffer * | styleBuffer () |
| Retruns internal style buffer. | |
| virtual bool | preferredSize (int &w, int &h) |
| void | cursorRowCol (int &row, int &col) |
| bool | wrapMode () |
| Returns current wrap mode. | |
| void | wrapMode (bool wm) |
| Sets current wrap mode. | |
| int | handle (int event) |
| Special version of handle() function. | |
Class CEditor is the Fl_Text_Editor combined with the layout client. It has a modified handle() function to track the current cursor position. It also allocates the text buffer in constructor and destroys it in destructor.
| sptk::CEditor::CEditor | ( | int | layoutSize = 100, |
|
| CLayoutAlign | layoutAlign = SP_ALIGN_TOP | |||
| ) |
Constructor in SPTK style
| layoutSize | int, widget align in layout | |
| layoutAlign | CLayoutAlign, widget align in layout |
| void sptk::CEditor::cursorRowCol | ( | int & | row, | |
| int & | col | |||
| ) |
Returns current cursor position
| row | int&, row number | |
| col | int&, column number |
| virtual bool sptk::CEditor::preferredSize | ( | int & | w, | |
| int & | h | |||
| ) | [virtual] |
Computes the optimal widgets size
| w | int&, input - width offered by the program, output - width required by widget | |
| h | int&, input - height offered by the program, output - height required by widget |
Reimplemented from sptk::CLayoutClient.