[−][src]Trait gtk::prelude::NotebookExtManual
Required methods
fn append_page<T: IsA<Widget>, U: IsA<Widget>>(
&self,
child: &T,
tab_label: Option<&U>
) -> u32
&self,
child: &T,
tab_label: Option<&U>
) -> u32
Appends a page to self.
child
the Widget to use as the contents of the page
tab_label
the Widget to be used as the label
for the page, or None to use the default label, “page N”
Returns
the index (starting from 0) of the appended page in the notebook, or -1 if function fails
fn append_page_menu<T, U, V>(
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
Appends a page to self, specifying the widget to use as the
label in the popup menu.
child
the Widget to use as the contents of the page
tab_label
the Widget to be used as the label
for the page, or None to use the default label, “page N”
menu_label
the widget to use as a label for the
page-switch menu, if that is enabled. If None, and tab_label
is a Label or None, then the menu label will be a newly
created label with the same text as tab_label; if tab_label
is not a Label, menu_label must be specified if the
page-switch menu is to be used.
Returns
the index (starting from 0) of the appended page in the notebook, or -1 if function fails
fn get_current_page(&self) -> Option<u32>
Returns the page number of the current page.
Returns
the index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned.
fn get_n_pages(&self) -> u32
fn get_nth_page(&self, page_num: Option<u32>) -> Option<Widget>
Returns the child widget contained in page number page_num.
page_num
the index of a page in the notebook, or -1 to get the last page
Returns
the child widget, or None if page_num
is out of bounds
fn insert_page<T, U>(
&self,
child: &T,
tab_label: Option<&U>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
&self,
child: &T,
tab_label: Option<&U>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
Insert a page into self at the given position.
child
the Widget to use as the contents of the page
tab_label
the Widget to be used as the label
for the page, or None to use the default label, “page N”
position
the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages
Returns
the index (starting from 0) of the inserted page in the notebook, or -1 if function fails
fn insert_page_menu<T, U, V>(
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
Insert a page into self at the given position, specifying
the widget to use as the label in the popup menu.
child
the Widget to use as the contents of the page
tab_label
the Widget to be used as the label
for the page, or None to use the default label, “page N”
menu_label
the widget to use as a label for the
page-switch menu, if that is enabled. If None, and tab_label
is a Label or None, then the menu label will be a newly
created label with the same text as tab_label; if tab_label
is not a Label, menu_label must be specified if the
page-switch menu is to be used.
position
the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
Returns
the index (starting from 0) of the inserted page in the notebook
fn page_num<T: IsA<Widget>>(&self, child: &T) -> Option<u32>
Finds the index of the page which contains the given child widget.
child
a Widget
Returns
the index of the page containing child, or
-1 if child is not in the notebook
fn prepend_page<T, U>(&self, child: &T, tab_label: Option<&U>) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
T: IsA<Widget>,
U: IsA<Widget>,
Prepends a page to self.
child
the Widget to use as the contents of the page
tab_label
the Widget to be used as the label
for the page, or None to use the default label, “page N”
Returns
the index (starting from 0) of the prepended page in the notebook, or -1 if function fails
fn prepend_page_menu<T, U, V>(
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
Prepends a page to self, specifying the widget to use as the
label in the popup menu.
child
the Widget to use as the contents of the page
tab_label
the Widget to be used as the label
for the page, or None to use the default label, “page N”
menu_label
the widget to use as a label for the
page-switch menu, if that is enabled. If None, and tab_label
is a Label or None, then the menu label will be a newly
created label with the same text as tab_label; if tab_label
is not a Label, menu_label must be specified if the
page-switch menu is to be used.
Returns
the index (starting from 0) of the prepended page in the notebook, or -1 if function fails
fn remove_page(&self, page_num: Option<u32>)
Removes a page from the notebook given its index in the notebook.
page_num
the index of a notebook page, starting from 0. If -1, the last page will be removed.
fn reorder_child<T: IsA<Widget>>(&self, child: &T, position: Option<u32>)
Reorders the page containing child, so that it appears in position
position. If position is greater than or equal to the number of
children in the list or negative, child will be moved to the end
of the list.
child
the child to move
position
the new position, or -1 to move to the end
fn set_current_page(&self, page_num: Option<u32>)
Switches to the page number page_num.
Note that due to historical reasons, Notebook refuses
to switch to a page unless the child widget is visible.
Therefore, it is recommended to show child widgets before
adding them to a notebook.
page_num
index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the notebook, nothing will be done.
Implementors
impl<O: IsA<Notebook>> NotebookExtManual for O[src]
fn append_page<T: IsA<Widget>, U: IsA<Widget>>(
&self,
child: &T,
tab_label: Option<&U>
) -> u32[src]
&self,
child: &T,
tab_label: Option<&U>
) -> u32
fn append_page_menu<T, U, V>(
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>, [src]
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
fn get_current_page(&self) -> Option<u32>[src]
fn get_n_pages(&self) -> u32[src]
fn get_nth_page(&self, page_num: Option<u32>) -> Option<Widget>[src]
fn insert_page<T, U>(
&self,
child: &T,
tab_label: Option<&U>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>, [src]
&self,
child: &T,
tab_label: Option<&U>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
fn insert_page_menu<T, U, V>(
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>, [src]
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>,
position: Option<u32>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,
fn page_num<T: IsA<Widget>>(&self, child: &T) -> Option<u32>[src]
fn prepend_page<T, U>(&self, child: &T, tab_label: Option<&U>) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>, [src]
T: IsA<Widget>,
U: IsA<Widget>,
fn prepend_page_menu<T, U, V>(
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>, [src]
&self,
child: &T,
tab_label: Option<&U>,
menu_label: Option<&V>
) -> u32 where
T: IsA<Widget>,
U: IsA<Widget>,
V: IsA<Widget>,