DiaCanvas2 Reference Manual: Version 0.9.0 | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkLayout +----GnomeCanvas +----DiaCanvasView |
"aa" gboolean : Read / Write "active-view" DiaCanvasView : Read "canvas" DiaCanvas : Read / Write "tool" DiaTool : Read / Write "zoom" DiaTool : Read / Write |
"focus-item" void user_function (DiaCanvasView *diacanvasview, DiaCanvasViewItem *arg1, gpointer user_data); "select-item" void user_function (DiaCanvasView *diacanvasview, DiaCanvasViewItem *arg1, gpointer user_data); "unselect-item" void user_function (DiaCanvasView *diacanvasview, DiaCanvasViewItem *arg1, gpointer user_data); |
#define DIA_CANVAS_VIEW(obj) (GTK_CHECK_CAST ((obj), DIA_TYPE_CANVAS_VIEW, DiaCanvasView)) |
obj : |
|
struct DiaCanvasView; |
Visual (interactive) representation of a diagram (DiaCanvas).
#define DIA_CANVAS_VIEW_ITEM_FOCUS(obj) (dia_canvas_view_item_has_focus (DIA_CANVAS_VIEW_ITEM (obj))) |
obj : |
|
#define DIA_CANVAS_VIEW_ITEM_GRAB(obj) (GNOME_CANVAS_ITEM (obj)->canvas->grabbed_item == (GnomeCanvasItem*) (obj)) |
obj : |
|
#define DIA_CANVAS_VIEW_ITEM_SELECT(obj) (dia_canvas_view_item_is_selected (DIA_CANVAS_VIEW_ITEM (obj))) |
obj : |
|
#define DIA_CANVAS_VIEW_ITEM_VISIBLE(obj) ((GTK_OBJECT_FLAGS (obj) & GNOME_CANVAS_ITEM_VISIBLE) != 0) |
obj : |
|
GtkWidget* dia_canvas_view_new (DiaCanvas *canvas, gboolean aa); |
Create a new DiaCanvasView object. In most cases you want to set aa to TRUE, since it has the most complete renderer and the best quality.
canvas : | A DiaCanvas that contains data that is to be visualized (may be NULL). |
aa : | Use Anti-alias (LibArt) mode rather that X. |
Returns : | A newly create DiaCanvasView. |
GtkWidget* dia_canvas_view_aa_new (void); |
Create a new anti-aliased canvas. Note that no DiaCanvas object iis yet connected to the canvas view.
Returns : | A newly created DiaCanvasView. |
void dia_canvas_view_set_zoom (DiaCanvasView *view, gdouble zoom); |
Set the zoom factor for the canvas. 1.0 means 100%.
view : |
|
zoom : |
|
void dia_canvas_view_set_canvas (DiaCanvasView *view, DiaCanvas *canvas); |
Set the canvas to be viisualized by view. You can only set a canvas if the view doesn't already have a canvas.
view : |
|
canvas : |
|
void dia_canvas_view_unset_canvas (DiaCanvasView *view); |
Disconnect the view from it's DiaCanvas.
view : |
|
DiaCanvas* dia_canvas_view_get_canvas (DiaCanvasView *view); |
Get the DiaCanvas that is displayed in the view.
view : |
|
Returns : | The canvas. |
void dia_canvas_view_select_rectangle (DiaCanvasView *view, DiaRectangle *rect); |
Select all object whose bounding box is within rect.
view : |
|
rect : |
|
void dia_canvas_view_request_update (DiaCanvasView *view); |
Request an update for all items on the canvas. All shapes will be set to update state too.
view : |
|
gdouble dia_canvas_view_get_zoom (DiaCanvasView *view); |
Get the zoomm factor for the view.
view : |
|
Returns : |
|
void dia_canvas_view_set_tool (DiaCanvasView *view, DiaTool *tool); |
Set a tool to use by this canvas view. Tools are used to override the default behavior of the view. tool may be NULL, so the tool is removed from the view.
view : |
|
tool : | The DiaTool |
void dia_canvas_view_select (DiaCanvasView *view, DiaCanvasViewItem *item); |
Select item. If the item is a composite item (item->item has DIA_COMPOSITE set), the parent is selected.
view : |
|
item : |
|
void dia_canvas_view_unselect (DiaCanvasView *view, DiaCanvasViewItem *item); |
Unselect root and all children of root. If one of the selected items has the focus, it is de-focused.
view : | |
item : |
void dia_canvas_view_unselect_all (DiaCanvasView *view); |
Do a dia_canvas_view_unselect() for all items in the canvas view.
view : |
|
void dia_canvas_view_focus (DiaCanvasView *view, DiaCanvasViewItem *item); |
Set the focus to item.
view : |
|
item : |
|
void dia_canvas_view_move (DiaCanvasView *view, gdouble dx, gdouble dy, DiaCanvasViewItem *originator); |
Move all selected items.
view : |
|
dx : | movement |
dy : |
|
originator : | the object that recieved the event resulting in the movement. |
DiaCanvasViewItem* dia_canvas_view_find_view_item (DiaCanvasView *view, DiaCanvasItem *item); |
Find the DiaCanvasViewItem that visualizes item.
view : |
|
item : | Item to find. |
Returns : | The view item or NULL. |
void dia_canvas_view_gdk_event_to_dia_event (DiaCanvasView *view, DiaCanvasViewItem *item, GdkEvent *gdk_event, DiaEvent *dia_event); |
Convert a GdkEvent to a DiaEvent. DiaCanvasItem's can recieve mouse and keyboard events.
view : |
|
item : |
|
gdk_event : |
|
dia_event : |
|
DiaCanvasView* dia_canvas_view_get_active_view (void); |
This function returns the view that was last edited (by mouse clock or key event).
Returns : | The last used view. |
"aa" (gboolean : Read / Write) | |
"active-view" (DiaCanvasView : Read) | |
"canvas" (DiaCanvas : Read / Write) | |
"tool" (DiaTool : Read / Write) | |
"zoom" (DiaTool : Read / Write) |
void user_function (DiaCanvasView *diacanvasview, DiaCanvasViewItem *arg1, gpointer user_data); |
diacanvasview : | the object which received the signal. |
arg1 : | |
user_data : | user data set when the signal handler was connected. |
void user_function (DiaCanvasView *diacanvasview, DiaCanvasViewItem *arg1, gpointer user_data); |
diacanvasview : | the object which received the signal. |
arg1 : | |
user_data : | user data set when the signal handler was connected. |
void user_function (DiaCanvasView *diacanvasview, DiaCanvasViewItem *arg1, gpointer user_data); |
diacanvasview : | the object which received the signal. |
arg1 : | |
user_data : | user data set when the signal handler was connected. |