Public Methods

  Previous topic Next topic  

hbIDE is scheduled to implement some methods which may be called from user-defined macros inside the editing instances through shortcuts or menu options. Soon this protocol will be in the SVN. To keep myself and upto-date of what "should be" and "has been" implemented, here is the list of such methods which I think should make-up the bunch.

 

Please note that these methods are along the lines of xMate and initial list below includes all methods contained in xMate v1.15.

 

Method

Status

Current

Description

Links

::AlignOperator()



Aligns the assignment operators within the top and the bottom of the current selection. Column selection provides for special features.

"OperAlign.txt"

::AppendScratchPad()

 



Opens the buffer nomination dialog, and appends the currently selected text to the nominated scratch pad buffer


::AutoComplete()



Auto-completes the initiated key.

"complete.txt"

::Backup()



Creates the backup file See the editor configuration for backup file extension options.


::BeginUndo()



Starts buffering the operations that follow, into a single undo step. Also see the EndUndo() method.


::Build([<lRebuild>])



Saves all updated files and builds ( makes ) the application. The optional <lRebuild> flag will cause the complete rebuild of the project.


::BuildAndRun([<lRebuild>])



Saves all updated files and builds ( makes ) the application. The application is launched, if the build as successful. The optional <lRebuild> flag will cause the complete rebuild of the project.


::ClearUndo()



Clears the Undo buffers.


::CloseAll()



Closes all files and exits the editor window.


::CloseCurrent()



Closes the current file.


::CodeSkeletonsDlg()



Displays the code skeletons selection dialog.


::Collapse()



Places the editor into function summary mode.


::Comment(<lComment>)



Adds, or removes comment indicator "//" from the beginning of the selected lines of text.


::CompileCurrent()



Compiles the current file.


::CompileToPPO()



Creates the PPO output from the current file, if applicable.


::Copy()



Copies selected text into the Windows clipboard


::Cut()



Deletes the selected text, and places it in the Windows clipboard.


::DelLine( [<n>] )



Deletes line <n>. The default line is the current line.

NOTE that the complete macro for deleting a line should read:

::DelLine(::line), IF(::Line > ::Lines, ::Up(), NIL), .F.


::DelRest()



Deletes the reminder of the line.


::DelScratchPad()



Opens the buffer nomination dialog, and deletes the nominated scratch pad buffer


::DelText()



Deletes the selected text.


::DelWordRest([<cOperators>])



Deletes characters till the end of the word. Distinguishes [<cOperators>] from the regular alphanumerical characters, as separate words. The default <cOperators> are: '<>,.?/';:\|{}[]=-+()&&*%^#$!@~`" .


::Down( [<n>] )



Attempts to move down <n> lines ( default 1 ).


::DupLine()



Duplicates the current line, by inserting it directly below the current line.


::End()



Places the caret at the end of the current line.


::EndUndo()



Submits the editing steps for examination to the undo engine, to create a single undo step. Also see the BeginUndo() method.


::Expand()



Clears summary mode, and places the caret at the beginning of the currently highlighted function.


::FindDlg([<lUseWordUnderCursor>],[<lAutoMode>], [<lListOnly>])



Displays the search and replace dialog. The optional parameters are:

 lUseWordUnderCursor - set to TRUE to paste the word under cursor (default)

 lAutoMode - set to TRUE to let the dialog set the search mode automatically (default)

 lListOnly - set to TRUE to turn on the result listing.


::FindMatch()



Finds the matching bracket to the one at the current caret position.


::FindNext()



Atempts to continue the most recent search.


::FindText( <cFind>, [<lMatchCase>], [<lDown>], [<lFromTop>], [<lListOnly>] )



Finds the specified text, uses either the supplied parameters, or the last used method of searching.


::FormatSource( <lInteractive> )



Formats the layout of current source code (only for PRG files). <lInteractive> flag will cause the basic setup and confirmation dialog to be displayed prior to the formatting process.


::FuncInfoDlg()



Displays the project function list dialog.


::GetBookmark( [<nPos>] )



Retrieves and jumps to the bookmark <nPos>, where <nPos> is 1-9. Any other value, eg. 0, or no value at all, means to jumps to the most recently edited spot. (see changes.txt for more details.)


