diff options
| author | nyamatongwe <unknown> | 2006-02-04 00:02:08 +0000 |
|---|---|---|
| committer | nyamatongwe <unknown> | 2006-02-04 00:02:08 +0000 |
| commit | 1890406cfe2700df5511371ac082ce068697ac32 (patch) | |
| tree | a48035ed8a6c043c890d5bfee7d2718f3aa10976 /src/CallTip.h | |
| parent | 5907254a9ef71d37679aab2b6ad68c5a944d78a3 (diff) | |
| download | scintilla-mirror-1890406cfe2700df5511371ac082ce068697ac32.tar.gz | |
Modification from Greg Smith to allow setting text style attributes for
calltips as STYLE_CALLTIP and display calltips with tabs to align text.
Diffstat (limited to 'src/CallTip.h')
| -rw-r--r-- | src/CallTip.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/CallTip.h b/src/CallTip.h index 53eec832a..9848a10af 100644 --- a/src/CallTip.h +++ b/src/CallTip.h @@ -11,14 +11,17 @@ /** */ class CallTip { - int startHighlight; - int endHighlight; + int startHighlight; // character offset to start and... + int endHighlight; // ...end of highlighted text char *val; Font font; - PRectangle rectUp; - PRectangle rectDown; - int lineHeight; - int offsetMain; + PRectangle rectUp; // rectangle of last up angle in the tip + PRectangle rectDown; // rectangle of last down arrow in the tip + int lineHeight; // vertical line spacing + int offsetMain; // The alignment point of the call tip + int tabSize; // Tab size in pixels, <=0 no TAB expand + bool useStyleCallTip; // if true, STYLE_CALLTIP should be used + // Private so CallTip objects can not be copied CallTip(const CallTip &) {} CallTip &operator=(const CallTip &) { return *this; } @@ -26,6 +29,8 @@ class CallTip { int posStart, int posEnd, int ytext, PRectangle rcClient, bool highlight, bool draw); int PaintContents(Surface *surfaceWindow, bool draw); + bool IsTabCharacter(char c); + int NextTabPos(int x); public: Window wCallTip; @@ -60,6 +65,15 @@ public: /// 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); + + /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand. + void SetTabSize(int tabSz); + + /// Used to determine which STYLE_xxxx to use for call tip information + bool UseStyleCallTip() const { return useStyleCallTip;} + + // Modify foreground and background colours + void SetForeBack(const ColourPair &fore, const ColourPair &back); }; #endif |
