1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2007 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
19 #include "frameworkelement.h"
20 #include "downloader.h"
21 #include "fontfamily.h"
22 #include "fontstretch.h"
23 #include "fontstyle.h"
24 #include "fontweight.h"
25 #include "moon-path.h"
26 #include "thickness.h"
31 /* @Namespace=System.Windows.Documents */
32 class Glyphs
: public FrameworkElement
{
33 Downloader
*downloader
;
51 void SetIndicesInternal (const char *in
);
53 void CleanupDownloader ();
54 void DownloaderComplete ();
56 static void downloader_complete (EventObject
*sender
, EventArgs
*calldata
, gpointer closure
);
58 void LoadFont (const Uri
*uri
, const char *path
);
59 void DownloadFont (Uri
*uri
, MoonError
*error
);
60 bool SetFontResource (const Uri
*uri
);
66 /* @PropertyType=Brush,GenerateAccessors */
67 const static int FillProperty
;
68 /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */
69 const static int FontRenderingEmSizeProperty
;
70 /* @PropertyType=Uri,GenerateAccessors,DefaultValue=Uri(),Validator=NonNullValidator */
71 const static int FontUriProperty
;
72 /* @PropertyType=string,DefaultValue=\"\",GenerateAccessors */
73 const static int IndicesProperty
;
74 /* @PropertyType=double,DefaultValue=-HUGE,Validator=FloatValidator,GenerateAccessors */
75 const static int OriginXProperty
;
76 /* @PropertyType=double,DefaultValue=-HUGE,Validator=FloatValidator,GenerateAccessors */
77 const static int OriginYProperty
;
78 /* @PropertyType=StyleSimulations,DefaultValue=StyleSimulationsNone,GenerateAccessors */
79 const static int StyleSimulationsProperty
;
80 /* @PropertyType=string,DefaultValue=\"\",GenerateAccessors */
81 const static int UnicodeStringProperty
;
83 /* @GenerateCBinding,GeneratePInvoke */
86 virtual void GetSizeForBrush (cairo_t
*cr
, double *width
, double *height
);
87 virtual void Render (cairo_t
*cr
, Region
*region
, bool path_only
= false);
88 virtual Size
ComputeActualSize ();
89 virtual void ComputeBounds ();
90 virtual Size
MeasureOverride (Size availableSize
);
91 virtual Size
ArrangeOverride (Size finalSize
);
92 virtual Point
GetTransformOrigin ();
93 virtual Point
GetOriginPoint ();
94 virtual void SetParent (DependencyObject
*parent
, MoonError
*error
);
95 virtual void OnPropertyChanged (PropertyChangedEventArgs
*args
, MoonError
*error
);
96 virtual void OnSubPropertyChanged (DependencyProperty
*prop
, DependencyObject
*obj
, PropertyChangedEventArgs
*subobj_args
);
101 void SetFill (Brush
*fill
);
104 void SetFontRenderingEmSize (double size
);
105 double GetFontRenderingEmSize ();
107 void SetFontUri (Uri
*uri
);
110 void SetIndices (const char *indices
);
111 const char *GetIndices ();
113 void SetOriginX (double origin
);
114 double GetOriginX ();
116 void SetOriginY (double origin
);
117 double GetOriginY ();
119 void SetStyleSimulations (StyleSimulations style
);
120 StyleSimulations
GetStyleSimulations ();
122 void SetUnicodeString (const char *unicode
);
123 const char *GetUnicodeString ();
126 #endif /* __GLYPHS_H__ */