forked from google/gxui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalignment.go
29 lines (22 loc) · 823 Bytes
/
alignment.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gxui
type HorizontalAlignment int
const (
AlignLeft HorizontalAlignment = iota
AlignCenter
AlignRight
)
func (a HorizontalAlignment) AlignLeft() bool { return a == AlignLeft }
func (a HorizontalAlignment) AlignCenter() bool { return a == AlignCenter }
func (a HorizontalAlignment) AlignRight() bool { return a == AlignRight }
type VerticalAlignment int
const (
AlignTop VerticalAlignment = iota
AlignMiddle
AlignBottom
)
func (a VerticalAlignment) AlignTop() bool { return a == AlignTop }
func (a VerticalAlignment) AlignMiddle() bool { return a == AlignMiddle }
func (a VerticalAlignment) AlignBottom() bool { return a == AlignBottom }