Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MaxGUITextAreaScintilla.mod] TSCNotification misses fields #32

Open
GWRon opened this issue May 9, 2019 · 2 comments
Open

[MaxGUITextAreaScintilla.mod] TSCNotification misses fields #32

GWRon opened this issue May 9, 2019 · 2 comments

Comments

@GWRon
Copy link
Contributor

GWRon commented May 9, 2019

A Scintilla SCNotification has a multitude of properties.

It is filled there:

	Function OnSciNotify(widget:Byte Ptr, id:Int, notificationPtr:Byte Ptr, obj:Object)
		Local ta:TGTKScintillaTextArea = TGTKScintillaTextArea(obj)
'FILLED HERE
		bmx_mgta_scintilla_notifcation_update(ta.notification, notificationPtr)

		Select ta.notification.code
			Case SCN_UPDATEUI
				If ta.notification.updated & SC_UPDATE_SELECTION Then
					PostGuiEvent(EVENT_GADGETSELECT, TGadget(obj))
				End If
			Case SCN_MODIFIED
				If ta.notification.modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT) Then
					If Not ta.ignoreChange Then
						PostGuiEvent(EVENT_GADGETSELECT, TGadget(obj))
						PostGuiEvent(EVENT_GADGETACTION, TGadget(obj))
					End If
					ta.ignoreChange = False
					
					bmx_mgta_scintilla_setlinedigits(ta.sciPtr, Varptr ta.lineDigits, ta.showLineNumbers)
				End If
		End Select

	End Function

Which in the end calls this inbetween:

void bmx_mgta_scintilla_notifcation_update(BBObject * obj, struct SCNotification * notification) {
#ifdef BMX_NG
	maxgui_maxguitextareascintilla_common_TSCNotification__update(obj, notification->nmhdr.code, notification->modificationType, notification->updated);
#else
	_maxgui_maxguitextareascintilla_TSCNotification__update(obj, notification->nmhdr.code, notification->modificationType, notification->updated);
#endif
}

As you see it only passes 3 params: the code, the modificationtype and "updated".
With the new features of NG - could we just pass the whole struct or so?

For "legacy" one could append the desired other properties (eg. "text" - so you can check what was dropped to for example add URIs to the source code you currently are editing).

@woollybah
Copy link
Member

The struct is too complex really. If you tell me specifically which bits you need access to...

@GWRon
Copy link
Contributor Author

GWRon commented May 9, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants