This is an archive of the original scripts.sil.org site, preserved as a historical reference. Some of the content is outdated. Please consult our other sites for more current information: software.sil.org, ScriptSource, FDBP, and silfontdev



Home

Contact Us

General

Initiative B@bel

WSI Guidelines

Encoding

Principles

Unicode

Training

Tutorials

PUA

Conversion

Resources

Utilities

TECkit

Maps

Resources

Input

Principles

Utilities

Tutorials

Resources

Type Design

Principles

Design Tools

Formats

Resources

Font Downloads

Gentium

Doulos

IPA

Rendering

Principles

Technologies

OpenType

Graphite

Resources

Font FAQ

Links

Glossary


Computers & Writing Systems

SIL HOME | SIL SOFTWARE | SUPPORT | DONATE | PRIVACY POLICY

You are here: General > Initiative B@bel
Short URL: https://scripts.sil.org/GrEditCtrlDoc

Graphite-enabled Edit Control Version 0.9

Sharon Correll, 2003-06-26

From January to October of 2003, SIL International was engaged in a cooperative project with  UNESCO as part of UNESCO’s  Initiative B@bel effort. The goal was to enable the development of complex script support in information and communication technologies (ICTs). This was done through preparation of documents to guide development, technical tools for complex script support, and two example script implementations. All of these are available from a general UNESCO page.

This document describes a beta version of a basic Graphite edit control for data input applications. It includes a software development kit (SDK) that includes: a binary DLL for Windows 2000 and XP, a developer guide for integrating into host applications, well commented source code, a simple Windows (2000 & XP) based test application for testing the control. The complete document is available on this page, but can also be downloaded in both Word and PDF formats:

Graphite-enabled Edit Control Version 0.9 - Word
Sharon Correll, 2003-06-26
Download "GkEditCtrlDoc_Word.zip", ZIP archive, 11KB [2318 downloads]
Graphite-enabled Edit Control Version 0.9 - PDF
Sharon Correll, 2003-06-26
Download "GkEditCtrlDoc_PDF.pdf", Acrobat PDF document, 132KB [4105 downloads]

The original specification is available here, but is also provided in Word and PDF formats:

Specifications for Graphite-enabled Edit Control - Word
Sharon Correll, 2003-04-03
Download "GraphiteEditControlSpecW.zip", ZIP archive, 16KB [2254 downloads]
Specifications for Graphite-enabled Edit Control - PDF
Sharon Correll, 2003-04-03
Download "GraphiteEditControlSpecP.pdf", Acrobat PDF document, 189KB [3582 downloads]


Overview

SilGraphiteControl is an ActiveX control that provides rendering using SIL's Graphite engine. It is intended for use on the Window 2000 and Windows XP operating systems.

The functionality of version 0.9 is fairly close to what is described as "phase 3" in the specification document. See the Known issues section below for more details about the status of specific features.

Download

Executable files

Graphite Edit Control Executable Files - Release
Sharon Correll, 2003-06-30
Download "GrEditCtrlExeRelease_zip.zip", ZIP archive, 166KB [2304 downloads]
Graphite Edit Control Executable Files - Debug
Sharon Correll, 2003-06-30
Download "GrEditCtrlExeDebug_zip.zip", ZIP archive, 352KB [2258 downloads]
MFC-related DLLs required for the Graphite Edit Control
Sharon Correll, 2003-07-02
Download "GrEditCtrlMfcDlls_zip.zip", ZIP archive, 858KB [2351 downloads]

Source code and libraries

Graphite Edit Control Source Code
Sharon Correll, 2003-06-30
Download "GrEditCtrlSourceCode_zip.zip", ZIP archive, 533KB [2750 downloads]
Graphite Edit Control Include Files
Sharon Correll, 2003-06-30
Download "GrEditCtrlInclude_zip.zip", ZIP archive, 66KB [2201 downloads]
Graphite Library Files for Edit Control
Sharon Correll, 2003-06-30
Download "GrEditCtrlGraphiteLib_zip.zip", ZIP archive, 2MB [2292 downloads]

