{ @abstract(This unit contains the common declarations for all edit controls.)
@author(Tomas Krysl (tk@tkweb.eu))
@created(18 Sep 2009)
@lastmod(20 Jun 2010)
This unit defines common types and functions for all edit controls.
Copyright © 2009 Tomas Krysl (tk@@tkweb.eu)
License:
This code is distributed as a freeware. You are free to use it as part
of your application for any purpose including freeware, commercial and
shareware applications. The origin of this source code must not be
misrepresented; you must not claim your authorship. You may modify this code
solely for your own purpose. Please feel free to contact the author if you
think your changes might be useful for other users. You may distribute only
the original package. The author accepts no liability for any damage
that may result from using this code. }
unit KEditCommon;
{$include kcontrols.inc}
{$WEAKPACKAGEUNIT ON}
interface
uses
{$IFDEF FPC}
LCLType, LCLIntf, LCLProc, LResources,
{$ELSE}
Windows, Messages,
{$ENDIF}
SysUtils, Classes, Graphics, Controls, Forms;
type
{ Declares possible values for the edit control commands. }
TKEditCommand = (
{ Move caret left one char }
ecLeft,
{ Move caret right one char }
ecRight,
{ Move caret up one line }
ecUp,
{ Move caret down one line }
ecDown,
{ Move caret to beginning of line }
ecLineStart,
{ Move caret to end of line }
ecLineEnd,
{ Move caret up one page }
ecPageUp,
{ Move caret down one page }
ecPageDown,
{ Move caret left one page }
ecPageLeft,
{ Move caret right one page }
ecPageRight,
{ Move caret to top of page }
ecPageTop,
{ Move caret to bottom of page }
ecPageBottom,
{ Move caret to absolute beginning }
ecEditorTop,
{ Move caret to absolute end }
ecEditorBottom,
{ Move caret to specific coordinates, Data = ^TPoint }
ecGotoXY,
{ Move caret left one char }
ecSelLeft,
{ Move caret right one char, affecting selection }
ecSelRight,
{ Move caret up one line, affecting selection }
ecSelUp,
{ Move caret down one line, affecting selection }
ecSelDown,
{ Move caret to beginning of line, affecting selection }
ecSelLineStart,
{ Move caret to end of line, affecting selection }
ecSelLineEnd,
{ Move caret up one page, affecting selection }
ecSelPageUp,
{ Move caret down one page, affecting selection }
ecSelPageDown,
{ Move caret left one page, affecting selection }
ecSelPageLeft,
{ Move caret right one page, affecting selection }
ecSelPageRight,
{ Move caret to top of page, affecting selection }
ecSelPageTop,
{ Move caret to bottom of page, affecting selection }
ecSelPageBottom,
{ Move caret to absolute beginning, affecting selection }
ecSelEditorTop,
{ Move caret to absolute end, affecting selection }
ecSelEditorBottom,
{ Move caret to specific coordinates, affecting selection, Data = ^TPoint }
ecSelGotoXY,
{ Scroll up one line leaving caret position unchanged }
ecScrollUp,
{ Scroll down one line leaving caret position unchanged }
ecScrollDown,
{ Scroll left one char leaving caret position unchanged }
ecScrollLeft,
{ Scroll right one char leaving caret position unchanged }
ecScrollRight,
{ Scroll to center the caret position within client area }
ecScrollCenter,
{ Undo previous action }
ecUndo,
{ Redo last undone action }
ecRedo,
{ Copy selection to clipboard }
ecCopy,
{ Cut selection to clipboard }
ecCut,
{ Paste clipboard to current position }
ecPaste,
{ Insert character at current position, Data = ^Char }
ecInsertChar,
{ Insert digits (digit string) at current position, Data = ^string
(must contain digits only), TKCustomHexEditor only }
ecInsertDigits,
{ Insert string (multiple characters) at current position, Data = ^string }
ecInsertString,
{ Delete last character (i.e. backspace key) }
ecDeleteLastChar,
{ Delete character at caret (i.e. delete key) }
ecDeleteChar,
{ Delete from caret to beginning of line }
ecDeleteBOL,
{ Delete from caret to end of line }
ecDeleteEOL,
{ Delete current line }
ecDeleteLine,
{ Select everything }
ecSelectAll,
{ Delete everything }
ecClearAll,
{ Delete selection (no digit selection), TKCustomHexEditor only }
ecClearIndexSelection,
{ Delete selection (digit selection as well) }
ecClearSelection,
{ Search for text/digits }
ecSearch,
{ Replace text/digits }
ecReplace,
{ Set insert mode }
ecInsertMode,
{ Set overwrite mode }
ecOverwriteMode,
{ Toggle insert/overwrite mode }
ecToggleMode,
{ Adjust editor when getting input focus }
ecGotFocus,
{ Adjust editor when losing input focus }
ecLostFocus
);
{ @abstract(Declares the keystroke information structure for the Key member
of the @link(TKEditCommandAssignment) structure)