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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXSpring.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                S p r i n g   C o n t a i n e r   W i d g e t                  *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2003,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 FXSPRING_H
00022 #define FXSPRING_H
00023 
00024 #ifndef FXPACKER_H
00025 #include "FXPacker.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00052 class FXAPI FXSpring : public FXPacker {
00053   FXDECLARE(FXSpring)
00054 protected:
00055   FXint   relWidth;     // Relative width
00056   FXint   relHeight;    // Relative height
00057 protected:
00058   FXSpring(){}
00059 private:
00060   FXSpring(const FXSpring&);
00061   FXSpring &operator=(const FXSpring&);
00062 public:
00063 
00065   FXSpring(FXComposite *p,FXuint opts=0,FXint relw=0,FXint relh=0,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);
00066 
00068   virtual FXint getDefaultWidth();
00069 
00071   virtual FXint getDefaultHeight();
00072 
00074   void setRelativeWidth(FXint relw);
00075 
00077   FXint getRelativeWidth() const { return relWidth; }
00078 
00080   void setRelativeHeight(FXint relh);
00081 
00083   FXint getRelativeHeight() const { return relHeight; }
00084 
00086   virtual void save(FXStream& store) const;
00087 
00089   virtual void load(FXStream& store);
00090   };
00091 
00092 }
00093 
00094 #endif

Copyright © 1997-2011 Jeroen van der Zijp