text:
.class public Lcom/htc/widget/MbActionBar;
.super Landroid/widget/RelativeLayout;
.source "MbActionBar.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/view/View$OnLongClickListener;

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;,
        Lcom/htc/widget/MbActionBar$OnPanelClickListener;
    }
.end annotation

# static fields
.field public static final CENTER_VIEW_1:I = 0x1

.field public static final CENTER_VIEW_2:I = 0x2

.field public static final CENTER_VIEW_3:I = 0x3

.field public static final DEFAULT_MODE:I = 0x2

.field public static final FIVE_BUTTON_MODE:I = 0x5

.field public static final FOUR_BUTTON_MODE:I = 0x4

.field public static final INDICATOR_VIEW:I = 0x5

.field public static final LEFT_VIEW:I = 0x0

.field public static final RIGHT_VIEW:I = 0x4

.field private static final TAG:Ljava/lang/String; = "ActionBar"

.field public static final THREE_BUTTON_MODE:I = 0x3

.field private static final localLOGV:Z

# instance fields
.field private CENTER_BUTTON_WIDTH:I

.field private LEFT_BUTTON_WIDTH:I

.field private RIGHT_BUTTON_WIDTH:I

.field private mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

.field private mContext:Landroid/content/Context;

.field private mControlPanelCenter1:Landroid/widget/ImageView;

.field private mControlPanelCenter2:Landroid/widget/ImageView;

.field private mControlPanelCenter3:Landroid/widget/ImageView;

.field private mControlPanelLeft:Landroid/widget/ImageView;

.field private mControlPanelRight:Landroid/widget/ImageView;

.field private mCountIndicator:Landroid/widget/TextView;

.field private mCountShadowColor:I

.field private mCountTextColor:I

.field private mCurrentMode:I

.field private mImgCenterBackground:Landroid/graphics/drawable/Drawable;

.field private mImgDivider:Landroid/graphics/drawable/Drawable;

.field private mImgLeftBackground:Landroid/graphics/drawable/Drawable;

.field private mImgNotification:Landroid/graphics/drawable/Drawable;

.field private mImgRightBackground:Landroid/graphics/drawable/Drawable;

.field private mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 234
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/htc/widget/MbActionBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 246
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v1, 0x0

    const/4 v0, 0x0

    .line 255
    invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 113
    iput v1, p0, Lcom/htc/widget/MbActionBar;->RIGHT_BUTTON_WIDTH:I

    .line 115
    iput v1, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    .line 117
    iput v1, p0, Lcom/htc/widget/MbActionBar;->CENTER_BUTTON_WIDTH:I

    .line 121
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    .line 123
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    .line 125
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    .line 127
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    .line 129
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    .line 131
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    .line 133
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    .line 134
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    .line 135
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mImgLeftBackground:Landroid/graphics/drawable/Drawable;

    .line 136
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mImgRightBackground:Landroid/graphics/drawable/Drawable;

    .line 137
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    .line 138
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mImgDivider:Landroid/graphics/drawable/Drawable;

    .line 139
    iput-object v0, p0, Lcom/htc/widget/MbActionBar;->mImgNotification:Landroid/graphics/drawable/Drawable;

    .line 142
    const/4 v0, 0x2

    iput v0, p0, Lcom/htc/widget/MbActionBar;->mCurrentMode:I

    .line 256
    iput-object p1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    .line 257
    invoke-virtual {p0}, Lcom/htc/widget/MbActionBar;->init()V

    .line 268
    return-void
.end method

.method private checkSize()V
    .locals 0

    .prologue
    .line 281
    return-void
.end method

