Module Sthlp_mx.pkg

     1Use VDFBase.pkg
     2Use LanguageText.pkg
     3Class StatusHelp_Item_mixin is a Mixin
     4
     5    { MethodType=Event Visibility=Private }
     6    Procedure Define_StatusHelp_Item_Mixin
     7        { Visibility=Private }
     8        Property Integer StatusHelp_Id  0
     9        Property Integer Simple_Status_Help_State 1
    10        Property String  Shadow_Status_Help ( "("+C_$Unavailable+")" )
    11        Object Statushelp_Array is an array
    12            delegate Set StatusHelp_Id to self
    13        end_object
    14    End_Procedure // Define_StatusHelp_Item_Mixin
    15
    16//   Procedure Xdelete_data
    17//      integer id
    18//      get statushelp_id to id
    19//      Forward Send delete_data
    20//      if id Send Delete_Data to id
    21//   End_Procedure // Delete_Data
    22
    23   { NoDoc=True }
    24   procedure Add_Item integer iMessage string sValue
    25     integer id
    26     get statushelp_id to id
    27     Forward Send Add_item iMessage sValue
    28     If id send Add_Item to id 0 ''
    29   End_Procedure // Add_item
    30
    31   { NoDoc=True }
    32   Procedure Insert_Item Integer iMessage String sValue Integer iItem
    33     integer id
    34     get statushelp_id to id
    35     Forward Send Insert_item iMessage sValue iItem
    36     If id send Insert_Item to id iItem ''
    37   End_Procedure // Insert_item
    38
    39
    40   { MethodType=Property }
    41   Procedure Set Status_Help string item# string sval
    42     integer id itm#
    43     string stval
    44     If num_arguments eq 1 Begin
    45        Move Item# to stval
    46        Move (item_count(self)-1) to itm#
    47     end
    48     else begin
    49        Move sVal to stval
    50        Move item# to itm#
    51     end
    52     get statushelp_id to id
    53     if id Set Value of id item itm# to stVal
    54   end_procedure
    55
    56   { MethodType=Property }
    57   Function Status_Help integer item# returns string
    58     integer id
    59     string sHelp
    60     get statushelp_id to id
    61     if (id AND Item_Count(id)>Item#) Begin
    62        Get value of id item item# to sHelp
    63        if sHelp eq '0' move '' to shelp
    64     end
    65     function_return shelp
    66   End_Function // StatusHelp_Value
    67
    68   Function Menu_Status_Help Integer Item# Integer Flags Returns String
    69        String sStatus_Help sFlags sShadowed
    70
    71        Get Status_Help item# To sStatus_Help
    72        If ( sStatus_Help<>'' AND (Flags IAND 3) AND (not(Flags IAND 2048)) ) Begin
    73            Get Shadow_Status_Help To sShadowed
    74            Append sStatus_Help " " sShadowed
    75        End
    76        Function_Return sStatus_Help
    77    End_Function
    78
    79End_Class
    80