www.pudn.com > UIQ_Code1.rar > Commands.ra


// Commands.ra 
// 
// © Symbian Software Ltd 2005. All rights reserved. 
// 
 
/** 
Defines all commands that are shared in the different phone styles. 
 
A command is the visual representation of an action in an application.  
A command is not the action itself, but represents the action. Application  
users initiate an action by selecting the corresponding command in the user  
interface. 
 
Explanation of used QIK_COMMAND members 
 
id 
Defines an unique identifier for the command 
 
type 
Defines where and how in the user interface the command will occur and how it  
will be presented to the user. 
 
stateFlags 
Control the state, occurrence and behavior of a single command 
 
cpfFlags  
Control cooperation between the UIQ application framework and different command 
operators in the UI. 
 
groupId 
Defines which group this command belongs to. Different groups are seperated by  
dividers. 
 
namedGroupLinkId 
Defines which id the group has, a good choice is to have the same as the 
command id. 
 
namedGroupId 
Defines which group the command is child in. It must be possible to trace 
back to root menu with id 0. 
 
priority  
Commands appearing in the same menu will be sorted in following order: 
1. type 
2. namedGroup 
3. group 
4. priority or text 
 
icon 
Defines a QIK_CONTENT* to use as icon for the command. In menus, icons are  
shown on the side of the text. Icons are preferred instead of text in buttons. 
 
text 
A command can have a text and an optional short text. When the text attribute  
is the only one set, it will be used both in menus and on softkeys.  
 
shortText 
Short text will be the preferred choice on softkeys and buttons, while the text 
will be preferred in menus. 
*/ 
 
// View specific command list. In this example these commands will occur in 
// all pages. 
RESOURCE QIK_COMMAND_LIST r_commands_view_commands 
	{ 
	items = 
		{ 
		// This command shall only be visible in debug mode because it is only  
		// used to find memory leaks during development of the application. 
		QIK_COMMAND 
			{ 
			id = EEikCmdExit; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsDefaultCmdGroupId; 
			priority = ECommandsExitPriority; 
			// Indicate that it will only be created in debug builds 
			stateFlags = EQikCmdFlagDebugOnly; 
			text = STRING_r_commands_view_cmd_close_debug; 
			}, 
		// Make it possible to change phone style. 
		QIK_COMMAND 
			{ 
			id = ECommandsChangeUiModeCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsDefaultCmdGroupId; 
			priority = ECommandsChangeUiModePriority; 
			text = STRING_r_commands_cmd_change_phone_style; 
			}, 
		// Is used to add/remove command list  
		// (r_commands_extra_pen_style_commands). 
		QIK_COMMAND 
			{ 
			id = ECommandsExtraCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsDefaultCmdGroupId; 
			priority = ECommandsExtraPriority; 
			text = STRING_r_commands_cmd_extra_expand_commands; 
			} 
		}; 
	} 
 
// The purpose of page2 commands is to show usage of option button list and  
// shows how the behavior of a cascading menu depends on the state of the  
// commands it contains. 
 
