libyui
3.0.10
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
Friends
YSpacing.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: YSpacing.h
20
21
Author: Stefan Hundhammer <sh@suse.de>
22
23
/-*/
24
25
#ifndef YSpacing_h
26
#define YSpacing_h
27
28
#include "YWidget.h"
29
#include "ImplPtr.h"
30
31
class
YSpacingPrivate
;
32
33
34
/**
35
* HSpacing, VSpacing, HStretch, VStretch
36
**/
37
class
YSpacing
:
public
YWidget
38
{
39
public
:
40
41
/**
42
* Constructor.
43
*
44
* A Spacing/Stretch widget works only in one dimension ('dim') at the same
45
* time. But it can be stretchable and have a size at the same time, in
46
* which case the specified size acts very much like a minimal size - but
47
* not exactly, since YLayoutBox will reduce Spacings first before other
48
* widgets have to be resized below their preferred size.
49
*
50
* 'layoutUnits' is specified in abstract UI units where a main window
51
* (800x600 pixels in the Qt UI) corresponds to a 80x25 window.
52
**/
53
YSpacing
(
YWidget
*
parent
,
54
YUIDimension dim,
55
bool
stretchable
=
false
,
56
YLayoutSize_t layoutUnits = 0.0 );
57
58
/**
59
* Destructor.
60
**/
61
virtual
~YSpacing
();
62
63
/**
64
* Return a descriptive name of this widget class for logging,
65
* debugging etc.
66
**/
67
virtual
const
char
*
widgetClass
()
const
;
68
69
/**
70
* Return the primary dimension of this Spacing/Stretch,
71
* i.e. the dimension in which it uses space or stretches.
72
**/
73
YUIDimension
dimension
()
const
;
74
75
/**
76
* Return the size in the primary dimension.
77
*
78
* This is the device dependent size (pixels or character cells), not the
79
* abstract UI layout unit from the constructor.
80
**/
81
int
size
()
const
;
82
83
/**
84
* Return the size in the specified dimension.
85
*
86
* This is the device dependent size (pixels or character cells), not the
87
* abstract UI layout unit from the constructor.
88
**/
89
int
size
( YUIDimension dim )
const
;
90
91
/**
92
* Preferred width of the widget.
93
*
94
* Reimplemented from YWidget.
95
**/
96
virtual
int
preferredWidth
();
97
98
/**
99
* Preferred height of the widget.
100
*
101
* Reimplemented from YWidget.
102
**/
103
virtual
int
preferredHeight
();
104
105
106
private
:
107
108
ImplPtr<YSpacingPrivate>
priv;
109
};
110
111
112
typedef
YSpacing
YVSpacing
;
113
typedef
YSpacing
YHSpacing
;
114
typedef
YSpacing
YHStretch
;
115
typedef
YSpacing
YVStretch
;
116
117
118
#endif // YSpacing_h
src
YSpacing.h
Generated by
1.8.3.1