⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listview1.rss

📁 《UIQ 3 The Complete Guide》书的源代码
💻 RSS
字号:
//
// LISTVIEW1.RSS    - UIQ ListView1 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    LVW1

#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 "ListView1.hrh"

////////////////////////////////////////////////////////////////////////////////////////
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_pen_style_commands;
			view = r_list_view_pen_style_view;
			},
		QIK_VIEW_CONFIGURATION
			{
			ui_config_mode = KQikPenStyleTouchLandscape;
			command_list = r_list_view_pen_style_commands;
			view = r_list_view_pen_style_view;
			},
		QIK_VIEW_CONFIGURATION
			{
			ui_config_mode = KQikSoftkeyStylePortrait;
			command_list = r_list_view_key_style_commands;
			view = r_list_view_key_style_view;
			},
		QIK_VIEW_CONFIGURATION
 			{
			ui_config_mode = KQikSoftkeyStyleSmallPortrait;
 			command_list = r_list_view_key_style_commands;
 			view = r_list_view_key_style_view;
			},
		QIK_VIEW_CONFIGURATION
 			{
			ui_config_mode = KQikSoftkeyStyleSmallLandscape;
 			command_list = r_list_view_key_style_commands;
 			view = r_list_view_key_style_view;
			},
		QIK_VIEW_CONFIGURATION
			{
			ui_config_mode = KQikSoftkeyStyleTouchPortrait;
			command_list = r_list_view_key_style_commands;
			view = r_list_view_key_style_view;
 			}
		};
	}


//////////////////////////////////////////////////////////////////
// Touch screen, list view
RESOURCE QIK_COMMAND_LIST r_list_view_pen_style_commands
    {
    items=
        {
	    QIK_COMMAND
            {
            id = EAppCmdZoom;
            type = EQikCommandTypeScreen;
			groupId = EAppCmdMiscGroup;
			priority = EAppCmdZoomPriority;
            text = "Zoom";
            }
         };
	}

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

// Defines the pages of a view - we have 1. 
RESOURCE QIK_VIEW_PAGES r_list_view_pen_style_pages
	{
	pages = 
		{
		QIK_VIEW_PAGE
			{
			page_id = EAppSpecificListViewPageId;
			page_content = r_list_view_page_control;
			}
		};
	}

//////////////////////////////////////////////////////////////////
// Soft key, list view, portrait 
RESOURCE QIK_COMMAND_LIST r_list_view_key_style_commands
    {
    items=
        {
	    QIK_COMMAND
            {
            id = EAppCmdZoom;
            type = EQikCommandTypeScreen;
			groupId = EAppCmdMiscGroup;
			priority = EAppCmdZoomPriority;
            text = "Zoom";
            }
         };
	}

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

// Defines the pages of a view - we have 1. 
RESOURCE QIK_VIEW_PAGES r_list_view_key_style_pages
	{
	pages = 
		{
		QIK_VIEW_PAGE
			{
			page_id = EAppSpecificListViewPageId;
			page_content = r_list_view_page_control;

// An alternate way of producing the same result.
//			page_content = r_list_view_page_control_variant_2;
			}
		};
	}

////////////////////////////////////////////////////////////////////
RESOURCE QIK_CONTAINER_SETTINGS r_list_view_page_control
	{
	layout_manager_type = EQikRowLayoutManager;
	layout_manager = r_row_layout_manager_default;
	controls =
		{
		QIK_CONTAINER_ITEM_CI_LI
			{
			unique_handle = EAppSpecificListViewListId;
			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;
	}
	
////////////////////////////////////////////////////////////////////
// Instead of the two resources above, it is feasible to combine them into a
// single resource having the same end result as below. However you should note the above
// is of type QIK_CONTAINER_ITEM_CI_LI, below is QIK_CONTAINER_ITEM_CI_LD
//
// One reason to split the resources is if you want to reuse the components across multiple parent
// resources. 
//
RESOURCE QIK_CONTAINER_SETTINGS r_list_view_page_control_variant_2
	{
	layout_manager_type = EQikRowLayoutManager;
	layout_manager = r_row_layout_manager_default;
	controls =
		{
		QIK_CONTAINER_ITEM_CI_LD
			{
			unique_handle = EAppSpecificListViewListId;
			type = EQikCtListBox;
			control = r_app_listview_listbox;
	    	layout_data = QIK_ROW_LAYOUT_DATA 
				{
				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 {};
	}

////////////////////////////////////////////////////////////////////////////////////////
RESOURCE TBUF r_str_list_title			{ buf="List title";}

// Dont change the order of these as the C++ code assumes they are sequential.
RESOURCE TBUF r_str_list_content_1		{ buf="South Africa";}
RESOURCE TBUF r_str_list_content_2		{ buf="Australia";}
RESOURCE TBUF r_str_list_content_3		{ buf="Sri Lanka";}
RESOURCE TBUF r_str_list_content_4		{ buf="India";}
RESOURCE TBUF r_str_list_content_5		{ buf="New Zealand";}
RESOURCE TBUF r_str_list_content_6		{ buf="West Indies";}
RESOURCE TBUF r_str_list_content_7		{ buf="England";}

⌨️ 快捷键说明

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