2004-02-04 02:35:57 +00:00
|
|
|
#ifndef __ruamoko_gui_InputLine_h
|
|
|
|
#define __ruamoko_gui_InputLine_h
|
2002-08-15 21:00:51 +00:00
|
|
|
|
2004-02-04 02:35:57 +00:00
|
|
|
#include "View.h"
|
2002-08-16 21:54:21 +00:00
|
|
|
|
2010-01-13 06:34:32 +00:00
|
|
|
struct _inputline_t {}; // opaque type :)
|
2011-02-14 13:13:55 +00:00
|
|
|
typedef struct _inputline_t *inputline_t;
|
2002-08-15 21:00:51 +00:00
|
|
|
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern inputline_t (int lines, int size, int prompt) InputLine_Create;
|
2011-07-09 12:16:38 +00:00
|
|
|
@extern void InputLine_SetPos (inputline_t il, int x, int y);
|
|
|
|
@extern void InputLine_SetCursor (inputline_t il, int cursorr);
|
2011-07-09 00:44:37 +00:00
|
|
|
@extern @overload void InputLine_SetEnter (inputline_t il, void (f)(string, void*), void *data);
|
|
|
|
@extern @overload void InputLine_SetEnter (inputline_t il, IMP imp, id obj, SEL sel);
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern void (inputline_t il, int width) InputLine_SetWidth;
|
2002-08-15 21:00:51 +00:00
|
|
|
@extern void (inputline_t il) InputLine_Destroy;
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern void (inputline_t il, int save) InputLine_Clear;
|
|
|
|
@extern void (inputline_t il, int ch) InputLine_Process;
|
2002-08-20 21:19:53 +00:00
|
|
|
@extern void (inputline_t il) InputLine_Draw;
|
2002-08-15 21:00:51 +00:00
|
|
|
@extern void (inputline_t il, string str) InputLine_SetText;
|
|
|
|
@extern string (inputline_t il) InputLine_GetText;
|
|
|
|
|
2004-02-04 02:35:57 +00:00
|
|
|
@interface InputLine: View
|
2002-08-15 21:00:51 +00:00
|
|
|
{
|
2002-08-17 05:27:34 +00:00
|
|
|
inputline_t il;
|
2002-08-15 21:00:51 +00:00
|
|
|
}
|
2002-08-17 05:27:34 +00:00
|
|
|
|
2011-03-25 07:46:32 +00:00
|
|
|
- (id) initWithBounds: (Rect)aRect promptCharacter: (int)char;
|
2002-08-17 05:27:34 +00:00
|
|
|
|
2011-03-23 12:35:10 +00:00
|
|
|
- (void) setBasePosFromView: (View *) view;
|
2011-03-25 07:46:32 +00:00
|
|
|
- (void) setWidth: (int)width;
|
2011-07-09 00:44:37 +00:00
|
|
|
- (void) setEnter: obj message:(SEL) msg;
|
2004-02-13 05:36:35 +00:00
|
|
|
- (void) cursor: (BOOL)cursor;
|
|
|
|
- (void) draw;
|
2002-08-17 05:27:34 +00:00
|
|
|
|
2011-03-25 07:46:32 +00:00
|
|
|
- (void) processInput: (int)key;
|
2002-08-17 05:27:34 +00:00
|
|
|
|
|
|
|
- (id) setText: (string)text;
|
|
|
|
- (string) text;
|
|
|
|
|
2002-08-15 21:00:51 +00:00
|
|
|
@end
|
|
|
|
|
2004-02-13 05:36:35 +00:00
|
|
|
@interface InputLineBox: View
|
|
|
|
{
|
2011-02-14 13:13:55 +00:00
|
|
|
InputLine *input_line;
|
2004-02-13 05:36:35 +00:00
|
|
|
}
|
2011-03-25 07:46:32 +00:00
|
|
|
- (id) initWithBounds: (Rect)aRect promptCharacter: (int)char;
|
2004-02-13 05:36:35 +00:00
|
|
|
|
2011-03-25 07:46:32 +00:00
|
|
|
- (void) setWidth: (int)width;
|
2011-07-09 00:44:37 +00:00
|
|
|
- (void) setEnter: obj message:(SEL) msg;
|
2004-02-13 05:36:35 +00:00
|
|
|
- (void) cursor: (BOOL)cursor;
|
|
|
|
|
2011-03-25 07:46:32 +00:00
|
|
|
- (void) processInput: (int)key;
|
2004-02-13 05:36:35 +00:00
|
|
|
|
|
|
|
- (id) setText: (string)text;
|
|
|
|
- (string) text;
|
|
|
|
@end
|
|
|
|
|
2004-02-04 02:35:57 +00:00
|
|
|
#endif //__ruamoko_gui_InputLine_h
|