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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXGroupBox.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                G r o u p  B o x   W i n d o w   W i d g e t                   *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,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 FXGROUPBOX_H
00022 #define FXGROUPBOX_H
00023 
00024 #ifndef FXPACKER_H
00025 #include "FXPacker.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 // Group box options
00032 enum {
00033   GROUPBOX_TITLE_LEFT   = 0,          
00034   GROUPBOX_TITLE_CENTER = 0x00020000, 
00035   GROUPBOX_TITLE_RIGHT  = 0x00040000, 
00036   GROUPBOX_NORMAL       = GROUPBOX_TITLE_LEFT
00037   };
00038 
00039 
00040 
00047 class FXAPI FXGroupBox : public FXPacker {
00048   FXDECLARE(FXGroupBox)
00049 protected:
00050   FXString  label;
00051   FXFont   *font;
00052   FXColor   textColor;
00053 protected:
00054   FXGroupBox();
00055 private:
00056   FXGroupBox(const FXGroupBox&);
00057   FXGroupBox &operator=(const FXGroupBox&);
00058 public:
00059   long onPaint(FXObject*,FXSelector,void*);
00060   long onCmdSetValue(FXObject*,FXSelector,void*);
00061   long onCmdSetStringValue(FXObject*,FXSelector,void*);
00062   long onCmdGetStringValue(FXObject*,FXSelector,void*);
00063 public:
00064 
00066   FXGroupBox(FXComposite* p,const FXString& text,FXuint opts=GROUPBOX_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
00067 
00069   virtual void create();
00070 
00072   virtual void detach();
00073 
00075   virtual void layout();
00076 
00078   virtual void enable();
00079 
00081   virtual void disable();
00082 
00084   virtual FXint getDefaultWidth();
00085 
00087   virtual FXint getDefaultHeight();
00088 
00090   void setText(const FXString& text);
00091 
00093   FXString getText() const { return label; }
00094 
00096   void setGroupBoxStyle(FXuint style);
00097 
00099   FXuint getGroupBoxStyle() const;
00100 
00102   void setFont(FXFont* fnt);
00103 
00105   FXFont* getFont() const { return font; }
00106 
00108   void setTextColor(FXColor clr);
00109 
00111   FXColor getTextColor() const { return textColor; }
00112 
00114   virtual void save(FXStream& store) const;
00115 
00117   virtual void load(FXStream& store);
00118   };
00119 
00120 }
00121 
00122 #endif

Copyright © 1997-2011 Jeroen van der Zijp