Natural Tiny Shell (NT-Shell) library is a tiny shell library for a small embedded system. The interface is really simple. You should only know ntshell_execute in ntshell.h. So you can port it to any embedded system easily. Please enjoy your small embedded system with it. :)

Dependents:   NaturalTinyShell_TestProgram

Embed: (wiki syntax)

« Back to documentation index

text_editor.h File Reference

text_editor.h File Reference

NT-Shell用テキストエディタモジュールの定義。 More...

Go to the source code of this file.

Functions

void text_editor_init (text_editor_t *p)
 テキストエディタを初期化する。
int text_editor_insert (text_editor_t *p, char c)
 文字を挿入する。
int text_editor_backspace (text_editor_t *p)
 文字を削除する。
int text_editor_cursor_get_position (text_editor_t *p)
 カーソル位置を取得する。
int text_editor_cursor_head (text_editor_t *p)
 カーソルを先頭に移動させる。
int text_editor_cursor_tail (text_editor_t *p)
 カーソルを最後尾に移動させる。
int text_editor_cursor_left (text_editor_t *p)
 カーソルを左へ移動させる。
int text_editor_cursor_right (text_editor_t *p)
 カーソルを右へ移動させる。
int text_editor_set_text (text_editor_t *p, char *buf)
 文字列を設定する。
int text_editor_get_text (text_editor_t *p, char *buf, int siz)
 文字列を取得する。
void text_editor_clear (text_editor_t *p)
 文字列を消去する。

Detailed Description

NT-Shell用テキストエディタモジュールの定義。

Author:
Shinichiro Nakamura

文字列の編集を論理的に扱うためのモジュール。 このモジュールはビューに関して一切感知しない。

Definition in file text_editor.h.


Function Documentation

int text_editor_backspace ( text_editor_t *  p )

文字を削除する。

Parameters:
pテキストエディタ構造体。

Definition at line 87 of file text_editor.c.

void text_editor_clear ( text_editor_t *  p )

文字列を消去する。

Parameters:
pテキストエディタ構造体。

Definition at line 227 of file text_editor.c.

int text_editor_cursor_get_position ( text_editor_t *  p )

カーソル位置を取得する。

Parameters:
pテキストエディタ構造体。

Definition at line 112 of file text_editor.c.

int text_editor_cursor_head ( text_editor_t *  p )

カーソルを先頭に移動させる。

Parameters:
pテキストエディタ構造体。

Definition at line 122 of file text_editor.c.

int text_editor_cursor_left ( text_editor_t *  p )

カーソルを左へ移動させる。

Parameters:
pテキストエディタ構造体。

Definition at line 150 of file text_editor.c.

int text_editor_cursor_right ( text_editor_t *  p )

カーソルを右へ移動させる。

Parameters:
pテキストエディタ構造体。

Definition at line 164 of file text_editor.c.

int text_editor_cursor_tail ( text_editor_t *  p )

カーソルを最後尾に移動させる。

Parameters:
pテキストエディタ構造体。

Definition at line 136 of file text_editor.c.

int text_editor_get_text ( text_editor_t *  p,
char *  buf,
int  siz 
)

文字列を取得する。

Parameters:
pテキストエディタ構造体。
buf文字列を格納するバッファ。
sizバッファサイズ。

Definition at line 206 of file text_editor.c.

void text_editor_init ( text_editor_t *  p )

テキストエディタを初期化する。

Parameters:
pテキストエディタ構造体。

Definition at line 47 of file text_editor.c.

int text_editor_insert ( text_editor_t *  p,
char  c 
)

文字を挿入する。

Parameters:
pテキストエディタ構造体。
c文字。

Definition at line 60 of file text_editor.c.

int text_editor_set_text ( text_editor_t *  p,
char *  buf 
)

文字列を設定する。

Parameters:
pテキストエディタ構造体。
buf文字列が格納されたバッファ。

Definition at line 179 of file text_editor.c.