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

FXSpring.h
1 /********************************************************************************
2 * *
3 * S p r i n g C o n t a i n e r W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2003,2024 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 FXSPRING_H
22 #define FXSPRING_H
23 
24 #ifndef FXPACKER_H
25 #include "FXPacker.h"
26 #endif
27 
28 namespace FX {
29 
30 
52 class FXAPI FXSpring : public FXPacker {
53  FXDECLARE(FXSpring)
54 protected:
55  FXint relWidth; // Relative width
56  FXint relHeight; // Relative height
57 protected:
58  FXSpring(){}
59 private:
60  FXSpring(const FXSpring&);
61  FXSpring &operator=(const FXSpring&);
62 public:
63 
65  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);
66 
68  virtual FXint getDefaultWidth();
69 
71  virtual FXint getDefaultHeight();
72 
74  void setRelativeWidth(FXint relw);
75 
77  FXint getRelativeWidth() const { return relWidth; }
78 
80  void setRelativeHeight(FXint relh);
81 
83  FXint getRelativeHeight() const { return relHeight; }
84 
86  virtual void save(FXStream& store) const;
87 
89  virtual void load(FXStream& store);
90  };
91 
92 }
93 
94 #endif
Base composite.
Definition: FXComposite.h:32
The spring widgets, when properly embedded side by side in a horizontal frame or vertical frame widge...
Definition: FXSpring.h:52
FXint getRelativeWidth() const
Return relative width.
Definition: FXSpring.h:77
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Definition: FX4Splitter.h:28
Packer is a layout manager which automatically places child windows inside its area against the left...
Definition: FXPacker.h:48
FXint getRelativeHeight() const
Return relative height.
Definition: FXSpring.h:83

Copyright © 1997-2022 Jeroen van der Zijp