// For softkey style only: 
// If a command assigned to a softkey is a named group, that entire group will  
// be available in a menu launched by that softkey. The softkey will be  
// labelled with the name of the named group. Use the type Done on the  
// cascading menu command that you want on the softkey. If no Item-command  
// exists the highest prioritized Done-command will be placed on center  
// softkey. If Item-command exists the Done-command will be placed on the left  
// softkey. 
RESOURCE QIK_COMMAND_LIST r_commands_page2_commands 
	{ 
	items = 
		{ 
		// Pen style 
		// Cascading menu for the page2 specific commands that are changed in  
		// page2 settings. 
 
		// Softkey style 
		// Shown on center softkey, when confirm is pressed it will launch a  
		// popup menu with the available commands. If all commands are  
		// unavailable this command also will be unavailable. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage2CascadeCmd; 
			// Pen style 
			// A Done command is placed to the left in the buttonbar 
			// Softkey style 
			// The highest prioritized Done-command will be placed on the  
			// center softkey if no Item-command exists. 
			type = EQikCommandTypeDone; 
			namedGroupLinkId = ECommandsPage2CascadeCmd; 
			priority = ECommandsPage2CascadePriority; 
			text = STRING_r_commands_cmd_page2_cascade; 
			}, 
			// This command will be initiliazed to be available. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage2CmdECmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage2CascadeCmd; 
				text = STRING_r_commands_cmd_page2_cmd_e; 
				}, 
			// This command will be initiliazed to be unavailable. Which will  
			// make	the command invisible or dimmed depending on the current UI  
			// configuration of the device. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage2CmdFCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage2CascadeCmd; 
				stateFlags = EQikCmdFlagUnavailable; 
				text = STRING_r_commands_cmd_page2_cmd_f; 
				}, 
		// Cascading menu for page2 settings. The commands in this cascading  
		// menu show the usage of checkbox and option button list. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage2SetCascadeCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsSetGroupId; 
			namedGroupLinkId = ECommandsPage2SetCascadeCmd; 
			priority = ECommandsPage2SetPriority; 
			text = STRING_r_commands_cmd_page2_set_cascade; 
			}, 
			// Checkbox that is used to indicate if the cascading menu should  
			// be available or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage2CacscadingAvailableCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage2SetCascadeCmd; 
				// Indicate that it is a checkbox and is marked. 
				stateFlags = EQikCmdFlagCheckBox | EQikCmdFlagSymbolOn; 
				text = STRING_r_commands_cmd_page2_cascading_available; 
				}, 
			// First option button in the option button list. Used to make all  
			// commands unavailable in the cascading menu. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage2AllOffCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage2SetCascadeCmd; 
				// Indicate that it is the first option button 
				stateFlags = EQikCmdFlagRadioStart; 
				text = STRING_r_commands_cmd_page2_all_off; 
				}, 
			// Option button that is used to make command E available and  
			// command F unavailable. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage2CmdEAvailableCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage2SetCascadeCmd; 
				// Indicate that it is an option button  and it is marked 
				stateFlags = EQikCmdFlagRadioMiddle | EQikCmdFlagSymbolOn; 
				text = STRING_r_commands_cmd_page2_cascading_cmd_e_available; 
				}, 
			// Option button that is used to make command F available and  
			// command E unavailable. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage2CmdFAvailableCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage2SetCascadeCmd; 
				// Indicate that it is an option button 
				stateFlags = EQikCmdFlagRadioMiddle; 
				text = STRING_r_commands_cmd_page2_cascading_cmd_f_available; 
				}, 
			// Last option button that will release option button list  
			// controller so that no more buttons can be added to it. Used to 
			// make all commands available in the cascading menu. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage2CmdEAndFAvailableCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage2SetCascadeCmd; 
				// Indicate that it is the last option button 
				stateFlags = EQikCmdFlagRadioEnd; 
				text = STRING_r_commands_cmd_page2_cascading_cmd_e_and_f_available; 
				} 
		}; 
	} 
 
// The purpose of page3 commands is to show how different command types  
// interact with each other and the usage of command icons. 
 
