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 const static int LeftProperty
;
33 /* @PropertyType=double,DefaultValue=0.0,Attached,GenerateAccessors */
34 const static int TopProperty
;
35 /* @PropertyType=gint32,DefaultValue=0,Attached,GenerateAccessors */
36 const static int ZIndexProperty
;
38 /* @GenerateCBinding,GeneratePInvoke */
41 virtual Size
MeasureOverride (Size availableSize
);
42 virtual Size
ArrangeOverride (Size availableSize
);
43 virtual bool IsLayoutContainer ();
44 virtual void ShiftPosition (Point p
);
45 virtual void ComputeBounds ();
47 virtual void OnPropertyChanged (PropertyChangedEventArgs
*args
, MoonError
*error
);
49 virtual void OnCollectionItemChanged (Collection
*col
, DependencyObject
*obj
, PropertyChangedEventArgs
*args
);
54 static void SetLeft (DependencyObject
*item
, double left
);
55 static double GetLeft (DependencyObject
*item
);
57 static void SetTop (DependencyObject
*item
, double top
);
58 static double GetTop (DependencyObject
*item
);
60 static void SetZIndex (DependencyObject
*item
, int zindex
);
61 static int GetZIndex (DependencyObject
*item
);
64 #endif /* __MOON_CANVAS_H__ */