/* smdlg2.c * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information (NCBI) * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government do not place any restriction on its use or reproduction. * We would, however, appreciate having the NCBI and the author cited in * any work or product based on this material * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * =========================================================================== * * File Name: smdlg2.c * * Author: Alex Smirnov * * Version Creation Date: 8/10/95 * * $Revision: 6.1 $ * * File Description: * * Modifications: * -------------------------------------------------------------------------- * Date Name Description of modification * ------- ---------- ----------------------------------------------------- * * * ========================================================================== */ /**************************************************************************/ /* INCLUDE */ /**************************************************************************/ #include #include #include #include /**************************************************************************/ /* DEFINES */ /**************************************************************************/ /**************************************************************************/ /* TYPEDEFS */ /**************************************************************************/ typedef struct a_group { struct a_group PNTR next; Char GroupName[64]; Uint1 total; Uint1 hide; Uint1 farray[100]; } Nlm_AGroup, PNTR Nlm_AGroupPtr; /**************************************************************************/ /* EXTERN VARIABLE */ /**************************************************************************/ extern CharPtr mSM_allfeatureNames[]; /**************************************************************************/ /* STATIC VARIABLE */ /**************************************************************************/ static ButtoN groupDelButton; static ButtoN groupHideButton; static ButtoN groupCompBox; static ButtoN newButton; static TexT groupDialog; static LisT groupList; static LisT featList; static ButtoN featHideButton; static GrouP featGroup; static PopuP featPopup; static Int2 curGroupInd; static Int2 totalGroups; static Int2 nHideGroups; static Int2 curFeatureInd; static Int2 totalFeatures; static Int2 nHideFeatures; static Int2 groupAr[10]; static Int2 featAr[100]; static Boolean wasModified = FALSE; static CharPtr unknownName = ""; /**************************************************************************/ /* STATIC FUNCTION */ /**************************************************************************/ static void /*FCN*/LoadGroupArray( void ){ Int2 i,j,k; curGroupInd = 0; totalGroups = (Int2)Nlm_GetMuskCParamEd(MSM_GROUPS,MSM_NOSUBCLASS,MSM_NUM); nHideGroups = 0; for ( i=1; i<=totalGroups; i++ ){ j = (Int2)Nlm_GetMuskCParamEd(MSM_GROUPS,i,MSM_NUM ); if ( j != 0 ) { groupAr[j-1] = i; nHideGroups++; } } k = nHideGroups; for ( i=1; i<=totalGroups; i++ ){ j = (Int2)Nlm_GetMuskCParamEd(MSM_GROUPS,i,MSM_NUM ); if ( j == 0 ) groupAr[k++] = i; } } static void /*FCN*/SaveGroupArray ( void ){ Int2 i; for (i=0; i