Changeset 28

Show
Ignore:
Timestamp:
12/12/06 02:21:22 (2 years ago)
Author:
lindquist
Message:

Fixed some minor bugs in FlowLayout?.
Fixed implicit conversions to pointers.
Fixed some bugs where toStringz was not used but should.
Updated API documentation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/minwin/app.d

    r11 r28  
    9393                return toUTF8(wres[0..len]); 
    9494            else { 
    95                 return fromMBSz(cres[0..len]); 
     95                return fromMBSz(cres[0..len].ptr); 
    9696            } 
    9797        } 
  • trunk/minwin/button.d

    r20 r28  
    464464        } 
    465465        void text(char[] c) { 
    466             gtk_button_set_label(cast(GtkButton*)peer,g_strdup(c.ptr)); 
     466            gtk_button_set_label(cast(GtkButton*)peer,toStringz(c)); 
    467467        } 
    468468    } 
  • trunk/minwin/dialog.d

    r22 r28  
    397397        void initialFile(char[] f) { 
    398398            if (native.lpstrFile is null) { 
    399                 native.lpstrFile = new char[MAX_PATH]
     399                native.lpstrFile = (new char[MAX_PATH]).ptr
    400400                native.nMaxFile = MAX_PATH; 
    401401            } 
     
    427427        data.native.Flags = OFN_PATHMUSTEXIST; 
    428428        if (data.native.lpstrFile is null) { 
    429             data.native.lpstrFile = new char[MAX_PATH]
     429            data.native.lpstrFile = (new char[MAX_PATH]).ptr
    430430            data.native.nMaxFile = MAX_PATH; 
    431431            data.native.lpstrFile[0] = 0; 
     
    443443        data.native.Flags = OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST; 
    444444        if (data.native.lpstrFile is null) { 
    445             data.native.lpstrFile = new char[MAX_PATH]
     445            data.native.lpstrFile = (new char[MAX_PATH]).ptr
    446446            data.native.nMaxFile = MAX_PATH; 
    447447            data.native.lpstrFile[0] = 0; 
  • trunk/minwin/docs/builddocs.bat

    r24 r28  
    1 set docs=app button component dialog event geometry group icon image layout menu multidg paint peer peerimpl window index 
     1set docs=app button component dialog event geometry group icon image label layout menu multidg paint peer peerimpl window index 
    22FOR %%f in (%docs%) do dmd -c -o- -D -Ddhtml minwin.ddoc minwin/%%f.d 
  • trunk/minwin/docs/html/app.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/button.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/component.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/dialog.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/event.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
     
    394396</big></dt> 
    395397<dd>Read-only property for the keyboard <u>modifiers</u> held down during the event. 
    396 <br /> 
    397 <br /> 
    398  
    399  
    400 </dd> 
    401 <dt><big>Point <u>point</u>; 
    402 </big></dt> 
    403 <dd>The location of the event in source component coordinates. 
    404398<br /> 
    405399<br /> 
  • trunk/minwin/docs/html/geometry.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/group.html

    r24 r28  
    3131 
    3232        <a href="image.html" class="toc">image</a> <br /> 
     33 
     34        <a href="label.html" class="toc">label</a> <br /> 
    3335 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
  • trunk/minwin/docs/html/icon.html

    r24 r28  
    3131 
    3232        <a href="image.html" class="toc">image</a> <br /> 
     33 
     34        <a href="label.html" class="toc">label</a> <br /> 
    3335 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
  • trunk/minwin/docs/html/image.html

    r24 r28  
    3131 
    3232        <a href="image.html" class="toc">image</a> <br /> 
     33 
     34        <a href="label.html" class="toc">label</a> <br /> 
    3335 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
  • trunk/minwin/docs/html/index.html

    • Property svn:mime-type set to text/html
    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/layout.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/menu.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/multidg.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/paint.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/html/peer.html

    r24 r28  
    3131 
    3232        <a href="image.html" class="toc">image</a> <br /> 
     33 
     34        <a href="label.html" class="toc">label</a> <br /> 
    3335 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
  • trunk/minwin/docs/html/peerimpl.html

    r24 r28  
    3131 
    3232        <a href="image.html" class="toc">image</a> <br /> 
     33 
     34        <a href="label.html" class="toc">label</a> <br /> 
    3335 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
  • trunk/minwin/docs/html/window.html

    r24 r28  
    3232        <a href="image.html" class="toc">image</a> <br /> 
    3333 
     34        <a href="label.html" class="toc">label</a> <br /> 
     35 
    3436        <a href="layout.html" class="toc">layout</a> <br /> 
    3537 
  • trunk/minwin/docs/minwin/event.d

    r23 r28  
    125125    /// Read-only property for the keyboard modifiers held down during the event. 
    126126    int modifiers; 
    127     /// The location of the event in source component coordinates. 
    128     Point point; 
    129127} 
    130128/// Platform-specific id for window size events. 
  • trunk/minwin/font.d

    r11 r28  
    5959        bool italic() { return native.lfItalic != 0; } 
    6060        char[] name() { 
    61             char* s = native.lfFaceName
     61            char* s = native.lfFaceName.ptr
    6262            return s[0..strlen(s)]; 
    6363        } 
  • trunk/minwin/label.d

    r25 r28  
    144144            char* str = gtk_label_get_text(cast(GtkLabel*)peer); 
    145145            if (str is null) 
    146                 return null
     146                return ""
    147147            else 
    148148                return str[0..strlen(str)].dup; 
     
    150150 
    151151        void text(char[] c) { 
    152             gtk_label_set_text(cast(GtkLabel*)peer,g_strdup(c.ptr)); 
     152            gtk_label_set_text(cast(GtkLabel*)peer,toStringz(c)); 
    153153        } 
    154154    } 
  • trunk/minwin/layout.d

    r18 r28  
    104104                version(LOG) log.printf(" got flow child size for %x\n",ch); 
    105105                if (dir == Dir.Vertical) { 
    106                     y += flowGap; // what about first item? 
     106                    if (n != 0 && n < flowReverse) y += flowGap; // what about first item? 
    107107                    if (n >= flowReverse) y -= h; 
    108108                    int x1 = x, w1 = width; 
     
    129129                    if (n < flowReverse) y += h; 
    130130                } else { 
    131                     x += flowGap; 
     131                    if (n < flowReverse) x += flowGap; 
    132132                    if (n >= flowReverse) x -= w; 
    133133                    int y1 = y, h1 = height; 
  • trunk/minwin/mswindows.d

    r19 r28  
    542542        if (useWfuncs) { 
    543543            wchar[] wstr = toUTF16(str); 
    544             return GetTextExtentPoint32W(dc, wstr, wstr.length, s); 
     544            return GetTextExtentPoint32W(dc, wstr.ptr, wstr.length, s); 
    545545        } else { 
    546546            size_t al; 
     
    602602 
    603603            reslen = result.length ? result.length-1 : 0; 
    604             return result
     604            return result.ptr
    605605        } 
    606606    } 
  • trunk/minwin/paint.d

    r11 r28  
    284284            if (useWfuncs) { 
    285285                wchar[] buf = toUTF16(str); 
    286                 ok = TextOutW(peer, x, y, buf, buf.length); 
     286                ok = TextOutW(peer, x, y, buf.ptr, buf.length); 
    287287            } 
    288288            else { 
  • trunk/minwin/window.d

    r22 r28  
    217217                char[64] res; 
    218218                int len = GetWindowTextA(peer,res.ptr,res.length); 
    219                 return fromMBSz(res[0..len]); 
     219                return fromMBSz(res[0..len].ptr); 
    220220            } 
    221221        }