//**************************************************************************** // $Module type: Class // $Module name: cLFile_bn // $Author : Nils G. Svedmyr // Created : 2003-05-09 @ 10:55 // // Description : // // $Rev History: // 2003-05-09 Module header created //**************************************************************************** //**************************************************************************** // $Module type: CLASS // $Module name: Class // $Author : Nils G. Svedmyr // Created : 2003-05-09 @ 10:55 // // Description : // // $Rev History // 2003-05-09 Module header created //**************************************************************************** //Use cToolTip.pkg Use cRDSWinToolTip.pkg Class cLFile_bn Is A Button Import_Class_Protocol cRDSWinToolTip Procedure Construct_Object Forward Send Construct_Object Property Handle phoLFile (oLFile(Self)) // Property Handle Private.phoToolTip 0 Property Integer piGetMsg 0 Property Integer piSetMsg 0 Property Integer piItem 0 Send Define_cRDSWinToolTip Set pbClassEnabledHandleType To False // True=Default Set pbClassDisabledHandleType To True // True=Default Set pbClassEntryStateHandleType To True // True=Default // Object oTooltip Is A cTooltip // Set Private.phoToolTip To (Self) // End_Object // oTooltip End_Procedure // Construct_Object // Procedure End_Construct_Object // Handle ho // String sHelp // Boolean bVisible bPopup // Forward Send End_Construct_Object // Get Private.phoToolTip To ho // Get Visible_State To bVisible // If (ho > 0 And bVisible = True) Begin // Delegate Get Popup_State To bPopup // If (bPopup = False) Send Activate Of ho // End // If (ho > 0 And bVisible = True) Begin // End_Procedure // End_Construct_Object // Procedure Set pbToolTips Boolean bState // Handle ho // Get Private.phoToolTip To ho // If ho Begin // If (bState = False) Send DeActivate Of ho // Else Send Activate Of ho // End // If ho Begin // End_Procedure // Set pbToolTips Procedure OnClick Integer iMsg iItem String sRetval Get Value Of (Self - 2) To sRetval Get piSetMsg To iMsg Get piItem To iItem If iMsg Begin If iItem Set iMsg Of (phoLFile(Self)) iItem To sRetval Else Set iMsg Of (phoLFile(Self)) To sRetval Send Refresh True // Refresh self to check that value was properly set. End // If iMsg Begin End_Procedure // OnClick Procedure DoSetValue Send OnClick End_Procedure // DoSetValue Procedure Refresh Boolean bState Integer iMsg iItem String sRetval If Not bState Begin Set Value Of (Self - 2) To "" Procedure_Return End // If Not bState Begin Get piGetMsg To iMsg Get piItem To iItem If iMsg Begin If iItem Get iMsg Of (phoLFile(Self)) iItem To sRetval Else Get iMsg Of (phoLFile(Self)) To sRetval Set Value Of (Self - 2) To sRetval End // If iMsg Begin End_Procedure // Procedure Page Integer iFlag // Handle ho hWnd // String sHelp // Boolean bVisible bPopup // Forward Send Page iFlag // Get Private.phoToolTip To ho // Get Visible_State To bVisible // If (ho And bVisible) Begin // Get Status_Help Item 0 To sHelp // Set psTooltip Of ho To (ToAnsi(sHelp)) // If (Enabled_State(Self)) Get Form_Window_Handle To hWnd // Else Get Window_Handle To hWnd // If (iFlag And ho > 0 And hWnd > 0) Send AddTool Of ho hWnd // End // If (ho And bVisible) Begin // End_Procedure // Page // Procedure Destroy // Send DestroyToolTip // Forward Send Destroy // End_Procedure // Destroy // Procedure DestroyToolTip // Handle ho // Get Private.phoToolTip To ho // If ho Begin // Send DeleteTool Of ho // Send Destroy Of ho // Set Private.phoToolTip To 0 // End // If ho Begin // End_Procedure // DestroyToolTip // Function TooltipHint Returns String // Function_Return "" // End_Function // Function TooltipHintObject Returns Integer // Function_Return 0 // End_Function End_Class // cLFile_bn