SlickEdit Product Discussion > Slick-C® Macro Programming

how can i add the bookmark mark on sidebar ?

(1/2) > >>

jcelle:
Hello slick-c gurus !
Does anyone knows what function I could use to toggle display of some bookmark icon on the left margin ?
Thanks in advance.

Graeme:
Do you want to toggle the bookmark itself or just the display of the bookmark?  In tools -> options ->editing -> bookmarks  - the "show set bookmarks" option allows you to hide or show bookmarks.  If you want to toggle the bookmark itself  - maybe toggle-bookmark()  - applies to the bookmark on the current line.

jcelle:
Hi Grame and thanks for your reply.
I want only the GUI part: I have written my own slick-c bookmark functions to limit the bookmark navigation to the current buffer: each buffer has its set of bookmarks and I want to jump within the buffer only (hence the other question you replied to about testing a hashtable key).
It works pretty fine though I do not have the GUI part.
Not sure if I want to mix with real SlickEdit bookmarks using toggle_bookmark() as I still need those when using tag navigation.

Graeme:
Ah, in that case you can use line markers
see _LineMarkerAdd etc. in the help and MarkerFunctions category.
They attach to a line so that if lines are inserted or deleted they stay on the correct line.
If you want an example, I used them in my xretrace macros here - see xretrace.e
https://community.slickedit.com/index.php/topic,16598.msg64005.html#msg64005


--- Code: ---   retrace_line_marker_pic_index_cur = _find_or_add_picture(XRETRACE_PATH :+ '_xretrcur.png@native');

      _LineMarkerAdd(retrace_region_line_marker_window_id, retrace_current_line, 1, 1,
                     retrace_line_marker_pic_index_cur_now, retrace_marker_type_id, "xretrace" );

   retrace_marker_type_id = _MarkerTypeAlloc();
   _MarkerTypeSetPriority(retrace_marker_type_id, 241);


--- End code ---

jcelle:
Hi Graeme, you made a happy man !
Thanks

Navigation

[0] Message Index

[#] Next page

Go to full version