Mercurial > projects > dynamin
comparison dynamin/gui/events.d @ 31:2a194d52fdb5
Implement MouseTurnedEventArgs.scrollScreen.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 25 Jul 2009 15:38:35 -0500 |
parents | 545af935f201 |
children | c138461bf845 |
comparison
equal
deleted
inserted
replaced
30:545af935f201 | 31:2a194d52fdb5 |
---|---|
78 } | 78 } |
79 } | 79 } |
80 /// | 80 /// |
81 class MouseTurnedEventArgs : StopEventArgs { | 81 class MouseTurnedEventArgs : StopEventArgs { |
82 double _scrollAmount; | 82 double _scrollAmount; |
83 bool _scrollScreen; | |
83 public: | 84 public: |
84 this(double scrollAmount) { | 85 this(double scrollAmount, bool scrollScreen) { |
85 _scrollAmount = scrollAmount; | 86 _scrollAmount = scrollAmount; |
87 _scrollScreen = scrollScreen; | |
86 } | 88 } |
87 /** | 89 /** |
88 * The amount that a control should scroll in response to this event. | 90 * The amount that a control should scroll in response to this event. |
89 * In a text control, this is the number of lines to scroll. | 91 * In a text control, this is the number of lines to scroll. |
90 * This will be negative if the control should scroll upward and positive | 92 * This will be negative if the control should scroll upward and positive |
102 * and page down keys do. If this option is turned on, scrollScreen will | 104 * and page down keys do. If this option is turned on, scrollScreen will |
103 * return true and scrollAmount will return ±3. If the option is turned off, | 105 * return true and scrollAmount will return ±3. If the option is turned off, |
104 * scrollScreen will return false. | 106 * scrollScreen will return false. |
105 */ | 107 */ |
106 bool scrollScreen() { | 108 bool scrollScreen() { |
107 return false; | 109 return _scrollScreen; |
108 } | 110 } |
109 string toString() { | 111 string toString() { |
110 return format("MouseTurnedEventArgs [scrollAmount={}, scrollScreen={}]", | 112 return format("MouseTurnedEventArgs [scrollAmount={}, scrollScreen={}]", |
111 _scrollAmount, scrollScreen); | 113 _scrollAmount, _scrollScreen); |
112 } | 114 } |
113 } | 115 } |
114 /// | 116 /// |
115 class KeyEventArgs : StopEventArgs { | 117 class KeyEventArgs : StopEventArgs { |
116 Key _key; | 118 Key _key; |