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
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63Class LineControl is a DFBaseLineControl
    64
    65    Procedure Construct_Object
    66        Forward Send Construct_Object
    67        
    68        Property integer Line_Color1  COLOR_BTNSHADOW
    69        
    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    
    76    Procedure Notify Integer wParam Integer lParam
    77    End_Procedure
    78
    79    
    80    Procedure set Line_Color1 integer theColor
    81        set top_line_color to theColor
    82    End_Procedure
    83
    84    
    85    Procedure set Line_Color2 integer theColor
    86        set bottom_line_color to theColor
    87    End_Procedure
    88
    89    
    90    Function Line_Color1 returns integer
    91        Function_Return (top_line_color(self))
    92    End_Function
    93
    94    
    95    Function Line_Color2 returns integer
    96        Function_Return (bottom_line_color(self))
    97    End_Function
    98End_Class