Simple Item

Simple Item

Synopsis


#include <ccc/cc-simple-item.h>


typedef             CcSimpleItem;
typedef             CcSimpleItemClass;
CcItem*             cc_simple_item_new                  (void);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----CcItem
               +----CcSimpleItem

Implemented Interfaces

CcSimpleItem implements CcItemView.

Signals


  "distance"                                       
  "render"                                         
  "update-bounds"                                  

Description

Details

CcSimpleItem

typedef CcItem      CcSimpleItem;


CcSimpleItemClass

typedef CcItemClass CcSimpleItemClass;


cc_simple_item_new ()

CcItem*             cc_simple_item_new                  (void);

Creates a new item for rapid prototyping.

Returns : a new CcItem.

Signal Details

The "distance" signal

gdouble             user_function                      (CcSimpleItem *self,
                                                        CcView       *view,
                                                        gdouble       x,
                                                        gdouble       y,
                                                        gpointer      retval,
                                                        gpointer      user_data)

Hit-Test an item. This signal gets emitted when the view is trying to locate an item at a specific position. See also Rapid Prototyping of custom Items.

self : the CcSimpleItem which received the signal
view : the CcView where the signal was received
x : the horizontal coordinate of the tested point
y : the vertical coordinate of the tested point
retval : a return location for a hit item
user_data : user data set when the signal handler was connected.
Returns : the distance of (x, y) to self.

The "render" signal

void                user_function                      (CcSimpleItem *self,
                                                        CcView       *view,
                                                        CcCairo      *cairo,
                                                        gpointer      user_data)

Render the simple item to a view. See also Rapid Prototyping of custom Items.

self : a CcSimpleItem
view : a CcView
cairo : a cairo_t for rendering
user_data : user data set when the signal handler was connected.

The "update-bounds" signal

void                user_function                      (CcSimpleItem *self,
                                                        CcView       *view,
                                                        gpointer      user_data)

Update the bounding box for a view. See also Rapid Prototyping of custom Items.

self : a CcSimpleItem
view : a CcView
user_data : user data set when the signal handler was connected.