## BtMachineCanvasItem

BtMachineCanvasItem — class for the editor machine views machine canvas item

## Synopsis

    #include "bt-edit.h"

    struct              BtMachineCanvasItem;
    BtMachineCanvasItem * bt_machine_canvas_item_new        (const BtMainPageMachines *main_page_machines,
                                                             BtMachine *machine,
                                                             gdouble xpos,
                                                             gdouble ypos,
                                                             gdouble zoom);
    void                bt_machine_show_properties_dialog   (BtMachine *machine);
    void                bt_machine_show_preferences_dialog  (BtMachine *machine);
    void                bt_machine_show_analyzer_dialog     (BtMachine *machine);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GnomeCanvasItem
                         +----GnomeCanvasGroup
                               +----BtMachineCanvasItem

## Properties

      "analysis-dialog"          BtSignalAnalysisDialog*  : Read
      "machine"                  BtMachine*            : Read / Write
      "machines-page"            BtMainPageMachines*   : Read / Write
      "preferences-dialog"       BtMachinePreferencesDialog*  : Read
      "properties-dialog"        BtMachinePropertiesDialog*  : Read
      "zoom"                     gdouble               : Read / Write

## Signals

      "position-changed"                               : No Hooks
      "start-connect"                                  : No Hooks

## Description

The canvas object emits "position-changed" signal after it has been moved.

## Details

### struct BtMachineCanvasItem

    struct BtMachineCanvasItem;

the root window for the editor application

### bt_machine_canvas_item_new ()

    BtMachineCanvasItem * bt_machine_canvas_item_new        (const BtMainPageMachines *main_page_machines,
                                                             BtMachine *machine,
                                                             gdouble xpos,
                                                             gdouble ypos,
                                                             gdouble zoom);

Create a new instance

`main_page_machines` : | the machine page the new item belongs to
`machine` : | the machine for which a canvas item should be created
`xpos` : | the horizontal location
`ypos` : | the vertical location
`zoom` : | the zoom ratio
Returns : | the new instance or `NULL` in case of an error

### bt_machine_show_properties_dialog ()

    void                bt_machine_show_properties_dialog   (BtMachine *machine);

Shows the machine properties dialog.

`machine` : | machine to show the dialog for

Since 0.6

### bt_machine_show_preferences_dialog ()

    void                bt_machine_show_preferences_dialog  (BtMachine *machine);

Shows the machine preferences dialog.

`machine` : | machine to show the dialog for

Since 0.6

### bt_machine_show_analyzer_dialog ()

    void                bt_machine_show_analyzer_dialog     (BtMachine *machine);

Shows the machine signal analysis dialog.

`machine` : | machine to show the dialog for

Since 0.6

## Property Details

### The `"analysis-dialog"` property

      "analysis-dialog"          BtSignalAnalysisDialog*  : Read

Get the the analysis dialog if shown.

### The `"machine"` property

      "machine"                  BtMachine*            : Read / Write

Set machine object, the item belongs to.

### The `"machines-page"` property

      "machines-page"            BtMainPageMachines*   : Read / Write

Set application object, the window belongs to.

### The `"preferences-dialog"` property

      "preferences-dialog"       BtMachinePreferencesDialog*  : Read

Get the the preferences dialog if shown.

### The `"properties-dialog"` property

      "properties-dialog"        BtMachinePropertiesDialog*  : Read

Get the the properties dialog if shown.

### The `"zoom"` property

      "zoom"                     gdouble               : Read / Write

Set zoom ratio for the machine item.

Allowed values: [0,100]

Default value: 1

## Signal Details

### The `"position-changed"` signal

    void                user_function                      (BtMachineCanvasItem *self,
                                                            gpointer             user_data)      : No Hooks

Signals that item has been moved around. The new position can be read from the canvas item.

`self` : | the machine-canvas-item object that emitted the signal
`user_data` : | user data set when the signal handler was connected.

### The `"start-connect"` signal

    void                user_function                      (BtMachineCanvasItem *self,
                                                            gpointer             user_data)      : No Hooks

Signals that a connect should be made starting from this machine.

`self` : | the machine-canvas-item object that emitted the signal
`user_data` : | user data set when the signal handler was connected.