mEditClass Struct Reference
[mEdit]
the VTable of mEdit, derived from mScrollViewClass.
More...
#include <medit.h>
Detailed Description
the VTable of mEdit, derived from mScrollViewClass.
- See also:
- mScrollViewClass
- void setContent (mEdit *self, const char *str, int start, int len);
set the text content of the edit. - Parameters:
-
| str | - the text to be shown on edit. |
| start | - the start of the text to be shown on edit. |
| len | - length of the text to be shown on edit. |
- Returns:
- void
- void replaceText (mEdit *self, const char* str, int start, int len, int replace_start, int replace_end);
replace text. - Parameters:
-
| str | - the new text |
| start | - the start of the str to be used |
| len | - the length of the str to be used |
| replace_start | - the start of the text to be replaced in the edit. |
| replace_end | - the end of the text to be repalced in the edit. |
- Returns:
- void
- void insert (mEdit *self, const char* str, int start, int len, int start_at);
insert text. - Parameters:
-
| str | - the new text |
| start | - the start of the str to be inserted |
| len | - the length of the str to be inserted |
| start_at | - insert position. |
- Returns:
- void
- void append (mEdit *self, const char* str, int start, int len);
append the str into the edit text. - Parameters:
-
| str | - The new text |
| start | - The start of the str to be appended |
| len | - The length of the str to be appended |
- Returns:
- void
- int getTextLength (mEdit *self);
get the count of the edit text. - Returns:
- The count of the text
- int getContent (mEdit *self, char *strbuff, int buf_len, int start, int end);
get the text of the edit. - Parameters:
-
| strbuff | - The string buffer to save the return string |
| buf_len | - The size of strbuff |
| start | - Start position to get text |
| end | - End position to get text |
- Returns:
- The real count of text in strbuff.
- int setTextAttr (mEdit *self, int start, int end, TextAttribute *attr);
unimplemented.
- TextAttribute* getTextAttr (mEdit *self, int start, int end, int *p_end);
unimplemented.
- int setSel (mEdit *self, int start, int end);
set the selected position. - Parameters:
-
| start | - The start of the selected position |
| end | - The end of the selected position |
- Returns:
- The length of selected text , -1 for Failed.
- int getSel (mEdit *self, int *pstart, int *pend);
get the selected position. - Parameters:
-
| pstart | - The start of the selected position |
| pend | - The end of the selected position |
- Returns:
- 0 for Succeed , -1 for Failed.
- void setMargin (mEdit *self, int left, int top, int right, int bottom);
set the margin - Parameters:
-
| left | - the new margin left value |
| top | - the new margin top value |
| right | - the new margin right value |
| bottom | - the new margin bottom value |
- void copy (mEdit *self);
copy the selected text to clip board.
- void cut (mEdit *self);
cut the selected text to clip board.
- void paste (mEdit *self);
paste the text in clip board into edit.
- TextCopyPaste* setCopyPaste (mEdit *self, TextCopyPaste* cp);
set a new copyPaste instance create by user. - Parameters:
-
| cp | - Pointer of the new copyPaste instance |
- Returns:
- The old one.
- void undo (mEdit *self);
unimplemented
- void redo (mEdit *self);
unimplemented
- TextUndoRedoInfo* setUndoRedo (mEdit *self, TextUndoRedoInfo* ur);
unimplemented
- BOOL makevisible (mEdit *self, int pos);
make the position visible - Parameters:
-
| pos | - the position to be visible. |
- Returns:
- TRUE for succeed, FALSE for failed.
The documentation for this struct was generated from the following file: