Changeset 63

Show
Ignore:
Timestamp:
05/17/07 11:52:18 (2 years ago)
Author:
lindquist
Message:

added samples/tablegrid

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/bughunt/docs/minwin/layout.d

    r44 r63  
    6363    /// Construct a TableLayout with extra width distributed among the columns according to colScales and the extra height among the rows according to rowScales. The scale values must be between 0 and 1 and must total 1. The gap is the space in pixels to leave between children. 
    6464    this(double[] colScales, double[] rowScales, int gap = 0); 
     65    /// Construct a evenly distributed TableLayout with width and height given in cells. The gap is the space in pixels to leave between children. 
     66    this(int width, int height, int gap = 0); 
    6567    /// Position children in the grid starting from the upper left and moving initially along the first row. 
    6668    void layout(Component c); 
  • branches/bughunt/dsss.conf

    r61 r63  
    1717[samples/sdialog.d] 
    1818[samples/sdialog2.d] 
     19[samples/tablegrid.d] 
    1920[samples/topgroup.d] 
    2021[samples/widgets.d] 
  • branches/bughunt/minwin/layout.d

    r33 r63  
    1212public import minwin.component; 
    1313 
    14 private import minwin.logging; 
     14import minwin.app; 
     15version(LOG) import minwin.logging; 
    1516 
    1617interface LayoutManager { 
     
    223224    } 
    224225 
     226    this(int width, int height, int gap = 0) { 
     227        sysAssert(width > 0 && height > 0, "0 or negative passed as width or height to TableLayout"); 
     228        double dr = 1.0 / height; 
     229        double dc = 1.0 / width; 
     230        rowScales = new double[height]; 
     231        colScales = new double[width]; 
     232        rowScales[] = dr; 
     233        colScales[] = dc; 
     234        this.gap = gap; 
     235        reset(); 
     236    } 
     237 
    225238    void reset() { 
    226239        prows.length = rowScales.length; 
  • branches/bughunt/minwin/logging.d

    r33 r63  
    11module minwin.logging; 
    2  
    3 public import std.stream; 
    4 public import std.cstream; 
    52 
    63//version=StdOutLog; 
    74 
    85version (LOG) { 
     6    public import std.stream; 
     7    public import std.cstream; 
    98    Stream log; 
    109    version (StdOutLog) {