pub struct WindowClass {
pub class_id: Option<Id>,
pub parent_viewport: WindowClassParentViewport,
pub focus_route_parent_window_id: Option<Id>,
pub viewport_flags_override_set: ViewportFlags,
pub viewport_flags_override_clear: ViewportFlags,
pub tab_item_flags_override_set: TabItemOptions,
pub dock_node_flags_override_set: DockNodeFlags,
pub docking_always_tab_bar: bool,
pub docking_allow_unclassed: bool,
pub platform_icon_data: Option<NonNull<c_void>>,
}Expand description
Window class for docking configuration
Fields§
§class_id: Option<Id>User class ID. None means the default unclassed window class.
parent_viewport: WindowClassParentViewportHint for the platform backend parent viewport behavior.
focus_route_parent_window_id: Option<Id>ID of parent window for shortcut focus route evaluation
viewport_flags_override_set: ViewportFlagsViewport flags to set when a window of this class owns a viewport.
viewport_flags_override_clear: ViewportFlagsViewport flags to clear when a window of this class owns a viewport.
tab_item_flags_override_set: TabItemOptionsTab item flags to set when a window of this class is submitted into a dock node tab bar.
dock_node_flags_override_set: DockNodeFlagsDock node flags to set when a window of this class is hosted by a dock node.
docking_always_tab_bar: boolSet to true to enforce single floating windows of this class always having their own docking node
docking_allow_unclassed: boolSet to true to allow windows of this class to be docked/merged with an unclassed window
platform_icon_data: Option<NonNull<c_void>>Opaque platform-backend icon payload.
Dear ImGui treats this as backend-owned data. Keep the pointed-to allocation valid for as long as the platform backend may inspect this window class.
Implementations§
Source§impl WindowClass
impl WindowClass
Sourcepub fn parent_viewport(self, parent: WindowClassParentViewport) -> Self
pub fn parent_viewport(self, parent: WindowClassParentViewport) -> Self
Sets the parent viewport policy.
Sourcepub fn no_parent_viewport(self) -> Self
pub fn no_parent_viewport(self) -> Self
Requests the platform backend to avoid parenting this class’s platform windows.
Sourcepub fn parent_viewport_id(self, id: Id) -> Self
pub fn parent_viewport_id(self, id: Id) -> Self
Requests a specific parent viewport ID.
Sourcepub fn focus_route_parent_window_id(self, id: Id) -> Self
pub fn focus_route_parent_window_id(self, id: Id) -> Self
Sets the focus route parent window ID
Sourcepub fn viewport_flags_override_set(self, flags: ViewportFlags) -> Self
pub fn viewport_flags_override_set(self, flags: ViewportFlags) -> Self
Sets viewport flags when a window of this class owns a viewport.
Sourcepub fn viewport_flags_override_clear(self, flags: ViewportFlags) -> Self
pub fn viewport_flags_override_clear(self, flags: ViewportFlags) -> Self
Clears viewport flags when a window of this class owns a viewport.
Sourcepub fn viewport_flags_overrides(
self,
set: ViewportFlags,
clear: ViewportFlags,
) -> Self
pub fn viewport_flags_overrides( self, set: ViewportFlags, clear: ViewportFlags, ) -> Self
Sets and clears viewport flags when a window of this class owns a viewport.
Sourcepub fn tab_item_flags_override_set(
self,
options: impl Into<TabItemOptions>,
) -> Self
pub fn tab_item_flags_override_set( self, options: impl Into<TabItemOptions>, ) -> Self
Sets tab item flags when a window of this class is submitted into a dock node tab bar.
Sourcepub fn dock_node_flags_override_set(self, flags: DockNodeFlags) -> Self
pub fn dock_node_flags_override_set(self, flags: DockNodeFlags) -> Self
Sets dock node flags when a window of this class is hosted by a dock node.
Sourcepub fn docking_always_tab_bar(self, enabled: bool) -> Self
pub fn docking_always_tab_bar(self, enabled: bool) -> Self
Enables always showing tab bar for single floating windows
Sourcepub fn docking_allow_unclassed(self, enabled: bool) -> Self
pub fn docking_allow_unclassed(self, enabled: bool) -> Self
Allows docking with unclassed windows
Sourcepub unsafe fn platform_icon_data_raw(self, data: *mut c_void) -> Self
pub unsafe fn platform_icon_data_raw(self, data: *mut c_void) -> Self
Sets opaque icon data consumed by the platform backend.
§Safety
data must remain valid for as long as the platform backend may read it, and it must point
to the representation expected by that backend.
Trait Implementations§
Source§impl Clone for WindowClass
impl Clone for WindowClass
Source§fn clone(&self) -> WindowClass
fn clone(&self) -> WindowClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more