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,2017 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=NULL,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

Copyright © 1997-2016 Jeroen van der Zijp