.method private initView()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 377
    const v1, 0x2020112

    invoke-virtual {p0, v1}, Lcom/htc/widget/MbActionBar;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    .line 378
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-nez v1, :cond_0

    .line 379
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "widget_taskbar_button_left"

    invoke-static {v1, v2}, Lcom/htc/res/HtcResources;->getCommonDrawable(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgLeftBackground:Landroid/graphics/drawable/Drawable;

    .line 380
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgLeftBackground:Landroid/graphics/drawable/Drawable;

    if-eqz v1, :cond_0

    .line 381
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/htc/widget/MbActionBar;->mImgLeftBackground:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 383
    :cond_0
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 384
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    .line 387
    const v1, 0x2020113

    invoke-virtual {p0, v1}, Lcom/htc/widget/MbActionBar;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    .line 388
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-nez v1, :cond_1

    .line 389
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "widget_taskbar_button_right"

    invoke-static {v1, v2}, Lcom/htc/res/HtcResources;->getCommonDrawable(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgRightBackground:Landroid/graphics/drawable/Drawable;

    .line 390
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgRightBackground:Landroid/graphics/drawable/Drawable;

    if-eqz v1, :cond_1

    .line 391
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/htc/widget/MbActionBar;->mImgRightBackground:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 393
    :cond_1
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 394
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    .line 397
    const v1, 0x2020116

    invoke-virtual {p0, v1}, Lcom/htc/widget/MbActionBar;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    .line 398
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-nez v1, :cond_2

    .line 399
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "widget_taskbar_button_Center"

    invoke-static {v1, v2}, Lcom/htc/res/HtcResources;->getCommonDrawable(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    .line 400
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    if-eqz v1, :cond_2

    .line 401
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 403
    :cond_2
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 404
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    .line 407
    const v1, 0x2020117

    invoke-virtual {p0, v1}, Lcom/htc/widget/MbActionBar;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    .line 408
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    if-eqz v1, :cond_3

    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-nez v1, :cond_3

    .line 409
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "widget_taskbar_button_Center"

    invoke-static {v1, v2}, Lcom/htc/res/HtcResources;->getCommonDrawable(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    .line 410
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    if-eqz v1, :cond_3

    .line 411
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 413
    :cond_3
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 414
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    .line 417
    const v1, 0x2020118

    invoke-virtual {p0, v1}, Lcom/htc/widget/MbActionBar;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    .line 418
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    if-eqz v1, :cond_4

    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-nez v1, :cond_4

    .line 419
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "widget_taskbar_button_Center"

    invoke-static {v1, v2}, Lcom/htc/res/HtcResources;->getCommonDrawable(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    .line 420
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    if-eqz v1, :cond_4

    .line 421
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/htc/widget/MbActionBar;->mImgCenterBackground:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 423
    :cond_4
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 424
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v1, p0}, Landroid/widget/ImageView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    .line 427
    const v1, 0x2020115

    invoke-virtual {p0, v1}, Lcom/htc/widget/MbActionBar;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    .line 428
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    if-eqz v1, :cond_6

    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-nez v1, :cond_6

    .line 429
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "common_notification_on"

    invoke-static {v1, v2}, Lcom/htc/res/HtcResources;->getCommonDrawable(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgNotification:Landroid/graphics/drawable/Drawable;

    .line 430
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mImgNotification:Landroid/graphics/drawable/Drawable;

    if-eqz v1, :cond_5

    .line 431
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    iget-object v2, p0, Lcom/htc/widget/MbActionBar;->mImgNotification:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 432
    :cond_5
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "actionbar_count_text_color"

    const/4 v3, -0x1

    invoke-static {v1, v2, v3}, Lcom/htc/res/HtcResources;->getThemeStyleColor(Landroid/content/Context;Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/htc/widget/MbActionBar;->mCountTextColor:I

    .line 433
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    const-string v2, "actionbar_count_text_shadow"

    const/high16 v3, -0x100

    invoke-static {v1, v2, v3}, Lcom/htc/res/HtcResources;->getThemeStyleColor(Landroid/content/Context;Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/htc/widget/MbActionBar;->mCountShadowColor:I

    .line 434
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    iget v2, p0, Lcom/htc/widget/MbActionBar;->mCountTextColor:I

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 435
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    const/high16 v2, 0x3f80

    iget v3, p0, Lcom/htc/widget/MbActionBar;->mCountShadowColor:I

    invoke-virtual {v1, v2, v4, v4, v3}, Landroid/widget/TextView;->setShadowLayer(FFFI)V

    .line 439
    :cond_6
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 441
    .local v0, res:Landroid/content/res/Resources;
    const v1, 0x2050074

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v1

    float-to-int v1, v1

    iput v1, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    .line 442
    const v1, 0x2050076

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v1

    float-to-int v1, v1

    iput v1, p0, Lcom/htc/widget/MbActionBar;->RIGHT_BUTTON_WIDTH:I

    .line 443
    const v1, 0x2050075

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v1

    float-to-int v1, v1

    iput v1, p0, Lcom/htc/widget/MbActionBar;->CENTER_BUTTON_WIDTH:I

    .line 445
    iget v1, p0, Lcom/htc/widget/MbActionBar;->mCurrentMode:I

    invoke-virtual {p0, v1}, Lcom/htc/widget/MbActionBar;->setMode(I)V

    .line 446
    return-void
.end method

.method private setLayout()V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .prologue
    .line 322
    const/4 v0, 0x0

    .line 323
    .local v0, indicator:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/htc/widget/MbActionBar;->getChildCount()I

    move-result v3

    if-lez v3, :cond_0

    .line 324
    iget-object v3, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    invoke-virtual {v3}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    .end local v0           #indicator:Ljava/lang/String;
    check-cast v0, Ljava/lang/String;

    .line 327
    .restart local v0       #indicator:Ljava/lang/String;
    :cond_0
    invoke-virtual {p0}, Lcom/htc/widget/MbActionBar;->removeAllViews()V

    .line 329
    iget-object v3, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    invoke-static {v3}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    .line 331
    .local v1, inflater:Landroid/view/LayoutInflater;
    const v3, 0x2090059

    const/4 v4, 0x0

    invoke-virtual {v1, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/view/ViewGroup;

    .line 333
    .local v2, layout:Landroid/view/ViewGroup;
    if-eqz v2, :cond_2

    .line 334
    invoke-virtual {p0, v2}, Lcom/htc/widget/MbActionBar;->addView(Landroid/view/View;)V

    .line 339
    invoke-direct {p0}, Lcom/htc/widget/MbActionBar;->initView()V

    .line 341
    if-eqz v0, :cond_1

    .line 342
    invoke-virtual {p0, v0}, Lcom/htc/widget/MbActionBar;->setCountIndicator(Ljava/lang/String;)V

    .line 344
    :cond_1
    return-void

    .line 336
    :cond_2
    new-instance v3, Ljava/lang/Exception;

    const-string v4, "no theme resource"

    invoke-direct {v3, v4}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V

    throw v3
.end method

.method private setLayout(I)V
    .locals 5
    .parameter "inputLauoutid"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .prologue
    .line 347
    const/4 v0, 0x0

    .line 348
    .local v0, indicator:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/htc/widget/MbActionBar;->getChildCount()I

    move-result v3

    if-lez v3, :cond_0

    .line 349
    iget-object v3, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    invoke-virtual {v3}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    .end local v0           #indicator:Ljava/lang/String;
    check-cast v0, Ljava/lang/String;

    .line 352
    .restart local v0       #indicator:Ljava/lang/String;
    :cond_0
    invoke-virtual {p0}, Lcom/htc/widget/MbActionBar;->removeAllViews()V

    .line 354
    iget-object v3, p0, Lcom/htc/widget/MbActionBar;->mContext:Landroid/content/Context;

    invoke-static {v3}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    .line 356
    .local v1, inflater:Landroid/view/LayoutInflater;
    const/4 v3, 0x0

    invoke-virtual {v1, p1, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/view/ViewGroup;

    .line 358
    .local v2, layout:Landroid/view/ViewGroup;
    if-eqz v2, :cond_2

    .line 359
    invoke-virtual {p0, v2}, Lcom/htc/widget/MbActionBar;->addView(Landroid/view/View;)V

    .line 364
    invoke-direct {p0}, Lcom/htc/widget/MbActionBar;->initView()V

    .line 366
    if-eqz v0, :cond_1

    .line 367
    invoke-virtual {p0, v0}, Lcom/htc/widget/MbActionBar;->setCountIndicator(Ljava/lang/String;)V

    .line 369
    :cond_1
    return-void

    .line 361
    :cond_2
    new-instance v3, Ljava/lang/Exception;

    const-string v4, "no theme resource"

    invoke-direct {v3, v4}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V

    throw v3
.end method

# virtual methods
.method public getCenterButton1()Landroid/widget/ImageView;
    .locals 1

    .prologue
    .line 751
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    return-object v0
.end method

.method public getCenterButton2()Landroid/widget/ImageView;
    .locals 1

    .prologue
    .line 759
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    return-object v0
.end method

.method public getCenterButton3()Landroid/widget/ImageView;
    .locals 1

    .prologue
    .line 767
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    return-object v0
.end method

.method public getClickListener()Lcom/htc/widget/MbActionBar$OnPanelClickListener;
    .locals 1

    .prologue
    .line 638
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    return-object v0
.end method

.method public getCountIndicator()I
    .locals 1

    .prologue
    .line 565
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    return v0
.end method

.method public getCountIndicatorView()Landroid/widget/TextView;
    .locals 1

    .prologue
    .line 779
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    return-object v0
.end method

.method public getLeftButton()Landroid/widget/ImageView;
    .locals 1

    .prologue
    .line 730
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    return-object v0
.end method

.method public getLongClickListener()Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;
    .locals 1

    .prologue
    .line 690
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    return-object v0
.end method

.method public getRightButton()Landroid/widget/ImageView;
    .locals 1

    .prologue
    .line 743
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    return-object v0
.end method

.method public init()V
    .locals 1

    .prologue
    .line 295
    :try_start_0
    invoke-direct {p0}, Lcom/htc/widget/MbActionBar;->setLayout()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 299
    :goto_0
    return-void

    .line 296
    :catch_0
    move-exception v0

    .line 297
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public init(I)V
    .locals 1
    .parameter "layoutId"

    .prologue
    .line 309
    :try_start_0
    invoke-direct {p0, p1}, Lcom/htc/widget/MbActionBar;->setLayout(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 313
    :goto_0
    return-void

    .line 310
    :catch_0
    move-exception v0

    .line 311
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1
    .parameter "view"

    .prologue
    .line 651
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    if-eqz v0, :cond_0

    .line 652
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_1

    .line 653
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelClickListener;->onLeftClick()V

    .line 664
    :cond_0
    :goto_0
    return-void

    .line 654
    :cond_1
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_2

    .line 655
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelClickListener;->onRightClick()V

    goto :goto_0

    .line 656
    :cond_2
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_3

    .line 657
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelClickListener;->onCenterClick1()V

    goto :goto_0

    .line 658
    :cond_3
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_4

    .line 659
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelClickListener;->onCenterClick2()V

    goto :goto_0

    .line 660
    :cond_4
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_0

    .line 661
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelClickListener;->onCenterClick3()V

    goto :goto_0
.end method

.method public onLongClick(Landroid/view/View;)Z
    .locals 1
    .parameter "view"

    .prologue
    .line 704
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    if-eqz v0, :cond_4

    .line 705
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_0

    .line 706
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;->onLeftLongClick()Z

    move-result v0

    .line 717
    :goto_0
    return v0

    .line 707
    :cond_0
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_1

    .line 708
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;->onRightLongClick()Z

    move-result v0

    goto :goto_0

    .line 709
    :cond_1
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_2

    .line 710
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;->onCenterLongClick1()Z

    move-result v0

    goto :goto_0

    .line 711
    :cond_2
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_3

    .line 712
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;->onCenterLongClick2()Z

    move-result v0

    goto :goto_0

    .line 713
    :cond_3
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_4

    .line 714
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    invoke-interface {v0}, Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;->onCenterLongClick3()Z

    move-result v0

    goto :goto_0

    .line 717
    :cond_4
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public setCountIndicator(I)V
    .locals 1
    .parameter "num"

    .prologue
    .line 538
    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/htc/widget/MbActionBar;->setCountIndicator(Ljava/lang/String;)V

    .line 539
    return-void
.end method

.method public setCountIndicator(Ljava/lang/String;)V
    .locals 2
    .parameter "num"

    .prologue
    .line 547
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v0

    const/4 v1, 0x2

    if-le v0, v1, :cond_0

    .line 548
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    const/high16 v1, 0x4140

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextSize(F)V

    .line 552
    :goto_0
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 553
    return-void

    .line 550
    :cond_0
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    const/high16 v1, 0x4160

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextSize(F)V

    goto :goto_0
.end method

.method public setCountIndicatorVisibility(I)V
    .locals 2
    .parameter "flag"

    .prologue
    .line 512
    :try_start_0
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    if-eqz v1, :cond_1

    .line 514
    const/4 v0, 0x0

    .line 515
    .local v0, isDiff:Z
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getVisibility()I

    move-result v1

    if-eq v1, p1, :cond_0

    .line 516
    const/4 v0, 0x1

    .line 517
    :cond_0
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mCountIndicator:Landroid/widget/TextView;

    invoke-virtual {v1, p1}, Landroid/widget/TextView;->setVisibility(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 526
    .end local v0           #isDiff:Z
    :cond_1
    :goto_0
    return-void

    .line 523
    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method public setIcon(Landroid/graphics/drawable/Drawable;I)V
    .locals 1
    .parameter "drawable"
    .parameter "viewlocation"

    .prologue
    .line 582
    packed-switch p2, :pswitch_data_0

    .line 611
    :cond_0
    :goto_0
    return-void

    .line 584
    :pswitch_0
    :try_start_0
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    .line 585
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelLeft:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_0

    .line 607
    :catch_0
    move-exception v0

    goto :goto_0

    .line 588
    :pswitch_1
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    .line 589
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelRight:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_0

    .line 592
    :pswitch_2
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    .line 593
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_0

    .line 596
    :pswitch_3
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    .line 597
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_0

    .line 600
    :pswitch_4
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    .line 601
    iget-object v0, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 582
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_1
    .end packed-switch
.end method

.method public setMode(I)V
    .locals 4
    .parameter "Mode"

    .prologue
    const/16 v3, 0x8

    const/4 v2, 0x0

    .line 463
    iput p1, p0, Lcom/htc/widget/MbActionBar;->mCurrentMode:I

    .line 464
    invoke-virtual {p0}, Lcom/htc/widget/MbActionBar;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;

    .line 465
    .local v0, lp:Landroid/widget/RelativeLayout$LayoutParams;
    iget v1, p0, Lcom/htc/widget/MbActionBar;->mCurrentMode:I

    packed-switch v1, :pswitch_data_0

    .line 499
    :goto_0
    return-void

    .line 467
    :pswitch_0
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 468
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 469
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 470
    iget v1, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    iget v2, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    add-int/2addr v1, v2

    iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 471
    const-string v1, "ActionBar"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "ActionBar DEFAULT_MODE Width : "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 472
    invoke-virtual {p0, v0}, Lcom/htc/widget/MbActionBar;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_0

    .line 475
    :pswitch_1
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 476
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 477
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 478
    iget v1, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    iget v2, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    add-int/2addr v1, v2

    iget v2, p0, Lcom/htc/widget/MbActionBar;->CENTER_BUTTON_WIDTH:I

    add-int/2addr v1, v2

    iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 479
    const-string v1, "ActionBar"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "ActionBar THREE_BUTTON_MODE Width : "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 480
    invoke-virtual {p0, v0}, Lcom/htc/widget/MbActionBar;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_0

    .line 483
    :pswitch_2
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 484
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 485
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 486
    iget v1, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    iget v2, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    add-int/2addr v1, v2

    iget v2, p0, Lcom/htc/widget/MbActionBar;->CENTER_BUTTON_WIDTH:I

    mul-int/lit8 v2, v2, 0x2

    add-int/2addr v1, v2

    iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 487
    const-string v1, "ActionBar"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "ActionBar FOUR_BUTTON_MODE Width : "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 488
    invoke-virtual {p0, v0}, Lcom/htc/widget/MbActionBar;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto/16 :goto_0

    .line 491
    :pswitch_3
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter1:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 492
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter2:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 493
    iget-object v1, p0, Lcom/htc/widget/MbActionBar;->mControlPanelCenter3:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 494
    iget v1, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    iget v2, p0, Lcom/htc/widget/MbActionBar;->LEFT_BUTTON_WIDTH:I

    add-int/2addr v1, v2

    iget v2, p0, Lcom/htc/widget/MbActionBar;->CENTER_BUTTON_WIDTH:I

    mul-int/lit8 v2, v2, 0x3

    add-int/2addr v1, v2

    iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 495
    const-string v1, "ActionBar"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "ActionBar FIVE_BUTTON_MODE Width : "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 496
    invoke-virtual {p0, v0}, Lcom/htc/widget/MbActionBar;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto/16 :goto_0

    .line 465
    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method

.method public setOnClickListener(Lcom/htc/widget/MbActionBar$OnPanelClickListener;)V
    .locals 0
    .parameter "panelclicklistener"

    .prologue
    .line 624
    iput-object p1, p0, Lcom/htc/widget/MbActionBar;->mClickListener:Lcom/htc/widget/MbActionBar$OnPanelClickListener;

    .line 625
    return-void
.end method

.method public setOnLongClickListener(Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;)V
    .locals 0
    .parameter "panellongclicklistener"

    .prologue
    .line 676
    iput-object p1, p0, Lcom/htc/widget/MbActionBar;->mLongClickListener:Lcom/htc/widget/MbActionBar$OnPanelLongClickListener;

    .line 677
    return-void
.end method


text:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "pkix_pl_ldapt.h"

SEC_ASN1_MKSUB(SEC_AnyTemplate)
SEC_ASN1_MKSUB(SEC_NullTemplate)
SEC_ASN1_MKSUB(SEC_OctetStringTemplate)

/*
 * CertificatePair      ::= SEQUENCE {
 *      forward [0]     Certificate OPTIONAL,
 *      reverse [1]     Certificate OPTIONAL
 *                      -- at least one of the pair shall be present --
 *  }
 */

const SEC_ASN1Template PKIX_PL_LDAPCrossCertPairTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(LDAPCertPair) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        SEC_ASN1_EXPLICIT | SEC_ASN1_XTRN | 0,
        offsetof(LDAPCertPair, forward), SEC_ASN1_SUB(SEC_AnyTemplate) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        SEC_ASN1_EXPLICIT | SEC_ASN1_XTRN | 1,
        offsetof(LDAPCertPair, reverse), SEC_ASN1_SUB(SEC_AnyTemplate) },
    { 0 }
};

/*
 * BindRequest ::=
 *      [APPLICATION 0] SEQUENCE {
 *                      version INTEGER (1..127),
 *                      name    LDAPDN,
 *                      authentication CHOICE {
 *                              simple          [0] OCTET STRING,
 *                              krbv42LDAP      [1] OCTET STRING,
 *                              krbv42DSA       [2] OCTET STRING
 *                      }
 *      }
 *
 * LDAPDN ::= LDAPString
 *
 * LDAPString ::= OCTET STRING
 */

#define LDAPStringTemplate SEC_ASN1_SUB(SEC_OctetStringTemplate)

static const SEC_ASN1Template LDAPBindApplTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL },
    { SEC_ASN1_INTEGER, offsetof(LDAPBind, version) },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPBind, bindName) },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPBind, authentication) },
    { 0 }
};

static const SEC_ASN1Template LDAPBindTemplate[] = {
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_APPLICATION | LDAP_BIND_TYPE, 0,
        LDAPBindApplTemplate, sizeof (LDAPBind) }
};

/*
 * BindResponse ::= [APPLICATION 1] LDAPResult
 *
 * LDAPResult ::=
 *      SEQUENCE {
 *              resultCode      ENUMERATED {
 *                              success                         (0),
 *                              operationsError                 (1),
 *                              protocolError                   (2),
 *                              timeLimitExceeded               (3),
 *                              sizeLimitExceeded               (4),
 *                              compareFalse                    (5),
 *                              compareTrue                     (6),
 *                              authMethodNotSupported          (7),
 *                              strongAuthRequired              (8),
 *                              noSuchAttribute                 (16),
 *                              undefinedAttributeType          (17),
 *                              inappropriateMatching           (18),
 *                              constraintViolation             (19),
 *                              attributeOrValueExists          (20),
 *                              invalidAttributeSyntax          (21),
 *                              noSuchObject                    (32),
 *                              aliasProblem                    (33),
 *                              invalidDNSyntax                 (34),
 *                              isLeaf                          (35),
 *                              aliasDereferencingProblem       (36),
 *                              inappropriateAuthentication     (48),
 *                              invalidCredentials              (49),
 *                              insufficientAccessRights        (50),
 *                              busy                            (51),
 *                              unavailable                     (52),
 *                              unwillingToPerform              (53),
 *                              loopDetect                      (54),
 *                              namingViolation                 (64),
 *                              objectClassViolation            (65),
 *                              notAllowedOnNonLeaf             (66),
 *                              notAllowedOnRDN                 (67),
 *                              entryAlreadyExists              (68),
 *                              objectClassModsProhibited       (69),
 *                              other                           (80)
 *                              },
 *              matchedDN       LDAPDN,
 *              errorMessage    LDAPString
 *      }
 */

static const SEC_ASN1Template LDAPResultTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL },
    { SEC_ASN1_ENUMERATED, offsetof(LDAPResult, resultCode) },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPResult, matchedDN) },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPResult, errorMessage) },
    { 0 }
};

