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

📄 index.html

📁 symbian OS中关于文本编辑功能的实现
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Rich Text Editor Example</title><link href="style.css" rel="stylesheet" type="text/css"></head><table border="0" width="100%" height="8" bgcolor="#eeeeee"><tr> <td width="100%" height="1"><b><font size="2" color="#000000" face="Arial, Helvetica, sans-serif"><strong><a name=Top></a>S60 5th Edition SDK for Symbian OS </strong></font></b><br><i>Example Applications Guide</i></td></tr> </table><!-- Generated by Doxygen 1.4.5 --><div class="tabs">  <ul>    <li id="current"><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="annotated.html"><span>Classes</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>  </ul></div><h1>Rich Text Editor Example</h1><p><a class="el" href="index.html#Intro_sec">1. About this Example</a> <br><a class="el" href="index.html#Arch_sec">2. Architecture</a> <br><a class="el" href="index.html#Design_sec">3. Design and Implementation</a><p><hr><h2><a class="anchor" name="Intro_sec">1. About this Example</a></h2>Rich Text Editor example demonstrates the usage of Rich Text Editor. Most of the features are handled automatically when the dialog framework creates the editor. However, some steps, such as inserting an image, setting the text input type, or showing the scroller require the use of methods or classes.<h3><a class="anchor" name="Sub11">1.1 APIs demonstrated</a></h3><ul><li>CEikRichTextEditor</li><li>CFbsBitmap</li><li>TPictureHeader</li><li>CPicture</li></ul><h3><a class="anchor" name="Sub12">1.2 Prerequisites</a></h3>Symbian C++ basics<h3><a class="anchor" name="Sub13">1.3 Running this example</a></h3>Start the application. An editor opens. Select any part of the text: press and hold the Edit key while moving the scroller key to left or right. The selected text is highlighted. You can select various formatting options from the Options menu (character format, color, alignment and font).<h2><a class="anchor" name="Arch_sec">2. Architecture</a></h2>RichTextEditor example follows traditional Symbian OS Control-based architecture.<h2><a class="anchor" name="Design_sec">3. Design and Implementation</a></h2>CEikRichTextEditor is the main class used in this example, which is an edit window that supports rich text, including embedded objects represented either by icons or glass doors. <a class="el" href="class_c_r_t_e_container.html">CRTEContainer</a> contains CEikRichTextEditor. The basic features are handled by CEikRichTextEditor API.<p>Another important class <a class="el" href="class_c_my_picture.html">CMyPicture</a>, which is used to insert the picture in the editor window.This class contains the CFbsBitmap class, which is reference to bitmap data.<h3><a class="anchor" name="Sub31">3.1 Capabilities</a></h3>The program capabilities are defined in the <a class="el" href="_rich_text_editor___s60__3rd___ed_8mmp-source.html">RichTextEditor_S60_3rd_Ed.mmp</a> file: CAPABILITY NONE<h3><a class="anchor" name="Sub32">3.2 Features</a></h3>The main features of Rich text editor are as follows<p><ul><li><b>Character Format</b> <br>This feature enables the user to select the font style, The APIs which implements the character format are <a class="el" href="class_c_r_t_e_container.html#061e324637a0ecbb00f0c822194240f2">CRTEContainer::SetFont()</a> and <a class="el" href="class_c_r_t_e_container.html#10f4269acf9d1c486ce5706181f08f38">CRTEContainer::Strike()</a>. The following options can be selected for character formats.<ul><li>Bold</li><li>Italic</li><li>Underline</li><li>Strike-through</li></ul></li><li><a class="el" href="class_c_r_t_e_container.html#1c8ce06002012052d2e246a981f4654f">Change Color </a> <br>This feature allows user to specify the color of the text. The parameter of type <b>Trgb</b> indicates the color id:<ul><li>Red</li><li>Green</li><li>Blue</li><li>Black</li></ul></li><li><a class="el" href="class_c_r_t_e_container.html#618ba05ed3587bd0f47307bde788917b">Set Alignment </a> <br>This feature enables user to select the text alignment in the text editor. The parameter of type <b>CParaFormat::TAlignment</b> indicates the alignment:<ul><li>Left</li><li>Centre</li><li>Right</li></ul></li><li><a class="el" href="class_c_r_t_e_container.html#f4477c67c39e9068cf4faf48987050fe">Demo Text </a> <br>This feature is to Create Demo Text Content, there is also demonstration of picture insertion which is implemented by user defined class <a class="el" href="class_c_my_picture.html">CMyPicture</a>, which handles the picture insertion in the editor.</li></ul><h3><a class="anchor" name="Sub33">3.3 MMP Files</a></h3>This example is compatible with following S60 platforms<ul><li>S60 3rd Edition</li><li>S60 2nd Edition</li><li>S60 1st Edition <br> <br>Hence provided with two MMP files.</li><li>The MMP file for S60 1st Edition and S60 2nd Edition is: <a class="el" href="_rich_text_editor_8mmp-source.html">RichTextEditor.mmp</a></li><li>The MMP file for S60 3rd Edition is: <a class="el" href="_rich_text_editor___s60__3rd___ed_8mmp-source.html">RichTextEditor_S60_3rd_Ed.mmp</a> </li></ul><hr><table x-use-null-cells		style="x-cell-content-align: top;				width: 100%;				border-spacing: 0px;				border-spacing: 0px;"		cellspacing=0		width=100%>  <col style="width: 50%;">  <col style="width: 50%;">  <tr style="x-cell-content-align: top;"	valign=top>  <td style="width: 50%;			padding-right: 10px;			padding-left: 10px;			border-right-style: None;			border-left-style: None;			border-top-style: None;			border-bottom-style: None;"	width=50%>  <p style="font-family: Arial;"><small style="font-size: smaller;">

⌨️ 快捷键说明

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