FLImaging 6.5.8.1
GUIPaneCode.h
1#pragma once
2
3#include "GUIPaneBase.h"
4#include "GUIEditBase.h"
5#include "GUIDefinitions.h"
6
7
8namespace FLImaging
9{
10 namespace GUI
11 {
12 class CGUIPaneCode;
13 class CInternalGUIPaneCode;
14
15 class CCodeRichEditCtrl : public CRichEditCtrl, Base::CFLBase
16 {
17 // 생성입니다.
18 public:
19 CCodeRichEditCtrl() noexcept;
20 virtual ~CCodeRichEditCtrl();
21
22 void OnCopy();
23
24 DeclareGetClassType();
25
26 protected:
27 void Append(int32_t& i32Index, Base::CFLString<wchar_t>& flsText, COLORREF clrText);
28
29 void EnableAutoScroll(bool bEnable);
30
31 public:
32 DECLARE_MESSAGE_MAP()
33 afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
34 afx_msg void OnDestroy();
35 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
36
37 int32_t m_i32End;
38
39 protected:
40 ECodeType m_eCodeType;
41 CGUIPaneCode* m_pParentPane;
42 CHARFORMAT m_cf;
43
44 friend class CGUIPaneCode;
45 };
46
47 class FL_EXPORT CGUIPaneCode : public CGUIPaneBase
48 {
49 friend class CCodeRichEditCtrl;
50 public:
51 CGUIPaneCode() noexcept;
52 CGUIPaneCode(const CGUIPaneCode& rh);
53 virtual ~CGUIPaneCode()noexcept;
54
55 void UpdateTheme();
56 void UpdateFont();
57
58 const CResult BeginBlock(const Base::CFLBase* pObj, Base::CFLString<wchar_t> flsInstanceName, Base::CFLString<wchar_t> flsDesc = L"");
59 const CResult BeginBlock(Base::CFLString<wchar_t> flsBlockName, Base::CFLString<wchar_t> flsDesc = L"");
60 const CResult EndBlock();
61
62 const CResult AddImage(const Base::CFLImage* pImage, Base::CFLString<wchar_t> flsVariableName);
63 const CResult AddFigure(const Foundation::CFLFigure* pFigure, Base::CFLString<wchar_t> flsVariableName);
64 const CResult AddFunction(Base::CFLString<wchar_t> flsFunctionName, Base::CFLString<wchar_t> flsCppArgs = L"", Base::CFLString<wchar_t> flsCSharpArgs = L"", Base::CFLArray<Base::CFLString<wchar_t>> flaScopeName = Base::CFLArray<Base::CFLString<wchar_t>>());
65
66 const CResult Clear(ECodeType eCodeType);
67 const CResult Write(ECodeType eCodeType, Base::CFLString<wchar_t> flsCode);
68 const CResult Append(ECodeType eCodeType, Base::CFLString<wchar_t> flsCode);
69 const CResult AppendCodeBlock(ECodeType eCodeType, Base::CFLString<wchar_t> flsBlockName, Base::CFLString<wchar_t> flsCode);
70
71 void SetIndentCount(int32_t i32IndentCount);
72 int32_t GetIndentCount();
73
74 void InternalUpdateWindow();
75
76 DeclareGetClassType();
77
78 protected:
79 virtual void OnReceiveBroadcast(const Base::CBroadcastMessage* pMessage) override;
80
81 void DefaultSet(ECodeType eCodeType);
82
83 const CResult InternalWrite(ECodeType eCodeType, Base::CFLString<wchar_t> flsCode, bool bAppend);
84
85 virtual bool SwitchTabs(bool bForwardDirection)override;
86
87 protected:
88 virtual BOOL PreTranslateMessage(MSG* pMsg);
89 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
90
91 DECLARE_MESSAGE_MAP()
92 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
93 afx_msg void OnSize(UINT nType, int cx, int cy);
94
95 public:
96 afx_msg void OnDestroy();
97 afx_msg void OnClose();
98 afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
99
100 protected:
101 Base::CFLString<wchar_t> AsciiToUnicode(const char* pszString) const;
102
103 protected:
104 CInternalGUIPaneCode* m_pInternal;
105
106 CMFCTabCtrl m_wndTabs;
107 CCodeRichEditCtrl m_wndCode[2];
108 friend class CInternalManagerPane;
109 public:
110 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
111 };
112 }
113}
114
virtual void OnReceiveBroadcast(const CBroadcastMessage *pMessage)
Callback 함수. BroadcastMessage를 수신받는 함수
ECodeType
코드 타입
Definition GUIDefinitions.h:8608