3#include "GUIPaneBase.h"
4#include "GUIEditBase.h"
5#include "DefinitionsGUI.h"
6#include "GUISearchBar.h"
7#include "ISearchTarget.h"
14 class CInternalGUIPaneCode;
16 class CCodeRichEditCtrl :
public CRichEditCtrl,
public Base::CFLBase
20 CCodeRichEditCtrl() noexcept;
21 virtual ~CCodeRichEditCtrl();
24 bool IsVScrollVisible() const;
26 DeclareGetClassType();
29 void Append(int32_t& i32Index, Base::CFLString<
wchar_t>& flsText, COLORREF clrText);
30 void EnableAutoScroll(
bool bEnable);
34 afx_msg
void OnContextMenu(CWnd* pWnd, CPoint point);
35 afx_msg
void OnDestroy();
36 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
42 CGUIPaneCode* m_pParentPane;
45 friend class CGUIPaneCode;
48 class FL_EXPORT CGUIPaneCode : public CGUIPaneBase, public ISearchTarget
50 friend class CCodeRichEditCtrl;
52 CGUIPaneCode() noexcept;
53 CGUIPaneCode(const CGUIPaneCode& rh);
54 virtual ~CGUIPaneCode()noexcept;
59 const CResult BeginBlock(const Base::
CFLBase* pObj, Base::CFLString<
wchar_t> flsInstanceName, Base::CFLString<
wchar_t> flsDesc = L
"");
60 const CResult BeginBlock(Base::CFLString<
wchar_t> flsBlockName, Base::CFLString<
wchar_t> flsDesc = L
"");
61 const CResult EndBlock();
64 const CResult AddMultiVar(const Base::CMultiVar<T>* pFlmv, Base::CFLString<
wchar_t> flsVariableName);
65 const CResult AddImage(const Base::CFLImage* pImage, Base::CFLString<
wchar_t> flsVariableName);
66 const CResult AddFigure(const Foundation::CFLFigure* pFigure, Base::CFLString<
wchar_t> flsVariableName);
67 const CResult AddFunction(Base::CFLString<
wchar_t> flsFunctionName, Base::CFLString<
wchar_t> flsCppArgs = L
"", Base::CFLString<
wchar_t> flsCSharpArgs = L
"", Base::CFLString<
wchar_t> flsPythonArgs = L
"", Base::CFLArray<Base::CFLString<
wchar_t>> flaScopeName = Base::CFLArray<Base::CFLString<
wchar_t>>());
69 const CResult AddFunctionWithObjectName(Base::CFLString<
wchar_t> flsObjectName, Base::CFLString<
wchar_t> flsFunctionName, Base::CFLString<
wchar_t> flsCppArgs = L
"", Base::CFLString<
wchar_t> flsCSharpArgs = L
"", Base::CFLString<
wchar_t> flsPythonArgs = L
"", Base::CFLArray<Base::CFLString<
wchar_t>> flaScopeName = Base::CFLArray<Base::CFLString<
wchar_t>>());
72 const CResult Write(
ECodeType eCodeType, Base::CFLString<
wchar_t> flsCode);
73 const CResult Append(
ECodeType eCodeType, Base::CFLString<
wchar_t> flsCode);
74 const CResult AppendCodeBlock(
ECodeType eCodeType, Base::CFLString<
wchar_t> flsBlockName, Base::CFLString<
wchar_t> flsDesc, Base::CFLString<
wchar_t> flsCode);
76 void SetIndentCount(int32_t i32IndentCount);
77 int32_t GetIndentCount();
78 CCodeRichEditCtrl* GetActivateCategoryCode() const;
80 void InternalUpdateWindow();
82 DeclareGetClassType();
89 const CResult InternalWrite(
ECodeType eCodeType, Base::CFLString<
wchar_t> flsCode,
bool bAppend);
90 const CResult InternalAppendCodeBlock(
ECodeType eCodeType, Base::CFLString<
wchar_t> flsBlockName, Base::CFLString<
wchar_t> flsDesc, Base::CFLString<
wchar_t> flsCode);
92 virtual
bool SwitchTabs(
bool bForwardDirection)override;
95 virtual BOOL PreTranslateMessage(MSG* pMsg);
96 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
99 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
100 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
103 afx_msg
void OnDestroy();
104 afx_msg
void OnClose();
105 afx_msg
void OnShowWindow(BOOL bShow, UINT nStatus);
108 Base::CFLString<
wchar_t> AsciiToUnicode(const
char* pszString) const;
110 void ShowSearchBar();
112 virtual CWnd* GetWnd() override;
113 virtual CString GetAllText() override;
114 virtual
long FindNext(const CString& strText,
long nStartPos, DWORD dwFlags, CHARRANGE& outRange) override;
115 virtual
void SetSelectionRange(
long nMin,
long nMax) override;
116 virtual
void GetSelectionRange(
long& nMin,
long& nMax) override;
117 virtual
void HighlightRange(
long nMin,
long nMax, COLORREF crBack) override;
118 virtual
void ClearAllHighlight() override;
119 virtual
void GetSel(CHARRANGE& cr) const override;
120 virtual
void SetSel(CHARRANGE& cr) override;
121 virtual
void SetSel(
long nStartChar,
long nEndChar) override;
122 virtual BOOL SetSelectionCharFormat(CHARFORMAT& cf) override;
123 virtual BOOL SetSelectionCharFormat(CHARFORMAT2& cf) override;
124 virtual
void HideSelection(BOOL bHide, BOOL bPerm) override;
125 virtual
long FindText(DWORD dwFlags, FINDTEXTEX* pFindText) const override;
129 CInternalGUIPaneCode* m_pInternal;
131 CMFCTabCtrl m_wndTabs;
133 CGUISearchBar m_searchBar;
134 friend class CInternalManagerPane;
136 afx_msg BOOL OnMouseWheel(UINT nFlags,
short zDelta, CPoint pt);
137 LRESULT OnChangeActiveTab(WPARAM wp, LPARAM lp);
virtual void OnReceiveBroadcast(const CBroadcastMessage *pMessage)
Callback function. A function that receives a BroadcastMessage.
CFLBase()
Default constructor.
Definition D2DObject.h:12
ECodeType
Code type.
Definition FLImagingGUI/DefinitionsGUI.h:13190
@ ECodeType_Count
Number of code types.
Definition FLImagingGUI/DefinitionsGUI.h:13229