[ease] Add additional documentation.



commit 259c7b02e348ec79a7b5f424792e71860c54c3c6
Author: Nate Stedman <natesm gmail com>
Date:   Fri Jun 4 05:47:33 2010 -0400

    Add additional documentation.

 src/Enums.vala       |    8 +++++++-
 src/PDFExporter.vala |   15 +++++++++++++++
 src/Transitions.vala |   10 ++++++++++
 src/ZoomSlider.vala  |   28 +++++++++++++++++++++++++---
 4 files changed, 57 insertions(+), 4 deletions(-)
---
diff --git a/src/Enums.vala b/src/Enums.vala
index 8c449ea..be39482 100644
--- a/src/Enums.vala
+++ b/src/Enums.vala
@@ -17,6 +17,9 @@
 
 namespace Ease
 {
+	/**
+	 * The position of editing handles.
+	 */
 	public enum HandlePosition
 	{
 		TOP_LEFT = 0,
@@ -28,7 +31,10 @@ namespace Ease
 		BOTTOM_RIGHT = 6,
 		BOTTOM = 7
 	}
-
+	
+	/**
+	 * The context of an { link Actor}: presentation, editor, etc.
+	 */
 	public enum ActorContext
 	{
 		PRESENTATION,
diff --git a/src/PDFExporter.vala b/src/PDFExporter.vala
index 9282361..69aea29 100644
--- a/src/PDFExporter.vala
+++ b/src/PDFExporter.vala
@@ -15,8 +15,17 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+/**
+ * Renders { link Slide}s with Cairo.
+ */
 public static class Ease.PDFExporter : Object
 {
+	/**
+	 * Exports a { link Document} as a PDF.
+	 *
+	 * @param document The { link Document} to export.
+	 * @param win The window that dialogs should be modal for.
+	 */
 	public static void export(Document document, Gtk.Window win)
 	{
 		string path;
@@ -65,6 +74,12 @@ public static class Ease.PDFExporter : Object
 		}
 	}
 	
+	/** 
+	 * Draws a { link Slide} to a Cairo.Context.
+	 *
+	 * @param s The { link Slide} to draw.
+	 * @param context The Cairo.Context to draw to.
+	 */
 	private static void write_slide(Slide s, Cairo.Context context) throws Error
 	{
 		// write the background color if there is no image
diff --git a/src/Transitions.vala b/src/Transitions.vala
index 0d9c6bc..8bff24d 100644
--- a/src/Transitions.vala
+++ b/src/Transitions.vala
@@ -302,9 +302,19 @@ public static class Ease.Transitions : GLib.Object
 	}
 }
 
+/** 
+ * The representation of a transition and its possible variants.
+ */
 public struct Ease.Transition
 {
+	/**
+	 * The specific transition.
+	 */
 	public TransitionType type;
+	
+	/**
+	 * The variants of the transition (if any).
+	 */
 	public TransitionVariant[] variants;
 }
 
diff --git a/src/ZoomSlider.vala b/src/ZoomSlider.vala
index 39685b5..f4ebfe5 100644
--- a/src/ZoomSlider.vala
+++ b/src/ZoomSlider.vala
@@ -15,8 +15,8 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-/*
- * A widget containing a Gtk.HScale and two zoom buttons
+/**
+ * A zoom widget containing a Gtk.HScale and two (+/-) buttons.
  */
 public class Ease.ZoomSlider : Gtk.Alignment, Clutter.Animatable
 {
@@ -29,24 +29,40 @@ public class Ease.ZoomSlider : Gtk.Alignment, Clutter.Animatable
 	private const int ZOOM_TIME = 100;
 	private const int ZOOM_MODE = Clutter.AnimationMode.EASE_IN_OUT_SINE;
 	
+	/** 
+	 * The position of the zoom slider's value.
+	 */
 	public Gtk.PositionType value_pos
 	{
 		get { return zoom_slider.value_pos; }
 		set { zoom_slider.value_pos = value; }
 	}
 	
+	/** 
+	 * The number of digits that the zoom slider displays.
+	 */
 	public int digits
 	{
 		get { return zoom_slider.digits; }
 		set { zoom_slider.digits = value; }
 	}
 	
+	/**
+	 * The position of the zoom slider.
+	 */
 	public double sliderpos
 	{
 		get { return zoom_slider.get_value(); }
 		set { zoom_slider.set_value(value); }
 	}
-
+	
+	/** 
+	 * Creates a new ZoomSlider.
+	 *
+	 * @param adjustment The Gtk.Adjustment to use.
+	 * @param button_values The values that the slider should stop on when the
+	 * zoom in and out buttons are pressed.
+	 */
 	public ZoomSlider(Gtk.Adjustment adjustment, int[] button_values)
 	{
 		values = button_values;
@@ -114,6 +130,9 @@ public class Ease.ZoomSlider : Gtk.Alignment, Clutter.Animatable
 		});
 	}
 	
+	/** 
+	 * Returns the value of the zoom slider.
+	 */
 	public double get_value()
 	{
 		return zoom_slider.get_value();
@@ -144,5 +163,8 @@ public class Ease.ZoomSlider : Gtk.Alignment, Clutter.Animatable
 		return true;
 	}
 	
+	/** 
+	 * Fires when the value of the zoom slider changes.
+	 */
 	public signal void value_changed();
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]