coan 4.2.4
line_edit.h
Go to the documentation of this file.
00001 #ifndef LINE_EDIT_H
00002 #define LINE_EDIT_H
00003 
00004 /***************************************************************************
00005  *   Copyright (C) 2004, 2006 Symbian Software Ltd.                        *
00006  *   All rights reserved.                                                  *
00007  *   Copyright (C) 2007-2011 Mike Kinghan, imk@strudl.org                  *
00008  *   All rights reserved.                                                  *
00009  *                                                                         *
00010  *   Contributed originally by Mike Kinghan, imk@strudl.org                *
00011  *                                                                         *
00012  *   Redistribution and use in source and binary forms, with or without    *
00013  *   modification, are permitted provided that the following conditions    *
00014  *   are met:                                                              *
00015  *                                                                         *
00016  *   Redistributions of source code must retain the above copyright        *
00017  *   notice, this list of conditions and the following disclaimer.         *
00018  *                                                                         *
00019  *   Redistributions in binary form must reproduce the above copyright     *
00020  *   notice, this list of conditions and the following disclaimer in the   *
00021  *   documentation and/or other materials provided with the distribution.  *
00022  *                                                                         *
00023  *   Neither the name of Symbian Software Ltd. nor the names of its        *
00024  *   contributors may be used to endorse or promote products derived from  *
00025  *   this software without specific prior written permission.              *
00026  *                                                                         *
00027  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   *
00028  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     *
00029  *   LIMITED TO, THE IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS    *
00030  *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE        *
00031  *   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,   *
00032  *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,  *
00033  *   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS *
00034  *   OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED    *
00035  *   AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,*
00036  *   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF *
00037  *   THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH  *
00038  *   DAMAGE.                                                               *
00039  *                                                                         *
00040  **************************************************************************/
00041 
00042 #include "state_utils.h"
00043 
00051 
00055 #define DELETEABLE_CHR  ((char)001)
00056 
00060 #define DELETEABLE_LPAREN ((char)002)
00061 
00065 #define DELETEABLE_RPAREN ((char)003)
00066 
00070 #define DELETEABLE(ch) ((ch) < 4)
00071 
00072 
00080 extern void
00081 keywordedit(const char *replacement);
00082 
00103 extern void
00104 delete_paren(size_t lparen_off, size_t rparen_off);
00105 
00115 extern void
00116 restore_paren(size_t lparen_off, size_t rparen_off);
00117 
00127 extern void
00128 restore_all_paren(void);
00129 
00145 extern void
00146 cut_text(char const *start, char const *end);
00147 
00152 void
00153 truncate_line(size_t off);
00154 
00159 
00161 PUBLIC_STATE_DEF(line_edit)
00162 {
00163     char*       keyword; 
00164     bool ops_cut;
00166     size_t parens_deleted;
00168 }
00169 PUBLIC_STATE_T(line_edit);
00174 IMPORT(line_edit);
00178 #endif /* EOF*/
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines