Menu

How can I show the bookmark symbol on a line?

2007-12-11
2012-11-14
  • Nobody/Anonymous

    I'm trying to create a simple plug-in that allows you to use numbered bookmark positions.  For example, you can press Ctrl-Shift-1 to bookmark a specific line to bookmark #1 and then you go back to that position using Ctrl-1.

    Anyways, I have the basic functionality working but how do I show the bookmark symbol next to a line?  Can I use my own icon next to the line?  (eg. a little circle with a 1 inside it)

    Also, how do I get notified if a line is deleted?  I want to erase my bookmark if the bookmarked line was deleted, etc.

    Thanks for any help!

     
    • Nobody/Anonymous

      Use the beNotified function that comes from scintilla and look for messages about text being edited, that way you can keep track.
      Also, check out the SCI_MARKERDEFINEPIXMAP, Notepad++ uses it for the hide lines feature to mark them.

       
    • Nobody/Anonymous

      Oops... I think I figured out my first question.  I had to look in the Scintilla Markers documentation... It seems to have exactly what I want!  (except it doesn't look like you can use your own icons)

      I'm still wondering about how to get notified on line deletion though...  Actually, I would ideally like to follow the line that is bookmarked even if it changes position, etc...

      Thanks again for any help!