Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 101 lines (83 sloc) 3.602 kB
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
1 /***********************************************************************
2 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
3 * Copyright (c) 2001 by J. Lyle Johnson. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * For further information please contact the author by e-mail
a934547 @lylejohnson Replaced e-mail address "lyle@users.sourceforge.net" with
lylejohnson authored
20 * at "lyle@lylejohnson.name".
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
21 ***********************************************************************/
22
23 /**
24 * The status line normally shows its permanent message; when
25 * moving the mouse over a Widget which has status-line help, the status line
26 * temporarily replaces its normal message with the help information; the status
27 * line obtains the help message by sending the Widget a ID_QUERY_HELP message
28 * with type SEL_UPDATE.
29 * If this query does not result in a new status string, the target of
30 * the status line is tried via an ordinary SEL_UPDATE message.
31 * If none of the above work then the status line will display the normal text,
32 * i.e. the string set via setNormalText().
33 * If the message contains a newline (\n), then the part before the newline
34 * will be displayed in the highlight color, while the part after the newline
35 * is shown using the normal text color.
36 */
37
38 class FXStatusLine : public FXFrame {
39 protected:
40 FXString status; // Current status message
41 FXString normal; // Normally displayed message
42 FXFont *font; // Font
43 FXColor textColor; // Status text color
44 FXColor textHighlightColor; // Status text highlight color
45 protected:
46 FXStatusLine();
47 public:
48 long onPaint(FXObject*,FXSelector,void* PTR_EVENT);
49 long onUpdate(FXObject*,FXSelector,void* PTR_NULL);
50 long onCmdGetStringValue(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
51 long onCmdSetStringValue(FXObject*,FXSelector,void* PTR_STRING);
52 public:
53
54 %extend {
55 /// Constructor
56 FXStatusLine(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0){
57 return new FXRbStatusLine(p,tgt,sel);
58 }
59 }
60
61 /// Change the temporary status message
62 void setText(const FXString& text);
bea4cad @larskanis Strip all whitespaces on line endings
authored
63
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
64 /// Return the temporary status message
65 FXString getText() const;
66
67 /// Change the permanent status message
68 void setNormalText(const FXString& text);
bea4cad @larskanis Strip all whitespaces on line endings
authored
69
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
70 /// Return the permanent status message
71 FXString getNormalText() const;
72
73 /// Change the font
74 void setFont(FXFont* fnt);
bea4cad @larskanis Strip all whitespaces on line endings
authored
75
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
76 /// Return the current font
77 FXFont* getFont() const;
78
79 /// Return the text color
80 FXColor getTextColor() const;
81
82 /// Change the text color
83 void setTextColor(FXColor clr);
bea4cad @larskanis Strip all whitespaces on line endings
authored
84
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
85 /// Return the highlight text color
86 FXColor getTextHighlightColor() const;
87
88 /// Change the highlight text color
89 void setTextHighlightColor(FXColor clr);
bea4cad @larskanis Strip all whitespaces on line endings
authored
90
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
91 /// Destroy
92 virtual ~FXStatusLine();
93 };
94
95
96 DECLARE_FXOBJECT_VIRTUALS(FXStatusLine)
97 DECLARE_FXID_VIRTUALS(FXStatusLine)
98 DECLARE_FXDRAWABLE_VIRTUALS(FXStatusLine)
99 DECLARE_FXWINDOW_VIRTUALS(FXStatusLine)
100
Something went wrong with that request. Please try again.