Changeset 535

Show
Ignore:
Timestamp:
07/14/08 17:03:01 (4 years ago)
Author:
okibi
Message:

updating demos

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/demos/cairo/cairo_clock/clock.d

    r506 r535  
    3434import cairo.Context; 
    3535import cairo.Surface; 
    36 import gtkc.cairotypes; 
    3736 
    3837import gtk.Widget; 
     
    5150        addOnExpose(&exposeCallback); 
    5251    } 
    53      
     52 
    5453protected: 
    5554    //Override default signal handler: 
     
    6160            m_timeout = new Timeout( 1000, &onSecondElapsed, false ); 
    6261        } 
    63          
     62 
    6463        // This is where we draw on the window 
    65          
     64 
    6665        Drawable dr = getWindow(); 
    67          
     66 
    6867        int width; 
    6968        int height; 
    70          
     69 
    7170        dr.getSize(&width, &height); 
    72          
     71 
    7372        auto cr = new Context (dr); 
    74          
     73 
    7574        if (event) 
    7675        { 
     
    8180            cr.clip(); 
    8281        } 
    83          
     82 
    8483        // scale to unit square and translate (0, 0) to be (0.5, 0.5), i.e. the 
    8584        // center of the window 
     
    8786        cr.translate(0.5, 0.5); 
    8887        cr.setLineWidth(m_lineWidth); 
    89          
     88 
    9089        cr.save(); 
    9190            cr.setSourceRgba(0.3, 0.6, 0.2, 0.9);   // brownish green 
    9291            cr.paint(); 
    9392        cr.restore(); 
    94          
     93 
    9594        cr.arc(0, 0, m_radius, 0, 2 * PI); 
    96          
     95 
    9796        cr.save(); 
    9897            cr.setSourceRgba(0.0, 0.0, 0.0, 0.8); 
    9998            cr.fillPreserve(); 
    10099        cr.restore(); 
    101          
     100 
    102101        cr.save(); 
    103102            cr.setSourceRgba(1.0, 1.0, 1.0, 1.0); 
     
    106105            cr.clip(); 
    107106        cr.restore(); 
    108          
    109          
     107 
     108 
    110109        //clock ticks 
    111          
     110 
    112111        for (int i = 0; i < 12; i++) 
    113112        { 
    114113            double inset = 0.07; 
    115              
     114 
    116115            cr.save(); 
    117116                cr.setSourceRgba(1.0, 1.0, 1.0, 1.0); 
    118117                cr.setLineWidth( m_lineWidth * 0.25); 
    119118                cr.setLineCap(cairo_line_cap_t.ROUND); 
    120                  
     119 
    121120                if (i % 3 != 0) 
    122121                { 
     
    124123                    cr.setLineWidth( m_lineWidth * 0.5 ); 
    125124                } 
    126                  
     125 
    127126                cr.moveTo( 
    128127                    (m_radius - inset) * cos (i * PI / 6), 
     
    134133            cr.restore(); // stack-pen-size 
    135134        } 
    136          
     135 
    137136        version(Tango) 
    138137        { 
    139138            auto time = tangoClock.WallClock.now.time; 
    140          
     139 
    141140            double minutes = time.minutes * PI / 30; 
    142141            double hours = time.hours * PI / 6; 
     
    147146            d_time lNow; 
    148147            string lNowString; 
    149              
     148 
    150149            // Grab the date and time relative to UTC 
    151150            lNow = std.date.getUTCtime(); 
    152151            // Convert this into the local date and time for display. 
    153152            lNowString = std.date.toString(lNow); 
    154              
     153 
    155154            Date timeinfo; 
    156155            timeinfo.parse(lNowString); 
    157              
     156 
    158157            // compute the angles of the indicators of our clock 
    159158            double minutes = timeinfo.minute * PI / 30; 
     
    161160            double seconds= timeinfo.second * PI / 30; 
    162161        } 
    163          
     162 
    164163        //writefln(timeinfo.hour, ".", timeinfo.minute, ".", timeinfo.second); 
    165          
     164 
    166165        cr.save(); 
    167166            cr.setLineCap(cairo_line_cap_t.ROUND); 
    168              
     167 
    169168            // draw the seconds hand 
    170169            cr.save(); 
     
    176175                cr.stroke(); 
    177176            cr.restore(); 
    178              
     177 
    179178            // draw the minutes hand 
    180179            //cr.setSourceRgba(0.117, 0.337, 0.612, 0.9);   // blue 
     
    184183                -cos(minutes + seconds / 60) * (m_radius * 0.7)); 
    185184            cr.stroke(); 
    186              
     185 
    187186            // draw the hours hand 
    188187            cr.setSourceRgba(0.337, 0.612, 0.117, 0.9);   // green 
     
    192191            cr.stroke(); 
    193192        cr.restore(); 
    194          
     193 
    195194        // draw a little dot in the middle 
    196195        cr.arc(0, 0, m_lineWidth / 3.0, 0, 2 * PI); 
    197196        cr.fill(); 
    198          
     197 
    199198        delete cr; 
    200          
     199 
    201200        return 1; 
    202201    } 
    203      
     202 
    204203    bool onSecondElapsed() 
    205204    { 
    206205        //force our program to redraw the entire clock once per every second. 
    207          
     206 
    208207        Window win = getWindow(); 
    209          
     208 
    210209        if(win) 
    211210        { 
    212              
     211 
    213212            int width; 
    214213            int height; 
    215              
     214 
    216215            win.getSize(&width, &height); 
    217              
     216 
    218217            //I think this should be also made possible: 
    219218            //width = win.getWidth(); 
    220219            //height = win.getHeight(); 
    221              
     220 
    222221            //And there should be a constructor like: Rectangle( int x, int y, int width, int height ); 
    223222            //because at the moment we have to do this to use a Rectangle, and that it needed for 
     
    225224            //that would do everything that we're doing here. And maybe also invalidateAll(); 
    226225            GdkRectangle* grect = new GdkRectangle(); 
    227              
     226 
    228227            grect.x = 0; 
    229228            grect.y = 0; 
    230229            grect.width = width; 
    231230            grect.height = height; 
    232              
     231 
    233232            //Rectangle r = new Rectangle(0, 0, width, height); 
    234233            Rectangle r = new Rectangle(grect); 
    235              
     234 
    236235            win.invalidateRect(r, false); 
    237236        } 
    238237        //else writefln("The Gdk.Window doesn't exist. Something went wrong in clock.d onSecondsElapsed()"); 
    239          
     238 
    240239        return true; 
    241          
     240 
    242241    } 
    243      
     242 
    244243    double m_radius = 0.40; 
    245244    double m_lineWidth = 0.065; 
    246      
     245 
    247246    Timeout m_timeout; 
    248247} 
  • trunk/demos/cairo/cairo_clock/dsss.conf

    r450 r535  
    22version = 0.1 
    33 
    4 requires = gtkd  
     4requires = gtkd 
    55 
    66[main.d] 
    77type = binary 
    88target = cairo_clock 
    9 buildflags = -I../../demos/ -no-export-dynamic 
     9buildflags = -I../../../demos/ -I../../../src -no-export-dynamic 
    1010version(linux) { 
    1111    buildflags +=-L-ldl 
  • trunk/demos/cairo/text_image/dsss.conf

    r452 r535  
    22version = 0.1 
    33 
    4 requires = gtkd  
     4requires = gtkd 
    55 
    66[text_image.d] 
    77type = binary 
    88target = text_image 
    9 buildflags = -no-export-dynamic 
     9buildflags = -I../../../src -no-export-dynamic 
    1010version(linux) { 
    1111    buildflags +=-L-ldl 
  • trunk/demos/dsss.conf

    r511 r535  
    11name = gtkddemos 
     2 
     3#Add section names to the follwing variable to get them built. 
     4#Demos requiring external libs or files are not enabled by default. 
     5defaulttargets = cairo gtk gtkD pango 
    26 
    37requires = gtkd 
    48 
    59[cairo] 
    6 type = subdir 
    7  
    8 [glade] 
    910type = subdir 
    1011 
     
    1819type = subdir 
    1920 
    20 #[gl
    21 #type = subdir 
     21[glade
     22type = subdir 
    2223 
    23 #[sourceView
    24 #type = subdir 
     24[gl
     25type = subdir 
    2526 
    26 #[gda
    27 #type = subdir 
     27[sourceView
     28type = subdir 
    2829 
     30[gda] 
     31type = subdir 
     32 
     33#Please note that the gstreamer demos require Tango 
     34[gstreamer] 
     35type = subdir 
  • trunk/demos/gda/dsss.conf

    r340 r535  
    66[TestGda.d] 
    77type = binary 
    8 target = TestGda  
    9 buildflags = -I../../demos/ -no-export-dynamic 
     8target = TestGda 
     9buildflags = -I../../demos/ -I../../src -I../../srcgda -no-export-dynamic 
    1010version(linux) { 
    1111buildflags += -L-ldl 
  • trunk/demos/gl/dsss.conf

    r467 r535  
    66type = binary 
    77target = shapesGL 
    8 buildflags = -I../ -no-export-dynamic 
     8buildflags = -I../ -I../../src -I../../srcgl -no-export-dynamic 
    99version(linux) { 
    1010buildflags += -L-lGL -L-lGLU -L-ldl 
     
    1818type = binary 
    1919target = simpleGL 
    20 buildflags = -I../ -no-export-dynamic 
     20buildflags = -I../ -I../../src -I../../srcgl -no-export-dynamic 
    2121version(linux) { 
    2222buildflags += -L-lGL -L-lGLU -L-ldl 
  • trunk/demos/glade/dsss.conf

    r340 r535  
    11name = gladeTest 
    22 
    3 requires = gtkD 
     3requires = gtkd 
    44 
    55[gladeTest.d] 
    66type = binary 
    77target = gladeTest 
    8 buildflags = -I../../demos -no-export-dynamic 
     8buildflags = -I../ -I../../src -no-export-dynamic 
    99version(linux) { 
    1010buildflags +=-L-ldl 
  • trunk/demos/glade/gladeTest.d

    r496 r535  
    77import gtk.Widget; 
    88import gtk.Button; 
    9 import gtkc.gtktypes; 
    109 
    1110version(Tango){ 
  • trunk/demos/gstreamer/dsss.conf

    r322 r535  
    1 name = gstreamerDTest
     1name = gstreamerdemo
    22 
    3 requires = gtkD gstreamerD 
     3requires = gtkd 
    44 
    5 #[gnonlin_video_example.d] 
    6 #type = binary 
    7 #target = gnonlin_video_example 
    8 #buildflags = -I/usr/local/include/d -I/usr/local/include/d -L-ldl 
     5[gnonlin_encoding] 
     6type = subdir 
    97 
    10 [gnonlin_video_example_encoding.d] 
    11 type = binary 
    12 target = gnonlin_video_example_encoding 
    13 buildflags = -I/usr/local/include/d -I/usr/local/include/d -L-ldl 
    14 buildflags += -debug=GnonlinHello -debug=gstreamer -debug=gstreamerbus 
     8[gnonlin_example] 
     9type = subdir 
    1510 
    16 #[gnonlin_video_example_tester2.d] 
    17 #type = binary 
    18 #target = gnonlin_video_example_tester2 
    19 #buildflags = -I/usr/local/include/d -I/usr/local/include/d -L-ldl 
    20 #buildflags += -version=myfiles 
    21  
     11[helloworld] 
     12type = subdir 
  • trunk/demos/gstreamer/gnonlin_encoding/dsss.conf

    r322 r535  
    11name = gnonlin_encoding 
    22 
    3 requires = gtkD gstreamerD 
     3requires = gtkd gstreamerd 
    44 
    55[gnonlin_encoding.d] 
    66type = binary 
    77target = gnonlin_encoding 
    8 buildflags = -I/usr/local/include/d/src -I/usr/local/include/d/srcgstreamer -L-ldl 
    9 buildflags += -debug=GnonlinHello -debug=gstreamer -debug=gstreamerbus 
    10  
     8buildflags = -I../ -I../../../src -I../../../srcgstreamer -no-export-dynamic 
     9#buildflags += -debug=GnonlinHello -debug=gstreamer -debug=gstreamerbus 
     10version(linux) { 
     11    buildflags +=-L-ldl 
     12
     13version(Windows){ 
     14    buildflags+=-lladvapi32 
     15
  • trunk/demos/gstreamer/gnonlin_example/dsss.conf

    r322 r535  
    11name = gnonlin_example 
    22 
    3 requires = gtkD gstreamerD 
     3requires = gtkd gstreamerd 
    44 
    55[gnonlin_example.d] 
    66type = binary 
    77target = gnonlin_example 
    8 buildflags = -I/usr/local/include/d/src -I/usr/local/include/d/srcgstreamer -L-ldl 
    9  
     8buildflags = -I../ -I../../../src -I../../../srcgstreamer -no-export-dynamic 
     9#buildflags += -debug=GnonlinHello -debug=gstreamer -debug=gstreamerbus 
     10version(linux) { 
     11    buildflags +=-L-ldl 
     12
     13version(Windows){ 
     14    buildflags+=-lladvapi32 
     15
  • trunk/demos/gstreamer/helloworld/dsss.conf

    r322 r535  
    11name = gstreamer_helloworld 
    22 
    3 requires = gtkD gstreamerD 
     3requires = gtkd gstreamerd 
    44 
    55[gstreamer_helloworld.d] 
    66type = binary 
    77target = gstreamer_helloworld 
    8 buildflags = -I/usr/local/include/d/src -I/usr/local/include/d/srcgstreamer -L-ldl 
     8buildflags = -I../ -I../../../src -I../../../srcgstreamer -no-export-dynamic 
     9#buildflags += -debug=GnonlinHello -debug=gstreamer -debug=gstreamerbus 
     10version(linux) { 
     11    buildflags +=-L-ldl 
     12
     13version(Windows){ 
     14    buildflags+=-lladvapi32 
     15
  • trunk/demos/gtk/dsss.conf

    r532 r535  
    11[*] 
    2 buildflags =  -I../ -no-export-dynamic 
     2buildflags =  -I../ -I../../src -no-export-dynamic 
    33version(linux) { 
    44    buildflags +=-L-ldl 
  • trunk/demos/gtkD/DemoMultiCellRenderer.d

    r496 r535  
    4545import gtk.CellRendererToggle; 
    4646import gtk.ListStore; 
    47 import gtkc.gtktypes; 
    4847 
    4948enum { 
  • trunk/demos/gtkD/TTextView.d

    r530 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2020 
    2121private import gtk.Window; 
    22  
    23 private import gtkc.gtktypes; 
    24 private import gtkc.gdktypes; 
    2522 
    2623private import gtk.Widget; 
     
    5552public: 
    5653class TTextView : Window 
    57 {   
     54{ 
    5855    TextView view1; 
    5956    TextBuffer buffer; 
     
    7067 
    7168        createTextViews(); 
    72          
     69 
    7370        setupWidgets(); 
    7471 
     
    7875        attachWidgets(view1); 
    7976        attachWidgets(view2); 
    80        
     77 
    8178        showAll(); 
    8279    } 
    83      
     80 
    8481//  bit windowDeleteCallback(Window window, Event event) 
    8582//  { 
    8683//      return false; 
    8784//  } 
    88 //  
     85// 
    8986//  bit windowDestroyCallback(Window window, Event event) 
    9087//  { 
     
    10299        view2 = new TextView(buffer); 
    103100    } 
    104      
     101 
    105102    /** 
    106103     * sets up the widgets ot this test 
     
    111108        vPaned.setBorderWidth(5); 
    112109        add(vPaned); 
    113          
     110 
    114111        ScrolledWindow sw = new ScrolledWindow(PolicyType.AUTOMATIC, PolicyType.AUTOMATIC); 
    115112        sw.add(view1); 
     
    146143        * gtk_text_tag_set_priority(). 
    147144        */ 
    148          
     145 
    149146        buffer.createTag("heading", 
    150147                        "weight", PangoWeight.BOLD, 
     
    154151 
    155152        buffer.createTag("bold", 
    156                   "weight", cast(int)PangoWeight.BOLD);   
    157    
     153                  "weight", cast(int)PangoWeight.BOLD); 
     154 
    158155        buffer.createTag("big", 
    159156                  /* points times the PANGO_SCALE factor */ 
     
    165162        buffer.createTag("x-large", 
    166163                  "scale", PANGO_SCALE_X_LARGE); 
    167    
     164 
    168165        buffer.createTag("monospace", 
    169166                  "family", "monospace"); 
    170    
     167 
    171168        buffer.createTag("blue_foreground", 
    172                   "foreground", "blue");   
     169                  "foreground", "blue"); 
    173170 
    174171        buffer.createTag("red_background", 
     
    181178 
    182179static string gray50_bits = [0x02, 0x01]; 
    183                    
     180 
    184181        stipple = Bitmap.createFromData(null,   // drawablw 
    185182                     gray50_bits, gray50_width, 
    186183                     gray50_height); 
    187    
     184 
    188185        buffer.createTag("background_stipple", 
    189186                  "background_stipple", stipple); 
     
    203200        buffer.createTag("not_editable", 
    204201                  "editable", cast(int)false); 
    205    
     202 
    206203        buffer.createTag("word_wrap", 
    207204                  "wrap_mode", cast(int)WrapMode.WORD); 
     
    212209        buffer.createTag("no_wrap", 
    213210                  "wrap_mode", cast(int)WrapMode.NONE); 
    214    
     211 
    215212        buffer.createTag("center", 
    216213                  "justification", cast(int)Justification.JUSTIFY_CENTER); 
     
    221218        buffer.createTag("wide_margins", 
    222219                  "left_margin", 50, "right_margin", 50); 
    223    
     220 
    224221        buffer.createTag("strikethrough", 
    225222                  "strikethrough", cast(int)true); 
    226    
     223 
    227224        buffer.createTag("underline", 
    228225                  "underline", cast(int)PangoUnderline.SINGLE); 
     
    234231                  "rise", 10 * PANGO_SCALE,   /* 10 pixels */ 
    235232                  "size", 8 * PANGO_SCALE);   /* 8 points */ 
    236    
     233 
    237234        buffer.createTag("subscript", 
    238235                  "rise", -10 * PANGO_SCALE,   /* 10 pixels */ 
    239236                  "size", 8 * PANGO_SCALE);    /* 8 points */ 
    240237 
    241          
     238 
    242239        buffer.createTag("rtl_quote", 
    243240                  "wrap_mode", WrapMode.WORD, 
     
    246243                  "left_margin", 20, 
    247244                  "right_margin", 20); 
    248          
     245 
    249246    } 
    250247    /** 
     
    263260        TextChildAnchor anchor; 
    264261        string filename; 
    265          
     262 
    266263        /* demo_find_file() looks in the the current directory first, 
    267264        * so you can run gtk-demo without installing GTK, then looks 
     
    277274        } 
    278275        catch (Exception) 
    279         {       
     276        { 
    280277            version(Tango) Stdout("Failed to load image file gtk-logo-rgb.gif").newline; 
    281278            else printf("Failed to load image file gtk-logo-rgb.gif\n"); 
    282279        } 
    283          
     280 
    284281        /* get start of buffer; each insertion will revalidate the 
    285282        * iterator to point to just after the inserted text. 
    286283        */ 
    287          
     284 
    288285        buffer.getIterAtOffset(iter, 0); 
    289286 
     
    291288 
    292289        buffer.insertWithTagsByName(iter, "Font styles. ","heading"); 
    293    
     290 
    294291        buffer.insert(iter, "For example, you can have "); 
    295292        buffer.insertWithTagsByName(iter, "italic", "italic"); 
    296         buffer.insert(iter, ", ");   
     293        buffer.insert(iter, ", "); 
    297294        buffer.insertWithTagsByName(iter, "bold", "bold"); 
    298295        buffer.insert(iter, ", or "); 
     
    306303        buffer.insertWithTagsByName(iter, "x-large", "x-large"); 
    307304        buffer.insert(iter, " to ensure that your program properly adapts if the user changes the default font size.\n\n"); 
    308    
     305 
    309306        buffer.insertWithTagsByName(iter, "Colors. ", "heading"); 
    310    
    311         buffer.insert(iter, "Colors such as ");   
     307 
     308        buffer.insert(iter, "Colors such as "); 
    312309        buffer.insertWithTagsByName(iter, "a blue foreground", "blue_foreground"); 
    313         buffer.insert(iter, " or ");   
     310        buffer.insert(iter, " or "); 
    314311        buffer.insertWithTagsByName(iter, "a red background", "red_background"); 
    315         buffer.insert(iter, " or even ");   
     312        buffer.insert(iter, " or even "); 
    316313        buffer.insertWithTagsByName(iter, "a stippled red background", 
    317314                                    "red_background", "background_stipple"); 
    318315 
    319         buffer.insert(iter, " or ");   
     316        buffer.insert(iter, " or "); 
    320317        buffer.insertWithTagsByName(iter, 
    321318            "a stippled blue foreground on solid red background", 
     
    323320            "red_background", 
    324321            "foreground_stipple"); 
    325         buffer.insert(iter, " (select that to read it) can be used.\n\n");   
     322        buffer.insert(iter, " (select that to read it) can be used.\n\n"); 
    326323 
    327324        buffer.insertWithTagsByName(iter, "Underline, strikethrough, and rise. ", "heading"); 
    328    
     325 
    329326        buffer.insertWithTagsByName(iter, "Strikethrough", "strikethrough"); 
    330327        buffer.insert(iter, ", "); 
     
    339336 
    340337        buffer.insertWithTagsByName(iter, "Images. ", "heading"); 
    341    
     338 
    342339        buffer.insert(iter, "The buffer can have images in it: "); 
    343340        if ( pixbuf !is  null ) 
     
    356353 
    357354        buffer.insert(iter, "You can adjust the amount of space before each line.\n"); 
    358    
     355 
    359356        buffer.insertWithTagsByName(iter, "This line has a whole lot of space before it.\n", 
    360357                        "big_gap_before_line", "wide_margins"); 
     
    362359                        "You can also adjust the amount of space after each line; this line has a whole lot of space after it.\n", 
    363360                        "big_gap_after_line", "wide_margins"); 
    364    
     361 
    365362        buffer.insertWithTagsByName(iter, 
    366363                        "You can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.\n", 
     
    370367 
    371368        buffer.insertWithTagsByName(iter, "Editability. ", "heading"); 
    372    
     369 
    373370        buffer.insertWithTagsByName(iter, 
    374371                        "This line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.\n\n", 
     
    378375 
    379376        buffer.insert(iter, 
    380               "This line (and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n");   
    381    
     377              "This line (and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n"); 
     378 
    382379        buffer.insertWithTagsByName(iter, 
    383380                        "This line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", 
    384381                        "char_wrap"); 
    385    
     382 
    386383        buffer.insertWithTagsByName(iter, 
    387384                        "This line has all wrapping turned off, so it makes the horizontal scrollbar appear.\n\n\n", 
    388385                        "no_wrap"); 
    389386 
    390         buffer.insertWithTagsByName(iter, "Justification. ", "heading");   
    391    
     387        buffer.insertWithTagsByName(iter, "Justification. ", "heading"); 
     388 
    392389        buffer.insertWithTagsByName(iter, 
    393390                        "\nThis line has center justification.\n", "center"); 
     
    398395        buffer.insertWithTagsByName(iter, 
    399396                        "\nThis line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.\n", 
    400                         "wide_margins");   
     397                        "wide_margins"); 
    401398 
    402399        buffer.insertWithTagsByName(iter, "Internationalization. ", "heading"); 
    403        
     400 
    404401        buffer.insert(iter, 
    405               "You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew  \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n");   
     402              "You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew  \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n"); 
    406403 
    407404        buffer.insert(iter, "Here's a word-wrapped quote in a right-to-left language:\n"); 
    408405        buffer.insertWithTagsByName(iter, "\331\210\331\202\330\257 \330\250\330\257\330\243 \330\253\331\204\330\247\330\253 \331\205\331\206 \330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \330\252\331\202\330\257\331\205\330\247 \331\201\331\212 \330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 \330\250\330\261\330\247\331\205\330\254\331\207\330\247 \331\203\331\205\331\206\330\270\331\205\330\247\330\252 \331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 \330\253\331\205 \330\252\330\255\331\210\331\204\330\252 \331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 \330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 \330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 \331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 \331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 \330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 \331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207\330\260\331\207 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \331\206\330\254\330\247\330\255\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 \331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", 
    409406                        "rtl_quote"); 
    410        
     407 
    411408        buffer.insert(iter, "You can put widgets in the buffer: Here's a button: "); 
    412409        anchor = buffer.createChildAnchor(iter); 
     
    420417        anchor = buffer.createChildAnchor(iter); 
    421418        buffer.insert(iter, ".\n"); 
    422    
     419 
    423420        buffer.insert(iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text (doesn't work in GTK 2, but planned), tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such..."); 
    424421 
     
    438435        TextBuffer buffer; 
    439436        int i; 
    440          
     437 
    441438        buffer = view.getBuffer(); 
    442439 
     
    450447            Widget widget; 
    451448            anchor = iter.getChildAnchor(); 
    452              
     449 
    453450            if (i == 0) 
    454451            { 
     
    458455            else if (i == 1) 
    459456            { 
    460                  
     457 
    461458                ComboBox comboBox = new ComboBox(); 
    462459                comboBox.appendText("Option 1"); 
     
    485482                //g_assert_not_reached (); 
    486483            } 
    487              
     484 
    488485            if ( widget !is  null ) 
    489486            { 
    490487                view.addChildAtAnchor(widget,anchor); 
    491488            } 
    492      
     489 
    493490            ++i; 
    494491        } 
    495492    } 
    496      
     493 
    497494    bool findAnchor (TextIter iter) 
    498495    { 
     
    506503        return false; 
    507504    } 
    508      
     505 
    509506} 
  • trunk/demos/gtkD/TestDrawingArea.d

    r480 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2626private import pango.PgLayout; 
    2727private import gdk.ImageGdk; 
    28          
     28 
    2929version(Tango) private import tango.io.Stdout; 
    3030version(Tango) private import tango.stdc.stdio; 
    3131else private import std.stdio; 
    3232 
    33 version(Tango) private import tango.math.Math;  
     33version(Tango) private import tango.math.Math; 
    3434else private import std.math; 
    3535 
     
    4545private import gdk.Drawable; 
    4646private import gdk.GC; 
    47 private import pango.PgFontDescription;     
     47private import pango.PgFontDescription; 
    4848 
    4949private import gtk.DrawingArea; 
     
    5151private import gtk.SpinButton; 
    5252 
    53 private import gtkc.gtktypes;        
    5453private import gdk.Event; 
    5554 
     
    5857//private import event.Event; 
    5958 
    60      
     59 
    6160/** 
    6261 * This tests the gtkD drawing area widget 
     
    7271        debug(Tango) Stdout("TestDrawingArea.this() 2").newline; 
    7372        TestDrawing drawingArea = new TestDrawing(); 
    74          
     73 
    7574        debug(Tango) Stdout("TestDrawingArea.this() 3").newline; 
    76          
     75 
    7776        ComboBox gcOptions = new ComboBox(); 
    7877        gcOptions.appendText("GC COPY"); 
     
    114113 
    115114        packStart(drawingArea,true,true,0); 
    116          
     115 
    117116        HBox hbox = new HBox(false,4); 
    118117        hbox.packStart(gcOptions,false,false,2); 
     
    120119        hbox.packStart(drawingArea.spin,false,false,2); 
    121120        hbox.packStart(drawingArea.backSpin,false,false,2); 
    122          
     121 
    123122        debug(Tango) Stdout("TestDrawingArea.this() 6").newline; 
    124          
     123 
    125124        packStart(hbox, false, false, 0); 
    126          
     125 
    127126        debug(Tango) Stdout("TestDrawingArea.this() END").newline; 
    128127    } 
    129128 
    130      
     129 
    131130    class TestDrawing : DrawingArea 
    132131    { 
    133132 
    134          
     133 
    135134        GdkFunction gcFunction = GdkFunction.INVERT; 
    136135        Color paintColor; 
     
    139138        int width; 
    140139        int height; 
    141          
     140 
    142141        bool buttonIsDown; 
    143          
     142 
    144143        string primitiveType; 
    145144        PgFontDescription font; 
    146145        Image image; 
    147146        Pixbuf scaledPixbuf; 
    148          
     147 
    149148        SpinButton spin; 
    150149        SpinButton backSpin; 
     
    159158            {-1,1} 
    160159            ]; 
    161          
     160 
    162161        this() 
    163162        { 
    164163            debug(Tango) Stdout("TestDrawing.this() 1").newline; 
    165              
     164 
    166165            setSizeRequest(333,333); 
    167166            width = getWidth(); 
     
    189188            backSpin = new SpinButton(new Adjustment(5, 4, 100, 1, 10, 10),1,0); 
    190189            backSpin.addOnValueChanged(&backSpinChanged); 
    191          
    192  
    193              
     190 
     191 
     192 
    194193            addOnExpose(&exposeCallback); 
    195194//          addOnMap(&mapCallback); 
     
    205204            height = allocation.height; 
    206205        } 
    207          
    208          
     206 
     207 
    209208        public int onButtonPress(GdkEventButton* event, Widget widget) 
    210209        { 
     
    220219                gc.setForeground(new Color(cast(ubyte)0,cast(ubyte)0,cast(ubyte)0)); 
    221220                gc.setFunction(gcFunction); 
    222                  
     221 
    223222                drawPrimitive(gc, d, cast(int)event.x, cast(int)event.y); //event.getX(), event.getY()); 
    224223 
     
    248247            return false; 
    249248        } 
    250          
     249 
    251250        /** 
    252251         * This will be called from the expose event call back. 
     
    275274                gc.setForeground(paintColor); 
    276275                gc.setFunction(gcFunction); 
    277                  
     276 
    278277                drawPrimitive(gc, d, cast(int)event.x, cast(int)event.y); 
    279278                //d.drawPoint(event.getX(),event.getY()); 
    280279                //d.drawArc(true,event.getX()-2,event.getY()-2,4,4,0,64*360); 
    281280                //d.drawRectangle(true,event.getX()-2,event.getY()-2,4,4); 
    282                  
     281 
    283282                gc.setForeground(black); 
    284283                gc.setFunction(GdkFunction.COPY); 
     
    294293 
    295294        static int backSpinCount = 0; 
    296          
     295 
    297296        public void backSpinChanged(SpinButton spinButton) 
    298297        { 
    299              
     298 
    300299            debug(trace) version(Tango) Stdout.format("backSpinChanged - entry {}", ++backSpinCount).newline; 
    301300            else writefln("backSpinChanged - entry %s", ++backSpinCount); 
     
    312311                int width = spinButton.getValueAsInt(); 
    313312                scaledPixbuf = image.getPixbuf(); 
    314              
     313 
    315314                float ww = width * scaledPixbuf.getWidth() / 30; 
    316315                float hh = width * scaledPixbuf.getHeight() / 30; 
    317              
     316 
    318317                scaledPixbuf = scaledPixbuf.scaleSimple(cast(int)ww, cast(int)hh, GdkInterpType.HYPER); 
    319318            } 
    320319        } 
    321                      
    322  
    323          
     320 
     321 
     322 
    324323        public void drawPrimitive(GC gc, Drawable d, int x, int y) 
    325324        { 
     
    333332                    d.drawArc(gc, false,x-width/2,y-width/2,width,width,0,64*360); 
    334333                    break; 
    335                      
     334 
    336335                case "Filled Arc": 
    337336                    d.drawArc(gc, true,x-width/4,y-width/4,width/2,width/2,0,64*360); 
     
    341340                    d.drawLine(gc, x, y, x+width, y); 
    342341                    break; 
    343                      
     342 
    344343                case "Point": 
    345344                    d.drawPoint(gc, x, y); 
    346345                    break; 
    347                      
     346 
    348347                case "Rectangle": 
    349348                    d.drawRectangle(gc, false, x-width/2, y-width/4, width, height); 
    350349                    break; 
    351                      
     350 
    352351                case "Filled Rectangle": 
    353352                    d.drawRectangle(gc, true, x-width/2, y-width/4, width, height); 
    354353                    break; 
    355                      
     354 
    356355                case "Text": 
    357356                    Font font = new Font("FreeMono 12"); 
     
    360359                    d.drawString( font, gc,x, y, "gtkD toolkit"); 
    361360                    break; 
    362                  
     361 
    363362                case "Pango text": 
    364363                    //PgContext pc = getPangoContext(); 
     
    369368                    PgFontDescription fd = new PgFontDescription("Sans", width); 
    370369                    l.setFontDescription(fd); 
    371                      
     370 
    372371                    d.drawLayout(gc, x,y,l); 
    373372                    break; 
    374                  
     373 
    375374                case "Image": 
    376375                    if ( !(scaledPixbuf is null)) 
    377376                    { 
    378377                        scaledPixbuf.renderToDrawable( d, gc, 
    379                         //d.getDrawableStruct(), gc.getGCStruct(),  
    380                             0, 0, x, y,  
    381                             scaledPixbuf.getWidth(), scaledPixbuf.getHeight(),  
     378                        //d.getDrawableStruct(), gc.getGCStruct(), 
     379                            0, 0, x, y, 
     380                            scaledPixbuf.getWidth(), scaledPixbuf.getHeight(), 
    382381                            GdkRgbDither.NONE, 0, 0 
    383382                            ); 
    384383                    } 
    385384                    break; 
    386                  
     385 
    387386                case "Polygon": 
    388387                    GdkPoint[] pol1; 
     
    398397                    } 
    399398                    break; 
    400                  
     399 
    401400                default: 
    402401                    d.drawArc(gc, true,x-2,y-2,4,4,0,64*360); 
     
    404403            } 
    405404        } 
    406          
     405 
    407406        private void drawPoints(Drawable d) 
    408407        { 
     
    422421            debug(trace) version(Tango) Stdout.format("w,h = {} {}",width ,height).newline; 
    423422            else writefln("w,h = %s %s",width ,height); 
    424              
     423 
    425424            float dx = 256.0 / width; 
    426425            float dy = 256.0 / height ; 
     
    490489            } 
    491490        } 
    492          
     491 
    493492        void onPrimOptionChanged(ComboBox comboBox) 
    494493        { 
    495494            primitiveType = comboBox.getActiveText(); 
    496495        } 
    497          
     496 
    498497// 
    499498//      void primitive(MenuItem item) 
     
    502501//          primitiveType.set(item.getActionCommand().dup); 
    503502//      } 
    504          
     503 
    505504    } 
    506505 
  • trunk/demos/gtkD/TestEntries.d

    r322 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2020 
    2121private import gtk.Table; 
    22      
     22 
    2323private import gtk.Entry; 
    2424private import gtk.CheckButton; 
    2525private import gtk.Button; 
    2626private import gtk.Label; 
    27 private import gtkc.gtktypes; 
    2827 
    2928private import glib.Str; 
     
    3433 */ 
    3534class TestEntries : Table 
    36 {   
     35{ 
    3736    /** 
    3837     * Out main widget to test 
     
    5150        attach(new Label("Input text"),0,1,0,1,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); 
    5251        attach(entry,1,2,0,1,AttachOptions.EXPAND,AttachOptions.EXPAND,4,4); 
    53          
     52 
    5453        // create a button that will print the content of the entry to stdout 
    5554        Button testButton = new Button("Show entry", &showEntry); 
    5655        attach(testButton,2,3,0,1,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); 
    5756        //testButton.setTooltip("This is just a test",null); 
    58          
     57 
    5958        // create a button that will change the entry display mode to invisible 
    6059        // i.e. like a password entry 
     
    7978        entry.setEditable(button.getActive()); 
    8079    } 
    81      
     80 
    8281    void entryVisible(CheckButton button) 
    8382    { 
  • trunk/demos/gtkD/TestIdle.d

    r322 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2424private import gtk.HBox; 
    2525private import gtk.Box; 
    26      
     26 
    2727private import gtk.DrawingArea; 
    2828private import gdk.Event; 
    2929private import gtk.Widget; 
    3030private import gtk.ComboBox; 
    31 private import gtkc.gtktypes; 
    3231 
    3332private import gdk.Color; 
     
    4443private import gtk.Idle; 
    4544private import gtk.Timeout; 
    46          
     45 
    4746 
    4847/** 
     
    5352 
    5453    SpinButton timeoutSpin; 
    55      
     54 
    5655    this() 
    5756    { 
    58          
     57 
    5958        debug(1) 
    6059        { 
     
    6564 
    6665        TestDrawing drawingArea = new TestDrawing(); 
    67          
     66 
    6867        ComboBox gcOptions = new ComboBox(); 
    6968        gcOptions.appendText("GC COPY"); 
     
    9594        timeoutSpin.addOnValueChanged(&drawingArea.onTimeoutSpinValueChanged); 
    9695        Box controlBox = new HBox(false, 7); 
    97          
     96 
    9897        controlBox.packStart(gcOptions, false, false, 2); 
    9998        controlBox.packStart(callType, false, false, 2); 
    10099        controlBox.packStart(timeoutSpin, false, false, 2); 
    101          
     100 
    102101        packStart(drawingArea,true,true,0); 
    103102        packStart(controlBox,false,false,0); 
    104103    } 
    105      
     104 
    106105    class TestDrawing : DrawingArea 
    107106    { 
     
    109108        Idle mainIdle; 
    110109        Timeout mainTimeout; 
    111          
     110 
    112111        bool continueIdleCallback; 
    113112        int gcFunction = 0; 
     
    144143            //addOnButtonPress(&onButtonPress); 
    145144            //addOnButtonRelease(&onButtonRelease); 
    146              
     145 
    147146        } 
    148147 
     
    155154            return false; 
    156155        } 
    157          
     156 
    158157        public void onMap(Widget widget) 
    159158        { 
     
    192191            } 
    193192        } 
    194          
     193 
    195194        void resetCallType() 
    196195        { 
     
    210209            } 
    211210        } 
    212          
     211 
    213212        /** 
    214213         * This will be called from the expose event call back. 
     
    227226            //printf("%d %d\n",width,height); 
    228227            //drawable.drawPoint(gc,x,y); 
    229              
     228 
    230229            int xf; 
    231230            int yf; 
    232              
     231 
    233232            if ( xi<0 )xf = x;  // going back 
    234233            else xf = width-x; 
    235              
     234 
    236235            if ( yi<0 )yf = y;  // going up 
    237236            else yf = height-y; 
    238              
     237 
    239238            if ( xf<yf ) yf=xf; 
    240              
     239 
    241240            //writefln("%s %s -> %s %s (%s %s)\n",x,y,xf,yf,x+yf*xi, y+yf*yi); 
    242241            drawable.drawLine(gc,x,y, x+yf*xi, y+yf*yi); 
    243              
     242 
    244243            x += yf*xi; 
    245244            y += yf*yi; 
    246              
     245 
    247246            if ( x>=width || x<=0 ) xi = -xi; 
    248247            if ( y>=height || y<=0 ) yi = -yi; 
     
    253252        void onCallTypeChanged(ComboBox comboBox) 
    254253        { 
    255             debug(trace) version(Tango) Stdout.format("gcOptions = {}", comboBox.getActiveText()).newline;  
     254            debug(trace) version(Tango) Stdout.format("gcOptions = {}", comboBox.getActiveText()).newline; 
    256255            else writefln("gcOptions = %s", comboBox.getActiveText()); 
    257256            switch ( comboBox.getActiveText() ) 
     
    263262            resetCallType(); 
    264263        } 
    265          
     264 
    266265        void onCGOptionsChanged(ComboBox comboBox) 
    267266        { 
    268             debug(trace) version(Tango) Stdout.format("gcOptions = {}", comboBox.getActiveText()).newline;  
     267            debug(trace) version(Tango) Stdout.format("gcOptions = {}", comboBox.getActiveText()).newline; 
    269268            else writefln("gcOptions = %s", comboBox.getActiveText()); 
    270269            switch ( comboBox.getActiveText() ) 
  • trunk/demos/gtkD/TestImage.d

    r525 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2222 
    2323private import gtk.VBox; 
    24      
     24 
    2525private import gtk.Table; 
    2626private import gtk.FileChooserDialog; 
     
    3333 
    3434private import gtk.Window; 
    35  
    36 private import gtkc.gtktypes; 
    3735 
    3836version(Tango) private import tango.io.Stdout; 
     
    5048    FileChooserDialog fs; 
    5149    ScrolledWindow sw; 
    52      
     50 
    5351    Window window; 
    54      
     52 
    5553    this(Window window) 
    5654    { 
     
    6260 
    6361        super(false,8); 
    64          
     62 
    6563        sw = new ScrolledWindow(null,null); 
    66          
     64 
    6765        sw.addWithViewport(initTable()); 
    6866 
     
    7573 
    7674    } 
    77      
     75 
    7876    Table initTable() 
    7977    { 
    8078 
    8179        string[] pngs; 
    82          
     80 
    8381        pngs ~= "images/gtkD_bevel.png"; 
    8482        pngs ~= "images/gtkDlogo_a.png"; 
     
    8987        pngs ~= "images/gtkD_logo.png"; 
    9088        pngs ~= "images/gtkD_logo_too_small.png"; 
    91          
    92          
     89 
     90 
    9391        return loadTable(pngs); 
    9492    } 
    95      
     93 
    9694    private Table loadTable(string[] imageFiles) 
    9795    { 
     
    105103            table.removeAll(); 
    106104        } 
    107          
     105 
    108106 
    109107        int row = 0; 
     
    111109 
    112110        Image image; 
    113          
    114          
     111 
     112 
    115113//      Window progressWindow = new Window();//WindowType.POPUP); 
    116114//      progressWindow.setBorderWidth(10); 
     
    118116//      progressWindow.add(progressBar); 
    119117//      progressWindow.show(); 
    120          
     118 
    121119 
    122120        for ( int i=0 ; i<imageFiles.length ;i++) 
     
    141139                ++row; 
    142140            } 
    143              
     141 
    144142        } 
    145143        return table; 
     
    147145 
    148146private import glib.ListSG; 
    149      
     147 
    150148    void loadImages(Button button) 
    151149    { 
     
    166164            string[] fileNames; 
    167165            ListSG list = fs.getFilenames(); 
    168              
    169              
     166 
     167 
    170168            for ( int i = 0; i<list.length() ; i++) 
    171169            { 
    172                 debug(trace) version(Tango) Stdout.format("Testmage.loadImages.File selected = {}",  
     170                debug(trace) version(Tango) Stdout.format("Testmage.loadImages.File selected = {}", 
    173171                        Str.toString(cast(char*)list.nthData(i))).newline; 
    174                 else writefln("Testmage.loadImages.File selected = %s",  
     172                else writefln("Testmage.loadImages.File selected = %s", 
    175173                        Str.toString(cast(char*)list.nthData(i))); 
    176174                fileNames ~= Str.toString(cast(char*)list.nthData(i)); 
    177175            } 
    178              
     176 
    179177            loadTable(fileNames); 
    180178        } 
  • trunk/demos/gtkD/TestScales.d

    r322 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    1919module gtkD.TestScales; 
    2020 
    21 private import gtkc.gtktypes; 
    2221private import gtk.Table; 
    2322 
     
    4544 
    4645class TestScales : Table //, MenuItemListener 
    47 {   
     46{ 
    4847    VScale vscale; 
    4948    HScale hscale; 
     
    5857 
    5958        super(1,1,0); 
    60          
     59 
    6160        createRangeControls(); 
    6261    } 
     
    7574            Scale scale; 
    7675            Adjustment adj1, adj2; 
    77              
     76 
    7877            box1 = new VBox(false,0); 
    7978            add(box1); 
     
    8887             * (upper - page_size). */ 
    8988            adj1 = new Adjustment(0.0, 0.0, 101.0, 0.1, 1.0, 1.0); 
    90    
     89 
    9190            vscale = new VScale(adj1); 
    9291            //scale_set_default_values (GTK_SCALE (vscale)); 
     
    118117            cButton.addOnClicked(&displayValues); 
    119118            box2.packStart(cButton,true,true,0); 
    120    
     119 
    121120            box2 = new HBox(false,10); 
    122121            box2.setBorderWidth(10); 
     
    125124            label = new Label("Scale Value Position:"); 
    126125            box2.packStart(label,false,false,0); 
    127    
     126 
    128127            positionSelection = new ComboBox(); 
    129128            positionSelection.appendText("Top"); 
     
    146145 
    147146            updateSelection = new ComboBox(); 
    148    
     147 
    149148            updateSelection.appendText("Continuous"); 
    150149            updateSelection.appendText("Discontinuous"); 
     
    155154            box2.packStart(updateSelection,false,false,0); 
    156155            box1.packStart(box2,false,false,0); 
    157                
    158                
     156 
     157 
    159158            /** 
    160159             * Here is a bit a pure C GTK+ code. 
    161              * This code would compile and execute in D,  
     160             * This code would compile and execute in D, 
    162161             * we just need to define the functions as extern. 
    163162             */ 
     
    165164            box2 = gtk_hbox_new (FALSE, 10); 
    166165            gtk_container_set_border_width (GTK_CONTAINER (box2), 10); 
    167    
     166 
    168167            /* An HScale widget for adjusting the number of digits on the 
    169168             * sample scales. */ 
     
    182181            gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); 
    183182            gtk_widget_show (box2); 
    184    
     183 
    185184            box2 = gtk_hbox_new (FALSE, 10); 
    186185            gtk_container_set_border_width (GTK_CONTAINER (box2), 10); 
    187    
     186 
    188187            /* And, one last HScale widget for adjusting the page size of the 
    189188             * scrollbar. */ 
     
    228227    void onPositionSelectionChanged(ComboBox comboBox) 
    229228    { 
    230          
     229 
    231230        switch ( comboBox.getActiveText() ) 
    232231        { 
     
    252251        } 
    253252    } 
    254      
     253 
    255254    void onUpdateSelectionChanged(ComboBox comboBox) 
    256255    { 
     
    273272        } 
    274273    } 
    275      
    276      
    277      
     274 
     275 
     276 
    278277    /* 
    279278    void activateItemCallback(MenuItem menuItem, char [] action) 
    280279    { 
    281280    } 
    282      
     281 
    283282    void activateCallback(MenuItem menuItem, char [] action) 
    284283    { 
     
    316315                printf("menuItem.action %.*s received\n",action); 
    317316            break; 
    318              
     317 
    319318        } 
    320319    } 
     
    328327        hscale.setDrawValue((cast(CheckButton)checkButton).getActive()); 
    329328    } 
    330      
     329 
    331330} 
  • trunk/demos/gtkD/TestStock.d

    r322 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    1919module gtkD.TestStock; 
    2020 
    21 private import gtkc.gtktypes
     21private import gtk.ScrolledWindow
    2222 
    23 private import gtk.ScrolledWindow; 
    24      
    2523private import gtk.Widget; 
    2624private import gtk.Table; 
     
    3836 */ 
    3937class TestStock : ScrolledWindow 
    40 {   
     38{ 
    4139 
    4240    this() 
     
    5149        int col = 0; 
    5250        int row = 0; 
    53          
     51 
    5452        Color color = new Color(cast(ubyte)0,cast(ubyte)255,cast(ubyte)255); 
    55          
     53 
    5654        IconSize size = Button.getIconSize(); 
    5755        Button.setIconSize(IconSize.DIALOG); 
     
    6664            //Cursor cursor = new Cursor(CursorType.CLOCK); 
    6765            //button.setCursor(cursor); 
    68              
     66 
    6967//          button.addOnEnterNotify(&enterNotify); 
    7068//          button.addOnLeaveNotify(&leaveNotify); 
    71              
    72              
     69 
     70 
    7371            table.attach(button,col,col+1,row,row+1,AttachOptions.SHRINK,AttachOptions.SHRINK,2,2); 
    7472            ++row; 
     
    7977            } 
    8078        } 
    81          
     79 
    8280        Button.setIconSize(size); 
    8381        addWithViewport(table); 
  • trunk/demos/gtkD/TestText.d

    r374 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2020 
    2121private import gtk.VBox; 
    22      
     22 
    2323private import gtk.ScrolledWindow; 
    2424private import gtk.TextView; 
     
    3030 
    3131class TestText : VBox 
    32 {   
     32{ 
    3333 
    3434    private import gtk.ScrolledWindow; 
    35     private import gtkc.gtktypes; 
    36      
     35 
    3736    this() 
    3837    { 
    3938 
    4039        super(false,0); 
    41          
     40 
    4241        debug(1) 
    4342        { 
     
    5150        TextBuffer textBuffer = textView.getBuffer(); 
    5251        textBuffer.setText( 
    53          
     52 
    5453"\nGktD preview 8" 
    5554"\n" 
     
    7675"\nSee the Screen shots and Usage for screenshots and details on how to use GtkD." 
    7776"\nHere is a simple GtkD program:" 
    78          
     77 
    7978        ); 
    80          
     79 
    8180        sw.add(textView); 
    8281        packStart(sw,true,true,0); 
  • trunk/demos/gtkD/TestTreeView.d

    r480 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2020 
    2121private import gtk.ScrolledWindow; 
    22      
    23      
    24 private import gtkc.gtktypes; 
     22 
    2523private import gtk.TreeView; 
    2624private import gtk.TreePath; 
     
    3230private import gtk.TreeSelection; 
    3331private import gtk.CellRendererText; 
    34      
     32 
    3533private import gtk.Image; 
    3634//private import ddi.Pixbuf; 
     
    8583class TestTreeView : ScrolledWindow 
    8684{ 
    87     Image image;        
     85    Image image; 
    8886    //Pixbuf pixbuf; 
    8987 
     
    9795        author = GType.STRING 
    9896    } 
    99      
     97 
    10098    this() 
    10199    { 
    102100        super(null,null); 
    103          
     101 
    104102        TreeView treeView = setup(); 
    105103        addWithViewport(treeView); 
    106          
     104 
    107105        treeView.addOnRowActivated(&rowActivatedCallback); 
    108106        treeView.addOnMoveCursor(&moveCursorCallBack); 
    109107    } 
    110      
     108 
    111109    void rowActivatedCallback(TreePath path, TreeViewColumn column, TreeView treeView) 
    112110    { 
     
    114112        printf("rowActivateCallback for path %.*s\n",path.toString()); 
    115113    } 
    116      
     114 
    117115    int moveCursorCallBack(GtkMovementStep step, int direction, TreeView treeView) 
    118116    { 
     
    121119        return false; 
    122120    } 
    123      
     121 
    124122    TreeIter [12] h; 
    125123    int stack = 0; 
     
    145143        return h[--stack]; 
    146144    } 
    147      
     145 
    148146    class HTreeNode : TreeNode 
    149147    { 
    150          
     148 
    151149        string gtkDL; 
    152150        string gtk; 
     
    155153        string author; 
    156154        //TestTreeView ttv; 
    157          
     155 
    158156        this(string gtkDL,string gtk,string desc,int percent)//, TestTreeView ttv) 
    159157        { 
     
    164162            this.author = "Ant"; 
    165163            //this.ttv = ttv; 
    166              
     164 
    167165        } 
    168166 
     
    171169        //  return pixbuf; 
    172170        //} 
    173          
     171 
    174172        int columnCount() 
    175173        { 
    176174            return 5; 
    177175        } 
    178          
     176 
    179177        string getNodeValue(int column) 
    180178        { 
     
    186184                case 1: value = gtk; break; 
    187185                case 2: value = desc; break; 
    188                 case 3:  
     186                case 3: 
    189187                    switch(percent) 
    190188                    { 
     
    198196                    } 
    199197                    break; 
    200                      
     198 
    201199                case 4: value = author; break; 
    202200                default: value = "N/A"; break; 
     
    205203        } 
    206204    } 
    207      
     205 
    208206    TreeView setup() 
    209207    { 
     
    220218                    GType.STRING, 
    221219                    GType.STRING, 
    222                     GType.STRING];  
     220                    GType.STRING]; 
    223221                super(columns); 
    224                  
     222 
    225223            } 
    226224        } 
    227          
     225 
    228226        TTreeStore testTreeStore = new TTreeStore(); 
    229227        TreeView treeView = new TreeView(testTreeStore); 
    230228        treeView.setRulesHint(true); 
    231          
     229 
    232230        TreeSelection ts = treeView.getSelection(); 
    233231        ts.setMode(SelectionMode.MULTIPLE); 
     
    274272        TreeIter iter; 
    275273        TreeIter iterTop = testTreeStore.createIter(null); 
    276          
     274 
    277275        TreeIter peekIter(bool pushIt) 
    278276        { 
     
    284282            return iter; 
    285283        } 
    286          
     284 
    287285        TreeIter popIter(bool pushIt) 
    288286        { 
     
    294292            return iter; 
    295293        } 
    296          
     294 
    297295        push(iterTop); 
    298296        testTreeStore.set(iterTop, new HTreeNode("ObjectG","GObject","Parent of the main GtkD objects",90)); 
    299          
     297 
    300298        testTreeStore.set(peekIter(true), new HTreeNode("ObjectGtk","GtkObject","The main gtk object",100)); 
    301299        testTreeStore.set(peekIter(true), new HTreeNode("Misc","GtkMisc","Comon for Most widgets",100)); 
     
    307305        testTreeStore.set(peekIter(true), new HTreeNode("Container","GtkContainer","Comon for all widgets that can contain other widgets",90)); 
    308306        testTreeStore.set(peekIter(false), new HTreeNode("Bin","GtkBin","Comon for many widgets",90)); 
    309          
     307 
    310308        testTreeStore.set(peekIter(false), new HTreeNode("Alignment","GtkAlignment","Aligns a widget in a larger area",100)); 
    311309        testTreeStore.set(peekIter(true), new HTreeNode("Frame","GtkFrame","",100)); 
     
    400398 
    401399        return treeView; 
    402          
    403     }   
     400 
     401    } 
    404402 
    405403 
  • trunk/demos/gtkD/TestTreeView1.d

    r480 r535  
    11/* 
    22 * This file is part of gtkD. 
    3  *  
     3 * 
    44 * gtkD is free software; you can redistribute it and/or modify 
    55 * it under the terms of the GNU Lesser General Public License as published by 
    66 * the Free Software Foundation; either version 2.1 of the License, or 
    77 * (at your option) any later version. 
    8  *  
     8 * 
    99 * gtkD is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * GNU Lesser General Public License for more details. 
    13  *  
     13 * 
    1414 * You should have received a copy of the GNU Lesser General Public License 
    1515 * along with gtkD; if not, write to the Free Software 
     
    2222 
    2323private import gtk.VBox; 
    24      
     24 
    2525private import gobject.Value; 
    26      
    27 private import gtkc.gtktypes; 
     26 
    2827private import gtk.Image; 
    2928private import gtk.TreeView; 
     
    3635private import gtk.CellRendererText; 
    3736private import gtk.ScrolledWindow; 
    38 private import gdk.Pixbuf;  
     37private import gdk.Pixbuf; 
    3938private import glib.Str; 
    4039version(Tango) private import tango.io.Stdout; 
    4140version(Tango) private import tango.stdc.stdio; 
    4241else private import std.stdio; 
    43      
     42 
    4443/** 
    4544 * This tests the gtkD tree widget 
     
    5958    TreeStore testTreeStore1; 
    6059    TreeStore testTreeStore2; 
    61      
     60 
    6261    this() 
    6362    { 
    64          
     63 
    6564        debug(trace) version(Tango) Stdout("TestTreeView1.this 1").newline; 
    6665        else writefln("TestTreeView1.this 1"); 
     
    6867        debug(trace) version(Tango) Stdout("TestTreeView1.this 2").newline; 
    6968        else writefln("TestTreeView1.this 2"); 
    70          
     69 
    7170        pixbuf = new Pixbuf(Str.toStringzArray(greenClass_xpm)); 
    7271        debug(trace) version(Tango) Stdout("TestTreeView1.this 2.1").newline; 
     
    9796        sw.add(treeView2); 
    9897        packStart(sw, true, true, 1); 
    99          
     98 
    10099        debug(trace) version(Tango) Stdout("TestTreeView1.this 6").newline; 
    101100        else writefln("TestTreeView1.this 6"); 
    102101        //addWithViewport(treeView); 
    103          
    104          
    105          
     102 
     103 
     104 
    106105    } 
    107      
     106 
    108107    int moveCursorCallback(GtkMovementStep step, int i, TreeView tree) 
    109108    { 
     
    116115        return false; 
    117116    } 
    118      
    119  
    120      
     117 
     118 
     119 
    121120    void populate(TreeStore treeStore) 
    122121    { 
     
    125124        treeStore.setValue(iterTop, 0, new Pixbuf(Str.toStringzArray(package_xpm)) ); 
    126125        treeStore.setValue(iterTop, 1, "Icon for packages" ); 
    127                              
     126 
    128127        iterChild = treeStore.append(iterTop); 
    129128        treeStore.setValue(iterChild, 0,new Pixbuf(Str.toStringzArray(greenTemplate_xpm)) ); 
    130129        treeStore.setValue(iterChild, 1, "Icon for templates" ); 
    131          
     130 
    132131        iterChild = treeStore.append(iterTop); 
    133132        treeStore.setValue(iterChild, 0, new Pixbuf(Str.toStringzArray(greenInterface_xpm)) ); 
    134133        treeStore.setValue(iterChild, 1, "Icon for interfaces" ); 
    135          
     134 
    136135        iterChild = treeStore.append(iterTop); 
    137136        treeStore.setValue(iterChild, 0, new Pixbuf(Str.toStringzArray(greenClass_xpm)) ); 
    138137        treeStore.setValue(iterChild, 1, "Icon for classes" ); 
    139          
     138 
    140139    } 
    141140 
    142141    /** 
    143142     * Creates the treeView and treeStore 
    144      * @return  
     143     * @return 
    145144     */ 
    146145    TreeView setup1() 
     
    151150            { 
    152151                //int* i = cast(int*)pixbufGetType(); 
    153                  
     152 
    154153                GType[] columns; 
    155154                columns ~= Pixbuf.getType(); 
    156155                columns ~= GType.STRING; 
    157156                super(columns); 
    158                  
     157 
    159158            } 
    160159        } 
     
    163162        TreeView treeView = new TreeView(testTreeStore1); 
    164163        treeView.setRulesHint(true); 
    165          
     164 
    166165        TreeSelection ts = treeView.getSelection(); 
    167166        ts.setMode(SelectionMode.MULTIPLE); 
     
    171170        treeView.appendColumn(column); 
    172171        ++col; 
    173          
     172 
    174173        column = new TreeViewColumn("Description",new CellRendererText(),"text", col); 
    175174        treeView.appendColumn(column); 
     
    181180 
    182181        return treeView; 
    183          
    184     }   
     182 
     183    } 
    185184 
    186185        /** 
    187186     * Creates the treeView and treeStore 
    188      * @return  
     187     * @return 
    189188     */ 
    190189    TreeView setup2() 
     
    195194            { 
    196195                //int* i = cast(int*)pixbufGetType(); 
    197                  
     196 
    198197                GType[] columns; 
    199198                columns ~= Pixbuf.getType(); 
    200199                columns ~= GType.STRING; 
    201200                super(columns); 
    202                  
     201 
    203202            } 
    204203        } 
     
    207206        TreeView treeView = new TreeView(testTreeStore2); 
    208207        treeView.setRulesHint(true); 
    209          
     208 
    210209        TreeSelection ts = treeView.getSelection(); 
    211210        ts.setMode(SelectionMode.MULTIPLE); 
    212211        TreeViewColumn column; 
    213212        int col = 0; 
    214          
     213 
    215214        column = new TreeViewColumn(); 
    216          
     215 
    217216        CellRendererPixbuf cellPixbuf = new CellRendererPixbuf(); 
    218217        CellRendererText cellText = new CellRendererText(); 
    219          
     218 
    220219        column.packStart(cellPixbuf, false); 
    221220        column.addAttribute(cellPixbuf, "pixbuf", col); 
    222221        ++col; 
    223          
     222 
    224223        column.packEnd(cellText, true); 
    225224        column.addAttribute(cellText, "text", col); 
    226          
     225 
    227226        column.setTitle("Types"); 
    228          
     227 
    229228        treeView.appendColumn(column); 
    230          
     229 
    231230        column.setResizable(true); 
    232231        column.setReorderable(true); 
     
    236235 
    237236        return treeView; 
    238          
    239     }   
    240  
    241      
     237 
     238    } 
     239 
     240 
    242241    void rowActivatedCallback(TreeView treeView, TreePath path, TreeViewColumn column) 
    243242    { 
     
    245244        printf("rowActivateCallback for path %.*s\n",path.toString()); 
    246245    } 
    247      
    248      
     246 
     247 
    249248    /* XPM */ 
    250249    static string[] greenClass_xpm = [ 
     
    333332    "                ", 
    334333    "                "]; 
    335      
    336      
     334 
     335 
    337336    /* XPM */ 
    338337    static string[] greenInterface_xpm = [ 
     
    416415    "                ", 
    417416    "                "]; 
    418      
    419      
     417 
     418 
    420419    /* XPM */ 
    421420    static string[] greenTemplate_xpm = [ 
     
    500499    "                ", 
    501500    "                "]; 
    502      
     501 
    503502    /* XPM */ 
    504503    static string[] package_xpm = [ 
     
    575574    "                " 
    576575    ]; 
    577      
     576 
    578577 
    579578} 
  • trunk/demos/gtkD/dsss.conf

    r512 r535  
    11[*] 
    2 buildflags =  -I../ -no-export-dynamic 
     2buildflags =  -I../ -I../../src -no-export-dynamic 
    33version(linux) { 
    44    buildflags +=-L-ldl 
  • trunk/demos/pango/dsss.conf

    r511 r535  
    22version = 0.1 
    33 
    4 requires = gtkd  
     4requires = gtkd 
    55 
    66[pangocairo.d] 
    77type = binary 
    88target = pangocairo 
    9 buildflags = -no-export-dynamic 
     9buildflags = -I../../src -no-export-dynamic 
    1010version(linux) { 
    1111    buildflags +=-L-ldl 
  • trunk/demos/sourceView/dsss.conf

    r481 r535  
    66type = binary 
    77target = SVTest 
    8 buildflags = -I../ -no-export-dynamic  
     8buildflags = -I../ -I../../src -I../../srcsv -no-export-dynamic 
    99version(linux) { 
    1010        buildflags +=-L-ldl 
  • trunk/dsss.conf

    r446 r535  
    3434#postbuild = cd demos ; ./demoselect.sh sv 
    3535 
     36[srcgstreamer] 
     37type = subdir 
     38#postbuild = cd demos ; ./demoselect.sh sv 
     39 
    3640[demos] 
    3741type = subdir