Form to edit SML scripts and queries. More...
#include <mgui/editsml.h>

Form to edit SML scripts and queries.
| MGUI::FORM_EDIT_SML::FORM_EDIT_SML | ( | ) |
Default constructor, initializes only.
| virtual MGUI::FORM_EDIT_SML::~FORM_EDIT_SML | ( | ) | [virtual] |
Destructor.
| void MGUI::FORM_EDIT_SML::AttachStatusBar | ( | CTRL_STATUSBAR & | StatusBar | ) |
Attach statusbar for reporting messages.
| StatusBar | Status bar to attach, must exist for life of form |
| bool MGUI::FORM_EDIT_SML::CheckSyntax | ( | bool | bShowError = true |
) |
Check to see if the syntax of the current query is valid.
Returns true if valid, false if not.
| bShowError | If syntax invalid, display error if true |
| void MGUI::FORM_EDIT_SML::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| SML::USAGE | usage, | |||
| int | width = 30, |
|||
| int | height = 10, |
|||
| FLAGS | flags = FLAG_Default, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_Expand | |||
| ) |
Create the form.
| width | Width of editor part of form in 'em' characters | |
| height | Height of editor part of form in characters |
| const MISTRING& MGUI::FORM_EDIT_SML::GetDisplayString | ( | ) |
| MGUI::CTRL_EDIT_TEXT& MGUI::FORM_EDIT_SML::GetEditText | ( | ) |
Get CTRL_EDIT_TEXT of the editor.
| const MISTRING MGUI::FORM_EDIT_SML::GetScript | ( | ) |
Get the current script string.
| const RVC::OBJITEM& MGUI::FORM_EDIT_SML::GetScriptObjItem | ( | ) | const |
Get the OBJITEM of the script.
Note that if the script came from a .sml or .qry file, the objitem will return true from IsFileOnly(). If it returns false from IsAssigned() then the script has not been saved or was not loaded from a file or object.
| MGUI::LAYOUT_PANE& MGUI::FORM_EDIT_SML::GetToolBarPane | ( | ) |
Get toolbar pane, usually to add additional buttons.
| bool MGUI::FORM_EDIT_SML::HasChanged | ( | ) | const |
Returns true if the query has changed since it was last set.
| bool MGUI::FORM_EDIT_SML::IsEncrypted | ( | ) | const |
Determine if encrypted.
| ERRVALUE MGUI::FORM_EDIT_SML::LoadScript | ( | const FILEPATH & | filepath, | |
| CHAR_ENCODING | Encoding = CHAR_ENCODING_UTF8 | |||
| ) |
Load a script from a given file.
| ERRVALUE MGUI::FORM_EDIT_SML::LoadScript | ( | const RVC::OBJITEM & | ObjItem | ) |
Load a script from a given object.
| void MGUI::FORM_EDIT_SML::Run | ( | ) |
Run script.
| ERRVALUE MGUI::FORM_EDIT_SML::SaveScript | ( | const FILEPATH & | filepath, | |
| CHAR_ENCODING | Encoding = CHAR_ENCODING_UTF8 | |||
| ) |
Save the script to a given file.
| ERRVALUE MGUI::FORM_EDIT_SML::SaveScript | ( | const RVC::OBJITEM & | ObjItem | ) |
Save the script to a given object.
| void MGUI::FORM_EDIT_SML::SetContext | ( | SML::CONTEXT * | context, | |
| int | segment = 0, |
|||
| UINT32 | flags = 0 | |||
| ) |
Set the SML::CONTEXT for this editor.
The following QFLAGs are implemented (defined in sml.h) QFLAG_FileExtnSML Make Open/Save/Save As buttons expect .sml files by default (normally expects .qry)
| flags | QFLAG_ constants from sml.h (QFLAG_FileExtnSML) |
| void MGUI::FORM_EDIT_SML::SetDelegateOnChange | ( | DELEGATE_VOID_NOPARMS | OnChange | ) | [inline] |
Set a delegate to call when the script is modified.
| void MGUI::FORM_EDIT_SML::SetDelegateOnFileChanged | ( | DELEGATE_VOID_NOPARMS | OnFileChange | ) | [inline] |
Set a delegate to call when the script is loaded or saved.
| void MGUI::FORM_EDIT_SML::SetDelegateOnStatus | ( | DELEGATE_VOID_MISTRING | OnStatus | ) | [inline] |
Set a delegate to call to update a status line.
| void MGUI::FORM_EDIT_SML::SetScript | ( | const MISTRING & | script | ) |
Set the script string.
| void MGUI::FORM_EDIT_SML::SetSyntaxHighlighting | ( | bool | bValue | ) |
Set whether or not to use syntax highlighting (default) Syntax highlighting is enabled by default.
| void MGUI::FORM_EDIT_SML::SetUsage | ( | SML::USAGE | usage | ) |
Set the SML::USAGE for the script being edited.
1.6.1