Home | Trees | Index | Help |
|
---|
Module eagle :: Class App |
|
object
--+ |_EGObject
--+ |object
--+ | | |AutoGenId
--+ | App
An application window.
This is the base of Eagle programs, since it will hold every graphical component.
An App window is split in 5 areas:the first 3 have a vertical layout, the other have horizontal layout. Every area has its own scroll bars that are shown automatically when need.
Also provided is an extra area, that is shown in another window. This
is the preferences area. It have a vertical layout and components that
hold data are made persistent automatically. You should use PreferencesButton
to show this area.
Extra information like author, description, help, version, license and
copyright are used in specialized dialogs. You may show these dialogs
with AboutButton
and HelpButton
.
get_widget_by_id
, example:
>>> app = App( "My App", left=Entry( id="entry" ) ) >>> app.get_widget_by_id( "entry" ) Entry( id='entry', label='entry', value='' )You may also reach widgets using dict-like syntax, but with the special case for widgets that hold data, these will be provided using their
set_data
and get_data
, it make things
easier, but be careful to don't misuse it!. Example:
>>> app= App( "My App", left=Entry( id="entry" ), ... right=Canvas( "canvas", 300, 300 ) ) >>> app[ "entry" ] '' >>> app[ "entry" ] = "text" >>> app[ "entry" ] 'text' >>> app[ "canvas" ] Canvas( id='canvas', width=300, height=300, label='' ) >>> app[ "canvas" ].draw_text( "hello" ) >>> app[ "entry" ].get_value() # will fail, since it's a data widget
Method Summary | |
---|---|
App Constructor. | |
__add_to_app_list__(self)
| |
__add_widget__(self,
widget)
| |
__delete_event__(self,
*args)
| |
__do_close__(self)
| |
__get_window__(self)
| |
__getitem__(self,
name)
| |
__persistence_filename__(self)
| |
__setitem__(self,
name,
value)
| |
__setup_connections__(self)
| |
__setup_gui__(self)
| |
__setup_gui_bottom__(self)
| |
__setup_gui_center__(self)
| |
__setup_gui_left__(self)
| |
__setup_gui_preferences__(self)
| |
__setup_gui_right__(self)
| |
__setup_gui_top__(self)
| |
Close application window. | |
Notify that widget changed it's value. | |
Show FileChooser and return selected
file(s). | |
Return referece to widget with provided id or None if not found. | |
Register a function to be called when system is idle. | |
Register a function to be called after an Input/Output event. | |
Load data to widgets from file. | |
Remove an event generator like those created by timeout_add , idle_add or io_watch . | |
Remove a previously displayed message. | |
Save data from widgets to file. | |
Show AboutDialog of this App. | |
Show HelpDialog of this App. | |
Show PreferencesDialog associated with this
App. | |
Display a message in status bar and retrieve its identifier for later removal. | |
Register a function to be called after a given timeout/interval. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value |
Property Summary | |
---|---|
bottom | |
center | |
left | |
preferences | |
right | |
statusbar | |
title | |
top |
Class Variable Summary | |
---|---|
int |
border_width = 10 |
int |
spacing = 3 |
Instance Method Details |
---|
__init__(self,
title,
id=None,
center=None,
left=None,
right=None,
top=None,
bottom=None,
preferences=None,
quit_callback=None,
data_changed_callback=None,
author=None,
description=None,
help=None,
version=None,
license=None,
copyright=None,
statusbar=False)
App Constructor.
|
close(self)Close application window. |
data_changed(self, widget, value)Notify that widget changed it's value. Probably you will not need to call this directly. |
file_chooser(self, action, filename=None, filter=None, multiple=False)ShowFileChooser and return selected
file(s).
|
get_widget_by_id(self, widget_id)Return referece to widget with provided id or None if not found. |
idle_add(self, callback)Register a function to be called when system is idle. System is idle if there is no other event pending.
|
io_watch(self, file, callback, on_in=False, on_out=False, on_urgent=False, on_error=False, on_hungup=False)Register a function to be called after an Input/Output event.
|
load(self)Load data to widgets from file. Probably you will not need to call this directly. |
remove_event_source(self, event_id)Remove an event generator like those created bytimeout_add , idle_add or io_watch .
|
remove_status_message(self, message_id)Remove a previously displayed message.
|
save(self)Save data from widgets to file. Probably you will not need to call this directly. |
show_about_dialog(self)ShowAboutDialog of this App.
|
show_help_dialog(self)ShowHelpDialog of this App.
|
show_preferences_dialog(self)ShowPreferencesDialog associated with this
App.
|
status_message(self, message)Display a message in status bar and retrieve its identifier for later removal.
|
timeout_add(self, interval, callback)Register a function to be called after a given timeout/interval.
|
Class Variable Details |
---|
border_width
|
spacing
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Apr 27 16:28:55 2006 | http://epydoc.sf.net |