]> git.saurik.com Git - wxWidgets.git/blame - src/stc/scintilla/src/CallTip.h
Initial copy of Scintilla 3.21 code
[wxWidgets.git] / src / stc / scintilla / src / CallTip.h
CommitLineData
9ce192d4 1// Scintilla source code edit control
65ec6247
RD
2/** @file CallTip.h
3 ** Interface to the call tip control.
4 **/
5// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
9ce192d4
RD
6// The License.txt file describes the conditions under which this software may be distributed.
7
8#ifndef CALLTIP_H
9#define CALLTIP_H
10
7e0c58e9
RD
11#ifdef SCI_NAMESPACE
12namespace Scintilla {
13#endif
14
65ec6247
RD
15/**
16 */
9ce192d4 17class CallTip {
b8193d80
RD
18 int startHighlight; // character offset to start and...
19 int endHighlight; // ...end of highlighted text
9ce192d4
RD
20 char *val;
21 Font font;
b8193d80
RD
22 PRectangle rectUp; // rectangle of last up angle in the tip
23 PRectangle rectDown; // rectangle of last down arrow in the tip
24 int lineHeight; // vertical line spacing
25 int offsetMain; // The alignment point of the call tip
26 int tabSize; // Tab size in pixels, <=0 no TAB expand
27 bool useStyleCallTip; // if true, STYLE_CALLTIP should be used
1dcf666d 28 bool above; // if true, display calltip above text
b8193d80 29
f6bcfd97 30 // Private so CallTip objects can not be copied
9e96e16f
RD
31 CallTip(const CallTip &);
32 CallTip &operator=(const CallTip &);
9e730a78
RD
33 void DrawChunk(Surface *surface, int &x, const char *s,
34 int posStart, int posEnd, int ytext, PRectangle rcClient,
35 bool highlight, bool draw);
36 int PaintContents(Surface *surfaceWindow, bool draw);
1dcf666d 37 bool IsTabCharacter(char c) const;
b8193d80 38 int NextTabPos(int x);
65ec6247 39
9ce192d4
RD
40public:
41 Window wCallTip;
42 Window wDraw;
43 bool inCallTipMode;
44 int posStartCallTip;
1dcf666d
RD
45 ColourDesired colourBG;
46 ColourDesired colourUnSel;
47 ColourDesired colourSel;
48 ColourDesired colourShade;
49 ColourDesired colourLight;
9e730a78
RD
50 int codePage;
51 int clickPlace;
52
9ce192d4
RD
53 CallTip();
54 ~CallTip();
9e730a78 55
9ce192d4 56 void PaintCT(Surface *surfaceWindow);
9e730a78
RD
57
58 void MouseClick(Point pt);
59
65ec6247 60 /// Setup the calltip and return a rectangle of the area required.
1dcf666d
RD
61 PRectangle CallTipStart(int pos, Point pt, int textHeight, const char *defn,
62 const char *faceName, int size, int codePage_,
63 int characterSet, int technology, Window &wParent);
9e730a78 64
9ce192d4 65 void CallTipCancel();
9e730a78 66
65ec6247
RD
67 /// Set a range of characters to be displayed in a highlight style.
68 /// Commonly used to highlight the current parameter.
9ce192d4 69 void SetHighlight(int start, int end);
b8193d80
RD
70
71 /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand.
72 void SetTabSize(int tabSz);
73
1dcf666d
RD
74 /// Set calltip position.
75 void SetPosition(bool aboveText);
76
b8193d80
RD
77 /// Used to determine which STYLE_xxxx to use for call tip information
78 bool UseStyleCallTip() const { return useStyleCallTip;}
79
80 // Modify foreground and background colours
1dcf666d 81 void SetForeBack(const ColourDesired &fore, const ColourDesired &back);
9ce192d4
RD
82};
83
7e0c58e9
RD
84#ifdef SCI_NAMESPACE
85}
86#endif
87
9ce192d4 88#endif