Lines Matching full:model
16 - (NSMenu*)menuFromModel:(ui::MenuModel*)model;
23 @synthesize model = model_;
31 - (id)initWithModel:(ui::MenuModel*)model
34 model_ = model;
46 // Creates a NSMenu from the given model. If the model has submenus, this can
48 - (NSMenu*)menuFromModel:(ui::MenuModel*)model {
54 int firstItemIndex = model->GetFirstItemIndex(menu);
56 const int count = model->GetItemCount();
59 if (model->GetTypeAt(modelIndex) == ui::MenuModel::TYPE_SEPARATOR) {
62 [self addItemToMenu:menu atIndex:index fromModel:model
71 // anything from the model, this method doesn't need the model index as the
80 // associated with the entry in the model indentifed by |modelIndex|.
83 fromModel:(ui::MenuModel*)model
86 l10n_util::FixUpWindowsStyleLabel(model->GetLabelAt(modelIndex));
94 if (model->GetIconAt(modelIndex, &skiaIcon) && !skiaIcon.isNull()) {
101 ui::MenuModel::ItemType type = model->GetTypeAt(modelIndex);
103 // Recursively build a submenu from the sub-model at this index.
106 ui::MenuModel* submenuModel = model->GetSubmenuModelAt(modelIndex);
113 // the model so hierarchical menus check the correct index in the correct
114 // model. Setting the target to |self| allows this class to participate
118 NSValue* modelObject = [NSValue valueWithPointer:model];
121 if (model->GetAcceleratorAt(modelIndex, &accelerator)) {
138 ui::MenuModel* model =
141 DCHECK(model);
142 if (model) {
143 BOOL checked = model->IsItemCheckedAt(modelIndex);
146 [(id)item setHidden:(!model->IsVisibleAt(modelIndex))];
147 if (model->IsItemDynamicAt(modelIndex)) {
150 l10n_util::FixUpWindowsStyleLabel(model->GetLabelAt(modelIndex));
154 if (model->GetIconAt(modelIndex, &skiaIcon) && !skiaIcon.isNull())
158 return model->IsEnabledAt(modelIndex);
167 ui::MenuModel* model =
170 DCHECK(model);
171 if (model)
172 model->ActivatedAt(modelIndex);
181 // complicate creation logic, and since the tags are model indexes, they