buildingblocks2.rss

来自「《UIQ 3 The Complete Guide》书的源代码」· RSS 代码 · 共 678 行 · 第 1/2 页

RSS
678
字号
//
// BUILDINGBLOCKS2.RSS    - UIQ BuildingBlocks2 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    BBK2

#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 "BuildingBlocks2.hrh"
#include <BuildingBlocks2.mbg>

////////////////////////////////////////////////////////////////////////////////////////
RESOURCE RSS_SIGNATURE { }

// Default file name - if no file in existance
RESOURCE TBUF16 { buf=""; }

RESOURCE EIK_APP_INFO {	}

////////////////////////////////////////////////////////////////////////////////////////
RESOURCE QIK_VIEW_CONFIGURATIONS r_app_view_configurations
	{
	configurations = 
		{
		QIK_VIEW_CONFIGURATION
			{
			ui_config_mode = KQikPenStyleTouchPortrait;
			command_list = r_application_commands;
			view = r_application_view;
			},
		QIK_VIEW_CONFIGURATION
			{
			ui_config_mode = KQikPenStyleTouchLandscape;
			command_list = r_application_commands;
			view = r_application_view;
			},
		QIK_VIEW_CONFIGURATION
			{
			ui_config_mode = KQikSoftkeyStylePortrait;
			command_list = r_application_commands;
			view = r_application_view;
			},
		QIK_VIEW_CONFIGURATION
 			{
			ui_config_mode = KQikSoftkeyStyleSmallPortrait;
 			command_list = r_application_commands;
 			view = r_application_view;
			},
		QIK_VIEW_CONFIGURATION
 			{
			ui_config_mode = KQikSoftkeyStyleSmallLandscape;
 			command_list = r_application_commands;
 			view = r_application_view;
			},
		QIK_VIEW_CONFIGURATION
			{
			ui_config_mode = KQikSoftkeyStyleTouchPortrait;
			command_list = r_application_commands;
			view = r_application_view;
 			}
		};
	}

//////////////////////////////////////////////////////////////////
// Application wide commands
RESOURCE QIK_COMMAND_LIST r_application_commands
    {
    items=
        {
	    QIK_COMMAND
            {
            id = EAppCmdAbout;
            type = EQikCommandTypeScreen;
			groupId = EAppCmdMiscGroup;
			priority = EAppCmdAboutPriority;
            text = "About";
            }
         };
	}

//////////////////////////////////////////////////////////////////
// Define the view to contain a set of pages
RESOURCE QIK_VIEW r_application_view
	{
	pages = r_application_view_pages;
	}

// Defines the pages of a view
RESOURCE QIK_VIEW_PAGES r_application_view_pages
	{
	pages = 
		{
		QIK_VIEW_PAGE
			{
			page_id = EAppSpecificPageId1;
			tab_bmpid = EMbmBuildingblocks2Tab1;
			tab_bmpmaskid = EMbmBuildingblocks2Tab1mask;

			// This page does not scroll if there are too many controls to fit on the
			// page size - which is clearly incorrect for real world applications
			// This is demonstrating that by default you dont get scrolling.

			page_content = r_page1_control;
			},
		QIK_VIEW_PAGE
			{
			page_id = EAppSpecificPageId2;
			tab_bmpid = EMbmBuildingblocks2Tab2;
			tab_bmpmaskid = EMbmBuildingblocks2Tab2mask;

			// we have more controls than fit on a single page so we need container that
			// scrolls the view so you can get at all the controls

			container_type = EQikCtScrollableContainer;
			container = r_page2_container;

			page_content = r_page2_control;
			},

		QIK_VIEW_PAGE
			{
			page_id = EAppSpecificPageId3;
			tab_bmpid = EMbmBuildingblocks2Tab3;
			tab_bmpmaskid = EMbmBuildingblocks2Tab3mask;

			// we have more controls than fit on a single page so we need container that
			// scrolls the view so you can get at all the controls

			container_type = EQikCtScrollableContainer;
			container = r_page3_container;

			page_content = r_page3_control;
			}
		};
	}

