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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXDockTitle.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                         D o c k T i t l e   W i d g e t                       *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2005,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXDOCKTITLE_H
00022 #define FXDOCKTITLE_H
00023 
00024 #ifndef FXDOCKHANDLER_H
00025 #include "FXDockHandler.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00036 class FXAPI FXDockTitle : public FXDockHandler {
00037   FXDECLARE(FXDockTitle)
00038 protected:
00039   FXString  caption;            // Caption text
00040   FXFont   *font;               // Caption font
00041   FXColor   captionColor;       // Caption color
00042 protected:
00043   FXDockTitle();
00044 private:
00045   FXDockTitle(const FXDockTitle&);
00046   FXDockTitle& operator=(const FXDockTitle&);
00047 public:
00048   long onPaint(FXObject*,FXSelector,void*);
00049   long onCmdSetValue(FXObject*,FXSelector,void*);
00050   long onCmdSetStringValue(FXObject*,FXSelector,void*);
00051   long onCmdGetStringValue(FXObject*,FXSelector,void*);
00052 public:
00053 
00055   FXDockTitle(FXComposite* p,const FXString& text,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=FRAME_NORMAL|JUSTIFY_CENTER_X|JUSTIFY_CENTER_Y,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0);
00056 
00058   virtual void create();
00059 
00061   virtual void detach();
00062 
00064   virtual FXint getDefaultWidth();
00065 
00067   virtual FXint getDefaultHeight();
00068 
00070   void setCaption(const FXString& text);
00071 
00073   FXString getCaption() const { return caption; }
00074 
00076   void setFont(FXFont *fnt);
00077 
00079   FXFont* getFont() const { return font; }
00080 
00082   FXColor getCaptionColor() const { return captionColor; }
00083 
00085   void setCaptionColor(FXColor clr);
00086 
00088   void setJustify(FXuint mode);
00089 
00091   FXuint getJustify() const;
00092 
00094   virtual void save(FXStream& store) const;
00095 
00097   virtual void load(FXStream& store);
00098 
00100   virtual ~FXDockTitle();
00101   };
00102 
00103 }
00104 
00105 #endif

Copyright © 1997-2011 Jeroen van der Zijp