Close menu
Start
Download
Getting Started
License
References
Jam Build Tool
Class Index
Namespaces
Modules
Pt
›
Documentation
Documentation
›
Get Platinum
≡
Class Index
Namespaces
Modules
include
Pt
Forms
Direction.h
1
/* Copyright (C) 2015-2026 Marc Boris Duerner
2
3
This library is free software; you can redistribute it and/or
4
modify it under the terms of the GNU Lesser General Public
5
License as published by the Free Software Foundation; either
6
version 2.1 of the License, or (at your option) any later version.
7
8
As a special exception, you may use this file as part of a free
9
software library without restriction. Specifically, if other files
10
instantiate templates or use macros or inline functions from this
11
file, or you compile this file and link it with other files to
12
produce an executable, this file does not by itself cause the
13
resulting executable to be covered by the GNU General Public
14
License. This exception does not however invalidate any other
15
reasons why the executable file might be covered by the GNU Library
16
General Public License.
17
18
This library is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
Lesser General Public License for more details.
22
23
You should have received a copy of the GNU Lesser General Public
24
License along with this library; if not, write to the Free Software
25
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26
02110-1301 USA
27
*/
28
29
#ifndef Pt_Forms_Direction_H
30
#define Pt_Forms_Direction_H
31
32
#include <Pt/Forms/Api.h>
33
#include <Pt/Types.h>
34
35
namespace
Pt
{
36
37
namespace
Forms
{
38
51
class
Direction
52
{
53
public
:
56
enum
Mode
57
{
60
Left
,
61
64
Right
,
65
68
Top
,
69
72
Bottom
73
};
74
77
Direction
(
Mode
m =
Left
)
78
: _mode(m)
79
{}
80
83
Direction
&
operator=
(
Mode
m)
84
{
85
_mode = m;
86
return
*
this
;
87
}
88
91
operator
Pt::uint32_t
()
const
92
{
93
return
_mode;
94
}
95
96
private
:
97
Pt::uint32_t
_mode;
98
};
99
100
}
// namespace
101
102
}
// namespace
103
104
#endif
Pt::Forms::Direction::operator=
Direction & operator=(Mode m)
Sets the direction to m and returns this object.
Definition
Direction.h:83
Pt::Forms::Direction::Mode
Mode
Flow axis and sense.
Definition
Direction.h:57
Pt::Forms::Direction::Bottom
@ Bottom
Bottom to top.
Definition
Direction.h:72
Pt::Forms::Direction::Top
@ Top
Top to bottom.
Definition
Direction.h:68
Pt::Forms::Direction::Left
@ Left
Left to right.
Definition
Direction.h:60
Pt::Forms::Direction::Right
@ Right
Right to left.
Definition
Direction.h:64
Pt::Forms::Direction::Direction
Direction(Mode m=Left)
Creates a direction with mode m.
Definition
Direction.h:77
Pt::uint32_t
uint_type uint32_t
Unsigned 32-bit integer type.
Definition
Api-Types.h:52
Pt::Forms
Graphical user interfaces.
Definition
ActivateEvent.h:40
Pt
Core module.
Definition
Allocator.h:33