[BACK]Return to MyDocument.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / cfep

Annotation of OpenXM/src/cfep/MyDocument.h, Revision 1.3

1.1       takayama    1: //
                      2: //  MyDocument.h
                      3: //  cfep
                      4: //
                      5: //  Created by Nobuki Takayama
                      6: //  Copyright (c) 2006 openxm.org
                      7: //
                      8:
                      9: #import <Cocoa/Cocoa.h>
                     10: #import "MyEnvironment.h"
                     11: #import "MyDecoder.h"
                     12:
                     13: #define START_OF_RESULT_OF_OX_TEXMACS   0x2
                     14: #define END_OF_EVALUATION_OF_OX_TEXMACS 0x5
                     15: #define UTF8_2  0x6    // 110. header of utf8 2 byte data
                     16: #define UTF8_3  0xe    // 1110. header of utf8 3 byte data
                     17: #define MYDECODER 0x3e // 1111 10. header of MyDecoder 3 byte data
                     18: //     u0           u1           u2
                     19: //     110* ****/1  10** ****                UTF8_2
                     20: //     1110 ****/2  10** ****/3  10** ****   UTF8_3
                     21: //     1111 10**/4  1111 0***/5  1111 0***   MYDECODER
                     22: //     /state
                     23:
                     24: // unicode of @"【"
                     25: #define BEGIN_INPUT_CELL  0x3010
                     26: // @"】"
                     27: #define END_INPUT_CELL    0x3011
                     28: // @"《"
                     29: #define BEGIN_OUTPUT_CELL 0x300a
                     30: // @"》"
                     31: #define END_OUTPUT_CELL   0x300b
                     32:
                     33:
                     34: @interface MyDocument : NSDocument
                     35: {
                     36:
                     37:
                     38:   IBOutlet NSTextView *textViewIn;
                     39:   IBOutlet NSTextView *textViewOut;
                     40:   IBOutlet NSTextField *inputCounterField;
                     41:   IBOutlet NSTextField *outputCounterField;
                     42:   IBOutlet NSProgressIndicator *myIndicator;
                     43:
                     44:
                     45:   NSData *dataFromFile;
                     46:   NSData *textDataFromFile;
                     47:   NSData *rtfDataFromFile;
                     48:
                     49:   NSString *OpenXM_HOME ;
                     50:   int onlySelectedArea;
                     51:   int inputCounter;
                     52:   int outputCounter;
                     53:   int redirectPrint;
                     54:
                     55:   // For notebook style
                     56:   int notebookMode;
                     57:   int doInsertNewInputCell;
                     58:   int ox_texmacs_level;
                     59:   // For select engine menu.
                     60:   int oxEngine;  // cf. peer_type. temporal.
1.3     ! takayama   61:    // For error handling.
1.1       takayama   62:   NSMutableArray *errorLines;
                     63:   // For debug the tunnel
                     64:   int debugMyTunnel;
1.2       takayama   65:   // asir-contrib is loaded or not.
                     66:   int asir_contrib;
                     67:   // pretty printing
                     68:   int prettyPrint;
1.1       takayama   69:   //////////
                     70:   NSTask *task;
                     71:   NSPipe *inboundPipe;
                     72:   NSPipe *outboundPipe;
                     73:   NSPipe *errPipe;
                     74:   NSFileHandle *inboundFileHandle;
                     75:   NSFileHandle *outboundFileHandle;
                     76:   NSFileHandle *errFileHandle;
                     77:
                     78:   int inEvaluation;
                     79:   NSString *myDocumentKey;
                     80:   MyDecoder *myDecoder;
                     81:   /////////
                     82:   // Parameters below should be synchronized with values in myEnvironemnt.
                     83:   enum peer_type peer;
                     84:   NSData *peerEndEvaluteMark;
                     85:   NSString *peerStartupString;
                     86:   NSDictionary *myDefaultTypingAttributes;
                     87:
                     88: }
                     89:
                     90: -(IBAction) oxEvaluate:(id) sender;
                     91: -(IBAction) oxInterrupt:(id) sender;
                     92: -(IBAction) oxRenderOutput: (id) sender;
                     93: -(IBAction) oxEvaluateSelected: (id) sender;
                     94: -(IBAction) oxEvaluateRegisteredString: (id) sender;
                     95: -(IBAction) checkSelectedArea: (id) sender;
                     96: -(IBAction) clearTextViewOut: (id) sender ;
                     97:
                     98: // loading
                     99: -(void)loadtextViewWithData:(NSData *)data;
                    100: -(void)loadtextViewWithRTFData:(NSData *)data;
                    101: -(void) loadtextViewWithTextData:(NSData *)data ;
                    102:
                    103: // initilizers
                    104: -(void) initAux ;
                    105: -(id) openMyModel ;
                    106: -(void) closeMyModel;
                    107: -(id) restartMyModel ;
                    108:
                    109: -(NSString *) getMyDocumentKey;
                    110:
                    111: // messenges
                    112: -(void) sayTheMessageAboutX ;
                    113:
                    114: -(int) oxEvaluateString: (NSString *)msg withMark: (BOOL) yes;
                    115: - (void)outputString:(NSString *)amt;
                    116: - (void)outputErrorString:(NSString *)amt;
                    117: -(void) printErrorMessage: (NSString *)msg;
                    118: -(void)outputStringInNotebookMode: (NSString *)msg;
                    119: -(void)outputErrorStringInNotebookMode: (NSString *)msg;
                    120: -(void)outputStringInNotebookMode: (NSString *)msg withColor: (NSColor *)color;
                    121:
                    122: - (void)messageDialog:(NSString *)msg with:(int) no;
                    123: -(void) printDocument: (id) sender;
                    124: -(void) showHelp: (id) sender;
                    125: -(void) changeInputCounterField: (int) inc;
                    126: -(void) changeOutputCounterField: (int) inc;
                    127: -(void) changeOutputCounterFieldWithString: (NSString *) msg;
                    128: -(void) startIndicator;
                    129: -(void) stopIndicator;
                    130:
                    131: -(void) readInboundData: (NSNotification *) sender;
                    132: -(void) readErrData: (NSNotification *) sender;
                    133:
                    134: -(int) selectIllegalCharacter ;
                    135: -(NSRange) selectBlockForwardFrom: (int) offset with: (int) first and: (int) last ;
                    136: -(NSRange) selectBlockForward ;
                    137:
                    138: // managing errors. (channel 0)
                    139: -(void) errorActionFor: (NSString *)cmd;
                    140: -(void) clearLines;
                    141: -(void) addLine: (int) n;
                    142: -(int) nextLine: (int) flag ;
                    143: -(int) gotoLine: (int) n;
                    144: -(int) gotoNextError: (id) sender;  // Can be an action.
                    145: // managing OpenGL messages. (channel 1 and 2)
                    146: -(int) openGLActionFor: (NSString *)cmd;
                    147: -(int) openGLInitActionFor: (NSString *)cmd;
