libyui
3.0.10
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
Friends
YSquash.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: YSquash.h
20
21
Author: Stefan Hundhammer <sh@suse.de>
22
23
/-*/
24
25
#ifndef YSquash_h
26
#define YSquash_h
27
28
#include "YSingleChildContainerWidget.h"
29
#include "ImplPtr.h"
30
31
32
class
YSquashPrivate
;
33
34
/**
35
* HSquash, VSquash HVSquash:
36
*
37
* Squash is a widget that "squashes" its one child during layout, i.e., it
38
* reduces it in size down to its preferred size. It may squash vertically,
39
* horizontally or in both dimensions.
40
**/
41
class
YSquash
:
public
YSingleChildContainerWidget
42
{
43
protected
:
44
/**
45
* Constructor.
46
*
47
* Squashes horizontally if 'horSquash' is 'true',
48
* vertically if 'vertSquash' is 'true'.
49
**/
50
YSquash
(
YWidget
*
parent
,
bool
horSquash
,
bool
vertSquash
);
51
52
public
:
53
/**
54
* Destructor.
55
**/
56
virtual
~YSquash
();
57
58
/**
59
* Returns a descriptive name of this widget class for logging,
60
* debugging etc.
61
**/
62
virtual
const
char
*
widgetClass
()
const
;
63
64
/**
65
* Returns 'true' if this widget squashes horizontally.
66
**/
67
bool
horSquash
()
const
;
68
69
/**
70
* Returns 'true' if this widget squashes vertically.
71
**/
72
bool
vertSquash
()
const
;
73
74
75
/**
76
* In a squashed dimension the widget NOT stretchable.
77
* In an unsquashed dimension the widget is stretchable if the
78
* child is stretchable.
79
**/
80
bool
stretchable
( YUIDimension dim )
const
;
81
82
private
:
83
84
ImplPtr<YSquashPrivate>
priv;
85
};
86
87
88
#endif // YSquash_h
src
YSquash.h
Generated by
1.8.3.1