Module Dfline.pkg

     1//************************************************************************
     2//--- DFLine.pkg   Line-Drawing
     3//
     4// Copyright (c) 1983-1997 Data Access Corporation, Miami Florida,
     5// All rights reserved.
     6// DataFlex is a registered trademark of Data Access Corporation.
     7//
     8//************************************************************************
     9//  Description:
    10//      A class designed to draw lines.
    11//************************************************************************
    12
    13use windows.pkg
    14
    15//
    16// Line Styles
    17//
    18Enumeration_list
    19  define lnDIP        // grey (Shadow) top line, light bottom (highlight)
    20  define lnBUMP       // light top (highlight), grey (Shadow) bottom
    21  define lnSINGLE     // Single dark line
    22  define lnCUSTOM     // create your own with line_color1 & 2.
    23End_Enumeration_list
    24
    25// Interface:
    26//
    27//  Set Size             to Height Width
    28//  Set Location         to col row
    29//  Set Horizontal_State to TRUE|FALSE
    30//  Set Line_Style       to lnDIP | lnBUMP | lnSINGLE | LnCUSTOM
    31//  Set Line_Thickness   to pixel-thickness
    32//  Set Line_Margin      to pixel-border
    33//
    34//  If LnCustom you must define both of these colors
    35//     Set Line_Color1 to Windows_Color
    36//     Set Line_Color2 to Windows_Color  (if 0, single line)
    37//
    38
    39{ DesignerClass=cDTLineControl }
    40{ HelpTopic=LineControl }
    41{ OverrideProperty=Attach_Parent_State DesignTime=False }
    42{ OverrideProperty=Bitmap DesignTime=False }
    43{ OverrideProperty=Bitmap_Style DesignTime=False }
    44{ OverrideProperty=Block_Mouse_State DesignTime=False }
    45{ OverrideProperty=Border_Style DesignTime=False }
    46{ OverrideProperty=Client_Area_State DesignTime=False }
    47{ OverrideProperty=Color DesignTime=False }
    48{ OverrideProperty=Focus_Mode DesignTime=False }
    49{ OverrideProperty=FontItalics DesignTime=False }
    50{ OverrideProperty=FontSize DesignTime=False }
    51{ OverrideProperty=FontUnderline DesignTime=False }
    52{ OverrideProperty=FontWeight DesignTime=False }
    53{ OverrideProperty=OEM_Translate_State DesignTime=False }
    54{ OverrideProperty=Physical_FontSize DesignTime=False }
    55{ OverrideProperty=Popup_State DesignTime=False }
    56{ OverrideProperty=Ring_State   DesignTime=False }
    57{ OverrideProperty=Scope_State  DesignTime=False }
    58{ OverrideProperty=Search_Case DesignTime=False }
    59{ OverrideProperty=Skip_state DesignTime=False }
    60{ OverrideProperty=TextColor DesignTime=False }
    61{ OverrideProperty=TypeFace DesignTime=False }
    62{ OverrideProperty=Transparent_State DesignTime=False }
    63Class LineControl is a DFBaseLineControl
    64
    65    Procedure Construct_Object
    66        Forward Send Construct_Object
    67        { Visibility=Private }
    68        Property integer Line_Color1  COLOR_BTNSHADOW
    69        { Visibility=Private }
    70        Property integer Line_Color2  COLOR_BTNHIGHLIGHT
    71        // we do not want control to participate in forward backwards object navigation
    72        set Skip_State to True
    73    End_Procedure
    74
    75    { Visibility=Private MethodType=Event NoDoc=True }
    76    Procedure Notify Integer wParam Integer lParam
    77    End_Procedure
    78
    79    { Visibility=Private MethodType=Property }
    80    Procedure set Line_Color1 integer theColor
    81        set top_line_color to theColor
    82    End_Procedure
    83
    84    { MethodType=Property Visibility=Private }
    85    Procedure set Line_Color2 integer theColor
    86        set bottom_line_color to theColor
    87    End_Procedure
    88
    89    { MethodType=Property Visibility=Private }
    90    Function Line_Color1 returns integer
    91        Function_Return (top_line_color(self))
    92    End_Function
    93
    94    { MethodType=Property Visibility=Private }
    95    Function Line_Color2 returns integer
    96        Function_Return (bottom_line_color(self))
    97    End_Function
    98End_Class
    99