1.3     ! takayama  148: -(void) showListOfOglComm: (int) gid;
        !           149: -(void) openGLMeta: (NSString *) cmd to: (int) gid;
1.2       takayama  150: // managing png messages. (channel 10)
                    151: -(void) pngActionFor: (NSString *)cmd;
1.1       takayama  152: // notebookMode
                    153: -(void) insertInputCell;
                    154: -(NSString *)getContentsOfInputCell;
                    155: -(void)prepareOutputCell;
                    156: -(int)getOutOfOutputCell;
                    157: -(int)specialCharacterInNotebookMode: (int) c;
                    158: // Add menus
                    159: -(void) addMenuExec;
                    160: -(void) setBasicStyle: (id) sender;
                    161: -(void) setNotebookStyle: (id) sender;
                    162: -(void) updateInterfaceStyleMenu;
                    163: -(void) setEngineRisaAsir: (id) sender;
                    164: -(void) setEngineKanSm1: (id) sender;
                    165: -(void) updateSelectEngineMenu;
                    166: -(void) setEngineRisaAsir: (id) sender;
                    167: -(void) setEngineKanSm1: (id) sender;
                    168: -(void) setDebugMyTunnel: (id) sender;
1.2       takayama  169: -(void) loadAsirContrib: (id) sender;
                    170: -(NSMenuItem *) menuItemLoadLibrary: (int) oxengine;
                    171: -(void) setPrettyPrint: (id) sender;
1.1       takayama  172: -(void) mytest: (id) sender;
                    173:
                    174: @end

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>