Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
IMEManager Class Reference

Inherits IMEManagerInterface.

Classes

struct  MessageInfo
 

Public Member Functions

 IMEManager ()
 
 ~IMEManager ()
 
virtual void init (void)
 
virtual void reset (void)
 
virtual void update (void)
 
virtual void attach (GameWindow *window)
 attach IME to specified window
 
virtual void detatch (void)
 detatch IME from current window
 
virtual void enable (void)
 Enable IME.
 
virtual void disable (void)
 Disable IME.
 
virtual Bool isEnabled (void)
 Is IME enabled.
 
virtual Bool isAttachedTo (GameWindow *window)
 Is the manager attached toa window.
 
virtual GameWindowgetWindow (void)
 Returns the window we are currently attached to.
 
virtual Bool isComposing (void)
 Manager is currently composing new input string.
 
virtual void getCompositionString (UnicodeString &string)
 Return the current composition string.
 
virtual Int getCompositionCursorPosition (void)
 Returns the composition cursor position.
 
virtual Int getIndexBase (void)
 Get index base for candidate list.
 
virtual Int getCandidateCount ()
 Returns the total number of candidates.
 
virtual UnicodeStringgetCandidate (Int index)
 Returns the candidate string.
 
virtual Int getSelectedCandidateIndex ()
 Returns the indexed of the currently selected candidate.
 
virtual Int getCandidatePageSize ()
 Returns the page size for the candidates list.
 
virtual Int getCandidatePageStart ()
 Returns the index of the first visibel candidate.
 
virtual Bool serviceIMEMessage (void *windowsHandle, UnsignedInt message, Int wParam, Int lParam)
 Checks for and services IME messages. Returns TRUE if message serviced.
 
virtual Int result (void)
 result return value of last serviced IME message
 
- Public Member Functions inherited from IMEManagerInterface
virtual ~IMEManagerInterface ()
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Types

enum  { MAX_COMPSTRINGLEN = 2*1024 }
 

Protected Member Functions

WideChar convertCharToWide (WPARAM mbchar)
 Convert multibyte character to wide.
 
void updateCompositionString (void)
 Update the context of the composition string from the IMM.
 
void getResultsString (void)
 Get the final composition string result.
 
void updateProperties (void)
 Read the current IME properties.
 
void openCandidateList (Int candidateFlags)
 open candidate window
 
void closeCandidateList (Int candidateFlags)
 Close candidate window.
 
void updateCandidateList (Int candidateFlags)
 Update candidate window.
 
void updateListBox (CANDIDATELIST *candidateList)
 Update candidate list box gadget.
 
void convertToUnicode (Char *mbcs, UnicodeString &unicode)
 
void resizeCandidateWindow (Int pageSize)
 
void openStatusWindow (void)
 
void closeStatusWindow (void)
 
void updateStatusWindow (void)
 

Protected Attributes

Int m_result
 last IME message's winProc return code
 
GameWindowm_window
 window we are accepting input for
 
HIMC m_context
 Imput Manager Context.
 
HIMC m_oldContext
 Previous IME comtext.
 
Int m_disabled
 IME disable count 0 = enabled.
 
Bool m_composing
 Are we currently composing a new string.
 
WideChar m_compositionString [MAX_COMPSTRINGLEN+1]
 
WideChar m_resultsString [MAX_COMPSTRINGLEN+1]
 
Int m_compositionCursorPos
 
Int m_compositionStringLength
 
Int m_indexBase
 
Int m_pageStart
 index of first visible candidate
 
Int m_pageSize
 Number of candidate per page.
 
Int m_selectedIndex
 Index of the currently selected candidate.
 
Int m_candidateCount
 Total number of candidate strings.
 
UnicodeStringm_candidateString
 table of canidate strings
 
Bool m_unicodeIME
 Is this an unicode IME.
 
Int m_compositionCharsDisplayed
 number of temporary composition characters displayed that need to be replaced with result string.
 
GameWindowm_candidateWindow
 IME candidate window interface.
 
GameWindowm_statusWindow
 IME status window interface.
 
GameWindowm_candidateTextArea
 list box area
 
GameWindowm_candidateUpArrow
 up arrow
 
GameWindowm_candidateDownArrow
 down arrow
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Definition at line 93 of file IMEManager.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_COMPSTRINGLEN 

Definition at line 134 of file IMEManager.cpp.

Constructor & Destructor Documentation

◆ IMEManager()

IMEManager::IMEManager ( )

Definition at line 502 of file IMEManager.cpp.

◆ ~IMEManager()

IMEManager::~IMEManager ( )

Definition at line 534 of file IMEManager.cpp.

Member Function Documentation

◆ attach()

void IMEManager::attach ( GameWindow * window)
virtual

attach IME to specified window

Implements IMEManagerInterface.

Definition at line 642 of file IMEManager.cpp.

◆ closeCandidateList()

void IMEManager::closeCandidateList ( Int candidateFlags)
protected

Close candidate window.

Definition at line 1319 of file IMEManager.cpp.

◆ closeStatusWindow()

void IMEManager::closeStatusWindow ( void )
protected