////////////////////////////////////////////////////////////////////
RESOURCE QIK_CONTAINER_SETTINGS r_page1_control
	{
	controls =
		{
		QIK_CONTAINER_ITEM_CD_LI
			{
			type = EQikCtIconOnelineBuildingBlock;
			control = QIK_SYSTEM_BUILDING_BLOCK
				{
				content =
					{
					QIK_SLOT_CONTENT_DIRECT
						{
						slot_id = EQikIconSlot1;
						type = EEikCtImage;
						control = IMAGE
							{
							bmpfile="*";
							bmpid=EMbmBuildingblocks2Icon0;
							bmpmask=EMbmBuildingblocks2Icon0mask;
							};
						},
					QIK_SLOT_CONTENT 
						{
						slot_id = EQikItemSlot1;
						caption = "Icon, one line block."; 
						}
					};
				};
			},

		QIK_CONTAINER_ITEM_CD_LI
			{
			type = EQikCtIconTwolineBuildingBlock;
			control = QIK_SYSTEM_BUILDING_BLOCK
				{
				flags = EQikBuildingBlockDividerBelow;
				content =
					{
					QIK_SLOT_CONTENT_DIRECT
						{
						slot_id = EQikIconSlot1;
						type = EEikCtImage;
						control = IMAGE
							{
							bmpfile="*";
							bmpid=EMbmBuildingblocks2Icon0;
							bmpmask=EMbmBuildingblocks2Icon0mask;
							};
						},
					QIK_SLOT_CONTENT 
						{
						slot_id = EQikItemSlot1;
						caption = "Icon, two line block block of text that wraps."; 
						}
					};
				};
			},

		QIK_CONTAINER_ITEM_CD_LI
			{
			type = EQikCtOnelineIconBuildingBlock;
			control = QIK_SYSTEM_BUILDING_BLOCK
				{
				content =
					{
					QIK_SLOT_CONTENT_DIRECT
						{
						slot_id = EQikIconSlot1;
						type = EEikCtImage;
						control = IMAGE
							{
							bmpfile="*";
							bmpid=EMbmBuildingblocks2Icon1;
							bmpmask=EMbmBuildingblocks2Icon1mask;
							};
						},
					QIK_SLOT_CONTENT 
						{
						slot_id = EQikItemSlot1;
						caption = "One line with icon block."; 
						}
					};
				};
			},

		QIK_CONTAINER_ITEM_CD_LI
			{
			type = EQikCtTwolineIconBuildingBlock;
			control = QIK_SYSTEM_BUILDING_BLOCK
				{
				flags = EQikBuildingBlockDividerBelow;
				content =
					{
					QIK_SLOT_CONTENT_DIRECT
						{
						slot_id = EQikIconSlot1;
						type = EEikCtImage;
						control = IMAGE
							{
							bmpfile="*";
							bmpid=EMbmBuildingblocks2Icon1;
							bmpmask=EMbmBuildingblocks2Icon1mask;
							};
						},
					QIK_SLOT_CONTENT 
						{
						slot_id = EQikItemSlot1;
						caption = "Two line block of text that wraps, with icon to right."; 
						}
					};
				};
			},

		QIK_CONTAINER_ITEM_CD_LI
			{
			type = EQikCtIconOnelineBuildingBlock;
			control = QIK_SYSTEM_BUILDING_BLOCK
				{
				flags = EQikBuildingBlockMirror;
				content =
					{
					QIK_SLOT_CONTENT_DIRECT
						{
						slot_id = EQikIconSlot1;
						type = EEikCtImage;
						control = IMAGE
							{
							bmpfile="*";
							bmpid=EMbmBuildingblocks2Icon0;
							bmpmask=EMbmBuildingblocks2Icon0mask;
							};
						},
					QIK_SLOT_CONTENT 
						{
						slot_id = EQikItemSlot1;
						caption = "Icon, text 1 line mirrored."; 
						}
					};
				};
			}
		};
	}

////////////////////////////////////////////////////////////////////
// we want the controls to scroll on screen, so we can get at all of them
RESOURCE QIK_SCROLLABLE_CONTAINER r_page2_container
	{
	// uses the default settings for a scrollable container
	}


RESOURCE QIK_SCROLLABLE_CONTAINER_SETTINGS r_page2_control
	{
	controls =
		{
		QIK_CONTAINER_ITEM_CD_LI
			{
			type = EQikCtCaptionedOnelineBuildingBlock;
			control = QIK_SYSTEM_BUILDING_BLOCK
				{
				flags = EQikBuildingBlockDividerBelow;
				content =
					{
					QIK_SLOT_CONTENT 
						{
						slot_id = EQikItemSlot1;
						caption = "Item 1 title"; 
						},
					QIK_SLOT_CONTENT 
						{
						slot_id = EQikItemSlot2;
						caption = "One line text block."; 
						}
					};
				};
			},

		QIK_CONTAINER_ITEM_CD_LI
			{
			type = EQikCtCaptionedTwolineBuildingBlock;
			control = QIK_SYSTEM_BUILDING_BLOCK
				{
				flags = EQikBuildingBlockDividerBelow;
				content =
					{
					QIK_SLOT_CONTENT 
						{

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?