FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
EditorSelectionController Class Reference
Inheritance diagram for EditorSelectionController:
Collaboration diagram for EditorSelectionController:

Instance Methods

(id) - initWithConnectionParams:entries:selections:
 
- Instance Methods inherited from EditorBaseController
(UITableViewCell *) - tableViewCellFromIdentifier:
 
(void) - adjustEditTextTableViewCell:
 

Protected Attributes

ConnectionParams_params
 
NSArray * _entries
 
NSArray * _selections
 
NSMutableArray * _cur_selections
 

Detailed Description

Definition at line 15 of file EditorSelectionController.h.

Method Documentation

◆ initWithConnectionParams:entries:selections:

- (id) initWithConnectionParams: (ConnectionParams *)  params
entries: (NSArray *)  entries
selections: (NSArray *)  selections 

Definition at line 1 of file EditorSelectionController.m.

21 :(ConnectionParams *)params
22 entries:(NSArray *)entries
23 selections:(NSArray *)selections
24{
25 self = [super initWithStyle:UITableViewStyleGrouped];
26 if (self)
27 {
28 _params = [params retain];
29 _entries = [entries retain];
30 _selections = [selections retain];
31
32 // allocate and init current selections array
33 _cur_selections = [[NSMutableArray alloc] initWithCapacity:[_entries count]];
34 for (int i = 0; i < [entries count]; ++i)
35 {
36 NSString *entry = [entries objectAtIndex:i];
37 if ([_params hasValueForKeyPath:entry])
38 {
39 NSUInteger idx = [(OrderedDictionary *)[selections objectAtIndex:i]
40 indexForValue:[NSNumber numberWithInt:[_params intForKeyPath:entry]]];
41 [_cur_selections addObject:[NSNumber numberWithInt:(idx != NSNotFound ? idx : 0)]];
42 }
43 else
44 [_cur_selections addObject:[NSNumber numberWithInt:0]];
45 }
46 }
47 return self;
48}

Field Documentation

◆ _cur_selections

- (NSMutableArray*) _cur_selections
protected

Definition at line 27 of file EditorSelectionController.h.

◆ _entries

- (NSArray*) _entries
protected

Definition at line 20 of file EditorSelectionController.h.

◆ _params

- (ConnectionParams*) _params
protected

Definition at line 17 of file EditorSelectionController.h.

◆ _selections

- (NSArray*) _selections
protected

Definition at line 24 of file EditorSelectionController.h.


The documentation for this class was generated from the following files: