1 // Scintilla source code edit control
3 ** Interface to the call tip control.
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.
18 int startHighlight
; // character offset to start and...
19 int endHighlight
; // ...end of highlighted text
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;
45 ColourDesired colourBG
;
46 ColourDesired colourUnSel
;
47 ColourDesired colourSel
;
48 ColourDesired colourShade
;
49 ColourDesired colourLight
;
53 int insetX
; // text inset in x from calltip border
56 int verticalOffset
; // pixel offset up or down of the calltip with respect to the line
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
);
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
);