<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<!--
 * $Rev$
 * $Date$
 *
 * ***** BEGIN LICENSE BLOCK *****
 *
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 *
 * The Original Code is task_addsnippets.htm
 *
 * The Initial Developer of the Original Code is Peter Johnson
 * (http://www.delphidabbler.com/).
 *
 * Portions created by the Initial Developer are Copyright (C) 2008-2009 Peter
 * Johnson. All Rights Reserved.
 *
 * ***** END LICENSE BLOCK *****
-->
<html>
  <head>
    <meta http-equiv="Content-Type" content="text-html; charset=Windows-1252">
    <title>
      Add Snippets to the Database
    </title>
    <link rel="stylesheet" href="../css/codesnip.css" type="text/css">
  </head>
  <body>
    <object
      type="application/x-oleobject"
      classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"
    >
      <param name="ALink Name" value="TaskAddSnippets">
    </object>
    <h1>
      <a name="task_addsnippets"></a>Add Snippets to the Database
    </h1>
    <p>
      You can add your own code snippets to the database as follows:
    </p>
    <ol>
      <li>
        Click the <img
          src="../Images/AddSnippet.gif"
          class="glyph"
          alt="Add Snippet button"
        > toolbar button or choose the <em>Database | Add Snippet</em> menu
        option.
      </li>
      <li>
        Provide information about the snippet, along with its source code in the
        resulting <a href="dlg_editsnippet.htm">Add a Snippet</a> dialog box.
      </li>
    </ol>
    <p>
      Existing user-defined snippets can be edited or deleted by selecting the
      required snippet and choosing the <em>Edit Snippet</em> and <em>Delete
      Snippet</em> options on the <em>Database</em> menu or using the 
      <img
        src="../Images/EditSnippet.gif"
        class="glyph"
        alt="Edit Snippet button"
      > or 
      <img
        src="../Images/DeleteSnippet.gif"
        class="glyph"
        alt="Delete Snippet button"
      > toolbar buttons.
    </p>
    <p>
      Snippets can be categorised using any of the existing categories, or you
      can define your own using the <em>Database | Add Category</em> menu item.
      You can also rename your categories (<em>Database | Rename Category</em>)
      and delete them when no longer needed (<em>Database | Delete
      Category</em>). If you don't want to categorise them, just use the
      predefined <em>User Defined Snippets</em> category to keep them together.
    </p>
    <p>
      Changes to the user database are indicated by the display of a
      "Modified" flag in the status bar. The database can be saved
      using the <em>Database | Save User Database</em> menu option or the
      <img
        src="../Images/SaveDatabase.gif"
        class="glyph"
        alt="Save User Database button"
      > toolbar button. <strong>Note:</strong> the user database is
      automatically saved when <em>CodeSnip</em> is closed normally. The
      database can also be backed up and restored from the <em>Database</em>
      menu.
    </p>
    <p>
      Snippets from the main database cannot be edited or deleted. User defined
      snippets are displayed in a different colour to the snippets from the main
      database.
    </p>
  </body>
</html>