]> git.saurik.com Git - wxWidgets.git/blob - contrib/src/stc/scintilla/src/CallTip.h
Cast to void* before casting to Node** to make the compiler do no strict-aliasing...
[wxWidgets.git] / contrib / src / stc / scintilla / src / CallTip.h
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.
7
8 #ifndef CALLTIP_H
9 #define CALLTIP_H
10
11 /**
12 */
13 class CallTip {
14 int startHighlight;
15 int endHighlight;
16 char *val;
17 Font font;
18 int xUp;
19 int xDown;
20 int lineHeight;
21 int offsetMain;
22 // Private so CallTip objects can not be copied
23 CallTip(const CallTip &) {}
24 CallTip &operator=(const CallTip &) { return *this; }
25 void DrawChunk(Surface *surface, int &x, const char *s,
26 int posStart, int posEnd, int ytext, PRectangle rcClient,
27 bool highlight, bool draw);
28 int PaintContents(Surface *surfaceWindow, bool draw);
29
30 public:
31 Window wCallTip;
32 Window wDraw;
33 bool inCallTipMode;
34 int posStartCallTip;
35 ColourPair colourBG;
36 ColourPair colourUnSel;
37 ColourPair colourSel;
38 ColourPair colourShade;
39 ColourPair colourLight;
40 int codePage;
41 int clickPlace;
42
43 CallTip();
44 ~CallTip();
45
46 /// Claim or accept palette entries for the colours required to paint a calltip.
47 void RefreshColourPalette(Palette &pal, bool want);
48
49 void PaintCT(Surface *surfaceWindow);
50
51 void MouseClick(Point pt);
52
53 /// Setup the calltip and return a rectangle of the area required.
54 PRectangle CallTipStart(int pos, Point pt, const char *defn,
55 const char *faceName, int size, int codePage_,
56 int characterSet, Window &wParent);
57
58 void CallTipCancel();
59
60 /// Set a range of characters to be displayed in a highlight style.
61 /// Commonly used to highlight the current parameter.
62 void SetHighlight(int start, int end);
63 };
64
65 #endif