aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CallTip.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/CallTip.h')
-rw-r--r--src/CallTip.h26
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