📄 commands1.rss
字号:
//
// COMMANDS1.RSS - UIQ Commands1 Resource file
//
// Copyright (C) UIQ Technology AB, 2007
//
// This material is provided "as is" without any warranty to its performance or functionality.
// In no event shall UIQ Technology be liable for any damages whatsoever arising out of the
// use or inabilty to use this material.
//
NAME CMD1
#include <eikon.rh>
#include <eikon.rsg>
#include <qikon.rh>
#include <qikon.hrh>
#include <uikon.rh>
#include <uikon.hrh>
#include <QikCommand.rh>
#include <QikListBox.rh>
#include <QikListBoxStandardLayouts.hrh>
#include "Commands1.hrh"
#include <Commands1.mbg>
////////////////////////////////////////////////////////////////////////////////////////
RESOURCE RSS_SIGNATURE { }
// Default file name - if no file in existance
RESOURCE TBUF16 { buf=""; }
RESOURCE EIK_APP_INFO { }
////////////////////////////////////////////////////////////////////////////////////////
RESOURCE QIK_VIEW_CONFIGURATIONS r_list_view_configurations
{
configurations =
{
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikPenStyleTouchPortrait;
command_list = r_list_view_generic_commands;
view = r_list_view_view;
},
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikPenStyleTouchLandscape;
command_list = r_list_view_generic_commands;
view = r_list_view_view;
},
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikSoftkeyStylePortrait;
command_list = r_list_view_generic_commands;
view = r_list_view_view;
},
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikSoftkeyStyleSmallPortrait;
command_list = r_list_view_generic_commands;
view = r_list_view_view;
},
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikSoftkeyStyleSmallLandscape;
command_list = r_list_view_generic_commands;
view = r_list_view_view;
},
QIK_VIEW_CONFIGURATION
{
ui_config_mode = KQikSoftkeyStyleTouchPortrait;
command_list = r_list_view_generic_commands;
view = r_list_view_view;
}
};
}
//////////////////////////////////////////////////////////////////
// these commands are defined to be available for ALL views
RESOURCE QIK_CONTENT_MBM r_command_icon
{
bmpid=EMbmCommands1Icon0;
bmpmask=EMbmCommands1Icon0mask;
}
RESOURCE QIK_COMMAND_LIST r_list_view_generic_commands
{
items=
{
// EQikCommandTypeHelp gets positioned by system
QIK_COMMAND
{
id = EAppCmdHelp;
type = EQikCommandTypeHelp;
groupId = EAppCmdMiscGroup;
priority = EAppCmdHelpPriority;
text = "Help";
},
// a standard about command, has an icon associated with it
QIK_COMMAND
{
id = EAppCmdAbout;
type = EQikCommandTypeScreen;
groupId = EAppCmdMiscGroup;
priority = EAppCmdAboutPriority;
icon = r_command_icon;
text = "About";
},
// this command only appears in Debug builds - due to the stateFlags defn
QIK_COMMAND
{
id = EAppCmdDebugTest;
type = EQikCommandTypeScreen;
stateFlags = EQikCmdFlagDebugOnly;
groupId = EAppCmdMiscGroup;
priority = EAppCmdDebugTestPriority;
text = "Test";
},
// Assigned to the Cancel key
QIK_COMMAND
{
id = EAppCmdDelete;
type = EQikCommandTypeDelete;
text = "";
}
};
}
//////////////////////////////////////////////////////////////////
// Define the view to contain a set of pages
RESOURCE QIK_VIEW r_list_view_view
{
pages = r_list_view_pages;
}
// Defines the pages of a view.
RESOURCE QIK_VIEW_PAGES r_list_view_pages
{
pages =
{
QIK_VIEW_PAGE
{
page_id = EAppSpecificListViewPageId1;
tab_bmpid = EMbmCommands1Tab1;
tab_bmpmaskid = EMbmCommands1Tab1mask;
page_content = r_list_view_page1_control;
command_list = r_page1_specific_commands;
},
QIK_VIEW_PAGE
{
page_id = EAppSpecificListViewPageId2;
tab_bmpid = EMbmCommands1Tab2;
tab_bmpmaskid = EMbmCommands1Tab2mask;
page_content = r_list_view_page2_control;
command_list = r_page2_specific_commands;
}
};
}
// These only appear on page 1
RESOURCE QIK_COMMAND_LIST r_page1_specific_commands
{
items=
{
// a sort menu option. It acts as a parent to a cascading sub-menu
QIK_COMMAND
{
id = EAppCmdSortCascade;
type = EQikCommandTypeScreen;
groupId = EAppCmdSortGroup;
namedGroupLinkId = EAppCmdSortCmdsLink;
priority = EAppCmdSortCascadePriority;
text = "Sort";
},
// This text file indentation is simply to hint at the intended display
// we are looking to achieve.
// menu item being the first of 3 radio button type menu cmds
QIK_COMMAND
{
id = EAppCmdSortType1;
type = EQikCommandTypeScreen;
stateFlags = EQikCmdFlagRadioStart;
namedGroupId = EAppCmdSortCmdsLink;
priority = EAppCmdSortType1Priority;
text = "Sort by name";
},
// menu item being the middle of 3 radio button type menu cmds
QIK_COMMAND
{
id = EAppCmdSortType2;
type = EQikCommandTypeScreen;
stateFlags = EQikCmdFlagRadioMiddle;
namedGroupId = EAppCmdSortCmdsLink;
priority = EAppCmdSortType2Priority;
text = "Sort by 2nd letter";
},
// menu item being the last of 3 radio button type menu cmds
QIK_COMMAND
{
id = EAppCmdSortType3;
type = EQikCommandTypeScreen;
stateFlags = EQikCmdFlagRadioEnd;
namedGroupId = EAppCmdSortCmdsLink;
priority = EAppCmdSortType3Priority;
text = "Sort by 3rd letter";
},
// example of separator with text. Separators without text are generated
// via groups.
QIK_COMMAND
{
id = EAppCmdSeparator;
type = EQikCommandTypeScreen;
stateFlags = EQikCmdFlagInlinePane;
namedGroupId = EAppCmdSortCmdsLink;
priority = EAppCmdSeparatorPriority;
text = "Sort order";
},
// menu item containing a check box
QIK_COMMAND
{
id = EAppCmdSortOrder;
type = EQikCommandTypeScreen;
stateFlags = EQikCmdFlagCheckBox;
namedGroupId = EAppCmdSortCmdsLink;
priority = EAppCmdSortOrderPriority;
text = "Ascending";
}
};
}
// These only appear on page 2
RESOURCE QIK_COMMAND_LIST r_page2_specific_commands
{
items=
{
QIK_COMMAND
{
id = EAppCmdAdd;
type = EQikCommandTypeScreen;
groupId = EAppCmdEditGroup;
priority = EAppCmdAddPriority;
text = "Add";
},
// the r_list_view_generic_commands list alreday has a command of type EAppCmdDelete
// defined. In this example we choose to have a different command id to perform the
// same task. This also demonstrates the different paths by which the similar functionality
// may be supported.
QIK_COMMAND
{
id = EAppCmdDelete2;
type = EQikCommandTypeScreen;
groupId = EAppCmdEditGroup;
priority = EAppCmdDeletePriority;
text = "Delete";
}
};
}
// These added at runtime by code
RESOURCE QIK_COMMAND_LIST r_alternate_commands
{
items=
{
QIK_COMMAND
{
id = EAppCmdAdd2;
type = EQikCommandTypeScreen;
groupId = EAppCmdEditGroup;
priority = EAppCmdAddPriority;
text = "Create";
},
// the r_list_view_generic_commands list alreday has a command of type EAppCmdDelete
// defined. In this example we choose to have a different command id to perform the
// same task. This also demonstrates the different paths by which the similar functionality
// may be supported.
QIK_COMMAND
{
id = EAppCmdDelete3;
type = EQikCommandTypeScreen;
groupId = EAppCmdEditGroup;
priority = EAppCmdDeletePriority;
text = "Erase";
}
};
}
////////////////////////////////////////////////////////////////////
// Both pages contain a single row based list box
RESOURCE QIK_CONTAINER_SETTINGS r_list_view_page1_control
{
layout_manager_type = EQikRowLayoutManager;
layout_manager = r_row_layout_manager_default;
controls =
{
QIK_CONTAINER_ITEM_CI_LI
{
unique_handle = EAppSpecificListViewListId1;
type = EQikCtListBox;
control = r_app_listview_listbox;
layout_data = r_row_layout_data_fill;
}
};
}
RESOURCE QIK_CONTAINER_SETTINGS r_list_view_page2_control
{
layout_manager_type = EQikRowLayoutManager;
layout_manager = r_row_layout_manager_default;
controls =
{
QIK_CONTAINER_ITEM_CI_LI
{
unique_handle = EAppSpecificListViewListId2;
type = EQikCtListBox;
control = r_app_listview_listbox;
layout_data = r_row_layout_data_fill;
}
};
}
RESOURCE QIK_ROW_LAYOUT_DATA r_row_layout_data_fill
{
vertical_alignment = EQikLayoutVAlignFill;
vertical_excess_grab_weight = 1;
}
////////////////////////////////////////////////////////////////////
//// List box controls
RESOURCE QIK_LISTBOX r_app_listview_listbox
{
view = r_app_listview_listbox_view_default;
layouts = { r_app_listview_normal_layout_pair };
}
RESOURCE QIK_LISTBOX_ROW_VIEW r_app_listview_listbox_view_default
{
}
RESOURCE QIK_LISTBOX_LAYOUT_PAIR r_app_listview_normal_layout_pair
{
standard_normal_layout = EQikListBoxLine;
}
//////////////////////////////////////////////////////////////////////
// Layout Managers - uses the default settings for the row layout handling
RESOURCE QIK_ROW_LAYOUT_MANAGER r_row_layout_manager_default
{
default_layout_data = QIK_ROW_LAYOUT_DATA {};
}
/*
//////////////////////////////////////////////////////////////////////
// Instead of buttons, dialogs can have command lists associated with them. This
// simple example highlights that despite not requiring or defining a Cancel item
// the system code automatically adds one which we have to then remove....in the C++ code
RESOURCE QIK_COMMAND_LIST r_continue_command_list
{
items=
{
QIK_COMMAND
{
id = EAppCmdContinue;
type = EQikCommandTypeDone;
text = "Continue";
}
};
}
// Whilst the 'value' in the id=<value> statements would often be defined by a set of enums
// its not mandatory. Your in house coding requirements may require they are identified
// symbolically, this is simply showing its not mandatory.
RESOURCE DIALOG r_about_dialog
{
title="About Commands 1";
flags=EEikDialogFlagWait;
command_list=r_continue_command_list;
items=
{
DLG_LINE
{
type=EEikCtLabel;
id=1;
control=LABEL
{
txt="";
standard_font=EEikLabelFontAnnotation;
};
},
DLG_LINE
{
type=EEikCtLabel;
id=2;
control=LABEL
{
txt="
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -