本文整理汇总了Python中efl.elementary.window.StandardWindow.autodel方法的典型用法代码示例。如果您正苦于以下问题:Python StandardWindow.autodel方法的具体用法?Python StandardWindow.autodel怎么用?Python StandardWindow.autodel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.window.StandardWindow
的用法示例。
在下文中一共展示了StandardWindow.autodel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: transit_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import autodel [as 别名]
def transit_clicked(obj, item=None):
win = StandardWindow("transit", "Transit")
win.autodel = True
bx = Box(win)
bx.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
win.resize_object_add(bx)
bx.size_hint_min = 318, 318
bx.show()
ic = Image(win, file=os.path.join(img_path, "icon_11.png"),
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
bt = Button(win, text="ImageAnimation Effect")
bt.part_content_set("icon", ic)
bx.pack_end(bt)
bt.show()
ic.show()
bt.callback_clicked_add(transit_image_animation, ic)
bt = Button(win, text="Color, Rotation and Translation")
bx.pack_end(bt)
bt.show()
bt.callback_clicked_add(transit_rotation_translation_color)
bt = Button(win, text="Wipe Effect")
bx.pack_end(bt)
bt.show()
bt.callback_clicked_add(transit_wipe)
win.show()
示例2: access_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import autodel [as 别名]
def access_clicked(obj, item=None):
win = StandardWindow("access", "Access")
win.autodel = True
win.on_free_add(cleanup_cb)
config.access = True
bx = Box(win, size_hint_weight=EXPAND_BOTH, homogeneous=True,
horizontal=True)
win.resize_object_add(bx)
bx.show()
gl = Genlist(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
bx.pack_end(gl)
gl.show()
gl.callback_realized_add(_realized)
itc1 = GLItC1(item_style="default")
itc2 = GLItC2(item_style="full")
for i in range(1,9):
if i % 4:
gl.item_append(itc1, i, None, ELM_GENLIST_ITEM_NONE)
else:
gl.item_append(itc2, i, None, ELM_GENLIST_ITEM_NONE)
itc1.free()
itc2.free()
win.resize(500, 400)
win.show()
示例3: datetime_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import autodel [as 别名]
def datetime_clicked(obj):
win = StandardWindow("dt", "DateTime")
win.autodel = True
bx = Box(win, size_hint_weight=EXPAND_BOTH, horizontal=False,
size_hint_min=(360, 240))
win.resize_object_add(bx)
bx.show()
dt = Datetime(bx, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_HORIZ)
dt.field_visible_set(ELM_DATETIME_HOUR, False)
dt.field_visible_set(ELM_DATETIME_MINUTE, False)
dt.field_visible_set(ELM_DATETIME_AMPM, False)
bx.pack_end(dt)
dt.show()
dt = Datetime(bx, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_HORIZ)
dt.field_visible_set(ELM_DATETIME_YEAR, False)
dt.field_visible_set(ELM_DATETIME_MONTH, False)
dt.field_visible_set(ELM_DATETIME_DATE, False)
bx.pack_end(dt)
dt.show()
dt = Datetime(bx, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_HORIZ)
# get the current local time
time1 = datetime.now()
# set the max year as 2030 and the remaining fields are equal to current time values
time1.replace(year = 130)
dt.value_max = time1
# set the min time limit as "1980 January 10th 02:30 PM"
time1.replace(year = 80, month = 4, day = 10, hour = 14, minute = 30)
dt.value_min = time1
# minutes can be input only in between 15 and 45
dt.field_limit_set(ELM_DATETIME_MINUTE, 15, 45)
dt.callback_changed_add(changed_cb)
bx.pack_end(dt)
dt.show()
win.show()
示例4: toolbar5_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import autodel [as 别名]
def toolbar5_clicked(obj, item=None):
win = StandardWindow("toolbar5", "Toolbar 5", autodel=True, size=(320, 300))
win.autodel = True
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
tbl = Table(win, size_hint_weight=(0.0, EVAS_HINT_EXPAND),
size_hint_align=FILL_BOTH)
tb = Toolbar(win, homogeneous=False, shrink_mode=ELM_TOOLBAR_SHRINK_MENU,
size_hint_weight=(0.0, 0.0), size_hint_align=(EVAS_HINT_FILL, 0.0),
select_mode=ELM_OBJECT_SELECT_MODE_NONE)
ph1 = Photo(win, size=40, file=os.path.join(img_path, "plant_01.jpg"),
size_hint_weight=EXPAND_BOTH, size_hint_align=ALIGN_CENTER)
tbl.pack(ph1, 0, 0, 1, 1)
ph1.show()
ph2 = Photo(win, size=80, size_hint_weight=EXPAND_BOTH,
size_hint_align=ALIGN_CENTER)
tbl.pack(ph2, 1, 0, 1, 1)
ph2.show()
ph3 = Photo(win, size=20, file=os.path.join(img_path, "sky_01.jpg"),
size_hint_weight=EXPAND_BOTH, size_hint_align=ALIGN_CENTER)
tbl.pack(ph3, 0, 1, 1, 1)
ph3.show()
ph4 = Photo(win, size=60, file=os.path.join(img_path, "sky_02.jpg"),
size_hint_weight=EXPAND_BOTH, size_hint_align=ALIGN_CENTER)
tbl.pack(ph4, 1, 1, 1, 1)
ph4.show()
tb_it = tb.item_append("document-print", "Hello", tb_1, ph1)
tb_it.disabled = True
tb_it.priority = 100
tb_it = tb.item_append(os.path.join(img_path, "icon_04.png"),
"World", tb_2, ph1)
tb_it.priority = -100
tb_it = tb.item_append("object-rotate-right", "H", tb_3a, ph4)
tb_it.state_add("object-rotate-left", "H2", tb_3b, ph4)
tb_it.priority = 150
tb_it = tb.item_append("mail-send", "Comes", tb_4a, ph4)
tb_it.state_add("emptytrash", "Comes2", tb_4a, ph4)
tb_it.state_add("trashcan_full", "Comes3", tb_4a, ph4)
tb_it.priority = 0
tb_it = tb.item_append("clock", "Elementary", tb_5, ph4)
tb_it.priority = -200
tb_it = tb.item_append("refresh", "Menu")
tb_it.menu = True
tb_it.priority = -9999
tb.menu_parent = win
menu = tb_it.menu
menu.item_add(None, "edit-cut", "Shrink", tb_3, ph4)
menu_it = menu.item_add(None, "edit-copy", "Mode", tb_4, ph4)
menu.item_add(menu_it, "edit-paste", "is set to", tb_4, ph4)
menu.item_add(None, "edit-delete", "Menu", tb_5, ph4)
bx.pack_end(tb)
tb.show()
bx.pack_end(tbl)
tbl.show()
win.show()