Flutter Windows Embedder
host_window_popup.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_POPUP_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_POPUP_H_
7 
8 #include <cstdint>
9 #include "host_window_sized.h"
12 
13 namespace flutter {
15  public:
16  // Creates a popup window.
17  HostWindowPopup(WindowManager* window_manager,
18  FlutterWindowsEngine* engine,
19  const BoxConstraints& constraints,
20  GetWindowPositionCallback get_position_callback,
21  HWND parent);
22 
23  // Update the position of the popup window based off the current size
24  // of the popup.
25  void UpdatePosition();
26 
27  ~HostWindowPopup() override;
28 
29  protected:
30  void ApplyContentSize(int32_t physical_width,
31  int32_t physical_height) override;
32 
33  private:
34  WindowRect GetWorkArea() const override;
35 
36  GetWindowPositionCallback get_position_callback_;
37  HWND parent_;
38  Isolate isolate_;
39 };
40 } // namespace flutter
41 
42 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_POPUP_H_
HostWindowPopup(WindowManager *window_manager, FlutterWindowsEngine *engine, const BoxConstraints &constraints, GetWindowPositionCallback get_position_callback, HWND parent)
void ApplyContentSize(int32_t physical_width, int32_t physical_height) override
WindowRect *(* GetWindowPositionCallback)(const WindowSize &child_size, const WindowRect &parent_rect, const WindowRect &output_rect)