Mercurial > projects > dwt-mac
comparison dwt/custom/CCombo.d @ 130:3d4579727e0e
Fixes #2 and #3
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Tue, 10 Feb 2009 21:01:24 +0100 |
parents | 07399639c0c8 |
children | 52d360200ae4 |
comparison
equal
deleted
inserted
replaced
129:ad4e1fe71a5a | 130:3d4579727e0e |
---|---|
132 text = new Text (this, textStyle); | 132 text = new Text (this, textStyle); |
133 int arrowStyle = DWT.ARROW | DWT.DOWN; | 133 int arrowStyle = DWT.ARROW | DWT.DOWN; |
134 if ((style & DWT.FLAT) !is 0) arrowStyle |= DWT.FLAT; | 134 if ((style & DWT.FLAT) !is 0) arrowStyle |= DWT.FLAT; |
135 arrow = new Button (this, arrowStyle); | 135 arrow = new Button (this, arrowStyle); |
136 | 136 |
137 listener = new class() Listener { | 137 listener = new class(text, list, popup, arrow) Listener { |
138 | |
139 Text text; | |
140 List list; | |
141 Shell popup; | |
142 Button arrow; | |
143 | |
144 this (Text text, List list, Shell popup, Button arrow) | |
145 { | |
146 this.text = text; | |
147 this.list = list; | |
148 this.popup = popup; | |
149 this.arrow = arrow; | |
150 } | |
151 | |
138 public void handleEvent (Event event) { | 152 public void handleEvent (Event event) { |
139 if (popup is event.widget) { | 153 if (popup is event.widget) { |
140 popupEvent (event); | 154 this.outer.popupEvent (event); |
141 return; | 155 return; |
142 } | 156 } |
143 if (text is event.widget) { | 157 if (text is event.widget) { |
144 textEvent (event); | 158 this.outer.textEvent (event); |
145 return; | 159 return; |
146 } | 160 } |
147 if (list is event.widget) { | 161 if (list is event.widget) { |
148 listEvent (event); | 162 this.outer.listEvent (event); |
149 return; | 163 return; |
150 } | 164 } |
151 if (arrow is event.widget) { | 165 if (arrow is event.widget) { |
152 arrowEvent (event); | 166 this.outer.arrowEvent (event); |
153 return; | 167 return; |
154 } | 168 } |
155 if (this.outer is event.widget) { | 169 if (this.outer is event.widget) { |
156 comboEvent (event); | 170 this.outer.comboEvent (event); |
157 return; | 171 return; |
158 } | 172 } |
159 if (getShell () is event.widget) { | 173 if (getShell () is event.widget) { |
160 getDisplay().asyncExec(new class() Runnable { | 174 getDisplay().asyncExec(new class() Runnable { |
161 public void run() { | 175 public void run() { |