summaryrefslogtreecommitdiff
path: root/src/IFSelect/IFSelect_SignCategory.cxx
blob: c6df0132ae462af911d16e252f3f1d0a92b5ad6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <IFSelect_SignCategory.ixx>
#include <Interface_Category.hxx>


static Standard_CString nulsign = "";


    IFSelect_SignCategory::IFSelect_SignCategory ()
    : IFSelect_Signature ("Category")
{
  Interface_Category::Init();  // si pas deja fait
  Standard_Integer i, nb = Interface_Category::NbCategories();
  for (i = 1; i <= nb; i ++)  AddCase (Interface_Category::Name(i));
}


    Standard_CString IFSelect_SignCategory::Value
  (const Handle(Standard_Transient)& ent,
   const Handle(Interface_InterfaceModel)& model) const
{
  if (ent.IsNull() || model.IsNull()) return nulsign;
  return Interface_Category::Name(model->CategoryNumber (model->Number(ent)));
}