## BtPatternListModel BtPatternListModel — data model class for widgets showing pattern of a song |

## Functions

BtPattern * | bt_pattern_list_model_get_object ()
BtPatternListModel * | bt_pattern_list_model_new ()

## Types and Values

struct | BtPatternListModel

## Object Hierarchy

        GObject
        ╰── BtPatternListModel

## Implemented Interfaces

BtPatternListModel implements GtkTreeModel.

## Includes

    #include "bt-edit.h"

## Description

A generic model representing the patterns of a machine, suitable for combo-boxes and treeview widgets.

## Functions

### bt_pattern_list_model_get_object ()

    BtPattern *
    bt_pattern_list_model_get_object (BtPatternListModel *model,
                                      GtkTreeIter *iter);

Lookup a pattern.

#### Parameters

model | the model |
iter | the iter |

#### Returns

the BtPattern for the iter.

### bt_pattern_list_model_new ()

    BtPatternListModel *
    bt_pattern_list_model_new (BtMachine *machine,
                               BtSequence *sequence,
                               gboolean skip_internal);

Creates a list model of patterns for the `machne` . The model is automatically updated when patterns are added, removed or changed. The `sequence` is used to track the use of patterns.

#### Parameters

machine | the machine |
sequence | the sequence |
skip_internal | wheter to include internal patterns or not |

#### Returns

the pattern model.

## Types and Values

### struct BtPatternListModel

    struct BtPatternListModel;

Data model for GtkTreeView or GtkComboBox.