::GetLine([<nLine>])



Returns text on line <nLine>, nLine defaults to the current line. If the <nLine> is not within the valid range, an empty string is returned.


::GetScratchPad()



Opens the buffer nomination dialog, and replaces the  currently selected text with the contents of the nominated scratch pad bufferIf not text is selected, the contents of the buffer is inserted at the curent cursor location.


::GetText()



Returns the currently selected text.


::GetTextLen()



Returns the length of the entire file in bytes.


::GetWord( [<lHilite>] )



Returns the word at current caret position ( optionally highlighting it ).


::GlobalSearchDlg()



Displays the Global search dialog.


::GoBottom()



Places the caret at the last character in the file and scrolls it into view, if necessary.


::GoToCol( <n> )



Attempts to place the caret on column <n>.


::GoToFunc()



Searches the list of project functions for the current word under cursor, and if found unique, jumps directly to that function, or displays a list of functions to choose from.


::GoToLine( <n>, [<lKeepRow>] )



Attempts to place the caret on line <n>. Optionally will attempt to stay on the current row,if <lKeepRow> is set to .T. (default .F.).


::GoToLineDlg()



Displays the GoTo Line dialog.


::GotoMark()



Go to the temporary mark (if any).


::GoTop()



Places the caret on the first column of the first line and scrolls it into view, if necessary.


::Home( [<lUnconditional>] )



Places the caret at the beginning of the line.


::InsertProlog()



Insert the prolog text at the top of the file (if the applicable prolog template file exists in the current profile folder).


::InsLine( <n>, [<cText>] )



Inserts line <n>, and optionally sets <cText> text on the new line.


::InvertCase()



Inverts the case of the selected text.


::isSelectionVisible()



Return .T. if at least part of the selection is displayed, otherwise it returns .F., if the selection is scrolled off screen.


::JumpToFuncList()



Set focus on the module function listbox. (only effective if the module function list is being displayed.)


::Left( [<n>] )



Attempts to move left <n> characters ( default 1 ).


::MoveText( [<nCols>] )



Obsolete method. See ::OffsetText().


::NextEdit()



Selects the next loaded file buffer.


::NextFunc()



Jump to the next function (source code entity)


::NextWord( [<cMask>], [<lDumb>] )



Places the cursor at the beginning of the next word found.

<cMask> is the strings of characters to skip at the beginning of the language element, (default is ' ')

example: ::NextWord(" .^|(!")

<lDumbSeek> if TRUE, will cause this method to disregard string and comment boundaries, default: FALSE.


::OffsetText( [<nCols>] )



Offsets the starting column of all the lines of the selected text to the left or to the right by <nCols> columns.(The default is ::TabSize.) Positive <nCols> value moves the selection to the right, and the negative one to the left.The selection columns are ignored and the entire lines are offset. If the selection is not present, the current line is processed.


::OpenFile([<lNew|cFileName>])



Either opens a specific file, if the parameter is a string, or it opens a list of editable project files for selection to add to the editor. Same as clicking on the "Open" toolbar button in the editor.

The optional parameter <lNew> (default FALSE) requests a new file to be opened or created.

If the parameter is a string, ie. <cFileName>, it may contain or consists of xMate variables.


::OpenHeader()



Opens the header selection interface dialog


::PageBottom()



Places the caret on the bottom of the current page


::PageDown()



Moves down one page.


::PageTop()



Places the caret on top of the page.


::PageUp()



Moves up 1 page.


::PanLeft( <n> )



Attempts to pan the display left by <n> columns.


::PanRight( <n> )



Attempts to pan the display to the right by <n> columns.


::Paste()



Replaces the selected text with the text in the Windows clipboard, if present.


::PrevEdit()



Select the previous loaded file buffer.


::PrevFunc()



Jump to the previous function (source code entity)


::PrevWord( cMask, lDumb )



Places the cursor at the beginning of the previous word found.

<cMask> is the strings of characters to skip at the beginning of the language element, (default is ' ')

example: ::PrevWord(" .^|(!")

<lDumbSeek> if TRUE, will cause this method to disregard string and comment boundaries, default: FALSE.


::PutText( <cText>, <nLine>, <nCol> )



