~unity-team/nux/texture-atlas

« back to all changes in this revision

Viewing changes to Nux/InputArea.h

  • Committer: Nicolas d'Offay
  • Date: 2012-11-16 18:23:48 UTC
  • mfrom: (682.2.25 trunk)
  • Revision ID: nicolas.doffay@canonical.com-20121116182348-ygq13lkwgbugen04
Additional work to get the texture atlas class running as a normal texture.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
                          unsigned long special_keys_state);
80
80
 
81
81
    virtual bool AcceptKeyNavFocus() const;
82
 
    
 
82
 
 
83
    /*!
 
84
      Sets whether this InputArea wants to know about all mouse events
 
85
      sent to a child InputArea.
 
86
 
 
87
      ChildMouseEvent() will be called for every mouse event that a child
 
88
      InputArea receives.
 
89
 
 
90
      \param enable Whether this InputArea should be informed about child mouse
 
91
                    events
 
92
      \sa ChildMouseEvent(), IsTrackingChildMouseEvents()
 
93
     */
 
94
    void SetTrackChildMouseEvents(bool enable);
 
95
 
 
96
    /*!
 
97
      Returns whether this InputArea wants to be informed about child mouse events.
 
98
 
 
99
      This property is false by default.
 
100
 
 
101
      \sa SetTrackChildMouseEvents(), ChildMouseEvent()
 
102
     */
 
103
    bool IsTrackingChildMouseEvents() const;
 
104
 
 
105
    /*!
 
106
      Called when a mouse event is sent to a child InputArea.
 
107
 
 
108
      If you return true, mouse ownership will be moved to this InputArea and the
 
109
      child InputArea will receive a MOUSE_CANCEL event.
 
110
 
 
111
      If you return false, nothing happens and the child will keep its ownership
 
112
      over the mouse and therefore get further mouse events.
 
113
 
 
114
      The default implementation just returns false;
 
115
 
 
116
      \return Whether you want to take ownership over the mouse.
 
117
      \sa SetTrackChildMouseEvents
 
118
     */
 
119
    virtual bool ChildMouseEvent(const Event& event);
 
120
 
83
121
  protected:
84
122
 
85
123
  private:
331
369
         unsigned long   // key state
332
370
         > mouse_wheel; // send(current X, current Y, delta X, delta Y)
333
371
 
 
372
    //! Signal emitted when the InputArea loses ownership over a pressed mouse.
 
373
    /*!
 
374
      Any actions or changes caused by the previous mouse_down should be reverted.
 
375
     */
 
376
    sigc::signal<void> mouse_cancel;
 
377
 
334
378
    //! Signal emitted when the InputArea receives a key release event.
335
379
    sigc::signal<void, unsigned int, unsigned long, unsigned long> key_up;
336
380
 
416
460
 
417
461
      virtual void EmitMouseDownOutsideArea   (int x, int y, unsigned long mouse_button_state, unsigned long special_keys_state);
418
462
 
 
463
      virtual void EmitMouseCancelSignal();
 
464
 
419
465
      friend class WindowCompositor;
 
466
 
 
467
    private:
 
468
      bool is_tracking_child_mouse_events_;
420
469
  };
421
470
 
422
471
}