//**************************************************************************** // $Module type: Package // $Module name: cRefactorCheckbox.pkg // // $Author : Nils Svedmyr, RDC Tools International. // Copyright (c) 2018 RDC Tools International // E-mail : support@rdctools.com // Web-site : http://www.rdctools.com // // Created : 2018-10-22 @ 08:04 (Military date format - Year-Month-Day) // // Note : Special class for refactor checkboxes to count the number of // selected functions. // NOTE: It MUST be placed inside a container object of the cRefactorDbView class, // as it sends a "RegisterRefactorCheckbox" message that is defined there. // // The code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // This is free software; you can redistribute it and/or modify it under the terms of the // GNU Lesser General Public License - see the "GNU Lesser General Public License.txt" // in the help folder for more details. // //**************************************************************************** Use cRDCCheckbox.pkg Use cRDCSlideButton.pkg Register_Procedure RegisterRefactorCheckbox Handle ho Class cRefactorCheckBox is a cRDCSlideButton Procedure Construct_Object Forward Send Construct_Object Property Boolean pbReportFunction False Set TextColor to clGreenGrey End_Procedure Procedure End_Construct_Object Delegate Send RegisterRefactorCheckbox (Self) Forward Send End_Construct_Object End_Procedure Procedure OnChangeEvent Boolean bState Forward Send OnChangeEvent Get Checked_State to bState Delegate Send RefactorCheckboxChanged bState (Self) (pbReportFunction(Self)) End_Procedure Procedure DoToggle Boolean bChecked Get Checked_State to bChecked Set Checked_State to (not(bChecked)) End_Procedure { Visibility=Public Category=Appearance} Procedure Set Label String sLabel Set psLabel to sLabel End_Procedure Function Label Returns String Function_Return (private.psLabel(Self)) End_Function End_Class