Re: GtkSourceView questions



Hi Jeff,

On Tue, 2003-05-27 at 01:54, Jeff Franks wrote:
> Hi,
> 
> I have a few more quick questions.
> 
> 1. What actually is the 'marker type' of a GtkSourceMarker.

It's the property (pseudo-property actually :-) that connects the marker
with it's visual representation in the GtkSourceView widget.  In the
view, you set a pixmap for each marker type with
gtk_source_view_set_marker_pixbuf().

> 2. GtkSourceTag and GtkSourceTagClass are private. This makes them 
> difficult to wrap properly. Could they be made public? While not that 
> important  now it would be cleaner for future expansion.

GtkSourceTag and GtkSourceTagClass could be made public I think, though
I'm not sure we want that.  What problems do you have wrapping it? 
(beware, I don't know much C++ :-)

As for future expansion, I don't think you could extend GtkSourceTag
functionality without access to the internal highlighting engine (which
is scheduled to be replaced, see the TODO file).  For example,
GtkSourceBuffer will remove all GtkSourceTags when you disable
highlighting, which is the reason GtkSourceTag exists as a class (since
otherwise all tags, even user tags, would be removed).  Do you have any
specific idea?

> 3. GtkSyntaxTag, GtkSyntaxTagClass, GtkPatternTag and GtkPatternTagClass 
> are all exported in the public interface but they are only used in the 
> private interface. If there are no plans for future expansion here 
> wouldn't they be better removed from gtksourcetag.h and kept private.

They are exported so you're able to set highlighting rules/patterns
without using a GtkSourceLanguage, and to allow you to tweak one.

For example (hipothetical case :-), you could have an editor which would
allow the user to provide a list of keywords he wants highlighted. 
Instead of modifying the .lang file, you create a GtkPatternTag with the
keywords and add it to the buffer's tag table.

Regards,
Gustavo






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]