Merge pull request #826 from kugel-/doxygen-fixes2
[geany-mirror.git] / scintilla / src / CallTip.h
blob840aa26acc4925b86ed85c1683dfb865bf04a8ac
1 // Scintilla source code edit control
2 /** @file CallTip.h
3 ** Interface to the call tip control.
4 **/
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef CALLTIP_H
9 #define CALLTIP_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 /**
17 class CallTip {
18 int startHighlight; // character offset to start and...
19 int endHighlight; // ...end of highlighted text
20 std::string val;
21 Font font;
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
28 bool above; // if true, display calltip above text
30 // Private so CallTip objects can not be copied
31 CallTip(const CallTip &);
32 CallTip &operator=(const CallTip &);
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);
37 bool IsTabCharacter(char c) const;
38 int NextTabPos(int x) const;
40 public:
41 Window wCallTip;
42 Window wDraw;
43 bool inCallTipMode;
44 int posStartCallTip;
45 ColourDesired colourBG;
46 ColourDesired colourUnSel;
47 ColourDesired colourSel;
48 ColourDesired colourShade;
49 ColourDesired colourLight;
50 int codePage;
51 int clickPlace;
53 int insetX; // text inset in x from calltip border
54 int widthArrow;
55 int borderHeight;
56 int verticalOffset; // pixel offset up or down of the calltip with respect to the line
58 CallTip();
59 ~CallTip();
61 void PaintCT(Surface *surfaceWindow);
63 void MouseClick(Point pt);
65 /// Setup the calltip and return a rectangle of the area required.
66 PRectangle CallTipStart(int pos, Point pt, int textHeight, const char *defn,
67 const char *faceName, int size, int codePage_,
68 int characterSet, int technology, Window &wParent);
70 void CallTipCancel();
72 /// Set a range of characters to be displayed in a highlight style.
73 /// Commonly used to highlight the current parameter.
74 void SetHighlight(int start, int end);
76 /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand.
77 void SetTabSize(int tabSz);
79 /// Set calltip position.
80 void SetPosition(bool aboveText);
82 /// Used to determine which STYLE_xxxx to use for call tip information
83 bool UseStyleCallTip() const { return useStyleCallTip;}
85 // Modify foreground and background colours
86 void SetForeBack(const ColourDesired &fore, const ColourDesired &back);
89 #ifdef SCI_NAMESPACE
91 #endif
93 #endif