1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
5 * Copyright 2009 Novell, Inc. (http://www.novell.com)
7 * See the LICENSE file included with the distribution for details.
19 /* @ContentProperty="Child" */
20 /*@Namespace=System.Windows.Controls.Primitives*/
21 class Popup
: public FrameworkElement
{
23 /* @PropertyType=UIElement,GenerateAccessors,Validator=ContentControlContentValidator */
24 const static int ChildProperty
;
25 /* @PropertyType=double,GenerateAccessors,DefaultValue=0.0 */
26 const static int HorizontalOffsetProperty
;
27 /* @PropertyType=bool,GenerateAccessors,DefaultValue=false */
28 const static int IsOpenProperty
;
29 /* @PropertyType=double,GenerateAccessors,DefaultValue=0.0 */
30 const static int VerticalOffsetProperty
;
32 /* @GenerateCBinding,GeneratePInvoke */
34 virtual void Dispose ();
39 void SetChild (UIElement
*element
);
40 UIElement
*GetChild ();
42 void SetHorizontalOffset (double offset
);
43 double GetHorizontalOffset ();
45 void SetIsOpen (bool open
);
48 virtual void SetSurface (Surface
*s
);
50 void SetVerticalOffset (double offset
);
51 double GetVerticalOffset ();
53 virtual void HitTest (cairo_t
*cr
, Point p
, List
*uielement_list
);
54 virtual void OnPropertyChanged (PropertyChangedEventArgs
*args
, MoonError
*error
);
56 const static int OpenedEvent
;
57 const static int ClosedEvent
;
59 EVENTHANDLER (Popup
, ShuttingDown
, Deployment
, EventArgs
);
60 void Hide (UIElement
*child
);
61 void Show (UIElement
*child
);
62 void PropagateIsEnabledState (UIElement
*child
, bool enabled_parent
);
68 #endif /* __POPUP_H__ */