libyui
 
Loading...
Searching...
No Matches
YAlignment.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YAlignment.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YAlignment_h
26#define YAlignment_h
27
28#include "YSingleChildContainerWidget.h"
29
30
32
42{
43protected:
48 YAlignmentType horAlign,
49 YAlignmentType vertAlign );
50
51public:
55 virtual ~YAlignment();
56
61 virtual const char * widgetClass() const;
62
66 YAlignmentType alignment( YUIDimension dim ) const;
67
72 int leftMargin() const;
73
78 int rightMargin() const;
79
84 int topMargin() const;
85
90 int bottomMargin() const;
91
95 int totalMargins( YUIDimension dim ) const;
96
100 void setLeftMargin( int margin );
101
105 void setRightMargin( int margin );
106
110 void setTopMargin( int margin );
111
115 void setBottomMargin( int margin );
116
121 int minWidth() const;
122
127 int minHeight() const;
128
132 void setMinWidth( int width );
133
137 void setMinHeight( int height );
138
149 virtual void setBackgroundPixmap( const std::string & pixmapFileName );
150
155 std::string backgroundPixmap() const;
156
163 virtual void addChild( YWidget * child );
164
168 virtual void moveChild( YWidget *child, int newx, int newy ) = 0;
169
178 virtual bool stretchable( YUIDimension dim ) const;
179
185 virtual int preferredWidth();
186
192 virtual int preferredHeight();
193
201 virtual void setSize( int newWidth, int newHeight );
202
203
204protected:
205
207};
208
209
210#endif // YAlignment_h
Definition ImplPtr.h:43
virtual bool stretchable(YUIDimension dim) const
Definition YAlignment.cc:185
int leftMargin() const
Definition YAlignment.cc:98
void setTopMargin(int margin)
Definition YAlignment.cc:134
virtual int preferredHeight()
Definition YAlignment.cc:206
void setBottomMargin(int margin)
Definition YAlignment.cc:140
virtual void moveChild(YWidget *child, int newx, int newy)=0
int bottomMargin() const
Definition YAlignment.cc:116
std::string backgroundPixmap() const
Definition YAlignment.cc:170
virtual ~YAlignment()
Definition YAlignment.cc:85
void setMinWidth(int width)
Definition YAlignment.cc:158
virtual void addChild(YWidget *child)
Definition YAlignment.cc:176
virtual const char * widgetClass() const
Definition YAlignment.cc:353
YAlignment(YWidget *parent, YAlignmentType horAlign, YAlignmentType vertAlign)
Definition YAlignment.cc:75
virtual void setSize(int newWidth, int newHeight)
Definition YAlignment.cc:218
virtual int preferredWidth()
Definition YAlignment.cc:194
int minWidth() const
Definition YAlignment.cc:146
int topMargin() const
Definition YAlignment.cc:110
int rightMargin() const
Definition YAlignment.cc:104
void setRightMargin(int margin)
Definition YAlignment.cc:128
YAlignmentType alignment(YUIDimension dim) const
Definition YAlignment.cc:92
virtual void setBackgroundPixmap(const std::string &pixmapFileName)
Definition YAlignment.cc:333
void setMinHeight(int height)
Definition YAlignment.cc:164
int totalMargins(YUIDimension dim) const
Definition YAlignment.cc:325
void setLeftMargin(int margin)
Definition YAlignment.cc:122
int minHeight() const
Definition YAlignment.cc:152
YSingleChildContainerWidget(YWidget *parent)
Definition YSingleChildContainerWidget.cc:29
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YAlignment.cc:38