summaryrefslogtreecommitdiff
path: root/efl/elementary/efl.elementary_spinner.pxi
blob: 89cef69e3851d9cff6ec6338c2ddd82bc512b8c8 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# 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 Spinner(LayoutClass):

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

    def label_format_set(self, format):
        elm_spinner_label_format_set(self.obj, _cfruni(format))

    def label_format_get(self):
        return _ctouni(elm_spinner_label_format_get(self.obj))

    property label_format:
        def __get__(self):
            return _ctouni(elm_spinner_label_format_get(self.obj))

        def __set__(self, format):
            elm_spinner_label_format_set(self.obj, _cfruni(format))

    def min_max_set(self, min, max):
        elm_spinner_min_max_set(self.obj, min, max)

    def min_max_get(self):
        cdef double min, max
        elm_spinner_min_max_get(self.obj, &min, &max)
        return (min, max)

    property min_max:
        def __get__(self):
            cdef double min, max
            elm_spinner_min_max_get(self.obj, &min, &max)
            return (min, max)

        def __set__(self, value):
            min, max = value
            elm_spinner_min_max_set(self.obj, min, max)

    def step_set(self, step):
        elm_spinner_step_set(self.obj, step)

    def step_get(self):
        return elm_spinner_step_get(self.obj)

    property step:
        def __get__(self):
            return elm_spinner_step_get(self.obj)

        def __set__(self, step):
            elm_spinner_step_set(self.obj, step)

    def value_set(self, value):
        elm_spinner_value_set(self.obj, value)

    def value_get(self):
        return elm_spinner_value_get(self.obj)

    property value:
        def __get__(self):
            return elm_spinner_value_get(self.obj)
        def __set__(self, value):
            elm_spinner_value_set(self.obj, value)

    def wrap_set(self, wrap):
        elm_spinner_wrap_set(self.obj, wrap)

    def wrap_get(self):
        return elm_spinner_wrap_get(self.obj)

    property wrap:
        def __get__(self):
            return elm_spinner_wrap_get(self.obj)
        def __set__(self, wrap):
            elm_spinner_wrap_set(self.obj, wrap)

    def editable_set(self, editable):
        elm_spinner_editable_set(self.obj, editable)

    def editable_get(self):
        return elm_spinner_editable_get(self.obj)

    property editable:
        def __get__(self):
            return elm_spinner_editable_get(self.obj)
        def __set__(self, editable):
            elm_spinner_editable_set(self.obj, editable)

    def special_value_add(self, value, label):
        elm_spinner_special_value_add(self.obj, value, _cfruni(label))

    def interval_set(self, interval):
        elm_spinner_interval_set(self.obj, interval)

    def interval_get(self):
        return elm_spinner_interval_get(self.obj)

    property interval:
        def __get__(self):
            return elm_spinner_interval_get(self.obj)

        def __set__(self, interval):
            elm_spinner_interval_set(self.obj, interval)

    def base_set(self, base):
        elm_spinner_base_set(self.obj, base)

    def base_get(self):
        return elm_spinner_base_get(self.obj)

    property base:
        def __get__(self):
            return elm_spinner_base_get(self.obj)

        def __set__(self, base):
            elm_spinner_base_set(self.obj, base)

    def round_set(self, rnd):
        elm_spinner_round_set(self.obj, rnd)

    def round_get(self):
        return elm_spinner_round_get(self.obj)

    property round:
        def __get__(self):
            return elm_spinner_round_get(self.obj)

        def __set__(self, rnd):
            elm_spinner_round_set(self.obj, rnd)

    def callback_changed_add(self, func, *args, **kwargs):
        self._callback_add("changed", func, *args, **kwargs)

    def callback_changed_del(self, func):
        self._callback_del("changed", func)

    def callback_delay_changed_add(self, func, *args, **kwargs):
        self._callback_add("delay,changed", func, *args, **kwargs)

    def callback_delay_changed_del(self, func):
        self._callback_del("delay,changed", func)


_object_mapping_register("elm_spinner", Spinner)