2020-03-29 17:34:08 +00:00
|
|
|
#ifndef __qwaq_ui_draw_h
|
|
|
|
#define __qwaq_ui_draw_h
|
2020-03-02 06:22:54 +00:00
|
|
|
|
2020-03-09 17:39:18 +00:00
|
|
|
#include <Object.h>
|
|
|
|
|
2020-06-21 14:15:17 +00:00
|
|
|
#include "ruamoko/qwaq/ui/rect.h"
|
2020-03-09 17:39:18 +00:00
|
|
|
|
2020-03-17 16:39:12 +00:00
|
|
|
@class DrawBuffer;
|
2020-03-10 10:23:51 +00:00
|
|
|
|
2020-03-17 16:39:12 +00:00
|
|
|
@protocol DrawBuffer
|
|
|
|
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;
|
|
|
|
- (Rect) rect;
|
2020-03-10 10:23:51 +00:00
|
|
|
- (Extent) size;
|
|
|
|
- (int *) buffer;
|
2020-03-17 16:39:12 +00:00
|
|
|
@end
|
2020-03-10 10:23:51 +00:00
|
|
|
|
2020-03-17 16:39:12 +00:00
|
|
|
@protocol TextContext
|
2021-09-26 01:07:34 +00:00
|
|
|
- (void) release;
|
2020-03-19 04:48:48 +00:00
|
|
|
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;
|
2020-03-28 00:41:54 +00:00
|
|
|
- clearReact: (Rect) rect;
|
2020-03-17 16:39:12 +00:00
|
|
|
- (Extent) size;
|
2020-03-23 11:14:32 +00:00
|
|
|
- (void) resizeTo: (Extent) newSize; // absolute size
|
2020-03-09 17:39:18 +00:00
|
|
|
|
2020-03-19 09:37:25 +00:00
|
|
|
- (void) bkgd: (int) ch;
|
|
|
|
- (void) clear;
|
2020-03-09 17:39:18 +00:00
|
|
|
- (void) printf: (string) fmt, ...;
|
|
|
|
- (void) vprintf: (string) fmt, @va_list args;
|
|
|
|
- (void) addch: (int) ch;
|
2020-03-10 10:27:26 +00:00
|
|
|
- (void) addstr: (string) str;
|
2020-03-09 17:39:18 +00:00
|
|
|
- (void) mvprintf: (Point) pos, string fmt, ...;
|
|
|
|
- (void) mvvprintf: (Point) pos, string fmt, @va_list args;
|
|
|
|
- (void) mvaddch: (Point) pos, int ch;
|
2020-03-10 10:27:26 +00:00
|
|
|
- (void) mvaddstr: (Point) pos, string str;
|
2020-03-30 11:29:48 +00:00
|
|
|
- (void) mvhline:(Point)pos, int ch, int len;
|
|
|
|
- (void) mvvline:(Point)pos, int ch, int len;
|
2020-03-02 06:22:54 +00:00
|
|
|
@end
|
|
|
|
|
2020-03-17 16:39:12 +00:00
|
|
|
@interface DrawBuffer : Object <DrawBuffer, TextContext>
|
|
|
|
{
|
|
|
|
int *buffer;
|
|
|
|
Extent size;
|
|
|
|
Point cursor;
|
2020-03-19 09:37:25 +00:00
|
|
|
int background;
|
2020-03-17 16:39:12 +00:00
|
|
|
}
|
2020-03-30 07:30:58 +00:00
|
|
|
+(DrawBuffer *)buffer:(Extent)size;
|
|
|
|
-initWithSize:(Extent)size;
|
2020-03-17 16:39:12 +00:00
|
|
|
@end
|
|
|
|
|
2020-03-29 17:34:08 +00:00
|
|
|
#endif//__qwaq_ui_draw_h
|