add the 2.1-bootstrap dir to MONO_PATH when running smcs
[moon.git] / src / contentcontrol.h
blob055738184a146d73c29d1cc3716b2c669bcc1821
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * contentcontrol.h:
5 * Copyright 2007-2009 Novell, Inc. (http://www.novell.com)
7 * See the LICENSE file included with the distribution for details.
8 *
9 */
11 #ifndef __CONTENT_CONTROL_H__
12 #define __CONTENT_CONTROL_H__
14 #include <glib.h>
15 #include "control.h"
18 /* @Namespace=None */
19 class ContentChangedEventArgs : public EventArgs {
20 Value *old_content;
21 Value *new_content;
23 protected:
24 virtual ~ContentChangedEventArgs ();
26 public:
27 ContentChangedEventArgs (Value *old_content, Value *new_content);
29 /* @GenerateCBinding,GeneratePInvoke */
30 Value *GetOldContent ();
32 /* @GenerateCBinding,GeneratePInvoke */
33 Value *GetNewContent ();
37 /* @ContentProperty="Content" */
38 /* @Namespace=System.Windows.Controls */
39 /* @CallInitialize */
40 class ContentControl : public Control {
41 protected:
42 virtual ~ContentControl ();
44 public:
45 /* @PropertyType=object,Validator=ContentControlContentValidator */
46 const static int ContentProperty;
47 /* @PropertyType=DataTemplate,GenerateAccessors */
48 const static int ContentTemplateProperty;
50 /* @GenerateCBinding,GeneratePInvoke */
51 ContentControl ();
53 virtual void OnPropertyChanged (PropertyChangedEventArgs *args, MoonError *error);
56 // Property Accessors
58 void SetContentTemplate (DataTemplate *t);
59 DataTemplate *GetContentTemplate ();
61 /* @GenerateCBinding,GeneratePInvoke */
62 void SetContentSetsParent (bool value) { content_sets_parent = value; }
63 /* @GenerateCBinding,GeneratePInvoke */
64 bool GetContentSetsParent () { return content_sets_parent; }
67 // Events
69 const static int ContentChangedEvent;
71 private:
72 bool content_sets_parent;
75 #endif /* __CONTENT_CONTROL_H__ */