| Flutter Windows Embedder |

host_window_tooltip.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_TOOLTIP_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_TOOLTIP_H_
7
8 #include <cstdint>
9 #include "host_window.h"
10 #include "shell/platform/windows/flutter_windows_view.h"
11 #include "shell/platform/windows/window_manager.h"
12
13 namespace flutter {
14 class HostWindowTooltip : public HostWindow,
15 private FlutterWindowsViewSizingDelegate {
16 public:
17 // Creates a tooltip window.
18 HostWindowTooltip(WindowManager* window_manager,
19 FlutterWindowsEngine* engine,
20 const BoxConstraints& constraints,
21 bool is_sized_to_content,
22 GetWindowPositionCallback get_position_callback,
23 HWND parent);
24
25 // Update the position of the tooltip window based off the current size
26 // of the tooltip.
27 void UpdatePosition();
28
29 protected:
30 LRESULT HandleMessage(HWND hwnd,
31 UINT message,
32 WPARAM wparam,
33 LPARAM lparam) override;
34
35 private:
36 void DidUpdateViewSize(int32_t width, int32_t height) override;
37 WindowRect GetWorkArea() const override;
38
39 GetWindowPositionCallback get_position_callback_;
40 HWND parent_;
41 Isolate isolate_;
42
43 // Used to track whether the view is still in tasks scheduled from raster
44 // thread.
45 std::shared_ptr<int> view_alive_;
46
47 // The current width of the tooltip.
48 int width_ = 0;
49
50 // The current height of the tooltip.
51 int height_ = 0;
52 };
53 } // namespace flutter
54
55 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_TOOLTIP_H_
flutter::FlutterWindowsEngine
Definition: flutter_windows_engine.h:92
flutter::FlutterWindowsViewSizingDelegate
Definition: flutter_windows_view.h:33
flutter::HostWindow
Definition: host_window.h:29
flutter::HostWindowTooltip
Definition: host_window_tooltip.h:15
flutter::HostWindowTooltip::HostWindowTooltip
HostWindowTooltip(WindowManager *window_manager, FlutterWindowsEngine *engine, const BoxConstraints &constraints, bool is_sized_to_content, GetWindowPositionCallback get_position_callback, HWND parent)
Definition: host_window_tooltip.cc:11
flutter::HostWindowTooltip::HandleMessage
LRESULT HandleMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) override
Definition: host_window_tooltip.cc:120
flutter::HostWindowTooltip::UpdatePosition
void UpdatePosition()
Definition: host_window_tooltip.cc:85
flutter::Isolate
Definition: isolate_scope.h:15
flutter::WindowManager
Definition: window_manager.h:109
flutter_windows_view.h
host_window.h
message
Win32Message message
Definition: keyboard_unittests.cc:137
flutter
Definition: accessibility_bridge_windows.cc:11
flutter::GetWindowPositionCallback
WindowRect *(* GetWindowPositionCallback)(const WindowSize &child_size, const WindowRect &parent_rect, const WindowRect &output_rect)
Definition: window_manager.h:69
flutter::WindowRect
Definition: window_manager.h:42
window_manager.h