Multiple Views of Symbian Study Notes 13

Source: Internet
Author: User

Void cfirstfuckappui: constructl ()

{
// Initialise app UI
Standard value.
Baseconstructl (caknappui: eaknenableskin );

Ceikstatuspane * sp = statuspane ();
Ititlepane =
Static_cast <cakntitlepane *> (SP-> controll (
Tuid: UID (eeikstatuspaneuidtitle )));
Inavipane =
Static_cast <caknnavigationcontrolcontainer *>
(SP-> controll (tuid: UID (eeikstatuspaneuidnavi )));
If (inavipane)

{
Caknnavigationdecorator * navidecorator =
Inavipane-> top ();
If (navidecorator)
{

Itabgroup = (cakntabgroup *) navidecorator-> decoratedcontrol ();

}
}
Iactive = itabgroup-> activetabindex ();

Itabcount = itabgroup-> tabcount ();
Iview = new
(Eleave) cfirstfuckappview;
Cleanupstack: pushl (iview );

Iview-> constructl ();
Cleanupstack: Pop ();
Addviewl (iview
);
Iview1 = new (eleave) cfirstfuckappview1;

Cleanupstack: pushl (iview1 );
Iview1-> constructl ();

Cleanupstack: Pop ();
Addviewl (iview1 );

This-> setdefaviewviewl (* iview); // sets the default value to the first view.
}
Void
Cfirstfuckappui: handlecommandl (tint acommand)
{
Switch
(Acommand)
{
Case eeikcmdexit:
Case
Eaknsoftkeyexit:
Exit ();
Break;


Case ecommandalarm:
Case ecommandabout:
Case ehelp:

Case eclose:
Iview-> handlecommandl (acommand );
// Events passed to the first view
Break;
Case ecommandstart:

Case ecommandstop:
Iview1-> handlecommandl (acommand );
// Events passed to the second view
Break;
Default:

Panic (efirstfuckui );
Break;
}

}

Tkeyresponse cfirstfuckappui: handlekeyeventl (// capture the left and right keys and activate the view

Const tkeyevent & akeyevent, teventcode Atype)
{


Switch (akeyevent. icode)
{
Case ekeyleftarrow:

If (iactive> 0)
{

Iactive --;
Itabgroup-> setactivetabbyindex (iactive
);
This-> activatelocalviewl (kviewid );

}
Break;
Case ekeyrightarrow:
If (
(Iactive + 1) <itabcount)
{

Iactive ++;
Itabgroup-> setactivetabbyindex (iactive
);
This-> activatelocalviewl (kviewid1 );

}
Break;
Default:
Return
Ekeywasnotconsumed;
Break;
}

Return
Ekeywasnotconsumed;
}

Resource eik_app_info
{

Status_pane = r_aknfirstfuck_status_pane;
}

Resource
Status_pane_app_model r_aknfirstfuck_status_pane
{
Panes =

{
Spane_pane
{
Id =
Eeikstatuspaneuidnavi;
Type = eaknctnavipane;

Resource = r_aknfirstfuck_navi_decorator; // navigation
}

};
}

Resource navi_decorator r_aknfirstfuck_navi_decorator

{
Type = enavidecoratorcontroltabgroup;
Control = tab_group

{
Tab_width = eakntabwidthwithtwotabs;
Active =
0;
Tabs =
{
Tab

{
Id = eaknfirstfuckviewtab1;
TXT =
R_string_firstfuck_tab_label1;
},

Tab
{
Id = eaknfirstfuckviewtab2;

TXT = r_string_firstfuck_tab_label2;
}

};
};
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.