[ease] Lots of documentation, some refactoring.



commit 966350557c7d100cff5377ff1cf913d1ce79211c
Author: Nate Stedman <natesm gmail com>
Date:   Thu Jun 10 03:40:50 2010 -0400

    Lots of documentation, some refactoring.

 src/AboutDialog.vala      |    4 +
 src/Actor.vala            |   12 +++-
 src/Document.vala         |    8 ++
 src/EditorEmbed.vala      |  157 +++++++++++++++++++++++++++++++++------------
 src/EditorWindow.vala     |   76 ++++++++++++++--------
 src/Element.vala          |   16 ++++-
 src/ElementMap.vala       |    9 +++
 src/Enums.vala            |    2 +-
 src/HTMLExporter.vala     |    6 ++
 src/Handle.vala           |   48 +++++++++++++-
 src/JSONParser.vala       |    3 +
 src/ScrollableEmbed.vala  |   33 +++++-----
 src/Slide.vala            |    6 ++
 src/SlideButtonPanel.vala |   18 -----
 src/TextActor.vala        |    4 +
 src/UndoActions.vala      |    5 ++
 src/UndoController.vala   |   10 +++
 src/VideoActor.vala       |    6 ++
 src/ZoomSlider.vala       |    7 ++
 19 files changed, 319 insertions(+), 111 deletions(-)
---
diff --git a/src/AboutDialog.vala b/src/AboutDialog.vala
index 13f9b78..030ef03 100644
--- a/src/AboutDialog.vala
+++ b/src/AboutDialog.vala
@@ -26,6 +26,10 @@ public class Ease.AboutDialog : Gtk.AboutDialog
 	                           null };
 	const string[] ARTISTS = { "Nate Stedman <natesm gmail com>", null };
 	
