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{ DesignerClass=cDTEdit }
    43{ OverrideProperty=Label_Justification_Mode InitialValue=Jmode_Top }
    44{ OverrideProperty=Label_row_offset InitialValue=1 }
    45{ OverrideProperty=Label_col_offset InitialValue=0 }
    46{ HelpTopic=cRichEdit }
    47{ OverrideProperty=Attach_Parent_State DesignTime=False }
    48{ OverrideProperty=Bitmap DesignTime=False }
    49{ OverrideProperty=Bitmap_Style DesignTime=False }
    50{ OverrideProperty=Block_Mouse_State DesignTime=False }
    51{ OverrideProperty=Client_Area_State DesignTime=False }
    52{ OverrideProperty=FontItalics DesignTime=False }
    53{ OverrideProperty=FontSize DesignTime=False }
    54{ OverrideProperty=FontUnderline DesignTime=False }
    55{ OverrideProperty=FontWeight DesignTime=False }
    56{ OverrideProperty=Physical_FontSize DesignTime=False }
    57{ OverrideProperty=Popup_State DesignTime=False }
    58{ OverrideProperty=Ring_State   DesignTime=False }
    59{ OverrideProperty=Scope_State  DesignTime=False }
    60{ OverrideProperty=Search_Case DesignTime=False }
    61{ OverrideProperty=Transparent_State DesignTime=False }
    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
    90