High level wrapper for inserting text, and setting relative caret position. The relative caret position is calculated from the beginning of the inserted text.


::ReDo()



Retraces the undo operations See the editor configuration for undo setup options.


::RefreshAll()



Repaints the entire page.


::RefreshCurrent()



Repaints the current line.


::RefreshFuncList()



Updates the contents of the module function list.


::ReplaceText( cFind, lMatchCase, lDown, cRepl, lGlobal, lNoPrompt )



Replaces the specified text, uses either the supplied parameters, or the last used method of searching.


::ResetScratchPads()



Clears and removes all scratch pad buffers, including the persistent buffers (1-9)


::RestoreFromBackup()



Overwrite the current edit buffer with the most recent backup of the current file.


::Right( [<n>] )



Attempts to move right n characters ( default 1 ).


::SaveCurrent()



Saves the current file.


::SaveFile( [<lClearUndo>] )



Saves the current file, and optionally clears the UNDO buffers.


::ScrollDown( <n> )



Attempts to scroll the display down by <n> lines.


::ScrollUp( <n> )



Attempts to scroll the display up by <n> lines.


::SelectAll()



Select all text in the current buffer.


::SelectionGetLen()



Returns the length of the current selection in bytes.


::SelectionOff()



Clears the current selection, if any.


::SelectionOn( <nLeft>, <nTop>, [<nRight>], [<nBottom>] )



Attempts to set selection at supplied coordinates.


::SelEdit( <n> )



Selects the <n>th file buffer loaded into the editor.


::SetBookmark( [<nPos>] )



Sets the bookmark <nPos> to the current line, where <nPos> is 1-9. Any other value, or no value at all, means to auto add a bookmark in the first available slot. (see changes.txt for more details.)


::SetBottomLine( <nLine> )



Attempts to set the last visible line in the editor window, (<nLine> must be supplied).


::SetLeftCol( <nColumn> )



Sets the first visible column in the editor window, ( <nColumn> must be min. 1 ).


::SetLine( <nLine>, <cText> )



Replaces the text on line <nLine> with <cText>


::SetMark([<lSet>])



Set or remove the temporary mark on the text line. If the <lSet> parameter is omitted, the mark is toggled. Otherwise the <lSet> flag instructs the method to either set or remove the mark. Note that the temporary mark is independent from the Bookmarks.


::SetMilestone()



Create a time stamped milestone of the current edit buffer.


::SetScratchPad()



Opens the buffer nomination dialog, and sets the currently selected text in the nominated scratch pad buffer


::SetSelectionMode( <lByColumn>, [<lFullLine>] )



Sets the selection mode preference.


::SetText( <cText> )



Replaces the current selection with the supplied text.


::SetTopLine( <nLine> )



Sets the first visible line in the editor window, ( <nLine> must be min. 1 ).


::ShowFeedbackPanel([<lShow>])



Shows or hides the editor feedback panel. If the parameter is omitted, the panel visibility is toggled


::ShowHelp()



Displays the list of user defined macros.


::Skeletons()



Opens the code skeletons dialog.


::SpellHelp()



Finds and displays names of all accessible functions, methods and variables, which start with the word under cursor, eg. type str| and invoke this macro, all names starting with "str" will be displayed for selection.


::ToLower()



Sets the selected text into lower case.


::ToTitle( [<cMask>] )



Capitalizes each word in the selected text. <cMask> is the string of characters to identify the beginning of the new word. (the default is ' ').


::ToUpper()



Sets the selected text into upper case.


::UnDelLine()



Inserts the last deleted line at current position.


::Undo()



Reverts the previous editing by one undo step. See the editor configuration for undo setup options.


::UnJump()



Return to the file and to the line in that file, from which the most recent jump to a function, to a search result, or an explicit move to a specified line was requested.


::Up( [<n>] )



Attempts to move up <n> lines, ( default 1 ).







hbIDE Defined Methods


::execTool( ... )



Executes an entry in the "Tools and Utilities" collection as

::execTool( cName )

or can be used directly ( without entry in the Tools menu ) as

::execTool( cCmd, cParams, cStartIn, lCapture, lOpenOutputConsole )







Page url: http://hbide.vouch.info/?public_methods.htm