summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2014-11-22 14:33:47 +0100
committerDave Andreoli <dave@gurumeditation.it>2014-11-22 14:33:47 +0100
commit3be938511f8f2848f8242abb51d9420a91161258 (patch)
treee2af379ce0a676422cab0b31b841279a6ecb73c6 /efl
parentd3f98802b06fd71d25dc64e1ca41732b73750a77 (diff)
New 1.12 API: elm_panel_scrollable_set/get/content_size_set
Also improved the test for panel and added a new test for scrollable panel.
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/panel.pxd3
-rw-r--r--efl/elementary/panel.pyx32
2 files changed, 35 insertions, 0 deletions
diff --git a/efl/elementary/panel.pxd b/efl/elementary/panel.pxd
index 4b6cc01..ba8556f 100644
--- a/efl/elementary/panel.pxd
+++ b/efl/elementary/panel.pxd
@@ -8,3 +8,6 @@ cdef extern from "Elementary.h":
8 void elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden) 8 void elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden)
9 Eina_Bool elm_panel_hidden_get(const Evas_Object *obj) 9 Eina_Bool elm_panel_hidden_get(const Evas_Object *obj)
10 void elm_panel_toggle(Evas_Object *obj) 10 void elm_panel_toggle(Evas_Object *obj)
11 void elm_panel_scrollable_set(Evas_Object *obj, Eina_Bool scrollable)
12 Eina_Bool elm_panel_scrollable_get(const Evas_Object *obj)
13 void elm_panel_scrollable_content_size_set(Evas_Object *obj, double ratio)
diff --git a/efl/elementary/panel.pyx b/efl/elementary/panel.pyx
index de52eb9..ddda5b6 100644
--- a/efl/elementary/panel.pyx
+++ b/efl/elementary/panel.pyx
@@ -131,6 +131,38 @@ cdef class Panel(LayoutClass):
131 def hidden_get(self): 131 def hidden_get(self):
132 return elm_panel_hidden_get(self.obj) 132 return elm_panel_hidden_get(self.obj)
133 133
134 property scrollable:
135 """ The scrollability of the panel.
136
137 :type: bool
138
139 .. versionadded:: 1.12
140
141 """
142 def __set__(self, bint scrollable):
143 elm_panel_scrollable_set(self.obj, scrollable)
144 def __get__(self):
145 return bool(elm_panel_scrollable_get(self.obj))
146
147 def scrollable_set(self, bint scrollable):
148 elm_panel_scrollable_set(self.obj, scrollable)
149 def scrollable_get(self):
150 return bool(elm_panel_scrollable_get(self.obj))
151
152 property scrollable_content_size:
153 """ The size of the scrollable panel.
154
155 :type: double
156
157 ..versionadded:: 1.12
158
159 """
160 def __set__(self, double ratio):
161 elm_panel_scrollable_content_size_set(self.obj, ratio)
162
163 def scrollable_content_size_set(self, double ratio):
164 elm_panel_scrollable_content_size_set(self.obj, ratio)
165
134 def toggle(self): 166 def toggle(self):
135 """Toggle the hidden state of the panel from code.""" 167 """Toggle the hidden state of the panel from code."""
136 elm_panel_toggle(self.obj) 168 elm_panel_toggle(self.obj)