Mercurial > projects > dwt-addons
comparison dwtx/jface/text/DefaultInformationControl.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 25f1f92fa3df |
children |
comparison
equal
deleted
inserted
replaced
161:f8d52b926852 | 162:1a5b8f8129df |
---|---|
256 /** The control's text widget */ | 256 /** The control's text widget */ |
257 private StyledText fText; | 257 private StyledText fText; |
258 /** The information presenter, or <code>null</code> if none. */ | 258 /** The information presenter, or <code>null</code> if none. */ |
259 private const IInformationPresenter fPresenter; | 259 private const IInformationPresenter fPresenter; |
260 /** A cached text presentation */ | 260 /** A cached text presentation */ |
261 private const TextPresentation fPresentation= new TextPresentation(); | 261 private const TextPresentation fPresentation; |
262 | 262 |
263 /** | 263 /** |
264 * Additional styles to use for the text control. | 264 * Additional styles to use for the text control. |
265 * @since 3.4, previously called <code>fTextStyle</code> | 265 * @since 3.4, previously called <code>fTextStyle</code> |
266 */ | 266 */ |
273 * @param parent the parent shell | 273 * @param parent the parent shell |
274 * @param isResizeable <code>true</code> if the control should be resizable | 274 * @param isResizeable <code>true</code> if the control should be resizable |
275 * @since 3.4 | 275 * @since 3.4 |
276 */ | 276 */ |
277 public this(Shell parent, bool isResizeable) { | 277 public this(Shell parent, bool isResizeable) { |
278 fPresentation= new TextPresentation(); | |
278 super(parent, isResizeable); | 279 super(parent, isResizeable); |
279 fAdditionalTextStyles= isResizeable ? DWT.V_SCROLL | DWT.H_SCROLL : DWT.NONE; | 280 fAdditionalTextStyles= isResizeable ? DWT.V_SCROLL | DWT.H_SCROLL : DWT.NONE; |
280 fPresenter= new HTMLTextPresenter(!isResizeable); | 281 fPresenter= new HTMLTextPresenter(!isResizeable); |
281 create(); | 282 create(); |
282 } | 283 } |
302 * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field | 303 * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field |
303 * @param presenter the presenter to be used, or <code>null</code> if no presenter should be used | 304 * @param presenter the presenter to be used, or <code>null</code> if no presenter should be used |
304 * @since 3.4 | 305 * @since 3.4 |
305 */ | 306 */ |
306 public this(Shell parent, String statusFieldText, IInformationPresenter presenter) { | 307 public this(Shell parent, String statusFieldText, IInformationPresenter presenter) { |
308 fPresentation= new TextPresentation(); | |
307 super(parent, statusFieldText); | 309 super(parent, statusFieldText); |
308 fAdditionalTextStyles= DWT.NONE; | 310 fAdditionalTextStyles= DWT.NONE; |
309 fPresenter= presenter; | 311 fPresenter= presenter; |
310 create(); | 312 create(); |
311 } | 313 } |
332 * @param toolBarManager the manager or <code>null</code> if toolbar is not desired | 334 * @param toolBarManager the manager or <code>null</code> if toolbar is not desired |
333 * @param presenter the presenter to be used, or <code>null</code> if no presenter should be used | 335 * @param presenter the presenter to be used, or <code>null</code> if no presenter should be used |
334 * @since 3.4 | 336 * @since 3.4 |
335 */ | 337 */ |
336 public this(Shell parent, ToolBarManager toolBarManager, IInformationPresenter presenter) { | 338 public this(Shell parent, ToolBarManager toolBarManager, IInformationPresenter presenter) { |
339 fPresentation= new TextPresentation(); | |
337 super(parent, toolBarManager); | 340 super(parent, toolBarManager); |
338 fAdditionalTextStyles= DWT.V_SCROLL | DWT.H_SCROLL; | 341 fAdditionalTextStyles= DWT.V_SCROLL | DWT.H_SCROLL; |
339 fPresenter= presenter; | 342 fPresenter= presenter; |
340 create(); | 343 create(); |
341 } | 344 } |
391 * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field | 394 * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field |
392 * @since 3.0 | 395 * @since 3.0 |
393 * @deprecated As of 3.4, replaced by simpler constructors | 396 * @deprecated As of 3.4, replaced by simpler constructors |
394 */ | 397 */ |
395 public this(Shell parentShell, int shellStyle, int style, IInformationPresenter presenter, String statusFieldText) { | 398 public this(Shell parentShell, int shellStyle, int style, IInformationPresenter presenter, String statusFieldText) { |
399 fPresentation= new TextPresentation(); | |
396 super(parentShell, DWT.NO_FOCUS | DWT.ON_TOP | shellStyle, statusFieldText, null); | 400 super(parentShell, DWT.NO_FOCUS | DWT.ON_TOP | shellStyle, statusFieldText, null); |
397 fAdditionalTextStyles= style; | 401 fAdditionalTextStyles= style; |
398 fPresenter= presenter; | 402 fPresenter= presenter; |
399 create(); | 403 create(); |
400 } | 404 } |
424 * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field | 428 * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field |
425 * @since 3.0 | 429 * @since 3.0 |
426 * @deprecated As of 3.4, replaced by {@link #DefaultInformationControl(Shell, String, DefaultInformationControl.IInformationPresenter)} | 430 * @deprecated As of 3.4, replaced by {@link #DefaultInformationControl(Shell, String, DefaultInformationControl.IInformationPresenter)} |
427 */ | 431 */ |
428 public this(Shell parent, int textStyles, IInformationPresenter presenter, String statusFieldText) { | 432 public this(Shell parent, int textStyles, IInformationPresenter presenter, String statusFieldText) { |
433 fPresentation= new TextPresentation(); | |
429 super(parent, statusFieldText); | 434 super(parent, statusFieldText); |
430 fAdditionalTextStyles= textStyles; | 435 fAdditionalTextStyles= textStyles; |
431 fPresenter= presenter; | 436 fPresenter= presenter; |
432 create(); | 437 create(); |
433 } | 438 } |