diff --git a/doc/ChangeLog b/doc/ChangeLog index 432f906b7..67f01b999 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2003-03-02 Lee Mallabone + + * en/Gtk/SpinButtonUpdatePolicy.xml: + * en/Gtk/SpinType.xml: + * en/Gtk/SpinButton.xml: First draft of things SpinButton related. + 2003-03-01 Peter Williams * en/Gdk/GC.xml: Minor markup / grammar fixes. diff --git a/doc/en/Gtk/SpinButton.xml b/doc/en/Gtk/SpinButton.xml index 07bc59758..843a1820b 100644 --- a/doc/en/Gtk/SpinButton.xml +++ b/doc/en/Gtk/SpinButton.xml @@ -1,5 +1,5 @@ - + gtk-sharp 0.0.0.0 @@ -7,8 +7,35 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Retrieve an integer or floating-point number from the user. + A SpinButton is an ideal way to allow the user to enter a numeric value. Rather than having to directly type a number into an , a SpinButton allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the added benefit that it can be checked to ensure it is within a given range. + To precisely configure a SpinButton, an is used. Though it is not mandatory, its use allows fine control over the 'spinning' properties of the SpinButton. + A SpinButton is typically created by setting up an and passing that to the SpinButton's constructor. The value entered by a user can then be retrieved using either the property or the property. + The following demonstrates how to get an integer from a SpinButton: + + +// Creates a window with a spin button +public void CreateSpinButton() +{ + Window window = new Window(); + window.BorderWidth = 5; + // Create a spin button for percentage values. + SpinButton spinner = new SpinButton(0f, 100f, 1f); + spinner.ValueChanged += new EventHandler(OutputValue); + window.Add(spinner); + window.ShowAll(); +} + +// Handles ValueChanged events and writes to the console +private void OutputValue(object source, System.EventArgs args) +{ + SpinButton spinner = source as SpinButton; + System.Console.WriteLine("Current value is: " + spinner.ValueAsInt); +} + + + + Gtk.Entry @@ -62,10 +89,10 @@ - To be added - To be added: an object of type 'Gtk.SpinType' - To be added: an object of type 'double' - To be added + Changes the value of the SpinButton by . + A direction that indicates if the SpinButton should be incremented or decremented. + The amount to adjust the SpinButton by. + @@ -79,10 +106,10 @@ - To be added - To be added: an object of type 'double&' - To be added: an object of type 'double&' - To be added + Find out the minimum and maximum allowed input values. + The minimum value that can be accepted. + The maximum value that can be accepted. + @@ -97,11 +124,11 @@ - To be added - To be added: an object of type 'Gtk.Adjustment' - To be added: an object of type 'double' - To be added: an object of type 'uint' - To be added + Configures various properties of the SpinButton. + An optional to configure certain properties, null otherwise. + The value to adjust the SpinButton by when one of its arrows are clicked. + The number of decimal places to display. + An is used to configure a variety of the properties for a SpinButton. See the documentation for the members for more information. @@ -112,8 +139,8 @@ - To be added - To be added + Forces the SpinButton to update its value + @@ -127,10 +154,10 @@ - To be added - To be added: an object of type 'double' - To be added: an object of type 'double' - To be added + Sets the step and page increments. + The amount to change the spin button by when the user clicks with button 1, (usually the left mouse button). + The amount to change the spin button by when the user clicks with button 2, (usually the middle mouse button). + Changing the values with this method alters how quickly the SpinButton's value changes when its arrows are activated. @@ -144,10 +171,10 @@ - To be added - To be added: an object of type 'double' - To be added: an object of type 'double' - To be added + Alters the minimum and maximum allowable values. + The minimum value that can be entered. + The maximum value that can be entered. + @@ -161,10 +188,10 @@ - To be added - To be added: an object of type 'double&' - To be added: an object of type 'double&' - To be added + Retrieve the current step and page increments. + Outputs the value that a spin button is changed by when the user clicks with button 1, (usually the left mouse button). + Outputs the value that a spin button is changed by when the user clicks with button 2, (usually the middle mouse button). + @@ -221,7 +248,7 @@ - To be added + Creates a new SpinButton based on the specified . To be added: an object of type 'Gtk.Adjustment' To be added: an object of type 'double' To be added: an object of type 'uint' @@ -239,12 +266,12 @@ - To be added - To be added: an object of type 'double' - To be added: an object of type 'double' - To be added: an object of type 'double' - To be added: an object of type 'Gtk.SpinButton' - To be added + Creates a SpinButton without the need for a manually created . + Minimum allowable value. + Maximum allowable value. + The value to alter the SpinButton by when a is carried out on it. + A new SpinButton. + The default value of the new SpinButton is initially set to .The default page increment is set to 10 * .The visible precision of the spin button is equivalent to the precision of . @@ -253,9 +280,9 @@ - To be added - To be added: an object of type 'Gtk.SpinButton' - To be added + Internal constructor + + @@ -277,9 +304,9 @@ System.Int32 - To be added - To be added: an object of type 'int' - To be added + Retrieve the current value as an integer. + The value of the SpinButton with integer precision. + @@ -292,10 +319,10 @@ - To be added - To be added: an object of type 'bool' - To be added: an object of type 'bool' - To be added + Manage whether or not the SpinButton accepts non-numeric input. + if non-numeric text can be entered into the text entry of the SpinButton, otherwise. + Whether the SpinButton currently accepts only numeric input. + @@ -324,10 +351,11 @@ - To be added - To be added: an object of type 'bool' - To be added: an object of type 'bool' - To be added + Manage whether a SpinButton's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded. + Set to to cause values to wrap from maximum to minimum, to force the value at the limits to remain unchanged. + Whether this SpinButton wraps its maximum/minimum values when spinning. + If this property is set to , then when the user tries to change the value in a SpinButton, (usually by clicking one of the arrows), the next value after the maximum will wrap to the minimum. + Alternatively, if this property is set to , then trying to increase the value of the SpinButton when it is at the maximum value, will have no effect. Likewise when trying to decrement the value at its minimum. @@ -340,10 +368,10 @@ - To be added - To be added: an object of type 'double' - To be added: an object of type 'double' - To be added + The current value of the SpinButton. + Sets a new value in this SpinButton + The current value of the SpinButton. + The value of the SpinButton is limited by the precision set with the property. @@ -356,10 +384,10 @@ - To be added - To be added: an object of type 'uint' - To be added: an object of type 'uint' - To be added + Manage the precision that this SpinButton's value is displayed with. + The number of digits to be displayed for the spin button's value. + The maximum number of digits that the SpinButton will currently display. + Up to 20 digit precision is allowed. @@ -372,10 +400,10 @@ - To be added - To be added: an object of type 'bool' - To be added: an object of type 'bool' - To be added + Manage whether values are corrected to the nearest step increment when a SpinButton is activated with an invalid value. + if invalid values should be corrected, otherwise. + if values are snapped to the nearest step, otherwise. + @@ -426,8 +454,8 @@ - To be added - To be added + This event is fired when the SpinButton's value changes. + diff --git a/doc/en/Gtk/SpinButtonUpdatePolicy.xml b/doc/en/Gtk/SpinButtonUpdatePolicy.xml index 41be94452..c20f9d888 100644 --- a/doc/en/Gtk/SpinButtonUpdatePolicy.xml +++ b/doc/en/Gtk/SpinButtonUpdatePolicy.xml @@ -1,5 +1,5 @@ - + gtk-sharp 0.0.0.0 @@ -7,8 +7,8 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Dictates how a is refreshed when its value is updated. + System.Enum @@ -34,8 +34,8 @@ - To be added - To be added + When refreshing a , the value is always displayed. + @@ -46,8 +46,8 @@ - To be added - To be added + When refreshing a , the value is only displayed if it is valid. A value is valid if it lies within the bounds of the spin button's . + diff --git a/doc/en/Gtk/SpinType.xml b/doc/en/Gtk/SpinType.xml index 5e490a11b..a32ef01c1 100644 --- a/doc/en/Gtk/SpinType.xml +++ b/doc/en/Gtk/SpinType.xml @@ -1,5 +1,5 @@ - + gtk-sharp 0.0.0.0 @@ -7,8 +7,8 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Represents a type of spin, used by . + A 'spin' is a change of a 's value based on this enumerated type. System.Enum @@ -34,8 +34,8 @@ - To be added - To be added + Spin a forwards by the step value from the SpinButton's . + @@ -46,8 +46,8 @@ - To be added - To be added + Spin a backwards by the step value from the SpinButton's . + @@ -58,8 +58,8 @@ - To be added - To be added + Spin a forwards by the page value from the SpinButton's . + @@ -70,8 +70,8 @@ - To be added - To be added + Spin a backwards by the page value from the SpinButton's . + @@ -82,8 +82,8 @@ - To be added - To be added + Spin a to its minimum possible value from the SpinButton's . + @@ -94,8 +94,8 @@ - To be added - To be added + Spin a to its maximum possible value from the SpinButton's . + @@ -106,8 +106,8 @@ - To be added - To be added + The programmer must specify the exact amount to spin the . +