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
78
79
80
81
82
83
84
85
86
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* border.h:
*
* Copyright 2007 Novell, Inc. (http://www.novell.com)
*
* See the LICENSE file included with the distribution for details.
*
*/
#ifndef __MOON_BORDER_H__
#define __MOON_BORDER_H__
#include <glib.h>
#include "frameworkelement.h"
#include "cornerradius.h"
//
// Border
//
/* @SilverlightVersion="2" */
/* @ContentProperty="Child" */
/* @Namespace=System.Windows.Controls */
class Border : public FrameworkElement {
protected:
Rect bounds_with_children;
virtual ~Border () { };
public:
/* @PropertyType=Brush,GenerateAccessors */
static DependencyProperty *BackgroundProperty;
/* @PropertyType=Brush,GenerateAccessors */
static DependencyProperty *BorderBrushProperty;
/* @PropertyType=Thickness,DefaultValue=Thickness(0),GenerateAccessors */
static DependencyProperty *BorderThicknessProperty;
/* @PropertyType=UIElement,GenerateAccessors */
static DependencyProperty *ChildProperty;
/* @PropertyType=CornerRadius,GenerateAccessors */
static DependencyProperty *CornerRadiusProperty;
/* @PropertyType=Thickness,DefaultValue=Thickness(0),GenerateAccessors */
static DependencyProperty *PaddingProperty;
/* @GenerateCBinding,GeneratePInvoke */
Border ();
virtual Type::Kind GetObjectType () { return Type::BORDER; }
virtual void OnPropertyChanged (PropertyChangedEventArgs *args);
virtual Size MeasureOverride (Size availableSize);
virtual Size ArrangeOverride (Size finalSize);
virtual void ComputeBounds ();
virtual void Render (cairo_t *cr, Region *region);
virtual Rect GetSubtreeBounds () { return bounds_with_children; }
virtual DependencyObject *GetSubtreeObject () { return GetChild (); }
virtual void GetTransformFor (UIElement *item, cairo_matrix_t *result);
virtual bool InsideObject (cairo_t *cr, double x, double y);
virtual void HitTest (cairo_t *cr, Point p, List *uielement_list);
virtual void HitTest (cairo_t *cr, Rect r, List *uielement_list);
// property accessors
Brush *GetBackground ();
void SetBackground (Brush *value);
Brush *GetBorderBrush ();
void SetBorderBrush (Brush *value);
Thickness *GetBorderThickness ();
void SetBorderThickness (Thickness *value);
UIElement *GetChild ();
void SetChild (UIElement *value);
CornerRadius *GetCornerRadius ();
void SetCornerRadius (CornerRadius *value);
Thickness *GetPadding ();
void SetPadding (Thickness *value);
};
#endif /* __MOON_BORDER_H__ */
|