Cpmultibutton - Casio ClassPad 300 Programming Manual

Sdk programming guide
Hide thumbs Also See for ClassPad 300:
Table of Contents

Advertisement

CPMultiButton

Class Name
Derived From
CPMultiButton
PegBitmapButton
A CPMultiButton is very similar to a CPDropDownButton. With a CPMultiButton, the
bitmaps are cycled through instead of being chosen from a drop down. The bold button
in eActivity is an example of a CPMultiButton.
To create a CPMultiButton, you first make a CPMultiButtonDescription:
struct CPMultiButtonDescription buttons[] =
{
{&gbsmileBitmap,
{&gbcontentBitmap, CONTENT_ID},
{&gbsadBitmap,
{NULL,
};
This button is also mostly used in toolbars, so we will add it in the AddUI function:
void YOURWINDOW::AddUI()
{
PegRect r = GetToolbarButtonRect();
CPMultiButton *button = new CPMultiButton(r, buttons);
m_ui->AddToolbarButton(button);
}
Each of the following screenshots is taken after the button was clicked. Notice that the
images are being cycled through on each click:
Styles
BF_REPEAT
BF_DOWNACTION
BF_SELECTED
AF_ENABLED
SMILE_ID},
SAD_ID},
NULL},
Signals
PSF_SIZED
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST
PSF_KEY_RECEIVED
PSF_CLICKED
69

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents