home *** CD-ROM | disk | FTP | other *** search
- //
- // Based on the following example from LightHouse:
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Copyright 1994-1995 Lighthouse Design, Ltd. All rights reserved.
- //
- // QXExport.h
- //
- // THIS CODE IS FOR DEMONSTRATION PURPOSES ONLY!
- // You may freely copy, distribute and reuse the code in this example.
- // Lighthouse disclaims any warranty of any kind, expressed or implied, as to
- // its fitness for any particular use.
- // This example implements a simple export panel.
- //
- // NOTE: This example will only work on simple models. It can be improved
- // by modifying -exportData:
- //
- // ^Demonstrates^
- //
- // - Exporting data
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- //
- // QXExportHtml.h
- //
- // Copyright 1996-1997 Rudolf B. Blazek, Michigan State University.
- // blazek@stt.msu.edu
- // All rights reserved.
- //
- // See the ReadMe.rtf file for details.
- //
-
- #import <objc/Object.h>
- #import <streams/streams.h>
- #import <qapi/qapi.h>
-
-
- @interface QXExportHtml : Object <QAPIPrincipalClass, QAPISelectionDelegate>
- {
- id <QAPIApp> qapiApp;
- NXBundle* bundle;
- NXStream* aStream;
- char **labelsArray;
-
- id infoPanel;
- id accessoryView;
- id rowLabelsSwitch;
- id colLabelsSwitch;
- id colorAttribSwitch;
- id tableBgColorWell;
- id pageBgColorWell;
- id equalColorsSwitch;
- id borderSizeField;
- id borderSizeSlider;
- id cellSpacingField;
- id cellSpacingSlider;
- id cellPaddingField;
- id cellPaddingSlider;
- id headerFontIncreaseField;
- id headerFontIncreaseSlider;
-
- int lastColorWell;
- int useRowLabels, useColLabels, useColors;
- int prevRow;
- }
-
- //
- // ^QAPIPrincipalClass^
- //
-
- + q_bundleSelected:(NXBundle*)aBundle;
- // Called by ^Quantrix^ when the bundle is loaded or when the menu item
- // defined in 'load.strings' is selected by the user. The first time it
- // is called, this class creates a static instance and then calls
- // ^menuAction:^.
-
- //
- // Basic Actions
- //
-
- - init;
- // Sets up a connection to the ^QAPIApp^ by calling [NXApp delegate].
-
- - setBundle:(NXBundle*)aBundle;
- // Stores a reference to 'aBundle'. It need 'aBundle' in order to load its
- // interface file.
-
- - menuSelected:sender;
- // Issues a Save Panel, then tries to save the data from the current view.
-
- - exportHTMLData:(id <QAPIApp>)anApp;
- // Gets the current view, selects the first and last node in the first
- // category, then begins an iteration.
-
-
- //
- // Defaults Support
- //
- - registerDefaults;
- - saveDefaults:sender;
- - restoreDefaults:sender;
- - saveField:aField into:(char*)name;
- - restoreField:aField from:(char*)name;
- - saveSwitch:aSwitch into:(char*)name;
- - restoreSwitch:aSwitch from:(char*)name;
- - saveColorWell:aColorWell into:(char*)name;
- - restoreColorWell:aColorWell from:(char*)name;
-
-
-
- //
- // Interface Support
- //
-
- - loadInterfaceFileFrom:(NXBundle*)aBundle;
- // Loads an interface file named the same as receiver`s class name.
-
- - equalColorsOnOff:sender;
- - pageColorChanged:sender;
- - tableColorChanged:sender;
-
-
-
- //
- // HTML support
- //
-
- - (char*)HTMLcolor:(NXColor)theColor;
- // Converts NXColor into HTML compatible string.
-
- //
- // ^QAPISelectionDelegate^
- //
-
- - (char*)evaluateItem:(id<QAPINode>)anItem in:aSelection;
- // Processes the Item names (columns only so far ...)
-
- - (void)q_evaluateCell:(id<QAPICell>)aCell in:aSelection;
- // Appends the cell's data to 'aStream'.
-
- - (void)q_evaluateNode:(id<QAPINode>)aNode in:aSelection;
- // Nothing
-
- @end
-
-