Module cSigCJFieldChooser.pkg
1//==============================================================================
2// Project : SigCj - VDF Classes for Codejock
3// File : cSigCJFieldChooser.pkg
4// Description : VDF Class for Codejock control
5//
6// Revision : $Rev: 673 $
7// $Date: 2011-01-26 11:43:39 -0500 (Wed, 26 Jan 2011) $
8// $Author: martin $ Martin Pincott
9//
10// Requirements : Visual DataFlex 12.1+
11// Codejock SuitePro - Version 12.0.0+
12//
13// Copyright : (c) 2008 VDF SIG UK
14// Visual DataFlex Special Interest Group UK.
15// http://www.vdfsig.co.uk/
16// dev@vdfsig.co.uk
17//
18// This file is part of SigCj.
19//
20// SigCj is free software: you can redistribute it and/or modify
21// it under the terms of the GNU Lesser General Public License
22// as published by the Free Software Foundation, either version
23// 2.1 of the License, or (at your option) any later version.
24//
25// SigCj is distributed in the hope that it will be useful, but
26// WITHOUT ANY WARRANTY; without even the implied warranty of
27// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28// GNU Lesser General Public License for more details.
29//
30// If you have the complete SigCj workspace then a copy of the
31// GNU Lesser General Public License is in the Docs folder. If
32// not, see <http://www.gnu.org/licenses/>.
33//
34//==============================================================================
35// Contributions
36// =============
37//
38// When Who What
39// ========== ============ =====================================================
40// 2009-08-13 P Van Dieren Field Chooser width logic.
41//
42//==============================================================================
43
44
45Use SigCjW_ReportControl.pkg
46Use cSigCJMethods_Mixin.pkg
47
48{ OverrideProperty=Attach_Parent_State DesignTime=False }
49{ OverrideProperty=Block_Mouse_State DesignTime=False }
50{ OverrideProperty=Border_Style DesignTime=False }
51{ OverrideProperty=Client_Area_State DesignTime=False }
52{ OverrideProperty=Color DesignTime=False }
53{ OverrideProperty=Delegation_Mode DesignTime=False }
54{ OverrideProperty=Focus_Mode DesignTime=False }
55{ OverrideProperty=Help_Id DesignTime=False }
56{ OverrideProperty=Help_Keyword DesignTime=False }
57{ OverrideProperty=psHtmlHelpTopic DesignTime=False }
58{ OverrideProperty=Label DesignTime=False }
59{ OverrideProperty=Label_Col_Offset DesignTime=False }
60{ OverrideProperty=Label_Col_Offset DesignTime=False }
61{ OverrideProperty=Label_Justification_Mode DesignTime=False }
62{ OverrideProperty=Label_Row_Offset DesignTime=False }
63{ OverrideProperty=peAutoCreate DesignTime=False }
64{ OverrideProperty=pbBindValue DesignTime=False }
65{ OverrideProperty=peNeighborhood DesignTime=False }
66{ OverrideProperty=piMinSize DesignTime=False }
67{ OverrideProperty=Popup_State DesignTime=False }
68{ OverrideProperty=psLicenseKey DesignTime=False }
69{ OverrideProperty=psProgID DesignTime=False }
70{ OverrideProperty=Ring_State DesignTime=False }
71{ OverrideProperty=Scope_State DesignTime=False }
72{ OverrideProperty=Search_Case DesignTime=False }
73{ OverrideProperty=Skip_State DesignTime=False }
74{ OverrideProperty=Status_Help DesignTime=False }
75{ OverrideProperty=Use_Parent_Status_Help DesignTime=False }
76{ OverrideProperty=Visible_State DesignTime=False }
77Class cSigCjGridFieldChooser is a cSigCjComFieldChooser
78 Import_Class_Protocol cSigCJMethods_Mixin
79
80 Procedure Construct_Object
81 Forward Send Construct_Object
82
83 {Visibility = Private}
84 Property Boolean private_pbSortAscending True // The SortAscending Property specifies whether to Sort the items in the Field Chooser in alphabetical order. See FieldChooser.SortAscending
85 {Visibility = Private}
86 Property Integer private_peAppearance 0 // Specifies whether the FieldChooser control is drawn with 3D effects. See FieldChooser.Appearance
87 {Visibility = Private}
88 Property Integer private_peBorderStyle 1 // Specifies the border style for the FieldChooser control. See FieldChooser.BorderStyle
89 {Visibility = Private}
90 Property Boolean private_Enabled_State True // Specifies whether the FieldChooser control can respond to events. See FieldChooser.Enabled
91
92 Property Handle phoGridObject 0 // Specifies the grid object that will be attached to this field chooser.
93
94 Set peAnchors to anAll
95 End_Procedure
96
97 //-------------------------------------------------------------------------
98
99 Procedure OnCreate
100 Handle hoGridObject
101
102 Forward Send OnCreate
103
104 Set ComAppearance to (Private_peAppearance (Self))
105 Set ComBorderStyle to (Private_peBorderStyle (Self))
106 Set ComEnabled to (Private_Enabled_State (Self))
107 Set ComSortAscending to (Private_pbSortAscending(Self))
108
109 // Attach to the Grid object....
110 Get phoGridObject to hoGridObject
111
112 If (hoGridObject <> 0) Begin
113 Send AttachFieldChooser of hoGridObject Self True
114 End
115 End_Procedure
116
117 //-------------------------------------------------------------------------
118
119 {Category="CodeJock" MethodType=Property InitialValue=True }
120 Procedure Set Enabled_State Boolean bValue
121 Set SigCJProperty Set_Private_Enabled_State Set_ComEnabled to bValue
122 End_Procedure
123
124 Function Enabled_State Returns Boolean
125 Function_Return (SigCJProperty(Self, Get_Private_Enabled_State, Get_ComEnabled))
126 End_Function
127
128 //-------------------------------------------------------------------------
129
130 {Category="CodeJock" MethodType=Property InitialValue=True }
131 Procedure Set pbSortAscending Boolean bValue
132 Set SigCJProperty Set_Private_pbSortAscending Set_ComSortAscending to bValue
133 End_Procedure
134
135 Function pbSortAscending Returns Boolean
136 Function_Return (SigCJProperty(Self, Get_Private_pbSortAscending, Get_ComSortAscending))
137 End_Function
138
139 //-------------------------------------------------------------------------
140
141 {Category="CodeJock" MethodType=Property InitialValue=0 }
142 Procedure Set peAppearance Integer iValue
143 Set SigCJProperty Set_Private_peAppearance Set_ComAppearance to iValue
144 End_Procedure
145
146 Function peAppearance Returns Integer
147 Function_Return (SigCJProperty(Self, Get_Private_peAppearance, Get_ComAppearance))
148 End_Function
149
150 //-------------------------------------------------------------------------
151
152 {Category="CodeJock" MethodType=Property InitialValue=1 }
153 Procedure Set peBorderStyle Integer iValue
154 Set SigCJProperty Set_Private_peBorderStyle Set_ComBorderStyle to iValue
155 End_Procedure
156
157 Function peBorderStyle Returns Integer
158 Function_Return (SigCJProperty(Self, Get_Private_peBorderStyle, Get_ComBorderStyle))
159 End_Function
160
161 //-------------------------------------------------------------------------
162
163 Procedure ReleaseComObject
164 Handle hoGridObject
165 Forward Send ReleaseComObject
166 Get phoGridObject to hoGridObject
167 If (hoGridObject <> 0) Begin
168 Send AttachFieldChooser of hoGridObject Self False
169 End
170 End_Procedure
171
172End_Class
173
174//=============================================================================
175
176Class cSigCjGridFieldChooserPanel is a ToolPanel
177
178 Procedure Construct_Object
179 Forward Send Construct_Object
180
181 { DesignTime=False }
182 Property Handle phoFieldChooserControl
183
184 Set Size to 100 80
185 Set Auto_Locate_State to True
186 Set Popup_State to True
187 Set Label to "Field Chooser"
188
189 Object oFieldChooser is a cSigCjGridFieldChooser
190 Set Size to 100 80
191 Set phoFieldChooserControl to Self
192 End_Object
193 End_Procedure
194
195 //-------------------------------------------------------------------------
196
197 { MethodType=Property }
198 Procedure Set phoGridObject Handle hoGrid
199 Handle hoFieldChooserControl
200 Get phoFieldChooserControl to hoFieldChooserControl
201 Set phoGridObject of hoFieldChooserControl to hoGrid
202 End_Procedure
203
204 { MethodType=Property }
205 Function phoGridObject Returns Handle
206 Handle hoFieldChooserControl hoGrid
207 Get phoFieldChooserControl to hoFieldChooserControl
208 Get phoGridObject of hoFieldChooserControl to hoGrid
209 Function_Return hoGrid
210 End_Function
211
212End_Class
213
214//==============================================================================
215//End of Package - cSigCJFieldChooser.pkg
216//==============================================================================
217