[−][src]Struct imgui::ChildWindow
Builder for a child window
Implementations
impl<'a> ChildWindow<'a>
[src]
pub fn new<T: Into<Id<'a>>>(id: T) -> ChildWindow<'a>
[src]
Creates a new child window builder with the given ID
pub fn flags(self, flags: WindowFlags) -> Self
[src]
Replace current window flags with the given value
pub fn size(self, size: [f32; 2]) -> Self
[src]
Sets the child window size.
For each independent axis of size:
> 0.0
: fixed size= 0.0
: use remaining host window size< 0.0
: use remaining host window size minus abs(size)
pub fn content_size(self, size: [f32; 2]) -> Self
[src]
Sets the window content size, which can be used to enforce scrollbars.
Does not include window decorations (title bar, menu bar, etc.). Set one of the values to 0.0 to leave the size automatic.
pub fn focused(self, focused: bool) -> Self
[src]
Sets the window focused state, which can be used to bring the window to front
pub fn bg_alpha(self, bg_alpha: f32) -> Self
[src]
Sets the background color alpha value.
See also draw_background
pub fn border(self, border: bool) -> Self
[src]
Enables/disables the child window border.
Disabled by default.
pub fn scroll_bar(self, value: bool) -> Self
[src]
Enables/disables scrollbars (scrolling is still possible with the mouse or programmatically).
Enabled by default.
pub fn scrollable(self, value: bool) -> Self
[src]
Enables/disables vertical scrolling with the mouse wheel.
Enabled by default.
When enabled, child windows forward the mouse wheel to the parent unless NO_SCROLLBAR
is also set.
pub fn always_auto_resize(self, value: bool) -> Self
[src]
Enables/disables resizing the window to its content on every frame.
Disabled by default.
pub fn draw_background(self, value: bool) -> Self
[src]
Enables/disables drawing of background color and outside border.
Enabled by default.
pub fn mouse_inputs(self, value: bool) -> Self
[src]
Enables/disables catching mouse input.
Enabled by default. Note: Hovering test will pass through when disabled
pub fn menu_bar(self, value: bool) -> Self
[src]
Enables/disables the menu bar.
Disabled by default.
pub fn horizontal_scrollbar(self, value: bool) -> Self
[src]
Enables/disables the horizontal scrollbar.
Disabled by default.
pub fn focus_on_appearing(self, value: bool) -> Self
[src]
Enables/disables taking focus when transitioning from hidden to visible state.
Enabled by default.
pub fn bring_to_front_on_focus(self, value: bool) -> Self
[src]
Enables/disables bringing the window to front when taking focus (e.g. clicking it or programmatically giving it focus).
Enabled by default.
pub fn always_vertical_scrollbar(self, value: bool) -> Self
[src]
When enabled, forces the vertical scrollbar to render regardless of the content size.
Disabled by default.
pub fn always_horizontal_scrollbar(self, value: bool) -> Self
[src]
When enabled, forces the horizontal scrollbar to render regardless of the content size.
Disabled by default.
pub fn always_use_window_padding(self, value: bool) -> Self
[src]
When enabled, ensures child windows without border use style.window_padding
.
Disabled by default.
pub fn nav_inputs(self, value: bool) -> Self
[src]
Enables/disables gamepad/keyboard navigation within the window.
Enabled by default.
pub fn nav_focus(self, value: bool) -> Self
[src]
Enables/disables focusing toward this window with gamepad/keyboard navigation (e.g. CTRL+TAB).
Enabled by default.
pub fn no_nav(self) -> Self
[src]
Disable gamepad/keyboard navigation and focusing.
Shorthand for
.nav_inputs(false)
.nav_focus(false)
pub fn no_inputs(self) -> Self
[src]
Don't handle input.
Shorthand for
.mouse_inputs(false)
.nav_inputs(false)
.nav_focus(false)
pub fn begin(self, ui: &Ui<'_>) -> Option<ChildWindowToken>
[src]
Creates a child window and starts append to it.
Returns Some(ChildWindowToken)
if the window is visible. After content has been
rendered, the token must be ended by calling .end()
.
Returns None
if the window is not visible and no content should be rendered.
pub fn build<F: FnOnce()>(self, ui: &Ui<'_>, f: F)
[src]
Creates a child window and runs a closure to construct the contents.
Note: the closure is not called if no window content is visible (e.g. window is collapsed or fully clipped).
Trait Implementations
impl<'a> Clone for ChildWindow<'a>
[src]
fn clone(&self) -> ChildWindow<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for ChildWindow<'a>
[src]
impl<'a> Debug for ChildWindow<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ChildWindow<'a>
impl<'a> !Send for ChildWindow<'a>
impl<'a> !Sync for ChildWindow<'a>
impl<'a> Unpin for ChildWindow<'a>
impl<'a> UnwindSafe for ChildWindow<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,