[][src]Struct gtk::PlacesOpenFlags

pub struct PlacesOpenFlags { /* fields omitted */ }

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]

impl Copy for PlacesOpenFlags[src]

impl Debug for PlacesOpenFlags[src]

impl Eq for PlacesOpenFlags[src]

impl Extend<PlacesOpenFlags> for PlacesOpenFlags[src]

impl FromIterator<PlacesOpenFlags> for PlacesOpenFlags[src]

impl<'a> FromValue<'a> for PlacesOpenFlags[src]

impl<'a> FromValueOptional<'a> for PlacesOpenFlags[src]

impl Hash for PlacesOpenFlags[src]

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]

impl PartialEq<PlacesOpenFlags> for PlacesOpenFlags[src]

impl PartialOrd<PlacesOpenFlags> for PlacesOpenFlags[src]

impl SetValue for PlacesOpenFlags[src]

impl StaticType for PlacesOpenFlags[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.