+	/**
+	 * Creates the "About Ease" dialog, with all fields filled out. This
+	 * constructor does not actually run the dialog.
+	 */
 	public AboutDialog()
 	{
 		program_name = "Ease";
diff --git a/src/Actor.vala b/src/Actor.vala
index 26f6564..e120d79 100644
--- a/src/Actor.vala
+++ b/src/Actor.vala
@@ -28,13 +28,19 @@ public abstract class Ease.Actor : Clutter.Group
 	// the contents of the actor
 	protected Clutter.Actor contents;
 
-	// the element this actor represents
+	/**
+	 * The { link Element} this Actor represents
+	 */
 	public weak Element element;
 
-	// where this actor is (editor, player, sidebar)
+	/**
+	 * Where this actor is (editor, player, sidebar).
+	 */
 	public ActorContext context;
 	
-	// if the actor is a slide background
+	/**
+	 * If the Actor is a slide background.
+	 */
 	public bool is_background;
 
 	/**
diff --git a/src/Document.vala b/src/Document.vala
index f043a47..3f6a2a5 100644
--- a/src/Document.vala
+++ b/src/Document.vala
@@ -23,6 +23,9 @@
  */
 public class Ease.Document : SlideSet
 {
+	/**
+	 * The default master title for newly created { link Slide}s.
+	 */
 	private const string DEFAULT_SLIDE = "Standard";
 
 	/**
@@ -107,6 +110,11 @@ public class Ease.Document : SlideSet
 		return false;
 	}
 	
+	/**
+	 * Exports this Document to an HTML file.
+	 *
+	 * @param window The window that the progress dialog should be modal for.
+	 */
 	public void export_to_html(Gtk.Window window)
 	{
 		// make an HTMLExporter
diff --git a/src/EditorEmbed.vala b/src/EditorEmbed.vala
index e62d9e7..1049d11 100644
--- a/src/EditorEmbed.vala
+++ b/src/EditorEmbed.vala
@@ -29,48 +29,140 @@
  */
 public class Ease.EditorEmbed : ScrollableEmbed
 {
-	// the editorwindow
+	/**
+	 * The { link EditorWindow} that owns this EditorEmbed.
+	 */
 	private EditorWindow win;
 	
-	// selection rectangle
+	/**
+	 * The rectangle displayed around selected { link Actor}s.
+	 */
 	private Clutter.Rectangle selection_rectangle;
 	
-	// handles
+	/**
+	 * The { link Handle}s attached to the selection rectangle.
+	 */
 	private Handle[] handles;
 
-	// the current slide's actor
+	/**
+	 * The current slide's actor.
+	 */
 	public SlideActor slide_actor;
 	
-	// the currently selected Actor
+	/**
+	 * The currently selected { link Actor}.
+	 */
 	private Actor selected;
 	
 	/**
 	 * If the selected { link Actor} is being edited.
 	 */
-	public bool is_editing { get; set; }
+	private bool is_editing { get; set; }
 	
-	// if the selected Actor is being dragged
+	/**
+	 * If the selected Actor is being dragged.
+	 */
 	private bool is_dragging;
-	private bool is_drag_ready;
+	
+	/**
+	 * If the drag has been initialized.
+	 */
+	private bool is_drag_initialized;
+	
+	/**
+	 * The X position of the mouse in the prior drag event.
+	 */
 	private float mouse_x;
+	
+	/**
+	 * The Y position of the mouse in the prior drag event.
+	 */
 	private float mouse_y;
 	
-	// the original position of a dragged element
+	/**
+	 * The original X position of a dragged { link Actor}.
+	 */
 	private float orig_x;
+	
+	/**
+	 * The original Y position of a dragged { link Actor}.
+	 */
 	private float orig_y;
+	
+	/**
+	 * The original width of a dragged { link Actor}.
+	 */
 	private float orig_w;
+	
+	/**
+	 * The original height of a dragged { link Actor}.
+	 */
 	private float orig_h;
 	
-	// constants
+	/**
+	 * The split string for parsing GTK colors.
+	 */
 	private const string SPLIT = "\n;";
+	
+	/**
+	 * The gtk background color identifier.
+	 */
 	private const string BG_COLOR = "bg_color:";
+	
+	/**
+	 * The gtk background color prefix.
+	 */
 	private const string PREFIX = "#";
+	
+	/**
+	 * The shade factor of the EditorEmbed's background relative to typical
+	 * GTK background color.
+	 */
 	private const double SHADE_FACTOR = 0.9;
+	
+	/**
+	 * The size of the handles[] array.
+	 */
 	private const int HANDLE_COUNT = 8;
 	
+	/**
+	 * The { link Document} linked with this EditorEmbed.
+	 */
 	private Document document;
-	public float zoom;
-	public bool zoom_fit;
+	
+	/**
+	 * The zoom level of the slide displayed by this EditorEmbed.
+	 * 
+	 * When this property is set is called, only the EditorEmbed's zoom level
+	 * is set. Therefore, any other relevant parts of the interface should
+	 * also be updated by the method setting the zoom value.
+	 *
+	 * The zoom level is set on a 0-1 scale. Higher values, are, of
+	 * course, possible, but values below 0.1 or so are unlikely to produce
+	 * desirable results.
+	 */
+	public float zoom
+	{
+		get
+		{
+			return zoom_priv;
+		}
+		set
+		{
+			zoom_priv = value;
+			reposition_group();
+		}
+	}
+	
+	/**
+	 * Store for "zoom" property.
+	 */
+	private float zoom_priv;
+	
+	/**
+	 * If the zoom factor should automatically be set to fill the EditorEmbed.
+	 */
+	private bool zoom_fit { get; set; }
 
 	/**
 	 * Create an EditorEmbed representing a { link Document}.
@@ -145,23 +237,6 @@ public class Ease.EditorEmbed : ScrollableEmbed
 	}
 
 	/**
-	 * Sets the zoom level of the slide displayed by this EditorEmbed.
-	 * 
-	 * When this function is called, only the EditorEmbed's zoom level is
-	 * set. Therefore, any other relevant parts of the interface should
-	 * also be updated by the caller. 
-	 *
-	 * @param z The zoom level, on a 0-100 scale (higher values, are, of
-	 * course, possible, but values below 10 or so are unlikely to produce
-	 * desirable results.
-	 */
-	public void set_zoom(float z)
-	{
-		zoom = z / 100;
-		reposition_group();
-	}
-
-	/**
 	 * Sets the current { link Slide} that the EditorEmbed is displaying.
 	 * 
 	 * The current slide is displayed in the center of the EditorEmbed.
@@ -294,7 +369,7 @@ public class Ease.EditorEmbed : ScrollableEmbed
 	 * @param sender The { link Actor} that was clicked
 	 * @param event The corresponding Clutter.Event
 	 */
-	public bool actor_clicked(Clutter.Actor sender, Clutter.ButtonEvent event)
+	private bool actor_clicked(Clutter.Actor sender, Clutter.ButtonEvent event)
 	{
 		// if this is a double click, edit the actor
 		if (event.click_count == 2)
@@ -308,7 +383,7 @@ public class Ease.EditorEmbed : ScrollableEmbed
 		else if (sender == selected)
 		{
 			is_dragging = true;
-			is_drag_ready = false;
+			is_drag_initialized = false;
 			Clutter.grab_pointer(sender);
 			sender.motion_event.connect(actor_motion);
 			return true;
@@ -373,7 +448,7 @@ public class Ease.EditorEmbed : ScrollableEmbed
 	 * @param sender The { link Actor} that was released
 	 * @param event The corresponding Clutter.Event
 	 */
-	public bool actor_released(Clutter.Actor sender, Clutter.ButtonEvent event)
+	private bool actor_released(Clutter.Actor sender, Clutter.ButtonEvent event)
 	{
 		if (sender == selected && is_dragging)
 		{
@@ -397,15 +472,15 @@ public class Ease.EditorEmbed : ScrollableEmbed
 	 * @param sender The { link Actor} that was dragged
 	 * @param event The corresponding Clutter.Event
 	 */
-	public bool actor_motion(Clutter.Actor sender, Clutter.MotionEvent event)
+	private bool actor_motion(Clutter.Actor sender, Clutter.MotionEvent event)
 	{
 		Actor actor = (Actor)sender;
 		
 		if (sender == selected && is_dragging)
 		{
-			if (!is_drag_ready)
+			if (!is_drag_initialized)
 			{
-				is_drag_ready = true;
+				is_drag_initialized = true;
 				mouse_x = event.x;
 				mouse_y = event.y;
 				
@@ -439,11 +514,11 @@ public class Ease.EditorEmbed : ScrollableEmbed
 	 * @param sender The { link Handle} that was clicked
 	 * @param event The corresponding Clutter.Event
 	 */
-	public bool handle_clicked(Clutter.Actor sender, Clutter.ButtonEvent event)
+	private bool handle_clicked(Clutter.Actor sender, Clutter.ButtonEvent event)
 	{	
 		(sender as Handle).flip();
 		is_dragging = true;
-		is_drag_ready = false;
+		is_drag_initialized = false;
 		sender.motion_event.connect(handle_motion);
 		Clutter.grab_pointer(sender);
 		return true;
@@ -460,7 +535,7 @@ public class Ease.EditorEmbed : ScrollableEmbed
 	 * @param sender The { link Handle} that was released
 	 * @param event The corresponding Clutter.Event
 	 */
-	public bool handle_released(Clutter.Actor sender, Clutter.ButtonEvent event)
+	private bool handle_released(Clutter.Actor sender, Clutter.ButtonEvent event)
 	{
 		if (is_dragging)
 		{
@@ -488,13 +563,13 @@ public class Ease.EditorEmbed : ScrollableEmbed
 	 * @param sender The { link Handle} that was dragged
 	 * @param event The corresponding Clutter.Event
 	 */
-	public bool handle_motion(Clutter.Actor sender, Clutter.MotionEvent event)
+	private bool handle_motion(Clutter.Actor sender, Clutter.MotionEvent event)
 	{
 		Handle handle = (Handle)sender;
 		
-		if (!is_drag_ready)
+		if (!is_drag_initialized)
 		{
-			is_drag_ready = true;
+			is_drag_initialized = true;
 			mouse_x = event.x;
 			mouse_y = event.y;
 			
diff --git a/src/EditorWindow.vala b/src/EditorWindow.vala
index bf90467..853ffe7 100644
--- a/src/EditorWindow.vala
+++ b/src/EditorWindow.vala
@@ -25,34 +25,67 @@
  */
 public class Ease.EditorWindow : Gtk.Window
 {
-	// interface elements
+	/**
+	 * The { link EditorEmbed} associated with this EditorWindow.
+	 */ 
 	public EditorEmbed embed;
+	
+	/**
+	 * The { link MainToolbar} of this EditorWindow.
+	 */
 	public MainToolbar main_toolbar;
-	public Gtk.HBox slides;
+	
+	/**
+	 * The { link SlideButtonPanel} of this EditorWindow.
+	 */
 	public SlideButtonPanel slide_button_panel;
 	
-	// zoom
+	/**
+	 * A { link ZoomSlider} at the bottom of the window, controlling the zoom
+	 * level of the { link EditorEmbed}.
+	 */
 	public ZoomSlider zoom_slider;
 
-	// the player for this window
+	/**
+	 * A { link Player} for the { link Document} displayed in this window.
+	 */
 	private Player player;
 	
+	/**
+	 * The { link Document} associated with this EditorWindow.
+	 */
 	public Document document;
+	
+	/**
+	 * The currently selected and displayed { link Slide}.
+	 */
 	public Slide slide;
 	
+	/**
+	 * The { link Inspector} for this window.
+	 */
 	private Inspector inspector;
 	
-	// the UndoController for this window
+	/**
+	 * The { link UndoController} for this window.
+	 */
 	private UndoController undo;
 	
-	// interface variables
+	/**
+	 * If the { link Inspector} is visible.
+	 */
 	public bool inspector_shown { get; set; }
+	
+	/**
+	 * If the { link SlideButtonPanel} is visible.
+	 */
 	public bool slides_shown { get; set; }
 	
-	// constants
+	/**
+	 * The zoom levels for the { link ZoomSlider}
+	 */
 	private int[] ZOOM_LEVELS = {10, 25, 33, 50, 66, 75, 100, 125, 150,
 	                             200, 250, 300, 400};
-	private const int ZOOM_COUNT = 13;
 
 	/**
 	 * Creates a new EditorWindow.
@@ -139,11 +172,11 @@ public class Ease.EditorWindow : Gtk.Window
 		main_toolbar.slides.clicked.connect(() => {
 			if (slides_shown)
 			{
-				slides.hide();
+				slide_button_panel.hide();
 			}
 			else
 			{
-				slides.show();
+				slide_button_panel.show();
 			}
 			slides_shown = !slides_shown;
 		});
@@ -221,7 +254,7 @@ public class Ease.EditorWindow : Gtk.Window
 		
 		// change the embed's zoom when the zoom slider is moved
 		zoom_slider.value_changed.connect(() => {
-			embed.set_zoom((float)zoom_slider.get_value());
+			embed.zoom = (float)zoom_slider.get_value() / 100f;
 		});
 
 		hide.connect(() => Main.remove_window(this));
@@ -256,6 +289,10 @@ public class Ease.EditorWindow : Gtk.Window
 		update_undo();
 	}
 	
+	/**
+	 * Updates the undo and redo items, enabling and disabling them as is
+	 * applicable.
+	 */
 	private void update_undo()
 	{
 		main_toolbar.undo.sensitive = undo.can_undo();
@@ -263,19 +300,6 @@ public class Ease.EditorWindow : Gtk.Window
 	}
 	
 	// signal handlers
-	private void show_open_dialog()
-	{
-		var dialog = new Gtk.FileChooserDialog(_("Open File"),
-		                                       this,
-		                                       Gtk.FileChooserAction.OPEN,
-		                                       null);
-		dialog.run();
-	}
-	
-	private void new_presentation()
-	{
-		//var window = new EditorWindow("../../../../Examples/Example.ease/");
-	}
 	
 	// menu bar creation
 	private Gtk.MenuBar create_menu_bar()
@@ -297,7 +321,7 @@ public class Ease.EditorWindow : Gtk.Window
 		var new_item = new Gtk.MenuItem.with_label(_("New"));
 		var new_menu = new Gtk.Menu();
 		var new_pres = new Gtk.MenuItem.with_label(_("Presentation"));
-		new_pres.activate.connect(new_presentation);
+		new_pres.activate.connect(Main.show_welcome);
 		var new_theme = new Gtk.MenuItem.with_label(_("Theme"));
 		var quit = new Gtk.MenuItem.with_label(_("Quit"));
 		quit.activate.connect(Gtk.main_quit);
@@ -308,7 +332,7 @@ public class Ease.EditorWindow : Gtk.Window
 		menu.append(new_item);
 		
 		var open_item = new Gtk.MenuItem.with_label(_("Open"));
-		open_item.activate.connect(show_open_dialog);
+		open_item.activate.connect(() => OpenDialog.run());
 		open_item.set_accel_path("<-Document>/File/Open");
 		Gtk.AccelMap.add_entry("<-Document>/File/Open",
 		                       Gdk.keyval_from_name("o"),
diff --git a/src/Element.vala b/src/Element.vala
index f5d5bfb..0d32a2c 100644
--- a/src/Element.vala
+++ b/src/Element.vala
@@ -44,17 +44,20 @@ public class Ease.Element : GLib.Object
 	public ElementMap data;
 	
 	/**
-	 * Create a new element.
+	 * Create a new element, with an empty { link ElementMap}.
 	 */
 	public Element()
 	{
 		data = new ElementMap();
 	}
 	
+	/**
+	 * Creates a completely empty Element, without an { link ElementMap}.
+	 */
 	private Element.empty() { }
 	
 	/**
-	 * Return a copy of this Element
+	 * Creates and returns a copy of this Element.
 	 */
 	public Element copy()
 	{
@@ -202,6 +205,9 @@ public class Ease.Element : GLib.Object
 		exporter.add_progress(amount);
 	}
 	
+	/**
+	 * Renders this Element with Cairo.
+	 */
 	public void pdf_render(Cairo.Context context) throws Error
 	{
 		switch (data.get("element_type"))
@@ -215,6 +221,9 @@ public class Ease.Element : GLib.Object
 		}
 	}
 	
+	/**
+	 * Renders an image Element with Cairo.
+	 */
 	private void pdf_render_image(Cairo.Context context) throws Error
 	{
 		var filename = Path.build_path("/",
@@ -233,6 +242,9 @@ public class Ease.Element : GLib.Object
 		context.fill();
 	}
 	
+	/**
+	 * Renders a text Element with Cairo.
+	 */
 	private void pdf_render_text(Cairo.Context context) throws Error
 	{	
 		// create the layout
diff --git a/src/ElementMap.vala b/src/ElementMap.vala
index d8a097c..467646c 100644
--- a/src/ElementMap.vala
+++ b/src/ElementMap.vala
@@ -27,6 +27,9 @@
  */
 public class Ease.ElementMap : Object
 {
+	/**
+	 * The internal data store for ElementMap.
+	 */
 	private Gee.Map<string, ElementMapValue> map;
 	
 	/**
@@ -43,6 +46,9 @@ public class Ease.ElementMap : Object
 		map = new Gee.HashMap<string, ElementMapValue>();
 	}
 	
+	/**
+	 * Creates and returns a copy of this ElementMap.
+	 */
 	public ElementMap copy()
 	{
 		var ret = new ElementMap();
@@ -107,6 +113,9 @@ public class Ease.ElementMap : Object
 		return map.get(key).str_val;
 	}
 	
+	/**
+	 * Prints each of the map's keys and values to stdout.
+	 */
 	public void print()
 	{
 		foreach (var key in map.keys)
diff --git a/src/Enums.vala b/src/Enums.vala
index be39482..6c6f7e0 100644
--- a/src/Enums.vala
+++ b/src/Enums.vala
@@ -39,6 +39,6 @@ namespace Ease
 	{
 		PRESENTATION,
 		EDITOR,
-		SIDEBAR
+		INSPECTOR
 	}
 }
diff --git a/src/HTMLExporter.vala b/src/HTMLExporter.vala
index 6b2ce73..88b15d5 100644
--- a/src/HTMLExporter.vala
+++ b/src/HTMLExporter.vala
@@ -30,8 +30,14 @@ public class Ease.HTMLExporter : GLib.Object
 	private Gtk.Dialog window;
 	private Gtk.ProgressBar progress;
 	
+	/**
+	 * The path to export HTML to.
+	 */
 	public string path { get; private set; }
 	
+	/**
+	 * Creates a new HTMLExporter.
+	 */
 	public HTMLExporter()
 	{
 		progress = new Gtk.ProgressBar();
diff --git a/src/Handle.vala b/src/Handle.vala
index 110d461..d8eb9e7 100644
--- a/src/Handle.vala
+++ b/src/Handle.vala
@@ -20,17 +20,33 @@
  */
 public class Ease.Handle : Clutter.Texture
 {	
-	// the position of this handle
+	/**
+	 * The position of this handle relative to the selection rectangle.
+	 */
 	private HandlePosition position;
 	
-	// if the handle has been "flipped"
+	/**
+	 * If the handle is being dragged and should alter its appearance.
+	 */
 	private bool flipped = false;
 	
-	// constants
-	public const float SIZE = 20;
+	/**
+	 * The path to the white circle with a black border.
+	 */
 	public const string W_PATH = "/usr/local/share/ease/svg/handle-white.svg";
+	
+	/**
+	 * The path to the black circle with a white border.
+	 */
 	public const string B_PATH = "/usr/local/share/ease/svg/handle-black.svg";
 	
+	/**
+	 * Creates a Handle. Does automatically set the Handle's position - call
+	 * reposition() to do this.
+	 *
+	 * @param pos The position of this handle relative to the selection
+	 * rectangle.
+	 */
 	public Handle(HandlePosition pos)
 	{
 		// set the handle's position
@@ -46,6 +62,15 @@ public class Ease.Handle : Clutter.Texture
 		reactive = true;
 	}
 	
+	/**
+	 * Performs a drag of the handle, updating the selected { link Actor}'s size
+	 * and position.
+	 *
+	 * @param change_x The x drag distance.
+	 * @param change_y The y drag distance.
+	 * @param target The actor to update.
+	 * @param prop If any scaling should be proportional, if possible.
+	 */
 	public void drag(float change_x, float change_y, Actor target, bool prop)
 	{
 		switch (position)
@@ -89,6 +114,15 @@ public class Ease.Handle : Clutter.Texture
 		}
 	}
 	
+	/**
+	 * Performs a drag of the handle, scaling from the center. Updates the
+	 * selected { link Actor}'s size and position.
+	 *
+	 * @param change_x The x drag distance.
+	 * @param change_y The y drag distance.
+	 * @param target The actor to update.
+	 * @param prop If any scaling should be proportional, if possible.
+	 */
 	public void drag_from_center(float change_x, float change_y, Actor target,
 	                             bool prop)
 	{
@@ -136,6 +170,12 @@ public class Ease.Handle : Clutter.Texture
 		}
 	}
 	
+	/**
+	 * Places this Handle in its proper location, relative to the selection
+	 * rectangle.
+	 *
+	 * @param selection The selection rectangle to position the Handle around.
+	 */
 	public void reposition(Clutter.Actor selection)
 	{
 		switch (position)
diff --git a/src/JSONParser.vala b/src/JSONParser.vala
index 4192901..f1044f4 100644
--- a/src/JSONParser.vala
+++ b/src/JSONParser.vala
@@ -248,6 +248,9 @@ public static class Ease.JSONParser
 		return node;
 	}
 	
+	/**
+	 * Returns an absolute path for the given path.
+	 */
 	private static string absolute_path(string path)
 	{
 		var file = GLib.File.new_for_path(path);
diff --git a/src/ScrollableEmbed.vala b/src/ScrollableEmbed.vala
index 16eefe2..971d96e 100644
--- a/src/ScrollableEmbed.vala
+++ b/src/ScrollableEmbed.vala
@@ -42,22 +42,16 @@ public class Ease.ScrollableEmbed : Gtk.HBox
 	private const int FRAME_PADDING = 2;
 	
 	public bool has_horizontal { get; private set; }
+	
+	/**
+	 * The width of this ScrollableEmbed's Stage.
+	 */
+	public float width { get{ return stage.width; } }
 
-	public float width
-	{
-		get
-		{
-			return stage.width;
-		}
-	}
-
-	public float height
-	{
-		get
-		{
-			return stage.height;
-		}
-	}
+	/**
+	 * The height of this ScrollableEmbed's Stage.
+	 */
+	public float height { get { return stage.height; } }
 	
 	/**
 	 * Instantiate a ScollableEmbed with an optional vertical sidebar.
@@ -176,11 +170,18 @@ public class Ease.ScrollableEmbed : Gtk.HBox
 		embed.size_allocate.connect(embed_allocate);
 	}
 	
+	/**
+	 * Returns the stage of this ScrollableEmbed. Use with caution. Most
+	 * actors should be placed onto the "contents" ClutterGroup.
+	 */
 	public Clutter.Stage get_stage()
 	{
 		return (Clutter.Stage)(embed.get_stage());
 	}
-
+	
+	/**
+	 * Signal handler for size allocation.
+	 */
 	private void embed_allocate(Gtk.Widget sender, Gdk.Rectangle rect)
 	{
 		// pass on to Clutter actors
diff --git a/src/Slide.vala b/src/Slide.vala
index ae358c6..6c58422 100644
--- a/src/Slide.vala
+++ b/src/Slide.vala
@@ -202,6 +202,12 @@ public class Ease.Slide : GLib.Object
 		}
 	}
 	
+	/**
+	 * Adds an { link Element} to this slide at a specified index.
+	 *
+	 * @param index The index to add the { link Element} at.
+	 * @param e The { link Element} to add.
+	 */
 	public void add_element(int index, Element e)
 	{
 		e.parent = this;
diff --git a/src/SlideButtonPanel.vala b/src/SlideButtonPanel.vala
index 396b943..9297d00 100644
--- a/src/SlideButtonPanel.vala
+++ b/src/SlideButtonPanel.vala
@@ -58,24 +58,6 @@ public class Ease.SlideButtonPanel : Gtk.ScrolledWindow
 		viewport.set_shadow_type(Gtk.ShadowType.NONE);
 		viewport.add(align);
 		add(viewport);
-		
-//		slides_box.size_allocate.connect((box, rect) => {
-//			slides_box.child_min_height = (int)(rect.width / document.aspect);
-//			slides_box.child_min_width = rect.width;
-//		});
-//		
-//		size_allocate.connect((self, rect) => {
-//			var allocation = Gtk.Allocation();
-//			slides_box.get_allocation(allocation);
-//			
-//			stdout.printf("\nasdf %i %i\n", rect.width, allocation.width);
-//			
-//			if (allocation.width > rect.width)
-//			{
-//				stdout.printf("\nsmaller");
-//				slides_box.child_min_width = 0;
-//			}
-//		});
 	}
 	
 	/**
diff --git a/src/TextActor.vala b/src/TextActor.vala
index 58d5972..399311e 100644
--- a/src/TextActor.vala
+++ b/src/TextActor.vala
@@ -85,6 +85,10 @@ public class Ease.TextActor : Actor
 		text.text_changed.disconnect(text_changed);
 	}
 	
+	/**
+	 * Signal handler for text editing. Updates the "text" property on the
+	 * linked { link Element}.
+	 */
 	private void text_changed(Clutter.Text sender)
 	{
 		element.set("text", sender.text);
diff --git a/src/UndoActions.vala b/src/UndoActions.vala
index ee17d42..5dadfcd 100644
--- a/src/UndoActions.vala
+++ b/src/UndoActions.vala
@@ -61,6 +61,11 @@ public class Ease.MoveUndoAction : UndoAction
 		height = h;
 	}
 	
+	/**
+	 * Moves the { link Element} back to its original position.
+	 *
+	 * { inheritDoc}
+	 */
 	public override UndoAction apply()
 	{
 		var ret = new MoveUndoAction(element, element.x, element.y,
diff --git a/src/UndoController.vala b/src/UndoController.vala
index ead57a4..0ed823b 100644
--- a/src/UndoController.vala
+++ b/src/UndoController.vala
@@ -22,9 +22,19 @@
  */
 public class Ease.UndoController : Object
 {
+	/**
+	 * The undo queue.
+	 */
 	private Gee.LinkedList<UndoAction> undos = new Gee.LinkedList<UndoAction>();
+	
+	/**
+	 * The redo queue.
+	 */
 	private Gee.LinkedList<UndoAction> redos = new Gee.LinkedList<UndoAction>();
 	
+	/**
+	 * Creates an UndoController. Used by EditorWindow.
+	 */
 	public UndoController() { }
 	
 	/**
diff --git a/src/VideoActor.vala b/src/VideoActor.vala
index 1179e74..57b55c6 100644
--- a/src/VideoActor.vala
+++ b/src/VideoActor.vala
@@ -20,9 +20,15 @@
  *
  * VideoActor uses Clutter-GStreamer, and therefore supports any video
  * format supported by the GStreamer plugins on the user's system.
+ *
+ * VideoActor "implements" Clutter.Media by passing through all function calls
+ * to its VideoTexture.
  */
 public class Ease.VideoActor : Actor, Clutter.Media
 {
+	/**
+	 * The VideoTexture displayed by this VideoActor.
+	 */
 	private ClutterGst.VideoTexture video;
 
 	/**
diff --git a/src/ZoomSlider.vala b/src/ZoomSlider.vala
index d420dba..f54eb74 100644
--- a/src/ZoomSlider.vala
+++ b/src/ZoomSlider.vala
@@ -59,7 +59,14 @@ public class Ease.ZoomSlider : Gtk.Alignment, Clutter.Animatable
 		set { zoom_slider.set_value(value); }
 	}
 	
+	/**
+	 * Private store for buttons_shown property.
+	 */
 	private bool buttons_shown_priv = true;
+	
+	/**
+	 * If the + and - buttons should be shown. Defaults to true.
+	 */
 	public bool buttons_shown
 	{
 		get { return buttons_shown; }



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