Widget

Widget —

Synopsis




            CcViewWidget;
            CcViewWidgetClass;
GtkWidget*  cc_view_widget_new              (void);
GtkWidget*  cc_view_widget_new_root         (CcItem *root);
gboolean    cc_view_widget_get_center_view  (CcViewWidget const*self);
void        cc_view_widget_set_center_view  (CcViewWidget *self,
                                             gboolean center_view);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkDrawingArea
                           +----CcViewWidget

Implemented Interfaces

CcViewWidget implements AtkImplementorIface.

Properties


  "center-view"          gboolean              : Read / Write

Signals


"set-scroll-adjustments"
            void        user_function      (CcViewWidget  *hadjustment,
                                            GtkAdjustment *vadjustment,
                                            GtkAdjustment *arg2,
                                            gpointer       user_data)        : Run last

Description

Details

CcViewWidget

typedef struct _CcViewWidget CcViewWidget;


CcViewWidgetClass

typedef struct {
	GtkDrawingAreaClass base_class;

	/* signals */
	void (*set_scroll_adjustments) (CcViewWidget * self,
					GtkAdjustment* hadjustment,
					GtkAdjustment* vadjustment);
} CcViewWidgetClass;


cc_view_widget_new ()

GtkWidget*  cc_view_widget_new              (void);

Create a new CcViewWidget.

Returns : a newly created CcViewWidget which can be used to display a canvas.

cc_view_widget_new_root ()

GtkWidget*  cc_view_widget_new_root         (CcItem *root);

Create a new CcViewWidget and set root to be the model.

root : a CcItem, the model of the new view
Returns : a new CcViewWidget with root as the model.

cc_view_widget_get_center_view ()

gboolean    cc_view_widget_get_center_view  (CcViewWidget const*self);

Find out whether the view is centered.

self : a CcViewWidget
Returns : TRUE if self displays its model centered once there's more space available than the model requires.

cc_view_widget_set_center_view ()

void        cc_view_widget_set_center_view  (CcViewWidget *self,
                                             gboolean center_view);

Specify whether the model should be displayed centered if there is as much space.

self : a CcViewWidget
center_view : a gboolean

Property Details

The "center-view" property

  "center-view"          gboolean              : Read / Write

Display the model centered if there is more space than the model needs.

Default value: TRUE

Signal Details

The "set-scroll-adjustments" signal

void        user_function                  (CcViewWidget  *hadjustment,
                                            GtkAdjustment *vadjustment,
                                            GtkAdjustment *arg2,
                                            gpointer       user_data)        : Run last

This signal gets emitted when the widget is being added to a scrollable container.

hadjustment : a GtkAdjustment
vadjustment : a GtkAdjustment
user_data : user data set when the signal handler was connected.