Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
host_window_dialog.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_DIALOG_H_
6
#define FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_DIALOG_H_
7
8
#include <optional>
9
10
#include "
host_window_sized.h
"
11
12
namespace
flutter
{
13
class
HostWindowDialog
:
public
HostWindowSized
{
14
public
:
15
// Creates a dialog window.
16
//
17
// If |owner_window| is not null, the dialog will be modal to the owner.
18
// This also affects the dialog window's styling.
19
//
20
// If |sized_to_content| is true, the window is initially sized to the
21
// minimum of |constraints| and will automatically resize to its rendered
22
// content after each frame. If |resizable| is false, the window will
23
// continue to track content size and its resize border is removed.
24
// If |resizable| is true, the user may resize the window after the initial
25
// content-based sizing.
26
//
27
// If |sized_to_content| is false, the window is created with the size
28
// specified in |preferred_size|.
29
HostWindowDialog
(
WindowManager
* window_manager,
30
FlutterWindowsEngine
*
engine
,
31
const
WindowSizeRequest
& preferred_size,
32
const
BoxConstraints
& constraints,
33
LPCWSTR title,
34
std::optional<HWND>
const
& owner_window,
35
bool
sized_to_content,
36
bool
resizable);
37
38
void
SetFullscreen
(
bool
fullscreen,
39
std::optional<FlutterEngineDisplayId> display_id)
override
;
40
bool
GetFullscreen
()
const override
;
41
42
protected
:
43
LRESULT
HandleMessage
(HWND hwnd,
44
UINT
message
,
45
WPARAM
wparam,
46
LPARAM
lparam)
override
;
47
48
private
:
49
// Enforces modal behavior. This favors enabling most recently created
50
// modal window higest up in the window hierarchy.
51
void
UpdateModalState();
52
53
static
DWORD
GetWindowStyleForDialog(std::optional<HWND>
const
& owner_window,
54
bool
resizable);
55
static
DWORD
GetExtendedWindowStyleForDialog(
56
std::optional<HWND>
const
& owner_window);
57
static
Rect
GetInitialRect(
FlutterWindowsEngine
*
engine
,
58
const
WindowSizeRequest
& preferred_size,
59
const
BoxConstraints
& constraints,
60
std::optional<HWND>
const
& owner_window,
61
bool
sized_to_content,
62
bool
resizable);
63
};
64
}
// namespace flutter
65
66
#endif
// FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_DIALOG_H_
flutter::BoxConstraints
Definition
geometry.h:83
flutter::FlutterWindowsEngine
Definition
flutter_windows_engine.h:92
flutter::HostWindowDialog
Definition
host_window_dialog.h:13
flutter::HostWindowDialog::GetFullscreen
bool GetFullscreen() const override
Definition
host_window_dialog.cc:173
flutter::HostWindowDialog::SetFullscreen
void SetFullscreen(bool fullscreen, std::optional< FlutterEngineDisplayId > display_id) override
Definition
host_window_dialog.cc:169
flutter::HostWindowDialog::HandleMessage
LRESULT HandleMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) override
Definition
host_window_dialog.cc:117
flutter::HostWindowSized
Definition
host_window_sized.h:24
flutter::Rect
Definition
geometry.h:56
flutter::WindowManager
Definition
window_manager.h:118
engine
FlutterEngine engine
Definition
main.cc:84
message
const char * message
Definition
fl_accessibility_handler.cc:21
host_window_sized.h
flutter
Definition
asset_manager.cc:10
flutter::WindowSizeRequest
Definition
window_manager.h:26
LRESULT
LONG_PTR LRESULT
Definition
windows_types.h:61
UINT
unsigned int UINT
Definition
windows_types.h:32
LPARAM
LONG_PTR LPARAM
Definition
windows_types.h:60
WPARAM
UINT_PTR WPARAM
Definition
windows_types.h:59
DWORD
unsigned long DWORD
Definition
windows_types.h:22
shell
platform
windows
host_window_dialog.h
Generated on Sun Jun 14 2026 06:12:37 for Flutter Engine Uber Docs by
1.9.8