1 //Auto-generated by kalyptus. DO NOT EDIT.
8 /// @class FrameSvg plasma/framesvg.h <Plasma/FrameSvg>
9 /// When using SVG images for a background of an object that may change
10 /// its aspect ratio, such as a dialog, simply scaling a single image
11 /// may not be enough.
12 /// FrameSvg allows SVGs to provide several elements for borders as well
13 /// as a central element, each of which are scaled individually. These
14 /// elements should be named
15 /// - <code>center</code> - the central element, which will be scaled in both directions
16 /// - <code>top</code> - the top border; the height is fixed, but it will be scaled
17 /// horizontally to the same width as <code>center</code>
18 /// - <code>bottom</code> - the bottom border; scaled in the same way as <code>top</code>
19 /// - <code>left</code> - the left border; the width is fixed, but it will be scaled
20 /// vertically to the same height as <code>center</code>
21 /// - <code>right</code> - the right border; scaled in the same way as <code>left</code>
22 /// - <code>topleft</code> - fixed size; must be the same height as <code>top</code> and the same
23 /// width as <code>left</code>
24 /// - <code>bottomleft</code>, <code>topright</code>, <code>bottomright</code> - similar to <code>topleft</code>
25 /// <code>center</code> must exist, but all the others are optional. <code>topleft</code> and
26 /// <code>topright</code> will be ignored if <code>top</code> does not exist, and similarly for
27 /// <code>bottomleft</code> and <code>bottomright.</code>
28 /// </remarks> <short> Provides an SVG with borders. </short>
29 /// <see> Plamsa.Svg</see>
30 [SmokeClass("Plasma::FrameSvg")]
31 public class FrameSvg
: Plasma
.Svg
, IDisposable
{
32 protected FrameSvg(Type dummy
) : base((Type
) null) {}
33 protected new void CreateProxy() {
34 interceptor
= new SmokeInvocation(typeof(FrameSvg
), this);
37 /// These flags represents what borders should be drawn
38 /// </remarks> <short> These flags represents what borders should be drawn </short>
39 public enum EnabledBorder
{
45 AllBorders
= TopBorder
|BottomBorder
|LeftBorder
|RightBorder
,
48 /// Constructs a new FrameSvg that paints the proper named subelements
49 /// as borders. It may also be used as a regular Plasma.Svg object
50 /// for direct access to elements in the Svg.
51 /// @arg parent options QObject to parent this to
52 /// @related Plasma.Theme
53 /// </remarks> <short> Constructs a new FrameSvg that paints the proper named subelements as borders.</short>
54 public FrameSvg(QObject parent
) : this((Type
) null) {
56 interceptor
.Invoke("FrameSvg#", "FrameSvg(QObject*)", typeof(void), typeof(QObject
), parent
);
58 public FrameSvg() : this((Type
) null) {
60 interceptor
.Invoke("FrameSvg", "FrameSvg()", typeof(void));
64 /// @arg imagePath the new file
65 /// </remarks> <short> Loads a new Svg @arg imagePath the new file </short>
66 public void SetImagePath(string path
) {
67 interceptor
.Invoke("setImagePath$", "setImagePath(const QString&)", typeof(void), typeof(string), path
);
70 /// Sets what borders should be painted
71 /// @arg flags borders we want to paint
72 /// </remarks> <short> Sets what borders should be painted @arg flags borders we want to paint </short>
73 public void SetEnabledBorders(uint borders
) {
74 interceptor
.Invoke("setEnabledBorders$", "setEnabledBorders(const Plasma::FrameSvg::EnabledBorders)", typeof(void), typeof(uint), borders
);
77 /// Convenience method to get the enabled borders
78 /// </remarks> <return> what borders are painted
80 /// <short> Convenience method to get the enabled borders </short>
81 public uint EnabledBorders() {
82 return (uint) interceptor
.Invoke("enabledBorders", "enabledBorders() const", typeof(uint));
85 /// Resize the frame maintaining the same border size
86 /// @arg size the new size of the frame
87 /// </remarks> <short> Resize the frame maintaining the same border size @arg size the new size of the frame </short>
88 public void ResizeFrame(QSizeF size
) {
89 interceptor
.Invoke("resizeFrame#", "resizeFrame(const QSizeF&)", typeof(void), typeof(QSizeF
), size
);
92 /// </remarks> <return> the size of the frame
95 public QSizeF
FrameSize() {
96 return (QSizeF
) interceptor
.Invoke("frameSize", "frameSize() const", typeof(QSizeF
));
99 /// Returns the margin size given the margin edge we want
100 /// @arg edge the margin edge we want, top, bottom, left or right
101 /// </remarks> <return> the margin size
103 /// <short> Returns the margin size given the margin edge we want @arg edge the margin edge we want, top, bottom, left or right </short>
104 public double MarginSize(Plasma
.MarginEdge edge
) {
105 return (double) interceptor
.Invoke("marginSize$", "marginSize(const Plasma::MarginEdge) const", typeof(double), typeof(Plasma
.MarginEdge
), edge
);
108 /// Convenience method that extracts the size of the four margins
109 /// in the four output parameters
110 /// @arg left left margin size
111 /// @arg top top margin size
112 /// @arg right right margin size
113 /// @arg bottom bottom margin size
114 /// </remarks> <short> Convenience method that extracts the size of the four margins in the four output parameters @arg left left margin size @arg top top margin size @arg right right margin size @arg bottom bottom margin size </short>
115 public void GetMargins(ref double left
, ref double top
, ref double right
, ref double bottom
) {
116 StackItem
[] stack
= new StackItem
[5];
117 stack
[1].s_double
= left
;
118 stack
[2].s_double
= top
;
119 stack
[3].s_double
= right
;
120 stack
[4].s_double
= bottom
;
121 interceptor
.Invoke("getMargins$$$$", "getMargins(qreal&, qreal&, qreal&, qreal&) const", stack
);
122 left
= stack
[1].s_double
;
123 top
= stack
[2].s_double
;
124 right
= stack
[3].s_double
;
125 bottom
= stack
[4].s_double
;
129 /// </remarks> <return> the rectangle of the center element, taking the margins into account.
132 public QRectF
ContentsRect() {
133 return (QRectF
) interceptor
.Invoke("contentsRect", "contentsRect() const", typeof(QRectF
));
136 /// Sets the prefix (@see setElementPrefix) to 'north', 'south', 'west' and 'east'
137 /// when the location is TopEdge, BottomEdge, LeftEdge and RightEdge,
138 /// respectively. Clears the prefix in other cases.
139 /// @arg location location
140 /// </remarks> <short> Sets the prefix (@see setElementPrefix) to 'north', 'south', 'west' and 'east' when the location is TopEdge, BottomEdge, LeftEdge and RightEdge, respectively.</short>
141 public void SetElementPrefix(Plasma
.Location location
) {
142 interceptor
.Invoke("setElementPrefix$", "setElementPrefix(Plasma::Location)", typeof(void), typeof(Plasma
.Location
), location
);
145 /// Sets the prefix for the SVG elements to be used for painting. For example,
146 /// if prefix is 'active', then instead of using the 'top' element of the SVG
147 /// file to paint the top border, 'active-top' element will be used. The same
148 /// goes for other SVG elements.
149 /// If the elements with prefixes are not present, the default ones are used.
150 /// (for the sake of speed, the test is present only for the 'center' element)
151 /// Setting the prefix manually resets the location to Floating.
153 /// @arg prefix prefix for the SVG element names
154 /// </remarks> <short> Sets the prefix for the SVG elements to be used for painting.</short>
155 public void SetElementPrefix(string prefix
) {
156 interceptor
.Invoke("setElementPrefix$", "setElementPrefix(const QString&)", typeof(void), typeof(string), prefix
);
159 /// </remarks> <return> true if the svg has the necessary elements with the given prefix
161 /// @arg prefix the given prefix we want to check if drawable
164 public bool HasElementPrefix(string prefix
) {
165 return (bool) interceptor
.Invoke("hasElementPrefix$", "hasElementPrefix(const QString&) const", typeof(bool), typeof(string), prefix
);
168 /// This is an overloaded method provided for convenience equivalent to
169 /// hasElementPrefix("north"), hasElementPrefix("south")
170 /// hasElementPrefix("west") and hasElementPrefix("east")
171 /// </remarks> <return> true if the svg has the necessary elements with the given prefix
173 /// @arg location the given prefix we want to check if drawable
175 /// <short> This is an overloaded method provided for convenience equivalent to hasElementPrefix("north"), hasElementPrefix("south") hasElementPrefix("west") and hasElementPrefix("east") </short>
176 public bool HasElementPrefix(Plasma
.Location location
) {
177 return (bool) interceptor
.Invoke("hasElementPrefix$", "hasElementPrefix(Plasma::Location) const", typeof(bool), typeof(Plasma
.Location
), location
);
180 /// Returns the prefix for SVG elements of the FrameSvg
181 /// </remarks> <return> the prefix
183 /// <short> Returns the prefix for SVG elements of the FrameSvg </short>
184 public string Prefix() {
185 return (string) interceptor
.Invoke("prefix", "prefix()", typeof(string));
188 /// Returns a monochrome mask that tightly contains the fully opaque areas of the svg
189 /// </remarks> <return> a monochrome bitmap of opaque areas
191 /// <short> Returns a monochrome mask that tightly contains the fully opaque areas of the svg </short>
192 public QBitmap
Mask() {
193 return (QBitmap
) interceptor
.Invoke("mask", "mask() const", typeof(QBitmap
));
196 /// Sets whether saving all the rendered prefixes in a cache or not
197 /// @arg cache if use the cache or not
198 /// </remarks> <short> Sets whether saving all the rendered prefixes in a cache or not @arg cache if use the cache or not </short>
199 public void SetCacheAllRenderedFrames(bool cache
) {
200 interceptor
.Invoke("setCacheAllRenderedFrames$", "setCacheAllRenderedFrames(bool)", typeof(void), typeof(bool), cache
);
203 /// </remarks> <return> if all the different prefixes should be kept in a cache when rendered
206 public bool CacheAllRenderedFrames() {
207 return (bool) interceptor
.Invoke("cacheAllRenderedFrames", "cacheAllRenderedFrames() const", typeof(bool));
210 /// Deletes the internal cache freeing memory: use this if you want to switch the rendered
211 /// element and you don't plan to switch back to the previous one for a long time and you
212 /// used setUseCache(true)
213 /// </remarks> <short> Deletes the internal cache freeing memory: use this if you want to switch the rendered element and you don't plan to switch back to the previous one for a long time and you used setUseCache(true) </short>
214 public void ClearCache() {
215 interceptor
.Invoke("clearCache", "clearCache()", typeof(void));
218 /// Returns a pixmap of the SVG represented by this object.
219 /// @arg elelementId the ID string of the element to render, or an empty
220 /// string for the whole SVG (the default)
221 /// </remarks> <return> a QPixmap of the rendered SVG
223 /// <short> Returns a pixmap of the SVG represented by this object.</short>
224 public QPixmap
FramePixmap() {
225 return (QPixmap
) interceptor
.Invoke("framePixmap", "framePixmap()", typeof(QPixmap
));
228 /// Paints the loaded SVG with the elements that represents the border
229 /// @arg painter the QPainter to use
230 /// @arg target the target rectangle on the paint device
231 /// @arg source the portion rectangle of the source image
232 /// </remarks> <short> Paints the loaded SVG with the elements that represents the border @arg painter the QPainter to use @arg target the target rectangle on the paint device @arg source the portion rectangle of the source image </short>
233 public void PaintFrame(QPainter painter
, QRectF target
, QRectF source
) {
234 interceptor
.Invoke("paintFrame###", "paintFrame(QPainter*, const QRectF&, const QRectF&)", typeof(void), typeof(QPainter
), painter
, typeof(QRectF
), target
, typeof(QRectF
), source
);
236 public void PaintFrame(QPainter painter
, QRectF target
) {
237 interceptor
.Invoke("paintFrame##", "paintFrame(QPainter*, const QRectF&)", typeof(void), typeof(QPainter
), painter
, typeof(QRectF
), target
);
240 /// Paints the loaded SVG with the elements that represents the border
241 /// This is an overloaded member provided for convenience
242 /// @arg painter the QPainter to use
243 /// @arg pos where to paint the svg
244 /// </remarks> <short> Paints the loaded SVG with the elements that represents the border This is an overloaded member provided for convenience @arg painter the QPainter to use @arg pos where to paint the svg </short>
245 public void PaintFrame(QPainter painter
, QPointF pos
) {
246 interceptor
.Invoke("paintFrame##", "paintFrame(QPainter*, const QPointF&)", typeof(void), typeof(QPainter
), painter
, typeof(QPointF
), pos
);
248 public void PaintFrame(QPainter painter
) {
249 interceptor
.Invoke("paintFrame#", "paintFrame(QPainter*)", typeof(void), typeof(QPainter
), painter
);
252 interceptor
.Invoke("~FrameSvg", "~FrameSvg()", typeof(void));
254 public new void Dispose() {
255 interceptor
.Invoke("~FrameSvg", "~FrameSvg()", typeof(void));
257 protected new IFrameSvgSignals Emit
{
258 get { return (IFrameSvgSignals) Q_EMIT; }
262 public interface IFrameSvgSignals
: Plasma
.ISvgSignals
{