[−][src]Struct gtk::PlacesOpenFlags
These flags serve two purposes. First, the application can call PlacesSidebar::set_open_flags
using these flags as a bitmask. This tells the sidebar that the application is able to open
folders selected from the sidebar in various ways, for example, in new tabs or in new windows in
addition to the normal mode.
Second, when one of these values gets passed back to the application in the
PlacesSidebar::open-location
signal, it means that the application should
open the selected location in the normal way, in a new tab, or in a new
window. The sidebar takes care of determining the desired way to open the location,
based on the modifier keys that the user is pressing at the time the selection is made.
If the application never calls PlacesSidebar::set_open_flags
, then the sidebar will only
use PlacesOpenFlags::Normal
in the PlacesSidebar::open-location
signal. This is the
default mode of operation.
Implementations
impl PlacesOpenFlags
[src]
pub const NORMAL: PlacesOpenFlags
[src]
This is the default mode that PlacesSidebar
uses if no other flags
are specified. It indicates that the calling application should open the selected location
in the normal way, for example, in the folder view beside the sidebar.
pub const NEW_TAB: PlacesOpenFlags
[src]
When passed to PlacesSidebar::set_open_flags
, this indicates
that the application can open folders selected from the sidebar in new tabs. This value
will be passed to the PlacesSidebar::open-location
signal when the user selects
that a location be opened in a new tab instead of in the standard fashion.
pub const NEW_WINDOW: PlacesOpenFlags
[src]
Similar to PlacesOpenFlags::NewTab
, but indicates that the application
can open folders in new windows.
pub const fn empty() -> PlacesOpenFlags
[src]
Returns an empty set of flags
pub const fn all() -> PlacesOpenFlags
[src]
Returns the set containing all flags.
pub const fn bits(&self) -> u32
[src]
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<PlacesOpenFlags>
[src]
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> PlacesOpenFlags
[src]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> PlacesOpenFlags
[src]
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn is_empty(&self) -> bool
[src]
Returns true
if no flags are currently stored.
pub const fn is_all(&self) -> bool
[src]
Returns true
if all flags are currently set.
pub const fn intersects(&self, other: PlacesOpenFlags) -> bool
[src]
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: PlacesOpenFlags) -> bool
[src]
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: PlacesOpenFlags)
[src]
Inserts the specified flags in-place.
pub fn remove(&mut self, other: PlacesOpenFlags)
[src]
Removes the specified flags in-place.
pub fn toggle(&mut self, other: PlacesOpenFlags)
[src]
Toggles the specified flags in-place.
pub fn set(&mut self, other: PlacesOpenFlags, value: bool)
[src]
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Binary for PlacesOpenFlags
[src]
impl BitAnd<PlacesOpenFlags> for PlacesOpenFlags
[src]
type Output = PlacesOpenFlags
The resulting type after applying the &
operator.
fn bitand(self, other: PlacesOpenFlags) -> PlacesOpenFlags
[src]
Returns the intersection between the two sets of flags.
impl BitAndAssign<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn bitand_assign(&mut self, other: PlacesOpenFlags)
[src]
Disables all flags disabled in the set.
impl BitOr<PlacesOpenFlags> for PlacesOpenFlags
[src]
type Output = PlacesOpenFlags
The resulting type after applying the |
operator.
fn bitor(self, other: PlacesOpenFlags) -> PlacesOpenFlags
[src]
Returns the union of the two sets of flags.
impl BitOrAssign<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn bitor_assign(&mut self, other: PlacesOpenFlags)
[src]
Adds the set of flags.
impl BitXor<PlacesOpenFlags> for PlacesOpenFlags
[src]
type Output = PlacesOpenFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: PlacesOpenFlags) -> PlacesOpenFlags
[src]
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn bitxor_assign(&mut self, other: PlacesOpenFlags)
[src]
Toggles the set of flags.
impl Clone for PlacesOpenFlags
[src]
fn clone(&self) -> PlacesOpenFlags
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PlacesOpenFlags
[src]
impl Debug for PlacesOpenFlags
[src]
impl Eq for PlacesOpenFlags
[src]
impl Extend<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn extend<T: IntoIterator<Item = PlacesOpenFlags>>(&mut self, iterator: T)
[src]
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl FromIterator<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn from_iter<T: IntoIterator<Item = PlacesOpenFlags>>(
iterator: T
) -> PlacesOpenFlags
[src]
iterator: T
) -> PlacesOpenFlags
impl<'a> FromValue<'a> for PlacesOpenFlags
[src]
unsafe fn from_value(value: &Value) -> Self
[src]
impl<'a> FromValueOptional<'a> for PlacesOpenFlags
[src]
unsafe fn from_value_optional(value: &Value) -> Option<Self>
[src]
impl Hash for PlacesOpenFlags
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for PlacesOpenFlags
[src]
impl Not for PlacesOpenFlags
[src]
type Output = PlacesOpenFlags
The resulting type after applying the !
operator.
fn not(self) -> PlacesOpenFlags
[src]
Returns the complement of this set of flags.
impl Octal for PlacesOpenFlags
[src]
impl Ord for PlacesOpenFlags
[src]
fn cmp(&self, other: &PlacesOpenFlags) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn eq(&self, other: &PlacesOpenFlags) -> bool
[src]
fn ne(&self, other: &PlacesOpenFlags) -> bool
[src]
impl PartialOrd<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn partial_cmp(&self, other: &PlacesOpenFlags) -> Option<Ordering>
[src]
fn lt(&self, other: &PlacesOpenFlags) -> bool
[src]
fn le(&self, other: &PlacesOpenFlags) -> bool
[src]
fn gt(&self, other: &PlacesOpenFlags) -> bool
[src]
fn ge(&self, other: &PlacesOpenFlags) -> bool
[src]
impl SetValue for PlacesOpenFlags
[src]
impl StaticType for PlacesOpenFlags
[src]
fn static_type() -> Type
[src]
impl StructuralEq for PlacesOpenFlags
[src]
impl StructuralPartialEq for PlacesOpenFlags
[src]
impl Sub<PlacesOpenFlags> for PlacesOpenFlags
[src]
type Output = PlacesOpenFlags
The resulting type after applying the -
operator.
fn sub(self, other: PlacesOpenFlags) -> PlacesOpenFlags
[src]
Returns the set difference of the two sets of flags.
impl SubAssign<PlacesOpenFlags> for PlacesOpenFlags
[src]
fn sub_assign(&mut self, other: PlacesOpenFlags)
[src]
Disables all flags enabled in the set.
impl UpperHex for PlacesOpenFlags
[src]
Auto Trait Implementations
impl RefUnwindSafe for PlacesOpenFlags
impl Send for PlacesOpenFlags
impl Sync for PlacesOpenFlags
impl Unpin for PlacesOpenFlags
impl UnwindSafe for PlacesOpenFlags
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,
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
T: ToValue + SetValue + Send + ?Sized,
fn to_send_value(&self) -> SendValue
impl<T> ToValue for T where
T: SetValue + ?Sized,
T: SetValue + ?Sized,
fn to_value(&self) -> Value
fn to_value_type(&self) -> Type
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.
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>,