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

📄 settingexample.rss

📁 基于 symbian OS的屏幕设置经典程序,很不错,欢迎下载学习
💻 RSS
字号:
/*
 * ============================================================================
 *  Name     : settingexample.rss
 *  Part of  : SettingExample
 *  Created  : 29/05/2006 by Forum Nokia
 *  Version  : 2.0
 *  Copyright: Forum Nokia
 * ============================================================================
 */

NAME HELL

#include <eikon.rh>
#include <avkon.rh>
#include <avkon.rsg>

#include "SettingExample.hrh"


// ---------------------------------------------------------
//   
//    Define the resource file signature 
//    This resource should be empty.
//
// ---------------------------------------------------------
//
RESOURCE RSS_SIGNATURE { }

// ---------------------------------------------------------
//   
//    Default Document Name
//
// ---------------------------------------------------------
//
RESOURCE TBUF r_default_document_name { buf=""; }

// ---------------------------------------------------------
//   
//    Define default menu and CBA key.
//
// ---------------------------------------------------------
//
RESOURCE EIK_APP_INFO
    {
    menubar = r_settingsexample_menubar;
    cba = R_AVKON_SOFTKEYS_CLOSE;
    }

// ---------------------------------------------------------
//   
//   r_settingsexample_menubar
//   Menubar for Settings Example
//
// ---------------------------------------------------------
//
RESOURCE MENU_BAR r_settingsexample_menubar
    {
    titles =
        {
        MENU_TITLE {menu_pane = r_settingsexample_menu;}
        };
    }


// ---------------------------------------------------------
//   
//   r_settingsexample_menu
//   Menu for "Options"
//
// ---------------------------------------------------------
//
RESOURCE MENU_PANE r_settingsexample_menu
    {
    items = 
        {
        MENU_ITEM 
		    {
			command = ESettingCmdEdit;   
			txt = "Edit";
			},
        MENU_ITEM 
		    {
			command = EAknSoftkeyExit;   
			txt = "Exit";
			}
        };
    }


RESOURCE AVKON_VIEW r_firstview
	{
	cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
	menubar=r_settingsexample_menubar;
	}


// ---------------------------------------------------------
//   
// r_settings_item_list
//
// settings list - collection of all setting types
//   
// ---------------------------------------------------------
//   

RESOURCE AVKON_SETTING_ITEM_LIST r_settings
	{
	title = "Settings";
	items = 
		{
		AVKON_SETTING_ITEM
			{
			identifier = ESettingText;
			setting_page_resource = r_texteditor_page;
			name = "Text Editor";
			},
		AVKON_SETTING_ITEM
			{
			identifier = ESettingRadioBtn;
			setting_page_resource = r_radiobtn_page;
			associated_resource = r_radiobtn_page_texts;		// gives available options
			name = "Radio Buttons";
			},
		AVKON_SETTING_ITEM
			{
			identifier = ESettingVolume;
			setting_page_resource = r_volume_page;
			name = "Volume";
			},
		AVKON_SETTING_ITEM
			{
			identifier = ESettingSlider;
			setting_page_resource = r_slider_page;
			name = "Slider";
			},
        AVKON_SETTING_ITEM
            {
            identifier = ESettingBinary;
			setting_page_resource = r_binary_page;
            associated_resource = r_binary_setting_texts;
            name = "Binary item";
            },
        AVKON_SETTING_ITEM
            {
            identifier = ESettingSecret;
            setting_page_resource = r_secreteditor_page;
            name = "Secret editor";
            },
        AVKON_SETTING_ITEM
            {
            identifier = ESettingNumeric;
            setting_page_resource = r_numericeditor_page;
            name = "Numeric editor";
            },
        AVKON_SETTING_ITEM
            {
            identifier = ESettingDate;
            setting_page_resource = r_date_page;
            name = "Date";
            },
        AVKON_SETTING_ITEM
            {
            identifier = ESettingTime;
            setting_page_resource = r_time_page;
            name = "Time";
            },
        AVKON_SETTING_ITEM
            {
            identifier = ESettingIp;
            setting_page_resource = r_ip_page;
            name = "IP Address";
            },
		AVKON_SETTING_ITEM
			{
			identifier = ESettingCheckbox;
			setting_page_resource = r_checkbox_page;
			associated_resource = r_checkbox_page_texts;			
				// gives available options
			name = "CheckBox";
			}
		};
	}


// ---------------------------------------------------------
//   
// Settings Pages
//
// defines the AVKON_SETTING_PAGE structures referred to in 
// setting_page_resource fields above.
// 
// These structures define the way in which the editors used
// to change the setting data are presented.
// 
// ---------------------------------------------------------
//   

RESOURCE AVKON_SETTING_PAGE r_texteditor_page
	{
	label="Text Editor";
	type = EEikCtEdwin;
	editor_resource_id = r_texteditor;
	hint_text="hint text";
	}

RESOURCE AVKON_SETTING_PAGE r_radiobtn_page
	{
	label="Radio Buttons";
	type = EAknCtPopupSettingList;
	editor_resource_id = r_radiobtns;
	hint_text="hint text";
	}

RESOURCE AVKON_SETTING_PAGE r_volume_page
	{
	label="Volume";
	type = EAknCtVolumeControl;
	editor_resource_id = r_volume;
	hint_text="hint text";
	}

RESOURCE AVKON_SETTING_PAGE r_slider_page
	{
	label = "Slider";
	type = EAknCtSlider;
	editor_resource_id = r_slider;
	hint_text="hint text";
	}

RESOURCE AVKON_SETTING_PAGE r_binary_page
	{
	label="Binary Options";
	type = EAknCtPopupSettingList;
	editor_resource_id = r_binary;
	hint_text="hint text";
	}

