Ignore:
Timestamp:
Aug 24, 2008, 5:28:59 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

サブクラス化機構(Control.Attach)の整備

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/UI/ControlEvent.sbp

    r564 r615  
    1313    End Sub
    1414Protected
    15     Sub OnPaintDC(e As PaintDCArgs)
     15    Function OnPaintDC(e As PaintDCArgs) As Boolean
    1616        If Not IsNothing(paintDC) Then
    1717            paintDC(This, e)
    18         End If
    19     End Sub
     18            Return True
     19        End If
     20    End Function
    2021Private
    2122    paintDC As PaintDCHandler
     
    3536    End Sub
    3637Protected
    37     Sub OnClick(e As Args)
     38    Function OnClick(e As Args) As Boolean
    3839        If Not IsNothing(click) Then
    3940            click(This, e)
    40         End If
    41     End Sub
     41            Return True
     42        End If
     43    End Function
    4244Private
    4345    click As Handler
     
    5759    End Sub
    5860Protected
    59     Sub OnDoubleClick(e As Args)
     61    Function OnDoubleClick(e As Args) As Boolean
    6062        If Not IsNothing(doubleClick) Then
    6163            doubleClick(This, e)
    62         End If
    63     End Sub
     64            Return True
     65        End If
     66    End Function
    6467Private
    6568    doubleClick As Handler
     
    7982    End Sub
    8083Protected
    81     Sub OnMove(e As Args)
     84    Function OnMove(e As Args) As Boolean
    8285        If Not IsNothing(move) Then
    8386            move(This, e)
    84         End If
    85     End Sub
     87            Return True
     88        End If
     89    End Function
    8690Private
    8791    move As Handler
     
    101105    End Sub
    102106Protected
    103     Sub OnResize(e As ResizeArgs)
     107    Function OnResize(e As ResizeArgs) As Boolean
    104108        If Not IsNothing(resize) Then
    105109            resize(This, e)
    106         End If
    107     End Sub
     110            Return True
     111        End If
     112    End Function
    108113Private
    109114    resize As ResizeHandler
     
    123128    End Sub
    124129Protected
    125     Sub OnMouseEnter(e As MouseArgs)
     130    Function OnMouseEnter(e As MouseArgs) As Boolean
    126131        If Not IsNothing(mouseEnter) Then
    127132            mouseEnter(This, e)
    128         End If
    129     End Sub
     133            Return True
     134        End If
     135    End Function
    130136Private
    131137    mouseEnter As MouseHandler
     
    145151    End Sub
    146152Protected
    147     Sub OnMouseMove(e As MouseArgs)
     153    Function OnMouseMove(e As MouseArgs) As Boolean
    148154        If Not IsNothing(mouseMove) Then
    149155            mouseMove(This, e)
    150         End If
    151     End Sub
     156            Return True
     157        End If
     158    End Function
    152159Private
    153160    mouseMove As MouseHandler
     
    167174    End Sub
    168175Protected
    169     Sub OnMouseHover(e As MouseArgs)
     176    Function OnMouseHover(e As MouseArgs) As Boolean
    170177        If Not IsNothing(mouseHover) Then
    171178            mouseHover(This, e)
    172         End If
    173     End Sub
     179            Return True
     180        End If
     181    End Function
    174182Private
    175183    mouseHover As MouseHandler
     
    189197    End Sub
    190198Protected
    191     Sub OnMouseLeave(e As Args)
     199    Function OnMouseLeave(e As Args) As Boolean
    192200        If Not IsNothing(mouseLeave) Then
    193201            mouseLeave(This, e)
    194         End If
    195     End Sub
     202            Return True
     203        End If
     204    End Function
    196205Private
    197206    mouseLeave As Handler
     
    211220    End Sub
    212221Protected
    213     Sub OnMouseDown(e As MouseArgs)
     222    Function OnMouseDown(e As MouseArgs) As Boolean
    214223        If Not IsNothing(mouseDown) Then
    215224            mouseDown(This, e)
    216         End If
    217     End Sub
     225            Return True
     226        End If
     227    End Function
    218228Private
    219229    mouseDown As MouseHandler
     
    233243    End Sub
    234244Protected
    235     Sub OnMouseClick(e As MouseArgs)
     245    Function OnMouseClick(e As MouseArgs) As Boolean
    236246        If Not IsNothing(mouseClick) Then
    237247            mouseClick(This, e)
    238         End If
    239     End Sub
     248            Return True
     249        End If
     250    End Function
    240251Private
    241252    mouseClick As MouseHandler
     
    255266    End Sub
    256267Protected
    257     Sub OnMouseDoubleClick(e As MouseArgs)
     268    Function OnMouseDoubleClick(e As MouseArgs) As Boolean
    258269        If Not IsNothing(mouseDoubleClick) Then
    259270            mouseDoubleClick(This, e)
    260         End If
    261     End Sub
     271            Return True
     272        End If
     273    End Function
    262274Private
    263275    mouseDoubleClick As MouseHandler
     
    277289    End Sub
    278290Protected
    279     Sub OnMouseUp(e As MouseArgs)
     291    Function OnMouseUp(e As MouseArgs) As Boolean
    280292        If Not IsNothing(mouseUp) Then
    281293            mouseUp(This, e)
    282         End If
    283     End Sub
     294            Return True
     295        End If
     296    End Function
    284297Private
    285298    mouseUp As MouseHandler
     
    299312    End Sub
    300313Protected
    301     Sub OnKeyDown(e As KeyArgs)
     314    Function OnKeyDown(e As KeyArgs) As Boolean
    302315        If Not IsNothing(keyDown) Then
    303316            keyDown(This, e)
    304         End If
    305     End Sub
     317            Return True
     318        End If
     319    End Function
    306320Private
    307321    keyDown As KeyHandler
     
    321335    End Sub
    322336Protected
    323     Sub OnKeyUp(e As KeyArgs)
     337    Function OnKeyUp(e As KeyArgs) As Boolean
    324338        If Not IsNothing(keyUp) Then
    325339            keyUp(This, e)
    326         End If
    327     End Sub
     340            Return True
     341        End If
     342    End Function
    328343Private
    329344    keyUp As KeyHandler
     
    343358    End Sub
    344359Protected
    345     Sub OnKeyPress(e As KeyPressArgs)
     360    Function OnKeyPress(e As KeyPressArgs) As Boolean
    346361        If Not IsNothing(keyPress) Then
    347362            keyPress(This, e)
    348         End If
    349     End Sub
     363            Return True
     364        End If
     365    End Function
    350366Private
    351367    keyPress As KeyPressHandler
     
    365381    End Sub
    366382Protected
    367     Sub OnCreate(e As CreateArgs)
     383    Function OnCreate(e As CreateArgs) As Boolean
    368384        If Not IsNothing(create) Then
    369385            create(This, e)
    370         End If
    371     End Sub
     386            Return True
     387        End If
     388    End Function
    372389Private
    373390    create As CreateHandler
     
    387404    End Sub
    388405Protected
    389     Sub OnDestroy(e As Args)
     406    Function OnDestroy(e As Args) As Boolean
    390407        If Not IsNothing(destroy) Then
    391408            destroy(This, e)
    392         End If
    393     End Sub
     409            Return True
     410        End If
     411    End Function
    394412Private
    395413    destroy As Handler
     
    409427    End Sub
    410428Protected
    411     Sub OnPaintBackground(e As PaintBackgroundArgs)
     429    Function OnPaintBackground(e As PaintBackgroundArgs) As Boolean
    412430        If Not IsNothing(paintBackground) Then
    413431            paintBackground(This, e)
    414         End If
    415     End Sub
     432            Return True
     433        End If
     434    End Function
    416435Private
    417436    paintBackground As PaintBackgroundHandler
Note: See TracChangeset for help on using the changeset viewer.