OSDN Git Service

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