Created
January 25, 2019 14:22
-
-
Save jaredly/8cb476bdce47296023d84344d9ad75dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CAMLprim value fluid_create_ScrollView(value dims_v) { | |
CAMLparam1(dims_v); | |
CAMLlocal1(view_v); | |
log("Create scroll view\n"); | |
Unpack_record4_double(dims_v, left, top, width, height); | |
NSRect frame = NSMakeRect(left, top, width, height); | |
NSScrollView* view = [[NSScrollView alloc] initWithFrame:frame]; | |
[view setHasVerticalScroller:YES]; | |
[view setHasHorizontalScroller:NO]; | |
[view setAutoresizingMask:NSViewWidthSizable | | |
NSViewHeightSizable]; | |
Wrap(view_v, view); | |
CAMLreturn(view_v); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type dims = {left: float, top: float, width: float, height: float}; | |
type scrollView; | |
let%autogen fluid_create_ScrollView = ({left, top, width, height}: dims): scrollView => {| | |
NSRect frame = NSMakeRect(left, top, width, height); | |
NSScrollView* view = [[NSScrollView alloc] initWithFrame:frame]; | |
[view setHasVerticalScroller:YES]; | |
[view setHasHorizontalScroller:NO]; | |
[view setAutoresizingMask:NSViewWidthSizable | | |
NSViewHeightSizable]; | |
return view; | |
|}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment