Module Dftabdlg.pkg
1//
2// Dftabdlg.pkg - DEO tab dialog classes
3//
4// 07/23/96 JJT - New Class names
5// 11/26/97 JJT - 1) added dbViewTabDialog (which is currently identical
6// to dbTabDialog. These need to be logically distinct
7// 2) Added SubView_Changed support (for finding changes
8// in tab-view dialogs). This allows parent view (dbView)
9// a way to see of a sub view (tabview) is changed.
10// 3) Added Add_focus to dbtabview to undo what a view
11// normally does (seeding, etc.) The seed process is
12// already handled by the outer dbView.
13//
14
15Use Windows.pkg
16Use DfClient.pkg
17Use dftab_mx.pkg
18
19// Mixes in DEO logic to a tab dialog page.
20//
21Class Tab_DEO_page_Mixin is a Mixin
22
23 import_class_protocol tab_page_mixin
24
25 { Visibility=Private }
26 Procedure Define_Tab_DEO_Page_Mixin
27 on_key kClear SEND Request_Clear PRIVATE
28 on_key kClear_All SEND Request_Clear_All PRIVATE
29 on_key kDelete_Record SEND Request_Delete PRIVATE
30 on_key kSave_Record SEND Request_Save PRIVATE
31 Send Define_Tab_page_Mixin
32 end_procedure
33
34End_class
35
36
37
38Register_Function No_Confirmation returns integer
39Register_Function Confirm String question returns integer
40
41{ ClassType=Abstract }
42{ HelpTopic=dbTabDialog_ }
43Class dbTabDialog_ is a TabDialog STARTMAC ECstart
44 // the startmac is used to catch old obsolete code at compiletime
45
46 Import_Class_Protocol Entry_Client_mixin
47End_Class
48
49
50{ CompositeClass=dbTabPage }
51{ DataAware=True }
52{ HelpTopic=dbTabDialog }
53Class dbTabDialog is a dbTabDialog_
54
55 Procedure Construct_Object
56 Forward Send Construct_Object No_Image
57 Send Define_DFNavigation // GUI navigate changes
58 End_Procedure // Construct_Object
59
60 Import_Class_Protocol DFNavigate_Mixin
61
62 { MethodType=Event Visibility=Private }
63 Function Tab_exit_loss returns integer
64 delegate Send request_Cancel
65 function_return 1
66 end_function
67
68 { MethodType=Event Visibility=Private }
69 Function tab_View_exit_loss returns integer
70 Integer obj oldmsg
71 get verify_exit_msg to oldmsg
72 Broadcast Get SubView_Changed to obj
73 if obj eq 0 ;
74 Set verify_exit_msg to (RefFunc(No_Confirmation))
75 Else Begin
76 send activate to obj
77 Set verify_exit_msg to (RefFunc(Exit_Loss_Confirmation))
78 End
79 send request_cancel
80 set verify_exit_msg to oldmsg
81 function_return 1
82 end_function
83
84 Function Exit_Loss_Confirmation Returns integer
85 Function_return (confirm(self,C_$ChangesExistAbandon))
86 End_function
87
88End_Class
89
90{ CompositeClass=dbTabView }
91{ DDOHost=True }
92{ DataAware=True }
93{ HelpTopic=dbTabDialogView }
94Class dbTabDialogView is a dbTabDialog
95 Procedure Construct_Object
96 Forward Send Construct_Object
97 Set Rotate_Mode to RM_RING // all dbTabView pages will default to this.
98 End_Procedure // Construct_Object
99End_Class
100
101
102{ DataAware=True }
103{ DesignerClass=cDTTabPage }
104{ HelpTopic=dbTabPage }
105{ OverrideProperty=Label DesignTime=True }
106{ OverrideProperty=Location DesignTime=False }
107{ OverrideProperty=Locate_mode DesignTime=False }
108{ OverrideProperty=Size DesignTime=False }
109{ OverrideProperty=piMinSize DesignTime=False }
110{ OverrideProperty=piMaxSize DesignTime=False }
111{ OverrideProperty=peAnchors DesignTime=False }
112Class dbTabPage is a dbContainer3d
113 Procedure Construct_Object
114 Forward Send Construct_Object
115 Send Define_Tab_DEO_Page_mixin
116 Set Verify_exit_msg to (RefFunc(Tab_exit_loss))
117 Delegate Set Verify_exit_msg to (RefFunc(Tab_exit_loss))
118 End_Procedure // Construct_Object
119
120 import_class_protocol tab_DEO_page_mixin
121
122end_Class
123
124
125{ ClassType=Abstract }
126{ HelpTopic=dbTabView_ }
127{ OverrideProperty=Label DesignTime=True }
128{ OverrideProperty=Location DesignTime=False }
129{ OverrideProperty=Locate_mode DesignTime=False }
130{ OverrideProperty=Size DesignTime=False }
131{ OverrideProperty=piMinSize DesignTime=False }
132{ OverrideProperty=piMaxSize DesignTime=False }
133{ OverrideProperty=peAnchors DesignTime=False }
134Class dbTabView_ is a dbContainer3d
135 import_Class_protocol entry_view_Client_mixin
136
137 // this replaces add-focus from entry-view which has the
138 // latch logic. We do not need this duplicated here. This MUST get
139 // added at the same level as the entry_view_client mixin
140 //
141 { NoDoc=True }
142 procedure Add_Focus integer toObj# returns integer
143 integer rVal
144 Forward Get MSG_add_focus toObj# to rVal
145 Procedure_Return rVal
146 End_Procedure
147
148End_Class
149
150
151{ DataAware=True DDOHost=True }
152{ DesignerClass=cDTTabPage }
153{ HelpTopic=dbTabView }
154Class dbTabView is a dbTabView_
155
156 Procedure Construct_Object
157 Forward Send Construct_Object No_Image
158 Send Define_Tab_DEO_Page_mixin
159 Set Verify_exit_msg to (RefFunc(Tab_View_exit_loss))
160 Delegate Set Verify_exit_msg to (RefFunc(Tab_View_exit_loss))
161
162 // comment out if you do not have the changed latch server packages
163 Set Auto_top_View_State to True
164
165 // 11/14/95 - Forces view to stay in-use even when not the active
166 // page. This makes more sense with tab views.
167 Set DSO_Detach_Mode to Detach_Never
168 Set peNeighborHood to DEFAULT_DIALOG_NeighborHood
169 End_Procedure // Construct_Object
170
171 import_class_protocol tab_DEO_page_mixin
172
173 // This gets sent via broadcast (usually from dbView). If a
174 // change exists, activate this tab page and return 1
175 //
176 { MethodType=Property Visibility=Private }
177 Function SubView_Changed returns integer
178 integer bChanged hObj
179 // since this is via broadcast, delegation will be disabled
180 Broadcast Get Data_Set_Should_Save to bChanged
181 if bChanged ;
182 Move self to hObj
183 Else ;
184 Forward Get SubView_Changed to hObj
185 Function_return hObj
186 End_Function
187
188end_Class
189