WSF
InputContext.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef INPUTCONTEXT_HPP
13#define INPUTCONTEXT_HPP
14
15#include "UtTextDocument.hpp"
16class WsfParseNode;
17
18namespace wizard
19{
20class Editor;
21
24{
25public:
26 struct Context
27 {
29 UtTextDocumentRange mQueryTextRange;
30 };
31 static void ContextFromCursor(Editor* aEditControlPtr, size_t aCursorLine, size_t aCursorColumn, Context& aContext);
32
33 static void GetContext(Editor* aEditControlPtr, const UtTextDocumentRange& aPosition, Context& aContext);
34
35 static void GetInputContext(Editor* aEditControlPtr, WsfParseNode* aPreviousNode, size_t aInputPosition, UtTextRange& aRange);
36
37 static WsfParseNode* FindBlockNode(WsfParseNode* aNodePtr);
38 static bool CommandExtent(WsfParseNode* aNodePtr, WsfParseNode*& aCommandNodePtr);
39 static bool CommandHasError(WsfParseNode* aCommandNodePtr);
40};
41} // namespace wizard
42#endif
Definition WsfParseNode.hpp:61
Definition Editor.hpp:57
InputContext contains functions that compute the 'context' from a position in the input file.
Definition InputContext.hpp:24
static bool CommandExtent(WsfParseNode *aNodePtr, WsfParseNode *&aCommandNodePtr)
Definition InputContext.cpp:224
static void GetContext(Editor *aEditControlPtr, const UtTextDocumentRange &aPosition, Context &aContext)
Definition InputContext.cpp:35
static WsfParseNode * FindBlockNode(WsfParseNode *aNodePtr)
Definition InputContext.cpp:209
static bool CommandHasError(WsfParseNode *aCommandNodePtr)
Definition InputContext.cpp:253
static void GetInputContext(Editor *aEditControlPtr, WsfParseNode *aPreviousNode, size_t aInputPosition, UtTextRange &aRange)
Definition InputContext.cpp:166
static void ContextFromCursor(Editor *aEditControlPtr, size_t aCursorLine, size_t aCursorColumn, Context &aContext)
Definition InputContext.cpp:20
Definition Runner.hpp:22
Definition InputContext.hpp:27
WsfParseNode * mBlockNodePtr
Definition InputContext.hpp:28
UtTextDocumentRange mQueryTextRange
Definition InputContext.hpp:29
Copyrights Multiple, All Rights Reserved