class Gtk::Bitset
 
  - Gtk::Bitset
 - Reference
 - Object
 
Overview
A set of unsigned integers.
Another name for this data structure is “bitmap”.
The current implementation is based on roaring bitmaps.
A bitset allows adding a set of integers and provides support for set operations
like unions, intersections and checks for equality or if a value is contained
in the set. Gtk::Bitset also contains various functions to query metadata about
the bitset, such as the minimum or maximum values or its size.
The fastest way to iterate values in a bitset is Gtk::BitsetIter.
The main use case for Gtk::Bitset is implementing complex selections for
Gtk::SelectionModel.
Defined in:
lib/gi-crystal/src/auto/gtk-4.0/bitset.crConstructors
- .new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
 - .new_range(start : UInt32, n_items : UInt32) : self
 
Class Method Summary
- 
        .g_type : UInt64
        
          
Returns the type id (GType) registered in GLib type system.
 
Instance Method Summary
- #add(value : UInt32) : Bool
 - #add_range(start : UInt32, n_items : UInt32) : Nil
 - #add_range_closed(first : UInt32, last : UInt32) : Nil
 - #add_rectangle(start : UInt32, width : UInt32, height : UInt32, stride : UInt32) : Nil
 - #contains(value : UInt32) : Bool
 - #copy : Gtk::Bitset
 - #difference(other : Gtk::Bitset) : Nil
 - #equals(other : Gtk::Bitset) : Bool
 - #finalize
 - #intersect(other : Gtk::Bitset) : Nil
 - #is_empty : Bool
 - #maximum : UInt32
 - #minimum : UInt32
 - #nth(nth : UInt32) : UInt32
 - #ref : Gtk::Bitset
 - #remove(value : UInt32) : Bool
 - #remove_all : Nil
 - #remove_range(start : UInt32, n_items : UInt32) : Nil
 - #remove_range_closed(first : UInt32, last : UInt32) : Nil
 - #remove_rectangle(start : UInt32, width : UInt32, height : UInt32, stride : UInt32) : Nil
 - #shift_left(amount : UInt32) : Nil
 - #shift_right(amount : UInt32) : Nil
 - #size : UInt64
 - #size_in_range(first : UInt32, last : UInt32) : UInt64
 - #splice(position : UInt32, removed : UInt32, added : UInt32) : Nil
 - #subtract(other : Gtk::Bitset) : Nil
 - #to_unsafe : Pointer(Void)
 - #union(other : Gtk::Bitset) : Nil
 - #unref : Nil