7fd59977 |
1 | #include <IFSelect_SignCategory.ixx> |
2 | #include <Interface_Category.hxx> |
3 | |
4 | |
5 | static Standard_CString nulsign = ""; |
6 | |
7 | |
8 | IFSelect_SignCategory::IFSelect_SignCategory () |
9 | : IFSelect_Signature ("Category") |
10 | { |
11 | Interface_Category::Init(); // si pas deja fait |
12 | Standard_Integer i, nb = Interface_Category::NbCategories(); |
13 | for (i = 1; i <= nb; i ++) AddCase (Interface_Category::Name(i)); |
14 | } |
15 | |
16 | |
17 | Standard_CString IFSelect_SignCategory::Value |
18 | (const Handle(Standard_Transient)& ent, |
19 | const Handle(Interface_InterfaceModel)& model) const |
20 | { |
21 | if (ent.IsNull() || model.IsNull()) return nulsign; |
22 | return Interface_Category::Name(model->CategoryNumber (model->Number(ent))); |
23 | } |