background image
C H A P T E R 1 9
Built-in Applications and System Data
Icons and the Extras Drawer
Any application that adds buttons to another application should provide a preference
that allows the user to enable or disable the display of the source application buttons
in the destination application. The user may want to suppress buttons because the
buttons from several source applications may be too many to fit in a single destination
application. The user should be able to choose which should appear, and the
preference should normally default to not registering the button.
Note that a button you register might not appear at all if too many buttons are
already registered in the destination application, so you must ensure alternative
access to your application through conventional means, such as the Extras Drawer.
Also note that packages that install buttons into other applications may cause the
system to display the card reinsertion warning if they are on a card that has been
ejected. It is wise to advise or require users to install packages on the internal store
if they are going to register buttons in other applications.
The functions
, and
for use by button hosts that are adding the buttons to their own status bars (or
wherever is appropriate). You should call
in your base view's
and merge the resulting array with the buttons
that always appear on your status bar. You should probably also override the
slots of the buttons, to place them correctly.
If your application is the backdrop application, this array contains both the buttons
specific to your application and any designated for the backdrop application. You
do not need to write any special code to detect whether your application is the
backdrop application.
Icons and the Extras Drawer
This section describes the Extras Drawer's API for icon management.
About Icons and the Extras Drawer
As you may know, you can design custom icons for your application in NTK.
Information on how to do this is provided in the Newton Toolkit User's Guide. You
can also programmatically change the picture of the icon and the text displayed
under it.
There are two special purpose icons you can add to the Extras Drawer--script
and soup icons. A script icon is an icon that executes a function object when
tapped. A soup icon acts as a container, under which the icons of various soups are
combined. You should create a soup icon if your application creates more than one
soup, since this will unclutter the Extras Drawer. You also need to create soup icons
to support the soupervisor mechanism (described later in this section).
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна