Module Dftxtwin.pkg
1//************************************************************************
2//
3// Confidential Trade Secret.
4// Copyright 1987-1997 Data Access Corporation, Miami FL, USA
5// All Rights reserved
6// DataFlex is a registered trademark of Data Access Corporation.
7//
8//************************************************************************
9//
10// $File name : DFTxtWin.pkg
11// $File title : dbEdit support for vdf
12// Notice :
13// $Author(s) : John Tuohy
14//
15// $Rev History
16// 12/13/2001 JJT - removed unneeded auto_label_state from dbEditDS. Current_object to self, etc
17// 6/24/97 JJT - Added Auto-label DD support: Auto_label_State. Assign_DD_Label
18// 07/23/96 JJT - New Class names
19// 04/26/96 JJT - Added auto text_limit setting
20// 04/16/96 JJT - Added DD support (if USE$DATA_DICTIONARY is defined)
21// 04/06/96 JJT - Added Stumpted Prompt_Object and Zoom_Object functions
22// 03/28/95 JJT - Removed "0" Layer class
23// Added DF navigate and Help DEO support.
24// Changed name to dftxtwin
25// 08/19/94 JJT - Blended Classes from CB and DAF
26//************************************************************************
27Use windows.pkg
28Use Text_Win.pkg
29Use DFNav_mx.pkg // Navigation changes for DF DEOs
30Use DFCdDeo.pkg // DEO Code message support
31
32{ ClassType=Abstract }
33{ HelpTopic=dbEdit_ }
34Class dbEdit_ is a Edit
35 Import_Class_Protocol Text_Window_mixin
36End_Class
37
38//
39// EntryEdit
40//
41{ ClassType=Abstract }
42{ HelpTopic=dbEditDS }
43Class dbEditDS is a dbEdit_
44
45 Procedure Construct_Object
46 Forward Send Construct_Object
47 Send Define_DFNavigation // GUI navigate changes
48 // restore standard begin/end of text window behavior (which
49 // is altered by CM packages
50 On_key kBegin_of_data send default_key
51 On_key kEnd_of_data send default_key
52 End_Procedure // Construct_Object
53
54 Import_Class_Protocol DFNavigate_Mixin
55 Import_Class_Protocol DFCode_DEO_Mixin
56 Import_Class_Protocol DataFile_Help_Mixin
57
58 // these should be in text_win.pkg All DEOs shoudld understand this
59 // message. Needed for smart pulldown shadowing of these items
60 //
61 { MethodType=Property NoDoc=True }
62 Function Prompt_Object integer item# returns integer
63 End_Function
64
65 { MethodType=Property NoDoc=True }
66 Function Zoom_Object integer item# returns integer
67 End_Function
68
69 Procedure End_Construct_Object
70 integer iLen iFile iField
71 Forward Send End_Construct_Object
72 Get Data_File to iFile
73 If (iFile AND Text_Limit(self)=0) Begin
74 Get Data_Field to iField
75 Get_Attribute DF_FIELD_Length of iFile iField to iLen
76 Set Text_Limit to (iLen-2)
77 End
78 End_Procedure // End_Construct_Object
79
80 { Visibility=Private }
81 Procedure Bind_Data integer File# Integer Field#
82 Set Data_File item 0 to File#
83 Set Data_Field item 0 to Field#
84 Set File_Name to ("DBMS:FS" - string(File#) - "," - string(field#) )
85 End_Procedure // Bind_Data
86
87End_Class
88
89
90Use DD_Deomx.pkg // mixin support for dd classes
91
92{ DataBindable=True }
93{ HelpTopic=dbEdit }
94Class dbEdit is a dbEditDS
95 Import_Class_Protocol Extended_DEO_Status_Help_Mixin
96 Import_Class_Protocol Extended_DEO_Status_Help_Tooltip_Mixin
97
98 Procedure Construct_Object
99 Forward Send Construct_Object
100 { Category=Appearance }
101 { PropertyType=Boolean }
102 Property Integer Auto_Label_State False
103 End_Procedure // Construct_Object
104
105 //************************************************************************//
106 // Copy_Item_Options //
107 // Currently there is nothing to do except optionally support an auto- //
108 // label. We maintain this format to keep in similar to the other DEOs //
109 //************************************************************************//
110 //
111 { Visibility=Private }
112 Procedure Copy_Item_Options Integer iDSO Integer iFile Integer iField Integer iDEO Integer iItem
113 If not (Extended_DSO_State(iDSO)) Begin
114 Procedure_Return
115 End
116 If (Auto_Label_State(Self)) Begin
117 Send Assign_DD_Label iDSO iFile iField iDEO iItem
118 End
119
120 // Assign the tooltip according to the DDO's Status_Help string....
121 Send SetToolTipFromStatusHelp
122 End_Procedure
123
124 //************************************************************************//
125 // Assign_DD_Label //
126 // This assigns the DEO's from the DD. This uses long labels and //
127 // and sets the label property //
128 //************************************************************************//
129 //
130 { Visibility=Private }
131 Procedure Assign_DD_Label Integer iDSO Integer iFile Integer iField ;
132 Integer iDEO Integer iItem
133 string sName
134 Get File_Field_Label of iDSO iFile iField DD_LABEL_LONG to sName
135 Set Label to sName
136 End_Procedure
137End_Class
138
139