Use Set.Pkg Use WinGdi.Pkg Use tWinStructs.pkg Define R2_NOT For 6 Class cSplitterBaseControl Is A DfControl //**************************************************************************** // $Module type: PROCEDURE // $Module name: Construct_Object // $Author : VO // Created : 03/07/00 @ 6:21 // // Description // Creation of storage properties for finding the boundaries of the // splitter. They are filled from a method called DoSetMinMaxTrack which // is called from SplitterOnMouseDown. There is also a property defined // that contains the cursor to be loaded from ComCtl32.Dll. The focusmode // is set to non-focusable because we only want to find the splitterline // by moving the mouse cursor over it. The object of the splitter is set to // the same as it's parent to stay invisible to the user. The nested childs // object is present to store the objects that needs to be notified of a // splitter move. // // $Rev History // 03/07/00 VO Module header created //**************************************************************************** Procedure Construct_Object Forward Send Construct_Object Property Integer piMinTrack 0 // boundaries to where the splitter can be moved Property Integer piMaxTrack 0 Property String psTrackCursor "#106" Set Focus_Mode To NonFocusable Set Color To (Color (Parent (Self))) Object oObjectsToNotify Is A Set End_Object // oObjectsToNotify End_Procedure // Construct_Object //**************************************************************************** // $Module type: PROCEDURE // $Module name: DoAddObjectToNotify // $Author : VO // Created : 03/02/00 @ 3:05 // // Description // Use this method to store the object that needs to be notified of a // change in the location of the splitter // // $Rev History // 03/02/00 VO Module header created //**************************************************************************** Procedure DoAddObjectToNotify Integer hoControl Send Add_Element To oObjectsToNotify hoControl End_Procedure // DoAddObjectToNotify //**************************************************************************** // $Module type: PROCEDURE // $Module name: DoNotify // $Author : VO // Created : 03/06/00 @ 5:24 // // Description // When the splitter has moved and the mouse cursor has been lifted the // objects who did register theirselves with the splitter object needs to // be notified. // // $Rev History // 03/06/00 VO Module header created //**************************************************************************** Procedure DoNotify Integer iTrack Integer hoObjectsToNotify iItems iItem hoControl Move oObjectsToNotify To hoObjectsToNotify Move (Item_Count (hoObjectsToNotify) - 1) To iItems For iItem From 0 To iItems Get Integer_Value Of hoObjectsToNotify Item iItem To hoControl If (hoControl > 0) Begin Send OnSplitterChange To hoControl iTrack End Loop Delegate Send OnResize End_Procedure // DoNotify //**************************************************************************** // $Module type: PROCEDURE // $Module name: DoSetTrackCursor // $Author : VO // Created : 03/06/00 @ 6:11 // // Description // This method is used to load a horizontal or vertical splitter cursor // and bind it to the first parameter classname specified by the // External_Class_Name instruction. // // $Rev History // 03/06/00 VO Module header created //**************************************************************************** Procedure DoSetTrackCursor String sCursor Integer iRetval Handle hWnd hLib hCursor Get Window_Handle To hWnd If (hWnd <> 0) Begin Move (LoadLibrary ("ComCtl32.Dll")) To hLib If (hLib <> 0) Begin Get psTrackCursor To sCursor If (sCursor <> "") Begin Move (LoadResourceCursor (hLib, sCursor)) To hCursor If (hCursor <> 0) Begin Move (SetClassLong (hWnd, GCL_HCURSOR, hCursor)) To iRetval End End Move (FreeLibrary (hLib)) To iRetval End End End_Procedure // DoSetTrackCursor //**************************************************************************** // $Module type: PROCEDURE // $Module name: Page // $Author : VO // Created : 03/07/00 @ 6:29 // // Description // When the object is paged the cursor is loaded by calling DoSetTrackCursor // // $Rev History // 03/07/00 VO Module header created //**************************************************************************** Procedure Page Integer iState Forward Send Page iState If (iState = 1) Begin Send DoSetTrackCursor End End_Procedure // Page End_Class // cSplitterBaseControl