Module cRichEdit.pkg

     1use Windows.pkg
     2Use cEdit_Mixin.pkg
     3
     4// DFO: cRichEdit.Dfo
     5// DFC: cRichEdit.Dfc
     6
     7// constants used for RichEdit Properties
     8// peAlignment 
     9Enum_List 
    10    Define alLeft   for 1 
    11    Define alRight  for 2 
    12    Define alCenter for 3 
    13End_Enum_List 
    14
    15// peBullets 
    16Enum_List 
    17    Define buNone 
    18    Define buBullets 
    19    Define buArabicNumbers 
    20    Define buLowerLetters 
    21    Define buUpperLetters 
    22    Define buLowerRomans 
    23    Define buUpperRomans 
    24End_Enum_List 
    25
    26// peBulletStyle 
    27Enum_List 
    28    Define busRightParen   for 0 
    29    Define busEncloseParen for 256 
    30    Define busPeriod       for 512 
    31    Define busNumberOnly   for 768 
    32    Define busNoDisplay    for 1024 
    33End_Enum_List
    34    
    35// peLineSpacingType
    36Enum_List 
    37    Define lstSingle
    38    Define lstSingleAndOneHalf
    39    Define lstDouble
    40End_Enum_List
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62Class cRichEdit Is A DFBaseRichEdit
    63
    64    Procedure Construct_Object
    65        Forward Send Construct_Object
    66        Send Define_cEdit_Mixin
    67
    68        On_key Key_Ctrl+Key_B send ToggleBold
    69        On_key Key_Ctrl+Key_I send ToggleItalics
    70        On_key Key_Ctrl+Key_U send ToggleUnderline
    71
    72    End_Procedure // Construct_Object
    73
    74    Import_Class_Protocol cEdit_Mixin
    75    
    76    Procedure ToggleBold
    77        Set pbBold to (not(pbBold(self))) 
    78    end_procedure
    79    
    80    Procedure ToggleItalics
    81        Set pbItalics to (not(pbItalics(self))) 
    82    end_procedure
    83    
    84    Procedure ToggleUnderline
    85       Set pbUnderLine to (not(pbUnderLine(self))) 
    86    end_procedure
    87
    88End_Class
    89