Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXStatusLine.h
1 /********************************************************************************
2 * *
3 * S t a t u s L i n e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1999,2022 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXSTATUSLINE_H
22 #define FXSTATUSLINE_H
23 
24 #ifndef FXFRAME_H
25 #include "FXFrame.h"
26 #endif
27 
28 namespace FX {
29 
30 
50 class FXAPI FXStatusLine : public FXFrame {
51  FXDECLARE(FXStatusLine)
52 protected:
53  FXString status; // Current status message
54  FXString normal; // Normally displayed message
55  FXFont *font; // Font
56  FXColor textColor; // Status text color
57  FXColor textHighlightColor; // Status text highlight color
58 protected:
59  FXStatusLine();
60 private:
61  FXStatusLine(const FXStatusLine&);
62  FXStatusLine& operator=(const FXStatusLine&);
63 public:
64  long onPaint(FXObject*,FXSelector,void*);
65  long onUpdate(FXObject*,FXSelector,void*);
66  long onCmdGetStringValue(FXObject*,FXSelector,void*);
67  long onCmdSetStringValue(FXObject*,FXSelector,void*);
68 public:
69 
71  FXStatusLine(FXComposite* p,FXObject* tgt=nullptr,FXSelector sel=0);
72 
74  virtual void create();
75 
77  virtual void detach();
78 
80  virtual FXint getDefaultWidth();
81 
83  virtual FXint getDefaultHeight();
84 
86  void setText(const FXString& text);
87 
89  FXString getText() const { return status; }
90 
92  void setNormalText(const FXString& text);
93 
95  FXString getNormalText() const { return normal; }
96 
98  void setFont(FXFont* fnt);
99 
101  FXFont* getFont() const { return font; }
102 
104  FXColor getTextColor() const { return textColor; }
105 
107  void setTextColor(FXColor clr);
108 
110  FXColor getTextHighlightColor() const { return textHighlightColor; }
111 
113  void setTextHighlightColor(FXColor clr);
114 
116  virtual void save(FXStream& store) const;
117 
119  virtual void load(FXStream& store);
120 
122  virtual ~FXStatusLine();
123  };
124 
125 }
126 
127 #endif
FXColor getTextColor() const
Return the text color.
Definition: FXStatusLine.h:104
The Frame widget provides borders around some contents.
Definition: FXFrame.h:58
FXFont * getFont() const
Return the current font.
Definition: FXStatusLine.h:101
Base composite.
Definition: FXComposite.h:32
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXString getNormalText() const
Return the permanent status message.
Definition: FXStatusLine.h:95
Definition: FX4Splitter.h:28
The status line normally shows its permanent message.
Definition: FXStatusLine.h:50
FXString getText() const
Return the temporary status message.
Definition: FXStatusLine.h:89
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
FXColor getTextHighlightColor() const
Return the highlight text color.
Definition: FXStatusLine.h:110
Font class.
Definition: FXFont.h:137
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp