Paquete gl.gui

gui Package

Package gui provides a Graphic User Interface drawn in a pyglet.batch

Configuration(overlay)
class Console(parent)

Bases: object

clear()
log(text)
move_cursors(dc)
new_command()
on_text(text)
start()
status()
write(text)
class Test(parent)

Bases: nabla.gl.gui.control.Container

title = 'Test'
error_info(title='Error', control=None)
glMonitor(capability)
glSet(capability, value)
class test_Grid(parent)

Bases: nabla.gl.gui.Test

grid_body(x=None, y=None, w=None, h=None)
info(name)
title = 'Test Grid'

app Module

Common window layouts.

class CameraControl(parent, name=None, x=None, y=None, w=360, h=132, **kwargs)

Bases: object

back()
center()
close()
down()
dzoom()
forward()
izoom()
left()
on_cancel()
right()
rleft()
rright()
tick(dt)
up()
class Editor(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.layout.Layout

load(path=None)
menuitems()
run()
set_style()
text(text)
class FileExplorer(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.layout.Layout

filter_image()
tree_toggle()
class FileOpen(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.layout.Layout

accept()
call_file_double(path)
cancel()
files_call_file_double(path)
files_on_click(x, y, button, modifiers)
folder_back()
folder_new()
folder_up()
open(path, filter=None)
class FileSave(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.app.FileOpen

class Notepad(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.layout.Layout

load_html(file)
text(text)
class Player(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.layout.Layout

player_eject()
player_forward()
player_rewind()
player_stop()
class Viewer(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.layout.Layout

layout Module

Common window layouts.

class ErrorBox(parent, name=None, x=None, y=None, w=None, h=None, **kwargs)

Bases: nabla.gl.gui.layout.Modal

class InputBox(parent, name=None, x=None, y=None, w=None, h=None, **kwargs)

Bases: nabla.gl.gui.layout.Modal

on_accept()
on_cancel()
class Layout(parent, name=None, x=None, y=None, w=-1, h=-1, **kwargs)

Bases: nabla.gl.gui.control.Container

Application window layout.

exit()
help()
nothing()
on_close()
set_buttons(buttons)
set_menu(items)
class MessageBox(parent, name=None, x=None, y=None, w=None, h=None, **kwargs)

Bases: nabla.gl.gui.layout.Modal

class Modal(parent, name=None, x=None, y=None, w=None, h=None, **kwargs)

Bases: nabla.gl.gui.control.Container

Dialog window layout. TODO; Send it to the frontal layer.

on_accept()
on_cancel()
class SelectBox(parent, name=None, x=None, y=None, w=None, h=None, **kwargs)

Bases: nabla.gl.gui.layout.Modal

menu Module

Widgets that need to be floating over the rest, like menus.

class Menu(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

close()
delete()
focus_check()
items(items)
on_click_item(item)
on_mouse_over(item)
class MenuItem(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

A menu item.

delete()
grid(x=None, y=None, w=None, h=None)
inside(x, y)
on_click(x, y, b, m)
on_focus()
on_focus_lost()
on_mouse_out()
on_mouse_over()
class SubMenu(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.control.Frontal

create_items(items)
got_focus()
on_click_item(item)
on_mouse_over(item)
toggle(*args)

widget Module

The basic widgets.

class Bar(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

Special Frame

grid(x=0, y=0, w=0, h=0)
on_resize(w, h)
class BasicListBox(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Column

class BasicListDir(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget.BasicListIcons, nabla.gl.gui.control.functions.FileList

call_file_double(path)
on_click(x, y, button, modifiers)
on_double_click(x, y, button, modifiers)
class BasicListIcons(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Column

delete()
class BasicListView(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget.BasicListDir

class BasicTreeFolder(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget.BasicListIcons, nabla.gl.gui.control.functions.FileSystem

delete()
on_click(x, y, button, modifiers)
on_double_click(x, y, button, modifiers)
path_update()
class Button(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

delete()
on_press()
on_release(inside=False)
set_caption(text)
class Caption(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

Cheap text.

delete()
inside(x, y)
text
class CheckBox(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

on_release(inside=False)
set_value(value=-1)
tick(dt=0)
toggle()
class Collapsable(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

function(value)
grid(x=None, y=None, w=None, h=None)
class Combo(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.control.Clip

delete()
grid_combo(x=0, y=0, w=0, h=0)
inside(x, y)
on_focus_lost()
open
scroll_update()
class ComboBox(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

grid(x=None, y=None, w=None, h=None)
inside(x, y)
list
on_button_click()
selected
text
class ComboFolder(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget.ComboBox

path
class Digits(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

cif = '------'
display(tt)
grid_clock(x, y, w, h)
set_icons()
class Frame(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

An empty container.

class FrameClip(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Clip

An empty container.

class Graphic(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Clip

This control exposes a group and a batch to do any draw. Assign like any other, and use _group and _batch to create your vertex lists. Or even better, subclass.

delete()
draw()

Override to draw.

tick(dt=0)
class Icon(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Texture

An Image. Name is the path.

resource = None
set(name)
class Image(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Display

An Image. Name is the path.

class Input(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Document

class Label(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget._Label, nabla.gl.gui.control.Control

class LabelClip(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget._Label, nabla.gl.gui.control.Clip

class ListBox(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.widget.Scrollable, nabla.gl.gui.widget.BasicListBox

class ListDir(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.widget.Scrollable, nabla.gl.gui.widget.BasicListDir

class ListIcons(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.widget.Scrollable, nabla.gl.gui.widget.BasicListIcons

class ListView(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.widget.Scrollable, nabla.gl.gui.widget.BasicListView

class Option(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget.Frame

create()
inside(x, y)
list
class Options(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

function(index)
select_option(index)
class Player(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Display

delete()
player_delete()
class ScrollBar(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Clip

A frame containing 3 Buttons, target is the scrollable Control.

on_change_call()
on_drag(x, y, dx, dy, button, modifiers)
scroll_down()
scroll_up()
class ScrollBarH(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Clip

A frame containing 3 Buttons, target is the scrollable Control.

on_change_call()
on_drag(x, y, dx, dy, button, modifiers)
scroll_left()
scroll_right()
class Scrollable(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.control.Clip

scroll_update()
class Set(parent, mode='vertical')

Bases: list

Convenience list of widgets.

add(widget, *args, **kwargs)
append(control)
delete()
get_byname(name)
remove(control)
update_vertical()
class Slider(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

A frame containing 1 draggable Button.

on_change_call()
on_change_value(value)
on_drag(x, y, dx, dy, button, modifiers)
class Tabs(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

delete()
function(value=None)
grid(x=None, y=None, w=None, h=None)
class Text(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.widget.Scrollable, nabla.gl.gui.control.Document

load(filename)
on_focus()
on_focus_lost()
on_mouse_scroll(x, y, scroll_x, scroll_y)
class TextBox(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Document

class TreeFolder(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.widget.Scrollable, nabla.gl.gui.widget.BasicTreeFolder

class Variable(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.widget.Frame

create()
set_value()
update(var=None)
class Video(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

A frame for VideoPlayer and other widgets.

tick(dt)

window Module

Windows.

class SystemWindow(parent, name=None, x=0, y=0, w=499, h=300, group=None, order=50)

Bases: nabla.gl.gui.control.Control

Operating System Window.

set_caption(text)
set_icon(resource)
class SystemWindowFull(parent, name=None, x=0, y=0, w=128, h=24, group=None, order=50)

Bases: nabla.gl.gui.control.Control

A window as a new borderless system window. On_move bug.

move(dx, dy)
set_caption(text)
set_icon(icon)
title_on_drag(x, y, dx, dy, button, modifiers)
title_on_drag_pass(x, y, dx, dy, button, modifiers)
class SystemWindowOrigin(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

Operating System Window

on_resize(w, h)
window = None
class Window(parent, name=None, app=None, x=None, y=None, w=None, h=None, type=None, group=None, order=50)

Bases: nabla.gl.gui.control.Control

Create a new Window. @param type: None, dialog, tool, borderless

app = None
close(*args)
get_window()
on_drag(x, y, dx, dy, button, modifiers)
set_caption(text)

Change window title.

set_decorator_color(color)

Set Icon from a resource file.

set_icon(resource)

Set Icon from a resource file.

set_status(text)

Change window status.

status
title
class WindowList

Bases: list

Contains a list of all created windows, and updates a WindowManager.

append(item)
get_minimize_layout(window)
remove(item)
update()
class WindowManager(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

A special Control that can be connected to a WindowList to create a Task bar.

close_all()
get_minimize_layout(window)
minimize_all()
on_button_click()
restore_all()
update()
class WindowOrigin(parent, name='', x=0, y=0, w=None, h=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=False, group=None, order=None, background=None, **kwargs)

Bases: nabla.gl.gui.control.Origin

A container that gui.Window creates to be its parent. Defines a new origin of coordinates.

close(*args)
help(*args)
hide()
inside_modal(x, y)
maximize(*args)
minimize(*args)
move(dx, dy)
on_click(*args, **kwargs)
on_close()
on_drag(x, y, dx, dy, button, modifiers)
on_press()
on_release(*args, **kwargs)
on_resize(w, h)
shake()
shake_end()
show()
class WindowResizer(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Control

Window resizer icon.

on_drag(x, y, dx, dy, button, modifiers)
on_press()
on_release(*args, **kwargs)
class WindowTitle(parent, name=None, x=0, y=0, w=None, h=None, type=None, col=0, colspan=1, row=0, rowspan=1, padx=None, pady=None, ipadx=None, ipady=None, sticky=None, expand=None, border=False, reduce=None, group=None, order=None, background=False, events=True, **kwargs)

Bases: nabla.gl.gui.control.Clip

Window decoration.

on_drag(x, y, dx, dy, button, modifiers)
on_focus()
on_press()
on_release(*args, **kwargs)

Contenidos

Tema anterior

Paquete gl.app

Próximo tema

control Package

Esta página