Module cSigCJCommandBarSystem.pkg
1//==============================================================================
2// Project : SigCj - VDF Classes for Codejock
3// File : cSigCJCommandBarSystem.pkg
4// Description : VDF Class for Codejock control
5//
6// Revision : $Rev: 672 $
7// $Date: 2011-01-26 08:49:04 -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
36Use cCJStandardCommandBarSystem.pkg
37Use cSigCJMethods_Mixin.pkg
38Use cSigCJTabWorkspace.pkg
39Use cSigCJMessageBar.pkg
40
41Class cSigCJCommandBarSystem is a cCJCommandBarSystem
42 Import_Class_Protocol cSigCJMethods_Mixin
43
44 Procedure Construct_Object
45 Forward Send Construct_Object
46
47 {Visibility=Private}
48 Property Handle phoMessageBar (Create(Self, U_cSigCJMessageBar))
49 End_Procedure
50
51 Procedure OnCreateCommandBars
52 Forward Send OnCreateCommandBars
53 Set ComVisualTheme to xtpThemeOffice2007
54 Send Initialise_Tab_Control
55 Send Initialise_MessageBar
56 End_Procedure
57
58 Procedure Initialise_MessageBar
59 Variant vMessageBar
60 Get ComMessageBar to vMessageBar
61 Set pvComObject of (phoMessageBar(Self)) to vMessageBar
62 Set pbCloseButton of (phoMessageBar(Self)) to True
63 End_Procedure
64
65 Procedure Initialise_Tab_Control
66 Variant vTab
67 Handle hoTab
68 Boolean bShow
69 Integer iSize
70
71 If (IsComObjectCreated(Self)) Begin
72 Get ComShowTabWorkspace True to vTab
73
74 Get Create U_cSigCJTabWorkspace to hoTab
75
76 Set pvComObject of hoTab to vTab
77 Set ComThemedBackColor of hoTab to False
78 Set ComFlags of hoTab to xtpWorkspaceShowCloseTab
79 Send ComRecalcLayout
80 End
81 End_Procedure // Initialise_Tab_Control
82
83 { MethodType=Method }
84 Procedure ShowMessageBar String sMessage String sMessageTitle
85 Send DoShowMessageBar of (phoMessageBar(Self)) sMessage sMessageTitle
86 Set pbVisible of (phoMessageBar(Self)) to True
87 End_Procedure
88
89 { MethodType=Method }
90 Procedure HideMessageBar
91 Set pbVisible of (phoMessageBar(Self)) to False
92 End_Procedure
93
94
95// { DesignTime=False }
96// Procedure Add_MenuItem String sCaption String sMessage Boolean bBeginGroup String sImage
97// Integer iArraySize
98// Handle hoMenuItem
99// String[][] saMenuItem
100//
101// Get psaMenuItem to saMenuItem
102// Move (SizeOfArray(saMenuItem)) to iArraySize
103//
104// Get Create U_cSigCJMenuItem to hoMenuItem
105// If (Trim(sImage) <> "") Set psImage of hoMenuItem to (Trim(sImage))
106// If (Trim(sCaption) <> "") Set psCaption of hoMenuItem to (Trim(sCaption))
107// If (Trim(sMessage) <> "") Set psMessage of hoMenuItem to (Trim(sMessage))
108// If (bBeginGroup) Set pbControlBeginGroup of hoMenuItem to True
109//
110// Move (Trim(sCaption)) to saMenuItem[iArraySize][0]
111// Move hoMenuItem to saMenuItem[iArraySize][1]
112//
113// Set psaMenuItem to saMenuItem
114// Send Destroy of hoMenuItem
115// End_Procedure
116
117// { DesignTime=False }
118// Procedure Set Enabled String sCaption Boolean bState
119// Integer iArraySize iCount iIndex
120// Handle hoMenuItem
121// String[][] saMenuItem
122// String sMenuItem
123//
124// Get psaMenuItem to saMenuItem
125// Move (SizeOfArray(saMenuItem)) to iArraySize
126//
127// For iCount from 0 to (iArraySize-1)
128// Move saMenuItem[iCount][0] to sMenuItem
129// Move saMenuItem[iCount][1] to hoMenuItem
130// If (sMenuItem = sCaption) Begin
131// // Showln hoMenuItem " ... " sMenuItem
132// Set pbEnabled of hoMenuItem to bState
133// End
134// Loop
135// End_Procedure
136//
137// { DesignTime=False }
138// Procedure Set Visible String sCaption Boolean bState
139// Integer iArraySize iCount iIndex
140// Handle hoMenuItem
141// String[][] saMenuItem
142// String sMenuItem
143//
144// Get psaMenuItem to saMenuItem
145// Move (SizeOfArray(saMenuItem)) to iArraySize
146//
147// For iCount from 0 to (iArraySize-1)
148// Move saMenuItem[iCount][0] to sMenuItem
149// Move saMenuItem[iCount][1] to hoMenuItem
150// If (sMenuItem = sCaption) Begin
151// // Showln hoMenuItem " ... " sMenuItem
152// Set pbVisible of hoMenuItem to bState
153// End
154// Loop
155// End_Procedure
156
157End_Class
158
159//==============================================================================
160//End of Package - cSigCJCommandBarSystem.pkg
161//==============================================================================
162