> How would you go about determining if a marker has been defined via
> the API?
There is no API to determine if a marker has been defined.
> With many Scintilla apps supporting plugins, it'd be nice to be able
> to do a check similar to the check done in
> Editor::SubstituteMarkerIfEmpty as a reply to something like
> SCI_GETMARKERDEFINED.
SubstituteMarkerIfEmpty is there to allow old applications to work
despite changing behaviour in Scintilla where it started to
differentiate between more folder markers. I can't see a generic use
case here.
Neil
Neil
fun int MarkerSymbol=2524(int markerNumber, )
and an invisible
val SC_MARK_AVAILABLE=28
Then the application can give away all the markers it wants by
setting them to SC_MARK_AVAILABLE.
The plugin can do any looping needed to find markers.
Neil
> fun int MarkerSymbol=2524(int markerNumber, )
Committed as SCI_MARKERSYMBOLDEFINED:
fun int MarkerSymbolDefined=2529(int markerNumber,)
Neil
> Thank you Neil! No MarkerSymbolUndefine?
No as its more important to provide the atoms of functionality than
many convenience macros.
Neil
> Could the defualt marker type be SC_MARK_AVAILABLE so instead of a
> container needing to 'give away' markers, it takes what it needs and
> leaves the rest as available? Then the containers wouldn't need to
> change unless they are using the default marker.
Its safer for the default to be not available. Existing containers
are written assuming they are the only thing allocating markers. Some
of them will leave the symbol as SC_MARK_CIRCLE and not bother setting
it. If a container wants to support marker availability then it can
choose to change them to available.
Neil