// For softkey style only: 
// Center softkey will be assigned with commands before left softkey, so if  
// there is no Item to center softkey, it will take a Done.  
// The left softkey will first of all look for a Done command. If there exist  
// more than one Done command the highest prioritized will be assigned to the  
// left softkey. If no Done command exist, it will look for a second Item  
// command. If neither an Item nor Done command exist, the left softkey will  
// be left empty (we don't consider the Yes-No exception rule for now). 
RESOURCE QIK_COMMAND_LIST r_commands_page3_commands 
	{ 
	items = 
		{ 
		// Pen style 
		// A Yes command is placed to the left in the buttonbar. 
 
		// Softkey style 
		// A Yes command will occur on the left softkey. (The "more" option  
		// will be on center softkey.) 
		QIK_COMMAND 
			{ 
			id = ECommandsPage3TypeYesCmd; 
			type = EQikCommandTypeYes; 
			// Indicate that the command is invisible. 
			stateFlags = EQikCmdFlagInvisible; 
			text = STRING_r_commands_cmd_page3_yes; 
			shortText = STRING_r_commands_cmd_page3_yes_shorttext; 
			}, 
		// Pen style 
		// A No command is placed in the buttonbar, just to the right of any  
		// Yes or Done command. 
 
		// Softkey style 
		// A No command will occur on the right softkey. (The "more" option  
		// will be on center softkey.) 
		QIK_COMMAND 
			{ 
			id = ECommandsPage3TypeNoCmd; 
			type = EQikCommandTypeNo; 
			// Indicate that the command is invisible. 
			stateFlags = EQikCmdFlagInvisible; 
			text = STRING_r_commands_cmd_page3_no; 
			shortText = STRING_r_commands_cmd_page3_no_shorttext; 
			}, 
		// Pen style 
		// A Done command is placed to the left in the buttonbar, if a Yes 
		// command exist it will be placed just to the right of the Yes command. 
 
		// Softkey style 
		// A Done command that will first be tried to assigned on center  
		// softkey, if that is occupied it will be assign to the left softkey.  
		// Done will not be placed in softkey if there exist a Yes or No  
		// command. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage3TypeDoneCmd; 
			type = EQikCommandTypeDone; 
			// Set this flag if you want a command to be duplicated in the menu. 
			cpfFlags = EQikCpfFlagDuplicateInMenuPane; 
			// Indicate that the command is invisible. 
			stateFlags = EQikCmdFlagInvisible; 
			text = STRING_r_commands_cmd_page3_done; 
			shortText = STRING_r_commands_cmd_page3_done_shorttext; 
			}, 
		// Pen style 
		// The highest prioritized Item command will be placed on the confirm  
		// key. 
 
		// Softkey style 
		// The highest prioritized Item-command will be placed on the center  
		// softkey. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage3TypeItemCmd; 
			type = EQikCommandTypeItem; 
			// Set this flag if you want a command to be duplicated in the menu. 
			cpfFlags = EQikCpfFlagDuplicateInMenuPane; 
			text = STRING_r_commands_cmd_page3_item; 
			shortText = STRING_r_commands_cmd_page3_item_shorttext; 
			}, 
		// This command only exist in pen style and will be placed on the  
		// buttonbar if there is room. 
		// In general a Screen command is placed in the AppTitleBar menu,  
		// unless it is flagged to prefer to be placed in the buttonbar. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage3PreferToBePlacedInButtonbarCmd; 
			type = EQikCommandTypeScreen; 
			// This flag is used to place an arbitrary command in the buttonbar. 
			// The button bar always takes commands of type {Done, Cancel,  
			// Yes, No}. In addition it can take any command flagged with this  
			// flag. This flag also affects the key listener in such a way  
			// that the key listener (i.e. confirm key) will not consume  
			// commands that have this flag set when the device is running  
			// phone style EQikUiStylePen (pen style). 
			cpfFlags = EQikCpfFlagPreferToBePlacedInButtonbar; 
			text = STRING_r_commands_cmd_page3_prefer_in_buttonbar; 
			shortText = STRING_r_commands_cmd_page3_prefer_in_buttonbar_shorttext; 
			}, 
		// The highest prioritized Delete command will be assigned to the  
		// Delete key. The delete hardware key will only accept a command with  
		// type Delete. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage3TypeDeleteCmd; 
			type = EQikCommandTypeDelete; 
			text = STRING_r_commands_cmd_page3_delete; 
			shortText = STRING_r_commands_cmd_page3_delete_shorttext; 
			}, 
		// Cascading menu for page3 settings. The commands in this cascading  
		// menu show the usage of checkbox. This command makes it possible to  
		// change the visibility and icons on the commands used to show the  
		// different types. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage3SetVisibilityCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsSetGroupId; 
			namedGroupLinkId = ECommandsPage3SetVisibilityCmd; 
			text = STRING_r_commands_cmd_page3_set_visibility; 
			}, 
			// Checkbox that is used to indicate if the Yes command should be  
			// visible or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3YesVisibleCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3YesGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox that is unmarked 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_yes_visible; 
				}, 
			// Checkbox that is used to indicate if the No command should be  
			// visible or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3NoVisibleCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3NoGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox that is unmarked 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_no_visible; 
				}, 
			// Checkbox that is used to indicate if the Done command should be  
			// visible or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3DoneVisibleCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3DoneGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox that is unmarked 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_done_visible; 
				}, 
			// Checkbox that is used to indicate if the Item command should be  
			// visible or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3ItemVisibleCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3ItemGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox and is marked. 
				stateFlags = EQikCmdFlagCheckBox | EQikCmdFlagSymbolOn; 
				text = STRING_r_commands_cmd_page3_item_visible; 
				}, 
			// Checkbox that is used to indicate if the Prefer command should  
			// be visible or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3PreferVisibleCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3PreferGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox and is marked. 
				stateFlags = EQikCmdFlagCheckBox | EQikCmdFlagSymbolOn; 
				text = STRING_r_commands_cmd_page3_prefer_visible; 
				}, 
			// Checkbox that is used to indicate if the Delete command should  
			// be visible or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3DeleteVisibleCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3DeleteGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox and is marked. 
				stateFlags = EQikCmdFlagCheckBox | EQikCmdFlagSymbolOn; 
				text = STRING_r_commands_cmd_page3_delete_visible; 
				}, 
			// Checkbox that is used to indicate if the Yes command should have 
			// icon or not. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3ShowYesIconCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3YesGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox that is unmarked. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_show_yes_icon; 
				}, 
			// Checkbox that is used to indicate if the No command should have  
			// icon or not. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3ShowNoIconCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3NoGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox that is unmarked. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_show_no_icon; 
				}, 
			// Checkbox that is used to indicate if the Done command should 
			// have icon or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3ShowDoneIconCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3DoneGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox, that is unmarked. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_show_done_icon; 
				}, 
			// Checkbox that is used to indicate if the Item command should  
			// have icon or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3ShowItemIconCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3ItemGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox, that is unmarked. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_show_item_icon; 
				}, 
			// Checkbox that is used to indicate if the Prefer command should  
			// have icon or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3ShowPreferIconCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3PreferGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_show_prefer_icon; 
				}, 
			// Checkbox that is used to indicate if the Delete command should  
			// have icon or not. In initial state it is checked. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage3ShowDeleteIconCmd; 
				type = EQikCommandTypeScreen; 
				groupId = ECommandsPage3DeleteGroupId; 
				namedGroupId = ECommandsPage3SetVisibilityCmd; 
				// Indicate that it is a checkbox, that is unmarked. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_page3_show_delete_icon; 
				} 
		}; 
	} 
 
