1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
5 * Copyright 2008 Novell, Inc. (http://www.novell.com)
7 * See the LICENSE file included with the distribution for details.
11 #ifndef __MOON_STYLE_H__
12 #define __MOON_STYLE_H__
16 #include "dependencyobject.h"
17 #include "collection.h"
22 /* @ContentProperty="Setters" */
23 /* @Namespace=System.Windows */
24 class Style
: public DependencyObject
{
26 /* @PropertyType=bool,DefaultValue=false,ManagedSetterAccess=Private,GenerateAccessors,ManagedFieldAccess=Internal */
27 const static int IsSealedProperty
;
28 /* @PropertyType=SetterBaseCollection,AutoCreateValue,Access=Internal,ManagedFieldAccess=Private,ManagedAccess=Public,ManagedSetterAccess=Private,GenerateAccessors */
29 const static int SettersProperty
;
30 /* @PropertyType=ManagedTypeInfo,ManagedPropertyType=System.Type,Access=Internal,ManagedAccess=Public,ManagedFieldAccess=Internal */
31 const static int TargetTypeProperty
;
33 /* @GenerateCBinding,GeneratePInvoke */
36 /* @GenerateCBinding,GeneratePInvoke */
42 void SetSetters (SetterBaseCollection
*setters
);
43 SetterBaseCollection
*GetSetters ();
45 void SetIsSealed (bool sealed
);
53 // SetterBaseCollection
55 /* @Namespace=System.Windows */
56 class SetterBaseCollection
: public DependencyObjectCollection
{
58 /* @GenerateCBinding,GeneratePInvoke */
59 SetterBaseCollection ();
61 /* @PropertyType=bool,DefaultValue=false,ManagedSetterAccess=Private,GenerateAccessors */
62 const static int IsSealedProperty
;
64 virtual bool AddedToCollection (Value
*value
, MoonError
*error
);
65 virtual void RemovedFromCollection (Value
*value
);
67 virtual Type::Kind
GetElementType () { return Type::SETTERBASE
; }
74 void SetIsSealed (bool sealed
);
78 virtual ~SetterBaseCollection () { }
81 bool ValidateSetter (Value
*value
, MoonError
*error
);
87 /* @Namespace=System.Windows */
88 class SetterBase
: public DependencyObject
{
90 virtual ~SetterBase () { }
93 /* @PropertyType=bool,DefaultValue=false,ManagedSetterAccess=Internal,GenerateAccessors */
94 const static int IsSealedProperty
;
96 /* @GenerateCBinding,GeneratePInvoke,ManagedAccess=Internal */
102 // Property Accessors
104 void SetAttached (bool attached
);
107 void SetIsSealed (bool sealed
);
117 /* @Namespace=System.Windows */
118 /* @ManagedDependencyProperties=Manual */
119 class Setter
: public SetterBase
{
124 /* @PropertyType=DependencyProperty,Validator=IsSetterSealedValidator */
125 const static int PropertyProperty
;
126 /* @PropertyType=object,Validator=IsSetterSealedValidator */
127 const static int ValueProperty
;
129 /* @PropertyType=object */
130 const static int ConvertedValueProperty
;
132 /* @GenerateCBinding,GeneratePInvoke */
135 virtual bool PermitsMultipleParents () { return false; }
138 #endif /* __MOON_STYLE_H__ */