本文整理汇总了Python中efl.elementary.window.StandardWindow.show方法的典型用法代码示例。如果您正苦于以下问题:Python StandardWindow.show方法的具体用法?Python StandardWindow.show怎么用?Python StandardWindow.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.window.StandardWindow
的用法示例。
在下文中一共展示了StandardWindow.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: buttons_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def buttons_clicked(obj):
win = StandardWindow("buttons", "Buttons", focus_highlight_enabled=True,
autodel=True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
ic = Icon(win, file=ic_file,
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
ic.show()
bt = Button(win, text="Icon sized to button", content=ic)
bx.pack_end(bt)
bt.show()
ic = Icon(win, file=ic_file, resizable=(False, False))
ic.show()
bt = Button(win, text="Icon no scale", content=ic)
bx.pack_end(bt)
bt.show()
bt = Button(win, text="No icon")
bx.pack_end(bt)
bt.show()
ic = Icon(win, file=ic_file, resizable=(False, False))
bt = Button(win, content=ic)
bx.pack_end(bt)
bt.show()
ic.show()
win.show()
示例2: access_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [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: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def __init__( self ):
win = StandardWindow("Testing", "Elementary Sorted Table")
win.callback_delete_request_add(lambda o: elm.exit())
titles = []
for i in range(COLUMNS):
titles.append(
("Column " + str(i), True if i != 2 else False)
)
slist = SortedList(win, titles=titles, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
for i in range(ROWS):
row = []
for j in range(COLUMNS):
data = random.randint(0, ROWS*COLUMNS)
row.append(data)
slist.row_pack(row, sort=False)
#slist.sort_by_column(1)
slist.show()
win.resize_object_add(slist)
win.resize(600, 400)
win.show()
示例4: clock_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def clock_clicked(obj):
win = StandardWindow("clock", "Clock", autodel=True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
L = []
ck = Clock(win)
bx.pack_end(ck)
ck.show()
L.append(ck)
ck = Clock(win, show_am_pm=True)
bx.pack_end(ck)
ck.show()
L.append(ck)
print((ck.time_get()))
ck = Clock(win, show_seconds=True)
bx.pack_end(ck)
ck.show()
L.append(ck)
ck = Clock(win, show_seconds=True, show_am_pm=True)
bx.pack_end(ck)
ck.show()
L.append(ck)
ck = Clock(win, edit=True, show_seconds=True, show_am_pm=True,
time=(10, 11, 12))
bx.pack_end(ck)
ck.show()
L.append(ck)
ck = Clock(
win, edit=True, show_seconds=True, edit_mode = (
ELM_CLOCK_EDIT_HOUR_DECIMAL |
ELM_CLOCK_EDIT_MIN_DECIMAL |
ELM_CLOCK_EDIT_SEC_DECIMAL
)
)
bx.pack_end(ck)
ck.show()
L.append(ck)
hbox = Box(win, horizontal=True)
bx.pack_end(hbox)
hbox.show()
ck = Check(win, text="pause")
ck.callback_changed_add(pause_changed_cb, L)
ck.show()
hbox.pack_end(ck)
win.show()
示例5: layout_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def layout_clicked(obj):
win = StandardWindow("layout", "Layout", autodel=True)
win.elm_event_callback_add(_event)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
ly = Layout(win, file=(os.path.join(script_path, "test.edj"), "layout"),
size_hint_weight=EXPAND_BOTH)
win.resize_object_add(ly)
ly.show()
bt = Button(win, text="Button 1")
ly.part_content_set("element1", bt)
bt.elm_event_callback_add(_event)
bt.elm_event_callback_del(_event)
bt.show()
bt = Button(win, text="Button 2")
ly.part_content_set("element2", bt)
bt.show()
bt = Button(win, text="Button 3")
ly.part_content_set("element3", bt)
bt.show()
for o in ly.content_swallow_list_get():
print("Swallowed: " + str(o))
win.show()
示例6: evas_textgrid_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def evas_textgrid_clicked(obj, item=None):
win = StandardWindow("evastextgrid", "Evas Textgrid Test", autodel=True,
size=(320, 320))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
tg = Textgrid(win.evas)
tg.size = 15, 1
tg.size_hint_weight_set(1.0, 1.0)
win.resize_object_add(tg)
tg.font = "Courier", 20
tg.palette_set(EVAS_TEXTGRID_PALETTE_STANDARD, 0, 0, 0, 0, 255)
tg.palette_set(EVAS_TEXTGRID_PALETTE_STANDARD, 1, 255, 255, 255, 255)
row = tg.cellrow_get(0)
for cell in row:
cell.codepoint="ö"
cell.fg = 1
cell.bg = 0
tg.cellrow_set(0, row)
tg.show()
tg.update_add(0, 0, 10, 1)
rowback = tg.cellrow_get(0)
win.show()
示例7: photo_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def photo_clicked(obj):
win = StandardWindow("photo", "Photo test", autodel=True, size=(300, 300))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
elementary.need_ethumb()
tb = Table(win, size_hint_weight=EXPAND_BOTH)
tb.show()
sc = Scroller(win, size_hint_weight=EXPAND_BOTH, content=tb)
win.resize_object_add(sc)
sc.show()
n = 0
for j in range(12):
for i in range(12):
ph = Photo(win, aspect_fixed=False, size=80, editable=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
name = os.path.join(img_path, images[n])
n += 1
if n >= 9: n = 0
if n == 8:
ph.thumb = name
else:
ph.file = name
if n in [2, 3]:
ph.fill_inside = True
ph.style = "shadow"
tb.pack(ph, i, j, 1, 1)
ph.show()
win.show()
示例8: bubble_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def bubble_clicked(obj, item=None):
win = StandardWindow("bubble", "Bubble", autodel=True, size=(320,320))
bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight = EXPAND_BOTH
bx.show()
# bb 1
ic = Icon(win, file=ic_file,
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
lb = Label(win, text="Blah, Blah, Blah")
bb = Bubble(win, text = "Message 1", content = lb,
pos = ELM_BUBBLE_POS_TOP_LEFT, size_hint_weight = EXPAND_BOTH,
size_hint_align = FILL_BOTH)
bb.part_text_set("info", "Corner: top_left")
bb.part_content_set("icon", ic)
bx.pack_end(bb)
bb.show()
# bb 2
ic = Icon(win, file=ic_file,
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
lb = Label(win, text="Blah, Blah, Blah")
bb = Bubble(win, text = "Message 2", content = lb,
pos = ELM_BUBBLE_POS_TOP_RIGHT,
size_hint_weight = EXPAND_BOTH, size_hint_align = FILL_BOTH)
bb.part_text_set("info", "Corner: top_right")
bb.part_content_set("icon", ic)
bx.pack_end(bb)
bb.show()
# bb 3
ic = Icon(win, file=ic_file,
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
lb = Label(win, text="Blah, Blah, Blah")
bb = Bubble(win, text = "Message 3", content = ic,
pos = ELM_BUBBLE_POS_BOTTOM_LEFT,
size_hint_weight = EXPAND_BOTH, size_hint_align = FILL_BOTH)
bb.part_text_set("info", "Corner: bottom_left")
bx.pack_end(bb)
bb.show()
# bb 4
ic = Icon(win, file=ic_file,
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
lb = Label(win, text="Blah, Blah, Blah")
bb = Bubble(win, text = "Message 4", content = lb,
pos = ELM_BUBBLE_POS_BOTTOM_RIGHT,
size_hint_weight = EXPAND_BOTH, size_hint_align = FILL_BOTH)
bb.part_text_set("info", "Corner: bottom_right")
bb.part_content_set("icon", ic)
bx.pack_end(bb)
bb.show()
win.show()
示例9: index_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def index_clicked(obj):
win = StandardWindow("index", "Index test", autodel=True, size=(320, 480))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
vbox = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(vbox)
vbox.show()
# index
idx = Index(win, size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH)
idx.callback_delay_changed_add(cb_idx_delay_changed)
idx.callback_changed_add(cb_idx_changed)
idx.callback_selected_add(cb_idx_selected)
win.resize_object_add(idx)
idx.show()
# genlist
itc = GenlistItemClass(item_style="default",
text_get_func=gl_text_get)
# content_get_func=gl_content_get,
# state_get_func=gl_state_get)
gl = Genlist(win, size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH)
vbox.pack_end(gl)
gl.show()
for i in 'ABCDEFGHILMNOPQRSTUVZ':
for j in 'acegikmo':
gl_item = gl.item_append(itc, i + j)
if j == 'a':
idx_item = idx.item_append(i, cb_idx_item, gl_item)
idx_item.data["gl_item"] = gl_item
idx.level_go(0)
sep = Separator(win, horizontal=True)
vbox.pack_end(sep)
sep.show()
hbox = Box(win, horizontal=True, size_hint_weight=EXPAND_HORIZ)
vbox.pack_end(hbox)
hbox.show()
ck = Check(win, text="autohide_disabled")
ck.callback_changed_add(lambda ck: idx.autohide_disabled_set(ck.state))
hbox.pack_end(ck)
ck.show()
ck = Check(win, text="indicator_disabled")
ck.callback_changed_add(lambda ck: idx.indicator_disabled_set(ck.state))
hbox.pack_end(ck)
ck.show()
ck = Check(win, text="horizontal")
ck.callback_changed_add(lambda ck: idx.horizontal_set(ck.state))
hbox.pack_end(ck)
ck.show()
win.show()
示例10: cursor2_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def cursor2_clicked(obj, item=None):
win = StandardWindow("cursors", "Cursors 2", autodel=True, size=(320, 480))
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
tb = Toolbar(win, size_hint_weight=(0.0, 0.0),
size_hint_align=(EVAS_HINT_FILL, 0.0))
ti = tb.item_append("folder-new", "Bogosity", None, None)
ti.cursor_set("bogosity")
ti = tb.item_append("clock", "Unset", None, None)
ti.cursor_unset()
ti = tb.item_append("document-print", "Xterm", None, None)
ti.cursor_set("xterm")
bx.pack_end(tb)
tb.show()
lst = List(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
li = lst.item_append("cursor bogosity")
li.cursor_set("bogosity")
li = lst.item_append("cursor unset")
li.cursor_unset()
li = lst.item_append("cursor xterm")
li.cursor_set("xterm")
bx.pack_end(lst)
lst.go()
lst.show()
win.show()
示例11: panes_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def panes_clicked(obj):
win = StandardWindow("panes", "Panes test", autodel=True, size=(320, 480))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
panes = Panes(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
win.resize_object_add(panes)
panes.callback_clicked_add(cb_panes, "clicked")
panes.callback_clicked_double_add(cb_panes, "clicked,double")
panes.callback_press_add(cb_panes, "press")
panes.callback_unpress_add(cb_panes, "unpress")
panes.show()
bt = Button(win, text="Left")
panes.part_content_set("left", bt)
bt.show()
panes_h = Panes(win, horizontal=True, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
panes_h.horizontal = True
panes.part_content_set("right", panes_h)
panes_h.show()
bt = Button(win, text="Up")
panes_h.part_content_set("left", bt)
bt.show()
bt = Button(win, text="Down")
panes_h.part_content_set("right", bt)
bt.show()
win.show()
示例12: dnd_genlist_user_anim_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def dnd_genlist_user_anim_clicked(obj, item=None):
win = StandardWindow("dnd-genlist-user-anim", "DnD-Genlist-User-Anim",
autodel=True, size=(680,800))
bxx = Box(win, horizontal=True, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bxx)
bxx.show()
for j in range(2):
gl = Genlist(win, multi_select=True, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
# START Drag and Drop handling
win.callback_delete_request_add(win_del, gl)
gl.drop_item_container_add(ELM_SEL_FORMAT_TARGETS, gl_item_getcb,
dropcb=gl_dropcb)
gl.drag_item_container_add(ANIM_TIME, DRAG_TIMEOUT, gl_item_getcb,
gl_data_getcb)
# We add mouse-down, up callbacks to start/stop drag animation
gl.event_callback_add(EVAS_CALLBACK_MOUSE_DOWN, gl_obj_mouse_down, gl)
# END Drag and Drop handling
# FIXME: This causes genlist to resize the horiz axis very slowly :(
# Reenable this and resize the window horizontally, then try to resize it back
#elm_genlist_mode_set(gl, ELM_LIST_LIMIT)
bxx.pack_end(gl)
gl.show()
for i in range(20):
gl.item_append(itc1, img[i % 9], flags=ELM_GENLIST_ITEM_NONE)
win.show()
示例13: table5_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def table5_clicked(obj, item=None):
win = StandardWindow("table5", "Table 5", autodel=True)
tb = Table(win, homogeneous=True, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(tb)
tb.show()
bt = Button(win, text="A", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 33, 0, 34, 33)
bt.show()
bt = Button(win, text="B", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 67, 33, 33, 34)
bt.show()
bt = Button(win, text="C", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 33, 67, 34, 33)
bt.show()
bt = Button(win, text="D", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 0, 33, 33, 34)
bt.show()
bt = Button(win, text="X", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 33, 33, 34, 34)
bt.show()
win.show()
示例14: focus3_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def focus3_clicked(obj, item=None):
win = StandardWindow("focus3", "Focus 3", autodel=True, size=(320, 480))
win.focus_highlight_enabled = True
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
en = Entry(win, scrollable=True, single_line=True, text="An entry",
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
en.callback_focused_add(_focused_cb)
en.callback_unfocused_add(_unfocused_cb)
bx.pack_end(en)
en.show()
bt = Button(win, text="Add", focus_allow=False,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_add_cb, win, bx)
bx.pack_end(bt)
bt.show()
bt = Button(win, text="Del", focus_allow=False,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_del_cb, bx)
bx.pack_end(bt)
bt.show()
bt = Button(win, text="hide", focus_allow=False,
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
bt.callback_clicked_add(_hide_cb)
bx.pack_end(bt)
bt.show()
win.show()
示例15: genlist3_clicked
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import show [as 别名]
def genlist3_clicked(obj, item=None):
win = StandardWindow("Genlist", "Genlist Group test", autodel=True,
size=(320, 320))
gl = Genlist(win, size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(gl)
gl.show()
itc_i = GenlistItemClass(item_style="default",
text_get_func=gl_text_get,
content_get_func=gl_content_get,
state_get_func=gl_state_get)
itc_g = GenlistItemClass(item_style="group_index",
text_get_func=glg_text_get,
content_get_func=glg_content_get)
for i in range(300):
if i % 10 == 0:
git = gl.item_append(itc_g, i/10,
flags=ELM_GENLIST_ITEM_GROUP)
git.select_mode_set(ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
gl.item_append(itc_i, i, git)
win.show()