static const SEC_ASN1Template LDAPBindResponseTemplate[] = {
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_APPLICATION | LDAP_BINDRESPONSE_TYPE, 0,
        LDAPResultTemplate, sizeof (LDAPBindResponse) }
};

/*
 * UnbindRequest ::= [APPLICATION 2] NULL
 */

static const SEC_ASN1Template LDAPUnbindTemplate[] = {
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_APPLICATION | SEC_ASN1_XTRN |
        LDAP_UNBIND_TYPE , 0, SEC_ASN1_SUB(SEC_NullTemplate) }
};

/*
 * AttributeValueAssertion ::=
 *      SEQUENCE {
 *              attributeType   AttributeType,
 *              attributeValue  AttributeValue,
 *      }
 *
 * AttributeType ::= LDAPString
 *               -- text name of the attribute, or dotted
 *               -- OID representation
 *
 * AttributeValue ::= OCTET STRING
 */

#define LDAPAttributeTypeTemplate LDAPStringTemplate

/*
 * SubstringFilter ::=
 *      SEQUENCE {
 *              type            AttributeType,
 *              SEQUENCE OF CHOICE {
 *                      initial [0] LDAPString,
 *                      any     [1] LDAPString,
 *                      final   [2] LDAPString,
 *              }
 *      }
 */

