<commit_before>#import "IndoorControl.h"

#include "UIColors.h"
#include "UIHelpers.h"
#include "ImageHelpers.h"
#include "UIHelpers.h"
#include "InteriorsExplorerFloorItemView.h"

#import "ImmediatePanGestureRecognizer.h"
#import "UIButton+DefaultStates.h"
#import "UIView+TouchExclusivity.h"
#import <QuartzCore/QuartzCore.h>

namespace
{
    float iPhoneDismissButtonMargin = 28.f;
}


@implementation IndoorControl

- (UIColor*) textColorNormal
{
    return [UIColor colorWithRed:(18.0f/255.0f) green:(86.0f/255.0f) blue:(176.0f/255.0f) alpha:1.0f];
}

- (UIColor*) textColorHighlighted
{
    return [UIColor colorWithRed:(205.0f/255.0f) green:(252.0f/255.0f) blue:(13.0f/255.0f) alpha:1.0f];;
}

- (id) initWithParams:(float)width :(float)height andDelegate:(id<IndoorControlDelegate>)delegate
{
    if (self = [super init])
    {
        m_delegate = delegate;
        
        const bool isPhone = ExampleApp::Helpers::UIHelpers::UsePhoneLayout();

        m_screenWidth = width;
        m_screenHeight = height;

        m_stateChangeAnimationTimeSeconds = 0.2f;

        self.frame = CGRectMake(0,
                                0,
                                m_screenWidth,
                                m_screenHeight);


        m_inactiveFloorListXPosition = m_screenWidth;

        const float upperMargin = isPhone ? 20.0f : 50.0f;
        m_inactiveDetailPaneYPosition = m_screenHeight;


        self.pFloorPanel = [[UIView alloc] initWithFrame:CGRectMake(m_inactiveFloorListXPosition, m_screenHeight/2.0f, 110, 200)];
        [self addSubview:self.pFloorPanel];
        
        NSBundle* widgetsBundle = [NSBundle bundleForClass:[IndoorControl class]];

        self.pFloorListArrowDown = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"images/arrow3_down" inBundle:widgetsBundle compatibleWithTraitCollection:nil]];
        self.pFloorListArrowUp = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"images/arrow3_up" inBundle:widgetsBundle compatibleWithTraitCollection:nil]];

        [self.pFloorPanel addSubview:self.pFloorListArrowDown];
        [self.pFloorPanel addSubview:self.pFloorListArrowUp];

        self.pFloorListView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 110, 200) style:UITableViewStylePlain];
        self.pFloorListView.delegate = self;
        self.pFloorListView.dataSource = self;
        self.pFloorListView.separatorStyle = UITableViewCellSeparatorStyleNone;
        self.pFloorListView.backgroundColor = [UIColor clearColor];
        self.pFloorListView.backgroundView = nil;
        self.pFloorListView.autoresizesSubviews = YES;

        [self.pFloorPanel addSubview:self.pFloorListView];

        self.pFloorChangeButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 64, 64)];
        [self.pFloorChangeButton setBackgroundImage:ExampleApp::Helpers::ImageHelpers::LoadImage(@"images/floor_selection_button", widgetsBundle) forState:UIControlStateNormal];<commit_msg>Disable manual scrolling of the indoor control background<commit_after>#import "IndoorControl.h"

#include "UIColors.h"
#include "UIHelpers.h"
#include "ImageHelpers.h"
#include "UIHelpers.h"
#include "InteriorsExplorerFloorItemView.h"

#import "ImmediatePanGestureRecognizer.h"
#import "UIButton+DefaultStates.h"
#import "UIView+TouchExclusivity.h"
#import <QuartzCore/QuartzCore.h>

namespace
{
    float iPhoneDismissButtonMargin = 28.f;
}


@implementation IndoorControl

- (UIColor*) textColorNormal
{
    return [UIColor colorWithRed:(18.0f/255.0f) green:(86.0f/255.0f) blue:(176.0f/255.0f) alpha:1.0f];
}

- (UIColor*) textColorHighlighted
{
    return [UIColor colorWithRed:(205.0f/255.0f) green:(252.0f/255.0f) blue:(13.0f/255.0f) alpha:1.0f];;
}

- (id) initWithParams:(float)width :(float)height andDelegate:(id<IndoorControlDelegate>)delegate
{
    if (self = [super init])
    {
        m_delegate = delegate;
        
        const bool isPhone = ExampleApp::Helpers::UIHelpers::UsePhoneLayout();

        m_screenWidth = width;
        m_screenHeight = height;

        m_stateChangeAnimationTimeSeconds = 0.2f;

        self.frame = CGRectMake(0,
                                0,
                                m_screenWidth,
                                m_screenHeight);


        m_inactiveFloorListXPosition = m_screenWidth;

        const float upperMargin = isPhone ? 20.0f : 50.0f;
        m_inactiveDetailPaneYPosition = m_screenHeight;


        self.pFloorPanel = [[UIView alloc] initWithFrame:CGRectMake(m_inactiveFloorListXPosition, m_screenHeight/2.0f, 110, 200)];
        [self addSubview:self.pFloorPanel];
        
        NSBundle* widgetsBundle = [NSBundle bundleForClass:[IndoorControl class]];

        self.pFloorListArrowDown = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"images/arrow3_down" inBundle:widgetsBundle compatibleWithTraitCollection:nil]];
        self.pFloorListArrowUp = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"images/arrow3_up" inBundle:widgetsBundle compatibleWithTraitCollection:nil]];

        [self.pFloorPanel addSubview:self.pFloorListArrowDown];
        [self.pFloorPanel addSubview:self.pFloorListArrowUp];

        self.pFloorListView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 110, 200) style:UITableViewStylePlain];
        self.pFloorListView.delegate = self;
        self.pFloorListView.dataSource = self;
        self.pFloorListView.separatorStyle = UITableViewCellSeparatorStyleNone;
        self.pFloorListView.backgroundColor = [UIColor clearColor];
        self.pFloorListView.backgroundView = nil;
        self.pFloorListView.autoresizesSubviews = YES;
        self.pFloorListView.scrollEnabled = NO;

        [self.pFloorPanel addSubview:self.pFloorListView];

        self.pFloorChangeButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 64, 64)];
        [self.pFloorChangeButton setBackgroundImage:ExampleApp::Helpers::ImageHelpers::LoadImage(@"images/floor_selection_button", widgetsBundle) forState:UIControlStateNormal];
{'fraction_non_alphanumeric': 0.10752330226364847, 'fraction_numerical': 0.02829560585885486, 'mean_word_length': 3.8420628525382754, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3014650', 'n_tokens_mistral': 2092, 'n_tokens_neox': 1889, 'n_words': 294}