// The purpose of page4 commands is to show how sorting and priority is  
// handled. 
RESOURCE QIK_COMMAND_LIST r_commands_page4_commands 
	{ 
	items = 
		{ 
		// Cascading menu for the commands that can be changed sort order in  
		// page4 settings.  
		// If the sort commands will be sorted on alphabetic order SortA will  
		// be first. But if the the sort order is on priority SortB will be  
		// first in the cascading menu. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage4SortOrderCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsSpecificGroupId; 
			namedGroupLinkId = ECommandsPage4SortOrderCmd; 
			priority = ECommandsPage4SortPriority; 
			text = STRING_r_commands_cmd_page4_sort_order; 
			}, 
			// This command will be initiliazed to be sorted on alphabetic 
			// order instead of priority. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage4APriority2Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage4SortOrderCmd; 
				priority = ECommandsPage4APriority; 
				// Commands with this flag set and are located in the same menu 
				// and in the same group will be sorted alphabetically on its 
				// Text() member instead of on its Priority() member. 
				stateFlags = EQikCmdFlagSortAlphabetic; 
				text = STRING_r_commands_cmd_page4_a_priority2; 
				}, 
			// This command will be initiliazed to be sorted on alphabetic  
			// order instead of priority. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage4BPriority1Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage4SortOrderCmd; 
				priority = ECommandsPage4BPriority; 
				// Commands with this flag set and are located in the same menu 
				// and in the same group will be sorted alphabetically on its 
				// Text() member instead of on its Priority() member. 
				stateFlags = EQikCmdFlagSortAlphabetic; 
				text = STRING_r_commands_cmd_page4_b_priority1; 
				}, 
		// Cascading menu for page4 settings. Contains a checkbox to change 
		// the sort order between alphabetic and priority. 
		QIK_COMMAND 
			{ 
			id = ECommandsPage4SetSortOrderCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsSetGroupId; 
			namedGroupLinkId = ECommandsPage4SetSortOrderCmd; 
			priority = ECommandsPage4SetPriority; 
			text = STRING_r_commands_cmd_page4_set_sort_order; 
			}, 
			// First button in option button list. Used to set sort order 
			// to alphabetically. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage4AlphabeticallyCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage4SetSortOrderCmd; 
				// Indicate that it is the first option button and it is marked 
				stateFlags = EQikCmdFlagRadioStart | EQikCmdFlagSymbolOn; 
				text = STRING_r_commands_cmd_page4_alphabetically; 
				}, 
			// Last button that will release in the option button list  
			// controller so that no more buttons can be added to it. Used to  
			// set sort order to priority. 
			QIK_COMMAND 
				{ 
				id = ECommandsPage4PriorityCmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsPage4SetSortOrderCmd; 
				// Indicate that it is the last option button 
				stateFlags = EQikCmdFlagRadioEnd; 
				text = STRING_r_commands_cmd_page4_priority; 
				} 
		}; 
	} 
 
