1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3
* canvas.h: canvas definitions.
6
* Moonlight List (moonlight-list@lists.ximian.com)
8
* Copyright 2007 Novell, Inc. (http://www.novell.com)
10
* See the LICENSE file included with the distribution for details.
14
#ifndef __MOON_CANVAS_H__
15
#define __MOON_CANVAS_H__
22
// Canvas Class, the only purpose is to have the Left/Top properties that
25
/* @Namespace=System.Windows.Controls */
26
class Canvas : public Panel {
31
/* @PropertyType=double,DefaultValue=0.0,Attached,GenerateAccessors */
32
static DependencyProperty *LeftProperty;
33
/* @PropertyType=double,DefaultValue=0.0,Attached,GenerateAccessors */
34
static DependencyProperty *TopProperty;
35
/* @PropertyType=gint32,DefaultValue=0,Attached,GenerateAccessors */
36
static DependencyProperty *ZIndexProperty;
38
/* @GenerateCBinding,GeneratePInvoke */
41
virtual Type::Kind GetObjectType () { return Type::CANVAS; }
43
virtual Point GetTransformOrigin ();
44
virtual void OnLoaded ();
46
virtual Size MeasureOverride (Size availableSize);
47
virtual Size ArrangeOverride (Size availableSize);
48
virtual bool ClipToExtents () { return false; }
49
virtual void ShiftPosition (Point p);
50
virtual void ComputeBounds ();
51
virtual void GetTransformFor (UIElement *item, cairo_matrix_t *result);
53
virtual void ElementAdded (UIElement *item);
54
virtual void ElementRemoved (UIElement *item);
56
virtual void OnSubPropertyChanged (DependencyProperty *prop, DependencyObject *obj, PropertyChangedEventArgs *subobj_args);
57
virtual void OnPropertyChanged (PropertyChangedEventArgs *args);
59
virtual void OnCollectionItemChanged (Collection *col, DependencyObject *obj, PropertyChangedEventArgs *args);
64
static void SetLeft (DependencyObject *item, double left);
65
static double GetLeft (DependencyObject *item);
67
static void SetTop (DependencyObject *item, double top);
68
static double GetTop (DependencyObject *item);
70
static void SetZIndex (DependencyObject *item, int zindex);
71
static int GetZIndex (DependencyObject *item);
74
#endif /* __MOON_CANVAS_H__ */