Changeset 17:7b7a54b047e1

Show
Ignore:
Timestamp:
02/27/08 19:24:17 (9 months ago)
Author:
Jesse Phillips <Jesse.K.Phillips+D@gmail.com>
branch:
default
Message:

Added unfinished but usable ClipboardExample? and Snippet293. Updated other snippets to use the auto keyword. Made the opengl example windows only until it is added to the linux version.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dsss.conf

    r16 r17  
    1717 
    1818[dwtexamples/simple.d] 
     19[dwtexamples/clipboard/ClipboardExample.d] 
    1920[dwtexamples/helloworld/HelloWorld1.d] 
    2021[dwtexamples/helloworld/HelloWorld2.d] 
     
    2324[dwtexamples/helloworld/HelloWorld5.d] 
    2425 
     26[dwtsnippets/button/Snippet293.d] 
    2527[dwtsnippets/styledtext/Snippet163.d] 
    2628[dwtsnippets/styledtext/Snippet189.d] 
     
    3133[user/torhu_synctest.d] 
    3234 
    33 [snippets/opengl_test1.d] 
     35#Until linux has the opengl stuff 
     36version(Windows) { 
     37    [snippets/opengl_test1.d] 
     38
    3439 
    3540[dwtexamples/addressbook/AddressBook.d] 
  • dwtsnippets/styledtext/Snippet163.d

    r11 r17  
    2828 
    2929void main() { 
    30     Display display = new Display(); 
    31     Shell shell = new Shell(display); 
     30    auto display = new Display(); 
     31    auto shell = new Shell(display); 
    3232    shell.setLayout(new FillLayout()); 
    33     StyledText text = new StyledText (shell, DWT.BORDER); 
     33    auto text = new StyledText (shell, DWT.BORDER); 
    3434    text.setText("0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ"); 
    3535    // make 0123456789 appear bold 
    36     StyleRange style1 = new StyleRange(); 
     36    auto style1 = new StyleRange(); 
    3737    style1.start = 0; 
    3838    style1.length = 10; 
     
    4040    text.setStyleRange(style1); 
    4141    // make ABCDEFGHIJKLM have a red font 
    42     StyleRange style2 = new StyleRange(); 
     42    auto style2 = new StyleRange(); 
    4343    style2.start = 11; 
    4444    style2.length = 13; 
     
    4646    text.setStyleRange(style2); 
    4747    // make NOPQRSTUVWXYZ have a blue background 
    48     StyleRange style3 = new StyleRange(); 
     48    auto style3 = new StyleRange(); 
    4949    style3.start = 25; 
    5050    style3.length = 13; 
  • dwtsnippets/styledtext/Snippet189.d

    r11 r17  
    3131 
    3232void main () { 
    33     Display display = new Display (); 
    34     Shell shell = new Shell (display); 
     33    auto display = new Display (); 
     34    auto shell = new Shell (display); 
    3535    shell.setText("StyledText with underline and strike through"); 
    3636    shell.setLayout(new FillLayout()); 
    37     StyledText text = new StyledText (shell, DWT.BORDER); 
     37    auto text = new StyledText (shell, DWT.BORDER); 
    3838    text.setText("0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ"); 
    3939    // make 0123456789 appear underlined 
    40     StyleRange style1 = new StyleRange(); 
     40    auto style1 = new StyleRange(); 
    4141    style1.start = 0; 
    4242    style1.length = 10; 
     
    4444    text.setStyleRange(style1); 
    4545    // make ABCDEFGHIJKLM have a strike through 
    46     StyleRange style2 = new StyleRange(); 
     46    auto style2 = new StyleRange(); 
    4747    style2.start = 11; 
    4848    style2.length = 13; 
     
    5050    text.setStyleRange(style2); 
    5151    // make NOPQRSTUVWXYZ appear underlined and have a strike through 
    52     StyleRange style3 = new StyleRange(); 
     52    auto style3 = new StyleRange(); 
    5353    style3.start = 25; 
    5454    style3.length = 13; 
  • dwtsnippets/text/Snippet258.d

    r12 r17  
    3838 
    3939void main() { 
    40     Display display = new Display(); 
    41     Shell shell = new Shell(display); 
     40    auto display = new Display(); 
     41    auto shell = new Shell(display); 
    4242    shell.setLayout(new GridLayout(2, false)); 
    4343 
    44     final Text text = new Text(shell, DWT.SEARCH | DWT.CANCEL); 
     44    auto text = new Text(shell, DWT.SEARCH | DWT.CANCEL); 
    4545    Image image = null; 
    4646    if ((text.getStyle() & DWT.CANCEL) == 0) { 
    4747        image = new Image (display, new ImageData(new ByteArrayInputStream( cast(byte[]) import("cancel.gif" )))); 
    48         ToolBar toolBar = new ToolBar (shell, DWT.FLAT); 
    49         ToolItem item = new ToolItem (toolBar, DWT.PUSH); 
     48        auto toolBar = new ToolBar (shell, DWT.FLAT); 
     49        auto item = new ToolItem (toolBar, DWT.PUSH); 
    5050        item.setImage (image); 
    5151        item.addSelectionListener(new class SelectionAdapter { 
  • dwtsnippets/tooltips/Snippet41.d

    r11 r17  
    2929 
    3030void main () { 
    31     char[] string = "This is a string\nwith a new line."; 
    32     Display display = new Display (); 
    33     Shell shell = new Shell (display); 
    34     TabFolder folder = new TabFolder (shell, DWT.BORDER); 
     31    auto string = "This is a string\nwith a new line."; 
     32    auto display = new Display (); 
     33    auto shell = new Shell (display); 
     34    auto folder = new TabFolder (shell, DWT.BORDER); 
    3535 
    3636    folder.setSize (200, 200); 
    37     TabItem item0 = new TabItem (folder, 0); 
     37    auto item0 = new TabItem (folder, 0); 
    3838    item0.setToolTipText ("TabItem toolTip: " ~ string); 
    3939 
    40     ToolBar bar = new ToolBar (shell, DWT.BORDER); 
     40    auto bar = new ToolBar (shell, DWT.BORDER); 
    4141    bar.setBounds (0, 200, 200, 64); 
    4242    ToolItem item1 = new ToolItem (bar, 0);