File: i_complete.h

package info (click to toggle)
fte 0.50.0-1.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,536 kB
  • ctags: 6,167
  • sloc: cpp: 45,854; ansic: 2,586; perl: 808; makefile: 125; sh: 104
file content (47 lines) | stat: -rw-r--r-- 1,119 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*    i_ascii.h
 *
 *    Copyright (c) 1994-1996, Marko Macek
 *
 *    You may distribute under the terms of either the GNU General Public
 *    License or the Artistic License, as specified in the README file.
 *
 */

#ifndef __EXCOMPLETE_H
#define __EXCOMPLETE_H

// maximum words which will be presented to the user
#define MAXCOMPLETEWORDS 300

class ExComplete: public ExView {
    EPoint Orig;
    EBuffer *Buffer;
    int WordsLast;
    char **Words;
    char *WordBegin;
    char *WordContinue;
    int WordPos;
    size_t WordFixed;
    size_t WordFixedCount;

    int RefreshComplete();
    inline int CheckASCII(int c) {
	return ((c < 256)
		&& (isalnum(c) || (c == '_') || (c == '.'))) ? 1 : 0;
    }
    void FixedUpdate(int add);

public:

    ExComplete(EBuffer *B);
    virtual ~ExComplete();
    virtual void Activate(int gotfocus);
    virtual ExView* GetViewContext() { return Next; }
    virtual int BeginMacro();
    virtual void HandleEvent(TEvent &Event);
    virtual void UpdateView();
    virtual void RepaintView();
    virtual void UpdateStatus();
    virtual void RepaintStatus();
};
#endif