FXStatusLine.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                       S t a t u s L i n e   W i d g e t                       *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1999,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXStatusLine.h,v 1.8 2006/01/22 17:58:10 fox Exp $                       *
00023 ********************************************************************************/
00024 #ifndef FXSTATUSLINE_H
00025 #define FXSTATUSLINE_H
00026 
00027 #ifndef FXFRAME_H
00028 #include "FXFrame.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00048 class FXAPI FXStatusLine : public FXFrame {
00049   FXDECLARE(FXStatusLine)
00050 protected:
00051   FXString  status;             // Current status message
00052   FXString  normal;             // Normally displayed message
00053   FXFont   *font;               // Font
00054   FXColor   textColor;          // Status text color
00055   FXColor   textHighlightColor; // Status text highlight color
00056 protected:
00057   FXStatusLine();
00058 private:
00059   FXStatusLine(const FXStatusLine&);
00060   FXStatusLine& operator=(const FXStatusLine&);
00061 public:
00062   long onPaint(FXObject*,FXSelector,void*);
00063   long onUpdate(FXObject*,FXSelector,void*);
00064   long onCmdGetStringValue(FXObject*,FXSelector,void*);
00065   long onCmdSetStringValue(FXObject*,FXSelector,void*);
00066 public:
00067 
00069   FXStatusLine(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0);
00070 
00072   virtual void create();
00073 
00075   virtual void detach();
00076 
00078   virtual FXint getDefaultWidth();
00079 
00081   virtual FXint getDefaultHeight();
00082 
00084   void setText(const FXString& text);
00085 
00087   FXString getText() const { return status; }
00088 
00090   void setNormalText(const FXString& text);
00091 
00093   FXString getNormalText() const { return normal; }
00094 
00096   void setFont(FXFont* fnt);
00097 
00099   FXFont* getFont() const { return font; }
00100 
00102   FXColor getTextColor() const { return textColor; }
00103 
00105   void setTextColor(FXColor clr);
00106 
00108   FXColor getTextHighlightColor() const { return textHighlightColor; }
00109 
00111   void setTextHighlightColor(FXColor clr);
00112 
00114   virtual void save(FXStream& store) const;
00115 
00117   virtual void load(FXStream& store);
00118 
00120   virtual ~FXStatusLine();
00121   };
00122 
00123 }
00124 
00125 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:24 2009 for TnFOX by doxygen v1.4.7