File: ProgressBar.xml

package info (click to toggle)
gtk-sharp3 2.99.3-4.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 25,488 kB
  • sloc: xml: 308,885; cs: 38,796; sh: 11,336; perl: 1,295; makefile: 1,099; ansic: 903
file content (274 lines) | stat: -rw-r--r-- 11,918 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<Type Name="ProgressBar" FullName="Gtk.ProgressBar">
  <TypeSignature Language="C#" Maintainer="John Luke" Value="public class ProgressBar : Gtk.Widget, Gtk.IOrientable" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ProgressBar extends Gtk.Widget implements class GLib.IWrapper, class Gtk.IOrientable" />
  <AssemblyInfo>
    <AssemblyName>gtk-sharp</AssemblyName>
    <AssemblyPublicKey>
    </AssemblyPublicKey>
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
  <Base>
    <BaseTypeName>Gtk.Widget</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>Gtk.IOrientable</InterfaceName>
    </Interface>
  </Interfaces>
  <Docs>
    <summary>A widget which indicates progress visually.</summary>
    <remarks>
      <para>The <see cref="T:Gtk.ProgressBar" /> is typically used to display the progress of a long running operation.
				It provides a visual clue that processing is underway.
				The <see cref="T:Gtk.ProgressBar" /> can be used in two different modes: percentage mode and activity mode.</para>
      <para>When an application can determine how much work needs to take place (e.g. read a fixed number of bytes from a file) and can monitor its progress,
				it can use the <see cref="T:Gtk.ProgressBar" /> in percentage mode and the user sees a growing bar indicating the percentage of the work that has been completed.
				In this mode, the application is required to set <see cref="P:Gtk.ProgressBar.Fraction" /> periodically to update the progress bar.</para>
      <para>When an application has no accurate way of knowing the amount of work to do, it can use the <see cref="T:Gtk.ProgressBar" /> in activity mode, which shows activity by a block moving back and forth within the progress area.
				In this mode, the application is required to call <see cref="M:Gtk.ProgressBar.Pulse()" /> perodically to update the progress bar.</para>
      <para>There is quite a bit of flexibility provided to control the appearance of the <see cref="T:Gtk.ProgressBar" />.
				Functions are provided to control the orientation of the bar, optional text can be displayed along with the bar, and the step size used in activity mode can be set.</para>
      <para>
The following example show how percentage mode works
</para>
      <example>
        <code lang="C#">
using System;
using Gtk;

namespace TestGtkAlone
{
	public class TestProgress
	{
		static Gtk.ProgressBar PBar;
		static void Main()
		{
			 Gtk.Application.Init();
			 Gtk.Window WinPBar = new Window("Test Progress bar - Percentage mode");
			 Gtk.HBox HContainer = new Gtk.HBox(false, 2);
			 PBar = new ProgressBar();
			 Gtk.Button ButtonStart = new Gtk.Button("Start Progress");
			 HContainer.Add(PBar);
			 HContainer.Add(ButtonStart);
			 ButtonStart.Clicked += new EventHandler(ButtonStart_Clicked);
			 WinPBar.Add(HContainer);
			 WinPBar.ShowAll();
			 
			 Gtk.Application.Run();
		}
		
		public static void ButtonStart_Clicked(object sender, EventArgs args)
		{
			PBar.Adjustment.Lower = 0;
			PBar.Adjustment.Upper = 1000;
			while (PBar.Adjustment.Value &lt; PBar.Adjustment.Upper) {
				PBar.Adjustment.Value+=1;
			}
		}

	}

}