RESOURCE AVKON_SETTING_PAGE r_secreteditor_page
	{
	label="Secret Editor";
	type = EEikCtSecretEd;
	editor_resource_id = r_secreteditor;
	hint_text="hint text";
	}

RESOURCE AVKON_SETTING_PAGE r_numericeditor_page
	{
	label="Numeric Editor";
	type = EAknCtIntegerEdwin;
	editor_resource_id = r_numericeditor;
	}

RESOURCE AVKON_SETTING_PAGE r_date_page
	{
	label="Date";
	type = EEikCtDateEditor;
	editor_resource_id = r_date;
	}

RESOURCE AVKON_SETTING_PAGE r_time_page
	{
	label="Time";
	type = EEikCtTimeEditor;
	editor_resource_id = r_time;
	}

RESOURCE AVKON_SETTING_PAGE r_ip_page
	{
	label="IP Address";
	type = EAknCtIpFieldEditor;
	editor_resource_id = r_ip;
	}

RESOURCE AVKON_SETTING_PAGE r_checkbox_page
	{
	label="Check Boxes";
	type = EAknSetListBox;
	editor_resource_id = r_checkbox;
	}

// ---------------------------------------------------------
//   
// Editor Controls
//
// This section defines the controls referred to from the
// editor_resource_id sections of the AVKON_SETTING_PAGE
// resources above.
// 
// ---------------------------------------------------------
//   


RESOURCE EDWIN r_texteditor
	{
    maxlength = 100;
	}

RESOURCE POPUP_SETTING_LIST r_radiobtns
	{
	}

RESOURCE POPUP_SETTING_LIST r_binary
	{
	// no definitions required - values obtained from 
	// associated_resource of owning AVKON_SETTING_ITEM_LIST
	}
	
RESOURCE VOLUME r_volume
	{
	value = 10;
	}

RESOURCE SLIDER r_slider
	{
	layout = EAknSettingsItemSliderLayout;
	minvalue = 0;	
	maxvalue = 10;
	step = 1;
	valuetype = EAknSliderValuePercentage;
	minlabel = "Min";
	maxlabel = "Max";
	}

RESOURCE SECRETED r_secreteditor
	{
    num_letters = 100;
	}

RESOURCE AVKON_INTEGER_EDWIN r_numericeditor
	{
   	maxlength = 100;
	}

RESOURCE DATE_EDITOR r_date
    {
    minDate= DATE {year=1990;};
	maxDate= DATE {year=2050;};
    flags=0;
    }


RESOURCE TIME_EDITOR r_time
    {
    minTime = TIME
        {
        second = 1;
        minute = 2;
        hour = 3;
        };
    maxTime = TIME
        {
        second = 4;
        minute = 5;
        hour = 6;
        };
    }

RESOURCE IP_FIELD_EDITOR r_ip
    {
    min_field_values = IP_FIELD
        { 
        first_field = 0;
        second_field = 0;
        third_field = 0;
        fourth_field = 0;
        };
    max_field_values = IP_FIELD
        {
        first_field = 255;
        second_field = 255;
        third_field = 255;
        fourth_field = 255;
        };
    flags = 0;
    }

RESOURCE LISTBOX r_checkbox
	{
	flags = EEikListBoxMultipleSelection;
	}


// ---------------------------------------------------------
//   
// Second level structures used from settings pages
// Defines - text strings to be used in display, 
// and their mapping to enumerated values.
// 
// ---------------------------------------------------------
//   

RESOURCE AVKON_POPUP_SETTING_TEXTS r_checkbox_page_texts
    {
    setting_texts_resource = r_checkboxitem_texts;
    popped_up_texts_resource = r_checkboxeditor_texts;
    }

RESOURCE ARRAY r_checkboxitem_texts
    {
    items =
        {
        AVKON_ENUMERATED_TEXT
            {
            value = 0;
            text = "Flag1";
            },
        AVKON_ENUMERATED_TEXT
            {
            value = 1;
            text = "Flag2";
            },
		AVKON_ENUMERATED_TEXT
            {
            value = 2;
            text = "Flag3";
            }
        };
    }

RESOURCE ARRAY r_checkboxeditor_texts
	{
	items = 
		{
		LBUF { txt = "Flag1";   },
		LBUF { txt = "Flag2";   },
		LBUF { txt = "Flag3";   }
		};
	}

RESOURCE AVKON_POPUP_SETTING_TEXTS r_radiobtn_page_texts
    {
    setting_texts_resource = r_radiobtn_item_texts;
    popped_up_texts_resource = r_radiobtn_editor_texts;
    }

RESOURCE ARRAY r_radiobtn_item_texts
    {
    items =
        {
        AVKON_ENUMERATED_TEXT
            {
            value = 0;
            text = "One";
            },
        AVKON_ENUMERATED_TEXT
            {
            value = 1;
            text = "Two";
            },
		AVKON_ENUMERATED_TEXT
            {
            value = 2;
            text = "Three";
            }
        };
    }

RESOURCE ARRAY r_radiobtn_editor_texts
	{
	items = 
		{
		LBUF { txt = "One";   },
		LBUF { txt = "Two";   },
		LBUF { txt = "Three"; }
		};
	}

RESOURCE AVKON_POPUP_SETTING_TEXTS r_binary_setting_texts
    {
    setting_texts_resource = r_binary_settingitem_texts;
    }

RESOURCE ARRAY r_binary_settingitem_texts
    {
    items =
        {
        AVKON_ENUMERATED_TEXT
            {
            value = 0;
            text = "Off";
            },
        AVKON_ENUMERATED_TEXT
            {
            value = 1;
            text = "On";
            }
        };
    }

⌨️ 快捷键说明

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