• Login
Community
  • Login

Project plugin functionality

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
22 Posts 5 Posters 2.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    General Coder
    last edited by May 11, 2023, 2:40 PM

    What about my own context menu entry (that calls my C# function) or custom hovering tooltip type display, are those possible?

    P E 2 Replies Last reply May 11, 2023, 3:12 PM Reply Quote 0
    • P
      PeterJones @General Coder
      last edited by May 11, 2023, 3:12 PM

      @General-Coder ,

      What about my own context menu entry (that calls my C# function) or custom hovering tooltip type display, are those possible?

      I am sure such are possible. I think they are probably done with standard Win32 API calls, but I don’t know for sure. I know that some of the other regulars here have done their own popups and such, so hopefully someone else will be able to give you pointers as where to go next.

      1 Reply Last reply Reply Quote 2
      • E
        Ekopalypse @General Coder
        last edited by May 12, 2023, 6:56 AM

        @General-Coder

        If it is the context menu that opens in the Scintilla area, then it is editable via Settings->Edit Popup ContextMenu. See here . But if you’re thinking of having it in other dialogs like FAW, Project Panel, or third-party plugins like NppExec, then you’ll need to subclass the appropriate window message queue and catch the messages you’re interested in, do your own thing, and let the main message handler know that this was done to prevent the main action from being executed.

        1 Reply Last reply Reply Quote 3
        • G
          General Coder
          last edited by May 12, 2023, 8:59 AM

          I have put my own entry to the context menu via xml but now would like to do that via C# plugin. Is this possible?
          The link you gave me brings up security warning (which is why I haven’t been reading those docs)

          I’m also wondering if it’s possible to use windows form under notepad++ process or do I have to use np++ own window creation commands?

          I was able to create the form but it’s in independent process.

          M E 2 Replies Last reply May 12, 2023, 3:00 PM Reply Quote 0
          • M
            mkupper @General Coder
            last edited by May 12, 2023, 3:00 PM

            @General-Coder said in Project plugin functionality:

            The link you gave me brings up security warning (which is why I haven’t been reading those docs)

            This has been fixed and so https://npp-user-manual.org/docs/config-files/#the-context-menu-contextmenu-xml should now be viewable.

            1 Reply Last reply Reply Quote 2
            • E
              Ekopalypse @General Coder
              last edited by May 13, 2023, 6:13 AM

              @General-Coder said in Project plugin functionality:

              … now would like to do that via C# plugin. Is this possible?

              Yes, you need to subclass the wndproc …

              … possible to use windows form under notepad++

              Even though I’m not a C# developer, I can say that yes, you can.
              The .Net framework is basically a wrapper around the Win32 API.
              You just need to make sure that you pass the expected values to Npp.

              1 Reply Last reply Reply Quote 3
              • G
                General Coder
                last edited by May 17, 2023, 3:10 PM

                couple questions

                how do you center the view on line? I used SciMsg.SCI_GOTOLINE to go to the line but it doesn’t center the view

                also is it possible to get the text under the cursor? i can get selection but this one I havent figured out yet

                thx

                A 1 Reply Last reply May 17, 2023, 5:04 PM Reply Quote 0
                • A
                  Alan Kilborn @General Coder
                  last edited by May 17, 2023, 5:04 PM

                  @General-Coder said in Project plugin functionality:

                  couple questions

                  What you are asking about are some Scintilla functions.
                  The Scintilla docs are HERE .

                  1 Reply Last reply Reply Quote 1
                  • G
                    General Coder
                    last edited by General Coder May 17, 2023, 6:02 PM May 17, 2023, 5:56 PM

                    hey, thx I’m aware of the scintilla docs but they are pain to read so i thought I’d ask scintilla experts here.
                    that’s where I found the SCI_GOTOLINE ;)

                    A 1 Reply Last reply May 17, 2023, 6:06 PM Reply Quote 0
                    • A
                      Alan Kilborn @General Coder
                      last edited by Alan Kilborn May 17, 2023, 6:07 PM May 17, 2023, 6:06 PM

                      @General-Coder said in Project plugin functionality:

                      but they are pain to read

                      Nobody here wants to spoon-feed you. Sorry.

                      1 Reply Last reply Reply Quote 0
                      22 out of 22
                      • First post
                        22/22
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors