Author Topic: Dockable Notes Window  (Read 520 times)

fhlbrep

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Dockable Notes Window
« on: November 01, 2018, 04:35:43 pm »
I created a very simple form with an edit control to allow me to write a few temporary notes, copy code snippets or whatever while I am working. Have not gone as far as saving/reloading them (yet?). I could easily keep a text doc open among the other source files, but I really don't like doing that. It just gets lost among the many other files I open. And having to open win notepad is not what I am after either.

I was thinking it would be nice if there were a dockable Notes window like Search Results, Build, Message List (etc.) that I could just keep a few notes to refer back to as I am working. Also, I am not talking about a todo list. That is a different thing. With a dockable/floating window I could group it below with the others like i do now and allow it to auto-hide/pin it whenever I needed it.

I am open to suggestions as to how to create a custom one using slick-C if that is possible. I have written several macros over the years. While not an expert I am comfortable with it.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2605
  • Hero Points: 396
Re: Dockable Notes Window
« Reply #1 on: November 01, 2018, 06:03:28 pm »
Have you tried the Annotations tool window ?

Graeme

  • Senior Community Member
  • Posts: 2274
  • Hero Points: 294
Re: Dockable Notes Window
« Reply #2 on: November 02, 2018, 10:30:49 am »
It's not hard to make your form dockable.
Here's part of my xretrace scrollbar form.  TWF_SUPPORTS_MULTIPLE means you can have more than one of these active at a time.

In the macros that I posted here there is xnotepad and xtemp-file-manager which are kind of related to what you're looking for.
https://community.slickedit.com/index.php/topic,16598.0.html
You could use a timer to automatically save your notes to a file.


Code: [Select]
definit()   
{
   tw_register_form('xretrace_scrollbar_form', TWF_SUPPORTS_MULTIPLE, DOCKAREAPOS_NONE); 
}


_form xretrace_scrollbar_form {
   p_backcolor=0x80000005;
   p_border_style=BDS_NONE;
   p_caption="xretrace scrollbar";
   p_forecolor=0x80000008;
   p_height=6000;
   p_tool_window=true;
   p_width=3825;
   p_x=14925;
   p_y=1890;
   p_eventtab=xretrace_scrollbar_form;
   _list_box ctllist1 {
      p_border_style=BDS_FIXED_SINGLE;
      p_font_size=1;
      p_height=5460;
      p_multi_select=MS_NONE;
      p_scroll_bars=SB_NONE;
      p_tab_index=1;
      p_tab_stop=true;
      p_width=900;
      p_x=0;
      p_y=0;
      p_eventtab2=_ul2_listbox;
   }
}


fhlbrep

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Dockable Notes Window
« Reply #3 on: November 02, 2018, 06:04:15 pm »
Yes Dennis - I looked at that and others. They serve a different purpose and not quite what I am looking for. What I want is essentially a buffer window to take a few notes, jot down ideas, a code snippet or two, anything. And (the important part) dock it with the other tool windows.
I could easily open a text file and float that tab as a separate window, but that takes up more real estate on the screen (which is where I was going with the custom form but had not figured out the docking part yet). In my layout I have several tool windows grouped at the bottom of the editor with auto hide and refer to them as needed. I would like this notes window to be there as well. I do not need to see it all the time, but having it would be quite handy. I thank you for the suggestion though.

Thank you also Graeme. I will definitely give xnotepad.e a look over and I like the timer suggestion. Will post back when I have a chance to look at it and see if it will work for me. I appreciate the quick responses.

Graeme

  • Senior Community Member
  • Posts: 2274
  • Hero Points: 294
Re: Dockable Notes Window
« Reply #4 on: November 04, 2018, 10:33:00 am »
Here's a suggestion.  In xxutils.e there are some commands called xfloat1, xfloat2, xfloat3.  They open the current edit buffer in a floating edit window.  You can pre-set the size and position of the window using the commands xset_float1 etc.  The macro below opens a specific file in a floating edit window of the size and location that you previously selected.

Code: [Select]
_command show_notes() name_info(','VSARG2_MARK)
{
   edit('C:\temp\my-notes.cpp');
   xfloat1();
}