SharkAPI::Oix -- SharkAPI Object Integration Extensions
The Object Integration and Extension interface adds advanced
features to the Glade XML file. The data is contained in the same
directory as the Glade project file and is called oix.xml.
The XML data in the file oix.xml can be accessed through the
SharkAPI::App class. The SharkAPI uses this data for database access,
form definitions, etc.
NOTE: This information is only for associating high level groups of
values to widget. It is up to the calling program to operate on this
data. Currently the SharkAPI implements most of this functionality.
The Dump tab in the Snapper IDE uses the Data Dump Group and Data Dump
Object.
Invoke the Snapper IDE program from the command line by typing ``snapide'' or
from a menu item if installed.
After the program has loaded, open a project. Then open the tree items until
you have found the glade xml file for the project, right click and select
``Load/Create Oix File''.
After the file is parsed there will be a widget tree displayed in the
window. The extension groups available for each object in the tree
are shown in the middle window after selecting an object. To add
a group to the object click the add button. The attributes associated
with each group are then displayed and can be manipulated. Some groups
can have multiple attributes, i.e. fields in a dump object. Just
click add again to add the multiple attributes.
Each widget is associated with a class. For Gtk/Gnome widgets this value
is the Gtk class, i.e. GtkButton, etc. OIX also some of its own objects
that are available by right clicking in the widget tree window.
This class is the GtkEntry widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkCombo widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkEntry widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkButton widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkRadioButton widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkCheckButton widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkFrame widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkCTree widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkCList widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is the GtkWindow widget from the Gtk+ 1.x/2.x library. The
following groups are associated with this class.
This class is used by the SharkAPI::Grid class to define how a Grid
object is displayed.
This class is the SharkAPI::DB Data Descriptor. This class is used to
define a database table that can later be referenced from a
Data Field Object. The descriptor must be linked to a form object,
and then operations such as save, clear, etc. are called using the
form object name.
This class is the SharkAPI::Form Form Descriptor. This class is used to
define a collection of fields that are not associated with a database but
need to worked on collectively. One or more Data Descriptors can be linked
and the Form/Data object manipulated as one. The fields are linked using
the data descriptor name option.
This class is the defines a data source. Currently a DBI data source is
supported. In the future others will be added, i.e. SOAP.
This class is used to define a dump group. Dump groups are used by the
snapdump program. The snapide program reads and write data from data
descriptors to files. Dump Groups group together Data Dump class objects.
By using these groups collection of data can be loaded or saved.
It is a platform independent data loader.
This class defines dump objects that are associated with a Dump Group. Each
Dump Object defines the table and fields to be dumped or loaded.
Each group has a set of options that are associated with it, the
following sections explain each group.
The Documentation is used to add text that will be extracted and
displayed by the Snapper application documentation utility and has the
following attributes:
The Access Group controls permissions and has the following attributes:
This group associates a SharkAPI::Form object to a widget. A Data
Field Group should be used when database or SharkAPI::DB access is to
be used. The form object is basically a way of performing operations on
a named group of widgets. The following attributes are defined:
This group associates a SharkAPI::DB Data Descriptor object for the field
and has the following attibutes:
This group is used when a user presses the TAB key in the widget and has
the following attributes:
This group is used when the data for the field needs to be assigned to a
lookup table with key and value fields. In other words if our Data Field
field value is status, then our Reference Datasource group could point to
the table status_lookup defined in the Data Descriptor, and the field
storeval, and displayval. If the status_lookup table contained the following
data: 1 = Close, 2 = Open, etc then our application would display Close but
store the value 1 in the status field. The Reference Datasource group
has the following attributes:
This group is the same as the Reference Datasource but a perl function
is used to return the key/value items.
- EvalString - Perl string to evaluate
- Validate - Should the key/value pair exist in the return values?
- Cache - Should the data be read in and retained the first time it is accessed?
- ForceCheck - The data should be validated even if it has not changed
This group is the same as the Reference Datasource group but there is
no key value just a straight lookup.
- DataDesc - Data Descriptor Name (lookup table name)
- DisplayName - Field Name for display value
- Validate - Should the key/value pair exist in the lookup?
- Cache - Should the data be read in and retained the first time it is accessed?
- ForceCheck - The data should be validated even if it has not changed
This group is the same as the Reference Perl group but there is
no key value just straight values.
This group is used to define a function that will be executed when the
enter key is pressed in the widget.
This group provides methods to validate the contents of the widget.
This group defines the value that is to be returned if the widget is checked.
If no value is defined then the default is 1 or 0.
This group defines a grouping of toggle buttons. Radio buttons or check
buttons of the same group will act together.
This group is used to define a function that will be executed when the
right mouse button is clicked in the widget.
- EvalString - String to execute
- EvalType - Type of string (Perl, Ruby, Python, etc...)
This group is used to associate a grid desciptor with a widget. The grid
descriptor defines how a list is populated and it's actions.
This group defines the SharkAPI::Grid object and it's operations.
This group is used to define the widths of the headers in a GtkCList widget.
This group is used to define a sql script used to populate a GtkCList
widget. The global $SnapRun::db should be defined for a datasource
connection.
The Descriptor Group defines the descriptor and has the following attributes:
The Descriptor Group defines the descriptor and has the following attributes:
The Data Descriptor Group links one or more data descriptor objects. This
group can be added multiple times.
The Locator Group is used to display or populate a Grid object with results
if more than one row is returned from a SharkAPI::Form::load or
SharkAPI::Form::load_count method.
The Data Source Group defines a data source and has the following attributes
(some are specific to a vendor):
The Dump Group has the following attributes:
The Dump Group defines which data descriptor to use along with
the following attributes:
The Field Group defines the fields in the table to dump. The field group
can be added multiple times.
The parent group is used internally and cannot be modified or removed.
perl(1).
Snapper(3).
SharkAPI(3).
Bill Walz, bill@landsharklinux.com
The SharkAPI::Oix module is Copyright (c) 2003 Albacore Technology, LLC
The SharkAPI::Oix module is commercial licensed software
|