ReactOS 0.4.15-dev-8390-g075894b
CPolyText Struct Reference

#include <ui.h>

Collaboration diagram for CPolyText:

Public Member Functions

HRESULT ShiftPolyText (INT xDelta, INT yDelta)
 @implemented
 
POLYTEXTWGetPolyAt (INT iItem)
 @implemented
 
HRESULT RemoveLastLine (BOOL bHorizontal)
 @implemented
 
void RemoveAll ()
 @implemented
 

Public Attributes

CicArray< POLYTEXTWm_PolyTextArray
 
CicArray< DWORDm_ValueArray
 

Detailed Description

Definition at line 121 of file ui.h.

Member Function Documentation

◆ GetPolyAt()

POLYTEXTW * CPolyText::GetPolyAt ( INT  iItem)

@implemented

Definition at line 385 of file ui.cpp.

386{
387 return &m_PolyTextArray[iItem];
388}
CicArray< POLYTEXTW > m_PolyTextArray
Definition: ui.h:123

◆ RemoveAll()

void CPolyText::RemoveAll ( )

@implemented

Definition at line 436 of file ui.cpp.

437{
438 m_PolyTextArray.clear();
440}
void clear()
Definition: cicarray.h:36
CicArray< DWORD > m_ValueArray
Definition: ui.h:124

Referenced by UIComposition::DestroyCompositionWindow().

◆ RemoveLastLine()

HRESULT CPolyText::RemoveLastLine ( BOOL  bHorizontal)

@implemented

Definition at line 404 of file ui.cpp.

405{
406 size_t iItem, cItems = m_PolyTextArray.size();
407 if (!cItems)
408 return E_FAIL;
409
410 POLYTEXTW *pData1 = &m_PolyTextArray[cItems - 1];
411
412 for (iItem = 0; iItem < cItems; ++iItem)
413 {
414 POLYTEXTW *pData2 = &m_PolyTextArray[iItem];
415 if (bHorizontal)
416 {
417 if (pData1->x == pData2->x)
418 break;
419 }
420 else
421 {
422 if (pData1->y == pData2->y)
423 break;
424 }
425 }
426
427 if (iItem >= cItems)
428 return E_FAIL;
429
430 m_PolyTextArray.Remove(iItem, cItems - iItem);
431 m_ValueArray.Remove(iItem, cItems - iItem);
432 return S_OK;
433}
void Remove(size_t iItem, size_t cRemove=1)
Definition: cicarray.cpp:57
#define E_FAIL
Definition: ddrawi.h:102
#define S_OK
Definition: intsafe.h:52

◆ ShiftPolyText()

HRESULT CPolyText::ShiftPolyText ( INT  xDelta,
INT  yDelta 
)

@implemented

Definition at line 391 of file ui.cpp.

392{
393 for (size_t iItem = 0; iItem < m_PolyTextArray.size(); ++iItem)
394 {
395 POLYTEXTW *pPolyText = &m_PolyTextArray[iItem];
396 pPolyText->x += xDelta;
397 pPolyText->y += yDelta;
398 ::OffsetRect((LPRECT)&pPolyText->rcl, xDelta, yDelta);
399 }
400 return S_OK;
401}
RECT rcl
Definition: wingdi.h:2566
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)

Member Data Documentation

◆ m_PolyTextArray

CicArray<POLYTEXTW> CPolyText::m_PolyTextArray

Definition at line 123 of file ui.h.

Referenced by GetPolyAt(), RemoveAll(), RemoveLastLine(), and ShiftPolyText().

◆ m_ValueArray

CicArray<DWORD> CPolyText::m_ValueArray

Definition at line 124 of file ui.h.

Referenced by RemoveAll(), and RemoveLastLine().


The documentation for this struct was generated from the following files: