-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcanvas.h
More file actions
77 lines (60 loc) · 2.13 KB
/
canvas.h
File metadata and controls
77 lines (60 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* canvas.h: canvas definitions.
*
* Contact:
* Moonlight List (moonlight-list@lists.ximian.com)
*
* Copyright 2007 Novell, Inc. (http://www.novell.com)
*
* See the LICENSE file included with the distribution for details.
*
*/
#ifndef __MOON_CANVAS_H__
#define __MOON_CANVAS_H__
#include <glib.h>
#include "panel.h"
namespace Moonlight {
//
// Canvas Class, the only purpose is to have the Left/Top properties that
// children can use
//
/* @Namespace=System.Windows.Controls */
class Canvas : public Panel {
private:
Rect coverage_bounds;
protected:
virtual ~Canvas () {}
public:
/* @PropertyType=double,DefaultValue=0.0,Attached,GenerateAccessors */
const static int LeftProperty;
/* @PropertyType=double,DefaultValue=0.0,Attached,GenerateAccessors */
const static int TopProperty;
/* @PropertyType=gint32,DefaultValue=0,Attached,GenerateAccessors */
const static int ZIndexProperty;
/* @PropertyType=double,DefaultValue=0.0,Attached,GenerateAccessors,ManagedFieldAccess=Internal */
const static int ZProperty;
/* @GenerateCBinding,GeneratePInvoke */
Canvas ();
virtual Size MeasureOverrideWithError (Size availableSize, MoonError *error);
virtual Size ArrangeOverrideWithError (Size finalSize, MoonError *error);
virtual bool IsLayoutContainer ();
virtual void ShiftPosition (Point p);
virtual void ComputeBounds ();
virtual Rect GetCoverageBounds ();
virtual void OnPropertyChanged (PropertyChangedEventArgs *args, MoonError *error);
virtual void OnCollectionItemChanged (Collection *col, DependencyObject *obj, PropertyChangedEventArgs *args);
//
// Property Accessors
//
static void SetLeft (DependencyObject *item, double left);
static double GetLeft (DependencyObject *item);
static void SetTop (DependencyObject *item, double top);
static double GetTop (DependencyObject *item);
static void SetZIndex (DependencyObject *item, int zindex);
static int GetZIndex (DependencyObject *item);
static void SetZ (DependencyObject *item, double z);
static double GetZ (DependencyObject *item);
};
};
#endif /* __MOON_CANVAS_H__ */