home *** CD-ROM | disk | FTP | other *** search
- //************************************************************************
- //
- // Copyright 1987-1992 Data Access Corporation, Miami FL, USA
- // All Rights reserved
- // DataFlex is a registered trademark of Data Access Corporation.
- //
- //
- // $Source: /u3/source.30/product/pkg/RCS/enclient.pkg,v $
- // $Revision: 1.1 $
- // $State: Exp $
- // $Author: james $
- // $Date: 1992/09/08 14:43:04 $
- // $Locker: $
- //
- // $Log: enclient.pkg,v $
- //Revision 1.1 1992/09/08 14:43:04 james
- //Initial revision
- //
- //Revision 1.8 92/06/27 09:33:16 lee
- //changed child_wrapping to use new clientRecurse flag in inquire msgs.
- //
- //Revision 1.7 92/06/03 15:09:25 steve-l
- //altered child_wrapping to pass origin-object ID to wrap-destination
- //
- //Revision 1.6 92/05/29 14:06:22 lee
- //removed end_construct_* messages from mixins; now, classes that use the mixin
- //send the message that used to be sent by the end_construct_* message (for
- //efficiency).
- //
- //Revision 1.5 92/05/14 17:06:02 SWM
- //Updated Copyright slug.
- //
- //Revision 1.4 92/04/20 18:02:31 lee
- //added image argument error checking
- //
- //Revision 1.3 92/03/29 18:44:54 lee
- //added MSG_END_CONSTRUCT_OBJECT, moved ENDMAC macro stuff into END_CONSTRUCT-
- //OBJECT procedures (in .pkgs). moved Flag_ITems to list.pkg after generalizing
- //it based on PROTOTYPE_OBJECT instead of Whether or not it is a table-oriented
- //object. Moved define_access_keys mechanism completely into actionbr.pkg.
- //fixed two typos: import_class_protocol used !# instead of !3, and register-
- //procedure used !1 instead of !2.
- //
- //Revision 1.2 92/03/09 19:01:18 james
- //Added #CHKSUB directive to insure source
- //only compiled with correct revision of
- //compiler.
- //
- //Revision 1.1 91/10/23 10:20:19 elsa
- //Initial revision
- //
- //************************************************************************/
-
- //************************************************************************
- // File Name: EnClient.Pkg
- // Creation Date: January 1, 1991
- // Modified Date: July 1, 1991
- // Author(s): Steven A. Lowe
- //
- // This module contains the Entry_Client class definition.
- //************************************************************************/
-
- #CHKSUB 1 1 // Verify the UI subsystem.
-
- use NESTING //include DEO nesting standard support module
- use NAVIGATE //include DEO navigation standard support module
- use SERVER //include Server support module
- use VERIFY //include Verification support module
- use ACTIONBR //include action-bar support module
-
-
- //
- //Class: Entry_Client
- //
- //SuperClass: CLIENT
- //
- //Description: This class implements a data-entry object grouping agent
- //
- Class Entry_Client is a CLIENT STARTMAC ECstart
-
- //
- //Operation: CONSTRUCT_OBJECT
- //
- //Assumption(s): MyImg identifies an image for the client area
- //
- //Goal(s): define an instance of client with a properties appropriate to
- // this specialization.
- //
- //Algorithm: augmented to define and initialize properties
- //
- //Usage: used internally
- //
- procedure construct_object integer myImg
- forward send construct_object myImg
- set Ring_State to false
- Property integer Changed_State PRIVATE 0
- send define_nesting //invoke DEO nesting standard support constructor
- send define_navigation //invoke DEO navigation standard support constructor
- send define_server //invoke Server support constructor
- send define_action_bar //invoke action-bar support constructor
- send define_verify //invoke Verification support constructor
- end_procedure
-
- IMPORT_CLASS_PROTOCOL NESTING_Mixin
- IMPORT_CLASS_PROTOCOL NAVIGATE_Mixin
- IMPORT_CLASS_PROTOCOL SERVER_Mixin
- IMPORT_CLASS_PROTOCOL VERIFY_Mixin
- IMPORT_CLASS_PROTOCOL ACTION_BAR_Mixin
-
-
-
- //
- // created for Navigation support
- //
- procedure Top_of_Panel
- local integer firstChild curFoc#
- get focus of desktop to curFoc#
- if (Has_Components_State(current_object)) begin
- get find_first_deo to firstChild
- if firstChild ne 0 send Top_Of_Panel to firstChild
- else if current_object ne curFoc# send activate
- end
- else if current_object ne curFoc# send activate
- end_procedure
-
- //
- // created for Navigation support
- //
- procedure Bottom_of_Panel
- local integer lastChild curfoc#
- get focus of desktop to curFoc#
- if (Has_Components_State(current_object)) begin
- get Find_Last_DEO to lastChild
- if lastChild ne 0 begin
- send Bottom_Of_Panel to lastChild
- procedure_return
- end
- end
- if current_object ne curFoc# send activate
- end_procedure
-
- //
- // created for Navigation support
- //
- procedure Child_Wrapping integer direction integer ignoreThisID
- local integer ChildID curfoc# origID
-
- get focus of desktop to curFoc#
- if direction eq 0 begin //wrapping backward, first to last
- set Last_DEO to 0
- broadcast_focus send inquire_last_deo current_object FALSE //sets last_DEO prop.
- get Last_DEO to ChildID
- if ChildID ne 0 begin
- set First_DEO to 0
- broadcast_focus send inquire_first_deo current_object TRUE //sets first_DEO prop.
- get First_DEO to origID
- if origID eq 0 move ChildID to origID
- send child_wrapping to ChildID direction origID //pass origin iff DEO or dest
- end
- else if current_object ne curFoc# send activate
- end
- else begin //wrapping forward, last to first
- set First_DEO to 0
- broadcast_focus send inquire_first_deo current_object FALSE //sets first_DEO prop.
- get First_DEO to ChildID
- if ChildID ne 0 begin
- set Last_DEO to 0
- broadcast_focus send inquire_last_deo current_object TRUE //sets last_DEO prop.
- get Last_DEO to origID
- if origID eq 0 move ChildID to origID
- send child_wrapping to ChildID direction origID //pass origin iff DEO or dest
- end
- else if current_object ne curFoc# send activate
- end
- procedure_return 1
- end_procedure
-
- //
- // created for Server support
- //
- procedure display
- broadcast send display
- end_procedure
-
- //
- // created for Server support
- //
- procedure clear
- broadcast send clear
- end_procedure
-
- //
- // created for Server support
- //
- procedure clear_set
- broadcast send clear_set
- end_procedure
-
- //
- // created for property support
- //
- function Changed_State returns integer
- local integer retval
- get Entry_Client.Changed_State to retval
- function_Return retval
- end_function
-
- //
- // cancelled from Server mixin
- //
- procedure SET Changed_State integer newVal
- end_procedure
-
- //
- // created for EntItem convenience
- //
- procedure Entry_Clear integer file#
- if (Has_Components_State(current_object)) ;
- broadcast send Entry_Clear file#
- end_procedure
-
- //
- // created for EntItem convenience
- //
- procedure Entry_Clear_All integer file#
- if (Has_Components_State(current_object)) ;
- broadcast send Entry_Clear_All file#
- end_procedure
-
- //
- // created for EntItem convenience
- //
- procedure Entry_Display integer file# integer flag
- if (Has_Components_State(current_object)) ;
- broadcast send Entry_Display file# flag
- end_procedure
-
- //
- // created for EntItem convenience
- //
- procedure Entry_Update integer file# integer flag
- if (Has_Components_State(current_object)) ;
- broadcast send Entry_Update file# flag
- end_procedure
-
- procedure End_Construct_Object
- send Mark_Components // nesting
- send Define_Access_Keys 0 // action_bar_keys
- forward send End_Construct_Object
- end_procedure
-
- end_class
-
-
- //
- //Support Commands
- //
-
- //
- // ECstart <className> <ImageName> {ACTION_BAR <ActionBar#>} {POP_UP}
- // {RING} {USING <DataSetID>}
- //
- // this macro handles the creation-statement syntax for Entry_Clients
- //
- #COMMAND ECstart R
- #IFDEF !2
- #ELSE
- #IFDEF !2.N
- #ELSE
- #ERROR 100 IMAGE ARGUMENT MISSING IN OBJECT STATEMENT
- #ENDIF
- #ENDIF
- FORWARD_BEGIN_CONSTRUCT !1 !2
- bind_using !2 !3 !4 !5 !6 !7 !8 !9
- bind_action_bar !2 !3 !4 !5 !6 !7 !8 !9
- bind_pop_up !2 !3 !4 !5 !6 !7 !8 !9
- bind_ring !2 !3 !4 !5 !6 !7 !8 !9
- #ENDCOMMAND
-