Module Dfdeomnu.pkg

     1//  Create two daf sub-classes: A view_pulldown (which
     2//  directs to the client_ID area, and a DEO_PullDown
     3//  which only sends message if DEO_Object property is
     4//  true (this property delegates).
     5// 07/23/96 JJT - New Class names
     6
     7Use DFMENU.pkg
     8
     9register_function deo_Object returns integer
    10
    11//
    12// View pulldowns are designed for views. The message is sent to
    13// the client area (unless a specific object is declared).
    14//
    15{ HelpTopic=ViewPopupMenu }
    16Class ViewPopupMenu is a PopupMenu
    17  Procedure Construct_Object
    18     Forward Send Construct_Object
    19  End_Procedure // Construct_Object
    20
    21  // Augment aux_value to return the client area object if no object
    22  // is already defined.
    23  //
    24  { MethodType=Property  NoDoc=True }
    25  Function Aux_Value integer itm# returns integer
    26     integer rVal
    27     Forward Get Aux_Value item itm# to rVal
    28     If rval le 0 Get Client_Id to rval
    29     Function_Return rval
    30  End_Function
    31End_Class
    32
    33//
    34// Creates a pulldown that only sends to DEO objects (Objects whose
    35// deo_object property is true). This is only checked if a specific
    36// object is not declared.
    37//
    38
    39{ HelpTopic=DEOPopupMenu }
    40Class DEOPopupMenu is a PopupMenu
    41
    42   Function Is_Function Integer MsgId Integer ObjId Integer DelegateFg Returns Integer
    43      integer rval MainObj#
    44      Get Main_Panel_id to MainObj#
    45      If (ObjId>Desktop AND MainObj#) ;
    46         Get Is_Function of MainObj# MsgId ObjId DelegateFg to rVal
    47      Function_Return rVal
    48   End_Function
    49
    50   { Visibility=Private }
    51   Procedure Redirect_Message Returns integer
    52      integer Msg# Aux# rval MainObj# Understood
    53      Get Message   to Msg#
    54      Get Aux_Value to Aux#
    55      If Msg# Begin
    56         If Aux# eq 0 Begin
    57            Get Focus of desktop to Aux#
    58            Get Is_Function Get_DEO_Object Aux# TRUE to Understood
    59            If Not Understood Move 0 to Aux#
    60         End
    61         If Aux# Get Msg# of Aux# to rval
    62         Procedure_return rval
    63      end
    64   End_Procedure // Redirect_Message
    65End_Class
    66
    67
    68