aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CallTip.h
blob: cb5bc29032fb3914d5740631fda935f3227c1b77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Scintilla source code edit control
// CallTip.h - interface to the call tip control
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.

#ifndef CALLTIP_H
#define CALLTIP_H

class CallTip {
	int startHighlight;
	int endHighlight;
	char *val;
	Font font;
	// Private so CallTip objects can not be copied
	CallTip(const CallTip &) {}
	CallTip &operator=(const CallTip &) { return *this; }
public:
	Window wCallTip;
	Window wDraw;
	bool inCallTipMode;
	int posStartCallTip;
	ColourPair colourBG;
	ColourPair colourUnSel;
	ColourPair colourSel;
	ColourPair colourShade;
	ColourPair colourLight;
	
	CallTip();
	~CallTip();
	
	// Claim or accept palette entries for the colours required to paint a calltip
	void RefreshColourPalette(Palette &pal, bool want);
	
	void PaintCT(Surface *surfaceWindow);
	
	// Setup the calltip and return a rectangle of the area required
	PRectangle CallTipStart(int pos, Point pt, const char *defn, 
		const char *faceName, int size);
		
	void CallTipCancel();
	
	// Set a range of characters to be displayed in a highlight style.
	// Commonly used to highlight the current parameter.
	void SetHighlight(int start, int end);
};

#endif