#define LDAPSubstringFilterInitialTemplate LDAPStringTemplate
#define LDAPSubstringFilterAnyTemplate LDAPStringTemplate
#define LDAPSubstringFilterFinalTemplate LDAPStringTemplate

static const SEC_ASN1Template LDAPSubstringFilterChoiceTemplate[] = {
    { SEC_ASN1_CHOICE, offsetof(LDAPSubstring, selector), 0,
        sizeof (LDAPFilter) },
    { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
        offsetof(LDAPSubstring, item),
        LDAPSubstringFilterInitialTemplate,
        LDAP_INITIALSUBSTRING_TYPE },
    { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1,
        offsetof(LDAPSubstring, item),
        LDAPSubstringFilterAnyTemplate,
        LDAP_ANYSUBSTRING_TYPE },
    { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 2,
        offsetof(LDAPSubstring, item),
        LDAPSubstringFilterFinalTemplate,
        LDAP_FINALSUBSTRING_TYPE },
    { 0 }
};

/*
 * Filter ::=
 *      CHOICE {
 *              and             [0] SET OF Filter,
 *              or              [1] SET OF Filter,
 *              not             [2] Filter,
 *              equalityMatch   [3] AttributeValueAssertion,
 *              substrings      [4] SubstringFilter,
 *              greaterOrEqual  [5] AttributeValueAssertion,
 *              lessOrEqual     [6] AttributeValueAssertion,
 *              present         [7] AttributeType,
 *              approxMatch     [8] AttributeValueAssertion
        }
 */

static const SEC_ASN1Template LDAPSubstringFilterTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL, sizeof (LDAPSubstringFilter) },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPSubstringFilter, attrType) },
    { SEC_ASN1_SEQUENCE_OF, offsetof(LDAPSubstringFilter, strings),
        LDAPSubstringFilterChoiceTemplate },
    { 0 }
};

const SEC_ASN1Template LDAPFilterTemplate[]; /* forward reference */

static const SEC_ASN1Template LDAPSetOfFiltersTemplate[] = {
    { SEC_ASN1_SET_OF, 0, LDAPFilterTemplate }
};

static const SEC_ASN1Template LDAPAVAFilterTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL, sizeof (LDAPAttributeValueAssertion) },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPAttributeValueAssertion, attrType) },
    { SEC_ASN1_OCTET_STRING, offsetof(LDAPAttributeValueAssertion, attrValue) },
    { 0 }
};

static const SEC_ASN1Template LDAPPresentFilterTemplate[] = {
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPPresentFilter, attrType) }
};

#define LDAPEqualFilterTemplate LDAPAVAFilterTemplate
#define LDAPGreaterOrEqualFilterTemplate LDAPAVAFilterTemplate
#define LDAPLessOrEqualFilterTemplate LDAPAVAFilterTemplate
#define LDAPApproxMatchFilterTemplate LDAPAVAFilterTemplate

const SEC_ASN1Template LDAPFilterTemplate[] = {
    { SEC_ASN1_CHOICE, offsetof(LDAPFilter, selector), 0, sizeof(LDAPFilter) },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_ANDFILTER_TYPE,
        offsetof(LDAPFilter, filter.andFilter.filters),
        LDAPSetOfFiltersTemplate, LDAP_ANDFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_ORFILTER_TYPE,
        offsetof(LDAPFilter, filter.orFilter.filters),
        LDAPSetOfFiltersTemplate, LDAP_ORFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_NOTFILTER_TYPE | SEC_ASN1_POINTER,
        offsetof(LDAPFilter, filter.notFilter),
        LDAPFilterTemplate, LDAP_NOTFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_EQUALFILTER_TYPE,
        offsetof(LDAPFilter, filter.equalFilter),
        LDAPEqualFilterTemplate, LDAP_EQUALFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_SUBSTRINGFILTER_TYPE, offsetof(LDAPFilter, filter.substringFilter),
        LDAPSubstringFilterTemplate, LDAP_SUBSTRINGFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_GREATEROREQUALFILTER_TYPE,
        offsetof(LDAPFilter, filter.greaterOrEqualFilter),
        LDAPGreaterOrEqualFilterTemplate, LDAP_GREATEROREQUALFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_LESSOREQUALFILTER_TYPE,
        offsetof(LDAPFilter, filter.lessOrEqualFilter),
        LDAPLessOrEqualFilterTemplate, LDAP_LESSOREQUALFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_PRESENTFILTER_TYPE,
        offsetof(LDAPFilter, filter.presentFilter),
        LDAPPresentFilterTemplate, LDAP_PRESENTFILTER_TYPE },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
        LDAP_APPROXMATCHFILTER_TYPE,
        offsetof(LDAPFilter, filter.approxMatchFilter),
        LDAPApproxMatchFilterTemplate, LDAP_APPROXMATCHFILTER_TYPE },
    { 0 }
};

/*
 * SearchRequest ::=
 *      [APPLICATION 3] SEQUENCE {
 *              baseObject      LDAPDN,
 *              scope           ENUMERATED {
 *                                      baseObject              (0),
 *                                      singleLevel             (1),
 *                                      wholeSubtree            (2)
 *                              },
 *              derefAliases    ENUMERATED {
 *                                      neverDerefAliases       (0),
 *                                      derefInSearching        (1),
 *                                      derefFindingBaseObj     (2),
 *                                      alwaysDerefAliases      (3)
 *                              },
 *              sizeLimit       INTEGER (0 .. MAXINT),
 *                              -- value of 0 implies no sizeLimit
 *              timeLimit       INTEGER (0 .. MAXINT),
 *                              -- value of 0 implies no timeLimit
 *              attrsOnly       BOOLEAN,
 *                              -- TRUE, if only attributes (without values)
 *                              -- to be returned
 *              filter          Filter,
 *              attributes      SEQUENCE OF AttributeType
 *      }
 */

static const SEC_ASN1Template LDAPAttributeTemplate[] = {
    { SEC_ASN1_LDAP_STRING, 0, NULL, sizeof (SECItem) }
};

