IEditor.cs :  » GUI » SourceGrid » SourceGrid3 » Cells » Editors » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » GUI » SourceGrid 
SourceGrid » SourceGrid3 » Cells » Editors » IEditor.cs
using System;
using System.Windows.Forms;

namespace SourceGrid3.Cells.Editors{
  /// <summary>
  /// Class used for editing operation, string conversion and value formatting. Can be assigned to the Editor property of a cell.
  /// </summary>
  public interface IEditor : DevAge.ComponentModel.Validator.IValidator
  {
    #region Editing
    /// <summary>
    /// Cell in editing, if null no cell is in editing state
    /// </summary>
    CellContext EditCellContext
    {
      get;
    }
    /// <summary>
    /// Cell in editing, if null no cell is in editing state
    /// </summary>
    Cells.ICellVirtual EditCell
    {
      get;
    }
    /// <summary>
    /// Cell in editing, if Empty no cell is in editing state
    /// </summary>
    Position EditPosition
    {
      get;
    }

    /// <summary>
    /// Start editing the cell passed. Do not call this method for start editing a cell, you must use Cell.StartEdit. For internal use only, use Cell.StartEdit.
    /// </summary>
    /// <param name="cellContext">Cell to start edit</param>
    void InternalStartEdit(CellContext cellContext);

    /// <summary>
    /// Terminate the edit action. For internal use only, use Cell.EndEdit.
    /// </summary>
    /// <param name="cancel">True to cancel the editing and return to normal mode, false to call automatically ApplyEdit and terminate editing</param>
    /// <returns>Returns true if the cell terminate the editing mode</returns>
    bool InternalEndEdit(bool cancel);


    /// <summary>
    /// Returns true if the cell is in editing state
    /// </summary>
    bool IsEditing
    {
      get;
    }

    /// <summary>
    /// Enable or disable the cell editor (if disable no edit is allowed). If false also not UI editing are blocked.
    /// </summary>
    bool EnableEdit
    {
      get;
      set;
    }

    /// <summary>
    /// Mode to edit the cell.
    /// </summary>
    EditableMode EditableMode
    {
      get;
      set;
    }

    /// <summary>
    /// Indicates if the draw of the cell when in editing mode is enabled.
    /// </summary>
    bool EnableCellDrawOnEdit
    {
      get;
    }
    #endregion

    #region Modify Functions
    /// <summary>
    /// Clear the value of the cell using the default value
    /// </summary>
    /// <param name="cellContext">Cell to change value</param>
    void ClearCell(CellContext cellContext);

    /// <summary>
    /// Change the value of the cell applying the rule of the current editor. Is recommend to use this method to simulate a edit operation and to validate the cell value using the current model.
    /// </summary>
    /// <param name="cellContext">Cell to change value</param>
    /// <param name="newValue"></param>
    /// <returns>returns true if the value passed is valid and has been applied to the cell</returns>
    bool SetCellValue(CellContext cellContext, object newValue);

    #endregion

    #region Validating
    /// <summary>
    /// Fired to check if the value specified by the user is allowed
    /// this event is fired after the ValidatingValue (use ValidatingValue to check if the value is compatible with the cell)
    /// </summary>
    event ValidatingCellEventHandler Validating;
    /// <summary>
    /// Fired after the value specified by the user inserited in the cell
    /// </summary>
    event CellContextEventHandler Validated;
    #endregion

    #region Conversion
    /// <summary>
    /// Check if the given string is error
    /// </summary>
    /// <param name="p_str"></param>
    /// <returns></returns>
    bool IsErrorString(string p_str);
    #endregion

    #region Send Keys
    /// <summary>
    /// Used to send some keyboard keys to the active editor. It is only valid when there is an active edit operations.
    /// </summary>
    /// <param name="key"></param>
    void SendCharToEditor(char key);
    #endregion
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.