1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SB_SBDEF_HXX 25 #define _SB_SBDEF_HXX 26 27 #include <basic/sbxdef.hxx> 28 #include <svl/svarray.hxx> 29 30 #define _BASIC_TEXTPORTIONS 31 32 // Type of a text token (syntax highlighting) 33 enum SbTextType 34 { 35 SB_KEYWORD = 1, // Keywords 36 SB_SYMBOL, // Symbols 37 SB_STRING, // Strings 38 SB_NUMBER, // Numbers 39 SB_PUNCTUATION, // Brackets, points, etc. 40 SB_COMMENT, // Comments 41 SB_DUMMY = 255 // workaround for #i31479 42 }; 43 44 // Active language 45 enum SbLanguageMode 46 { 47 SB_LANG_GLOBAL, // As in SbiGlobals struct 48 SB_LANG_BASIC, // StarBasic (Default) 49 SB_LANG_VBSCRIPT, // Visual-Basic-Script 50 SB_LANG_JAVASCRIPT // JavaScript 51 }; 52 53 #ifdef _BASIC_TEXTPORTIONS 54 struct SbTextPortion 55 { // Syntax Highlighting: a text portion 56 xub_StrLen nLine; // Line number 57 xub_StrLen nStart, nEnd; // 1st and last column 58 SbTextType eType; // Type of the portion 59 }; 60 61 SV_DECL_VARARR(SbTextPortions, SbTextPortion,16,16) 62 #else 63 class SbTextPortions; 64 #endif 65 66 // Returns type name for Basic type, array flag is ignored 67 // implementation: basic/source/runtime/methods.cxx 68 String getBasicTypeName( SbxDataType eType ); 69 70 // Returns type name for Basic objects, especially 71 // important for SbUnoObj instances 72 // implementation: basic/source/classes/sbunoobj.cxx 73 class SbxObject; 74 String getBasicObjectTypeName( SbxObject* pObj ); 75 76 // Allows Basic IDE to set watch mode to suppress errors 77 // implementation: basic/source/runtime/runtime.cxx 78 void setBasicWatchMode( bool bOn ); 79 80 // Debug Flags: 81 #define SbDEBUG_BREAK 0x0001 // Break-Callback 82 #define SbDEBUG_STEPINTO 0x0002 // Single Step-Callback 83 #define SbDEBUG_STEPOVER 0x0004 // Additional flag Step Over 84 #define SbDEBUG_CONTINUE 0x0008 // Do not change flags 85 #define SbDEBUG_STEPOUT 0x0010 // Leave Sub 86 87 #define SBXID_BASIC 0x6273 // sb: StarBASIC 88 #define SBXID_BASICMOD 0x6d62 // bm: StarBASIC Module 89 #define SBXID_BASICPROP 0x7262 // pr: StarBASIC Property 90 #define SBXID_BASICMETHOD 0x6d65 // me: StarBASIC Method 91 #define SBXID_JSCRIPTMOD 0x6a62 // jm: JavaScript Module 92 #define SBXID_JSCRIPTMETH 0x6a64 // jm: JavaScript Module 93 94 #define SBX_HINT_BASICSTART SFX_HINT_USER04 95 #define SBX_HINT_BASICSTOP SFX_HINT_USER05 96 97 // #115826 98 enum PropertyMode 99 { 100 PROPERTY_MODE_NONE, 101 PROPERTY_MODE_GET, 102 PROPERTY_MODE_LET, 103 PROPERTY_MODE_SET 104 }; 105 106 #endif 107