</code>
      </example>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public ProgressBar ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>Creates a new <see cref="T:Gtk.ProgressBar" />.</summary>
        <remarks>Creates a new <see cref="T:Gtk.ProgressBar" />.</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public ProgressBar (IntPtr raw);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int raw) cil managed" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="raw" Type="System.IntPtr" />
      </Parameters>
      <Docs>
        <param name="raw">Pointer to the C object.</param>
        <summary>Internal constructor</summary>
        <remarks>
          <para>This is an internal constructor, and should not be used by user code.</para>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="Ellipsize">
      <MemberSignature Language="C#" Value="public Pango.EllipsizeMode Ellipsize { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance valuetype Pango.EllipsizeMode Ellipsize" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>GLib.Property("ellipsize")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>Pango.EllipsizeMode</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>To be added</summary>
        <value>a <see cref="T:Pango.EllipsizeMode" /></value>
        <remarks>To be added</remarks>
        <since version="Gtk# 2.6" />
      </Docs>
    </Member>
    <Member MemberName="Fraction">
      <MemberSignature Language="C#" Value="public double Fraction { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance float64 Fraction" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>GLib.Property("fraction")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Double</ReturnType>
      </ReturnValue>
      <Parameters>
      </Parameters>
      <Docs>
        <summary>The current fraction of the task that has been completed.</summary>
        <value>an object of type <see cref="T:System.Double" /></value>
        <remarks>The current fraction of the task that has been completed.</remarks>
      </Docs>
    </Member>
    <Member MemberName="GType">
      <MemberSignature Language="C#" Value="public static GLib.GType GType { get; }" />
      <MemberSignature Language="ILAsm" Value=".property valuetype GLib.GType GType" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>GLib.GType</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>GType Property.</summary>
        <value>a <see cref="T:GLib.GType" /></value>
        <remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.ProgressBar" />.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Inverted">
      <MemberSignature Language="C#" Value="public bool Inverted { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance bool Inverted" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>GLib.Property("inverted")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version="Gtk# 3.0" />
      </Docs>
    </Member>
    <Member MemberName="Orientation">
      <MemberSignature Language="C#" Value="public Gtk.Orientation Orientation { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance valuetype Gtk.Orientation Orientation" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>GLib.Property("orientation")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>Gtk.Orientation</ReturnType>
      </ReturnValue>
      <Parameters>
      </Parameters>
      <Docs>
        <summary>The current <see cref="T:Gtk.ProgressBar" /> orientation.</summary>
        <value>an object of type <see cref="T:Gtk.ProgressBarOrientation" /></value>
        <remarks>The current <see cref="T:Gtk.ProgressBar" /> orientation.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Pulse">
      <MemberSignature Language="C#" Value="public void Pulse ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Pulse() cil managed" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Indicates an unknown amount of progress has been made</summary>
        <remarks>Indicates that some progress has been made, but you don't know how much.
					This causes the <see cref="T:Gtk.ProgressBar" /> to enter "activity mode," where a block bounces back and forth.
					Each call to <see cref="M:Gtk.ProgressBar.Pulse()" /> causes the block to move by a little bit (the amount of movement per pulse is determined by <see cref="P:Gtk.ProgressBar.PulseStep" />).</remarks>
      </Docs>
    </Member>
    <Member MemberName="PulseStep">
      <MemberSignature Language="C#" Value="public double PulseStep { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance float64 PulseStep" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>GLib.Property("pulse-step")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Double</ReturnType>
      </ReturnValue>
      <Parameters>
      </Parameters>
      <Docs>
        <summary>The fraction of total <see cref="T:Gtk.ProgressBar" /> length to move the bouncing block for each call to <see cref="M:Gtk.ProgressBar.Pulse()" />.</summary>
        <value>an object of type <see cref="T:System.Double" /></value>
        <remarks>The fraction of total <see cref="T:Gtk.ProgressBar" /> length to move the bouncing block for each call to <see cref="M:Gtk.ProgressBar.Pulse()" />.</remarks>
      </Docs>
    </Member>
    <Member MemberName="ShowText">
      <MemberSignature Language="C#" Value="public bool ShowText { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance bool ShowText" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>GLib.Property("show-text")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version="Gtk# 3.0" />
      </Docs>
    </Member>
    <Member MemberName="Text">
      <MemberSignature Language="C#" Value="public string Text { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string Text" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>GLib.Property("text")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters>
      </Parameters>
      <Docs>
        <summary>The text displayed superimposed on the <see cref="T:Gtk.ProgressBar" />.</summary>
        <value>an object of type <see cref="T:System.String" /></value>
        <remarks>The text displayed superimposed on the <see cref="T:Gtk.ProgressBar" />, if any, otherwise <see langword="null" />.
					The return value is a reference to the text, not a copy of it, so will become invalid if you change the text in the <see cref="T:Gtk.ProgressBar" />.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>