libui/redo/osxaltest/osxaltest.h

52 lines
1.1 KiB
C
Raw Normal View History

// 31 july 2015
#import <Cocoa/Cocoa.h>
2015-07-31 22:06:29 -05:00
#import <stdint.h>
typedef struct tAutoLayoutParams tAutoLayoutParams;
struct tAutoLayoutParams {
NSMutableArray *horz;
NSMutableArray *horzAttachLeft;
NSMutableArray *horzAttachRight;
BOOL horzFirst;
BOOL horzLast;
NSMutableArray *vert;
NSMutableArray *vertAttachTop;
NSMutableArray *vertAttachBottom;
BOOL vertFirst;
BOOL vertLast;
NSMutableDictionary *views;
uintmax_t n;
BOOL stretchy;
BOOL stretchyVert;
BOOL firstStretchy;
uintmax_t stretchyTo;
};
2015-07-31 22:06:29 -05:00
@protocol tControl
@required
- (void)tSetParent:(id<tControl>)p addToView:(NSView *)v relayout:(BOOL)relayout;
- (void)tFillAutoLayout:(tAutoLayoutParams *)p;
- (void)tRelayout;
2015-07-31 22:06:29 -05:00
@end
@interface tWindow : NSObject<tControl>
2015-08-01 13:22:45 -05:00
- (void)tSetControl:(id<tControl>)cc;
2015-08-01 14:44:06 -05:00
- (void)tSetMargined:(BOOL)m;
- (void)tShow;
@end
2015-08-01 13:22:45 -05:00
@interface tBox : NSObject<tControl>
- (id)tInitVertical:(BOOL)vert;
- (void)tAddControl:(id<tControl>)c stretchy:(BOOL)s;
@end
@interface tButton : NSObject<tControl>
- (id)tInitWithText:(NSString *)text;
@end
@interface tSpinbox : NSObject<tControl>
@end
2015-07-31 22:06:29 -05:00
extern NSString *tAutoLayoutKey(uintmax_t);