#include <vdktextview.h>
Inheritance diagram for VDKTextView:
VDKTextView::VDKTextView | ( | VDKForm * | owner, | |
VDKTextBuffer * | buffer = NULL , |
|||
int | left_border = 0 | |||
) |
Constructor
owner | ||
buffer | NULL widget will make his own buffer, otherwise will share <buffer> | |
left_border | if greater than 0 a left window will be made with <left_border> size |
VDKTextView::~VDKTextView | ( | ) | [virtual] |
Destructor
void VDKTextView::SetForeground | ( | VDKRgb | rgb, | |
GtkStateType | state = GTK_STATE_NORMAL | |||
) | [virtual] |
void VDKTextView::SetBackground | ( | VDKRgb | color, | |
GtkStateType | state = GTK_STATE_NORMAL | |||
) | [virtual] |
void VDKTextView::SetFont | ( | VDKFont * | font | ) | [virtual] |
Sets object font
Reimplemented from VDKObject.
VDKTextBuffer * VDKTextView::Buffer | ( | VDKTextBuffer * | buff = NULL |
) |
Sets/Gets text buffer. Several text views can share same text buffer:
VDKTextBuffer* textbuff = new VDKTextBuffer(); VDKTextView view = new VDKTextView(this,textbuff); VDKTextView view1 = new VDKTextView(this); view1->Buffer(textbuff);
void VDKTextView::TextBorder | ( | int | size, | |
int | which = TVB_ALL | |||
) |
Sets borders around text window.
size | border size in pixels | |
which | side border should be set
|
void VDKTextView::ScrollToPos | ( | int | pointer = -1 , |
|
int | margin = 0 | |||
) |
Scrolls to a pointer pos or (default) to current pointer position, leaving <margin> pixels free
void VDKTextView::ScrollToLine | ( | int | line, | |
int | col, | |||
int | margin = 0 | |||
) |
Scrolls to a line,column leaving <margin> pixels free
bool VDKTextView::LoadFromFile | ( | char * | filename | ) | [inline] |
Load text buffer with a file
filename |
void VDKTextView::Clear | ( | ) | [inline] |
Clears text buffer deleting all text.
gchar* VDKTextView::GetChars | ( | int | start = 0 , |
|
int | end = -1 | |||
) | [inline] |
Returns a text segment
start | starting position | |
end | ending position, if -1 all text buffer from start to end will be returned. |
bool VDKTextView::SaveToFile | ( | char * | filename | ) | [inline] |
Save buffer to file
void VDKTextView::Thaw | ( | ) | [inline] |
maintained for compatibility with old text widgets, but is dummy
void VDKTextView::Freeze | ( | ) | [inline] |
maintained for compatibility with old text widgets, but is dummy
void VDKTextView::Undo | ( | void | ) | [inline] |
Undoes last operation
void VDKTextView::Eol | ( | ) | [inline] |
Inserts a new line at insertion point
void VDKTextView::TextInsert | ( | const char * | txt, | |
int | nchar = -1 | |||
) | [inline] |
Inserts text at cursor position.
txt | null terminating string to be inserted | |
nchars | how many chars have to be inserted (-1 means all) |
void VDKTextView::ForwardDelete | ( | int | nchars | ) | [inline] |
Forward delete chars from insertion point
void VDKTextView::BackwardDelete | ( | int | nchars | ) | [inline] |
Backward delete chars from insertion point
bool VDKTextView::IsLineVisible | ( | int | line | ) | [inline] |
Answer if a line is visible or not line are counted from 0
line |
int VDKTextView::GetLineAtOffset | ( | int | offset | ) | [inline] |
Gets line number at a buffer position
offset | buffer offset position (counting from 0) on error returns -1 |
VDKReadWriteValueProp<VDKTextView,int> VDKTextView::Pointer |
Sets/gets text insertion position expressed in chars from text beginning. (counting from 0, gets -1 on failure)
VDKReadWriteValueProp<VDKTextView,int> VDKTextView::Column |
Sets/gets text insertion position expressed in column offset
VDKReadWriteValueProp<VDKTextView,int> VDKTextView::Line |
Sets/gets text insertion position expressed in lines
VDKReadOnlyValueProp<VDKTextView,int> VDKTextView::FirstVisibleLine |
Gets first visible line (lines are counted from 0)
VDKReadOnlyValueProp<VDKTextView,int> VDKTextView::LastVisibleLine |
Gets last visible line (lines are counted from 0)
VDKReadWriteValueProp<VDKTextView,bool> VDKTextView::Changed |
Sets/gets modified flag