static const SEC_ASN1Template LDAPSearchApplTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPSearch, baseObject) },
    { SEC_ASN1_ENUMERATED, offsetof(LDAPSearch, scope) },
    { SEC_ASN1_ENUMERATED, offsetof(LDAPSearch, derefAliases) },
    { SEC_ASN1_INTEGER, offsetof(LDAPSearch, sizeLimit) },
    { SEC_ASN1_INTEGER, offsetof(LDAPSearch, timeLimit) },
    { SEC_ASN1_BOOLEAN, offsetof(LDAPSearch, attrsOnly) },
    { SEC_ASN1_INLINE, offsetof(LDAPSearch, filter), LDAPFilterTemplate },
    { SEC_ASN1_SEQUENCE_OF, offsetof(LDAPSearch, attributes), LDAPAttributeTemplate },
    { 0 }
};

static const SEC_ASN1Template LDAPSearchTemplate[] = {
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_APPLICATION | LDAP_SEARCH_TYPE, 0,
        LDAPSearchApplTemplate, sizeof (LDAPSearch) }
};

/*
 * SearchResponse ::=
 *      CHOICE {
 *              entry   [APPLICATION 4] SEQUENCE {
 *                              objectName      LDAPDN,
 *                              attributes      SEQUENCE OF SEQUENCE {
 *                                                      AttributeType,
 *                                                      SET OF AttributeValue
 *                                              }
 *                      }
 *              resultCode [APPLICATION 5] LDAPResult
 *      }
 */

static const SEC_ASN1Template LDAPSearchResponseAttrTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(LDAPSearchResponseAttr) },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPSearchResponseAttr, attrType) },
    { SEC_ASN1_SET_OF | SEC_ASN1_XTRN, offsetof(LDAPSearchResponseAttr, val),
        LDAPStringTemplate },
    { 0 }
};

static const SEC_ASN1Template LDAPEntryTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL },
    { SEC_ASN1_LDAP_STRING, offsetof(LDAPSearchResponseEntry, objectName) },
    { SEC_ASN1_SEQUENCE_OF, offsetof(LDAPSearchResponseEntry, attributes),
        LDAPSearchResponseAttrTemplate },
    { 0 }
};

static const SEC_ASN1Template LDAPSearchResponseEntryTemplate[] = {
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_APPLICATION | LDAP_SEARCHRESPONSEENTRY_TYPE, 0,
        LDAPEntryTemplate, sizeof (LDAPSearchResponseEntry) }
};

static const SEC_ASN1Template LDAPSearchResponseResultTemplate[] = {
    { SEC_ASN1_APPLICATION | LDAP_SEARCHRESPONSERESULT_TYPE, 0,
        LDAPResultTemplate, sizeof (LDAPSearchResponseResult) }
};

/*
 * AbandonRequest ::=
 *      [APPLICATION 16] MessageID
 */

static const SEC_ASN1Template LDAPAbandonTemplate[] = {
    { SEC_ASN1_INTEGER, offsetof(LDAPAbandonRequest, messageID) }
};

static const SEC_ASN1Template LDAPAbandonRequestTemplate[] = {
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_APPLICATION | LDAP_ABANDONREQUEST_TYPE, 0,
        LDAPAbandonTemplate, sizeof (LDAPAbandonRequest) }
};

/*
 * LDAPMessage ::=
 *      SEQUENCE {
 *              messageID       MessageID,
 *              protocolOp      CHOICE {
 *                                      bindRequest     BindRequest,
 *                                      bindResponse    BindResponse,
 *                                      unbindRequest   UnbindRequest,
 *                                      searchRequest   SearchRequest,
 *                                      searchResponse  SearchResponse,
 *                                      abandonRequest  AbandonRequest
 *                              }
 *      }
 *
 *                                      (other choices exist, not shown)
 *
 * MessageID ::= INTEGER (0 .. maxInt)
 */

static const SEC_ASN1Template LDAPMessageProtocolOpTemplate[] = {
    { SEC_ASN1_CHOICE, offsetof(LDAPProtocolOp, selector), 0, sizeof (LDAPProtocolOp) },
    { SEC_ASN1_INLINE, offsetof(LDAPProtocolOp, op.bindMsg),
        LDAPBindTemplate, LDAP_BIND_TYPE },
    { SEC_ASN1_INLINE, offsetof(LDAPProtocolOp, op.bindResponseMsg),
        LDAPBindResponseTemplate, LDAP_BINDRESPONSE_TYPE },
    { SEC_ASN1_INLINE, offsetof(LDAPProtocolOp, op.unbindMsg),
        LDAPUnbindTemplate, LDAP_UNBIND_TYPE },
    { SEC_ASN1_INLINE, offsetof(LDAPProtocolOp, op.searchMsg),
        LDAPSearchTemplate, LDAP_SEARCH_TYPE },
    { SEC_ASN1_INLINE, offsetof(LDAPProtocolOp, op.searchResponseEntryMsg),
        LDAPSearchResponseEntryTemplate, LDAP_SEARCHRESPONSEENTRY_TYPE },
    { SEC_ASN1_INLINE, offsetof(LDAPProtocolOp, op.searchResponseResultMsg),
        LDAPSearchResponseResultTemplate, LDAP_SEARCHRESPONSERESULT_TYPE },
    { SEC_ASN1_INLINE, offsetof(LDAPProtocolOp, op.abandonRequestMsg),
        LDAPAbandonRequestTemplate, LDAP_ABANDONREQUEST_TYPE },
    { 0 }
};

const SEC_ASN1Template PKIX_PL_LDAPMessageTemplate[] = {
    { SEC_ASN1_SEQUENCE, 0, NULL },
    { SEC_ASN1_INTEGER, offsetof(LDAPMessage, messageID) },
    { SEC_ASN1_INLINE, offsetof(LDAPMessage, protocolOp),
        LDAPMessageProtocolOpTemplate },
    { 0 }
};

/* This function simply returns the address of the message template.
 * This is necessary for Windows DLLs.
 */
SEC_ASN1_CHOOSER_IMPLEMENT(PKIX_PL_LDAPMessageTemplate)

redpajama_set_name: RedPajamaGithub


text:
package madgik.exareme.worker.art.container.dataTransfer;

import java.rmi.RemoteException;

/**
 * @author Herald Kllapi
 * @author John Chronis

 * @author Vaggelis Nikolopoulos

 *         University of Athens / Department of Informatics and Telecommunications.
 * @since 1.0
 */
public interface DataTransferGateway {
    void start() throws RemoteException;

    void stop();

}


text:
VolumeViewer::VolumeViewer(const std::vector<std::string> &objectFileFilenames,
                           std::string renderer_type,
                           bool ownModelPerObject,
                           bool showFrameRate,
                           bool fullScreen,
                           std::string writeFramesFilename)
  : objectFileFilenames(objectFileFilenames),
    modelIndex(0),
    ownModelPerObject(ownModelPerObject),
    boundingBox(ospcommon::vec3f(0.f), ospcommon::vec3f(1.f)),
    renderer(NULL),
    rendererInitialized(false),
    transferFunction(NULL),
    ambientLight(NULL),
    directionalLight(NULL),
    osprayWindow(NULL),
    annotationRenderer(NULL),
    transferFunctionEditor(NULL),
    isosurfaceEditor(NULL),
    autoRotateAction(NULL),
    autoRotationRate(0.025f)
{
  // Default window size.
  resize(1024, 768);

  // Create and configure the OSPRay state.
  initObjects(renderer_type);

  // Create an OSPRay window and set it as the central widget, but don't let it start rendering until we're done with setup.
  osprayWindow = new QOSPRayWindow(this, this->renderer,
                                   showFrameRate, writeFramesFilename);
  setCentralWidget(osprayWindow);

  // Set the window bounds based on the OSPRay world bounds.
  osprayWindow->setWorldBounds(boundingBox);

  // Configure the user interface widgets and callbacks.
  initUserInterfaceWidgets();

  if (fullScreen)
    setWindowState(windowState() | Qt::WindowFullScreen);

  // Show the window.
  show();
}

ospcommon::box3f VolumeViewer::getBoundingBox()
{
  return boundingBox;
}

