|
FrontPage › TitleIndex › 딱지_CEGUI
@ 2008-03-29
1 IME #���� ������;
http://sarangnamu.net/basic/basic_view.php?no=826
http://kr.blog.yahoo.com/ppk314/76884?kbsp=WM_IME_COMPOSITION&kbsref=etc&mp=&mpc=4 http://gfc3.springnote.com/pages/525970 1.1 IME�� ��������? #IME�� Input Method Editor�� ���� ������ ������ ������, ������, �������� DBCS(Double Byte Character Sets) / MDCS(Multi Byte Character Sets)�� ���� ���� �������� ������.
�������� >> http://www.dexgame.com/zbxe/?mid=download&search_target=title&search_keyword=ime&document_srl=5879
������ IME ���� ���� (ANSI ���� ����)
IME_Test.zip (2006.12.08)...
������ ����������. ������ ���� ����~������.
������ IME ���� ����������. ���� �������� �������� �������� ���� ������ �� ������ ��������. ���������� ANSI �������� �������� �������� ������ ��/���� ���� ������ ���� ��������. Composite �� Candidate �� GDI�� ���� �������� ������ ������ ������ ���������� ���� ���� ���������� Unicode �� ���� ������ ANSI �� �������� ���������� ������. ��������; Vietnam Charset/Codepage ���� ���� (switch��) 1.2 �������� IME�� ���� #�������� CWnd�� ���������� ���� �������� �������� ���� ������ WM_KEYDOWN ������ WM_CHAR�������� �������� ������ ������ �������� WM_KEYDOWN ������ WM_IME_COMPOSITION�� �������� ������ ������ ���� WM_CHAR�� ���� �������� ����. �� ���������� ������ 2byte������ ������ ������ �� ���� ��������.
�������� �������� ���������� �������� ���������� ������ �� ���� ���������� �������� ������ ������.
���� ������ �������� ������ ���� IME���� �������� �������� ���� ������ ������������ �������� ���� ������.
������������ IME �������� ����/���� �������� ���� �� IME�� ���� ���� ������ ���� WM_IME �� �������� IME �������� ������ �������� ������. �� ���������� �������� ���� DefWindowProc() ���� ���� ���� ���������� ������ ������ �������� WM_CHAR �������� ���� ����.
1.2.1 IME�� ������ ������ #
1.3 ���� ���� ���� ������ ������ #
1.3.1 WM_IME_COMPOSITION�� ������ ���� ���� ���� #�� ������ ������ ���� ������, �� WM_IME_COMPOSITION �������� ���������� IME ������ ������ ���� ������ ���� ������.WM_IME_COMPOSITION �������� ������������ ������ �������� �������� ���������� �� �������� �������� ������ lParam�� ������ �������� ������ �������� �� ������ �������� ���� ����. ������ IME�� �������� ���� �������� Composition ������������ ����.
2 CEGUI-SDK-0.5.0b(�������� ����) #���� ������
http://www.cegui.org.uk/wiki/index.php/Main_Page - 2008.03.27 CEGUI-SDK-0.6.0-vc8
http://acasia.tistory.com/166 http://cafe.naver.com/ogre3d.cafe - OGRE 3D ���� ������ ������ ���� CEGUI�� ���� ���� ����
CEGUI-SDK-0.5.0b-vc8.exe/
CEImagesetEditor.zip (���� ?)
CELayoutEditorSetup_0.5.0c.exe/
CELayoutEditorSetup-0.5.0b.exe/
2.1 ���� ���� #'CEGUI-SDK-0.5.0b-vc8\datafiles\'������ ������ ������ ������ �������� ���������������� ������ schemes, looknfeel, imagesets, layouts�� ��������. 2.1.1 schemes #<xml version="1.0" ?> // xml ����<GUIScheme Name="WindowsLookSkin"> // GUIScheme ���� <Imageset Name="WindowsLook" Filename="WindowsLook.imageset" /> // ������ Image Set <LookNFeel Filename="WindowsLook.looknfeel" /> // ������ LookNFeel <WindowSet Filename="CEGUIFalagardWRBase" /> // ������ WindowSet <FalagardMapping
WindowType="WindowsLook/Button" // ������ ����
TargetType="CEGUI/PushButton" // ���� ���� Renderer="Falagard/Button" // ������ ���� LookNFeel="WindowsLook/Button" /> // LookNFeel 2.1.2 looknfeel #Falagard ������ �������� �������� �������� ������ ������ ����.<xml version="1.0" ?> <Falagard>
<WidgetLook name="WindowsLook/Button">
</ Falagard>
<PropertyDefinition name="NormalTextColour" initialValue="FF000000" redrawOnWrite="true" /> // ������ ����
</ WidgetLook>2.1.3 imagesets #���������� ������/������ ���� ������ ������ �������� CEImagesetEditor�� ������ ������ �� ����.<xml version="1.0" ?> <Imageset Name="WindowsLook" Imagefile="WindowsLook.tga" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true"> <Image Name="Background" XPos="9" YPos="9" Width="2" Height="2" /> ... </Imageset> ������ �������� ������ �������� ������ ������ Image�� ��������. 2.1.4 layouts #CELayoutEditor�� �������� ���������� ������ �� ����.<xml version="1.0" ?> <GUILayout>
<Window Type="Vanilla/Button" Name="Vanilla/Console/Submit">
...
<Property Name="ID" Value="1" />
</Window></GUILayout> 2.2 ���� ���� #2.2.1 ���� ���� #����; http://blog.naver.com/dekaf?Redirect=Log&logNo=400412345071.CEGUI 0.5.0������ �� ���� ������ ������ ������ ��������.�� ������ ������ ����. 1-1.���� ���� ����
-.������ ������ datafiles\fonts�� ��������.
<xml version="1.0" ?>-.����.font ������ ���� <Font Name="Han-12" Filename="H2GTRE.TTF" Type="FreeType" Size="10" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true"/> 1-2.������������ ���� ���� 1-3.������ ������ UTF-8�� ����
1) �������� ������ UTF-8�� ����; Visual Studio���� ���������� ������ ��, UTF-8�� �������� �� �������� ������ ����
Visual Studio 6.0���� ���������� ������ �� ����
2) �������� ������ �������� UTF-8�� ������ ���� File�� ������������ ������ ������ ����VS 2005������ ������������ UTF-8�� ���� ����(������ ���� �������� ��) VS 2003������ �� ������ ��
VS 2005���� UTF-8�� �������� ������ ������ ������ ������ �� ����
3) MBC �������� UTF-8�� �������� CEGUI ������ ������(������ MBC -> Unicode -> UTF-8 ������) ���� ����(in orge3d ������ ����)
strconv-dekaf.h
#include "strconv.h"
#define CONV_UTF8_MBCS(a) convUni2Mbcs(convUtf82Uni(a)).c_str() #define CONV_MBCS_UTF8(a) convUni2Utf8(convMbcs2Uni(a)).c_str() 2.2.2 ���� ����1 #����; http://www.gpgstudy.com/forum/viewtopic.php?topic=15388WM_IME_COMPOSITION ������ ���������� return������ true�� ���� ime���� �������� ������ ���� ������ �������� ���� ������.
#pragma comment(lib, "imm32.lib")
#include <imm.h>
void processImeInput(LPARAM lParam, CEGUI::System *pCEGUISystem)
{
// �������� CEGUI�������� Editbox������ �������� IME �������� ����
for(int i = 0; i < nLength; i++)Window* myRoot = CEGUI::System::getSingleton().getGUISheet(); CEGUI::Editbox *pEditWindow =(CEGUI::Editbox*)myRoot->getActiveChild(); if(pEditWindow == NULL)
return;
// IME ��������. �������� IME �������� ����HIMC hImc = ImmGetContext(GetWindowReference()); if(hImc == NULL)
return;
// ���� ����int nLength = 0; wchar_t wszComp[4] = {0,}; // IME ���� ������ ������������ if(lParam == GCS_RESULTSTR) {
{
}
if(wszComp[i] != 0)
}
pCEGUISystem->injectChar(wszComp[i]);
// ���� ������ ������������ �������� ���� �������� size_t caretIndex = pEditWindow->getCaratIndex();
pEditWindow->setSelection(caretIndex, caretIndex);
}
}
nLength = ImmGetCompositionStringW(hImc, GCS_COMPSTR, NULL, 0);// IME ���� ������������ else { if(nLength > 0) {
ImmGetCompositionStringW(hImc, GCS_COMPSTR, wszComp, nLength);
}for(int i = 0; i < nLength; i++) { } // ������ �������� ���� �������� ������ ���������� �� size_t caretIndex = pEditWindow->getCaratIndex(); pEditWindow->setSelection(caretIndex - 1, caretIndex);
������; ������������ �������� ������ ������ �������� ������ ������ ����
������ WM_CHAR �������� �������� �������� ������ ������ �������� �� 2������ �������� 1�������������� ��������
1������ �������� ���� ���� ���� ������, 2������ �������� ���������� 2������ ������ ������ UTF-8�� ������ ���� ������.
#include < ctype.h >
inline int __cdecl isLeadByte(int _C) {return ((unsigned char)(_C) & 0x80); }
switch(pEventRecord->uiMsg)
{
case WM_CHAR:
}{
static char MultiByte[2] = {0};
}static bool isHaveMultiByte = false; if(isHaveMultiByte) {
isHaveMultiByte = false;
}MultiByte[1] = (unsigned char)pEventRecord->wParam; int iLengthUnicode = 0; wchar_t szUnicode; MultiByteToWideChar(CP_ACP, 0, (char*)MultiByte, 2, &szUnicode, 1); CEGUI::System::getSingleton().injectChar((CEGUI::utf32)szUnicode); break; else {
if( isLeadByte(pEventRecord->wParam) )
} { } else { } break; 3 ���� GUI ���������� ���� ���� #GPG�� pacman���� 2004.04.13 ������ ���� ���� ( http://www.gpgstudy.com/forum/viewtopic.php?topic=5016 )
|
"Fortune Cookies..." edu2014_Unity3D를_이용한_게임_만들기 딱지_Milestone 바람03 책갈피_Performance |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||