~ubuntu-branches/ubuntu/karmic/moon/karmic

« back to all changes in this revision

Viewing changes to src/canvas.h

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-14 12:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090214120108-06539vb25vhbd8bn
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
2
/*
 
3
 * canvas.h: canvas definitions.
 
4
 *
 
5
 * Contact:
 
6
 *   Moonlight List (moonlight-list@lists.ximian.com)
 
7
 *
 
8
 * Copyright 2007 Novell, Inc. (http://www.novell.com)
 
9
 *
 
10
 * See the LICENSE file included with the distribution for details.
 
11
 * 
 
12
 */
 
13
 
 
14
#ifndef __MOON_CANVAS_H__
 
15
#define __MOON_CANVAS_H__
 
16
 
 
17
#include <glib.h>
 
18
 
 
19
#include "panel.h"
 
20
 
 
21
//
 
22
// Canvas Class, the only purpose is to have the Left/Top properties that
 
23
// children can use
 
24
//
 
25
/* @Namespace=System.Windows.Controls */
 
26
class Canvas : public Panel {
 
27
 protected:
 
28
        virtual ~Canvas () {}
 
29
        
 
30
 public:
 
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;
 
37
        
 
38
        /* @GenerateCBinding,GeneratePInvoke */
 
39
        Canvas ();
 
40
        
 
41
        virtual Type::Kind GetObjectType () { return Type::CANVAS; }
 
42
 
 
43
        virtual Point GetTransformOrigin ();
 
44
        virtual void OnLoaded ();
 
45
 
 
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);
 
52
        
 
53
        virtual void ElementAdded (UIElement *item);
 
54
        virtual void ElementRemoved (UIElement *item);
 
55
 
 
56
        virtual void OnSubPropertyChanged (DependencyProperty *prop, DependencyObject *obj, PropertyChangedEventArgs *subobj_args);
 
57
        virtual void OnPropertyChanged (PropertyChangedEventArgs *args);
 
58
 
 
59
        virtual void OnCollectionItemChanged (Collection *col, DependencyObject *obj, PropertyChangedEventArgs *args);
 
60
        
 
61
        //
 
62
        // Property Accessors
 
63
        //
 
64
        static void SetLeft (DependencyObject *item, double left);
 
65
        static double GetLeft (DependencyObject *item);
 
66
        
 
67
        static void SetTop (DependencyObject *item, double top);
 
68
        static double GetTop (DependencyObject *item);
 
69
        
 
70
        static void SetZIndex (DependencyObject *item, int zindex);
 
71
        static int GetZIndex (DependencyObject *item);
 
72
};
 
73
 
 
74
#endif /* __MOON_CANVAS_H__ */