waft_widgets/widgets/
platform_selectable_region_context_menu.rs1use crate::framework::{BuildContext, KeyRef, StatelessWidget, WidgetRef};
9use crate::widgets::selection_container::AnySelectionContainerDelegate;
10use waft_foundation::App;
11
12pub type RegisterViewFactory = fn(String, Box<dyn Fn(i32) -> Box<dyn std::any::Any>>, bool);
14
15pub struct PlatformSelectableRegionContextMenu {
20 pub key: Option<KeyRef>,
21 pub child: WidgetRef,
23}
24
25impl PlatformSelectableRegionContextMenu {
26 #[cfg_attr(debug_assertions, track_caller)]
28 pub fn new<K>(child: impl crate::framework::IntoWidget<K>) -> Self {
29 PlatformSelectableRegionContextMenu {
30 key: None,
31 child: child.into_widget(),
32 }
33 }
34
35 pub fn attach(_client: AnySelectionContainerDelegate) {
37 unimplemented!()
38 }
39
40 pub fn detach(_client: AnySelectionContainerDelegate) {
42 unimplemented!()
43 }
44
45 pub fn debug_active_client() -> Option<AnySelectionContainerDelegate> {
47 unimplemented!()
48 }
49
50 pub fn debug_reset_registry() {
52 unimplemented!()
53 }
54}
55
56impl std::fmt::Debug for PlatformSelectableRegionContextMenu {
57 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
58 f.debug_struct("PlatformSelectableRegionContextMenu")
59 .finish_non_exhaustive()
60 }
61}
62
63impl StatelessWidget for PlatformSelectableRegionContextMenu {
64 fn key(&self) -> Option<&KeyRef> {
65 self.key.as_ref()
66 }
67
68 fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef {
69 unimplemented!()
70 }
71}