CrPanner

CrPanner — A object for setting up panning on a CrCanvas widget.

Synopsis

                    CrPanner;
CrPanner*           cr_panner_new                       (CrCanvas *canvas,
                                                         const gchar *first_arg_name,
                                                         ...);
void                cr_panner_activate                  (CrPanner *panner);
void                cr_panner_deactivate                (CrPanner *panner);

Object Hierarchy

  GObject
   +----CrPanner

Properties

  "active"                   gboolean              : Read / Write
  "button"                   gint                  : Read / Write
  "canvas"                   CrCanvas*             : Read / Write
  "cursor"                   gint                  : Read / Write

Signals

  "activate"                                       : Run First
  "deactivate"                                     : Run First
  "pan"                                            : Run First

Description

Details

CrPanner

typedef struct _CrPanner CrPanner;


cr_panner_new ()

CrPanner*           cr_panner_new                       (CrCanvas *canvas,
                                                         const gchar *first_arg_name,
                                                         ...);

A factory method to create a new CrPanner and connect it to a canvas in one step.

canvas :

The canvas device that this panner will be used with.

first_arg_name :

A list of object argument name/value pairs, NULL-terminated, used to configure the item.

... :

Returns :

The newly created CrPanner object. Unlike with the constructors for CrItem implementations, you own the returned reference. You should call g_object_unref when you are finished with this object.

cr_panner_activate ()

void                cr_panner_activate                  (CrPanner *panner);

panner :


cr_panner_deactivate ()

void                cr_panner_deactivate                (CrPanner *panner);

panner :

Property Details

The "active" property

  "active"                   gboolean              : Read / Write

Active/Deactivate the panner object or check the activation status.

Default value: FALSE


The "button" property

  "button"                   gint                  : Read / Write

Mouse button implicitly activates the panner.

Allowed values: [0,10]

Default value: 2


The "canvas" property

  "canvas"                   CrCanvas*             : Read / Write

Reference to CrCanvas widget.


The "cursor" property

  "cursor"                   gint                  : Read / Write

GDK Cursor to use when panner is selected.

Allowed values: [0,153]

Default value: 60

Signal Details

The "activate" signal

void                user_function                      (CrPanner *panner,
                                                        gpointer  user_data)      : Run First

This signal is emitted whenever the panner is first activated.

panner :

user_data :

user data set when the signal handler was connected.

The "deactivate" signal

void                user_function                      (CrPanner *panner,
                                                        gpointer  user_data)      : Run First

This signal is emitted whenever the panner is deactivated. It can be used to get to a callback from a panning selection.

panner :

user_data :

user data set when the signal handler was connected.

The "pan" signal

void                user_function                      (CrPanner *panner,
                                                        gdouble   dx,
                                                        gdouble   dy,
                                                        gpointer  user_data)      : Run First

This signal is emitted each time the canvas is panned.

panner :

dx :

Device units moved in the X direction.

dy :

Device units moved in the Y direction.

user_data :

user data set when the signal handler was connected.