| Flutter macOS Embedder |

Instance Methods | List of all members
NSWindow(FlutterWindowSizing) Category Reference

## Instance Methods
(void) | - flutterSetContentSize:
(void) | - flutterSetConstraints:

## Detailed Description

Definition at line 38 of file FlutterWindowController.mm.

## Method Documentation

## ◆ flutterSetConstraints:

- (void) flutterSetConstraints: |  | (FlutterWindowConstraints) | constraints |

Definition at line 30 of file FlutterWindowController.mm.

50 :(FlutterWindowConstraints)constraints {
51 NSSize size = [self frameRectForContentRect:self.frame].size;
52 NSSize originalSize = size;
53 [self setContentMinSize:NSMakeSize(constraints.min_width, constraints.min_height)];
54 size.width = std::max(size.width, constraints.min_width);
55 size.height = std::max(size.height, constraints.min_height);
56 if (constraints.max_width > 0 && constraints.max_height > 0) {
57 [self setContentMaxSize:NSMakeSize(constraints.max_width, constraints.max_height)];
58 size.width = std::min(size.width, constraints.max_width);
59 size.height = std::min(size.height, constraints.max_height);
60 } else {
61 [self setContentMaxSize:NSMakeSize(CGFLOAT_MAX, CGFLOAT_MAX)];
62 }
63 if (!NSEqualSizes(originalSize, size)) {
64 [self setContentSize:size];
65 }
66 }
FlutterWindowConstraints
Definition: FlutterWindowController.h:53
FlutterWindowConstraints::max_width
double max_width
Definition: FlutterWindowController.h:56
FlutterWindowConstraints::min_height
double min_height
Definition: FlutterWindowController.h:55
FlutterWindowConstraints::max_height
double max_height
Definition: FlutterWindowController.h:57
FlutterWindowConstraints::min_width
double min_width
Definition: FlutterWindowController.h:54

## ◆ flutterSetContentSize:

- (void) flutterSetContentSize: |  | (FlutterWindowSize) | contentSize |

Definition at line 30 of file FlutterWindowController.mm.

46 :(FlutterWindowSize)contentSize {
47 [self setContentSize:NSMakeSize(contentSize.width, contentSize.height)];
48 }
FlutterWindowSize
Definition: FlutterWindowController.h:41

The documentation for this category was generated from the following file:

- shell/platform/darwin/macos/framework/Source/FlutterWindowController.mm