Test application

The test application is provided solely to demonstrate how to interface with the edit control. It is known to be buggy!

Graphite Edit Control Test Application
Sharon Correll, 2003-06-30
Download "GrEditCtrlTestApp_zip.zip", ZIP archive, 189KB [2377 downloads]

In order to run the test application, you will need to have the  MS .NET framework installed.

Installation

To use the edit control within your application, you will need to download one of the executable packages above. The SILGraphiteControl.ocx file must be registered using regsvr32.

You may also need to install and register the three MFC DLLs in the package above if they are not already present on your system.

Interface

Below are listed the methods that are part of the SilGraphiteControl interface.

Methods for initializing the parameters of the control

void SetDefaultFont([in] BSTR fontName);

void SetDefaultFontSize([in] int fontSize);

void SetAllowFormatDlg([in] VARIANT_BOOL newVal);

void SetVerticalScroll([in] VARIANT_BOOL scrollFlag);

void SetMultiline([in] VARIANT_BOOL);

Methods for editing text

void SetText([in] LPCTSTR newVal);

BSTR GetText();

void Cut(void);

void Copy(void);

void Paste(void);

void Undo(void);

void Redo(void);

Methods for formatting text

void SetSelectionFont([in] BSTR fontName);

void GetSelectionFont([out] BSTR* fontName);

void SetSelectionFontSize([in] int fontSize);

int GetSelectionFontSize(void);

Methods for working with files

void Open([in] BSTR pVar, [in] LONG flags, [in] LONG CodePage);

void Save([in] BSTR pVar, [in] LONG flags, [in] LONG CodePage);

void PutHtmlText([in] BSTR text);

void GetHtmlText([out] BSTR* text);

Other methods

The following methods exist but have not been tested adequately or are known to be buggy:

void New(void);

void ResizeWindow([in] LONG x, [in] LONG y);

LONG GetSizeX(void);

LONG GetSizeY(void);

void MoveRight([in] VARIANT_BOOL shiftFlag);

void MoveLeft([in] VARIANT_BOOL shiftFlag);

void MoveUp([in] VARIANT_BOOL shiftFlag);

void MoveDown([in] VARIANT_BOOL shiftFlag);

Event handling

The control supports the following stock events:

  • Click
  • KeyDown

Known issues

Mouse bug: It is possible to get into a state where the mouse hangs. Workaround: do an extra right click to return the mouse to its normal state.

Printing is unsupported in this version.

Zooming is unsupported in this version.

Menu options are not appropriately disabled (e.g., Copy and Paste).

Horizontal scrolling in the multi-line control is not available in this version.

Graphite and Uniscribe: The Graphite engine is used for all fonts, even those with no Graphite tables. This is a hinderance to perforance, and also means that Uniscribe support built into the operating system is not available.

Vertical scroll bar: Turning on the vertical scroll bar after the control has been filled with text will not work correctly.

HTML import: The HTML import routines will only handle files that have been generated by the control's HTML export function. Arbitrary HTML or XHTML will not be successfully loaded, and error recovery is minimal.

Keyman: Keyman behavior seems to be inconsistent within the test application. Starting and stopping either the application or Keyman may help.

Copyright notice

(c) Copyright 2003 UNESCO and SIL International Inc.

SIL would like to express appreciation to the University of Singapore for their contributions to the Graphite Edit Control project through their intern program, and to Chia Sheau Ching and Victor for their excellent work on this project. SIL would also like to thank Wycliffe Singapore and Jim Moore for oversight of this project.

This material is released under LGPL/CPL licenses. Details of these
licenses may be found at  http://www.opensource.org/licenses/


© 2003-2024 SIL International, all rights reserved, unless otherwise noted elsewhere on this page.
Provided by SIL's Writing Systems Technology team (formerly known as NRSI). Read our Privacy Policy. Contact us here.