## BtSequenceGridModel BtSequenceGridModel — data model class for widgets showing the pattern sequence of a song |

## Functions

BtSequenceGridModel * | bt_sequence_grid_model_new ()

## Properties

gulong | bars | Read / Write
gulong | length | Read / Write
BtSequenceGridModelPosFormat | pos-format | Read / Write

## Types and Values

struct | BtSequenceGridModel
enum | BtSequenceGridModelPosFormat

## Object Hierarchy

        GObject
        ╰── BtSequenceGridModel

## Implemented Interfaces

BtSequenceGridModel implements GtkTreeModel.

## Includes

    #include "bt-edit.h"

## Description

A generic model representing the track x time grid of patterns of a song. Can be shown by a treeview.

The visible length can be greater then the real length of the underlying sequence, by setting the BtSequenceGridModel::length property.

## Functions

### bt_sequence_grid_model_new ()

    BtSequenceGridModel *
    bt_sequence_grid_model_new (BtSequence *sequence,
                                BtSongInfo *song_info,
                                gulong bars);

Creates a grid model for the `sequence` . The model is automatically updated on changes in the content. It also expands its length in sync to the sequence.

To make the row-shading work, the application has to update “bars” when it changed on the view.

When setting “length” to a value greater than the real `sequence` , the model will append dummy rows. This allows the cursor to go beyond the end to expand the sequence.

#### Parameters

sequence | the sequence |
song_info | the song-info |
bars | the intial bar-filtering for the view |

#### Returns

the sequence model.

## Types and Values

### struct BtSequenceGridModel

    struct BtSequenceGridModel;

Data model for GtkTreeView or GtkComboBox.

### enum BtSequenceGridModelPosFormat

Format type for time values in the sequencer.

#### Members

BT_SEQUENCE_GRID_MODEL_POS_FORMAT_TICKS | show as number of ticks |
BT_SEQUENCE_GRID_MODEL_POS_FORMAT_TIME | show as "min:sec.msec" |
BT_SEQUENCE_GRID_MODEL_POS_FORMAT_BEATS | show as "beats.ticks" |

## Property Details

### The `“bars”` property

      “bars”                     gulong

tick stepping for the color shading.

Flags: Read / Write

Allowed values: [1,4294967295]

### The `“length”` property

      “length”                   gulong

visible length of the sequence (>= real length).

Flags: Read / Write

Allowed values: <= 4294967295

### The `“pos-format”` property

      “pos-format”               BtSequenceGridModelPosFormat

the display format for position columns.

Flags: Read / Write

Default value: BT_SEQUENCE_GRID_MODEL_POS_FORMAT_TICKS