--- a/dictionary_plat/group/bld.inf Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Includes all the Domain API specific bld.inf files, which
-* export files.
-*
-*/
-
-
-
-
-
-
-#include "../menu_suites_macros_api/group/bld.inf"
-
--- a/dictionary_plat/menu_suites_macros_api/group/bld.inf Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: File that exports the files belonging to Suites Macros API.
-*
-*/
-
-
-
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../inc/suitesmacros.hrh APP_LAYER_PLATFORM_EXPORT_PATH(suitesmacros.hrh)
--- a/dictionary_plat/menu_suites_macros_api/inc/suitesmacros.hrh Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Macros for exporting suite xml definition files.
-*
-*/
-
-
-
-
-
-#ifndef SUITESMACROS_HRH
-#define SUITESMACROS_HRH
-
-#ifdef FF_HOMESCREEN_OPEN_MENUFW
-#define MATRIX_SUITE_EXPORT_PATH(FILE) private/101F4CD2/import/suites/ ## FILE
-#else
-#define MATRIX_SUITE_EXPORT_PATH(FILE) private/20012474/import/suites/ ## FILE
-#endif
-
-#ifdef FF_HOMESCREEN_OPEN_MENUFW
-#define MATRIX_SUITE_EXPORT_PATH_WINSCW(FILE) /epoc32/release/winscw/udeb/z/private/101F4CD2/import/suites/ ## FILE
-#define MATRIX_SUITE_EXPORT_PATH_ARMV5(FILE) /epoc32/data/z/private/101F4CD2/import/suites/ ## FILE
-#else
-#define MATRIX_SUITE_EXPORT_PATH_WINSCW(FILE) /epoc32/release/winscw/udeb/z/private/20012474/import/suites/ ## FILE
-#define MATRIX_SUITE_EXPORT_PATH_ARMV5(FILE) /epoc32/data/z/private/20012474/import/suites/ ## FILE
-#endif
-
-/**
- * These are public macros, to be used by MM clients (suites).
- */
-#define S60_SUITE_EXT(FILE1, FILE2) data=MATRIX_SUITE_EXPORT_PATH_ARMV5(FILE1) MATRIX_SUITE_EXPORT_PATH(FILE2)
-#define S60_SUITE(FILE) data=MATRIX_SUITE_EXPORT_PATH_ARMV5(FILE) MATRIX_SUITE_EXPORT_PATH(FILE)
-#define SUITE_EXPORT_PATH_WINSCW(FILE_FROM, FILE_TO) FILE_FROM MATRIX_SUITE_EXPORT_PATH_WINSCW(FILE_TO)
-#define SUITE_EXPORT_PATH_ARMV5(FILE_FROM, FILE_TO) FILE_FROM MATRIX_SUITE_EXPORT_PATH_ARMV5(FILE_TO)
-
-#endif // SUITESMACROS_HRH
--- a/dictionary_plat/menu_suites_macros_api/menu_suites_macros_api.metaxml Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<api id="4b9ecd543466c2efe121dfdac88d4854" dataversion="1.0">
-<name>Menu Suites Macros API</name>
-<description>Defines macros for exporting (from bld.inf) and including (in IBYs) menu suites configuration.</description>
-<type>c++</type>
-<subsystem>Menu Framework</subsystem>
-<libs></libs>
-<release category="domain" sinceversion="5.1"/>
-<attributes>
-<htmldocprovided>no</htmldocprovided>
-<adaptation>no</adaptation>
-</attributes>
-</api>
--- a/group/bld.inf Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-#include "../dictionary_plat/group/bld.inf"
-#include "../userdict/group/bld.inf"
\ No newline at end of file
--- a/layers.sysdef.xml Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
- <!ENTITY layer_real_source_path "sf/app/dictionary" >
-]>
-
-<SystemDefinition name="systemswextensions" schema="1.4.0">
- <systemModel>
- <layer name="app_layer">
- <module name="dictionary">
- <unit unitID="abs.dictionary" mrp="" bldFile="&layer_real_source_path;/group" name="dictionary" />
- </module>
- </layer>
- </systemModel>
-</SystemDefinition>
--- a/package_definition.xml Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
- <package id="dictionary" name="Dictionary" levels="utils ui">
- <collection id="userdict" name="User Dictionary" level="ui">
- <component id="userdict_build" filter="s60" name="Japanese User Dictionary">
- <unit bldFile="userdict/group"/>
- </component>
- </collection>
- <collection id="dictionary_info" name="Dictionary Info" level="ui">
- <component id="dictionary_plat" filter="s60" name="Dictionary Platform Interfaces" class="api">
- <unit bldFile="dictionary_plat/group"/>
- </component>
- </collection>
- </package>
-</SystemDefinition>
--- a/sysdef_1_4_0.dtd Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
- name CDATA #REQUIRED
- schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
- name CDATA #REQUIRED
- levels CDATA #IMPLIED
- span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
- name CDATA #REQUIRED
- level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
- unitID ID #REQUIRED
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- bldFile CDATA #REQUIRED
- priority CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
- name CDATA #REQUIRED
- version CDATA #REQUIRED
- late (Y|N) #IMPLIED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
- name ID #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
- name ID #REQUIRED
- description CDATA #REQUIRED
- target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
- name ID #REQUIRED
- abldTarget CDATA #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
- name ID #REQUIRED
- abldOption CDATA #REQUIRED
- description CDATA #REQUIRED
- enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
- name ID #REQUIRED
- description CDATA #REQUIRED
- filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
- command CDATA #REQUIRED
- targetList IDREFS #IMPLIED
- unitParallel (Y | N | y | n) #REQUIRED
- targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
- name CDATA #REQUIRED
- cwd CDATA #REQUIRED
- command CDATA #REQUIRED>
--- a/systemDefinition.xml Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "systemDefinition.dtd"[
-
- <!ENTITY layer_real_source_path "\sf\app\dictionary">
- <!ENTITY layer_name "dictionary">
-
- <!ENTITY layer_file SYSTEM "systemDefinitionLayer.xml">
- <!ENTITY targetDefinition_file SYSTEM "/epoc32/tools/systemDefinition/targetDefinition.xml">
- <!ENTITY defaultbuild_file SYSTEM "/epoc32/tools/systemDefinition/default_build.xml">
- <!ENTITY defaultclean_file SYSTEM "/epoc32/tools/systemDefinition/default_clean.xml">
-]>
-
-<SystemDefinition name="SystemDefinition" schema="1.4.0">
- <systemModel>
-&layer_file;
- </systemModel>
- <build>
-&targetDefinition_file;
-
- <configuration name="build" description="build layer" filter="">
- <layerRef layerName="&layer_name;"/>
-
-&defaultbuild_file;
- </configuration>
-
- <configuration name="clean" description="clean layer" filter="">
- <layerRef layerName="&layer_name;"/>
-
-&defaultclean_file;
- </configuration>
-
- </build>
-</SystemDefinition>
--- a/systemDefinitionLayer.xml Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<layer name="dictionary">
- <module name="group_dictionary">
- <component name="group_dictionary">
- <unit unitID="dictionary" mrp="" bldFile="&layer_real_source_path;\group" name="dictionary" />
- </component>
- </module>
-</layer>
--- a/userdict/Aif/UserDictAif.rss Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Application Information resource of Japanese user dictionary.
-*
-*/
-
-
-
-
-
-// INCLUDES
-#include <aiftool.rh>
-
-// RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-// AIF_DATA
-// Application Information resource.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AIF_DATA
- {
- app_uid = 0x101F8645;
-
- // Number of icons
- //
- num_icons = 2;
-
- // Application capabilities
- //
- embeddability = KAppEmbeddable;
- }
-
-// End of File
-
-
--- a/userdict/Aif/UserDict_caption.rss Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource of Japanese user dictionary caption strings.
-*
-*/
-
-
-
-
-
-// INCLUDES
-#include <apcaptionfile.rh>
-#include <userdict.loc>
-
-
-// RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-// CAPTION_DATA
-// Caption data of Japanese user dictionary.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CAPTION_DATA
- {
- caption = qtn_apps_udict_list;
- shortcaption = qtn_apps_udict_grid;
- }
-
-// End of File
-
-
--- a/userdict/data/101F86A9.rss Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 8645 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ecom resource file of UserDict Embeded dll.
-*
-*/
-
-
-
-
-
-//
-// UserDictApp resource
-//
-
-#include <registryinfo.rh>
-
-RESOURCE REGISTRY_INFO
- {
- dll_uid = 0x101F86A9; //should match name of this file
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid=0x101f8c96;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x101F8645;
- version_no = 1;
- display_name = "UserDict";
- default_data = "UserDict";
- opaque_data = "";
- }
- };
- }
- };
- }
--- a/userdict/data/UserDict.rss Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,526 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resources for Japanese user dictionary.
-*
-*/
-
-
-
-
-
-
-// RESOURCE IDENTIFIER
-NAME UDIC
-
-// INCLUDES
-#include "UserDict.hrh"
-#include <userdict.loc>
-#include <eikon.rh>
-#include <avkon.loc>
-#include <avkon.rsg>
-#include <avkon.hrh>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <appinfo.rh>
-#include <data_caging_paths_strings.hrh>
-
-// CONSTANTS
-
-// RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-// RSS_SIGNATURE
-// Standard resource signature.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
- {
- }
-
-// -----------------------------------------------------------------------------
-//
-// TBUF
-// Application caption and default filename.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF
- {
- buf = "";
- }
-
-// -----------------------------------------------------------------------------
-//
-// EIK_APP_INFO
-// Application info.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
- {
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// LOCALISABLE_APP_INFO
-// Application info.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_udict_localisable_app_info
- {
- short_caption = qtn_apps_udict_grid;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_apps_udict_list;
-#ifdef __SCALABLE_ICONS
- number_of_icons = 1;
- icon_file = APP_BITMAP_DIR"\\userdict_aif.mif";
-#else // !__SCALABLE_ICONS
- number_of_icons = 2;
- icon_file = APP_BITMAP_DIR"\\userdict_aif.mbm";
-#endif // __SCALABLE_ICONS
- };
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_view_cba_softkey_open
-// View's softkey resources. MSK is "open" command.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_udict_view_cba_softkey_open
- {
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyExit; txt = text_softkey_exit; },
- CBA_BUTTON {id=EUserDictCmdOpen; txt = qtn_msk_open;}
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_view_cba_softkey_newword
-// View's softkey resources. MSK is "New word" command.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_udict_view_cba_softkey_newword
- {
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyExit; txt = text_softkey_exit; },
- CBA_BUTTON {id=EUserDictCmdNewWord; txt = qtn_msk_newword;}
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_view_cba_softkey_contextoptions
-// View's softkey resources. MSK is "context options" command.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_udict_view_cba_softkey_contextoptions
- {
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyExit; txt = text_softkey_exit; },
- CBA_BUTTON {id=EAknSoftkeyContextOptions; txt = text_softkey_option;}
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_view_cba_softkey_empty
-// View's softkey resources. All softkeys are empty.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_udict_view_cba_softkey_empty
- {
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyEmpty; txt=text_softkey_empty;},
- CBA_BUTTON {txt=text_softkey_empty;},
- CBA_BUTTON {id=EAknSoftkeyEmpty; txt=text_softkey_empty;}
- };
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_view
-// View's main resources.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_udict_view
- {
- menubar = r_udict_menubar_view;
- cba = r_udict_view_cba_softkey_empty;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_menubar_view
-// View's default menu bar.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_udict_menubar_view
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane = r_udict_base_menu;
- txt = "";
- },
- MENU_TITLE
- {
- menu_pane =
- R_AVKON_MENUPANE_MARKABLE_LIST_EDIT_LIST_IMPLEMENTATION;
- txt = "";
- },
- MENU_TITLE
- {
- menu_pane = r_udict_app_menu;
- txt = "";
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_base_menu
-// Application basic menu.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_udict_base_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_app_menu
-// Japanese user dictionary default menu.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_udict_app_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = EUserDictCmdOpen;
- txt = qtn_udict_options_open;
- },
- MENU_ITEM
- {
- command = EUserDictCmdNewWord;
- txt = qtn_udict_options_new;
- },
- MENU_ITEM
- {
- command = EUserDictCmdDelete;
- txt = qtn_udict_options_delete;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_menubar_view_context
-// View's context sensitive menu bar.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_udict_menubar_view_context
- {
- titles=
- {
-
- MENU_TITLE
- {
- menu_pane =
- R_AVKON_MENUPANE_MARKABLE_LIST_EDIT_LIST_IMPLEMENTATION;
- txt = "";
- },
- MENU_TITLE
- {
- menu_pane = r_udict_app_menu_context;
- txt = "";
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_app_menu_context
-// Context sensitive menu.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_udict_app_menu_context
- {
- items=
- {
- MENU_ITEM
- {
- command = EUserDictCmdNewWord;
- txt = qtn_udict_options_new;
- },
- MENU_ITEM
- {
- command = EUserDictCmdDelete;
- txt = qtn_udict_options_delete;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_softkeys_done_cancel_done
-// softkey definition of Japanese user dictionary editor for MSK.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_udict_softkeys_done_cancel_done
- {
- buttons =
- {
- CBA_BUTTON { id=EAknSoftkeyDone; txt=text_softkey_done; },
- CBA_BUTTON { id=EAknSoftkeyCancel; txt=text_softkey_cancel; },
- CBA_BUTTON { id=EAknSoftkeyDone; txt=text_softkey_done; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_softkeys_empty_cancel_empty
-// softkey definition of Japanese user dictionary editor for MSK.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_udict_softkeys_empty_cancel_empty
- {
- buttons =
- {
- CBA_BUTTON { id=EAknSoftkeyEmpty; txt=text_softkey_empty;},
- CBA_BUTTON { id=EAknSoftkeyCancel; txt=text_softkey_cancel;},
- CBA_BUTTON { id=EAknSoftkeyEmpty; txt=text_softkey_empty;}
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_dialog_edit
-// Japanese user dictionary editor.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_udict_dialog_edit
- {
- flags =
- EEikDialogFlagWait | EEikDialogFlagNoBorder |
- EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
- EEikDialogFlagFillAppClientRect | EEikDialogFlagCbaButtons;
- buttons = r_udict_softkeys_done_cancel_done;
- form = r_udict_form;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_form
-// Form resource of Japanese user dictionary editor.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE FORM r_udict_form
- {
- flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
- items =
- {
- DLG_LINE
- {
- type = EEikCtEdwin;
- prompt = qtn_udict_lbl_word ;
- id = EUserDictWordEdwin;
- itemflags = EEikDlgItemSeparatorBefore | EEikDlgItemTakesEnterKey;
- control = EDWIN
- {
- flags = KMultiLineExpandingEditorFlags
- | EEikEdwinNoAutoSelection | EEikEdwinJustAutoCurEnd
- | EEikEdwinNoLineOrParaBreaks;
- maxlength = EUseDictWordBuffer;
- width = 6;
- default_input_mode = EAknEditorHiraganaKanjiInputMode;
- avkon_flags = EAknEditorFlagEnablePictographInput;
- base_line_delta = 21;
- };
- tooltip="";
- },
- DLG_LINE
- {
- type = EEikCtEdwin;
- prompt = qtn_udict_lbl_reading;
- id = EUserDictReadingEdwin;
- itemflags = EEikDlgItemSeparatorBefore | EEikDlgItemTakesEnterKey;
- control = EDWIN
- {
- flags = KMultiLineExpandingEditorFlags
- | EEikEdwinNoAutoSelection | EEikEdwinJustAutoCurEnd
- | EEikEdwinNoLineOrParaBreaks;
- maxlength = EUseDictReadingBuffer;
- width = 6;
- allowed_input_modes = EAknEditorHiraganaInputMode;
- default_input_mode = EAknEditorHiraganaInputMode;
- base_line_delta = 21;
- };
- tooltip = "";
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_delete_query
-// Deletion confirmation query.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_udict_delete_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EUserDictDeleteQuery;
- control= AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationQueryLayout;
- label = qtn_udict_note_delete_word;
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_wait_note
-// Wait note for Deleting words.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_udict_wait_note
- {
- flags = EAknWaitNoteFlags;
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items=
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = EUserDictDeleteWaitNote;
- control= AVKON_NOTE
- {
- layout = EWaitLayout;
- singular_label = qtn_fldr_deleting_wait_note;
- imagefile = AVKON_BITMAP_FILE;
- imageid = EMbmAvkonQgn_note_voice;
- imagemask = EMbmAvkonQgn_note_voice_mask;
- animation =R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_delete_query_message
-// Prompt text for the deleting words query.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_udict_delete_query_message
- {
- buf = qtn_udict_note_delete_words;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_already_reg_message
-// Information message for "the word is alredy registered."
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF64 r_udict_already_reg_message
- {
- buf = qtn_udict_info_already_registd;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_invalid_1stchar_message
-// Information message for "the first character is invalid."
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF64 r_udict_invalid_1stchar_message
- {
- buf = qtn_udict_info_invalid_1stchar;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_udict_info_memory_full_message
-// Information message for "the User dictionary has no space to register."
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF64 r_udict_info_memory_full_message
- {
- buf = qtn_udict_info_memory_full;
- }
-
-// End of File
-
-
--- a/userdict/data/UserDict_reg.rss Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-
-#include <appinfo.rh>
-#include <UserDict.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x101F8645 // Define your application UID here
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file = "UserDict";
-
- localisable_resource_file = APP_RESOURCE_DIR"\\UserDict";
- localisable_resource_id = R_UDICT_LOCALISABLE_APP_INFO;
-
- hidden=KAppNotHidden;
- embeddability=KAppEmbeddableUiOrStandAlone;
- newfile=KAppDoesNotSupportNewFile;
- }
-
-// End of File
--- a/userdict/group/UserDict.mmp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project specification file of Japanese user dictionary.
-*
-*/
-
-
-
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-////////////////////////////////////////////////////////////
-// Target information
-TARGET UserDict.exe
-TARGETTYPE exe
-UID 0x100039CE 0x101F8645
-EPOCSTACKSIZE 0x4000
-
-CAPABILITY CAP_APPLICATION
-VENDORID VID_DEFAULT
-
-////////////////////////////////////////////////////////////
-// Sources
-SOURCEPATH ../src
-SOURCE UdictAppExe.cpp
-
-////////////////////////////////////////////////////////////
-// Include paths
-USERINCLUDE . ../inc
-
-// This is a SYSTEMINCLUDE macro containing the applications
-// layer specific include directories
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE ../../inc
-
-////////////////////////////////////////////////////////////
-// Resources
-START RESOURCE ../data/UserDict.rss
-HEADER
-
-TARGETPATH APP_RESOURCE_DIR
-
-Lang sc 32 160
-END // RESOURCE
-
-////////////////////////////////////////////////////////////
-// AIF file
-START RESOURCE ../data/UserDict_reg.rss
-DEPENDS userdict.rsg
-TARGETPATH /private/10003a3f/apps
-END
-
-////////////////////////////////////////////////////////////
-// Static dependencies
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY eikcore.lib
-LIBRARY cone.lib
-
-// End of File
--- a/userdict/group/UserDictEmbedded.mmp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project specification file of Japanese user dictionary.
-*
-*/
-
-
-
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-////////////////////////////////////////////////////////////
-// Target information
-TARGET UserDict.dll
-TARGETTYPE PLUGIN
-CAPABILITY CAP_ECOM_PLUGIN
-VENDORID VID_DEFAULT
-UID 0x10009d8d 0x101F86A9
-
-////////////////////////////////////////////////////////////
-// Sources
-SOURCEPATH ../src
-SOURCE UdictApp.cpp
-SOURCE UdictDocument.cpp
-SOURCE UdictAppUi.cpp
-SOURCE UdictView.cpp
-SOURCE UdictContainer.cpp
-SOURCE UdictFrm.cpp
-SOURCE UdictModel.cpp
-SOURCE UdictElement.cpp
-
-////////////////////////////////////////////////////////////
-// Include paths
-USERINCLUDE . ../inc
-
-// This is a SYSTEMINCLUDE macro containing the applications
-// layer specific include directories
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE /epoc32/include/ecom
-SYSTEMINCLUDE ../../inc
-
-////////////////////////////////////////////////////////////
-// Resources
-
-START RESOURCE ../data/101F86A9.rss
-#ifdef SYMBIAN_SECURE_ECOM
- TARGET UserDict.rsc
-#endif
-END
-
-////////////////////////////////////////////////////////////
-// Static dependencies
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY eikcore.lib
-LIBRARY cone.lib
-LIBRARY avkon.lib
-LIBRARY eikcoctl.lib
-LIBRARY eikctl.lib
-LIBRARY eikdlg.lib
-LIBRARY commonengine.lib
-LIBRARY ptiengine.lib
-LIBRARY FeatMgr.lib
-LIBRARY hlplch.lib
-LIBRARY AknIcon.lib
-LIBRARY egul.lib
-LIBRARY ecom.lib
-LIBRARY ws32.lib
-
-// End of File
--- a/userdict/group/bld.inf Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The information required for building
-*
-*/
-
-
-
-
-
-#include <platform_paths.hrh>
-
-PRJ_EXPORTS
-// export localised loc file
-../loc/userdict.loc APP_LAYER_LOC_EXPORT_PATH(userdict.loc)
-// export iby file
-../rom/userdict_Variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(userdict_Variant.iby)
-
-PRJ_MMPFILES
-// build application
-UserDict.mmp
-UserDictEmbedded.mmp
-
-PRJ_EXTENSIONS
-// build mif file
-START EXTENSION s60/mifconv
-OPTION TARGETFILE USERDICT_AIF.mif
-OPTION SOURCES -c8,8 qgn_menu_jap_dictionary
-END
-
-// End of File
--- a/userdict/group/userdict_icons_aif_bitmaps.mk Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-TARGETDIR=$(ZDIR)\SYSTEM\APPS\USERDICT
-ICONTARGETFILENAME=$(TARGETDIR)\USERDICT_AIF.MBM
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_jap_dictionary_lst.bmp
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_jap_dictionary_cxt.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
--- a/userdict/group/userdict_icons_aif_bitmaps_dc.mk Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-TARGETDIR=$(ZDIR)\RESOURCE\APPS
-ICONTARGETFILENAME=$(TARGETDIR)\USERDICT_AIF.MBM
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_jap_dictionary_lst.bmp
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_jap_dictionary_cxt.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
--- a/userdict/group/userdict_icons_aif_scalable.mk Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-TARGETDIR=$(ZDIR)\SYSTEM\APPS\USERDICT
-ICONTARGETFILENAME=$(TARGETDIR)\USERDICT_AIF.MIF
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-RESOURCE :
- @echo $(ICONTARGETFILENAME)
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_jap_dictionary.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
--- a/userdict/group/userdict_icons_aif_scalable_dc.mk Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-TARGETDIR=$(ZDIR)\RESOURCE\APPS
-ICONTARGETFILENAME=$(TARGETDIR)\USERDICT_AIF.MIF
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_jap_dictionary.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
--- a/userdict/inc/UdictApp.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Application class.
-*
-*/
-
-
-
-
-
-
-#ifndef UDICTAPP_H
-#define UDICTAPP_H
-
-// INCLUDES
-#include <aknapp.h>
-
-// CONSTANTS
-// UID of the application
-const TUid KUidUserDict = { 0x101F8645 };
-
-// CLASS DECLARATION
-
-/**
-* Japanese user dictionary Application class.
-* @since 2.6
-*/
-class CUserDictApp : public CAknApplication
- {
- private: // Functions from base classes
-
- /**
- * From CApaApplication.
- * Returns application's UID.
- * @return the value of KUidUserDict.
- */
- TUid AppDllUid() const;
-
- /**
- * From CApaApplication.
- * Creates CUserDictDocument document object.
- * @return the created document object.
- */
- CApaDocument* CreateDocumentL();
- };
-
-#endif // UDICTAPP_H
-
-// End of File
--- a/userdict/inc/UdictAppUi.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Application UI class.
-*
-*/
-
-
-
-
-
-
-#ifndef UDICTAPPUI_H
-#define UDICTAPPUI_H
-
-// INCLUDES
-#include <aknViewAppUi.h>
-
-// CLASS DECLARATION
-
-/**
-* Japanese user dictionary Application UI class.
-* @since 2.6
-*/
-class CUserDictAppUi : public CAknViewAppUi
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CUserDictAppUi();
-
- /**
- * Destructor.
- */
- virtual ~CUserDictAppUi();
-
- private:
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // Functions from base classes
-
- /**
- * From CEikAppUi
- * Handles the commands.
- * @param aCommand to be handled
- */
- void HandleCommandL(TInt aCommand);
-
- /**
- * From CEikAppUi
- * Handles the commands.
- */
- void HandleScreenDeviceChangedL();
- };
-
-#endif // UDICTAPPUI_H
-
-// End of File
--- a/userdict/inc/UdictContainer.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary View container control. It contains
-* a single style list box to show the registered words.
-*
-*/
-
-
-
-
-
-
-#ifndef UDICTCONTAINER_H
-#define UDICTCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <AknWaitNoteWrapper.h>
-
-// FORWARD DECLARATIONS
-class CAknSingleStyleListBox;
-class CEikListBox;
-class CGulIcon;
-class CAknView;
-class CUserDictModel;
-
-// CLASS DECLARATION
-/**
-* Japanese user dictionary Container class.
-* It contains a single style list box to show the registered words.
-* CUserDictView controls this class.
-* @since 2.6
-*/
-class CUserDictContainer : public CCoeControl, public MAknBackgroundProcess
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- * @param aModel
- * @param aView
- */
- CUserDictContainer(CUserDictModel& aModel, CAknView& aView);
-
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- virtual ~CUserDictContainer();
-
- public: // New functions
-
- /**
- * It sets the focus to the item which is located at aIndex and redraws
- * the Listbox.
- * @param aIndex is set to the Listbox's current item.
- */
- void SetFocusL(TInt aIndex) const;
-
- /**
- * Deletes the selected items in the Listbox.
- * If the Listbox has marked items, it deletes the all marked items.
- * If it doesn't have any marked item, it deletes the focused item.
- */
- void DeleteItemL();
-
- /**
- * Gets the Listbox object.
- * @return the Listbox object.
- */
- inline CEikListBox* ListBox() const;
-
- private: // New functions
-
- /**
- * Sets a marking icon array to the Listbox.
- */
- void SetGraphicIconL();
-
- /**
- * It shows a Wait Note during deleting the marked items.
- */
- void ShowWaitNoteL();
-
- /**
- * Creates the icon and adds it to the array if it was successful
- * @since 2.8
- */
- void CUserDictContainer::CreateIconAndAddToArrayL(
- CArrayPtr<CGulIcon>*& aIconsArray,
- const TDesC& aIconFile,
- TInt aBitmap, TInt aMask = -1);
-
-
- private: // Functions from base classes
-
- /**
- * From CCoeControl
- * Handles size changed.
- */
- void SizeChanged();
-
- /**
- * From CCoeControl
- * Gets a number of the component controls.
- * @return a number of the component control.
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl
- * Gets the component control.
- * @param aIndex is index of the component control
- * @return the component control
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl
- * Handles key events.
- * @param aKeyEvent
- * @param aType
- * @return EKeyWasConsumed, when it handles the event.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
- TEventCode aType);
-
- /**
- * From CCoeContro, gets help context.
- * @param aContext
- */
- void GetHelpContext(TCoeHelpContext& aContext) const;
-
- /**
- * From MAknBackgroundProcess,
- * It has the actual process in the wait note's loop.
- * It deletes the selected words by descending order of list index.
- * This function is called repeatedly until all selected words are
- * deleted.
- */
- void StepL();
-
- /**
- * From MAknBackgroundProcess, tests whether Wait Note process is done.
- * When iWaitNoteCounter is under zero, it finishes the process.
- * @return ETrue, when the process is done.
- */
- TBool IsProcessDone() const;
-
- private: // Data
-
- // The ListBox showing registered words
- CAknSingleStyleListBox* iListBox; // own
-
- // Japanese user dictionary Model
- CUserDictModel& iModel;
-
- // View, the controller of this class
- CAknView& iView;
-
- // The counter for the Wait Note process.
- // It's used for count of deleting words
- TInt iWaitNoteCounter;
-
- };
-
-#endif // UDICTCONTAINER_H
-
-// End of File
--- a/userdict/inc/UdictContainer.inl Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Inline functions of Japanese user dictionary Container class.
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include <aknlists.h>
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::ListBox
-// Gets the Listbox object.
-// -----------------------------------------------------------------------------
-//
-inline CEikListBox* CUserDictContainer::ListBox() const
- {
- return iListBox;
- }
-
-
-// End of File
--- a/userdict/inc/UdictDocument.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Document class.
-*
-*/
-
-
-
-
-
-
-#ifndef UDICTDOCUMENT_H
-#define UDICTDOCUMENT_H
-
-// INCLUDES
-#include <AknDoc.h>
-
-// FORWARD DECLARATIONS
-class CEikAppUi;
-class CUserDictModel;
-
-// CLASS DECLARATION
-
-/**
-* Japanese user dictionary Document class.
-* It owns CUserDictModel object.
-* @since 2.6
-*/
-class CUserDictDocument : public CAknDocument
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- * @param aApp is reference of the App.
- */
- static CUserDictDocument* NewL(CEikApplication& aApp);
-
- /**
- * Destructor.
- */
- virtual ~CUserDictDocument();
-
- /**
- * Returns CUserDictModel object.
- * @return CUserDictModel object.
- */
- CUserDictModel& Model() const;
-
- private:
-
- /**
- * C++ default constructor.
- * @param aApp is reference of the App.
- */
- CUserDictDocument(CEikApplication& aApp);
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // Functions from base classes
-
- /**
- * From CEikDocument.
- * Create user dictionary's AppUI object.
- * @return the created CEikAppUi object.
- */
- CEikAppUi* CreateAppUiL();
-
- private: // Data
-
- // Japanese user dictionary model object
- CUserDictModel* iModel; // own
-
- };
-
-#endif // UDICTDOCUMENT_H
-
-// End of File
--- a/userdict/inc/UdictElement.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class represents an element of Japanese user dictionary
-* for Japanese FEP.
-*
-*/
-
-
-
-
-
-
-#ifndef UDICTELEMENT_H
-#define UDICTELEMENT_H
-
-// INCLUDES
-#include <e32base.h>
-#include <PtiUserDicEntry.h>
-#include "UserDict.hrh"
-
-// CLASS DECLARATION
-
-/**
-* This class represents an element of Japanese user dictionary
-* for Japanese FEP.
-* It contains two string buffers for a word text and a reading text.
-* @since 2.6
-*/
-class TUDictElement : public MPtiUserDictionaryEntry
- {
- public:
-
- /**
- * C++ default constructor.
- */
- TUDictElement();
-
- public: // New functions
-
- /**
- * Returns the descriptor which has a ListBox's separator character,
- * for using to ListBox item.
- * @return the descriptor with a ListBox separator.
- */
- inline const TDesC& ListItemText() const;
-
- /**
- * Sets aReading to the buffer of the reading descriptor.
- * @param aReading is set to the reading buffer.
- */
- inline void SetReading(TDesC& aReading);
-
- /**
- * Compares to the other element.
- * @param aElement to be compared to this
- * @return zero, if the both elements are identical.
- */
- inline TInt operator!=(const TUDictElement& aElement) const;
-
- /**
- * Tests if this element is empty.
- * @return zero, if this element isn't empty.
- */
- inline TInt IsEmpty() const;
-
- public: // Functions from base classes
-
- /**
- * From MPtiUserDictionaryEntry
- * Returns the word descriptor.
- * @return the word descriptor.
- */
- TPtrC Word() const;
-
- /**
- * From MPtiUserDictionaryEntry
- * Returns the reading descriptor.
- * @return the reading descriptor.
- */
- TPtrC Reading() const;
-
- /**
- * From MPtiUserDictionaryEntry
- * Sets aWord to the buffer of the word descriptor.
- * @param aWord is set to the word buffer.
- */
- void SetWord(TDesC& aWord);
-
- private: // Functions from base classes
-
- /**
- * From MPtiUserDictionaryEntry
- * Sets word and reading descriptor.
- *
- * @param aWord is set to the word buffer.
- * @param aReading is set to the reading buffer.
- */
- void SetWord(TDesC& aWord, TDesC& aReading);
-
- private: // Data
-
- // Word buffer
- // The buffer needs one additional room for a ListBox separator.
- TBuf<EUseDictWordBuffer + 1> iWord;
-
- // Reading buffer
- TBuf<EUseDictReadingBuffer> iReading;
- };
-
-#include "UdictElement.inl"
-
-#endif // UDICTELEMENT_H
-
-// End of File
--- a/userdict/inc/UdictElement.inl Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Inline functions of Japanese user dictionary's element class.
-*
-*/
-
-
-
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// TUDictElement::ListItemText
-// Returns the descriptor with a ListBox's separator character.
-// -----------------------------------------------------------------------------
-//
-inline const TDesC& TUDictElement::ListItemText() const
- {
- return iWord;
- }
-
-// -----------------------------------------------------------------------------
-// TUDictElement::SetReading
-// -----------------------------------------------------------------------------
-//
-inline void TUDictElement::SetReading(TDesC& aReading)
- {
- iReading = aReading;
- }
-
-// -----------------------------------------------------------------------------
-// TUDictElement::operator!=
-// -----------------------------------------------------------------------------
-//
-inline TInt TUDictElement::operator!=(const TUDictElement& aElement) const
- {
- return !((Word() == aElement.Word()) && (Reading() == aElement.Reading()));
- }
-
-// -----------------------------------------------------------------------------
-// TUDictElement::IsEmpty
-// -----------------------------------------------------------------------------
-//
-inline TInt TUDictElement::IsEmpty() const
- {
- return (Word().Length() == 0 || Reading().Length() == 0);
- }
-
-// End of File
--- a/userdict/inc/UdictFrm.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary editor form.
-*
-*/
-
-
-
-
-
-
-#ifndef UDICTFRM_H
-#define UDICTFRM_H
-
-// INCLUDES
-#include <AknForm.h>
-
-// FORWARD DECLARATIONS
-class CUserDictView;
-class TUDictElement;
-
-// CLASS DECLARATION
-
-/**
-* This class defines the form of Japanese user dictionary editor.
-* Edits an entry of Japanese user dictionary, which has a word and
-* the reading.
-* @since 2.6
-*/
-class CUserDictForm : public CAknForm
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- * @param aItem is a reference to the entry item
- * @param aView
- */
- static CUserDictForm* NewL(const TUDictElement& aItem,
- CUserDictView& aView);
-
- private:
-
- /**
- * Destructor.
- */
- ~CUserDictForm();
-
- private:
-
- /**
- * C++ default constructor.
- * @param aItem is a reference to the entry item
- * @param aView
- */
- CUserDictForm(const TUDictElement& aItem, CUserDictView& aView);
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // New functions
-
- /**
- * Gets the edited data, and sets the data to aEntry.
- * @param aEntry is set the edited data.
- */
- void GetData(TUDictElement& aEntry) const;
-
- /**
- * Sets the entry data to the controls which the form has.
- */
- void SetDataL() const;
-
- /**
- * Saves the entry, and if an error has occurred at the saving time,
- * it shows an error note.
- * @return EFalse, if it needs to fix the entry.
- */
- TBool SaveL();
-
- /**
- * Tests if the entry fields are blank.
- * @return EFalse, if the word and the reading are not empty.
- */
- TBool IsBlank() const;
-
- /**
- * Tests if the characters of the reading entry is valid.
- * @return EFalse, the reading entry has invalid characters.
- */
- TBool IsValidReadingL(const TUDictElement& aItem) const;
-
- private: // Functions from base classes
-
- /**
- * From CEikDialog
- * Initializes the form.
- */
- void PreLayoutDynInitL();
-
- /**
- * From CEikDialog, handles exit event of the form.
- * It calls SaveL(). If the saving finishes with EFalse,
- * this function returns EFalse.
- * @param aKeycode
- * @return ETrue, when exits the form.
- */
- TBool OkToExitL(TInt aKeycode);
-
- /**
- * From MCoeControlObserver, handles event of the form state changes.
- * It switches the "Done" softkey visible or hidden.
- * @param aControlId
- */
- void HandleControlStateChangeL(TInt aControlId);
-
- /**
- * From CCoeControl
- * Handles key events.
- * @param aKeyEvent
- * @param aType
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
- TEventCode aType);
-
- private: // Data
-
- // The Entry keeping the initial state
- const TUDictElement& iInitEntry;
-
- // The reference of View
- // It's used for calling the saving function.
- CUserDictView& iView;
-
- // The resource id for displaying softkey
- TUint iSoftkeyResource;
- };
-
-#endif // UDICTFRM_H
-
-// End of File
--- a/userdict/inc/UdictModel.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The engine class of Japanese user dictionary.
-* It wraps PtiEngine to access the User dictionary.
-*
-*/
-
-
-
-
-
-
-#ifndef UDICTMODEL_H
-#define UDICTMODEL_H
-
-// INCLUDES
-#include "UdictElement.h"
-#include <badesca.h>
-
-// DATA TYPES
-typedef CArrayFixFlat<TUDictElement> CUserDictList;
-
-// FORWARD DECLARATIONS
-class CPtiEngine;
-class MPtiUserDictionary;
-
-// CLASS DECLARATION
-
-/**
-* The engine of Japanese user dictionary.
-* The main role of this class is accessing the User dictionary data via
-* CPtiEngeine.
-* @since 2.6
-*/
-class CUserDictModel : public CBase, public MDesCArray
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CUserDictModel* NewL();
-
- /**
- * Destructor.
- */
- ~CUserDictModel();
-
- public: // New functions
-
- /**
- * Returns the self object as interface to access the registered
- * word list.
- * @return a pointer of the interface of the registered word list.
- */
- inline MDesCArray* List();
-
- /**
- * Gets an element of the registered word list.
- * @param aIndex is the position of the element.
- * @return a reference to an element of the registered word list,
- * located at aIndex.
- */
- inline const TUDictElement& ListItem(TInt aIndex) const;
-
- /**
- * Tests if the User dictionary data is changed by another application.
- * @return ETrue, if the User dictionary data is changed.
- */
- inline TBool IsChangedByAnotherApp() const;
-
- /**
- * Sets the flag which notifies the User dictionary is changed by
- * another application.
- * @param aFlag is set to the of User dictionary update flag.
- */
- inline void SetChangeNotice(TBool aFlag);
-
- /**
- * Tests if the user dictionary has enough space to add word or not.
- * @return ETrue, the user dictionary has no space to register.
- */
- inline TBool IsDictionaryFull();
-
- /**
- * Reload User dictionary data to reflect the changes by another
- * application.
- */
- inline void ReloadDictInfoL();
-
- /**
- * Stops the file storing in registering and deleting until SaveNow()
- * is called.
- */
- inline void DelaySavingL();
-
- /**
- * Stores cahges of the dictionary data to the file.
- */
- inline void SaveNowL();
-
- /**
- * Adds a new word to the User dictionary.
- * This function might leave. It leaves with KErrAlreadyExists if the
- * word is already registered, KErrDiskFull if the dictionary has no
- * space to register.
- *
- * @param aItem is added to the User dictionary
- * @return index of a new word inserted to the registered word list.
- */
- TInt AddNewWordL(const TUDictElement& aItem);
-
- /**
- * Deletes the word from the User dictionary.
- * @param aIndex is the position of the deleted item in the word list.
- */
- void DeleteWordL(TInt aIndex);
-
- /**
- * Modifies the registered word of User dictionary.
- * If modifying the word is failed, it leaves.
- *
- * @param aIndex is the position of the modified word
- * @param aItem is a modified entry
- * @return index of a modified word relocated in the registered
- * word list.
- */
- TInt ModifyWordL(TInt aIndex, const TUDictElement& aItem);
-
- /**
- * Initializes the registered word list.
- * It copies the User dictionary data to iItemList, which is the
- * registered word list and sorts the list by Unicode collation
- * algorithm.
- */
- void InitListL();
-
- private:
-
- /**
- * C++ default constructor.
- */
- CUserDictModel();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // Functions from base classes
-
- /**
- * From MDesCArray, returns a number of elements in the array.
- * @return a number of elements in the registered word list.
- */
- TInt MdcaCount() const;
-
- /**
- * From MDesCArray,
- * Retruns a descriptor for the ListBox's item.
- * @param aIndex is a position of the registered word list.
- * @return a descriptor for the ListBox's item representing the element
- * located at aIndex within the word list.
- */
- TPtrC16 MdcaPoint(TInt aIndex) const;
-
- private: // Data
-
- // The array of registered words.
- // The original User dictionary data is copied to this array.
- CUserDictList* iItemList; // own
-
- // The predictive text input engine.
- // It provides the API to access the User dictionary data.
- CPtiEngine* iPtiEngine; // own
-
- // PtiEngine's user dictionary interface.
- MPtiUserDictionary* iDictionary ;
-
- private:
-
- class TWordListKey : public TKeyArrayFix
- {
- public: // Constructor
-
- /**
- * C++ default constructor.
- */
- TWordListKey();
-
- private: // Functions from base classes
-
- /**
- * From TKey, Compares the keys of two elements.
- * @param aLeft is the index of the Left element
- * @param aRight is the index of the Right element
- * @return zero, if both elements are identical.
- * positive, if the left element is greater.
- * negative, if the right element is greater.
- */
- TInt Compare(TInt aLeft, TInt aRight) const;
- };
- };
-
-#endif // UDICTMODEL_H
-
-// End of File
--- a/userdict/inc/UdictModel.inl Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Inline functions of Japanese user dictionary Model class.
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include <PtiCore.h>
-#include <PtiEngine.h>
-
-// CONSTANTS
-const TInt KRegisterNecessarySpace(75);
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::List
-// Returns "this" pointer as interface to the registered word list.
-// -----------------------------------------------------------------------------
-//
-inline MDesCArray* CUserDictModel::List()
- {
- return this;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::ListItem
-// -----------------------------------------------------------------------------
-//
-inline const TUDictElement& CUserDictModel::ListItem(TInt aIndex) const
- {
- return iItemList->At(aIndex);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::IsChangedByAnotherApp
-// -----------------------------------------------------------------------------
-//
-inline TBool CUserDictModel::IsChangedByAnotherApp() const
- {
- return iDictionary->UpdateFlag()
- && iPtiEngine->NumberOfEntriesInUserDictionary() != iItemList->Count();
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::SetChangeNotice
-// -----------------------------------------------------------------------------
-//
-inline void CUserDictModel::SetChangeNotice(TBool aFlag)
- {
- iDictionary->SetUpdateFlag(aFlag);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::IsDictionaryFull
-// -----------------------------------------------------------------------------
-//
-inline TBool CUserDictModel::IsDictionaryFull()
- {
- // Checks the left space of the User dictionary data area.
- TInt leftSpace(iDictionary->SpaceLeft());
- return (leftSpace >= 0 && leftSpace < KRegisterNecessarySpace)
- ? ETrue : EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::ReloadDictInfoL
-// -----------------------------------------------------------------------------
-//
-inline void CUserDictModel::ReloadDictInfoL()
- {
- iPtiEngine->HandleCommandL(EPtiCommandReloadLearningInfo);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::DelaySavingL
-// -----------------------------------------------------------------------------
-//
-inline void CUserDictModel::DelaySavingL()
- {
- iPtiEngine->HandleCommandL(EPtiCommandUserDictionaryDelaySaving);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::SaveNowL
-// -----------------------------------------------------------------------------
-//
-inline void CUserDictModel::SaveNowL()
- {
- iPtiEngine->HandleCommandL(EPtiCommandUserDictionarySaveNow);
- }
-
-// End of File
--- a/userdict/inc/UdictView.h Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary View class.
-* It owns CUserDictContainer object as container control.
-* It handles the events and switches the view state to Word list
-* view or to User dictionary editor.
-*
-*/
-
-
-
-
-
-#ifndef UDICTVIEW_H
-#define UDICTVIEW_H
-
-// INCLUDES
-#include <aknview.h>
-
-// FORWARD DECLARATIONS
-class CUserDictContainer;
-class CUserDictModel;
-class TUDictElement;
-class CIdle;
-
-// CLASS DECLARATION
-
-/**
-* Japanese user dictionary View class.
-* It owns CUserDictContainer object as container control.
-* @since 2.6
-*/
-class CUserDictView : public CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- * @param aModel
- */
- static CUserDictView* NewLC(CUserDictModel& aModel);
-
- /**
- * Destructor.
- */
- virtual ~CUserDictView();
-
- public: // New functions
-
- /**
- * Saves the changes of the element and updates ListBox.
- * It calls the model's function to add or to modify the entry to
- * the User dictionary.
- * @param aNewItem is the element after changes.
- * @param aOldItem is the element before changes.
- */
- void SaveL(const TUDictElement& aNewItem,
- const TUDictElement& aOldItem) const;
-
- /**
- * Displays an information note with a message defined by aResourceId.
- * @param aResourceId is the ID of the resource of the message string.
- */
- void ShowInformationNoteL(TInt aResourceId) const;
-
- /**
- * From CAknView
- * Handles the client rectangle is changed.
- */
- void HandleClientRectChange();
-
- private: // Constructors
-
- /**
- * C++ default constructor.
- * @param aModel
- */
- CUserDictView(CUserDictModel& aModel);
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // New functions
-
- /**
- * Shows a delete confirmation query.
- * @param aCount is the number of the deleting words.
- * @return zero, if user cancels confirmation.
- */
- TInt ShowDeleteConfQueryL(TInt aCount = 1) const;
-
- /**
- * Shows the form of User dictionary editor.
- * @param aItem is the reference to the entry item.
- */
- void ShowEditorFormL(const TUDictElement& aItem);
-
- /**
- * Re-initializes the registered word list and updates the ListBox.
- */
- void UpdateListL();
-
- /**
- * The iIdle's callback function
- * @param aView
- * @return zero
- */
- static TInt RegisterByAnotherApp(TAny* aView);
-
- /**
- * This function is only called when the application is launched
- * by another application.
- * The function starts the User dictionary editor and closes
- * this application after the editor is closed.
- */
- void DoRegisterByAnotherApp();
-
- /**
- * In this function the correct softkey is shown.
- */
- void ShowSoftkeyL();
-
- private: // Functions from base classes
-
- /**
- * From CAknView, returns this view Id.
- * @return this view Id
- */
- TUid Id() const;
-
- /**
- * From CAknView
- * Handles the commands.
- * @param aCommand
- */
- void HandleCommandL(TInt aCommand);
-
- /**
- * From CAknView, activates the view.
- * It creates and initializes CUserDictContainer object.
- * If it is started by another application, this function creates
- * the CIdle object to call RegisterByAnotherAppL().
- * @param aPrevViewId
- * @param aCustomMessageId
- * @param aCustomMessage
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * From CAknView
- * Deactivates the view.
- */
- void DoDeactivate();
-
- /**
- * From CAknView
- */
- void HandleForegroundEventL(TBool aForeground);
-
- /**
- * From MEikMenuObserver
- * Initializes the menu pane.
- * @param aResourceId is the Resource ID of the menu pane
- * @param aMenuPane
- */
- void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
- private: // Data
-
- // View Container Control
- CUserDictContainer* iContainer; // own
-
- // Japanese User Dictionary Model
- // It provides the access to the User dictionary data.
- CUserDictModel& iModel;
-
- // CIdle active object
- CIdle* iIdle; // own
-
- // Flag to forbid the re-initializing of the list.
- TBool iLockListUpdate;
- // ETrue is embedded
- TBool iEmbedded;
- };
-
-#endif // UDICTVIEW_H
-
-// End of File
--- a/userdict/inc/UserDict.hrh Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for resource and C++ file.
-*
-*/
-
-
-
-
-
-#ifndef USERDICT_HRH
-#define USERDICT_HRH
-
-// DATA TYPES
-enum TUserDictCommandIds // Command ID
- {
- EUserDictCmdOpen = 0x6000,
- EUserDictCmdNewWord,
- EUserDictCmdDelete,
- EUserDictCmdEmpty
- };
-
-enum TUserDictDlgCtrlIds // Control ID which is used in dialog.
- {
- EUserDictWordEdwin = 0x6020,
- EUserDictReadingEdwin,
- EUserDictDeleteQuery,
- EUserDictDeleteWaitNote
- };
-
-enum TUserDictEntrySizes
- {
- // Buffer size of the word entry field of the Editor.
- EUseDictWordBuffer = 25,
- // Buffer size of the reading entry field of the Editor.
- EUseDictReadingBuffer = 8
- };
-
-#endif // USERDICT_HRH
-
-// End of File
--- a/userdict/inc/udict.hlp.hrh Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary's Help declaration.
-*
-*/
-
-
-
-
-
-#ifndef UDICTHLP_HRH
-#define UDICTHLP_HRH
-
-_LIT(KUDICT_HLP, "UDICT_HLP_USER_DICTIONARY");
-
-#endif // UDICTHLP_HRH
-
-// End of File
--- a/userdict/loc/userdict.loc Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Localised strings of Japanese user dictionary.
-*
-*/
-
-
-
-
-
-
-// LOCALISATION STRINGS
-
-//d:Caption in application shell list
-//l:list_single_large_graphic_pane_1
-//
-#define qtn_apps_udict_list "User Dictionary"
-
-//d:Caption in application shell grid
-//l:cell_app_pane_1
-//
-#define qtn_apps_udict_grid "User Dict."
-
-//d:Title pane text of the User Dictionary
-//l:title_pane_1
-//
-#define qtn_udict_title_user_dictionary "User Dictionary"
-
-//d:Menu item, editing a focused word.
-//l:list_single_popup_menu_pane_1
-//
-#define qtn_udict_options_open "Open"
-
-//d:Menu item, registering a new word.
-//l:list_single_popup_menu_pane_1
-//
-#define qtn_udict_options_new "New Word"
-
-//d:Menu item, deleting a focused word or marked words.
-//l:list_single_popup_menu_pane_1
-//
-#define qtn_udict_options_delete "Delete"
-
-//d:Prompt text for a query, deleting a focused word or only one marked word.
-//d:Operation is confirmed with this info note.
-//l:popup_note_window_1
-//
-#define qtn_udict_note_delete_word "Delete word?"
-
-//d:Prompt text for a query, deleting marked words.
-//d:Operation is confirmed with this info note.
-//d:%N is the number of marked words.
-//l:popup_note_window_1
-//
-#define qtn_udict_note_delete_words "Delete %N words?"
-
-//d:Prompt text for a word query in the user dictionary editor.
-//l:list_double_pane_1
-//
-#define qtn_udict_lbl_word "Word"
-
-//d:Prompt text for a reading query in the user dictionary editor.
-//l:list_double_pane_1
-//
-#define qtn_udict_lbl_reading "Reading"
-
-//d:Information message for saving error.
-//d:The message is shown when the word is already registered.
-//l:popup_note_window_1
-//
-#define qtn_udict_info_already_registd "Already Registered"
-
-//d:Information message for saving error.
-//d:The message is shown when the first character of the reading is invalid.
-//l:popup_note_window_1
-//
-#define qtn_udict_info_invalid_1stchar "Invalid first character"
-
-//d:Information message for saving error.
-//d:The message is shown when the User dictionary has no space to register.
-//l:popup_note_window_1
-//
-#define qtn_udict_info_memory_full "User dictionary full. Delete some data in User dictionary."
-
-//d: Text in middle soft key
-//d: This text is shown when there is no registration in User dictionary.
-//l: control_pane_t3
-//w:
-//r:3.2
-#define qtn_msk_newword "New word"
-
-// End of File
--- a/userdict/rom/userdict_Variant.iby Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: userdict application IBY file.
-*
-*/
-
-
-
-
-
-#ifndef __USERDICT_VARIANT_IBY__
-#define __USERDICT_VARIANT_IBY__
-
-#ifdef __JAPANESE
-
-///////////////////////////////////////////////////////////////////////////////
-// Application binaries
-S60_APP_EXE(UserDict)
-
-///////////////////////////////////////////////////////////////////////////////
-// Application information resource
-S60_APP_AIF_RSC(UserDict)
-
-///////////////////////////////////////////////////////////////////////////////
-// Application Icons
-S60_APP_AIF_ICONS(UserDict)
-
-///////////////////////////////////////////////////////////////////////////////
-// UserDict embeded ECOM plugin
-ECOM_PLUGIN(userdict.dll,101F86A9.rsc)
-
-///////////////////////////////////////////////////////////////////////////////
-// Application resouce file
-#define USER_APP_RESOURCE_LOCALIZED UserDict
-#include <Variant/localized_resources.iby>
-
-#endif // __JAPANESE
-
-#endif // __USERDICT_IBY__
--- a/userdict/src/UdictApp.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Application class.
-*
-*/
-
-
-
-
-
-
-// INCLUDE FILES
-#include "UdictApp.h"
-#include "UdictDocument.h"
-#include <ecom.h>
-#include <implementationproxy.h>
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictApp::AppDllUid
-// Returns application UID
-// -----------------------------------------------------------------------------
-//
-TUid CUserDictApp::AppDllUid() const
- {
- return KUidUserDict;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictApp::CreateDocumentL
-// Creates CUserDictDocument object
-// -----------------------------------------------------------------------------
-//
-CApaDocument* CUserDictApp::CreateDocumentL()
- {
- return CUserDictDocument::NewL(*this);
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// NewApplication
-// Constructs CUserDictApp
-// -----------------------------------------------------------------------------
-//
-LOCAL_C CApaApplication* NewApplication()
- {
- return new CUserDictApp;
- }
-
-// -----------------------------------------------------------------------------
-// E32Dll
-// Entry point function for SymbianOS ECom plugin
-// Returns: KErrNone: No error
-// -----------------------------------------------------------------------------
-//
-#ifndef EKA2
-GLDEF_C TInt E32Dll()
- {
- return KErrNone;
- }
-#endif
-
-LOCAL_D const TImplementationProxy ImplementationTable[]=
- {
- IMPLEMENTATION_PROXY_ENTRY(0x101F8645, NewApplication)
- };
-
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
- {
- aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]);
- return ImplementationTable;
- }
-
-
-// End of File
--- a/userdict/src/UdictAppExe.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Application class.
-*
-*/
-
-
-
-
-
-
-// INCLUDE FILES
-#include <e32std.h>
-#include <eikstart.h>
-
-const TUid KTAppEmbeddableUid = {0x101F8645}; //use original UID of app (before it was converted from app to exe)
-
-GLDEF_C TInt E32Main()
- {
- return EikStart::RunApplication(KTAppEmbeddableUid);
- }
--- a/userdict/src/UdictAppUi.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Application UI class.
-*
-*/
-
-
-
-
-
-
-// INCLUDE FILES
-#include "UdictAppUi.h"
-#include "UdictView.h"
-#include "UdictDocument.h"
-#include "UdictModel.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictAppUi::CUserDictAppUi
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CUserDictAppUi::CUserDictAppUi()
- {
- }
-
-// Destructor
-CUserDictAppUi::~CUserDictAppUi()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictAppUi::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CUserDictAppUi::ConstructL()
- {
- BaseConstructL(EAknEnableSkin | EAknEnableMSK);
- CUserDictView* view = CUserDictView::NewLC(
- static_cast<CUserDictDocument*>(Document())->Model());
-
- AddViewL(view); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // view
-
- SetDefaultViewL(*view);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictAppUi::HandleCommandL
-// -----------------------------------------------------------------------------
-//
-void CUserDictAppUi::HandleCommandL(TInt aCommand)
- {
- switch (aCommand)
- {
- case EEikCmdExit:
- Exit();
- break;
- default:
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictAppUi::HandleScreenDeviceChangedL
-// -----------------------------------------------------------------------------
-//
-void CUserDictAppUi::HandleScreenDeviceChangedL()
- {
- CAknViewAppUi::HandleScreenDeviceChangedL();
- CEikAppUi::HandleScreenDeviceChangedL();
- const TUid KViewId = {1}; // UID of View
- CAknView* view = View(KViewId);
- if (view)
- {
-
- static_cast<CUserDictView*>(view)->HandleClientRectChange();
- }
- }
-
-// End of File
--- a/userdict/src/UdictContainer.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary View Container control.
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "UdictContainer.h"
-#include "UdictContainer.inl"
-#include "UdictView.h"
-#include "UdictModel.h"
-#include "UdictModel.inl"
-#include "UdictApp.h"
-#include "UserDict.hrh"
-#include "udict.hlp.hrh"
-#include <UserDict.rsg>
-#include <aknconsts.h>
-#include <aknlists.h>
-#include <eikclbd.h>
-#include <AknIconArray.h>
-#include <avkon.mbg>
-#include <AknWaitNoteWrapper.h>
-#include <eikmenub.h>
-#include <gulicon.h>
-#include <AknIconUtils.h>
-
-// CONSTANTS
-const TInt KGulIconGranurality(10);
-const TInt KWaitNoteOneStepDeletion(20);
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::CUserDictContainer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CUserDictContainer::CUserDictContainer(
- CUserDictModel& aModel,
- CAknView& aView)
-:iModel(aModel), iView(aView), iWaitNoteCounter(-1)
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CUserDictContainer::ConstructL()
- {
- CreateWindowL();
-
- iListBox = new (ELeave) CAknSingleStyleListBox;
- iListBox->SetContainerWindowL(*this);
- iListBox->ConstructL(this, EAknListBoxMarkableList);
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
- iModel.InitListL();
- iListBox->Model()->SetItemTextArray(iModel.List());
- iListBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
- SetGraphicIconL();
-
- // Here is NOT call ActivateL(), because the client size isn't set yet.
- // The caller of this ConstructL() must call ActivateL().
- }
-
-// Destructor
-CUserDictContainer::~CUserDictContainer()
- {
- delete iListBox;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::SetFocusL
-// -----------------------------------------------------------------------------
-//
-void CUserDictContainer::SetFocusL(TInt aIndex) const
- {
- AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(
- iListBox, aIndex, EFalse);
- DrawNow();
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::DeleteItemL
-// -----------------------------------------------------------------------------
-//
-void CUserDictContainer::DeleteItemL()
- {
- TInt count = iListBox->View()->SelectionIndexes()->Count();
- TInt index(iListBox->CurrentItemIndex());
- if (count > 0)
- {
- const CListBoxView::CSelectionIndexArray* selectionIndexes =
- iListBox->View()->SelectionIndexes();
- TKeyArrayFix key(0, ECmpTInt);
- const_cast<CListBoxView::CSelectionIndexArray*>(
- selectionIndexes)->Sort(key);
- iWaitNoteCounter = --count;
- ShowWaitNoteL();
- TInt selectionIndex;
- selectionIndexes->FindIsq(index, key, selectionIndex);
- // It sets the focused item index.
- // If the focused item has been removed, the focus goes to the next
- // item. Otherwise, the focus stays in there.
- SetFocusL(index - selectionIndex);
- }
- else
- {
- iModel.DeleteWordL(index);
- AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(
- iListBox, index, ETrue);
- DrawNow();
- }
- }
-
-// -----------------------------------------------------------------------------
-// void CUserDictContainer::SetGraphicIconL
-// -----------------------------------------------------------------------------
-//
-void CUserDictContainer::SetGraphicIconL()
- {
- // Creates gul icon.
- CArrayPtr<CGulIcon>* icons = new( ELeave ) CAknIconArray(
- KGulIconGranurality );
- CleanupStack::PushL(icons);
-
- // Appends icon.
- CreateIconAndAddToArrayL(icons, KAvkonBitmapFile,
- EMbmAvkonQgn_indi_marked_add, EMbmAvkonQgn_indi_marked_add_mask);
-
- // Sets graphics as ListBox icon.
- iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons);
-
- CleanupStack::Pop(); // icons
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::ShowWaitNoteL
-// -----------------------------------------------------------------------------
-//
-void CUserDictContainer::ShowWaitNoteL()
- {
- CAknWaitNoteWrapper* note = CAknWaitNoteWrapper::NewL();
- iModel.DelaySavingL();
- TRAPD(err, note->ExecuteL(R_UDICT_WAIT_NOTE, *this));
- delete note;
- iModel.SaveNowL();
- iWaitNoteCounter = -1;
- User::LeaveIfError(err);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::CreateIconAndAddToArrayL
-// Creates the icon and adds it to the array if it was successful
-// -----------------------------------------------------------------------------
-void CUserDictContainer::CreateIconAndAddToArrayL(CArrayPtr<CGulIcon>*& aIconsArray,
- const TDesC& aIconFile,
- TInt aBitmap, TInt aMask/* = -1*/)
- {
- CGulIcon* icon = CGulIcon::NewLC();
- CFbsBitmap* bitmap = NULL;
- CFbsBitmap* mask = NULL;
- if (aMask >= 0)
- {
- AknIconUtils::CreateIconL( bitmap, mask, aIconFile, aBitmap, aMask);
- }
- else
- {
- bitmap = AknIconUtils::CreateIconL( aIconFile, aBitmap);
- }
-
- if (bitmap)
- {
- icon->SetBitmap(bitmap);
- if (mask)
- icon->SetMask(mask);
- aIconsArray->AppendL(icon);
- CleanupStack::Pop(icon);
- }
- else
- {
- CleanupStack::PopAndDestroy(icon);
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::SizeChanged()
-// Called by framework when the view size is changed
-// -----------------------------------------------------------------------------
-//
-void CUserDictContainer::SizeChanged()
- {
- iListBox->SetRect(Rect());
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::CountComponentControls
-// From CCoeControl
-// -----------------------------------------------------------------------------
-//
-TInt CUserDictContainer::CountComponentControls() const
- {
- return 1; // return a number of controls inside this container
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::ComponentControl
-// From CCoeControl
-// -----------------------------------------------------------------------------
-//
-CCoeControl* CUserDictContainer::ComponentControl(TInt aIndex) const
- {
- switch (aIndex)
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::OfferKeyEventL
-// From CCoeControl
-// -----------------------------------------------------------------------------
-//
-TKeyResponse CUserDictContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- TKeyResponse res(EKeyWasNotConsumed);
-
- if (aType == EEventKeyDown
- && IsFocused())
- {
- // If user pushes some digit key, it starts the User dictionary editor.
- TChar key(aKeyEvent.iScanCode);
- if (key.IsDigit())
- {
- iView.HandleCommandL(EUserDictCmdNewWord);
- res = EKeyWasConsumed;
- }
- }
- else if (aType == EEventKey)
- {
- switch (aKeyEvent.iCode)
- {
- case EKeyBackspace:
- if (iModel.List()->MdcaCount() > 0)
- {
- iView.HandleCommandL(EUserDictCmdDelete);
- res = EKeyWasConsumed;
- }
- break;
- case EKeyOK:
- if (iModel.List()->MdcaCount() <= 0
- || iListBox->View()->SelectionIndexes()->Count() > 0)
- {
- // It shows context sensitive menu.
- CEikMenuBar* menuBar = iView.MenuBar();
- menuBar->SetMenuTitleResourceId(
- R_UDICT_MENUBAR_VIEW_CONTEXT);
- menuBar->TryDisplayMenuBarL();
- menuBar->SetMenuTitleResourceId(
- R_UDICT_MENUBAR_VIEW);
- }
- else
- {
- iView.HandleCommandL(EUserDictCmdOpen);
- }
- res = EKeyWasConsumed;
- break;
- default:
- break;
- }
- }
-
- if (res != EKeyWasConsumed && iListBox)
- {
- res = iListBox->OfferKeyEventL(aKeyEvent, aType);
- }
-
- return res;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::GetHelpContext
-// -----------------------------------------------------------------------------
-//
-void CUserDictContainer::GetHelpContext(TCoeHelpContext& aContext) const
- {
- aContext.iMajor = KUidUserDict;
- aContext.iContext = KUDICT_HLP;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::StepL
-// From MAknBackgroundProcess
-// -----------------------------------------------------------------------------
-void CUserDictContainer::StepL()
- {
- // Deletes the selected item in descending order of list index.
- for (TInt i(0); i < KWaitNoteOneStepDeletion && iWaitNoteCounter >= 0; i++)
- {
- iModel.DeleteWordL(
- (*iListBox->View()->SelectionIndexes())[iWaitNoteCounter]);
- iWaitNoteCounter--;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictContainer::IsProcessDone
-// From MAknBackgroundProcess
-// Tests if wait note process is done.
-// -----------------------------------------------------------------------------
-TBool CUserDictContainer::IsProcessDone() const
- {
- return (iWaitNoteCounter < 0) ? ETrue : EFalse;
- }
-
-// End of File
--- a/userdict/src/UdictDocument.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Document class.
-*
-*/
-
-
-
-
-
-
-// INCLUDE FILES
-#include "UdictDocument.h"
-#include "UdictAppUi.h"
-#include "UdictModel.h"
-#include <AknDoc.h>
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictDocument::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CUserDictDocument* CUserDictDocument::NewL(
- CEikApplication& aApp) // CUserDictApp reference
- {
- CUserDictDocument* self = new (ELeave) CUserDictDocument(aApp);
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(); // self
-
- return self;
- }
-
-// Destructor
-CUserDictDocument::~CUserDictDocument()
- {
- delete iModel;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictDocument::CUserDictDocument
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CUserDictDocument::CUserDictDocument(CEikApplication& aApp)
-: CAknDocument(aApp)
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictDocument::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CUserDictDocument::ConstructL()
- {
- iModel = CUserDictModel::NewL();
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictDocument::CreateAppUiL()
-// Constructs CUserDictAppUi
-// -----------------------------------------------------------------------------
-//
-CEikAppUi* CUserDictDocument::CreateAppUiL()
- {
- return new (ELeave) CUserDictAppUi();
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictDocument::Model()
-// Returns CUserDictModel object.
-// -----------------------------------------------------------------------------
-//
-CUserDictModel& CUserDictDocument::Model() const
- {
- return *iModel;
- }
-
-// End of File
--- a/userdict/src/UdictElement.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class represents an element of Japanese user dictionary
-* for Japanese FEP.
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "UdictElement.h"
-
-// CONSTANTS
-_LIT(KListSeparator, "\t");
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// TUDictElement::TUDictElement
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TUDictElement::TUDictElement()
-:iWord(KListSeparator), iReading(KNullDesC)
- {
- }
-
-// -----------------------------------------------------------------------------
-// TUDictElement::Word
-// -----------------------------------------------------------------------------
-//
-TPtrC TUDictElement::Word() const
- {
- // Omits the head ListBox's separator character in the word buffer.
- return iWord.Mid(1);
- }
-
-// -----------------------------------------------------------------------------
-// TUDictElement::Reading
-// -----------------------------------------------------------------------------
-//
-TPtrC TUDictElement::Reading() const
- {
- return iReading;
- }
-
-// -----------------------------------------------------------------------------
-// TUDictElement::SetWord
-// -----------------------------------------------------------------------------
-//
-void TUDictElement::SetWord(TDesC& aWord)
- {
- // Sets a ListBox's item separator in head.
- iWord = KListSeparator;
- iWord.Append(aWord);
- }
-
-// -----------------------------------------------------------------------------
-// TUDictElement::SetWord
-// -----------------------------------------------------------------------------
-//
-void TUDictElement::SetWord(TDesC& aWord, TDesC& aReading)
- {
- SetWord(aWord);
- SetReading(aReading);
- }
-
-// End of File
--- a/userdict/src/UdictFrm.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,302 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary's editor form.
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "UdictFrm.h"
-#include "UdictView.h"
-#include "UdictElement.h"
-#include "UserDict.hrh"
-#include <UserDict.rsg>
-#include <avkon.hrh>
-#include <eikedwin.h>
-
-// CONSTANTS
-const TInt KNumOfInvalidFirstChar(12);
-const TText KInvalidFirstChars[KNumOfInvalidFirstChar] =
- {
- 0x3041, // small A
- 0x3043, // small I
- 0x3045, // small U
- 0x3047, // small E
- 0x3049, // small O
- 0x3063, // small TU
- 0x3083, // small YA
- 0x3085, // small YU
- 0x3087, // small YO
- 0x3092, // WO
- 0x3093, // N
- 0x30fc // prolonged sound mark
- };
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CUserDictForm* CUserDictForm::NewL(const TUDictElement& aItem,
- CUserDictView& aView)
- {
- CUserDictForm* self = new(ELeave) CUserDictForm(aItem, aView);
-
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(); // self
-
- return self;
- }
-
-// Destructor
-CUserDictForm ::~CUserDictForm ()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::CUserDictForm
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CUserDictForm::CUserDictForm(const TUDictElement& aItem, CUserDictView& aView)
-:iInitEntry(aItem), iView(aView)
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CUserDictForm::ConstructL()
- {
- CAknForm::ConstructL();
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::SaveL
-// -----------------------------------------------------------------------------
-//
-TBool CUserDictForm::SaveL()
- {
- TBool res(ETrue);
-
- TUDictElement entry;
- GetData(entry);
- if (entry != iInitEntry)
- {
- if (IsValidReadingL(entry))
- {
- TRAPD(err, iView.SaveL(entry, iInitEntry));
- switch (err)
- {
- case KErrDiskFull: // No space to register
- iView.ShowInformationNoteL(
- R_UDICT_INFO_MEMORY_FULL_MESSAGE);
- // if it's a new entry, returns EFalse
- res = (iInitEntry.IsEmpty()) ? EFalse : ETrue;
- break;
- case KErrAlreadyExists: // Already registered
- iView.ShowInformationNoteL(R_UDICT_ALREADY_REG_MESSAGE);
- res = EFalse;
- break;
- default:
- User::LeaveIfError(err);
- }
- }
- else
- {
- TryChangeFocusToL(EUserDictReadingEdwin);
- static_cast<CEikEdwin*>(
- Control(EUserDictReadingEdwin))->SetCursorPosL(0, EFalse);
- res = EFalse;
- }
- }
- return res;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::GetData
-// -----------------------------------------------------------------------------
-//
-void CUserDictForm::GetData(TUDictElement& aEntry) const
- {
- CPlainText* text =
- static_cast<CEikEdwin*>(Control(EUserDictWordEdwin))->Text();
- TInt docLen = text->DocumentLength();
- if (docLen > EUseDictWordBuffer)
- {
- docLen = EUseDictWordBuffer;
- }
- TPtrC word(static_cast<CEikEdwin*>(
- Control(EUserDictWordEdwin))->Text()->Read(0, docLen));
- aEntry.SetWord(word);
- text = static_cast<CEikEdwin*>(Control(EUserDictReadingEdwin))->Text();
- TPtrC reading(text->Read(0, text->DocumentLength()));
- aEntry.SetReading(reading);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::SetDataL
-// -----------------------------------------------------------------------------
-//
-void CUserDictForm::SetDataL() const
- {
- TPtrC ptrWord(iInitEntry.Word());
- static_cast<CEikEdwin*>(
- Control(EUserDictWordEdwin))->SetTextL(&ptrWord);
- TPtrC ptrReading(iInitEntry.Reading());
- static_cast<CEikEdwin*>(
- Control(EUserDictReadingEdwin))->SetTextL(&ptrReading);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::IsBlank
-// -----------------------------------------------------------------------------
-//
-TBool CUserDictForm::IsBlank() const
- {
- return (((static_cast<CEikEdwin*>(
- Control(EUserDictWordEdwin))->TextLength() <= 0)
- || (static_cast<CEikEdwin*>(
- Control(EUserDictReadingEdwin))->TextLength() <= 0)
- ) ? ETrue : EFalse);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::IsValidReadingL
-// -----------------------------------------------------------------------------
-//
-TBool CUserDictForm::IsValidReadingL(const TUDictElement& aItem) const
- {
- TBool valid(ETrue);
- const TDesC& reading = aItem.Reading();
- if (reading.Length() <= 0)
- return EFalse;
-
- // If the reading has a invalid first character,
- // it shows the information note.
- for (TInt i(0); i < KNumOfInvalidFirstChar && valid; i++)
- {
- if (reading[0] == KInvalidFirstChars[i])
- {
- iView.ShowInformationNoteL(R_UDICT_INVALID_1STCHAR_MESSAGE);
- valid = EFalse;
- }
- }
-
- return valid;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::PreLayoutDynInitL
-// From CEikDialog
-// -----------------------------------------------------------------------------
-//
-void CUserDictForm::PreLayoutDynInitL()
- {
- SetDataL();
- // if the form edits a new word, "Done" softkey is hidden.
- if (iInitEntry.IsEmpty())
- {
- ButtonGroupContainer().SetCommandSetL( R_UDICT_SOFTKEYS_EMPTY_CANCEL_EMPTY );
- ButtonGroupContainer().DrawNow();
- iSoftkeyResource = R_UDICT_SOFTKEYS_EMPTY_CANCEL_EMPTY;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::OkToExitL
-// From CEikDialog
-// -----------------------------------------------------------------------------
-//
-TBool CUserDictForm::OkToExitL(TInt aKeycode)
- {
- TBool ret = ETrue;
- switch (aKeycode)
- {
- case EAknSoftkeyDone:
- ret = SaveL();
- break;
- case EAknSoftkeyEmpty:
- ret = EFalse;
- break;
- case EAknSoftkeyCancel:
- default:
- break;
- }
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::HandleControlStateChangeL
-// From MCoeControlObserver
-// -----------------------------------------------------------------------------
-//
-void CUserDictForm::HandleControlStateChangeL(TInt aControlId)
- {
- // If the entry fields are blank, "Done" softkey is hidden.
- if (aControlId == EUserDictWordEdwin
- || aControlId == EUserDictReadingEdwin)
- {
- TUint res = 0;
- if (IsBlank())
- {
- res = R_UDICT_SOFTKEYS_EMPTY_CANCEL_EMPTY;
- }
- else
- {
- res = R_UDICT_SOFTKEYS_DONE_CANCEL_DONE;
- }
- if (iSoftkeyResource != res)
- {
- ButtonGroupContainer().SetCommandSetL( res );
- ButtonGroupContainer().DrawDeferred();
- iSoftkeyResource = res;
- }
- }
- CAknForm::HandleControlStateChangeL(aControlId);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictForm::OfferKeyEventL
-// From CCoeControl
-// -----------------------------------------------------------------------------
-//
-TKeyResponse CUserDictForm::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,TEventCode aType)
- {
- TKeyResponse res(EKeyWasConsumed);
- if (aType == EEventKey && aKeyEvent.iCode == EKeyOK)
- {
- if (aKeyEvent.iRepeats <= 0 && !IsBlank())
- {
- TryExitL(EAknSoftkeySelect);
- }
- }
- else
- {
- res = CAknForm::OfferKeyEventL(aKeyEvent, aType);
- }
- return res;
- }
-
-// End of File
--- a/userdict/src/UdictModel.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary Model class.
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "UdictModel.h"
-#include "UdictModel.inl"
-#include <PtiEngine.h>
-
-// CONSTANTS
-const TInt KItemListGranularity(8);
-_LIT(KPanicCatModel, "UserDictModel");
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CUserDictModel* CUserDictModel::NewL()
- {
- CUserDictModel* self = new(ELeave) CUserDictModel;
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
- }
-
-// Destructor
-CUserDictModel::~CUserDictModel()
- {
- delete iItemList;
- delete iPtiEngine;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::AddNewWordL
-// -----------------------------------------------------------------------------
-//
-TInt CUserDictModel::AddNewWordL(const TUDictElement& aItem)
- {
- User::LeaveIfError(IsDictionaryFull() ? KErrDiskFull : KErrNone);
-
- // Checks the word list if the entry is not registered to it.
- TInt index(0);
- TWordListKey key;
- if (iItemList->Count() > 0 && !iItemList->FindIsq(aItem, key, index))
- {
- User::Leave(KErrAlreadyExists);
- }
-
- // Adds a new entry to the User dictionary.
- User::LeaveIfError(
- iPtiEngine->AddUserDictionaryEntry(const_cast<TUDictElement&>(aItem)));
-
- // Adds a new entry to the registered word list.
- iItemList->InsertL(index, aItem);
-
- return index;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::DeleteWordL
-// -----------------------------------------------------------------------------
-//
-void CUserDictModel::DeleteWordL(TInt aIndex)
- {
- ReloadDictInfoL();
- const TUDictElement& item = ListItem(aIndex);
-
- // Removes the entry from the User dictionary.
- TInt err(iPtiEngine->RemoveEntryFromUserDictionary(
- const_cast<TUDictElement&>(item)));
- // KErrNotFound means the entry is incorrect. It should be ASSERT.
- __ASSERT_ALWAYS(err != KErrNotFound, User::Panic(KPanicCatModel, err));
-
- // Removes the entry from the registered word list.
- iItemList->Delete(aIndex);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::ModifyWordL
-// -----------------------------------------------------------------------------
-//
-TInt CUserDictModel::ModifyWordL(TInt aIndex, const TUDictElement& aItem)
- {
- TInt index = AddNewWordL(aItem);
- if (index <= aIndex)
- {
- DeleteWordL(aIndex + 1);
- }
- else
- {
- DeleteWordL(aIndex);
- index--;
- }
- return index;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::InitListL
-// -----------------------------------------------------------------------------
-//
-void CUserDictModel::InitListL()
- {
- iItemList->Reset();
-
- TUDictElement entry;
- TInt i(0);
- // Copies the User dictionary entries to iItemList.
- while (iPtiEngine->GetUserDictionaryEntry(i, entry) == KErrNone)
- {
- iItemList->AppendL(entry);
- i++;
- }
-
- // Sorts the word list by Unicode collation algorithm.
- TWordListKey key;
- iItemList->Sort(key);
-
- SetChangeNotice(EFalse);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::CUserDictModel
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CUserDictModel::CUserDictModel()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CUserDictModel::ConstructL()
- {
- iPtiEngine = CPtiEngine::NewL(ETrue);
- User::LeaveIfError(
- iPtiEngine->ActivateLanguageL(ELangJapanese, EPtiEngineHiraganaKanji));
- iDictionary =
- iPtiEngine->DefaultUserDictionary(EPtiEngineHiraganaKanji);
- User::LeaveIfNull(iDictionary);
-
- iItemList = new (ELeave) CUserDictList(KItemListGranularity);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::TWordListKey::TWordListKey
-// -----------------------------------------------------------------------------
-//
-CUserDictModel::TWordListKey::TWordListKey()
-:TKeyArrayFix(0, ECmpCollated)
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::TWordListKey::Compare
-// -----------------------------------------------------------------------------
-//
-TInt CUserDictModel::TWordListKey::Compare(TInt aLeft,TInt aRight) const
- {
- TUDictElement* left = static_cast<TUDictElement*>(At(aLeft));
- TUDictElement* right = static_cast<TUDictElement*>(At(aRight));
-
- TInt res(left->Reading().CompareC(right->Reading()));
- if (res == 0)
- {
- res = left->Word().CompareC(right->Word());
- }
- return res;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::MdcaCount
-// -----------------------------------------------------------------------------
-//
-TInt CUserDictModel::MdcaCount() const
- {
- return iItemList->Count();
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictModel::MdcaPoint
-// -----------------------------------------------------------------------------
-//
-TPtrC16 CUserDictModel::MdcaPoint(TInt aIndex) const
- {
- TPtrC16 ptr(iItemList->At(aIndex).ListItemText());
- return ptr;
- }
-
-// End of File
--- a/userdict/src/UdictView.cpp Mon Jan 18 20:09:32 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,548 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Japanese user dictionary View class.
-*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include <bldvariant.hrh>
-#include "UdictApp.h"
-#include "UdictView.h"
-#include "UdictModel.h"
-#include "UdictModel.inl"
-#include "UdictContainer.h"
-#include "UdictContainer.inl"
-#include "UdictFrm.h"
-#include "UserDict.hrh"
-#include <UserDict.rsg>
-#include <aknViewAppUi.h>
-#include <aknmessagequerydialog.h>
-#include <StringLoader.h>
-#include <eikmenub.h>
-#include <featmgr.h>
-#include <hlplch.h>
-#include <aknnotewrappers.h>
-#include <w32std.h>
-
-// CONSTANTS
-const TUid KViewId = {1}; // UID of View
-const TInt KMessageBuffSize(64);
-#if defined(_DEBUG)
-_LIT(KPanicCatView, "UserDictView");
-#endif
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CUserDictView::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CUserDictView* CUserDictView::NewLC(CUserDictModel& aModel)
- {
- CUserDictView* self = new (ELeave) CUserDictView(aModel);
- CleanupStack::PushL(self);
- self->ConstructL();
-
- return self;
- }
-
-// Destructor
-CUserDictView::~CUserDictView()
- {
- if (iContainer)
- {
- AppUi()->RemoveFromViewStack(*this, iContainer);
- delete iContainer;
- }
- delete iIdle;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::SaveL
-// Saves the changes of the element and updates ListBox.
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::SaveL(
- const TUDictElement& aNewItem, const TUDictElement& aOldItem) const
- {
-#if defined(_DEBUG)
- __ASSERT_DEBUG(!aNewItem.IsEmpty(),
- User::Panic(KPanicCatView, KErrCorrupt));
-#endif
- TInt index(iContainer ? iContainer->ListBox()->CurrentItemIndex() : 0);
- if (aOldItem.IsEmpty())
- {
- index = iModel.AddNewWordL(aNewItem);
- }
- else
- {
- index = iModel.ModifyWordL(index, aNewItem);
- }
-
-#ifdef RD_PF_SEC_APPARC
- if (iEmbedded)
-#else
- if (AppUi()->ContainerAppUi())
-#endif
- {
- iModel.SetChangeNotice(ETrue);
- }
-
- if (iContainer)
- {
- iContainer->SetFocusL(index);
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::ShowInformationNoteL
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::ShowInformationNoteL(TInt aResourceId) const
- {
- TBuf<KMessageBuffSize> message;
- iCoeEnv->ReadResource(message, aResourceId);
- CAknInformationNote* note = new(ELeave) CAknInformationNote();
- note->ExecuteLD(message);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::CUserDictView
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CUserDictView::CUserDictView(CUserDictModel& aModel)
-:iModel(aModel)
- {
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::ConstructL()
- {
- BaseConstructL(R_UDICT_VIEW);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::ShowDeleteConfQueryL
-// Shows delete confirmation query.
-// -----------------------------------------------------------------------------
-//
-TInt CUserDictView::ShowDeleteConfQueryL(TInt aCount) const
- {
- TInt ret(0);
- if (aCount <= 1)
- {
- CAknQueryDialog* dialog = CAknQueryDialog::NewL();
- ret = dialog->ExecuteLD(R_UDICT_DELETE_QUERY);
- }
- else
- {
- HBufC* message = StringLoader::LoadL(
- R_UDICT_DELETE_QUERY_MESSAGE, aCount, iCoeEnv);
- CleanupStack::PushL(message);
- CAknQueryDialog* dialog = CAknQueryDialog::NewL();
- ret = dialog->ExecuteLD(R_UDICT_DELETE_QUERY, *message);
- CleanupStack::PopAndDestroy(); // message
- }
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::ShowEditorFormL
-// Shows user dictionary editor form.
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::ShowEditorFormL(const TUDictElement& item)
- {
- CUserDictForm* form = CUserDictForm::NewL(item, *this);
- form->ExecuteLD(R_UDICT_DIALOG_EDIT);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::UpdateListL
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::UpdateListL()
- {
- iModel.InitListL();
- TInt index(iContainer->ListBox()->CurrentItemIndex());
- iContainer->SetFocusL(
- (iModel.List()->MdcaCount() > 0 && index < 0) ? 0 : index);
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::RegisterByAnotherApp
-// iIdle's call back function
-// -----------------------------------------------------------------------------
-//
-TInt CUserDictView::RegisterByAnotherApp(TAny* aView)
- {
- static_cast<CUserDictView*>(aView)->DoRegisterByAnotherApp();
- return 0;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::DoRegisterByAnotherApp
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::DoRegisterByAnotherApp()
- {
- iIdle->Cancel();
-
- // If HandleCommandL() leaves, this application can't exit.
- // So, it needs to be trapped.
- TRAP_IGNORE(HandleCommandL(EUserDictCmdNewWord));
-
-#ifdef RD_PF_SEC_APPARC
- // In case RD_PF_SEC_APPARC, CEikAppui::Exit()
- // CEikAppui::Exit() always leave :Leave code = KLeaveExit(-1003)
- // KLeaveExit should be not trapped. So Exit() is called directly.
- AppUi()->Exit();
-#else
- // CEikAppui::Exit() must leave, at that time,
- // this iIdle has deleted already.
- // So, it needs to be trapped.
- TRAP_IGNORE(AppUi()->HandleCommandL(EEikCmdExit));
-#endif
- }
-
-// -----------------------------------------------------------------------------
-// TUid CUserDictView::Id
-// From CAknView
-// -----------------------------------------------------------------------------
-//
-TUid CUserDictView::Id() const
- {
- return KViewId;
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::HandleCommandL
-// From CAknView
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::HandleCommandL(TInt aCommand)
- {
- switch (aCommand)
- {
- case EAknSoftkeyExit:
- AppUi()->HandleCommandL(EEikCmdExit);
- break;
- case EUserDictCmdOpen:
- {
- if (iModel.List()->MdcaCount() <= 0
- || iContainer->ListBox()->View()->SelectionIndexes()->Count() > 0)
- {
- // It shows context sensitive menu.
- CEikMenuBar* menuBar = MenuBar();
- menuBar->SetMenuTitleResourceId(
- R_UDICT_MENUBAR_VIEW_CONTEXT);
- menuBar->TryDisplayMenuBarL();
- menuBar->SetMenuTitleResourceId(
- R_UDICT_MENUBAR_VIEW);
- }
- else
- {
- TUDictElement item(iModel.ListItem(
- iContainer->ListBox()->CurrentItemIndex()));
- ShowEditorFormL(item);
- // Show correct softkey
- ShowSoftkeyL();
- }
- }
- break;
- case EUserDictCmdNewWord:
- if (!iModel.IsDictionaryFull())
- {
- TUDictElement item;
- ShowEditorFormL(item);
- // Show correct softkey
- ShowSoftkeyL();
- }
- else
- {
- ShowInformationNoteL(R_UDICT_INFO_MEMORY_FULL_MESSAGE);
- }
- break;
- case EUserDictCmdDelete:
- // Forbids the list update in HandleForegroundL while deleting.
- iLockListUpdate = ETrue;
- if (ShowDeleteConfQueryL(
- iContainer->ListBox()->View()->SelectionIndexes()->Count()))
- {
- iContainer->DeleteItemL();
- }
- iLockListUpdate = EFalse;
- if (iModel.IsChangedByAnotherApp())
- {
- UpdateListL();
- }
- // Show correct softkey
- ShowSoftkeyL();
- break;
- case EAknCmdHelp:
- HlpLauncher::LaunchHelpApplicationL(
- iCoeEnv->WsSession(), AppUi()->AppHelpContextL());
- break;
- default:
- if (iContainer && iModel.List()->MdcaCount() > 0)
- {
- TInt previous = iContainer->ListBox()->View()->SelectionIndexes()->Count();
- AknSelectionService::HandleMarkableListProcessCommandL(
- aCommand, iContainer->ListBox());
- if (previous != iContainer->ListBox()->View()->SelectionIndexes()->Count())
- {
- // Show correct softkey
- ShowSoftkeyL();
- }
- }
- AppUi()->HandleCommandL(aCommand);
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::HandleClientRectChange
-// From CAknView
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::HandleClientRectChange()
- {
- if (iContainer)
- {
- iContainer->SetRect(ClientRect());
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::DoActivateL
-// From CAknView
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
-#ifdef RD_PF_SEC_APPARC
-
- iEmbedded = EFalse;
-
- RArray<RWsSession::TWindowGroupChainInfo> wgs;
- CleanupClosePushL( wgs );
- TInt err = iEikonEnv->WsSession().WindowGroupList(&wgs);
- if (err == KErrNone)
- {
- TInt wgId = iEikonEnv->RootWin().Identifier();
- TInt count = wgs.Count();
- for (TInt ii=0; ii < count; ii++)
- {
- const RWsSession::TWindowGroupChainInfo& info = wgs[ii];
- // find the window group id and check that it has no parent
- if (info.iId == wgId)
- {
- if (info.iParentId > 0)
- {
- iEmbedded = ETrue;
- }
- break;
- }
- }
- }
- wgs.Reset();
- CleanupStack::PopAndDestroy( &wgs );
-
- if (!iEmbedded)
- {
- // I'm standalone application
- iContainer = new(ELeave) CUserDictContainer(iModel, *this);
- iContainer->SetMopParent(this);
- iContainer->ConstructL();
- iContainer->SetRect(ClientRect());
- iContainer->ActivateL();
-
- AppUi()->AddToStackL(*this, iContainer);
- // Set context menu
- MenuBar()->SetContextMenuTitleResourceId
- ( R_UDICT_MENUBAR_VIEW_CONTEXT );
- }
- else
- {
- // embedded using window group chaining
- iIdle = CIdle::NewL(CActive::EPriorityIdle);
- // It calls CUserDictView::RegisterByAnotherApp()
- // after the activation of View finishes.
- iIdle->Start(TCallBack(RegisterByAnotherApp, this));
- }
-
-#else
-
- if (AppUi()->ContainerAppUi()) // started up by another application.
- {
- iIdle = CIdle::NewL(CActive::EPriorityIdle);
- // It calls CUserDictView::RegisterByAnotherApp()
- // after the activation of View finishes.
- iIdle->Start(TCallBack(RegisterByAnotherApp, this));
- }
- else if (!iContainer)
- {
- iContainer = new(ELeave) CUserDictContainer(iModel, *this);
- iContainer->SetMopParent(this);
- iContainer->ConstructL();
- iContainer->SetRect(ClientRect());
- iContainer->ActivateL();
-
- AppUi()->AddToStackL(*this, iContainer);
- }
-#endif //RD_PF_SEC_APPARC
-
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::DoDeactivate
-// From CAknView
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::DoDeactivate()
- {
- if (iContainer)
- {
- AppUi()->RemoveFromViewStack(*this, iContainer);
- delete iContainer;
- iContainer = NULL;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::HandleForegroundEventL
-// From CAknView
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::HandleForegroundEventL(TBool aForeground)
- {
- CAknView::HandleForegroundEventL(aForeground);
-
- if (aForeground)
- {
- iModel.ReloadDictInfoL();
-
-#ifdef RD_PF_SEC_APPARC
- if (!iEmbedded
- && iModel.IsChangedByAnotherApp()
- && !iLockListUpdate)
-#else
- if (!AppUi()->ContainerAppUi()
- && iModel.IsChangedByAnotherApp()
- && !iLockListUpdate)
-#endif
- {
- // When the User dictionary data has been changed while the
- // application was running on background, it updates the ListBox.
- UpdateListL();
- }
- // Show correct softkey
- ShowSoftkeyL();
- }
- else if (iContainer && iContainer->IsFocused())
- {
- iLockListUpdate = EFalse;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::DynInitMenuPaneL
-// From MEikMenuObserver
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenu)
- {
- CAknView::DynInitMenuPaneL(aResourceId, aMenu);
- if (iContainer)
- {
- AknSelectionService::HandleMarkableListDynInitMenuPane(
- aResourceId, aMenu, iContainer->ListBox());
- }
- if (aResourceId == R_UDICT_APP_MENU)
- {
- if (iModel.List()->MdcaCount() == 0)
- {
- aMenu->DeleteMenuItem(EUserDictCmdOpen);
- aMenu->DeleteMenuItem(EUserDictCmdDelete);
- }
- if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
- {
- aMenu->DeleteMenuItem(EAknCmdHelp);
- }
- }
- else if (aResourceId == R_UDICT_APP_MENU_CONTEXT)
- {
- if (iModel.List()->MdcaCount() == 0)
- {
- aMenu->DeleteMenuItem(EUserDictCmdDelete);
- }
- else
- {
- aMenu->DeleteMenuItem(EUserDictCmdNewWord);
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// CUserDictView::ShowSoftkeyL
-// Show softkeys
-// -----------------------------------------------------------------------------
-//
-void CUserDictView::ShowSoftkeyL()
- {
-#ifdef RD_PF_SEC_APPARC
- if (iEmbedded)
-#else
- if (AppUi()->ContainerAppUi())
-#endif
- {
- Cba()->SetCommandSetL(R_UDICT_VIEW_CBA_SOFTKEY_EMPTY);
- }
- else
- {
- if (iModel.List()->MdcaCount() > 0)
- {
- if (iContainer->ListBox()->View()->SelectionIndexes()->Count() > 0)
- {
- // There is(are) the selected item(s)
- Cba()->SetCommandSetL(R_UDICT_VIEW_CBA_SOFTKEY_CONTEXTOPTIONS);
- }
- else
- {
- // There is no the selected item(s)
- Cba()->SetCommandSetL(R_UDICT_VIEW_CBA_SOFTKEY_OPEN);
- }
- }
- else
- {
- Cba()->SetCommandSetL(R_UDICT_VIEW_CBA_SOFTKEY_NEWWORD);
- }
- }
- Cba()->DrawNow();
- }
-
-// End of File