Started work on rewriting uiBox.
This commit is contained in:
parent
c04abae6e4
commit
ecd1ef2231
25
darwin/box.m
25
darwin/box.m
|
@ -7,20 +7,24 @@
|
||||||
// - calling layoutSubtreeIfNeeded on a superview of the box will cause the following intrinsic content size thing to not work until the window is resized in the primary direction; this is bad if we ever add a Splitter...
|
// - calling layoutSubtreeIfNeeded on a superview of the box will cause the following intrinsic content size thing to not work until the window is resized in the primary direction; this is bad if we ever add a Splitter...
|
||||||
// - moving around randomly through the tabs does this too
|
// - moving around randomly through the tabs does this too
|
||||||
|
|
||||||
@interface boxView : NSView
|
@interface boxChild : NSObject
|
||||||
@property uiBox *b;
|
@property uiControl *c;
|
||||||
@property NSLayoutConstraint *last;
|
|
||||||
@property BOOL willRelayout;
|
|
||||||
@property BOOL stretchy;
|
@property BOOL stretchy;
|
||||||
|
@property NSLayoutPriority oldHorzHuggingPri;
|
||||||
|
@property NSLayoutPriority oldVertHuggingPri;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
struct uiBox {
|
@interface boxView : NSView {
|
||||||
uiDarwinControl c;
|
uiBox *b;
|
||||||
boxView *view;
|
NSMutableArray<boxChild> *children;
|
||||||
BOOL vertical;
|
BOOL vertical;
|
||||||
int padded;
|
int padded;
|
||||||
NSMutableArray *children; // []NSValue<uiControl *>
|
|
||||||
NSMutableArray *stretchy; // []NSNumber
|
NSLayoutConstraint *first;
|
||||||
|
NSMutableArray<NSLayoutConstraint> *inBetweens;
|
||||||
|
NSLayoutConstraint *last;
|
||||||
|
NSMutableArray<NSLayoutConstraint> *otherConstraints;
|
||||||
|
|
||||||
NSLayoutAttribute primaryStart;
|
NSLayoutAttribute primaryStart;
|
||||||
NSLayoutAttribute primaryEnd;
|
NSLayoutAttribute primaryEnd;
|
||||||
NSLayoutAttribute secondaryStart;
|
NSLayoutAttribute secondaryStart;
|
||||||
|
@ -28,7 +32,8 @@ struct uiBox {
|
||||||
NSLayoutAttribute primarySize;
|
NSLayoutAttribute primarySize;
|
||||||
NSLayoutConstraintOrientation primaryOrientation;
|
NSLayoutConstraintOrientation primaryOrientation;
|
||||||
NSLayoutConstraintOrientation secondaryOrientation;
|
NSLayoutConstraintOrientation secondaryOrientation;
|
||||||
};
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
static uiControl *childAt(uiBox *b, uintmax_t n)
|
static uiControl *childAt(uiBox *b, uintmax_t n)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue