struct TitleBar {
window_frame: Frame,
title_galley: Arc<Galley>,
inner_rect: Rect,
}
Fields§
§window_frame: Frame
§title_galley: Arc<Galley>
Prepared text in the title
inner_rect: Rect
Size of the title bar in an expanded state. This size become known only after expanding window and painting its content.
Does not include the stroke, nor the separator line between the title bar and the window contents.
Implementations§
Source§impl TitleBar
impl TitleBar
fn new( ui: &Ui, title: WidgetText, show_close_button: bool, collapsible: bool, window_frame: Frame, title_bar_height_with_margin: f32, ) -> Self
Sourcefn ui(
self,
ui: &mut Ui,
content_response: &Option<Response>,
open: Option<&mut bool>,
collapsing: &mut CollapsingState,
collapsible: bool,
)
fn ui( self, ui: &mut Ui, content_response: &Option<Response>, open: Option<&mut bool>, collapsing: &mut CollapsingState, collapsible: bool, )
Finishes painting of the title bar when the window content size already known.
§Parameters
ui
:outer_rect
:content_response
: ifNone
, window is collapsed at this frame, otherwise contains a result of rendering the window contentopen
: ifNone
, no “Close” button will be rendered, otherwise renders and processes the “Close” button and writes afalse
if window was closedcollapsing
: holds the current expanding state. Can be changed by double click on the title ifcollapsible
istrue
collapsible
: iftrue
, double click on the title bar will be handled for a change ofcollapsing
state
Paints the “Close” button at the right side of the title bar and processes clicks on it.
The button is square and its size is determined by the
crate::style::Spacing::icon_width
setting.
Auto Trait Implementations§
impl Freeze for TitleBar
impl RefUnwindSafe for TitleBar
impl Send for TitleBar
impl Sync for TitleBar
impl Unpin for TitleBar
impl UnwindSafe for TitleBar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more