QOSPRayWindow *VolumeViewer::getWindow()
{
  return osprayWindow;
}

TransferFunctionEditor *VolumeViewer::getTransferFunctionEditor()
{
  return transferFunctionEditor;
}

void VolumeViewer::setModel(size_t index)
{
  modelIndex = index;

  // Set current model on the OSPRay renderer.
  ospSetObject(renderer, "model", modelStates[index].model);
  ospCommit(renderer);
  rendererInitialized = true;

  // Update transfer function and isosurface editor data value range with the voxel range of the current model's first volume.
  ospcommon::vec2f voxelRange(0.f);
  OSPVolume volume = modelStates[index].volumes[0];
#ifdef OSPRAY_VOLUME_VOXELRANGE_IN_APP
  voxelRange = VolumeFile::voxelRangeOf[volume];
#else
  ospGetVec2f(modelStates[index].volumes[0], "voxelRange", (osp::vec2f*)&voxelRange);
#endif

  if(voxelRange != ospcommon::vec2f(0.f)) {
    transferFunctionEditor->setDataValueRange(voxelRange);
    isosurfaceEditor->setDataValueRange(voxelRange);
  }

  // Update active volume on probe widget.
  probeWidget->setVolume(modelStates[index].volumes[0]);

  // Update current filename information label.
  if (ownModelPerObject)
    currentFilenameInfoLabel.setText("Timestep " + QString::number(index) + QString(": Data value range: [") + QString::number(voxelRange.x) + ", " + QString::number(voxelRange.y) + "]");
  else
    currentFilenameInfoLabel.setText("Timestep " + QString::number(index) + QString(": ") + QString(objectFileFilenames[index].c_str()).split('/').back() + ". Data value range: [" + QString::number(voxelRange.x) + ", " + QString::number(voxelRange.y) + "]");

  // Enable rendering on the OSPRay window.
  osprayWindow->setRenderingEnabled(true);
}

std::string VolumeViewer::toString() const
{
  return("VolumeViewer");
}

void VolumeViewer::autoRotate(bool set)
{
  if(osprayWindow == NULL)
    return;

  if(autoRotateAction != NULL)
    autoRotateAction->setChecked(set);

  if(set) {
    osprayWindow->setRotationRate(autoRotationRate);
    osprayWindow->updateGL();
  }
  else
    osprayWindow->setRotationRate(0.);
}

void VolumeViewer::setAutoRotationRate(float rate)
{
  autoRotationRate = rate;
}

void VolumeViewer::nextTimeStep()
{
  modelIndex = (modelIndex + 1) % modelStates.size();
  setModel(modelIndex);
  render();
}

void VolumeViewer::playTimeSteps(bool animate)
{
  if (animate == true)
    playTimeStepsTimer.start(500);
  else
    playTimeStepsTimer.stop();
}

void VolumeViewer::addSlice(std::string filename)
{
  sliceEditor->addSlice(filename);
}

void VolumeViewer::addGeometry(std::string filename)
{
  // For now we assume PLY geometry files. Later we can support other geometry formats.

  // Get filename if not specified.
  if(filename.empty())
    filename = QFileDialog::getOpenFileName(this, tr("Load geometry"), ".", "Geometry files (*.ply *.dds)").toStdString();

  if(filename.empty())
    return;

  // Attempt to load the geometry through the TriangleMeshFile loader.
  OSPGeometry triangleMesh = ospNewGeometry("trianglemesh");

  // If successful, commit the triangle mesh and add it to all models.
  if(TriangleMeshFile::importTriangleMesh(filename, triangleMesh) != NULL) {

    // For now: if this is a DDS geometry, assume it is a horizon and its color should be mapped through the first volume's transfer function.
    if(QString(filename.c_str()).endsWith(".dds") && modelStates.size() > 0 && modelStates[0].volumes.size() > 0) {

      OSPMaterial material = ospNewMaterial(renderer, "default");
      ospSet3f(material, "Kd", 1,1,1);
      ospSetObject(material, "volume", modelStates[0].volumes[0]);
      ospCommit(material);

      ospSetMaterial(triangleMesh, material);
    }

    ospCommit(triangleMesh);

    // Create an instance of the geometry and add the instance to the main model(s)--this prevents the geometry
    // from being rebuilt every time the main model is committed (e.g. when slices / isosurfaces are manipulated)
    OSPModel modelInstance = ospNewModel();
    ospAddGeometry(modelInstance, triangleMesh);
    ospCommit(modelInstance);

    ospcommon::affine3f xfm = ospcommon::one;
    OSPGeometry triangleMeshInstance = ospNewInstance(modelInstance, (osp::affine3f&)xfm);
    ospCommit(triangleMeshInstance);

    for(size_t i=0; i<modelStates.size(); i++) {
      ospAddGeometry(modelStates[i].model, triangleMeshInstance);
      ospCommit(modelStates[i].model);
    }

    // Force render.
    render();
  }
}

void VolumeViewer::screenshot(std::string filename)
{
  // Print current camera view parameters (can be used on command line to recreate view)
  std::cout << "screenshot view parameters (use on command line to reproduce view): " << std::endl
            << "  " << *(osprayWindow->getViewport()) << std::endl;

  // Get filename if not specified.
  if(filename.empty())
    filename = QFileDialog::getSaveFileName(this, tr("Save screenshot"), ".", "PNG files (*.png)").toStdString();

  if(filename.empty())
    return;

  // Make sure the filename has the proper extension.
  if(QString(filename.c_str()).endsWith(".png") != true)
    filename += ".png";

  // Grab the image.
  QImage image = osprayWindow->grabFrameBuffer();

  // Save the screenshot.
  bool success = image.save(filename.c_str());

  std::cout << (success ? "saved screenshot to " : "failed saving screenshot ") << filename << std::endl;
}

void VolumeViewer::commitVolumes()
{
  for(size_t i=0; i<modelStates.size(); i++)
    for(size_t j=0; j<modelStates[i].volumes.size(); j++)
      ospCommit(modelStates[i].volumes[j]);
}

void VolumeViewer::render()
{
  if (osprayWindow != NULL) {
    osprayWindow->resetAccumulationBuffer();
    osprayWindow->updateGL();
  }
}

void VolumeViewer::setRenderAnnotationsEnabled(bool value)
{
  if (value) {
    if (!annotationRenderer)
      annotationRenderer = new OpenGLAnnotationRenderer(this);

    connect(osprayWindow, SIGNAL(renderGLComponents()), annotationRenderer, SLOT(render()), Qt::UniqueConnection);
  }
  else {
    delete annotationRenderer;
    annotationRenderer = NULL;
  }

  render();
}

void VolumeViewer::setSubsamplingInteractionEnabled(bool value)
{
  ospSet1i(renderer, "spp", value ? -1 : 1);
  if(rendererInitialized)
    ospCommit(renderer);
}

void VolumeViewer::setGradientShadingEnabled(bool value)
{
  for(size_t i=0; i<modelStates.size(); i++)
    for(size_t j=0; j<modelStates[i].volumes.size(); j++) {
      ospSet1i(modelStates[i].volumes[j], "gradientShadingEnabled", value);
      ospCommit(modelStates[i].volumes[j]);
    }

  render();
}

void VolumeViewer::setSamplingRate(double value)
{
  for(size_t i=0; i<modelStates.size(); i++)
    for(size_t j=0; j<modelStates[i].volumes.size(); j++) {
      ospSet1f(modelStates[i].volumes[j], "samplingRate", value);
      ospCommit(modelStates[i].volumes[j]);
    }

  render();
}

void VolumeViewer::setVolumeClippingBox(ospcommon::box3f value)
{
  for(size_t i=0; i<modelStates.size(); i++)
    for(size_t j=0; j<modelStates[i].volumes.size(); j++) {
      ospSet3fv(modelStates[i].volumes[j], "volumeClippingBoxLower", &value.lower.x);
      ospSet3fv(modelStates[i].volumes[j], "volumeClippingBoxUpper", &value.upper.x);
      ospCommit(modelStates[i].volumes[j]);
    }

  render();
}

