add the 2.1-bootstrap dir to MONO_PATH when running smcs
[moon.git] / src / canvas.h
blobabdbd3fee3f97618574d5d5522e8435cac073e67
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * canvas.h: canvas definitions.
5 * Contact:
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__
17 #include <glib.h>
19 #include "panel.h"
22 // Canvas Class, the only purpose is to have the Left/Top properties that
23 // children can use
25 /* @Namespace=System.Windows.Controls */
26 class Canvas : public Panel {
27 protected:
28 virtual ~Canvas () {}
30 public:
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 */
39 Canvas ();
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);
52 // Property Accessors
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__ */