Atom, howto addMouseListener?

Home Forums General Programming Atom, howto addMouseListener?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #72175
    Mr.ToR
    Participant
      • Topics: 7
      • Replies: 51
      • Total: 58

      Topic says it 🙂

      Or anyone please if you anything about using addMouseListener?
      or how to get mouseUp from a component?

      Thnx a lot.

      #72177
      human fly
      Participant
        • Topics: 124
        • Replies: 1070
        • Total: 1194
        • ★★★★

        have a look at the *.h files on the github/source/core pages.
        i saw references to addListener etc. there. but i would not
        know yet how to use it, and have not, i think, seen any
        examples yet in panels.

        can i ask what it is you are trying/planning to do?

        here you go: line 183 etc: add/remove listener:

        https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrModulator/CtrlrModulator.h

        it looks like it’s a modulator property, and could get created like
        a timer, and i guess you’d create it locally in a function, and give
        it an ID, and call it like that.(i’m not 100% on how to do that yet,
        got sidetracked figuring out Graphic Envelope yesterday, wa-hey!)

        edit: oh i see you’ve already talked about this:

        How to get the mouse event object in any method?

        #72182
        Mr.ToR
        Participant
          • Topics: 7
          • Replies: 51
          • Total: 58

          Thnx for your post humanfly but your link seems to be about something different.

          look at Atom’s post here at Juce about this…
          https://forum.juce.com/t/cant-a-component-be-a-mouselistener/5935

          also Look at line 247 here:
          https://github.com/RomanKubiak/ctrlr/blob/master/Source/UIComponents/CtrlrComponents/CtrlrComponent.cpp#L247

          seems like you can attach a mouselistener to a component.

          All I need is to be able to assign a callback function to a component on a certain mouse event, in my case a mouseUp event.

          #72183
          Mr.ToR
          Participant
            • Topics: 7
            • Replies: 51
            • Total: 58

            Ok, a better question. How does Component:isMouseButtonDown() work? or does it even work?

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The forum ‘Programming’ is closed to new topics and replies.
          There is currently 0 users and 48 guests online
          No users are currently active
          Forum Statistics
          Threads: 2,495, Posts: 17,374, Members: 77,605
          Most users ever online was 12 on January 22, 2019 3:47 pm
          Ctrlr