void VolumeViewer::setSlices(std::vector<SliceParameters> sliceParameters)
{
  // Provide the slices to OSPRay as the coefficients (a,b,c,d) of the plane equation ax + by + cz + d = 0.
  std::vector<ospcommon::vec4f> planes;

  for(size_t i=0; i<sliceParameters.size(); i++)
    planes.push_back(ospcommon::vec4f(sliceParameters[i].normal.x,
                                sliceParameters[i].normal.y,
                                sliceParameters[i].normal.z,
                                -dot(sliceParameters[i].origin, sliceParameters[i].normal)));

  OSPData planesData = ospNewData(planes.size(), OSP_FLOAT4, &planes[0].x);

  // Remove existing slice geometries from models.
  for(size_t i=0; i<modelStates.size(); i++) {
    for(size_t j=0; j<modelStates[i].slices.size(); j++)
      ospRemoveGeometry(modelStates[i].model, modelStates[i].slices[j]);

    modelStates[i].slices.clear();
  }

  // Add new slices for each volume of each model. Later we can do this only for the active model on time step change...
  for(size_t i=0; i<modelStates.size(); i++) {

    if(planes.size() > 0) {
      for(size_t j=0; j<modelStates[i].volumes.size(); j++) {

        OSPGeometry slicesGeometry = ospNewGeometry("slices");
        ospSetData(slicesGeometry, "planes", planesData);
        ospSetObject(slicesGeometry, "volume", modelStates[i].volumes[j]);
        ospCommit(slicesGeometry);

        ospAddGeometry(modelStates[i].model, slicesGeometry);

        modelStates[i].slices.push_back(slicesGeometry);
      }
    }

    ospCommit(modelStates[i].model);
  }

  render();
}

void VolumeViewer::setIsovalues(std::vector<float> isovalues)
{
  OSPData isovaluesData = ospNewData(isovalues.size(), OSP_FLOAT, &isovalues[0]);

  // Remove existing isosurface geometries from models.
  for(size_t i=0; i<modelStates.size(); i++) {
    for(size_t j=0; j<modelStates[i].isosurfaces.size(); j++)
      ospRemoveGeometry(modelStates[i].model, modelStates[i].isosurfaces[j]);

    modelStates[i].isosurfaces.clear();
  }

  // Add new isosurfaces for each volume of each model. Later we can do this only for the active model on time step change...
  for(size_t i=0; i<modelStates.size(); i++) {

    if(isovalues.size() > 0) {
      for(size_t j=0; j<modelStates[i].volumes.size(); j++) {

        OSPGeometry isosurfacesGeometry = ospNewGeometry("isosurfaces");
        ospSetData(isosurfacesGeometry, "isovalues", isovaluesData);
        ospSetObject(isosurfacesGeometry, "volume", modelStates[i].volumes[j]);
        ospCommit(isosurfacesGeometry);

        ospAddGeometry(modelStates[i].model, isosurfacesGeometry);

        modelStates[i].isosurfaces.push_back(isosurfacesGeometry);
      }
    }

    ospCommit(modelStates[i].model);
  }

  render();
}

void VolumeViewer::importObjectsFromFile(const std::string &filename)
{
  if (!ownModelPerObject)
  // Create an OSPRay model and its associated model state.
  modelStates.push_back(ModelState(ospNewModel()));

  // Load OSPRay objects from a file.
  OSPObject *objects = ObjectFile::importObjects(filename.c_str());

  // Iterate over the objects contained in the object list.
  for (size_t i=0 ; objects[i] ; i++) {
    if (ownModelPerObject)
      modelStates.push_back(ModelState(ospNewModel()));

    OSPDataType type;
    ospGetType(objects[i], NULL, &type);

    if (type == OSP_GEOMETRY) {

      // Commit the geometry.
      ospCommit(objects[i]);

      // Add the loaded geometry to the model.
      ospAddGeometry(modelStates.back().model, (OSPGeometry) objects[i]);

    } else if (type == OSP_VOLUME) {

      // For now we set the same transfer function on all volumes.
      ospSetObject(objects[i], "transferFunction", transferFunction);
      ospCommit(objects[i]);

      // Add the loaded volume(s) to the model.
      ospAddVolume(modelStates.back().model, (OSPVolume) objects[i]);

      // Add to volumes vector for the current model.
      modelStates.back().volumes.push_back((OSPVolume) objects[i]);
    }

    if (ownModelPerObject)
      ospCommit(modelStates.back().model);
  }

  if (!ownModelPerObject)
  // Commit the model.
  ospCommit(modelStates.back().model);
}

void VolumeViewer::initObjects(const std::string &renderer_type)
{
  // Create an OSPRay renderer.
  renderer = ospNewRenderer(renderer_type.c_str());
  exitOnCondition(renderer == NULL, "could not create OSPRay renderer object");

  // Set renderer defaults (if not using 'aoX' renderers)
  if (renderer_type[0] != 'a' && renderer_type[1] != 'o')
  {
    ospSet1i(renderer, "aoSamples", 1);
    ospSet1i(renderer, "shadowsEnabled", 1);
  }

  // Create OSPRay ambient and directional lights. GUI elements will modify their parameters.
  ambientLight = ospNewLight(renderer, "AmbientLight");
  exitOnCondition(ambientLight == NULL, "could not create ambient light");
  ospCommit(ambientLight);

  directionalLight = ospNewLight(renderer, "DirectionalLight");
  exitOnCondition(directionalLight == NULL, "could not create directional light");
  ospCommit(directionalLight);

  // Set the light sources on the renderer.
  std::vector<OSPLight> lights;
  lights.push_back(ambientLight);
  lights.push_back(directionalLight);

  ospSetData(renderer, "lights", ospNewData(lights.size(), OSP_OBJECT, &lights[0]));

  // Create an OSPRay transfer function.
  transferFunction = ospNewTransferFunction("piecewise_linear");
  exitOnCondition(transferFunction == NULL, "could not create OSPRay transfer function object");
  ospCommit(transferFunction);

  // Load OSPRay objects from files.
  for (size_t i=0 ; i < objectFileFilenames.size() ; i++)
    importObjectsFromFile(objectFileFilenames[i]);

  // Get the bounding box of all volumes of the first model.
  if(modelStates.size() > 0 && modelStates[0].volumes.size() > 0) {
    ospGetVec3f(modelStates[0].volumes[0], "boundingBoxMin", (osp::vec3f*)&boundingBox.lower);
    ospGetVec3f(modelStates[0].volumes[0], "boundingBoxMax", (osp::vec3f*)&boundingBox.upper);

    for (size_t i=1; i<modelStates[0].volumes.size(); i++) {
      ospcommon::box3f volumeBoundingBox;
      ospGetVec3f(modelStates[0].volumes[i], "boundingBoxMin", (osp::vec3f*)&volumeBoundingBox.lower);
      ospGetVec3f(modelStates[0].volumes[i], "boundingBoxMax", (osp::vec3f*)&volumeBoundingBox.upper);

      boundingBox.extend(volumeBoundingBox);
    }
  }
}