Definition at line 1597 of file IMEManager.cpp.

◆ convertCharToWide()

WideChar IMEManager::convertCharToWide ( WPARAM mbchar)
protected

Convert multibyte character to wide.

Definition at line 1046 of file IMEManager.cpp.

◆ convertToUnicode()

void IMEManager::convertToUnicode ( Char * mbcs,
UnicodeString & unicode )
protected

Definition at line 1215 of file IMEManager.cpp.

◆ detatch()

void IMEManager::detatch ( void )
virtual

detatch IME from current window

Implements IMEManagerInterface.

Definition at line 661 of file IMEManager.cpp.

◆ disable()

void IMEManager::disable ( void )
virtual

Disable IME.

Implements IMEManagerInterface.

Definition at line 1008 of file IMEManager.cpp.

◆ enable()

void IMEManager::enable ( void )
virtual

Enable IME.

Implements IMEManagerInterface.

Definition at line 995 of file IMEManager.cpp.

◆ getCandidate()

UnicodeString * IMEManager::getCandidate ( Int index)
virtual

Returns the candidate string.

Implements IMEManagerInterface.

Definition at line 1543 of file IMEManager.cpp.

◆ getCandidateCount()

Int IMEManager::getCandidateCount ( )
virtual

Returns the total number of candidates.

Implements IMEManagerInterface.

Definition at line 1534 of file IMEManager.cpp.

◆ getCandidatePageSize()

Int IMEManager::getCandidatePageSize ( )
virtual

Returns the page size for the candidates list.

Implements IMEManagerInterface.

Definition at line 1566 of file IMEManager.cpp.

◆ getCandidatePageStart()

Int IMEManager::getCandidatePageStart ( )
virtual

Returns the index of the first visibel candidate.

Implements IMEManagerInterface.

Definition at line 1575 of file IMEManager.cpp.

◆ getCompositionCursorPosition()

Int IMEManager::getCompositionCursorPosition ( void )
virtual

Returns the composition cursor position.

Implements IMEManagerInterface.

Definition at line 1092 of file IMEManager.cpp.

◆ getCompositionString()

void IMEManager::getCompositionString ( UnicodeString & string)
virtual

Return the current composition string.

Implements IMEManagerInterface.

Definition at line 1083 of file IMEManager.cpp.

◆ getIndexBase()

Int IMEManager::getIndexBase ( void )
virtual

Get index base for candidate list.

Implements IMEManagerInterface.

Definition at line 1485 of file IMEManager.cpp.

◆ getResultsString()

void IMEManager::getResultsString ( void )
protected

Get the final composition string result.

Definition at line 1170 of file IMEManager.cpp.

◆ getSelectedCandidateIndex()

Int IMEManager::getSelectedCandidateIndex ( )
virtual

Returns the indexed of the currently selected candidate.

Implements IMEManagerInterface.

Definition at line 1557 of file IMEManager.cpp.

◆ getWindow()

GameWindow * IMEManager::getWindow ( void )
virtual

Returns the window we are currently attached to.

Implements IMEManagerInterface.

Definition at line 1036 of file IMEManager.cpp.

◆ init()

void IMEManager::init ( void )
virtual
  • Assign any default values to data required for the class
    • Allocate any memory and resources needed throughout the lifetime of the class

Implements SubsystemInterface.

Definition at line 564 of file IMEManager.cpp.

◆ isAttachedTo()

Bool IMEManager::isAttachedTo ( GameWindow * window)
virtual

Is the manager attached toa window.

Implements IMEManagerInterface.

Definition at line 1027 of file IMEManager.cpp.

◆ isComposing()

Bool IMEManager::isComposing ( void )
virtual

Manager is currently composing new input string.

Implements IMEManagerInterface.

Definition at line 1077 of file IMEManager.cpp.

◆ isEnabled()

Bool IMEManager::isEnabled ( void )
virtual

Is IME enabled.

Implements IMEManagerInterface.

Definition at line 1018 of file IMEManager.cpp.

◆ openCandidateList()

void IMEManager::openCandidateList ( Int candidateFlags)
protected

open candidate window

Definition at line 1250 of file IMEManager.cpp.

◆ openStatusWindow()

void IMEManager::openStatusWindow ( void )
protected

Definition at line 1584 of file IMEManager.cpp.

◆ reset()

void IMEManager::reset ( void )
virtual
  • Any system should be able to reset all data and go back to an empty state that is ready to accept a completely new set of data. Reset() can expect to be used in the context of resetting the engine in order to start or load a new game.
    • Do NOT free and re-allocate resources needed, where possible reorganize and re-initialize the resources already allocated.
    • After a reset, the system does not need to be in EXACTLY the same state as a fresh instantiation. If there are persistent state information for the system make sure you maintain it while restoring or re-initializing other transient parts.

Implements SubsystemInterface.

Definition at line 624 of file IMEManager.cpp.

◆ resizeCandidateWindow()

void IMEManager::resizeCandidateWindow ( Int pageSize)
protected

Definition at line 1494 of file IMEManager.cpp.

