AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
ScriptIDE.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17
18#pragma once
19#ifndef AGXPYTHON_SCRIPTIDE_H
20#define AGXPYTHON_SCRIPTIDE_H 1
21
22#include <agx/config/AGX_USE_PYTHON.h>
23
24#if AGX_USE_PYTHON()
25
26#include <agxPython/export.h>
29
30#include <agx/Referenced.h>
31#include <agx/Name.h>
32
33namespace agxPython
34{
35
37 class AGXPYTHON_EXPORT ScriptIDE : public agx::Referenced
38 {
39
40 public:
41
42 friend class ScriptManager;
43
44 void updateSourceCode(const agx::String& sourceCode);
45 void queryAutoComplete(const agx::String& sourceCode, int caretLine, int caretColumn, bool readOnly, bool scopeChange);
46
47 void setAutocomplete(ScriptIDEAutocomplete* autocomplete);
48
49 ScriptIDEAutocomplete* getAutocomplete() const;
50
51 void setInterpreter(ScriptIDEInterpreter* interpreter);
52
53 ScriptIDEInterpreter* getInterpreter() const;
54
55 const agx::Name& getIdentifyingName() const;
56
57 const agx::String& getSourceCode() const;
58
59 int getCaretX() const;
60
61 int getCaretY() const;
62
63 protected:
64 ScriptIDE(const agx::Name& identifyingName);
65
66 virtual ~ScriptIDE();
67
68 private:
69
70 agx::Name m_identifyingName;
71
72 agx::String m_sourceCode;
73
74 std::pair<int, int> m_caret;
75
77
79
80 };
81
82}
83
84#endif
85
86#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXPYTHON_EXPORT
Representation of a name string.
Definition Name.h:33
Base class providing referencing counted objects.
Definition Referenced.h:120
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30