Use cRDCModalPanel.pkg Use cImageList32.pkg Use dfSpnFrm.pkg Use dfLine.pkg Use dfTreeVw.pkg Use Colr_Dlg.pkg Use cRichEdit.pkg Use oEditorProperties.pkg Use THColorer.pkg Use THDialog.pkg Use Font_dlg.pkg Use cImageList32.pkg Use cTextEdit.pkg Use cSCNotifierCheckBox.pkg Use cSCWsGrid.pkg Use cRDCHeaderGroup.pkg Use cRDCButtonDPI.pkg Use SourceCode.inc Use Windows.pkg Struct tFontSpecs String sFontName Integer iSize Integer iCharSet End_Struct Function ScintillaFontAsStruct Global String sFace Returns tFontSpecs Integer iSize iCharSet String sFont sFontSz sCharSet tFontSpecs FontSpecs If (sFace = "") Begin Move "11pt; 0; Courier New" to sFace End Move (Left(sFace, Pos(';', sFace))) to sFontSz Move (Trim(Replace(sFontSz, sFace, ""))) to sFace Move (Replaces(' ', sFontSz, "")) to sFontSz Move (Left(sFontSz, Length(sFontSz)-3)) to FontSpecs.iSize Move (Left(sFace, Pos(';', sFace))) to sCharSet Move (Trim(Replace(sCharSet, sFace, ""))) to FontSpecs.sFontName Move (Left(sCharSet, Length(sCharSet)-1)) to FontSpecs.iCharSet Function_Return FontSpecs End_Function Function ScintillaEditorFontFormat Global tFontSpecs FontSpecs Returns String Function_Return (String(FontSpecs.iSize) + "pt;" * String(FontSpecs.iCharSet) + ";" * FontSpecs.sFontName) End_Function Function ScintillaReadableFontFormat Global String sFace Returns String tFontSpecs FontSpecs Get ScintillaFontAsStruct sFace to FontSpecs Function_Return (FontSpecs.sFontName + "," * String(FontSpecs.iSize) + "pt") End_Function Object oScintillaParameters_dg is a cRDCModalPanel Set Size to 258 447 Set Label to "Editor Settings" Set piMinSize to 238 439 Set Location to 2 2 Set Icon to "EditorSettings.ico" Object oImages_lst is a cImageList32 Set piMaxImages to 4 Procedure OnCreate Integer iItem Get AddIcon "Colors.ico" to iItem Get AddIcon "KeyWords.ico" to iItem Get AddIcon "Keyboard.ico" to iItem Get AddIcon "SettingsEditor.ico" to iItem End_Procedure End_Object Object oEditorTabDialog is a TabDialog Set Size to 228 441 Set Location to 4 3 Set phoImageList to oImages_lst Set peAnchors to anAll Object oFontsPage is a TabPage Set Label to "Color/Font" Set piImageIndex to 0 Object oColorsGroup is a cRDCHeaderGroup Set Size to 206 428 Set Location to 5 4 Set Label to "Colors and Font" Set psImage to "Colors.ico" Set peAnchors to anAll Object oCategory is a TreeView Set Size to 153 106 Set Location to 46 7 Set pbFullRowSelect to True Set piTextColor to clBlack Set pbExplorerStyle to True Set peAnchors to anTopBottomLeft // Initializes colorer and populates the Tree Procedure OnCreateTree Handle hItem Integer iItem iItems Move (SizeOfArray(gtColorer)) to iItems For iItem From 0 to (iItems-1) Get AddTreeItem gtColorer[iItem].sName 0 iItem 0 0 to hItem Loop Set Visible_State of oColor to False Set Visible_State of oBackground to False End_Procedure Procedure OnItemChanged Handle hItem Handle hItemOld Integer iIndex String sLabel // Collect Item Data of the selected Colorer Item Get ItemData hItem to iIndex Get ItemLabel hItem to sLabel // Manage color pickers Set Visible_State of oColor to gtColorer[iIndex].iForeOff Set Visible_State of oBackground to gtColorer[iIndex].iBackOff Set Visible_State of oFontBold to gtColorer[iIndex].iBackOff Set Visible_State of oFontItalics to gtColorer[iIndex].iBackOff Set Visible_State of oFontUnderline to gtColorer[iIndex].iBackOff // Show the current color if applicable Set piColorerIndex of oColor to iIndex Set piColorerIndex of oBackground to iIndex If (gtColorer[iIndex].iForeOff) ; Set SlectedColor of oColor to gtColorer[iIndex].iForeC If (gtColorer[iIndex].iBackOff) ; Set SlectedColor of oBackground to gtColorer[iIndex].iBackC // Font flags Set piColorerIndex of oFontBold to iIndex Set piColorerIndex of oFontItalics to iIndex Set piColorerIndex of oFontUnderline to iIndex Set Checked_State of oFontBold to gtColorer[iIndex].iBold Set Checked_State of oFontItalics to gtColorer[iIndex].iItalics Set Checked_State of oFontUnderline to gtColorer[iIndex].iUnderline // Notify color picker about current colorer element Send mGeneratePreview End_Procedure On_Key Key_Up_Arrow Send Up On_Key Key_Down_Arrow Send Down End_Object Object oColor is a cColorBox Set Size to 22 105 Set Location to 47 120 Set Label to "Color" Procedure OnColorChange Integer iColor Get SelectedColor to iColor Move iColor to gtColorer[piColorerIndex(Self)].iForeC Send mGeneratePreview Delegate Send NotifyChange End_Procedure End_Object Object oBackground is a cColorBox Set Size to 22 105 Set Location to 72 120 Set Label to "Background" Procedure OnColorChange Integer iColor Get SelectedColor to iColor Move iColor to gtColorer[piColorerIndex(Self)].iBackC Send mGeneratePreview Delegate Send NotifyChange End_Procedure End_Object Object oFontBold is a CheckBox Property Integer piColorerIndex Set Size to 10 50 Set Location to 107 151 Set Label to "Bold" Set FontWeight to fw_Bold Set Visible_State to False Procedure OnChange If (Focus(Desktop)=Self) Begin Get Checked_State to gtColorer[piColorerIndex(Self)].iBold Send mGeneratePreview Delegate Send NotifyChange End End_Procedure End_Object Object oFontItalics is a CheckBox Property Integer piColorerIndex Set Size to 10 50 Set Location to 118 151 Set Label to "Italics" Set FontItalics to True Set Visible_State to False Procedure OnChange If (Focus(Desktop)=Self) Begin Get Checked_State to gtColorer[piColorerIndex(Self)].iItalics Send mGeneratePreview Delegate Send NotifyChange End End_Procedure End_Object Object oFontUnderline is a CheckBox Property Integer piColorerIndex Set Size to 10 50 Set Location to 129 151 Set Label to "Underline" Set FontUnderline to True Set Visible_State to False Procedure OnChange If (Focus(Desktop)=Self) Begin Get Checked_State to gtColorer[piColorerIndex(Self)].iUnderline Send mGeneratePreview Delegate Send NotifyChange End End_Procedure End_Object Object oPreview is a Container3d Set Size to 157 190 Set Location to 46 232 Set Border_Style to Border_ClientEdge Set Color to clWhite Set peAnchors to anAll Object oLeftMarginPreview is a Container3d Set Size to 156 14 Set Location to 0 0 Set Border_Style to Border_None Set peAnchors to anAll End_Object Object oNumbersPreview is a TextBox Set Auto_Size_State to False Set Size to 179 12 Set Location to 0 14 Set Label to ("01"+Character(10)+"02"+Character(10)+"03"+Character(10)+"04"+Character(10)+"05"+ ; Character(10)+"06"+Character(10)+"07"+Character(10)+"08"+Character(10)+"09"+ ; Character(10)+"10"+Character(10)+"11"+Character(10)+"12"+Character(10)+"13"+ ; Character(10)+"14"+Character(10)+"15"+Character(10)+"16"+Character(10)+"17"+ ; Character(10)+"18"+Character(10)+"19") Set FontWeight to fw_Bold Set Color to clDkGray Set TextColor to clWhite Set Justification_Mode to JMode_Center Set Typeface to "Courier New" Set peAnchors to anTopBottomLeft End_Object Object oEditorPreview is a cEditorPreview Set Size to 162 158 Set Location to 0 29 Set peAnchors to anAll End_Object End_Object Procedure mGeneratePreview Integer iForeColor iOriFore iSize String sFont tFontSpecs FontSpecs Set Dynamic_Update_State of oEditorPreview to False Send Delete_Data to oEditorPreview // General Appearance Move gtColorer[EC_WINDOW].iForeC to iForeColor If (iForeColor<0) Begin Move clWhite to iForeColor End Set Color of oEditorPreview to iForeColor Set Color of oPreview to iForeColor // Left Marging Set Color of oLeftMarginPreview to gtColorer[EC_LEFTMARGIN].iForeC // Line Numbers Set TextColor of oNumbersPreview to gtColorer[EC_LINENUMBERS].iForeC //iForeColor Set Color of oNumbersPreview to gtColorer[EC_LINENUMBERS].iBackC //iBackColor Set FontWeight of oNumbersPreview to (gtColorer[EC_LINENUMBERS].iBold * 800) Set FontItalics of oNumbersPreview to gtColorer[EC_LINENUMBERS].iItalics Set FontUnderline of oNumbersPreview to gtColorer[EC_LINENUMBERS].iUnderline // Font Get psEditorFont of oFontFace to sFont Get ScintillaFontAsStruct sFont to FontSpecs Move FontSpecs.sFontName to sFont Move ((FontSpecs.iSize - 2) * 20) to iSize Set psTypeFace of oEditorPreview to sFont Set piFontSize of oEditorPreview to iSize // Elements Get TextColor of oEditorPreview to iOriFore Send AddComment to oEditorPreview (CS_CommentSymbol * _T("Pre-processor/Macro", 1055)) Send AppendTextLn to oEditorPreview "" Send AddPreProcessor to oEditorPreview "#COMMAND _DEBUG" Send AppendTextLn to oEditorPreview "" Send AddPreProcessor to oEditorPreview "#ENDCOMMAND" Send AppendTextLn to oEditorPreview "" Send AppendTextLn to oEditorPreview "" Send AddComment to oEditorPreview (CS_CommentSymbol * _T("Metatags, Keywords, Strings", 1056)) Send AppendTextLn to oEditorPreview "" Send AddMetaTag to oEditorPreview ('{Description="'+ _T("Meta tag", 1057) +'"}') Send AppendTextLn to oEditorPreview "" Send AddScopeKeyword to oEditorPreview "Function" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "mFoo" Send AddText to oEditorPreview " " Send AddKeyword to oEditorPreview "Returns String" Send AppendTextLn to oEditorPreview "" Send AddSpacing to oEditorPreview " " Send AddKeyword to oEditorPreview "String" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "sRetVal" Send AppendTextLn to oEditorPreview "" Send AddSpacing to oEditorPreview " " Send AddKeyword to oEditorPreview "Move" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "(" Send AddString to oEditorPreview ('"'+_T("Hello", 1058)+'"') Send AddSpacing to oEditorPreview " " Send AddOperator to oEditorPreview "*" Send AddSpacing to oEditorPreview " " Send AddString to oEditorPreview ('"'+_T("World!", 1059)+'"') Send AddText to oEditorPreview ")" Send AddSpacing to oEditorPreview " " Send AddOperator to oEditorPreview ";" Send AppendTextLn to oEditorPreview "" Send AddSpacing to oEditorPreview " " Send AddKeyword to oEditorPreview "to" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "sRetVal" Send AppendTextLn to oEditorPreview "" Send AddSpacing to oEditorPreview " " Send AddKeyword to oEditorPreview "Function_Return" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "sRetVal" Send AppendTextLn to oEditorPreview "" Send AddScopeKeyword to oEditorPreview "End_Function" Send AddSpacing to oEditorPreview " " Send AddComment to oEditorPreview "// mFoo" Send AppendTextLn to oEditorPreview "" Send AppendTextLn to oEditorPreview "" Send AddComment to oEditorPreview (CS_CommentSymbol * _T("Numbers & Braces", 1060)) Send AppendTextLn to oEditorPreview "" Send AddKeyword to oEditorPreview "Number" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "nVal" Send AppendTextLn to oEditorPreview "" Send AddKeyword to oEditorPreview "Move" Send AddSpacing to oEditorPreview " " Send AddBraceHLight to oEditorPreview "(" Send AddNumber to oEditorPreview '1.23' Send AddSpacing to oEditorPreview " " Send AddOperator to oEditorPreview "+" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "(" Send AddNumber to oEditorPreview '12' Send AddSpacing to oEditorPreview " " Send AddOperator to oEditorPreview "*" Send AddSpacing to oEditorPreview " " Send AddNumber to oEditorPreview '$02' Send AddText to oEditorPreview ")" Send AddBraceHLight to oEditorPreview ")" Send AddUnmatchedBrace to oEditorPreview ")" Send AddSpacing to oEditorPreview " " Send AddKeyword to oEditorPreview "to" Send AddSpacing to oEditorPreview " " Send AddText to oEditorPreview "nVal" Send AppendTextLn to oEditorPreview "" Send AppendTextLn to oEditorPreview "" Send AddComment to oEditorPreview (CS_CommentSymbol * _T("Typing String", 1061)) Send AppendTextLn to oEditorPreview "" Send AddKeyword to oEditorPreview "Move" Send AddSpacing to oEditorPreview " " Send AddStringTyping to oEditorPreview ('"'+_T("Typing new String", 1062)) Send AppendTextLn to oEditorPreview "" Set TextColor of oEditorPreview to iOriFore Set Enabled_State of oSave to False Send ChangeFontStyle of oEditorPreview sFont FontSpecs.iSize Set Dynamic_Update_State of oEditorPreview to True Send Beginning_of_Data of oEditorPreview // Make the line numbers line up with the new font Set Typeface of oNumbersPreview to sFont Set FontPointHeight of oNumbersPreview to FontSpecs.iSize End_Procedure Object oSchemaSelect is a ComboForm Set Size to 13 106 Set Location to 30 7 Set Label to "Color Theme:" Set Label_Col_Offset to 0 Set Label_Justification_Mode to JMode_Top Set Label_Row_Offset to 1 Procedure Combo_Fill_List String sCur // Defauls Schemas Send Combo_Add_Item TH_DEFSCHEMA_WHITE_STR Send Combo_Add_Item TH_DEFSCHEMA_BLACK_STR Send Combo_Add_Item TH_DEFSCHEMA_BLUE_STR Send Combo_Add_Item TH_DEFSCHEMA_LIME_STR Send Combo_Add_Item TH_DEFSCHEMA_SERENE_STR Send Combo_Add_Item TH_DEFSCHEMA_SAHARA_STR Get psColorSchema of ghoEditorProperties to sCur If (sCur = "") Begin Move TH_DEFSCHEMA_WHITE_STR to sCur Set psColorSchema of ghoEditorProperties to sCur End Set Value to sCur Set Entry_State to False End_Procedure Procedure OnChange Boolean bDefaultSchema String sName sSchema sFontStyles Integer iC iPos If (Focus(Desktop) = Self) Begin Move True to bDefaultSchema Get Value Item 0 to sName Move TH_COLORSCHEMA_WHITE to sSchema Get psFontStyles of ghoEditorProperties to sFontStyles If (sName = TH_DEFSCHEMA_BLACK_STR) Begin Move TH_COLORSCHEMA_BLACK to sSchema End Else If (sName = TH_DEFSCHEMA_BLUE_STR) Begin Move TH_COLORSCHEMA_BLUE to sSchema End Else If (sName = TH_DEFSCHEMA_LIME_STR) Begin Move TH_COLORSCHEMA_LIME to sSchema End Else If (sName=TH_DEFSCHEMA_SERENE_STR) Begin Move TH_COLORSCHEMA_SERENE to sSchema End Else If (sName=TH_DEFSCHEMA_SAHARA_STR) Begin Move TH_COLORSCHEMA_SAHARA to sSchema End Else If (sName <> TH_DEFSCHEMA_WHITE_STR) Begin Move False to bDefaultSchema Get FindColorSchema of ghoEditorProperties sName to iC If (iC >= 0) Begin Get psColorSchemas.psSchemaColors of ghoEditorProperties Item iC to sSchema Get psColorSchemas.psSchemaFontStyles of ghoEditorProperties Item iC to sFontStyles End End If (bDefaultSchema) Begin Move (Pos(",", sSchema)) to iPos If (iPos>0) Begin Move (Right(sSchema, Length(sSchema) - iPos)) to sFontStyles Move (Left(sSchema, (iPos - 1))) to sSchema End Else Begin // use the default font style if not defined. Move (Repeat('0', 3 * 16) + "000") to sFontStyles End End Send SetColorerCurrentStyles sSchema sFontStyles Send mGeneratePreview to oColorsGroup Delegate Send NotifyChange End End_Procedure On_Key Key_F2 Send SaveEntries On_Key kCancel Send Close_Panel End_Object Object oFontFace is a Form Set Size to 13 105 Set Location to 30 120 Set Label_Col_Offset to 0 Set Label_Justification_Mode to JMode_Top Set Prompt_Button_Mode to PB_PromptOn Set Label to "Font:" Set Label_Row_Offset to 1 // The editor font, size & type is saved as a string with // the format: "11pt; 0; Consolas" in the .ini file. This is // also the format used to populate the popup font selection dialog. // However, we like to present the font as "Consolas, 11pt". Property String private.psEditorFont "" Procedure Set psEditorFont String sFont String sFontText Set private.psEditorFont to sFont Get ScintillaReadableFontFormat sFont to sFontText Set Value to sFontText End_Procedure Function psEditorFont Returns String Function_Return (private.psEditorFont(Self)) End_Function Procedure Key Integer iKey Returns Integer Integer iRetVal // Left, Right, Shft+Left, Shift+Right, Home, End, Shft+Home, Shft+End If ((iKey=260)or(iKey=261)or(iKey=5127)or(iKey=5128)or ; (iKey=294)or(iKey=295)or(iKey=5129)or(iKey=5130) ) ; Forward Get Msg_Key iKey to iRetVal Procedure_Return iRetVal End_Procedure Function CanPaste Returns Boolean Function_Return False End_Function Function CanCut Returns Boolean Function_Return False End_Function Function CanDelete Returns Boolean Function_Return False End_Function Function CanUndo Returns Boolean Function_Return False End_Function Procedure Paste Integer Arg1 Integer Arg2 Integer Arg3 End_Procedure Procedure Cut Integer Arg1 Integer Arg2 Integer Arg3 End_Procedure Procedure Delete End_Procedure Procedure Undo End_Procedure Procedure Prompt Handle hoFontDlg Integer iOK tFontSpecs FontSpecs String sFace sSize sCharSet sFontText Get psEditorFont to sFace Get ScintillaFontAsStruct sFace to FontSpecs Get Create (RefClass(FontDialog)) to hoFontDlg Set FixedPitchOnly_State of hoFontDlg to True Set FaceName of hoFontDlg to FontSpecs.sFontName Set FontPointSize of hoFontDlg to (FontSpecs.iSize * 10) Set FontCharSet of hoFontDlg to FontSpecs.iCharSet Set FontItalic of hoFontDlg to False Set FontUnderline of hoFontDlg to False Set FontWeight of hoFontDlg to FW_REGULAR Set FontType of hoFontDlg to REGULAR_FONTTYPE Get FontDialog of hoFontDlg to iOK If (iOk) Begin Move "" to FontSpecs.sFontName Move 0 to FontSpecs.iSize Move 0 to FontSpecs.iCharSet // Note: We _must_ trim the FaceName, FontPointSize & FontCharSet, else we can't append anything to the string. // Perhaps the functions does not make a proper DataFlex string ending? Get FaceName of hoFontDlg to sFace Move (CString(sFace)) to FontSpecs.sFontName Get FontPointSize of hoFontDlg to sSize Move (CString(sSize)) to sSize If (sSize = "") Begin Move 110 to sSize End Move (sSize / 10) to FontSpecs.iSize Get FontCharSet of hoFontDlg to sCharSet Move (CString(sCharSet)) to FontSpecs.iCharSet Append sFontText FontSpecs.sFontName ", " (String(FontSpecs.iSize)) "pt" Set Value to sFontText Get ScintillaEditorFontFormat FontSpecs to sFace Set psEditorFont to sFace Send mGeneratePreview Delegate Send NotifyChange End Send Destroy to hoFontDlg End_Procedure End_Object Object oColorSelectionInfo_tb is a TextBox Set Auto_Size_State to False Set Size to 24 105 Set Location to 150 120 Set Label to "Click on a color above to select a new color from the popup dialog" Set Justification_Mode to JMode_Left Set FontItalics to True End_Object End_Object End_Object Object oLanguagePage is a TabPage Set Label to "Language" Set piImageIndex to 1 Object oLanguageGroup is a cRDCHeaderGroup Set Size to 206 428 Set Location to 5 4 Set psImage to "KeyWords.ico" Set Label to "Keywords and Operators" Set psNote to "Used by Editor when the 'Adjust Upper/Lowercase' refactor function is selected" Set peAnchors to anAll Object oScopes is a cSCWsGrid Set Size to 137 180 Set Location to 35 6 Set Line_Width to 2 0 Set GridLine_Mode to Grid_Visible_None Set Form_Width 0 to 85 Set Header_Label 0 to "Scope Start" Set Status_Help Item 0 to "Scope keyword start" Set Form_Width 1 to 85 Set Header_Label 1 to "Scope End" Set Status_Help Item 1 to "Scope keyword stop" Property String psSepCharacter "\n" Set peAnchors to anTopBottom Procedure OnChange Integer iItem Integer iScopes Delegate Send NotifyChange Get Item_Count to iScopes Set Label of oScopesInfo_tb to ("Scopes:" * String(iScopes / 2)) End_Procedure Procedure Add_New_Line String sStart String sStop Integer iColor Send Add_Item Msg_None sStart If (iColor) Begin Set ItemTextColor (Item_Count(Self) - 1) to iColor End Send Add_Item Msg_None sStop If (iColor) Begin Set ItemTextColor (Item_Count(Self) - 1) to iColor End End_Procedure Procedure mInsertLine Send Add_New_Line "" "" clRed Send OnChange 0 Send End_of_Data End_Procedure Procedure mRemoveLine Integer iRowBase If (Item_Count(Self) = 0) Begin Procedure_Return End Get Base_Row_Item (Current_Item(Self)) to iRowBase Send Delete_Item (iRowBase + 1) Send Delete_Item iRowBase Send OnChange 0 End_Procedure Procedure mMoveDown Integer iCount iRowBase String sStart sStop Get Item_Count to iCount Get Base_Row_Item (Current_Item(Self)) to iRowBase Get Value Item iRowBase to sStart Get Value Item (iRowBase + 1) to sStop If (sStart = "") Begin Set Current_Item to iRowBase End Else If (sStop = "") Begin Set Current_Item to (iRowBase + 1) End Else Begin If (iRowBase = (iCount - 2)) Begin Send mInsertLine Set Current_Item to (iRowBase + 2) End Send Down Set Current_Item to (iRowBase + 2) End End_Procedure Procedure mMoveUp Integer iRowBase String sStart sStop Get Base_Row_Item (Current_Item(Self)) to iRowBase Get Value Item iRowBase to sStart Get Value Item (iRowBase + 1) to sStop If (sStart = "" and sStop = "") Begin Send mRemoveLine End Else If (sStart = "" or sStop = "") Begin Send Stop_Box (_T("Scope 'Start' and 'Stop' keywords must be specified!", 1455)) (_T("Problem", 1474)) End Else Begin Send Up End End_Procedure Function GetValue Integer iColumn Returns String Integer iC iColumns String sRet sSep Move (Low(Matrix_Size(Self))) to iColumns Get psSepCharacter to sSep If (sSep = "") Begin Move "\n" to sSep End For iC From 0 to (Item_Count(Self) - 1) If (Value(Self, iC + iColumn) <> "") Begin If (sRet <> "") Begin Move (sRet + sSep) to sRet End Move (sRet + Value(Self, iC + iColumn)) to sRet End Move (iC + iColumns - 1) to iC Loop Function_Return sRet End_Function Procedure DoLoad tSCLanguage ByRef ltSCLanguage Integer iScope iScopes Send Delete_Data Move (SizeOfArray(ltSCLanguage.saScopeStart)) to iScopes For iScope From 0 to (iScopes -1) Send Add_New_Line ltSCLanguage.saScopeStart[iScope] ltSCLanguage.saScopeStop[iScope] 0 Loop Set Label of oScopesInfo_tb to ("Scopes:" * String(iScopes)) End_Procedure On_Key key_F2 Send Request_SaveAllEntries On_Key kCancel Send Close_Panel On_Key kDownArrow Send mMoveDown On_Key kUpArrow Send mMoveUp On_Key Key_Tab Send mMoveDown End_Object Object oScopesInfo_tb is a TextBox Set Auto_Size_State to False Set Size to 9 50 Set Location to 174 6 Set Label to "Scopes:" Set peAnchors to anBottomLeft End_Object Object oAddScope is a cRDCButtonDPI Set Size to 15 50 Set Location to 185 7 Set Label to "Add" Set psImage to "ActionAdd.ico" Set peAnchors to anBottomLeft Procedure OnClick Send mInsertLine to oScopes End_Procedure End_Object Object oRemoveScope is a cRDCButtonDPI Set Size to 15 50 Set Location to 185 60 Set Label to "Remove" Set psImage to "Remove.ico" Set peAnchors to anBottomLeft Procedure OnClick Send mRemoveLine to oScopes End_Procedure End_Object Object oLineControl2 is a LineControl Set Size to 164 3 Set Location to 36 190 Set Horizontal_State to False Set peAnchors to anTopBottom End_Object Object oKeywords is a cSCWsGrid Set Size to 137 112 Set Location to 35 195 Set Header_Label 0 to "Keyword" Set Status_Help Item 0 to "List of the available keywords" Set Line_Width to 1 0 Set Form_Width 0 to 101 Set GridLine_Mode to Grid_Visible_None Set peAnchors to anTopBottom Property String psSepCharacter "\n" Procedure mMoveUp Integer iItem String sValue Get Current_Item to iItem Get Value Item iItem to sValue If ((iItem=Item_Count(Self) -1) and sValue = "") Begin Send mRemoveLine End Else Begin Send Up End End_Procedure Procedure mMoveDown Integer iItem String sValue Get Current_Item to iItem Get Value Item iItem to sValue If (sValue <> "") Begin If (iItem=Item_Count(Self) -1) Begin Send Add_New_Line "" 0 End Send Down End End_Procedure Procedure OnChange Integer iItem Integer iKeywords Delegate Send NotifyChange Get Item_Count to iKeywords Set Label of oKeywordsInfo_tb to ("Keywords:" * String(iKeywords)) End_Procedure Procedure Add_New_Line String sKeyword Integer iColor Send Add_Item Msg_None sKeyword If (iColor) Begin Set ItemTextColor (Item_Count(Self) -1) to iColor End End_Procedure Procedure mInsertLine Send Add_New_Line "" clRed Send onChange 0 Send End_of_Data End_Procedure Procedure mRemoveLine Integer iRowBase If (Item_Count(Self) = 0) Begin Procedure_Return End Get Base_Row_Item (Current_Item(Self)) to iRowBase Send Delete_Item iRowBase Send OnChange 0 End_Procedure Function GetValue Integer iColumn Returns String Integer iC iColumns String sRet sSep Move (Low(Matrix_Size(Self))) to iColumns Get psSepCharacter to sSep If (sSep = "") Begin Move "\n" to sSep End For iC From 0 to (Item_Count(Self) -1) If (Value(Self, iC + iColumn) <> "") Begin If (sRet <> "") Begin Move (sRet + sSep) to sRet End Move (sRet + Value(Self, iC + iColumn)) to sRet End Move (iC + iColumns - 1) to iC Loop Function_Return sRet End_Function Procedure DoLoad tSCLanguage ByRef ltSCLanguage Integer iKeyword iKeywords Send Delete_Data Move (SortArray(ltSCLanguage.saKeywords)) to ltSCLanguage.saKeywords Move (SizeOfArray(ltSCLanguage.saKeywords)) to iKeywords For iKeyword From 0 to (iKeywords - 1) Send Add_New_Line ltSCLanguage.saKeywords[iKeyword] 0 Loop Set Label of oKeywordsInfo_tb to ("Keywords:" * String(iKeywords)) End_Procedure On_Key Key_F2 Send Request_SaveAllEntries On_Key kCancel Send Close_Panel On_Key kUpArrow Send mMoveUp On_Key kDownArrow Send mMoveDown On_Key Key_Tab Send mMoveDown End_Object Object oKeywordsInfo_tb is a TextBox Set Auto_Size_State to False Set Size to 9 50 Set Location to 174 195 Set Label to "Keywords:" Set peAnchors to anBottomLeft End_Object Object oAddKeyword is a cRDCButtonDPI Set Size to 15 50 Set Location to 185 195 Set Label to "Add" Set psImage to "ActionAdd.ico" Set peAnchors to anBottomLeft Procedure OnClick Send mInsertLine to oKeywords End_Procedure End_Object Object oRemoveKeyword is a cRDCButtonDPI Set Size to 15 50 Set Location to 185 248 Set Label to "Remove" Set psImage to "Remove.ico" Set peAnchors to anBottomLeft Procedure OnClick Send mRemoveLine to oKeywords End_Procedure End_Object Object oLineControl2 is a LineControl Set Size to 164 3 Set Location to 36 311 Set Horizontal_State to False Set peAnchors to anTopBottom End_Object Object oOperators is a cSCWsGrid Set Size to 137 107 Set Location to 35 316 Set Header_Label 0 to "Operator" Set Status_Help Item 0 to "List of the available operators" Set Line_Width to 1 0 Set Form_Width 0 to 96 Set GridLine_Mode to Grid_Visible_None Set peAnchors to anTopBottom Property String psSepCharacter "\n" Procedure mMoveUp Integer iItem String sValue Get Current_Item to iItem Get Value Item iItem to sValue If ((iItem = Item_Count(Self) -1) and sValue = "") Begin Send mRemoveLine End Else Begin Send Up End End_Procedure Procedure mMoveDown Integer iItem String sValue Get Current_Item to iItem Get Value Item iItem to sValue If (sValue <> "") Begin If (iItem = Item_Count(Self) -1) Begin Send Add_New_Line "" 0 End Send Down End End_Procedure Procedure OnChange Integer iItem Integer iOperators Delegate Send NotifyChange Get Item_Count to iOperators Set Label of oOperatorsInfo_tb to ("Operators:" * String(iOperators)) End_Procedure Procedure Add_New_Line String sOperator Integer iColor Send Add_Item Msg_None sOperator If (iColor) Begin Set ItemTextColor (Item_Count(Self) -1) to iColor End End_Procedure Procedure mInsertLine Send Add_New_Line "" clRed Send onChange 0 Send End_of_Data End_Procedure Procedure mRemoveLine Integer iRowBase If (Item_Count(Self) = 0) Begin Procedure_Return End Get Base_Row_Item (Current_Item(Self)) to iRowBase Send Delete_Item iRowBase Send OnChange 0 End_Procedure Function GetValue Integer iColumn Returns String Integer iC iColumns String sRet sSep Move (Low(Matrix_Size(Self))) to iColumns Get psSepCharacter to sSep If (sSep = "") Begin Move "\n" to sSep End For iC From 0 to (Item_Count(Self) -1) If (Value(Self, iC + iColumn) <> "") Begin If (sRet <> "") Begin Move (sRet + sSep) to sRet End Move (sRet + Value(Self, iC + iColumn)) to sRet End Move (iC + iColumns - 1) to iC Loop Function_Return sRet End_Function Procedure DoLoad tSCLanguage ByRef ltSCLanguage Integer iOperator iOperators Send Delete_Data Move (SortArray(ltSCLanguage.saOperators)) to ltSCLanguage.saOperators Move (SizeOfArray(ltSCLanguage.saOperators)) to iOperators For iOperator From 0 to (iOperators -1) Send Add_New_Line ltSCLanguage.saOperators[iOperator] 0 Loop Set Label of oOperatorsInfo_tb to ("Operators:" * String(iOperators)) End_Procedure On_Key key_F2 Send Request_SaveAllEntries On_Key kCancel Send Close_Panel On_Key kUpArrow Send mMoveUp On_Key kDownArrow Send mMoveDown On_Key Key_Tab Send mMoveDown End_Object Object oOperatorsInfo_tb is a TextBox Set Auto_Size_State to False Set Size to 9 50 Set Location to 174 316 Set Label to "Operators:" Set peAnchors to anBottomLeft End_Object Object oAddOperator is a cRDCButtonDPI Set Size to 15 50 Set Location to 185 316 Set Label to "Add" Set psImage to "ActionAdd.ico" Set peAnchors to anBottomLeft Procedure OnClick Send mInsertLine to oOperators End_Procedure End_Object Object oRemoveOperator is a cRDCButtonDPI Set Size to 15 50 Set Location to 185 369 Set Label to "Remove" Set psImage to "Remove.ico" Set peAnchors to anBottomLeft Procedure OnClick Send mRemoveLine to oOperators End_Procedure End_Object // Fill lists Procedure End_Construct_Object String sLanguage Integer iC Forward Send End_Construct_Object Move "VDF" to sLanguage Get FindLanguage of ghoEditorProperties sLanguage to iC If (iC >= 0) Begin Send LoadEntries iC End Else Begin Send ClearEntries End End_Procedure Procedure LoadEntries Integer iC tSCLanguage tSCLanguage Get psLanguages.dwStyle of ghoEditorProperties iC to tSCLanguage.iProcedural Get psLanguages.bIsCaseSensitive of ghoEditorProperties iC to tSCLanguage.iCaseSensitive Get psLanguages.szStringDelims of ghoEditorProperties iC to tSCLanguage.sStringDelimiter Get psLanguages.chEscape of ghoEditorProperties iC to tSCLanguage.sEscapeChar Get psLanguages.chTerminator of ghoEditorProperties iC to tSCLanguage.sLineTerminationChar Get psLanguages.szSingleLineComments of ghoEditorProperties iC to tSCLanguage.sLineComments Get psLanguages.szMultiLineComments1 of ghoEditorProperties iC to tSCLanguage.sMultiLineCommentStart Get psLanguages.szMultiLineComments2 of ghoEditorProperties iC to tSCLanguage.sMultiLineCommentStop Send LoadElementString (psLanguages.szScopeKeywords1(ghoEditorProperties,iC)) "\n" (&tSCLanguage.saScopeStart) Send LoadElementString (psLanguages.szScopeKeywords2(ghoEditorProperties,iC)) "\n" (&tSCLanguage.saScopeStop) Send LoadElementString (psLanguages.szKeywords(ghoEditorProperties,iC)) "\n" (&tSCLanguage.saKeywords) Send LoadElementString (psLanguages.szOperators(ghoEditorProperties,iC)) "\n" (&tSCLanguage.saOperators) Send LoadElementString (psLanguages.pszTagElementNames(ghoEditorProperties,iC)) "\n" (&tSCLanguage.saTags) Send LoadElementString (psLanguages.pszTagAttributeNames(ghoEditorProperties,iC)) "\n" (&tSCLanguage.saAttributes) Send LoadElementString (psLanguages.pszTagEntities(ghoEditorProperties,iC)) "\n" (&tSCLanguage.saEntities) Send DoLoad to oScopes (&tSCLanguage) Send DoLoad to oKeywords (&tSCLanguage) Send DoLoad to oOperators (&tSCLanguage) End_Procedure Procedure SaveEntries Integer iC String sName Move "VDF" to sName Get FindLanguage of ghoEditorProperties sName to iC If (iC < 0) Begin Get psLanguages.Count of ghoEditorProperties to iC End Set psLanguages of ghoEditorProperties Item iC to sName Set psLanguages.szScopeKeywords1 of ghoEditorProperties Item iC to (GetValue(oScopes(Self), 0)) Set psLanguages.szScopeKeywords2 of ghoEditorProperties Item iC to (GetValue(oScopes(Self), 1)) Set psLanguages.szKeywords of ghoEditorProperties Item iC to (GetValue(oKeywords(Self), 0)) Set psLanguages.szOperators of ghoEditorProperties Item iC to (GetValue(oOperators(Self), 0)) Send RegisterLanguage to ghoEditorProperties iC End_Procedure Procedure ClearEntries Send Delete_Data to oScopes Send Delete_Data to oKeywords Send Delete_Data to oOperators End_Procedure Procedure LoadElementString String sElement String sSeparator String[] ByRef saElements Integer iC iItem Handle hoParser Get Create (RefClass(cLineParser)) to hoParser Set psSepCharacter of hoParser to sSeparator Send ParseLine to hoParser sElement For iC From 0 to (Item_Count(hoParser) -1) Move (SizeOfArray(saElements)) to iItem Get Value of hoParser Item iC to saElements[iItem] Loop Send Destroy_Object to hoParser End_Procedure End_Object End_Object Object oKeyboardPage is a TabPage Set Label to "Keyboard" Set piImageIndex to 2 Object oHotKeysGroup is a cRDCHeaderGroup Set Size to 206 428 Set Location to 5 4 Set peAnchors to anAll Set psImage to "Keyboard.ico" Set Label to "Keyboard Key Assignments" Set psNote to "Assign keyboard shortcuts to commands" Property Integer piCurrentCommand 0 // command we can customize Object oCommands is a TreeView Set Size to 143 126 Set Location to 53 10 Set Label_Justification_Mode to JMode_Top Set Label_Col_Offset to 2 Set pbFullRowSelect to True Set piTextColor to clBlack Set pbExplorerStyle to True Property String psCurrentLanguage "" Set peAnchors to anTopBottom Procedure DoBuildList String sFilter Handle hItem Integer iItem Integer iCount tSciCommandHotKey[] ltCommands Set Dynamic_Update_State to False Send ClearAll Move (Trim(Uppercase(sFilter))) to sFilter Send SortByCommandName of oSciCommandHotKeys Get pCommands of oSciCommandHotKeys to ltCommands Move (SizeOfArray(ltCommands)) to iCount For iItem From 0 to (iCount-1) If ((sFilter="")or(Uppercase(ltCommands[iItem].sName) contains sFilter)) ; Get AddTreeItem ltCommands[iItem].sName 0 ltCommands[iItem].iCmd 0 0 to hItem Loop Set Dynamic_Update_State to True End_Procedure Procedure OnCreateTree Send DoBuildList "" End_Procedure Procedure OnItemChanged Handle hItem Handle hItemOld Integer iCmd Get ItemData hItem to iCmd Set piCurrentCommand to iCmd Send DisplayCommandDetails Send ClearKey of oNewKey End_Procedure On_Key Key_Up_Arrow Send Up On_Key Key_Down_Arrow Send Down End_Object Object oCurrentShortcut is a Form Set Size to 13 200 Set Location to 53 146 Set Label to "Current Shortcut:" Set Label_Justification_Mode to JMode_Top Set Label_Col_Offset to 0 Set Enabled_State to False Set Label_Row_Offset to 1 End_Object Object oNewKey is a Form Set Size to 13 200 Set Location to 91 146 Set Label to "New Key Assignment:" Set Label_Justification_Mode to JMode_Top Set Label_Col_Offset to 0 Set psToolTip to "Type your key assignment in this field" Set Label_Row_Offset to 1 Property tShortCut pNewShortCut Procedure Key Integer iKeyValue Returns Integer Integer iRetval String sShortCut Integer[] Keys tShortCut NewShortCut Move "" to sShortCut Get ReadKeyboardState of oSciCommandHotKeys to Keys Get KeysToString of oSciCommandHotKeys Keys to sShortCut Set Value of oNewShortcut to sShortCut Move iKeyValue to NewShortCut.iDFKey Move Keys to NewShortCut.VKcode Set pNewShortCut to NewShortCut Send DispatchAnyKey Procedure_Return iRetVal End_Procedure Procedure ClearKey tShortCut EmptyShortCut Set Value to "" Set Value of oNewShortCut to "" Set pNewShortCut to EmptyShortCut End_Procedure On_Key Key_F1 Send Default_Key On_Key Key_F4 Send Default_Key On_Key Key_F6 Send Default_Key On_Key Key_F10 Send Default_Key // <-- clear does not work but not forwarding msg_key helps :) On_Key Key_Shift+Key_F4 Send Default_Key On_Key Key_Shift+Key_F5 Send Default_Key On_Key Key_Shift+Key_F6 Send Default_Key On_Key Key_Shift+Key_F10 Send Default_Key On_Key Key_Ctrl+Key_F4 Send Default_Key On_Key Key_Ctrl+Key_F6 Send Default_Key On_Key Key_Alt+Key_F4 Send Default_Key On_Key Key_Alt+Key_F6 Send Default_Key On_Key Key_Alt+Key_C Send Default_Key On_Key Key_Alt+Key_O Send Default_Key On_Key kEnter Send Default_Key On_Key kNext_Item Send Default_Key On_Key kPrevious_Item Send Default_Key On_Key Key_Ctrl+Key_Tab Send Default_Key End_Object Object oNewShortcut is a Form Set Size to 13 200 Set Location to 120 146 Set Label to "New Shortcut:" Set Label_Justification_Mode to JMode_Top Set Label_Col_Offset to 0 Set Enabled_State to False Set Label_Row_Offset to 1 End_Object Object oAssign is a cRDCButtonDPI Set Location to 90 359 Set Label to "Assign" Set psImage to "Assign.ico" Procedure OnClick Integer iCmd tShortCut ShortCut Get piCurrentCommand to iCmd Get pNewShortCut of oNewKey to ShortCut If (iCmd<>0 and SizeOfArray(ShortCut.VKcode)>0) Begin Send AssignShortCutToCmd of oSciCommandHotKeys iCmd ShortCut Send DisplayCommandDetails Send Activate to oNewKey Delegate Send NotifyChange End End_Procedure End_Object Object oRemove is a cRDCButtonDPI Set Location to 107 359 Set Label to "Remove" Set psImage to "Remove.ico" Procedure OnClick Integer iCmd Get piCurrentCommand to iCmd If (iCmd<>0) Begin Send RemoveShortCutFromCmd of oSciCommandHotKeys iCmd Send DisplayCommandDetails Send Activate to oNewKey Delegate Send NotifyChange End End_Procedure End_Object Object oCommandHelpTb is a cTextEdit Set Size to 40 200 Set Location to 155 146 Set Enabled_State to False Set Label to "Description:" Set peAnchors to anTopBottom End_Object Object oSearch is a Form Set Size to 11 126 Set Location to 41 10 Set Label to "Command:" Set Label_Col_Offset to 0 Set Label_Row_Offset to 1 Set Label_Justification_Mode to JMode_Top Procedure OnChange String sValue Get Value to sValue Set Color to clWindow If (sValue <> "") Begin Set Color to (RGB(255,200,200)) End Send DoBuildList to oCommands sValue End_Procedure On_Key Key_Down_Arrow Send Activate to oCommands On_Key Key_Tab Send Activate to oCommands End_Object Procedure DisplayCommandDetails Boolean bHasHotKey Integer iCmd String sDescription String sShortCut tSciCommandHotKey Command Move "" to sDescription Send Delete_Data of oCommandHelpTb Set Value of oCurrentShortcut to "" Get piCurrentCommand to iCmd If (iCmd <> 0) Begin Get FindCommand of oSciCommandHotKeys iCmd to Command If (Command.iCmd = iCmd) Begin Send AppendTextLn of oCommandHelpTb Command.sDescription End Get CommandHasHotKey of oSciCommandHotKeys Command to bHasHotKey If (bHasHotKey) Begin Get CommandHotKeyString of oSciCommandHotKeys Command to sShortCut Set Value of oCurrentShortCut to sShortCut End End End_Procedure End_Object End_Object Object oOptionsPage is a TabPage Set Label to "Misc" Set piImageIndex to 3 Object oOptionsGrp is a cRDCHeaderGroup Set Size to 206 428 Set Location to 5 4 Set peAnchors to anAll Set Label to "Other Editor Settings" Set psNote to "Miscellaneous editor settings" Set psImage to "SettingsEditor.ico" Object oLineNumbers is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 37 28 Set Label to "Show line numbers" Set psToolTip to "Show line numbers in the leftmost column of the editor" End_Object Object oScopeMargin is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 48 28 Set Label to "Show scope blocks margin" Set psToolTip to "Show scope blocks margin in the editor" End_Object Object oIndent is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 59 28 Set Label to "Auto indent" Set psToolTip to "Apply auto indentation to inserted code" End_Object Object oGuides is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 70 28 Set Label to "Show indentation guides" Set psToolTip to "Connect indentations with vertical lines to easier see which indentations belongs together" End_Object Object oSelect is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 81 28 Set Label to "Highlight whole line on selection" Set psToolTip to "Highlight the whole line when selected" End_Object Object oTabs is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 93 28 Set Label to "Convert tabs to spaces" Set psToolTip to "Change tab character to spaces when indenting code" End_Object Object oAdjustCase is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 104 28 Set Label to "Adjust text case of typed keywords" Set psToolTip to "Automatically adjust the casing of key words as they are typed" End_Object Object oTrimEOLonSave is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 115 28 Set Label to "Trim EOL on save" Set psToolTip to "Remove and trailing line spaces when the file is saved" End_Object Object oBraces is a cSCNotifierCheckBox Set Size to 10 50 Set Location to 126 28 Set Label to "Show matching braces" Set psToolTip to "Highlight matching braces" End_Object Object oTabSize is a cNotifierSpinForm Set Size to 13 30 Set Location to 37 225 Set Status_Help to "Number of spaces to replace TAB character" Set psToolTip to "The number of spaces to use when indenting code" Set Label to "Tab size:" End_Object End_Object End_Object End_Object Procedure SaveEntries Integer iC String sHotKey String sColors String sFontFace String sFontStyles String sSchemaName Get psColors of ghoEditorProperties to sColors // Re-format to support Scintilla If (Length(sColors)=CM_COLORS_STRSIZE) ; Move (sColors + Repeat('0', SC_COLORS_STRSIZE-CM_COLORS_STRSIZE)) to sColors Get CurrentColors to sColors Get CurrentFontStyles to sFontStyles Get Value of oSchemaSelect to sSchemaName If (sSchemaName<>"") Begin If ((sSchemaName<>TH_DEFSCHEMA_BLACK_STR) and ; (sSchemaName<>TH_DEFSCHEMA_WHITE_STR) and ; (sSchemaName<>TH_DEFSCHEMA_BLUE_STR) and ; (sSchemaName<>TH_DEFSCHEMA_SERENE_STR) and ; (sSchemaName<>TH_DEFSCHEMA_SAHARA_STR) and ; (sSchemaName<>TH_DEFSCHEMA_LIME_STR)) Begin Get FindColorSchema of ghoEditorProperties sSchemaName to iC If (iC<0) Begin Get psColorSchemas.Count of ghoEditorProperties to iC End Set psColorSchemas of ghoEditorProperties Item iC to sSchemaName Set psColorSchemas.psSchemaColors of ghoEditorProperties Item iC to sColors Set psColorSchemas.psSchemaFontStyles of ghoEditorProperties Item iC to sFontStyles End Set psColorSchema of ghoEditorProperties to sSchemaName Set psColors of ghoEditorProperties to sColors Set psFontStyles of ghoEditorProperties to sFontStyles End // Font Get psEditorFont of oFontFace to sFontFace If (sFontFace = "") Begin Move "11pt; 0; Courier New" to sFontFace End Set psFontFace of ghoEditorProperties to sFontFace Set piLineNumbering of ghoEditorProperties to (Checked_State(oLineNumbers(Self))) Set pbLeftMargin of ghoEditorProperties to (Checked_State(oScopeMargin(Self))) Set piAutoIndentMode of ghoEditorProperties to (Checked_State(oIndent(Self))) Set pbShowMatchingBraces of ghoEditorProperties to (Checked_State(oBraces(Self))) Set pbShowIndentGuides of ghoEditorProperties to (Checked_State(oGuides(Self))) Set pbSelectWholeLine of ghoEditorProperties to (Checked_State(oSelect(Self))) Set pbTabExpand of ghoEditorProperties to (Checked_State(oTabs(Self))) Set piTabSize of ghoEditorProperties to (Value(oTabSize(Self),0)) Set pbNormalizeCase of ghoEditorProperties to (Checked_State(oAdjustCase(Self))) Set pbTrimEOLOnSave of ghoEditorProperties to (Checked_State(oTrimEOLonSave(Self))) Get ShortCutKeyDefinitions of oSciCommandHotKeys to sHotKey Set psEditorHotKeys of ghoEditorProperties to sHotKey End_Procedure Procedure LoadEntries String sFontFace Get psFontFace of ghoEditorProperties to sFontFace If (sFontFace="") Begin Move "11pt; 0; Courier New" to sFontFace End Set psEditorFont of oFontFace to sFontFace Set Value of oTabSize to (piTabSize(ghoEditorProperties)) Set Checked_State of oLineNumbers to (piLineNumbering(ghoEditorProperties)) Set Checked_State of oScopeMargin to (pbLeftMargin(ghoEditorProperties)) Set Checked_State of oIndent to (piAutoIndentMode(ghoEditorProperties)) Set Checked_State of oBraces to (pbShowMatchingBraces(ghoEditorProperties)) Set Checked_State of oGuides to (pbShowIndentGuides(ghoEditorProperties)) Set Checked_State of oSelect to (pbSelectWholeLine(ghoEditorProperties)) Set Checked_State of oTabs to (pbTabExpand(ghoEditorProperties)) Set Checked_State of oAdjustCase to (pbNormalizeCase(ghoEditorProperties)) Set Checked_State of oTrimEOLonSave to (pbTrimEOLOnSave(ghoEditorProperties)) End_Procedure Procedure NotifyChange Set Enabled_State of oSave to True End_Procedure Procedure Request_SaveAllEntries If (Enabled_State(oSave(Self))) Begin Send SaveAllEntries End End_Procedure Procedure ApplyToEditor Handle hClientArea hView Get Client_Id to hClientArea Get Next_Mdi_Dialog of hClientArea True to hView // find first view While (hView <> 0) If (Active_State(hView)) Begin // create the action Broadcast Send SetAdjustments to hView Broadcast Send ApplyEditorOptions to hView Broadcast Send OnPropsChange to hView End Get Next_Mdi_Dialog of hClientArea False to hView // find next Loop End_Procedure Procedure SaveAllEntries Send SaveEntries of oFontsPage Send SaveEntries of oOptionsPage Send SaveEntries of oLanguageGroup Send SaveEntries of oKeyboardPage Send SaveEntries Send SaveIni to ghoEditorProperties If (Focus(Desktop) = oSave(Self)) Begin Send Activate to oClose End Send ApplyToEditor Set Enabled_State of oSave to False End_Procedure Object oSave is a cRDCButtonDPI Set Label to "Save" Set Location to 236 340 Set peAnchors to anBottomRight Set Enabled_State to False Set psImage to "ActionSaveRecord.ico" Procedure OnClick Send SaveAllEntries End_Procedure End_Object Object oClose is a cRDCButtonDPI Set Label to "Close" Set Location to 236 393 Set peAnchors to anBottomRight Procedure OnClick Send Close_Panel End_Procedure End_Object Procedure Popup Send LoadEntries Set Enabled_State of oSave to False Forward Send Popup End_Procedure On_Key Key_Alt+Key_O Send KeyAction of oSave On_Key Key_Alt+Key_C Send KeyAction of oClose On_Key Key_Escape Send KeyAction of oClose End_Object