Module Dfastbar.pkg
1// DfAStbar.pkg - DF Application Status bar
2//
3// This expects its parent to understand: (DfPanel.pkg provides this)
4// Set Statusbar_id
5// Get Client_Id
6// Send Add_Border_object to client_id
7// Send Remove_Border_object to client_id
8//
9//
10// 07/23/96 JJT - New Class names
11
12Register_Procedure Add_Border_Object
13Register_Procedure Remove_Border_Object
14
15
16Use DFStatBr.pkg
17
18{ Obsolete=True }
19Class AppStatusBar is a BasicStatusBar
20
21 Procedure Construct_Object
22 Forward Send Construct_Object
23 Property Integer Status_Help_Item 0
24 Property Integer Menu_Simple_State TRUE
25
26 // SET s/b private, Get is public
27 { Visibility=Private }
28 Property Integer Menu_status_State False // MUST start false
29
30 { Visibility=Private }
31 Property Integer Old_Simple_State false
32
33 { Visibility=Private }
34 Property String Old_Status_Value ''
35
36 Set Popup_State To TRUE
37 Set Attach_Parent_State To TRUE
38 // register status-bar with container
39 Delegate Set StatusBar_id To self
40 End_Procedure
41
42 { MethodType=Property Visibility=Private }
43 Procedure Set Status_Help_Value String sHelp
44 Integer iPart
45 Get Status_Help_Item To iPart
46 Set Value item iPart To sHelp
47 End_Procedure
48
49 { MethodType=Property Visibility=Private }
50 Function Status_Help_Value Returns String
51 Integer iPart
52 String sHelp
53 Get Status_Help_Item To iPart
54 Get Value item iPart To sHelp
55 Function_Return sHelp
56 End_Procedure
57
58 { MethodType=Event Visibility=Private }
59 Procedure Initialize_Menu
60 Integer iState OldState
61 If Not (Menu_Status_state(self)) Begin
62 Get Simple_State to OldState
63 Set Old_Simple_State to OldState
64 If OldState ;
65 Set Old_Status_Value to (Simple_Value(self))
66 Else ;
67 Set Old_Status_Value to (Status_Help_Value(self))
68 Set Simple_State to (Menu_Simple_State(self))
69 Set Menu_Status_State to TRUE
70 End
71 End_Procedure
72
73 { Visibility=Private }
74 Procedure Exit_Menu
75 Integer OldState
76 String OldVal
77 If (Menu_Status_state(self)) Begin
78 Get Old_Simple_State to OldState
79 Set Simple_State to OldState
80 Get old_status_Value to oldVal
81 If OldState ;
82 Set Simple_Value to OldVal
83 Else ;
84 Set Status_Help_Value to OldVal
85 Set Menu_Status_State to FALSE
86 End
87 End_Procedure // Exit_Menu
88
89 Procedure Show_Status_Help String sHelp
90 Integer iState
91 Get Simple_State to iState
92 If NOT iState Set Status_Help_Value To sHelp
93 Else Set Simple_Value To sHelp
94 End_Procedure
95
96 Function Current_Status_Help Returns String
97 Integer iState
98 String sHelp
99 Get Simple_State to iState
100 If NOT iState Get Status_Help_Value To sHelp
101 Else Get Simple_Value To sHelp
102 Function_Return sHelp
103 End_Function
104
105 { Visibility=Private }
106 Procedure Page_Object Integer bShow
107 Integer hoClient
108 Handle hHndl
109 Get Window_Handle to hHndl
110 Forward Send Page_Object bShow
111 If (bShow AND hHndl=0) Begin
112 Delegate Get Client_Id To hoClient
113 If hoClient ;
114 Send Add_Border_Object to hoClient self amBOTTOM
115 End
116 End_Procedure
117
118 { Visibility=Private }
119 Procedure Deactivating
120 Integer hoClient
121 Delegate Get Client_Id To hoClient
122 Forward Send DeActivating
123 If hoClient ;
124 Send Remove_Border_Object to hoClient self amBOTTOM
125 End_Procedure
126
127End_Class
128