// Command list that are added/removed by activate ECommandsExtraCmd,  
// see CCommandsViewModel::HandleCommandL(). 
RESOURCE QIK_COMMAND_LIST r_commands_extra_commands 
	{ 
	items = 
		{ 
		// Cascading menu for the commands that are used to show how the  
		// command state monitor that are used to keep track of different  
		// states in your application. 
		QIK_COMMAND 
			{ 
			id = ECommandsExtraCurrentStateCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsSpecificGroupId; 
			namedGroupLinkId = ECommandsExtraCurrentStateCmd; 
			priority = ECommandsExtraPriority; 
			text = STRING_r_commands_cmd_extra_current_state; 
			}, 
			// This command will be initiliazed to be available 
			QIK_COMMAND 
				{ 
				id =  ECommandsExtraCmdAState1Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsExtraCurrentStateCmd; 
				text = STRING_r_commands_cmd_extra_cmd_a_state1; 
				}, 
			// This command will be initiliazed to be available 
			QIK_COMMAND 
				{ 
				id =  ECommandsExtraCmdBState1Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsExtraCurrentStateCmd; 
				text = STRING_r_commands_cmd_extra_cmd_b_state1; 
				}, 
			// This command will be initiliazed to be unavailable. Which will  
			// make	the command invisible or dimmed depending on the current UI 
			// configuration of the device. 
			QIK_COMMAND 
				{ 
				id = ECommandsExtraCmdCState2Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsExtraCurrentStateCmd; 
				stateFlags = EQikCmdFlagUnavailable; 
				text = STRING_r_commands_cmd_extra_cmd_c_state2; 
				}, 
			// This command will be initiliazed to be unavailable. Which will  
			// make the command invisible or dimmed depending on the current UI  
			// configuration of the device. 
			QIK_COMMAND 
				{ 
				id = ECommandsExtraCmdDState1And2Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsExtraCurrentStateCmd; 
				stateFlags = EQikCmdFlagUnavailable; 
				text = STRING_r_commands_cmd_extra_cmd_d_state1and2; 
				}, 
		// Cascading menu to set the extra commands. Contains checkboxes to  
		// change states in the state monitor that will affect the availability 
		// of the state commands above. 
		QIK_COMMAND 
			{ 
			id = ECommandsExtraSetCurrentStateCmd; 
			type = EQikCommandTypeScreen; 
			groupId = ECommandsSetGroupId; 
			namedGroupLinkId = ECommandsExtraSetCurrentStateCmd; 
			priority = ECommandsExtraSetPriority; 
			text = STRING_r_commands_cmd_extra_set_current_state; 
			}, 
			// This command will be initiliazed so it shows that state1 in the 
			// state monitor is active, see CCommandsView::ConstructL(). 
			QIK_COMMAND 
				{ 
				id = ECommandsExtraEnableState1Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsExtraSetCurrentStateCmd; 
				// Indicate that it is a checkbox. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_extra_enable_state1; 
				}, 
			// This command will be initiliazed so it shows that state2 in the 
			// state monitor is inactive, see CCommandsView::ConstructL(). 
			QIK_COMMAND 
				{ 
				id = ECommandsExtraEnableState2Cmd; 
				type = EQikCommandTypeScreen; 
				namedGroupId = ECommandsExtraSetCurrentStateCmd; 
				// Indicate that it is a checkbox. 
				stateFlags = EQikCmdFlagCheckBox; 
				text = STRING_r_commands_cmd_extra_enable_state2; 
				} 
		}; 
	}