[gtksourceviewmm] Added missing documentation.



commit da8a52a7134957f72794d604eb4bc9a449af7247
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Thu Feb 25 19:09:31 2010 +0100

    Added missing documentation.
    
    * gtksourceview/src/sourcebuffer.hg:
    * gtksourceview/src/sourcecompletionwords.hg:
    * gtksourceview/src/sourceundomanager.hg: Added missing
    documentation to classes, methods and signals.

 gtksourceview/src/sourcebuffer.hg          |   20 +++++++++
 gtksourceview/src/sourcecompletionwords.hg |   25 +++++++++++-
 gtksourceview/src/sourceundomanager.hg     |   59 ++++++++++++++++++++++++++--
 3 files changed, 99 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/src/sourcebuffer.hg b/gtksourceview/src/sourcebuffer.hg
index e46087f..8ef4512 100644
--- a/gtksourceview/src/sourcebuffer.hg
+++ b/gtksourceview/src/sourcebuffer.hg
@@ -394,12 +394,32 @@ public:
    */
   _WRAP_METHOD(Glib::StringArrayHandle get_context_classes_at_iter(const Gtk::TextIter& iter) const, gtk_source_buffer_get_context_classes_at_iter)
 
+  /** Get the undo manager associated with the buffer.
+   * @return A SourceUndoManager.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(Glib::RefPtr<SourceUndoManager> get_undo_manager(), gtk_source_buffer_get_undo_manager)
 
+  /** Get the undo manager associated with the buffer.
+   * @return A SourceUndoManager.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(Glib::RefPtr<const SourceUndoManager> get_undo_manager() const, gtk_source_buffer_get_undo_manager, constversion)
 
+  /** Set the buffer undo manager.
+   *
+   * @param manager A SourceUndoManager.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void set_undo_manager(const Glib::RefPtr<const SourceUndoManager>& undo_manager), gtk_source_buffer_set_undo_manager)
 
+  /** Set the default buffer undo manager.
+   *
+   * @newin{2,10}
+   */
   void set_default_undo_manager();
 
   _WRAP_PROPERTY("highlight-syntax", bool)
diff --git a/gtksourceview/src/sourcecompletionwords.hg b/gtksourceview/src/sourcecompletionwords.hg
index 36a7143..50e8182 100644
--- a/gtksourceview/src/sourcecompletionwords.hg
+++ b/gtksourceview/src/sourcecompletionwords.hg
@@ -25,7 +25,11 @@ _PINCLUDE(glibmm/private/object_p.h)
 
 namespace gtksourceview
 {
-
+// TODO: docs needed.
+/** Words completion provider.
+ *
+ * @newin{2,10}
+ */
 class SourceCompletionWords
 :
   public Glib::Object,
@@ -36,11 +40,30 @@ class SourceCompletionWords
 protected:
   _WRAP_CTOR(SourceCompletionWords(const Glib::ustring& name, const Glib::RefPtr<Gdk::Pixbuf>& icon), gtk_source_completion_words_new)
 public:
+  /** Creates words provider with given name and icon.
+   *
+   * @param name Provider's name
+   * @param icon Provider's icon
+   *
+   * @newin{2,10}
+   */
   _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Gdk::Pixbuf>& icon)
 
 // TODO: think about a good method name - register is a C/C++ keyword.
+  /** Registers this provider in given buffer.
+   *
+   * @param buffer A buffer which will use this provider.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void register_provider(const Glib::RefPtr<Gtk::TextBuffer>& buffer), gtk_source_completion_words_register)
 
+  /** Unregisters this provider from given buffer.
+   *
+   * @param buffer A buffer which will not use this provider anymore.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void unregister_provider(const Glib::RefPtr<Gtk::TextBuffer>& buffer), gtk_source_completion_words_unregister)
 
   _WRAP_PROPERTY("name", Glib::ustring)
diff --git a/gtksourceview/src/sourceundomanager.hg b/gtksourceview/src/sourceundomanager.hg
index 86fa2d3..69cc357 100644
--- a/gtksourceview/src/sourceundomanager.hg
+++ b/gtksourceview/src/sourceundomanager.hg
@@ -28,11 +28,16 @@ _PINCLUDE(glibmm/private/interface_p.h)
 namespace gtksourceview
 {
 
-/** Completion proposal object.
+/** Undo manager interface for SourceView.
  *
- * The proposal interface represents a completion item in the completion window.
- * It provides information on how to display the completion item and what action
- * should be taken when the completion item is activated.
+ * The SourceUndoManager interface can be implemented to provide custom
+ * undo management to a SourceBuffer. Use
+ * SourceBuffer::set_undo_manager() to install a custom undo manager for
+ * a particular source buffer.
+ *
+ * Use SourceUndoManager::can_undo_changed() and
+ * SourceUndoManager::can_redo_changed() when respectively the undo state
+ * or redo state of the undo stack has changed.
  *
  * @newin{2,10}
  */
@@ -42,24 +47,70 @@ class SourceUndoManager : public Glib::Interface
 
 public:
 
+  /** Get whether there are undo operations available.
+   *
+   * @return @c true if there are undo operations available, @c false otherwise.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(bool can_undo() const, gtk_source_undo_manager_can_undo)
 
+  /** Get whether there are redo operations available.
+   *
+   * @return @c true if there are redo operations available, @c false otherwise.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(bool can_redo() const, gtk_source_undo_manager_can_redo)
 
+  /** Perform a single undo. Calling this function when there are no undo
+   * operations available is an error. Use can_undo() to find out if there are
+   * undo operations available.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void undo(), gtk_source_undo_manager_undo)
 
+  /** Perform a single redo. Calling this function when there are no redo
+   * operations available is an error. Use can_redo() to find out if there are
+   * redo operations available.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void redo(), gtk_source_undo_manager_redo)
 
+  /** Begin a not undoable action on the buffer. All changes between this call
+   * and the call to end_not_undoable_action() cannot be undone. This function
+   * should be re-entrant.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void begin_not_undoable_action(), gtk_source_undo_manager_begin_not_undoable_action)
 
+  /** Ends a not undoable action on the buffer.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void end_not_undoable_action(), gtk_source_undo_manager_end_not_undoable_action)
 
+  /** Emits the 'can-undo-changed' signal.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void can_undo_changed(), gtk_source_undo_manager_can_undo_changed)
 
+  /** Emits the 'can-redo-changed' signal.
+   *
+   * @newin{2,10}
+   */
   _WRAP_METHOD(void can_redo_changed(), gtk_source_undo_manager_can_redo_changed)
 
+  /** Emitted when the ability to undo has changed.
+   */
   _WRAP_SIGNAL(void can_undo_changed(), "can-undo-changed")
 
+  /** Emitted when the ability to redo has changed.
+   */
   _WRAP_SIGNAL(void can_redo_changed(), "can-redo-changed")
 
   _WRAP_VFUNC(bool can_undo() const, can_undo)



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