Changeset 473 for trunk/Include


Ignore:
Timestamp:
Mar 12, 2008, 9:54:46 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

実験として書いていたControlクラスを追加(せめてコミット前に既存のContorolに混ぜようとしたがコンパイルできなかった)。
ほかForms, Drawing及びGDI+の修正。

Location:
trunk/Include
Files:
7 added
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/ActiveBasic/Windows/WindowHandle.sbp

    r303 r473  
    586586
    587587    Const Function ClientRect() As RECT
    588         Dim rc As RECT
    589         _System_GetClientRect(hwnd, rc)
    590         Return rc
     588        _System_GetClientRect(hwnd, ClientRect)
    591589    End Function
    592590#ifdef _UNDEF
     
    603601#endif
    604602    Const Function WindowRect() As RECT
    605         Dim rc As RECT
    606         _System_GetWindowRect(hwnd, rc)
    607         Return rc
     603        _System_GetWindowRect(hwnd, WindowRect)
    608604    End Function
    609605
  • trunk/Include/Classes/System/Console.ab

    r435 r473  
    3636    */
    3737    Static Function ReadLine() As String
    38         Dim lock = enter()
    39         Try
    40             ReadLine = in.ReadLine()
    41         Finally
    42             lock.Leave()
    43         End Try
     38        ReadLine = in.ReadLine()
    4439    End Function
    4540
     
    5045    */
    5146    Static Function Read() As Long
    52         Dim lock = enter()
    53         Try
    54             Read = in.Read()
    55         Finally
    56             lock.Leave()
    57         End Try
     47        Read = in.Read()
    5848    End Function
    5949Private
  • trunk/Include/Classes/System/Drawing/CharacterRange.ab

    r166 r473  
    99        first = f
    1010        length = l
    11     End Sub
    12 
    13     Sub CharacterRange(ByRef c As CharacterRange)
    14         first = c.first
    15         length = c.length
    1611    End Sub
    1712
     
    3025
    3126    Function Length() As Long
    32         Return l
     27        Return length
    3328    End Function
    3429
     
    3732    End Sub
    3833
    39     Sub Operator = (ByRef c As CharacterRange)
    40         first  = c.first
    41         length = c.length
    42     End Sub
    43 
    44     Function Operator ==(c As CharacterRange)
     34    Function Operator ==(c As CharacterRange) As Boolean
    4535        Return Equals(c)
    4636    End Function
    4737
    48     Function Operator <>(c As CharacterRange)
     38    Function Operator <>(c As CharacterRange) As Boolean
    4939        Return Not Equals(c)
    5040    End Function
    5141
    52     Function Equals(c As CharacterRange)
     42    Function Equals(c As CharacterRange) As Boolean
    5343        Return first = c.first And length = c.length
    5444    End Function
  • trunk/Include/Classes/System/Drawing/Color.ab

    r370 r473  
    44#define __SYSTEM_DRAWING_COLOR_AB__
    55
    6 '#include <Classes/System/Math.ab>
    76#include <Classes/System/Drawing/Imaging/misc.ab>
    87
     
    2827        argb = newArgb
    2928    End Sub
    30 /*
    31     Sub Operator =(c As Color)
    32         argb = c.argb
    33     End Sub
    34 */
     29
    3530    Function Operator ==(c As Color) As Boolean
    3631        Return Equals(c)
     
    4237
    4338    Function A() As Byte
    44         Return (argb >> ALPHA_SHIFT) As Byte
     39        A = (argb >> ALPHA_SHIFT) As Byte
    4540    End Function
    4641
    4742    Function R() As Byte
    48         Return (argb >> RED_SHIFT) As Byte
     43        R = (argb >> RED_SHIFT) As Byte
    4944    End Function
    5045
    5146    Function G() As Byte
    52         Return (argb >> GREEN_SHIFT) As Byte
     47        G = (argb >> GREEN_SHIFT) As Byte
    5348    End Function
    5449
    5550    Function B() As Byte
    56         Return (argb >> BLUE_SHIFT) As Byte
     51        B = (argb >> BLUE_SHIFT) As Byte
    5752    End Function
    5853
    5954    Function Value() As ARGB
    60         Return argb
     55        Value = argb
    6156    End Function
    6257
  • trunk/Include/Classes/System/Drawing/Font.ab

    r212 r473  
    1 #ifndef _GDIPLUSFONT_H
    2 #define _GDIPLUSFONT_H
    3 
    4 #require <GdiPlus.ab>
    5 #require <Classes/System/Drawing/misc.ab>
     1/**
     2@file Classes/System/Drawing/Font.ab
     3@brief Fontクラスなどの実装。
     4*/
     5
    66#require <Classes/System/Drawing/Graphics.ab>
    77
     
    1010
    1111Class Font
     12    Implements System.IDisposable
    1213Public
    1314'    friend class Graphics
     
    130131        /*IN*/ style As Long, /*IN*/ unit As GraphicsUnit,
    131132        /*IN const*/ fontCollection As FontCollection)
    132 #ifdef __STRING_IS_NOT_UNICODE
    133         Dim oldAlloc = _System_AllocForConvertedString
    134         _System_AllocForConvertedString = AddressOf (_System_malloc)
    135         Dim name = ToWCStr(familyName)
    136         Font(name, emSize, style, unit, fontCollection)
    137         _System_free(name)
    138         _System_AllocForConvertedString = oldAlloc
    139 #else
    140         Font(familyName.Chars, emSize, style, unit, fontCollection)
    141 #endif
     133        Font(ToWCStr(familyName), emSize, style, unit, fontCollection)
    142134    End Sub
    143135
    144136    Const Function GetLogFontA(/*IN const*/ g As Graphics, /*OUT*/ ByRef lf As LOGFONTA) As Status
    145137        Dim nativeGraphics As *GpGraphics
    146         If VarPtr(g) <> 0 Then
     138        If Not ActiveBasic.IsNothing(g) Then
    147139            nativeGraphics = g.nativeGraphics
    148140        End If
     
    152144    Const Function GetLogFontW(/*IN const*/ g As Graphics, /*OUT*/ ByRef lf As LOGFONTW) As Status
    153145        Dim nativeGraphics As *GpGraphics
    154         If VarPtr(g) <> 0 Then
     146        If Not ActiveBasic.IsNothing(g) Then
    155147            nativeGraphics = g.nativeGraphics
    156148        End If
     
    160152    Const Function GetLogFont(/*IN const*/ g As Graphics, /*OUT*/ ByRef lf As LOGFONT) As Status
    161153        Dim nativeGraphics As *GpGraphics
    162         If VarPtr(g) <> 0 Then
     154        If Not ActiveBasic.IsNothing(g) Then
    163155            nativeGraphics = g.nativeGraphics
    164156        End If
     
    212204    Const Function GetHeight(/*IN const*/ g As Graphics) As Single
    213205        Dim nativeGraphics As *GpGraphics
    214         If VarPtr(g) <> 0 Then
     206        If Not ActiveBasic.IsNothing(g) Then
    215207            nativeGraphics = g.NativeGraphics
    216208        End If
     
    270262    'Const Function SizeInPoint() As Boolean
    271263
    272     Const Function NativeFont() As *GpFont
    273         Return nativeFont
    274     End Function
    275 
    276264    Const Function StrikeOut() As Boolean
    277265        Dim lf As LOGFONT
     
    341329    /*mutable*/ lastResult As Status
    342330End Class
    343 
    344 #endif
  • trunk/Include/Classes/System/Drawing/Graphics.ab

    r212 r473  
    1414Class CachedBitmap : End Class
    1515
    16 #include <GdiplusGpStubs.ab>
    17 #include <GdiPlusFlat.ab>
    18 #include <Classes/System/Drawing/misc.ab>
    19 #include <Classes/System/Drawing/Rectangle.ab>
    20 #include <Classes/System/Drawing/RectangleF.ab>
    21 #include <Classes/System/Drawing/Point.ab>
    22 #include <Classes/System/Drawing/PointF.ab>
    23 #include <Classes/System/Drawing/SizeF.ab>
    24 #include <Classes/System/Drawing/Font.ab>
    25 '#include <Classes/System/Drawing/Brush.ab>
    26 '#include <Classes/System/Drawing/Pen.ab>
    27 '#include <Classes/System/Drawing/Region.ab>
    28 '#include <Classes/System/Drawing/StringFormat.ab>
    29 '#include <Classes/System/Drawing/Image.ab>
    30 #include <Classes/System/Drawing/Drawing2D/misc.ab>
    31 #include <Classes/System/Drawing/Drawing2D/Matrix.ab>
    32 
    3316Class Graphics
    3417Public
  • trunk/Include/Classes/System/Drawing/Point.ab

    r303 r473  
    11' Classes/System/Drawing/Point.ab
    22
    3 #ifndef __SYSTEM_DRAWING_POINT_AB__
    4 #define __SYSTEM_DRAWING_POINT_AB__
    5 
    6 #require <Classes/System/Drawing/PointF.ab>
    7 #require <Classes/System/Drawing/Size.ab>
    8 #require <Classes/System/Drawing/SizeF.ab>
     3Namespace System
     4Namespace Drawing
    95
    106Class Point
     
    3127
    3228    Function X() As Long
    33         Return x
     29        X = x
    3430    End Function
    3531
     
    3935
    4036    Function Y() As Long
    41         Return y
     37        X = y
    4238    End Function
    4339
     
    5046    End Function
    5147
    52     Function Operator + (pt As Point) As Point
     48    Function Operator +(pt As Point) As Point
    5349        Return Add(This, pt)
    5450    End Function
    5551
    56     Function Operator + (sz As Size) As Point
     52    Function Operator +(sz As Size) As Point
    5753        Return Add(This, sz)
    5854    End Function
    5955
    60     Function Operator - (pt As Point) As Point
     56    Function Operator -(pt As Point) As Point
    6157        Return Substract(This, pt)
    6258    End Function
    6359
    64     Function Operator - (sz As Size) As Point
     60    Function Operator -(sz As Size) As Point
    6561        Return Substract(This, sz)
    6662    End Function
    6763
    68     Function Operator == (sz As Point) As Boolean
     64    Function Operator ==(sz As Point) As Boolean
    6965        Return Equals(sz)
    7066    End Function
    7167
    72     Function Operator <> (sz As Point) As Boolean
     68    Function Operator <>(sz As Point) As Boolean
    7369        Return Not Equals(sz)
    7470    End Function
     
    108104
    109105    Static Function Ceiling(ptf As PointF) As Point
    110         Return New Point(System.Math.Ceiling(ptf.X) As Long, System.Math.Ceiling(ptf.Y) As Long)
     106        Return New Point(Math.Ceiling(ptf.X) As Long, Math.Ceiling(ptf.Y) As Long)
    111107    End Function
    112108
    113109    Static Function Round(ptf As PointF) As Point
    114         Return New Point(System.Math.Round(ptf.X) As Long, System.Math.Round(ptf.Y) As Long)
     110        Return New Point(Math.Round(ptf.X) As Long, Math.Round(ptf.Y) As Long)
    115111    End Function
    116112
    117113    Static Function Truncate(ptf As PointF) As Point
    118         Return New Point(System.Math.Truncate(ptf.X) As Long, System.Math.Truncate(ptf.Y) As Long)
     114        Return New Point(Math.Truncate(ptf.X) As Long, Math.Truncate(ptf.Y) As Long)
    119115    End Function
    120116
     
    128124End Class
    129125
    130 #endif '__SYSTEM_DRAWING_POINT_AB__
     126End Namespace
     127End Namespace
  • trunk/Include/Classes/System/Drawing/PointF.ab

    r303 r473  
    11' Classes/System/Drawing/PointF.ab
    22
    3 #ifndef __SYSTEM_DRAWING_POINTF_AB__
    4 #define __SYSTEM_DRAWING_POINTF_AB__
    5 
    6 #include <Classes/System/Drawing/Size.ab>
    7 #include <Classes/System/Drawing/SizeF.ab>
     3Namespace System
     4Namespace Drawing
    85
    96Class PointF
     
    3027
    3128    Function X() As Single
    32         Return x
     29        X = x
    3330    End Function
    3431
     
    3835
    3936    Function Y() As Single
    40         Return y
     37        Y = y
    4138    End Function
    4239
     
    8279
    8380    Static Function Add(pt1 As PointF, pt2 As PointF) As PointF
    84         Dim ret As PointF(pt1.x + pt2.x, pt1.y + pt2.y)
    85         Return ret
     81        Return New PointF(pt1.x + pt2.x, pt1.y + pt2.y)
    8682    End Function
    8783
    8884    Static Function Add(pt As PointF, sz As Size) As PointF
    89         Dim ret As PointF(pt.x + sz.Width, pt.y + sz.Height)
    90         Return ret
     85        Return New PointF(pt.x + sz.Width, pt.y + sz.Height)
    9186    End Function
    9287
    9388    Static Function Add(pt As PointF, sz As SizeF) As PointF
    94         Dim ret As PointF(pt.x + sz.Width, pt.y + sz.Height)
    95         Return ret
     89        Return New PointF(pt.x + sz.Width, pt.y + sz.Height)
    9690    End Function
    9791
    9892    Static Function Substract(pt1 As PointF, pt2 As PointF) As PointF
    99         Dim ret As PointF(pt1.x - pt2.x, pt1.y - pt2.y)
    100         Return ret
     93        Return New PointF(pt1.x - pt2.x, pt1.y - pt2.y)
    10194    End Function
    10295
    10396    Static Function Substract(pt As PointF, sz As Size) As PointF
    104         Dim ret As PointF(pt.x - sz.Width, pt.y - sz.Height)
    105         Return ret
     97        Return New PointF(pt.x - sz.Width, pt.y - sz.Height)
    10698    End Function
    10799
    108100    Static Function Substract(pt As PointF, sz As SizeF) As PointF
    109         Dim ret As PointF(pt.x - sz.Width, pt.y - sz.Height)
    110         Return ret
     101        Return New PointF(pt.x - sz.Width, pt.y - sz.Height)
    111102    End Function
    112103
     
    124115End Class
    125116
    126 #endif '__SYSTEM_DRAWING_POINTF_AB__
     117End Namespace
     118End Namespace
  • trunk/Include/Classes/System/Drawing/Rectangle.ab

    r335 r473  
    11' Classes/System/Drawing/Rectangle.ab
    22
    3 #ifndef __SYSTEM_DRAWING_RECTANGLE_AB__
    4 #define __SYSTEM_DRAWING_RECTANGLE_AB__
    5 
    6 '#require <Classes/System/Math.ab>
    7 #require <Classes/System/Drawing/RectangleF.ab>
    8 #require <Classes/System/Drawing/Point.ab>
    9 #require <Classes/System/Drawing/Size.ab>
     3Namespace System
     4Namespace Drawing
    105
    116Class Rectangle
     
    4035
    4136    Function Location() As Point
    42         Dim pt As Point(x, y)
    43         Return pt
     37        Location = New Point(x, y)
    4438    End Function
    4539
     
    5044
    5145    Function Size() As Size
    52         Dim size As Size(width, height)
     46        Size = New Size(width, height)
    5347    End Function
    5448
     
    5953
    6054    Function X() As Long
    61         Return x
     55        X = x
    6256    End Function
    6357
     
    6761
    6862    Function Y() As Long
    69         Return y
     63        Y = y
    7064    End Function
    7165
     
    7569
    7670    Function Width() As Long
    77         Return width
     71        Width = width
    7872    End Function
    7973
     
    8377
    8478    Function Height() As Long
    85         Return height
     79        Height = height
    8680    End Function
    8781
     
    9185
    9286    Function Left() As Long
    93         Return X
     87        Left = X
    9488    End Function
    9589
    9690    Function Top() As Long
    97         Return Y
     91        Top = Y
    9892    End Function
    9993
    10094    Function Right() As Long
    101         Return X + Width
     95        Right = X + Width
    10296    End Function
    10397
    10498    Function Bottom() As Long
    105         Return Y + Height
     99        Bottom = Y + Height
    106100    End Function
    107101
     
    110104    End Function
    111105
    112     Function Operator == (rc As Rectangle) As Boolean
     106    Function Operator ==(rc As Rectangle) As Boolean
    113107        Return Equals(rc)
    114108    End Function
    115109
    116     Function Operator <> (rc As Rectangle) As Boolean
     110    Function Operator <>(rc As Rectangle) As Boolean
    117111        Return (Not Equals(rc))
    118112    End Function
     
    206200    Static Function Ceiling(rcf As RectangleF) As Rectangle
    207201        Dim r As Rectangle(
    208             System.Math.Ceiling(rcf.X) As Long,
    209             System.Math.Ceiling(rcf.Y) As Long,
    210             System.Math.Ceiling(rcf.Width) As Long,
    211             System.Math.Ceiling(rcf.Height) As Long)
     202            Math.Ceiling(rcf.X) As Long,
     203            Math.Ceiling(rcf.Y) As Long,
     204            Math.Ceiling(rcf.Width) As Long,
     205            Math.Ceiling(rcf.Height) As Long)
    212206        Return r
    213207    End Function
     
    215209    Static Function Round(rcf As RectangleF) As Rectangle
    216210        Dim r As Rectangle(
    217             System.Math.Round(rcf.X) As Long,
    218             System.Math.Round(rcf.Y) As Long,
    219             System.Math.Round(rcf.Width) As Long,
    220             System.Math.Round(rcf.Height) As Long)
     211            Math.Round(rcf.X) As Long,
     212            Math.Round(rcf.Y) As Long,
     213            Math.Round(rcf.Width) As Long,
     214            Math.Round(rcf.Height) As Long)
    221215        Return r
    222216    End Function
     
    224218    Static Function Truncate(rcf As RectangleF) As Rectangle
    225219        Dim r As Rectangle(
    226             System.Math.Truncate(rcf.X) As Long,
    227             System.Math.Truncate(rcf.Y) As Long,
    228             System.Math.Truncate(rcf.Width) As Long,
    229             System.Math.Truncate(rcf.Height) As Long)
     220            Math.Truncate(rcf.X) As Long,
     221            Math.Truncate(rcf.Y) As Long,
     222            Math.Truncate(rcf.Width) As Long,
     223            Math.Truncate(rcf.Height) As Long)
    230224        Return r
    231225    End Function
     
    247241End Class
    248242
    249 #endif '__SYSTEM_DRAWING_RECTFANGLE_AB__
     243End Namespace
     244End Namespace
  • trunk/Include/Classes/System/Drawing/RectangleF.ab

    r335 r473  
    11' Classes/System/Drawing/RectangleF.ab
    22
    3 #ifndef __SYSTEM_DRAWING_RECTANGLEF_AB__
    4 #define __SYSTEM_DRAWING_RECTANGLEF_AB__
    5 
    6 '#include <Classes/System/Math.ab>
    7 #include <Classes/System/Drawing/PointF.ab>
    8 #include <Classes/System/Drawing/SizeF.ab>
     3Namespace System
     4Namespace Drawing
    95
    106Class RectangleF
     
    3935
    4036    Function Location() As PointF
    41         Dim pt As PointF(x, y)
    42         Return pt
     37        Location = New PointF(x, y)
    4338    End Function
    4439
     
    4944
    5045    Function Size() As SizeF
    51         Dim size As SizeF(width, height)
     46        Size = New SizeF(width, height)
    5247    End Function
    5348
     
    5853
    5954    Function X() As Single
    60         Return x
     55        X = x
    6156    End Function
    6257
     
    6661
    6762    Function Y() As Single
    68         Return y
     63        Y = y
    6964    End Function
    7065
     
    7469
    7570    Function Width() As Single
    76         Return width
     71        Width = width
    7772    End Function
    7873
     
    8277
    8378    Function Height() As Single
    84         Return height
     79        Height = height
    8580    End Function
    8681
     
    9085
    9186    Function Left() As Single
    92         Return X
     87        Left = X
    9388    End Function
    9489
    9590    Function Top() As Single
    96         Return Y
     91        Top = Y
    9792    End Function
    9893
    9994    Function Right() As Single
    100         Return X + Width
     95        Right = X + Width
    10196    End Function
    10297
    10398    Function Bottom() As Single
    104         Return Y + Height
     99        Bottom = Y + Height
    105100    End Function
    106101
     
    210205End Class
    211206
    212 #endif '__SYSTEM_DRAWING_RECTFANGLE_AB__
     207End Namespace
     208End Namespace
  • trunk/Include/Classes/System/Drawing/Size.ab

    r335 r473  
    11' Classes/System/Drawing/Size.ab
    22
    3 #ifndef __SYSTEM_DRAWING_SIZE_AB__
    4 #define __SYSTEM_DRAWING_SIZE_AB__
    5 
    6 '#include <Classes/System/Math.ab>
    7 #include <Classes/System/Drawing/SizeF.ab>
     3Namespace System
     4Namespace Drawing
    85
    96Class Size
     
    4138
    4239    Function Operator +(sz As Size) As Size
    43         Dim ret As Size(width + sz.width, height + sz.height)
    44         Return ret
     40        Return New Size(width + sz.width, height + sz.height)
    4541    End Function
    4642
    4743    Function Operator -(sz As Size) As Size
    48         Dim ret As Size(width - sz.width, height - sz.height)
    49         Return ret
     44        Return New Size(width - sz.width, height - sz.height)
    5045    End Function
    5146
    5247    Function Operator () As SizeF
    53         Dim szf As SizeF(width, height)
    54         Return szf
     48        Return New SizeF(width, height)
    5549    End Function
    5650
     
    6256        Return Not Equals(sz)
    6357    End Function
    64 /*
    65     Sub Operator =(ByRef sz As Size)
    66         width = sz.width
    67         height = sz.height
    68     End Sub
    69 */
     58
    7059    Function Equals(sz As Size) As Boolean
    7160        If width = sz.width And height = sz.height Then
     
    9382
    9483    Static Function Ceiling(szf As SizeF) As Size
    95         Dim sz As Size(System.Math.Ceiling(szf.Width) As Long, System.Math.Ceiling(szf.Height) As Long)
    96         Return sz
     84        Return New Size(System.Math.Ceiling(szf.Width) As Long, System.Math.Ceiling(szf.Height) As Long)
    9785    End Function
    9886
    9987    Static Function Round(szf As SizeF) As Size
    100         Dim sz As Size(System.Math.Round(szf.Width) As Long, System.Math.Round(szf.Height) As Long)
    101         Return sz
     88        Return New Size(System.Math.Round(szf.Width) As Long, System.Math.Round(szf.Height) As Long)
    10289    End Function
    10390
    10491    Static Function Truncate(szf As SizeF) As Size
    105         Dim sz As Size(System.Math.Truncate(szf.Width) As Long, System.Math.Truncate(szf.Height) As Long)
    106         Return sz
     92        Return New Size(System.Math.Truncate(szf.Width) As Long, System.Math.Truncate(szf.Height) As Long)
    10793    End Function
    10894
     
    11298End Class
    11399
    114 #endif '__SYSTEM_DRAWING_SIZE_AB__
     100End Namespace
     101End Namespace
  • trunk/Include/Classes/System/Drawing/SizeF.ab

    r303 r473  
    11' Classes/System/Drawing/SizeF.ab
    22
    3 #ifndef __SYSTEM_DRAWING_SIZEF_AB__
    4 #define __SYSTEM_DRAWING_SIZEF_AB__
    5 
    6 #include <Classes/System/Drawing/Size.ab>
    7 #include <Classes/System/Drawing/PointF.ab>
     3Namespace System
     4Namespace Drawing
    85
    96Class SizeF
     
    4138
    4239    Function Operator +(sz As SizeF) As SizeF
    43         Dim ret As SizeF(width + sz.width, height + sz.height)
    44         Return ret
     40        Return New SizeF(width + sz.width, height + sz.height)
    4541    End Function
    4642
    4743    Function Operator -(sz As SizeF) As SizeF
    48         Dim ret As SizeF(width - sz.width, height - sz.height)
    49         Return ret
     44        Return New SizeF(width - sz.width, height - sz.height)
    5045    End Function
    5146
     
    5752        Return Not Equals(sz)
    5853    End Function
    59 /*
    60     Sub Operator =(ByRef sz As SizeF)
    61         width = sz.width
    62         height = sz.height
    63     End Sub
    64 */
     54
    6555    Function Equals(sz As SizeF) As Boolean
    6656        Return width = sz.width And height = sz.height
     
    8878
    8979    Function ToPointF() As PointF
    90         Dim pt As PointF(width, height)
    91         Return pt
     80        Return New PointF(width, height)
    9281    End Function
    9382Private
     
    9685End Class
    9786
    98 #endif '__SYSTEM_DRAWING_SIZEF_AB__
     87End Namespace
     88End Namespace
  • trunk/Include/Classes/System/Drawing/misc.ab

    r137 r473  
    3737
    3838Enum FontStyle
     39/*
    3940    Regular = 0
    4041    Bold = 1
     
    4243    Strikeout = 4
    4344    Underline  = 8
     45*/
    4446End Enum
    4547
  • trunk/Include/Classes/System/IO/StreamWriter.ab

    r470 r473  
     1/*
     2@file Include/Classes/System/IO/StreamWriter.ab
     3@brief StreamWriterの実装。
     4*/
     5
    16Namespace System
    27Namespace IO
    3    
    4    
     8
     9/*
     10@biref ストリームへの書き込みを行うTextWriterの派生。
     11@date 2008/03/09
     12@auther Egtra
     13*/
    514Class StreamWriter
    615    Inherits TextWriter
    716Public
    817    /*
    9     @date 2008/02/25
     18    @date 2008/03/09
    1019    @auther Egtra
    1120    */
     
    1524
    1625    /*
    17     @date 2008/02/25
     26    @date 2008/03/09
    1827    @auther Egtra
    1928    */
    2029    Sub StreamWriter(stream As Stream)
    2130        init(stream)
     31    End Sub
     32
     33    Override Sub Flush()
     34        Dim len = buf.Length
     35        If len > 0 Then
     36            s.Write(StrPtr(buf) As *Byte, 0, len)
     37            buf.Length = 0
     38        End If
    2239    End Sub
    2340
     
    104121End Class
    105122
    106 
    107123End Namespace
    108124End Namespace
  • trunk/Include/Classes/System/IO/TextReader.ab

    r468 r473  
    9898
    9999    Static Function Synchronized(reader As TextReader) As TextReader
     100        Synchronized = New Detail.SynchronizedTextReader(reader)
    100101    End Function
    101102
  • trunk/Include/Classes/System/IO/TextWriter.ab

    r468 r473  
    2828    Sub TextWriter()
    2929        newLine = Environment.NewLine
     30    End Sub
     31
     32    Virtual Sub Flush()
    3033    End Sub
    3134
  • trunk/Include/Classes/System/Windows/Forms/Control.ab

    r461 r473  
    113113    End Sub
    114114
    115     Const Function Bounds() As Rectangle
     115    Const Function Bounds() As Drawing.Rectangle
    116116        Dim wr As RECT
    117117        wr = wnd.WindowRect
    118         Dim r = New Rectangle(wr)
     118        Dim r = New Drawing.Rectangle(wr)
    119119        Dim parent = Parent
    120120        If Object.ReferenceEquals(parent, Nothing) Then
    121             Return parent->RectangleToClient(r)
     121            Return parent.RectangleToClient(r)
    122122        Else
    123123            Return r
     
    129129    End Sub
    130130*/
    131     Const Function Location() As Point
     131    Const Function Location() As Drawing.Point
    132132        Return Bounds.Location
    133133    End Function
     
    137137    End Sub
    138138*/
    139     Const Function Size() As Size
     139    Const Function Size() As Drawing.Size
    140140        Return Bounds.Size
    141141    End Function
     
    213213    End Function
    214214*/
    215     Const Function RectangleToScreen(r As Rectangle) As Rectangle
     215    Const Function RectangleToScreen(r As Drawing.Rectangle) As Drawing.Rectangle
    216216        Dim rc = r.ToRECT
    217217        wnd.ClientToScreen(rc)
    218         Return New Rectangle(rc)
    219     End Function
    220 
    221     Const Function RectangleToClient(r As Rectangle) As Rectangle
     218        Return New Drawing.Rectangle(rc)
     219    End Function
     220
     221    Const Function RectangleToClient(r As Drawing.Rectangle) As Drawing.Rectangle
    222222        Dim rc = r.ToRECT()
    223223        wnd.ScreenToClient(rc)
    224         Return New Rectangle(rc)
     224        Return New Drawing.Rectangle(rc)
    225225    End Function
    226226
     
    405405'   Virtual Function DefaultCursor() As Cursor
    406406
    407     Virtual Function DefaultSize() As Size
    408         Return New Size(300, 300)
     407    Virtual Function DefaultSize() As Drawing.Size
     408        Return New Drawing.Size(300, 300)
    409409    End Function
    410410
     
    543543    End Sub
    544544
    545     Virtual Sub NotifyInvalidate(r As Rectangle)
     545    Virtual Sub NotifyInvalidate(r As Drawing.Rectangle)
    546546        Dim rc As RECT
    547547        rc = r.ToRECT()
  • trunk/Include/Classes/index.ab

    r471 r473  
    3838#require "./System/Diagnostics/TraceListener.ab"
    3939#require "./System/Diagnostics/TraceListenerCollection.ab"
    40 '#require "./System/Drawing/CharacterRange.ab"
     40#require "./System/Drawing/CharacterRange.ab"
    4141#require "./System/Drawing/Color.ab"
    4242'#require "./System/Drawing/Font.ab"
    4343'#require "./System/Drawing/Graphics.ab"
    4444'#require "./System/Drawing/Image.ab"
    45 '#require "./System/Drawing/misc.ab"
     45#require "./System/Drawing/misc.ab"
    4646#require "./System/Drawing/Point.ab"
    47 '#require "./System/Drawing/PointF.ab"
     47#require "./System/Drawing/PointF.ab"
    4848#require "./System/Drawing/Rectangle.ab"
    49 '#require "./System/Drawing/RectangleF.ab"
     49#require "./System/Drawing/RectangleF.ab"
    5050#require "./System/Drawing/Size.ab"
    51 '#require "./System/Drawing/SizeF.ab"
     51#require "./System/Drawing/SizeF.ab"
    5252'#require "./System/Drawing/Drawing2D/Matrix.ab"
    5353'#require "./System/Drawing/Drawing2D/misc.ab"
  • trunk/Include/GdiPlus.ab

    r300 r473  
    77Declare Sub GdipFree Lib "Gdiplus.dll" (ptr As VoidPtr)
    88
    9 Class GdiplusBase
    10 'これにはC++の配置new (placement new)が使われているので、実装を保留する。
    11 End Class
     9#require <GdiplusEnums.ab>
     10#require <GdiplusTypes.ab>
     11#require <GdiplusInit.ab>
     12#require <GdiPlusGpStubs.ab>
    1213
    13 #include <GdiplusEnums.ab>
    14 #include <GdiplusTypes.ab>
    15 #include <GdiplusInit.ab>
    16 #include <GdiPlusGpStubs.ab>
     14'#require <GdiplusFlat.ab>
    1715
    18 #include <GdiplusFlat.ab>
    19 
    20 #include <Classes/System/Drawing/misc.ab>
    21 #include <Classes/System/Drawing/Imaging/misc.ab>
    22 #include <Classes/System/Drawing/Imaging/MetafileHeader.ab>
     16'#require <Classes/System/Drawing/misc.ab>
     17'#require <Classes/System/Drawing/Imaging/misc.ab>
     18'#require <Classes/System/Drawing/Imaging/MetafileHeader.ab>
    2319
    2420#endif 'GDIPLUS_AB
  • trunk/Include/GdiPlusGpStubs.ab

    r300 r473  
    44#define __GDIPLUSGPSTUBS_AB__
    55
    6 #require <GdiPlusTypes.ab>
    7 #require <GdiPlusEnums.ab>
    86#require <Classes/System/Drawing/Drawing2D/misc.ab>
    97#require <Classes/System/Drawing/Drawing2D/Matrix.ab>
     
    8078TypeDef GpUnit = GraphicsUnit
    8179TypeDef GpCoordinateSpace = CoordinateSpace
    82 TypeDef GpPointF = PointF
    83 TypeDef GpPoint = Point
    84 TypeDef GpRectF = RectangleF
    85 TypeDef GpRect = Rectangle
    86 TypeDef GpSizeF = SizeF
     80TypeDef GpPointF = System.Drawing.PointF
     81TypeDef GpPoint = System.Drawing.Point
     82TypeDef GpRectF = System.Drawing.RectangleF
     83TypeDef GpRect = System.Drawing.Rectangle
     84TypeDef GpSizeF = System.Drawing.SizeF
    8785TypeDef GpHatchStyle = HatchStyle
    8886TypeDef GpDashStyle = DashStyle
  • trunk/Include/GdiPlusInit.ab

    r300 r473  
    99End Enum
    1010
    11 Typedef DebugEventProc = *Sub(level As DebugEventLevel, message As *Char)
     11Typedef DebugEventProc = *Sub(level As DebugEventLevel, message As *CHAR)
    1212
    1313Typedef NotificationHookProc = *Function(/*OUT*/ ByRef token As ULONG_PTR) As Status
    1414TypeDef NotificationUnhookProc = *Sub(ByVal token As ULONG_PTR)
    1515
    16 Class GdiplusStartupInput
    17 Public
     16Type GdiplusStartupInput
     17'Class GdiplusStartupInput
     18'Public
    1819    GdiplusVersion As DWord
    19     DebugEventCallback As VoidPtr
     20    DebugEventCallback As DebugEventProc
    2021    SuppressBackgroundThread As BOOL
    2122    SuppressExternalCodecs As BOOL
    2223
    23     Sub GdiplusStartupInput()(debugEventCallback As DebugEventProc, suppressBackgroundThread As BOOL, suppressExternalCodecs As BOOL)
    24         GdiplusVersion = 1
    25         DebugEventCallback = debugEventCallback
    26         SuppressBackgroundThread = suppressBackgroundThread
    27         SuppressExternalCodecs = suppressExternalCodecs
    28     End Sub
    29 End Class
     24'   Sub GdiplusStartupInput()(debugEventCallback As DebugEventProc, suppressBackgroundThread As BOOL, suppressExternalCodecs As BOOL)
     25'       GdiplusVersion = 1
     26'       DebugEventCallback = debugEventCallback
     27'       SuppressBackgroundThread = suppressBackgroundThread
     28'       SuppressExternalCodecs = suppressExternalCodecs
     29'   End Sub
     30'End Class
     31End Type
    3032
    3133Type Align(8) GdiplusStartupOutput
  • trunk/Include/GdiPlusTypes.ab

    r300 r473  
    44#define __GDIPLUSTYPES_AB__
    55
    6 #include <Classes/System/Math.ab>
    7 
    86TypeDef ImageAbort = *Function(p As VoidPtr) As BOOL
    97TypeDef DrawImageAbort = ImageAbort
    108TypeDef GetThumbnailImageAbort = ImageAbort
    119
    12 TypeDef EnumerateMetafileProc = *Function(recordType As EmfPlusRecordType, flags As DWord, dataSize As DWord, data As BytePtr, callbackData As VoidPtr) As BOOL
     10TypeDef EnumerateMetafileProc = *Function(recordType As EmfPlusRecordType, flags As DWord, dataSize As DWord, data As *Byte, callbackData As VoidPtr) As BOOL
    1311
    1412'Const REAL_MAX           = FLT_MAX
     
    4139End Enum
    4240
    43 #include <Classes/System/Drawing/SizeF.ab>
    44 #include <Classes/System/Drawing/Size.ab>
    45 #include <Classes/System/Drawing/PointF.ab>
    46 #include <Classes/System/Drawing/Point.ab>
    47 #include <Classes/System/Drawing/RectangleF.ab>
    48 #include <Classes/System/Drawing/Rectangle.ab>
    49 #include <Classes/System/Drawing/CharacterRange.ab>
    50 
    5141Class PathData
     42/*
    5243Public
    5344    Sub PathData()
     
    6556    End Sub
    6657
    67 Private
    68 /*
    69     Sub PathData(ByRef pd As PathData)
    70         Debug
    71     End Sub
    72 */
    73     Sub Operator =(ByRef pd As PathData)
    74         Debug
    75     End Sub
    76 
    7758Public
    7859    Count As Long
    7960    Points As *PointF
    8061    Types As *BYTE
     62*/
    8163End Class
    8264
     65
    8366#endif '__GDIPLUSTYPES_AB__
  • trunk/Include/api_msg.sbp

    r300 r473  
    1414Const VK_CANCEL =       &H03
    1515Const VK_MBUTTON =      &H04
    16 
     16'#if _WIN32_WINNT >= &H0500
     17Const VK_XBUTTON1 =     &H05
     18Const VK_XBUTTON2 =     &H06
     19'#endif
    1720Const VK_BACK =         &H08
    1821Const VK_TAB =          &H09
     
    6265Const VK_RWIN =         &H5C
    6366Const VK_APPS =         &H5D
     67Const VK_SLEEP =        &H5F
    6468
    6569Const VK_NUMPAD0 =      &H60
     
    115119Const VK_RMENU =        &HA5
    116120
     121'#if _WIN32_WINNT >= &h0500
     122Const VK_BROWSER_BACK =        &HA6
     123Const VK_BROWSER_FORWARD =     &HA7
     124Const VK_BROWSER_REFRESH =     &HA8
     125Const VK_BROWSER_STOP =        &HA9
     126Const VK_BROWSER_SEARCH =      &HAA
     127Const VK_BROWSER_FAVORITES =   &HAB
     128Const VK_BROWSER_HOME =        &HAC
     129
     130Const VK_VOLUME_MUTE =         &HAD
     131Const VK_VOLUME_DOWN =         &HAE
     132Const VK_VOLUME_UP =           &HAF
     133Const VK_MEDIA_NEXT_TRACK =    &HB0
     134Const VK_MEDIA_PREV_TRACK =    &HB1
     135Const VK_MEDIA_STOP =          &HB2
     136Const VK_MEDIA_PLAY_PAUSE =    &HB3
     137Const VK_LAUNCH_MAIL =         &HB4
     138Const VK_LAUNCH_MEDIA_SELECT = &HB5
     139Const VK_LAUNCH_APP1 =         &HB6
     140Const VK_LAUNCH_APP2 =         &HB7
     141'#endif
     142
     143Const VK_OEM_1 =        &HBA
     144Const VK_OEM_PLUS =     &HBB
     145Const VK_OEM_COMMA =    &HBC
     146Const VK_OEM_MINUS =    &HBD
     147Const VK_OEM_PERIOD =   &HBE
     148Const VK_OEM_2 =        &HBF
     149Const VK_OEM_3 =        &HC0
     150Const VK_OEM_4 =        &HDB
     151Const VK_OEM_5 =        &HDC
     152Const VK_OEM_6 =        &HDD
     153Const VK_OEM_7 =        &HDE
     154Const VK_OEM_8 =        &HDF
     155Const VK_OEM_AX =       &HE1
     156Const VK_OEM_102 =      &HE2
     157Const VK_ICO_HELP =     &HE3
     158Const VK_ICO_00 =       &HE4
     159
    117160Const VK_PROCESSKEY =   &HE5
     161
     162Const VK_ICO_CLEAR =    &HE6
     163
     164
     165'#if _WIN32_WINNT >= &h0500
     166Const VK_PACKET =       &HE7
     167'#endif
     168
     169Const VK_OEM_RESET =    &HE9
     170Const VK_OEM_JUMP =     &HEA
     171Const VK_OEM_PA1 =      &HEB
     172Const VK_OEM_PA2 =      &HEC
     173Const VK_OEM_PA3 =      &HED
     174Const VK_OEM_WSCTRL =   &HEE
     175Const VK_OEM_CUSEL =    &HEF
     176Const VK_OEM_ATTN =     &HF0
     177Const VK_OEM_FINISH =   &HF1
     178Const VK_OEM_COPY =     &HF2
     179Const VK_OEM_AUTO =     &HF3
     180Const VK_OEM_ENLW =     &HF4
     181Const VK_OEM_BACKTAB =  &HF5
    118182
    119183Const VK_ATTN =         &HF6
     
    126190Const VK_PA1 =          &HFD
    127191Const VK_OEM_CLEAR =    &HFE
    128 
    129192
    130193'-------------------
     
    768831Const MK_CONTROL =        &H0008
    769832Const MK_MBUTTON =        &H0010
     833'#if _WIN32_WINNT >= 0x0500
     834Const MK_XBUTTON1 =       &h0020
     835Const MK_XBUTTON2 =       &h0040
     836'#endif
    770837
    771838
  • trunk/Include/basic/dos_console.sbp

    r432 r473  
    1010Dim _System_hConsoleIn = GetStdHandle(STD_INPUT_HANDLE)
    1111System.Console.SetIn(
    12     New System.IO.StreamReader(
    13         New System.IO.FileStream(_System_hConsoleIn, System.IO.FileAccess.Read, False)))
     12    System.IO.TextReader.Synchronized(New System.IO.StreamReader(
     13        New System.IO.FileStream(_System_hConsoleIn, System.IO.FileAccess.Read, False))))
    1414
    1515'---------- command.sbp内で定義済み ----------
     
    5757
    5858    Dim dwAccessBytes As DWord
    59 #ifdef __STRING_UNICODE_WINDOWS_ANSI
    60 '   Debug
    61     Dim oldAlloc = _System_AllocForConvertedString
    62     _System_AllocForConvertedString = AddressOf (_System_malloc)
    63     Dim pszOut As PCSTR
    64     Dim len = GetStr(buf, pszOut)
    65     _System_AllocForConvertedString = oldAlloc
    66     WriteConsole(_System_hConsoleOut, pszOut, len, dwAccessBytes, 0)
    67     _System_free(pszOut)
    68 #else
    6959    WriteConsole(_System_hConsoleOut, buf.StrPtr, buf.Length, dwAccessBytes, 0)
    70 #endif
    7160End Sub
    7261/* TODO: _System_GetUsingFormatを用意して実装する
  • trunk/Include/windows.sbp

    r360 r473  
    4646#require <api_winsock2.sbp>
    4747
     48Const GET_X_LPARAM(lp) = ((LOWORD(lp) As Integer) As Long)
     49Const GET_Y_LPARAM(lp) = ((HIWORD(lp) As Integer) As Long)
     50
    4851#endif '_INC_WINDOWS
Note: See TracChangeset for help on using the changeset viewer.