This object is used to hold a window as shown in Gaby. It has methods for common window actions (move, resize, destroy) as well as for actions specific to Gaby (bind, unbind, ...). It also has attributes to describe it closer (type, name, subtable, ...).
move (i, i)
This method moves the window to (i, i) (respectively x and y) OBSOLETE!: use gtk methods on window.gtkwindow
resize (i, i)
This method resizes the window to (i, i) (respectively width and height) OBSOLETE!: use gtk methods on window.gtkwindow
remove_bound_window (w)
This method unbinds the window given as arg from the window
set_records_list ( (i,i,i,...) )
This method reduces the amount of viewable records to the records with ids (normal or fast) from the list. This is especially useful for things like advanced filters. Note that using fast id will really be faster.
get_widget (s)
This method returns the GUI widget (actually a GtkObject) matching the given string. The strings you can give depends upon the used view.
this item holds the type of the view
this item holds the type of the view translated in the user's favortie language
this item holds the subtable used by the window
this item holds the id of the record currently shown. Unlike other attributes this one is not read-only.
this item holds the name of the window, as shown in its title bar
this item holds a boolean value that is set if the window has the 'what' attribute available.
this item holds a GtkWindow reprensenting the physical window itself
This item is the place to set a 'restricted list' of records to show in a window (this is a duplicated set_records_list)
This object is used to hold a window as shown in Gaby. It has methods to access (both get and set) particular records, to move within the records, ... It also has attributes to describe it closer (name, fields, ...).
get_record_no (i [, b] )
This methods returns the record (list of strings) whose id (or 'fast id') is i from the subtable. If b is set to TRUE the list is filled using Python types matching in the best possible way the record type.
add_record (r)
This method adds the given record @r to the subtable. It returns the new record's id.
set_record_no (i, r)
This method sets the record whose id (or 'fast id') is i from the subtable to the record (list of strings) r. If id is 0 then the record is added to the table. This method returns the _real_ id. Comment: it doesn't touch to 'Record' and 'Records' fields
get_next_record (i)
This methods returns the id of the record directly following the record whose id (_not_ fast id) is i in the subtable
get_previous_record (i)
This methods returns the id of the record directly preceding the record whose id (_not_ fast id) is i in the subtable
records_list ()
This methods returns the list (PyList) of the id of the records in the subtable.
fast_records_list ()
This methods returns the list (PyList) of the 'fast id' of the records in the subtable. Comments on 'fast id': they are slightly faster than 'normal' ids but there are drawbacks : you can't record_{add,delete} a record and then reuse a list you got previously. (example: on a table with around 2600 records it was twice faster (simply listing))
create_new_window (s)
This methods creates (then shows) a new window of the type given by s ('form', 'xlist', ...) and fill it with the data from the subtable.
this item holds the name of the subtable
this item holds the name of the subtable translated in the user's favorite language
this item holds a tuple (_not_ list !) with the names of the subtable's fields.
this item holds a dict with the fields numbers referenced by the fields names.
this item holds a tuple (_not_ list !) with the names translated in the user's favorite language of the subtable's fields.
this item holds a dict with the fields numbers referenced by the fields names translated in the user's favorite language.
this item holds the name of the table hidden behind the subtable
load_database (s)
This function loads the database 's' (ie both descfile and datas). It will fail if a database is already loaded.
get_main_window ()
This function returns the main window (== the first created window)
get_current_window ()
This functions returns the focused window (if none has the focus, it is equivalent to get_main_window)
exit_gaby ()
This function exits Gaby cleanly (asking confirmation if there were unsaved record(s))
get_subtables_list ()
This functions returns a list filled with the name of the subtables
message_dialog (i, s)
This functions pops up a message box with the given message, the first arg is an integer representing the message type while the second is a string whose purpose is determined by the value of the integer
select_subtable ()
This function lets the user select a subtable in a clean manner. It returns the subtable or 'None' if the user selected canceled the operation.