summaryrefslogtreecommitdiff
path: root/efl/elementary/efl.elementary_table.pxi
blob: 138c308267ed8f3cf8f3435a489e6c951d61300c (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright (c) 2008-2009 Simon Busch
#
# This file is part of python-elementary.
#
# python-elementary is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# python-elementary is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with python-elementary.  If not, see <http://www.gnu.org/licenses/>.
#


cdef class Table(Object):

    def __init__(self, evasObject parent):
        self._set_obj(elm_table_add(parent.obj))

    def homogeneous_set(self, homogeneous):
        elm_table_homogeneous_set(self.obj, homogeneous)

    def homogeneous_get(self):
        return elm_table_homogeneous_get(self.obj)

    property homogeneous:
        def __get__(self):
            return elm_table_homogeneous_get(self.obj)

        def __set__(self, homogeneous):
            elm_table_homogeneous_set(self.obj, homogeneous)

    def padding_set(self, horizontal, vertical):
        elm_table_padding_set(self.obj, horizontal, vertical)

    def padding_get(self):
        cdef Evas_Coord horizontal, vertical
        elm_table_padding_get(self.obj, &horizontal, &vertical)
        return (horizontal, vertical)

    property padding:
        def __get__(self):
            cdef Evas_Coord horizontal, vertical
            elm_table_padding_get(self.obj, &horizontal, &vertical)
            return (horizontal, vertical)

        def __set__(self, value):
            horizontal, vertical = value
            elm_table_padding_set(self.obj, horizontal, vertical)

    def pack(self, evasObject subobj, x, y, w, h):
        elm_table_pack(self.obj, subobj.obj, x, y, w, h)

    def unpack(self, evasObject subobj):
        elm_table_unpack(self.obj, subobj.obj)

    def clear(self, clear):
        elm_table_clear(self.obj, clear)

    def pack_set(evasObject subobj, x, y, w, h):
        elm_table_pack_set(subobj.obj, x, y, w, h)

    def pack_get(evasObject subobj):
        cdef int x, y, w, h
        elm_table_pack_get(subobj.obj, &x, &y, &w, &h)
        return (x, y, w, h)


_object_mapping_register("elm_table", Table)