void VolumeViewer::initUserInterfaceWidgets()
{
  // Create a toolbar at the top of the window.
  QToolBar *toolbar = addToolBar("toolbar");

  // Add preferences widget and callback.
  PreferencesDialog *preferencesDialog = new PreferencesDialog(this, boundingBox);
  QAction *showPreferencesAction = new QAction("Preferences", this);
  connect(showPreferencesAction, SIGNAL(triggered()), preferencesDialog, SLOT(show()));
  toolbar->addAction(showPreferencesAction);

  // Add the "auto rotate" widget and callback.
  autoRotateAction = new QAction("Auto rotate", this);
  autoRotateAction->setCheckable(true);
  connect(autoRotateAction, SIGNAL(toggled(bool)), this, SLOT(autoRotate(bool)));
  toolbar->addAction(autoRotateAction);

  // Add the "next timestep" widget and callback.
  QAction *nextTimeStepAction = new QAction("Next timestep", this);
  connect(nextTimeStepAction, SIGNAL(triggered()), this, SLOT(nextTimeStep()));
  toolbar->addAction(nextTimeStepAction);

  // Add the "play timesteps" widget and callback.
  QAction *playTimeStepsAction = new QAction("Play timesteps", this);
  playTimeStepsAction->setCheckable(true);
  connect(playTimeStepsAction, SIGNAL(toggled(bool)), this, SLOT(playTimeSteps(bool)));
  toolbar->addAction(playTimeStepsAction);

  // Connect the "play timesteps" timer.
  connect(&playTimeStepsTimer, SIGNAL(timeout()), this, SLOT(nextTimeStep()));

  // Add the "add geometry" widget and callback.
  QAction *addGeometryAction = new QAction("Add geometry", this);
  connect(addGeometryAction, SIGNAL(triggered()), this, SLOT(addGeometry()));
  toolbar->addAction(addGeometryAction);

  // Add the "screenshot" widget and callback.
  QAction *screenshotAction = new QAction("Screenshot", this);
  connect(screenshotAction, SIGNAL(triggered()), this, SLOT(screenshot()));
  toolbar->addAction(screenshotAction);

  // Create the transfer function editor dock widget, this widget modifies the transfer function directly.
  QDockWidget *transferFunctionEditorDockWidget = new QDockWidget("Transfer Function", this);
  transferFunctionEditor = new TransferFunctionEditor(transferFunction);
  transferFunctionEditorDockWidget->setWidget(transferFunctionEditor);
  connect(transferFunctionEditor, SIGNAL(committed()), this, SLOT(commitVolumes()));
  connect(transferFunctionEditor, SIGNAL(committed()), this, SLOT(render()));
  addDockWidget(Qt::LeftDockWidgetArea, transferFunctionEditorDockWidget);

  // Set the transfer function editor widget to its minimum allowed height, to leave room for other dock widgets.
  transferFunctionEditor->setMaximumHeight(transferFunctionEditor->minimumSize().height());

  // Create slice editor dock widget.
  QDockWidget *sliceEditorDockWidget = new QDockWidget("Slices", this);
  sliceEditor = new SliceEditor(boundingBox);
  sliceEditorDockWidget->setWidget(sliceEditor);
  connect(sliceEditor, SIGNAL(slicesChanged(std::vector<SliceParameters>)), this, SLOT(setSlices(std::vector<SliceParameters>)));
  addDockWidget(Qt::LeftDockWidgetArea, sliceEditorDockWidget);

  // Create isosurface editor dock widget.
  QDockWidget *isosurfaceEditorDockWidget = new QDockWidget("Isosurfaces", this);
  isosurfaceEditor = new IsosurfaceEditor();
  isosurfaceEditorDockWidget->setWidget(isosurfaceEditor);
  connect(isosurfaceEditor, SIGNAL(isovaluesChanged(std::vector<float>)), this, SLOT(setIsovalues(std::vector<float>)));
  addDockWidget(Qt::LeftDockWidgetArea, isosurfaceEditorDockWidget);

  // Create the light editor dock widget, this widget modifies the light directly.
  QDockWidget *lightEditorDockWidget = new QDockWidget("Lights", this);
  LightEditor *lightEditor = new LightEditor(ambientLight, directionalLight);
  lightEditorDockWidget->setWidget(lightEditor);
  connect(lightEditor, SIGNAL(lightsChanged()), this, SLOT(render()));
  addDockWidget(Qt::LeftDockWidgetArea, lightEditorDockWidget);

  // Create the probe dock widget.
  QDockWidget *probeDockWidget = new QDockWidget("Probe", this);
  probeWidget = new ProbeWidget(this);
  probeDockWidget->setWidget(probeWidget);
  addDockWidget(Qt::LeftDockWidgetArea, probeDockWidget);

  // Tabify dock widgets.
  tabifyDockWidget(transferFunctionEditorDockWidget, sliceEditorDockWidget);
  tabifyDockWidget(transferFunctionEditorDockWidget, isosurfaceEditorDockWidget);
  tabifyDockWidget(transferFunctionEditorDockWidget, lightEditorDockWidget);
  tabifyDockWidget(transferFunctionEditorDockWidget, probeDockWidget);

  // Tabs on top.
  setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::North);

  // Default to showing transfer function tab widget.
  transferFunctionEditorDockWidget->raise();

  // Add the current OSPRay object file label to the bottom status bar.
  statusBar()->addWidget(&currentFilenameInfoLabel);
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="MakeGlow">
        <attr name="drawable" format="reference" />
        <attr name="glowColor" format="color"/>
        <attr name="glowRadius" format="integer"/>
        <attr name="glowOff" format="boolean"/>
        <attr name="glowOffColor" format="color"/>
        <attr name="blurFilter" format="integer"/>
    </declare-styleable>
</resources>


text:
using System.Diagnostics;
using System.Globalization;

namespace System.Buffers.Text
{
    public static partial class Utf8Formatter
    {
        /// <summary>
        /// Formats a Double as a UTF8 string.
        /// </summary>
        /// <param name="value">Value to format</param>
        /// <param name="destination">Buffer to write the UTF8-formatted value to</param>
        /// <param name="bytesWritten">Receives the length of the formatted text in bytes</param>
        /// <param name="format">The standard format to use</param>
        /// <returns>
        /// true for success. "bytesWritten" contains the length of the formatted text in bytes.
        /// false if buffer was too short. Iteratively increase the size of the buffer and retry until it succeeds.
        /// </returns>
        /// <remarks>
        /// Formats supported:
        ///     G/g  (default)
        ///     F/f             12.45       Fixed point
        ///     E/e             1.245000e1  Exponential
        /// </remarks>
        /// <exceptions>
        /// <cref>System.FormatException</cref> if the format is not valid for this data type.
        /// </exceptions>
        public static bool TryFormat(double value, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
        {
            return TryFormatFloatingPoint<double>(value, destination, out bytesWritten, format);
        }

        /// <summary>
        /// Formats a Single as a UTF8 string.
        /// </summary>
        /// <param name="value">Value to format</param>
        /// <param name="destination">Buffer to write the UTF8-formatted value to</param>
        /// <param name="bytesWritten">Receives the length of the formatted text in bytes</param>
        /// <param name="format">The standard format to use</param>
        /// <returns>
        /// true for success. "bytesWritten" contains the length of the formatted text in bytes.
        /// false if buffer was too short. Iteratively increase the size of the buffer and retry until it succeeds.
        /// </returns>
        /// <remarks>
        /// Formats supported:
        ///     G/g  (default)
        ///     F/f             12.45       Fixed point
        ///     E/e             1.245000e1  Exponential
        /// </remarks>
        /// <exceptions>
        /// <cref>System.FormatException</cref> if the format is not valid for this data type.
        /// </exceptions>
        public static bool TryFormat(float value, Span<byte> destination, out int bytesWritten, StandardFormat format = default)
        {
            return TryFormatFloatingPoint<float>(value, destination, out bytesWritten, format);
        }

        //
        // Common handler for TryFormat(Double) and TryFormat(Single). You may notice that this particular routine isn't getting into the "no allocation" spirit
        // of things. The DoubleToNumber() code is incredibly complex and is one of the few pieces of Number formatting never C#-ized. It would be really
        // be preferable not to have another version of that lying around. Until we really hit a scenario where floating point formatting needs the perf, we'll
        // make do with this.
        //
        private static bool TryFormatFloatingPoint<T>(T value, Span<byte> destination, out int bytesWritten, StandardFormat format) where T : IFormattable
        {
            if (format.IsDefault)
            {
                format = 'G';
            }

            switch (format.Symbol)
            {
                case 'g':
                case 'G':
                    if (format.Precision != StandardFormat.NoPrecision)
                        throw new NotSupportedException(SR.Argument_GWithPrecisionNotSupported);
                    break;

                case 'f':
                case 'F':
                case 'e':
                case 'E':
                    break;

                default:
                    return ThrowHelper.TryFormatThrowFormatException(out bytesWritten);
            }

            string formatString = format.ToString();
            string utf16Text = value.ToString(formatString, CultureInfo.InvariantCulture);
            int length = utf16Text.Length;
            if (length > destination.Length)
            {
                bytesWritten = 0;
                return false;
            }

            for (int i = 0; i < length; i++)
            {
                Debug.Assert(utf16Text[i] < 128, "A culture-invariant ToString() of a floating point expected to produce ASCII characters only.");
                destination[i] = (byte)(utf16Text[i]);
            }

            bytesWritten = length;
            return true;
        }
    }
}