◆ result()

Int IMEManager::result ( void )
virtual

result return value of last serviced IME message

Implements IMEManagerInterface.

Definition at line 986 of file IMEManager.cpp.

◆ serviceIMEMessage()

Bool IMEManager::serviceIMEMessage ( void * windowsHandle,
UnsignedInt message,
Int wParam,
Int lParam )
virtual

Checks for and services IME messages. Returns TRUE if message serviced.

Implements IMEManagerInterface.

Definition at line 672 of file IMEManager.cpp.

◆ update()

void IMEManager::update ( void )
virtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Definition at line 633 of file IMEManager.cpp.

◆ updateCandidateList()

void IMEManager::updateCandidateList ( Int candidateFlags)
protected

Update candidate window.

Definition at line 1341 of file IMEManager.cpp.

◆ updateCompositionString()

void IMEManager::updateCompositionString ( void )
protected

Update the context of the composition string from the IMM.

Definition at line 1101 of file IMEManager.cpp.

◆ updateListBox()

void IMEManager::updateListBox ( CANDIDATELIST * candidateList)
protected

Update candidate list box gadget.

◆ updateProperties()

void IMEManager::updateProperties ( void )
protected

Read the current IME properties.

Definition at line 1473 of file IMEManager.cpp.

◆ updateStatusWindow()

void IMEManager::updateStatusWindow ( void )
protected

Definition at line 1611 of file IMEManager.cpp.

Member Data Documentation

◆ m_candidateCount

Int IMEManager::m_candidateCount
protected

Total number of candidate strings.

Definition at line 160 of file IMEManager.cpp.

◆ m_candidateDownArrow

GameWindow* IMEManager::m_candidateDownArrow
protected

down arrow

Definition at line 184 of file IMEManager.cpp.

◆ m_candidateString

UnicodeString* IMEManager::m_candidateString
protected

table of canidate strings

Definition at line 161 of file IMEManager.cpp.

◆ m_candidateTextArea

GameWindow* IMEManager::m_candidateTextArea
protected

list box area

Definition at line 182 of file IMEManager.cpp.

◆ m_candidateUpArrow

GameWindow* IMEManager::m_candidateUpArrow
protected

up arrow

Definition at line 183 of file IMEManager.cpp.

◆ m_candidateWindow

GameWindow* IMEManager::m_candidateWindow
protected

IME candidate window interface.

Definition at line 180 of file IMEManager.cpp.

◆ m_composing

Bool IMEManager::m_composing
protected

Are we currently composing a new string.

Definition at line 150 of file IMEManager.cpp.

◆ m_compositionCharsDisplayed

Int IMEManager::m_compositionCharsDisplayed
protected

number of temporary composition characters displayed that need to be replaced with result string.

Definition at line 163 of file IMEManager.cpp.

◆ m_compositionCursorPos

Int IMEManager::m_compositionCursorPos
protected

Definition at line 153 of file IMEManager.cpp.

◆ m_compositionString

WideChar IMEManager::m_compositionString[MAX_COMPSTRINGLEN+1]
protected

Definition at line 151 of file IMEManager.cpp.

◆ m_compositionStringLength

Int IMEManager::m_compositionStringLength
protected

Definition at line 154 of file IMEManager.cpp.

◆ m_context

HIMC IMEManager::m_context
protected

Imput Manager Context.

Definition at line 147 of file IMEManager.cpp.

◆ m_disabled

Int IMEManager::m_disabled
protected

IME disable count 0 = enabled.

Definition at line 149 of file IMEManager.cpp.

◆ m_indexBase

Int IMEManager::m_indexBase
protected

Definition at line 155 of file IMEManager.cpp.

◆ m_oldContext

HIMC IMEManager::m_oldContext
protected

Previous IME comtext.

Definition at line 148 of file IMEManager.cpp.

◆ m_pageSize

Int IMEManager::m_pageSize
protected

Number of candidate per page.

Definition at line 158 of file IMEManager.cpp.

◆ m_pageStart

Int IMEManager::m_pageStart
protected

index of first visible candidate

Definition at line 157 of file IMEManager.cpp.

◆ m_result

Int IMEManager::m_result
protected

last IME message's winProc return code

Definition at line 145 of file IMEManager.cpp.

◆ m_resultsString

WideChar IMEManager::m_resultsString[MAX_COMPSTRINGLEN+1]
protected

Definition at line 152 of file IMEManager.cpp.

◆ m_selectedIndex

Int IMEManager::m_selectedIndex
protected

Index of the currently selected candidate.

Definition at line 159 of file IMEManager.cpp.

◆ m_statusWindow

GameWindow* IMEManager::m_statusWindow
protected

IME status window interface.

Definition at line 181 of file IMEManager.cpp.

◆ m_unicodeIME

Bool IMEManager::m_unicodeIME
protected

Is this an unicode IME.

Definition at line 162 of file IMEManager.cpp.

◆ m_window

GameWindow* IMEManager::m_window
protected

window we are accepting input for

Definition at line 146 of file IMEManager.cpp.


The documentation for this class was generated from the following file: