Snapper - XML Application SourceForge.net Logo  


NAME

SharkAPI::Oix -- SharkAPI Object Integration Extensions


DESCRIPTION

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.


GETTING STARTED

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.


CLASS / GROUP MAPPING

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.

GtkEntry Class

This class is the GtkEntry widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkCombo Class

This class is the GtkCombo widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkText Class

This class is the GtkEntry widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkButton Class

This class is the GtkButton widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkRadioButton Class

This class is the GtkRadioButton widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkCheckButton Class

This class is the GtkCheckButton widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkFrame Class

This class is the GtkFrame widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkCTree Class

This class is the GtkCTree widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkCList Class

This class is the GtkCList widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

GtkWindow Class

This class is the GtkWindow widget from the Gtk+ 1.x/2.x library. The following groups are associated with this class.

OIXGridDesc Class

This class is used by the SharkAPI::Grid class to define how a Grid object is displayed.

OIXDataDesc Class

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.

OIXFormDesc Class

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.

OIXDataSource Class

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.

OIXDataDumpGroup Class

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.

OIXDataDump Class

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.


GROUP / OPTION MAPPING

Each group has a set of options that are associated with it, the following sections explain each group.

Documentation 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:

Access Group

The Access Group controls permissions and has the following attributes:

Form Field Group

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:

Data Field Group

This group associates a SharkAPI::DB Data Descriptor object for the field and has the following attibutes:

Tab Evaluation Group

This group is used when a user presses the TAB key in the widget and has the following attributes:

Reference Datasource Group

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:

Reference Perl

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

Lookup Datasource Group

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

Lookup Perl Group

This group is the same as the Reference Perl group but there is no key value just straight values.

Simple Evaluation Group

This group is used to define a function that will be executed when the enter key is pressed in the widget.

Validation Group

This group provides methods to validate the contents of the widget.

Store Value

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.

Toggle Button Group

This group defines a grouping of toggle buttons. Radio buttons or check buttons of the same group will act together.

Right Click Evaluation Group

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...)

Grid Descriptor

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.

Grid Descriptor Group

This group defines the SharkAPI::Grid object and it's operations.

Header Group

This group is used to define the widths of the headers in a GtkCList widget.

List Dynamic Group

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.

Data Descriptor Group

The Descriptor Group defines the descriptor and has the following attributes:

Form Descriptor Group

The Descriptor Group defines the descriptor and has the following attributes:

Data Descriptor

The Data Descriptor Group links one or more data descriptor objects. This group can be added multiple times.

Locator Group

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.

Data Source Group

The Data Source Group defines a data source and has the following attributes (some are specific to a vendor):

Data Dump Group

The Dump Group has the following attributes:

Dump Group

The Dump Group defines which data descriptor to use along with the following attributes:

Field Group

The Field Group defines the fields in the table to dump. The field group can be added multiple times.

Parent Group

The parent group is used internally and cannot be modified or removed.


SEE ALSO

perl(1).

Snapper(3).

SharkAPI(3).


AUTHOR

Bill Walz, bill@landsharklinux.com


COPYRIGHT

The SharkAPI::Oix module is Copyright (c) 2003 Albacore Technology, LLC The SharkAPI::Oix module is commercial licensed software


Valid HTML 4.01!
Content owned by Albacore Technology is copyright 1999-2000 Albacore Technology, LLC All rights reserved.